/* Layout: weiße Seitenleiste mit großem EVANIUM-Logo links, Arbeitsfläche rechts; auf dem Handy Kopfzeile oben und App-Leiste unten.
   Farben aus dem EVANIUM-Master 2026: Schwarz und Weiß, Olive und Orange nur als Akzent. Bewusst nur ein helles Design. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F6F4F1;
  --line: #E8E4DF;
  --fg: #111111;
  --muted: #6D6862;
  --accent: #111111;
  --accent-fg: #FFFFFF;
  --accent-soft: #F3F0EC;
  --olive: #314003;
  --orange: #FF4D15;
  --today: #FFF3ED;
  --vac: #314003;
  --vac-soft: #ECEFE1;
  --sick: #9B2C4B;
  --sick-soft: #F7E6EB;
  --pend: #FF4D15;
  --pend-ink: #C2390B;
  --pend-soft: #FFEDE5;
  --abs: #8A8379;
  --abs-soft: #F0EDE9;
  --hol: #DDD8D1;
  --focus: #FF4D15;
  --shadow: 0 1px 2px rgba(17,17,17,.05), 0 8px 24px rgba(17,17,17,.06);
  --font-display: "Jost", "Futura", "Century Gothic", Arial, sans-serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font-body); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; text-wrap: balance; margin: 0; }
h1 { font-size: 1.9rem; line-height: 1.15; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: .85rem; }
.btn.ok { color: var(--vac); }
.btn.no { color: var(--sick); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-genehmigt { background: var(--vac-soft); color: var(--vac); }
.p-beantragt { background: var(--pend-soft); color: var(--pend-ink); }
.p-abgelehnt, .p-krank { background: var(--sick-soft); color: var(--sick); }
.p-storniert, .p-abwesend { background: var(--abs-soft); color: var(--abs); }
.p-gemeldet { background: var(--sick-soft); color: var(--sick); }
.chip { font-size: .75rem; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.test { background: var(--pend-soft); color: var(--pend-ink); font-weight: 600; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding-block: 40px; padding-inline: 16px; }
.login-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 20px; }
.brand { display: grid; gap: 8px; justify-items: start; }
.logo { display: block; width: 100%; max-width: 200px; height: auto; fill: var(--fg); }
.brand-tag { font: 600 .7rem/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--orange); }
.login .logo { max-width: 340px; }
.ms-btn { justify-content: center; width: 100%; padding: 11px; }
.persona-list { display: grid; gap: 8px; }
.persona { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.persona:hover { border-color: var(--fg); background: var(--surface-2); }
.persona .who { min-width: 0; }
.persona .who strong { display: block; font-weight: 600; }
.persona .who span { font-size: .85rem; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: #EEE9E5; color: var(--fg); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* Shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding-inline: 8px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--fg); font-weight: 600; }
.nav a[aria-current="page"] .svg { color: var(--orange); }
.nav .badge { margin-left: auto; font-size: .72rem; font-weight: 600; background: var(--orange); color: #FFFFFF; border-radius: 999px; padding: 0 7px; line-height: 1.5; }
.bell { position: relative; padding: 7px 10px; }
.bell .badge { position: absolute; top: -6px; right: -6px; background: var(--orange); color: #FFFFFF; border-radius: 999px; font-size: .68rem; font-weight: 600; padding: 0 6px; line-height: 1.6; }
table.cal td.bday { box-shadow: inset 0 -3px 0 var(--orange); }
.me-box { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.me-box .who { display: flex; gap: 10px; align-items: center; padding-inline: 6px; min-width: 0; }
.me-box .who div { min-width: 0; }
.me-box .who strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-box .who span { font-size: .78rem; color: var(--muted); }
.me-box .btn { justify-content: flex-start; width: 100%; }
main { padding-block: 28px 60px; padding-inline: 32px; min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; display: grid; gap: 22px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

.l-short { display: none; }
/* Handy: Kopfzeile oben, Navigation als App-Leiste unten */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; height: auto; padding: 10px 16px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding-inline: 0; }
  .side .logo { max-width: 128px; }
  .side .brand-tag { display: none; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; overflow-x: auto; gap: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .nav a { position: relative; flex-direction: row; align-items: center; justify-content: center; gap: 5px; width: auto; min-width: 70px; padding: 6px 8px; font-size: .68rem; white-space: nowrap; }
  .nav a .svg { width: 22px; height: 22px; }
  .nav .badge { margin: 0; font-size: .65rem; }
  .l-long { display: none; }
  .l-short { display: inline; }
  .me-box { margin-top: 0; border-top: 0; padding-top: 0; display: flex; align-items: center; gap: 2px; }
  .me-box .who div { display: none; }
  .me-box .btn { width: auto; padding: 6px 8px; }
  main { padding-inline: 16px; padding-block: 20px calc(96px + env(safe-area-inset-bottom, 0px)); }
  #toast { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

/* Stempeluhr */
.clock { display: grid; gap: 10px; align-content: start; }
.clock.on { border-color: var(--olive); box-shadow: inset 0 0 0 1px var(--olive); }
.clock-big { font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-btn { justify-content: center; padding: 12px 18px; font-size: 1rem; flex: 1; }
tr.is-today td { background: var(--today); }
.segs { display: flex; flex-wrap: wrap; gap: 4px; }
.seg { font-size: .8rem; padding: 2px 8px; border-radius: 6px; background: var(--vac-soft); color: var(--olive); white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg-p { background: var(--surface-2); color: var(--muted); }
.seg-run { background: var(--pend-soft); color: var(--pend-ink); }
table.time-t tr.clickable { cursor: pointer; }
table.time-t tr.clickable:hover td { background: var(--surface-2); }
tr.editor td { background: var(--surface-2); }
.seg-ed { display: grid; gap: 10px; padding: 6px 2px; }
.seg-rows { display: grid; gap: 6px; }
.seg-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg-row select, .seg-row input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }
.stat { display: grid; gap: 6px; align-content: start; }
.stat .big { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .big small { font-family: var(--font-body); font-size: .95rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.meter { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-top: 6px; }
.meter i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Lists */
.list { display: grid; }
.li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 170px; }
.li .grow strong { font-weight: 600; }
.li .grow .muted { font-size: .85rem; }
.empty { color: var(--muted); padding: 10px 0; font-size: .92rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
.yes { color: var(--vac); font-weight: 600; }
.no-access { color: var(--muted); }

/* Calendar */
.cal-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.cal { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
table.cal th, table.cal td { border-bottom: 1px solid var(--line); }
table.cal thead th { font-weight: 500; color: var(--muted); padding: 6px 0; width: 30px; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2; }
table.cal thead th b { display: block; font-weight: 600; color: var(--fg); font-size: .82rem; }
table.cal .name { position: sticky; left: 0; background: var(--surface); text-align: left; padding: 6px 12px; min-width: 190px; white-space: nowrap; border-right: 1px solid var(--line); z-index: 1; font-size: .85rem; }
table.cal .name span { display: block; color: var(--muted); font-size: .72rem; }
table.cal td.d { padding: 3px 2px; height: 40px; }
table.cal td.d i { display: block; height: 100%; border-radius: 5px; }
table.cal th.today { color: var(--pend-ink); }
table.cal th.today b { color: var(--pend-ink); }
table.cal td.today { background: var(--today); }
table.cal .we { background: var(--surface-2); }
table.cal .hol i { background: repeating-linear-gradient(135deg, var(--hol) 0 3px, transparent 3px 7px); }
table.cal .firm i { background: repeating-linear-gradient(135deg, var(--hol) 0 2px, transparent 2px 9px); }
i.c-vac { background: var(--vac) !important; }
i.c-vacp { background: repeating-linear-gradient(135deg, var(--pend) 0 4px, var(--pend-soft) 4px 8px) !important; }
i.c-sick { background: var(--sick) !important; }
i.c-abs { background: var(--abs) !important; }
i.half { width: 50%; }
table.cal tr.me .name { font-weight: 600; }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: .82rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; }
.field textarea { min-height: 80px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.note { border-radius: 10px; padding: 10px 12px; font-size: .88rem; background: var(--surface-2); }
.note.warn { background: var(--pend-soft); color: var(--fg); }
.note.err { background: var(--sick-soft); color: var(--fg); }
.calc { display: flex; gap: 18px; flex-wrap: wrap; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: .9rem; }
.calc b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Akte */
.akte-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.akte-head .grow { flex: 1; min-width: 200px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--orange); }
dl.kv { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); margin: 0; }
dl.kv dt, dl.kv dd { padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dt:first-of-type, dl.kv dd:first-of-type { border-top: 0; }
dl.kv dd { overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { border-top: 0; padding-top: 0; } }
.masked { font-family: var(--font-mono); font-size: .88rem; }
.linkish { border: 0; background: none; color: var(--pend-ink); cursor: pointer; padding: 0; font-weight: 500; font-size: .85rem; margin-left: 8px; }

/* Modal & Toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10,16,13,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 30; display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .2s ease-out; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Ergänzungen für die Django-Vorlagen (keine Inline-Styles wegen Content-Security-Policy) */
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.small { font-size: .85rem; }
.xsmall { font-size: .78rem; }
.inline { display: inline; }
.messages { display: grid; gap: 8px; }
.calc.stack { display: grid; gap: 4px; align-content: start; }
.nav form { display: contents; }
.me-box form { display: block; }
.me-box form .btn { width: 100%; justify-content: flex-start; }
.dev-login { border-top: 1px dashed var(--line); padding-top: 16px; display: grid; gap: 10px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters a { text-decoration: none; }
a.persona, a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-fg); }

/* Meilenstein 2: Abwesenheiten */
.nowrap { white-space: nowrap; }
.note-col { min-width: 180px; }
.narrow { max-width: 640px; }
.between { justify-content: space-between; }
.self-start { justify-self: start; }
.stack-12 { display: grid; gap: 12px; }
.stack-8 { display: grid; gap: 8px; }
.mt-8 { margin-top: 8px; }
.pend-ink { color: var(--pend-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.input-sm, .select-sm { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-size: .85rem; }
.inline-details { display: inline-block; }
.inline-details > summary { list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }
.next-range { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.cal-title { min-width: 150px; text-align: center; }
.empty-cell { padding: 14px; color: var(--muted); }
.meter-svg { display: block; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter-svg .m-bg { fill: var(--surface-2); }
.meter-svg .m-vac { fill: var(--vac); }
.meter-svg .m-abs { fill: var(--abs); }
.meter-svg .m-pend { fill: var(--pend); }
.legend i.lg-vac { background: var(--vac); }
.legend i.lg-abs { background: var(--abs); }
.legend i.lg-pend { background: var(--pend); }
.legend i.lg-vacp { background: repeating-linear-gradient(135deg, var(--pend) 0 3px, var(--pend-soft) 3px 6px); }
.legend i.lg-sick { background: var(--sick); }
.legend i.lg-hol { background: repeating-linear-gradient(135deg, var(--hol) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }

/* Meilenstein 3: Zeiterfassung */
.week-range { font-family: var(--font-body); font-weight: 400; font-size: .9rem; }
.warn-col { min-width: 140px; }
.sick-ink { color: var(--sick); }
.li.align-start { align-items: flex-start; }
.mt-4 { margin-top: 4px; }
.row.nowrap-row { flex-wrap: nowrap; }
.seg-row input[type="time"] { min-width: 110px; }
.vac-ink { color: var(--vac); }

/* Meilenstein 5: Ein- und Austritt, Dokumente */
.tabs a { padding: 9px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--orange); }
.check-btn { width: 22px; height: 22px; border: 1.5px solid var(--muted); border-radius: 6px; background: var(--surface); display: inline-grid; place-items: center; font-size: .8rem; line-height: 1; cursor: pointer; padding: 0; color: #FFFFFF; flex: none; }
span.check-btn { cursor: default; }
.check-btn.on { background: var(--olive); border-color: var(--olive); }
.x-btn { border: 0; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.x-btn:hover, .x-btn:focus-visible { color: var(--orange); background: var(--line); }
.done-text { color: var(--muted); text-decoration: line-through; }
.field .label { font-size: .82rem; font-weight: 600; }
.plan-row { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-day { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; justify-items: center; }
.plan-day input { width: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; text-align: center; }
.linkish.no-ml { margin-left: 0; font-size: inherit; }
.field.has-error input, .field.has-error select { border-color: var(--sick); }
.card.form h2 { margin-bottom: 2px; }

/* Formulare: einheitliches Raster. Felder nebeneinander beginnen auf gleicher Höhe, Hinweise stehen darunter. */
.form { gap: 18px; }
.field { align-content: start; gap: 6px; }
.field > label, .field > .label { font-size: .82rem; font-weight: 600; color: var(--fg); line-height: 1.3; min-height: 1.3em; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select { height: 42px; }
.field input, .field select, .field textarea { border: 1px solid #D9D3CC; border-radius: 8px; padding: 9px 12px; background: var(--surface); font-size: .95rem; transition: border-color .15s, box-shadow .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(255, 77, 21, .18); }
.field input::placeholder, .field textarea::placeholder { color: #A9A29A; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236D6862' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.field .hint { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.field .hint.sick-ink { color: var(--sick); }
.field.has-error > label { color: var(--sick); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--sick); }
.two { gap: 16px 20px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; align-items: start; }
@media (max-width: 640px) { .three { grid-template-columns: 1fr; } }
.fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0 0; display: grid; gap: 16px; min-width: 0; }
.fieldset:first-of-type { border-top: 0; padding-top: 0; }
.fieldset legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.fieldset legend + * { clear: both; }
.fieldset .lead { color: var(--muted); font-size: .85rem; margin-top: -8px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.form-actions .muted { font-size: .85rem; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.4; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--olive); flex: none; }
.missing-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.missing-list span { font-size: .78rem; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
dl.kv { grid-template-columns: minmax(170px, 240px) minmax(0, 1fr); }
dl.kv dt { padding-right: 16px; }
.kv-section { grid-column: 1 / -1; padding: 16px 0 4px; border-top: 1px solid var(--line); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.narrow { max-width: 760px; }
.hint { font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* Fragezeichen mit kurzer Erklärung neben dem Feldnamen, per Maus oder Tastatur/Antippen */
.label-row { display: flex; align-items: center; gap: 6px; min-height: 1.3em; }
.label-row label { font-size: .82rem; font-weight: 600; color: var(--fg); line-height: 1.3; }
.field.has-error .label-row label { color: var(--sick); }
.tip { position: relative; display: inline-flex; }
.tip-btn { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #B8B1A9; background: var(--surface); color: var(--muted);
  font: 700 .66rem/1 var(--font-body); display: inline-grid; place-items: center; padding: 0; cursor: help; flex: none; }
.tip-btn:hover, .tip-btn:focus-visible { border-color: var(--orange); color: var(--orange); outline: none; }
.tip-text { position: absolute; left: -10px; bottom: calc(100% + 9px); width: max-content; max-width: min(280px, 80vw); z-index: 30;
  background: var(--fg); color: #FFFFFF; font-size: .8rem; font-weight: 400; line-height: 1.45; padding: 8px 11px; border-radius: 8px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(3px); transition: opacity .12s, transform .12s, visibility .12s; pointer-events: none; }
.tip-text::after { content: ""; position: absolute; left: 14px; top: 100%; border: 6px solid transparent; border-top-color: var(--fg); }
.tip:hover .tip-text, .tip-btn:focus + .tip-text { opacity: 1; visibility: visible; transform: none; }
.grid-place { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; align-items: start; }
.grid-place.emergency { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 640px) { .grid-place, .grid-place.emergency { grid-template-columns: 1fr; } }
dl.ledger { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; align-content: start; }
dl.ledger dt, dl.ledger dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
dl.ledger dd { text-align: right; font-variant-numeric: tabular-nums; padding-left: 16px; }
dl.ledger .ledger-head { border-top: 0; padding-top: 0; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
dl.ledger .ledger-head + dd { border-top: 0; padding-top: 0; }
dl.ledger .sum { border-top: 1.5px solid var(--fg); font-weight: 600; }
dl.ledger dd.sum { font-family: var(--font-display); font-size: 1.05rem; }
.tabs { overflow-y: hidden; scrollbar-width: none; }

/* Navigation in Gruppen, Reiter für zusammengefasste Bereiche */
.nav-heading { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #A9A29A; padding: 14px 10px 4px; }
@media (max-width: 860px) { .nav-heading { display: none; } }
.page-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.page-tabs a { padding: 9px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.page-tabs a:hover { color: var(--fg); }
.page-tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--orange); }
.task-section h2 .count { font-family: var(--font-body); font-size: .85rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.summary-head { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 8px; border-radius: 999px; background: var(--orange); color: #FFFFFF; font: 600 .75rem/1 var(--font-body); vertical-align: 2px; }
.nav-sep { display: block; height: 1px; background: var(--line); margin: 12px 10px 8px; }
@media (max-width: 860px) { .nav-sep { display: none; } }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }
.row-link { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
a.row-link:hover strong { color: var(--orange); }
.li-link { color: inherit; text-decoration: none; border-radius: 8px; }
.li-link:hover strong { color: var(--orange); }
@media (max-width: 900px) { .hide-narrow { display: none; } }
.grow-input { flex: 1; min-width: 160px; height: 34px; } form.row.grow { flex: 1; }
dl.ledger.wide { grid-template-columns: max-content minmax(0, 1fr); } dl.ledger.wide dt { padding-right: 16px; color: var(--muted); }
img.avatar.photo { object-fit: cover; padding: 0; background: var(--surface-2); }
.bell-link { position: relative; margin-left: auto; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); flex: none; }
.bell-link:hover, .bell-link:focus-visible { background: var(--surface-2); color: var(--fg); }
.bell-link .badge { position: absolute; top: -3px; right: -4px; background: var(--orange); color: #FFFFFF; border-radius: 999px; font-size: .66rem; font-weight: 600; padding: 0 5px; line-height: 1.5; }
@media (max-width: 860px) { .me-box .who .bell-link { display: inline-grid; } .me-box .who > div { display: none; } }
.notif.unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 8px; vertical-align: 2px; }

/* Auswertungen */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.chart { margin: 4px 0 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font: 12px var(--font-body); font-variant-numeric: tabular-nums; }
.chart text.val { fill: var(--fg); font-weight: 600; font-size: 13px; }
.chart .bar { fill: var(--olive); }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .bar { fill: var(--orange); }
.chart-table summary { cursor: pointer; font-size: .8rem; color: var(--muted); margin-top: 6px; }
table.t tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
table.num-r .num { text-align: right; }
.tip.end .tip-text { left: auto; right: -10px; }
.tip.end .tip-text::after { left: auto; right: 14px; }
.small-head { font: 600 .72rem/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 2px; }
.me-links { gap: 2px; flex-wrap: nowrap; }
.me-box .me-links .btn { width: auto; }
.prose h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; line-height: 1.6; }
.prose table { margin: 6px 0 10px; }
