/*
 * Zeiterfassung – assets/style.css
 * Version 1.10.0 – 04.11.2026
 * Copyright © Frone.de
 */

:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --text: #1c2430;
  --muted: #6b7280;
  --border: #e2e0d8;
  --brand: #1e3a5f;
  --brand-ink: #ffffff;
  --accent: #2459c4;
  --accent-ink: #ffffff;
  --pos: #15803d;
  --neg: #b91c1c;
  --warn: #b45309;
  --live: #0f766e;
  --off-bg: #eeece6;
  --off-text: #8b9099;
  --today: #fff8e1;
  --hover: #f0f4fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .05), 0 2px 10px rgba(20, 24, 31, .04);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151b;
    --surface: #1a2029;
    --surface-2: #151a22;
    --text: #e5e7eb;
    --muted: #9aa3af;
    --border: #2b323d;
    --brand: #0d1a2b;
    --accent: #6c9cf5;
    --accent-ink: #0b1220;
    --pos: #4ade80;
    --neg: #f87171;
    --warn: #fbbf24;
    --live: #2dd4bf;
    --off-bg: #151a21;
    --off-text: #6d7681;
    --today: #2a2516;
    --hover: #1f2834;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--muted); font-size: .8rem; margin: .5rem 0 0; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 54px; padding: 0 20px;
  background: var(--brand); color: var(--brand-ink);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand svg { width: 22px; height: 22px; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a, .topnav .linklike { color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600; font-size: .92rem; }
.topnav a:hover, .topnav .linklike:hover, .topnav a.is-active { color: #fff; }
.topnav a.is-active { box-shadow: inset 0 -2px 0 #fff; padding-bottom: 3px; }

.pagefoot { text-align: center; color: var(--muted); font-size: .8rem; padding: 28px 16px 36px; }

/* ---------- Meldungen ---------- */
.flashes { max-width: 1320px; margin: 14px auto 0; padding: 0 20px; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 10px; border: 1px solid transparent; font-size: .92rem; }
.flash-success { background: color-mix(in srgb, var(--pos) 12%, var(--surface)); border-color: color-mix(in srgb, var(--pos) 30%, var(--surface)); }
.flash-error   { background: color-mix(in srgb, var(--neg) 10%, var(--surface)); border-color: color-mix(in srgb, var(--neg) 30%, var(--surface)); }
.flash-info    { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 28%, var(--surface)); }

/* ---------- Formularelemente ---------- */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus, button:focus-visible, tr.editable:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: .9rem; }
label.check input { width: auto; margin: 0; }
.stack > * + * { margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-out { background: var(--text); color: var(--surface); border-color: transparent; }
.btn-out:hover { background: color-mix(in srgb, var(--text) 85%, var(--surface)); }
.btn-danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 35%, var(--surface)); }
.btn-block { width: 100%; padding: 12px 14px; font-size: 1rem; }
.btn.small { padding: 5px 10px; font-size: .84rem; }
.btn.icon { width: 36px; height: 36px; padding: 0; font-size: 1.35rem; line-height: 1; }
.btn.danger { color: var(--neg); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border);
  font-size: .74rem; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: 1px;
}
.chip-muted   { color: var(--muted); }
.chip-holiday { color: var(--off-text); background: var(--surface); }
.chip-error   { color: var(--neg);  border-color: color-mix(in srgb, var(--neg) 40%, var(--surface));  background: color-mix(in srgb, var(--neg) 9%, var(--surface)); }
.chip-warn    { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--surface)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.chip-live    { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, var(--surface)); background: color-mix(in srgb, var(--live) 9%, var(--surface)); }
.chip-absence {
  --c: #6b7280;
  color: color-mix(in srgb, var(--c) 75%, var(--text));
  border-color: color-mix(in srgb, var(--c) 45%, var(--surface));
  background: color-mix(in srgb, var(--c) 15%, var(--surface));
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }

/* ---------- Monatsansicht ---------- */
.layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px;
  max-width: 1320px; margin: 0 auto; padding: 18px 20px 0;
}

.person-name { font-size: 1.15rem; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: .88rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.quota-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.quota-facts { margin-top: 8px; }
.quota-facts dd { white-space: nowrap; }
.stat-row.single { grid-template-columns: 1fr; }
.quota-facts dd.neg { color: var(--neg); font-weight: 600; }

.stat-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat-value { display: block; font-size: 2.1rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 2px; }
.stat-value.small { font-size: 1.3rem; }
.stat-sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

.today-head { display: flex; justify-content: space-between; align-items: center; }
.today-times { margin-top: 8px; font-variant-numeric: tabular-nums; }
.today-net { margin-top: 4px; font-variant-numeric: tabular-nums; }
.today-net strong { font-size: 1.25rem; }
.today-hint { margin-top: 4px; font-size: .85rem; color: var(--live); font-weight: 600; }
.stamp-form { margin-top: 14px; }

.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row input { font-size: .78rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h1 { font-size: 1.6rem; min-width: 9.5ch; text-align: center; }
.month-nav .year { color: var(--muted); font-weight: 500; }
/* Monatstitel mit fester Breite (breitester Monatsname), damit › beim Blättern nicht springt */
.month-nav h1.month-title { display: inline-grid; min-width: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.month-title > span { grid-area: 1 / 1; text-align: center; }
.month-title .mt-sizer { visibility: hidden; pointer-events: none; }
.viewing-other a { color: inherit; font-weight: 700; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.days { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.days th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-weight: 700;
}
table.days td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.days tbody tr:last-child td { border-bottom: 0; }
table.days th, table.days td { border-right: 1px solid var(--border); }
table.days th:last-child, table.days td:last-child { border-right: 0; }
.notice-offday {
  padding: 12px 14px; border-radius: 8px; font-weight: 600; line-height: 1.4;
  color: color-mix(in srgb, var(--warn) 80%, var(--text));
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--surface));
  border-left-width: 4px;
}
.today-card .notice-offday { margin-top: 10px; padding: 10px 12px; }
/* Bezahlstunden (Werkstd.) – nur in Monaten mit Dienstreise bzw. Sa/So/Feiertag */
.paid { color: var(--accent); font-weight: 650; }
table.days .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.days th.num { text-align: right; }
.c-date { width: 92px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-date .dow { display: inline-block; width: 1.9em; font-weight: 700; }
.c-pause, .c-ist, .c-soll, .c-diff, .c-paid { width: 72px; }
.c-note { color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-times { line-height: 1.9; }
.seg { font-variant-numeric: tabular-nums; margin-right: 12px; white-space: nowrap; }
.seg-open { font-style: italic; }
.note-inline { display: none; }

tr.day.off td { background: var(--off-bg); color: var(--off-text); }
tr.day.off .seg { color: var(--text); }
tr.day.st-before_start td { color: var(--off-text); }
tr.day.is-today td { background: var(--today); }
tr.day.is-today td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.day.editable { cursor: pointer; }
tr.day.editable:hover td { background: var(--hover); }
tr.day.st-incomplete td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
tr.day.flag-missing td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
tr.carry td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); font-weight: 600; padding-top: 9px; padding-bottom: 9px; }
tr.carry td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.carry .c-times { line-height: 1.35; }
/* Summe Freistellung 24.–31.12. (zwischen 23.12. und 24.12.) */
tr.release-sum td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
tr.release-sum .release-arrow { font-size: 1.35rem; line-height: 1; text-align: center; color: var(--neg); }
.release-sum-sub { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); margin-top: 2px; padding-left: .9em; text-indent: -.9em; }
/* MEV-Abzug vor dem 1. jedes Monats (dezenter als die Startzeile) */
tr.mev-row td { background: var(--surface-2); font-weight: 500; padding-top: 7px; padding-bottom: 7px; }
tr.mev-row td:first-child { box-shadow: inset 3px 0 0 var(--border); }
tr.mev-row .c-times { line-height: 1.35; }

.pos { color: var(--pos); font-weight: 600; }
.neg { color: var(--neg); font-weight: 600; }
.zero { color: var(--muted); }
.ignored { text-decoration: line-through; color: var(--muted); }
.live-diff { font-style: italic; opacity: .85; }

table.days tfoot td { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 700; background: var(--surface-2); padding: 10px 12px; }
table.days tfoot .c-note { color: var(--text); font-weight: 500; white-space: normal; }
.c-sumlabel { text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; color: var(--muted); }
.legend { font-size: .8rem; margin: 12px 2px 0; line-height: 1.5; }
.legend strong { color: var(--text); font-weight: 650; }
.legend-list { list-style: none; margin: 2px 0 6px; padding: 0; }
.legend p { margin: 0; }

/* ---------- Dialog ---------- */
.dialog {
  width: min(480px, 94vw); padding: 0; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.dialog::backdrop { background: rgba(15, 20, 28, .5); }
.day-form { padding: 18px 18px 16px; }
.day-form > * + * { margin-top: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog-head h2 { font-size: 1.2rem; }
.dialog-head p { margin: 4px 0 0; }
.seg-head { display: grid; grid-template-columns: 1fr 1fr 36px; gap: 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.seg-list { display: grid; gap: 8px; margin: 6px 0 10px; }
.seg-row { display: grid; grid-template-columns: 1fr 1fr 36px; gap: 8px; align-items: center; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
#dlgAbsenceWrap .hint { margin: 6px 0 0; }
.btn-wide { width: 100%; margin-top: 14px; }

/* Popup „Es fehlen Einträge“ (Vormonate) */
.dialog-missing { width: min(520px, 94vw); max-height: 90vh; max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border-top: 4px solid var(--neg); }
.missing { padding: 16px 18px 16px; }
.missing-head h2 { color: var(--neg); font-size: 1.2rem; }
.missing-intro { margin: 10px 0 0; line-height: 1.45; }
.missing-list { margin-top: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 4px 12px 10px; max-height: 46vh; overflow: auto; }
.missing-list h3 { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; }
.missing-list ul { list-style: none; margin: 0; padding: 0; }
.missing-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.missing-list li:last-child { border-bottom: 0; }
.missing-list a { color: var(--text); font-weight: 600; text-decoration: none; }
.missing-list a:hover { color: var(--accent); text-decoration: underline; }
.missing-list .dow { display: inline-block; width: 1.9em; font-weight: 700; }
.missing .hint { margin-top: 10px; }
.missing .dialog-foot { margin-top: 14px; }
.missing .dialog-foot .btn { min-width: 110px; }

/* Anleitung iPhone-Kurzbefehl */
.btn-guide { width: 100%; margin-top: 12px; }
.dialog-guide { width: min(560px, 94vw); max-height: 90vh; max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
.guide { padding: 0 18px 16px; }
.guide-head { position: sticky; top: 0; z-index: 1; align-items: center; padding: 14px 0 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.guide-intro { margin: 12px 0 0; }
.guide-step { margin-top: 18px; }
.guide-step h3 { display: flex; align-items: center; gap: 8px; font-size: .98rem; }
.guide-nr {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .78rem; font-weight: 800;
}
.guide ol, .guide ul { margin: 8px 0 0; padding-left: 1.4em; font-size: .9rem; }
.guide li + li { margin-top: 5px; }
.guide li::marker { color: var(--muted); font-weight: 700; }
.guide b { font-weight: 650; }
.guide code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.guide-warn {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600;
  color: color-mix(in srgb, var(--warn) 80%, var(--text));
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--surface)); border-left-width: 4px;
}
.guide-more { margin-top: 18px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.guide-more summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.guide-more ul { margin-top: 10px; }
.guide-foot { margin-top: 18px; line-height: 1.45; }
.guide .dialog-foot { margin-top: 16px; }

/* ---------- Login ---------- */
.login-wrap { min-height: calc(100vh - 54px - 90px); display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 26px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 10px; }
.code-input { font-size: 1.7rem !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.login-alt { display: flex; justify-content: space-between; margin-top: 16px; font-size: .88rem; }

/* ---------- Schnelllink-Seite ---------- */
.stamp-page { min-height: calc(100vh - 54px - 90px); display: grid; place-items: center; padding: 24px 16px; }
.stamp-card { width: min(440px, 100%); text-align: center; padding: 30px 24px; }
.stamp-type { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.stamp-type.in  { color: var(--pos); }
.stamp-type.out { color: var(--warn); }
.stamp-time { font-size: 4rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0; }
.stamp-name { font-weight: 600; }
.stamp-today { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }

/* ---------- Admin ---------- */
.admin { max-width: 1320px; margin: 0 auto; padding: 18px 20px 0; }
.admin h1 { font-size: 1.6rem; margin-bottom: 14px; }
.admin h2 { font-size: 1.1rem; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.admin-grid > .card + .card { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.list td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.inactive td { color: var(--muted); }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td.actions { white-space: nowrap; text-align: right; }
table.list input[type=text], table.list input[type=date] { padding: 5px 8px; font-size: .88rem; }
.list-wrap { overflow-x: auto; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.log-details { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; color: var(--muted); word-break: break-word; }
.filter-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.filter-row label { min-width: 160px; }
.history { font-size: .85rem; margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

/* ---------- Krankheitsmonitor ---------- */
.sick-ok      { --sick: var(--pos); }
.sick-warn    { --sick: var(--warn); }
.sick-crit,
.sick-reached { --sick: var(--neg); }
.sick-card { border-top: 3px solid var(--sick); }
.sick-card.sick-reached { background: color-mix(in srgb, var(--neg) 6%, var(--surface)); }
.sick-chip { color: var(--sick); border-color: color-mix(in srgb, var(--sick) 40%, var(--surface)); background: color-mix(in srgb, var(--sick) 10%, var(--surface)); }
.sick-count { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.sick-count .stat-value { color: var(--sick); }
.sick-count .muted { font-size: .85rem; }
.sick-meter { position: relative; height: 10px; margin-top: 10px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, var(--surface)); overflow: hidden; }
.sick-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--sick); }
.sick-meter i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); opacity: .9; }
.sick-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 3px; }
.sick-card .facts { margin-top: 10px; }
.sick-card .facts dt { white-space: nowrap; }
.sick-hint { margin: 10px 0 0; font-size: .85rem; line-height: 1.4; }
.sick-more { display: inline-block; margin-top: 12px; font-size: .85rem; font-weight: 600; text-decoration: none; }
.sick-more:hover { text-decoration: underline; }

.sick-page { max-width: 1100px; margin: 0 auto; padding: 18px 20px 0; }
.sick-page .card + .card, .sick-grid { margin-top: 14px; }
.sick-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px 28px; align-items: center; }
.sick-hero .stat-value { font-size: 2.6rem; }
.sick-hero-facts { margin: 0; }
.card-title { font-size: 1rem; margin-bottom: 10px; }
.sick-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sick-grid > .card + .card { margin-top: 0; }
.nowrap { white-space: nowrap; }
.sick-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sick); margin-right: 6px; vertical-align: 1px; }
.sick-events { list-style: none; margin: 0; padding: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sick-events li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.sick-events li:last-child { border-bottom: 0; }
.sick-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sick-stages li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; border-left: 4px solid var(--border); background: var(--surface-2); font-size: .9rem; }
.sick-stages li > span:last-child { display: grid; gap: 2px; }
.sick-stages .stage-nr { font-weight: 800; min-width: 1.2em; }
.sick-stages li.is-ok      { border-left-color: var(--pos); }
.sick-stages li.is-warn    { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.sick-stages li.is-crit,
.sick-stages li.is-reached { border-left-color: var(--neg); background: color-mix(in srgb, var(--neg) 9%, var(--surface)); }

.sick-chart { overflow-x: auto; }
.sick-chart-svg { display: block; width: 100%; min-width: 560px; height: auto; }
.sick-chart-svg .chart-grid { stroke: var(--border); stroke-width: 1; }
.sick-chart-svg .chart-grid.month { stroke-dasharray: 2 4; }
.sick-chart-svg .chart-label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.sick-chart-svg .chart-label.limit { fill: var(--neg); font-weight: 700; }
.sick-chart-svg .chart-label.today { fill: var(--text); font-weight: 700; }
.sick-chart-svg .band-warn { fill: color-mix(in srgb, var(--warn) 9%, transparent); }
.sick-chart-svg .band-crit { fill: color-mix(in srgb, var(--neg) 9%, transparent); }
.sick-chart-svg .chart-limit { stroke: var(--neg); stroke-width: 1.5; stroke-dasharray: 6 4; }
.sick-chart-svg .chart-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.sick-chart-svg .chart-past { fill: none; stroke: var(--accent); stroke-width: 2; }
.sick-chart-svg .chart-future { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.sick-chart-svg .chart-today { stroke: var(--text); stroke-width: 1; opacity: .35; }
.sick-chart-svg .chart-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

/* ---------- Responsiv ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .sidebar .card + .card { margin-top: 0; }
  .admin-grid { grid-template-columns: 1fr; }
  .sick-grid, .sick-hero { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .topbar { padding: 0 14px; }
  .topnav { gap: 14px; }
  .layout, .admin, .sick-page { padding: 14px 12px 0; }
  .flashes { padding: 0 12px; }
  .sidebar { grid-template-columns: 1fr; }
  .month-nav h1 { font-size: 1.3rem; min-width: 0; }
  .month-nav { flex-wrap: wrap; gap: 6px 8px; }   /* „Heute“ darf umbrechen, die Pfeile bleiben stehen */
  .c-pause, .c-soll, .c-note, .c-paid { display: none; }   /* Werkstd. fürs Formular nur am Rechner */
  table.days .c-diff { border-right: 0; }
  table.days td, table.days th { padding: 7px 8px; }
  .c-date { width: 64px; }
  .c-date .dm { display: block; font-size: .78rem; color: var(--muted); }
  .c-ist, .c-diff { width: 56px; }
  .note-inline { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; }
  .seg { margin-right: 8px; }
  table.days tfoot .c-note { display: none; }
  .stat-value { font-size: 1.8rem; }
}
