/* Weisse Seite, dunkle Leiste. Das helle Grau nur fuer kleine Knoepfe und Akzente.
   Rot nur fuer den einen wichtigen Knopf einer Seite. */
:root {
  --dark: #313234;
  --grey: #808080;
  --dark-2: #3c3d40;
  --dark-3: #4b4c50;
  --sunk: #f4f4f5;
  --ink: #313234;
  --ink-2: #5f6063;
  --line: #e4e4e6;
  --line-2: #cfcfd2;
  --hover: #f5f5f6;
  --red: #8a2823;
  --red-deep: #6f1f1b;
  --box: #d4d4d4;
  --soft-red: #b42318;
  --soft-green: #1f7a4d;
  --soft-amber: #94650f;
  --leiste: 240px;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 16px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg.ico { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.leiste :focus-visible { outline-color: #fff; }

/* Geruest: Leiste links, Inhalt rechts */
.shell { display: grid; grid-template-columns: var(--leiste) minmax(0, 1fr); min-height: 100dvh; }
.shell.zu { grid-template-columns: 64px minmax(0, 1fr); }
.leiste { position: sticky; top: 0; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--dark); color: #fff; display: flex; flex-direction: column; padding: 14px 8px 12px; z-index: 40; }
.leiste-kopf { padding: 6px 8px 12px; }
.marke-voll { display: block; width: 100%; height: auto; }
.marke-klein { display: none; width: 100%; height: auto; }
.gruppe { font-size: 11.5px; font-weight: 600; color: #b9babc; padding: 10px 10px 3px; }
.nav-punkt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 5px 10px; margin: 1px 0; border: 0; border-radius: 9px; background: none; color: #fff; font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; transition: background 140ms ease-out; }
.nav-punkt svg { color: #b9babc; }
.nav-punkt:hover { background: var(--dark-2); }
.nav-punkt[aria-current="page"] { background: var(--dark-3); font-weight: 600; }
.nav-punkt[aria-current="page"] svg { color: #fff; }
.nav-punkt[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.zaehler { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.leiste-fuss { margin-top: auto; padding-top: 10px; }
.leiste-zeile { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.zuklapp { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #b9babc; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.zuklapp:hover { background: var(--dark-2); color: #fff; }
.shell.zu .leiste-zeile { justify-content: center; }
.leiste-name { min-width: 0; font-size: 12.5px; color: #b9babc; padding: 0 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell.zu .marke-voll { display: none; }
.shell.zu .marke-klein { display: block; }
.shell.zu .leiste-kopf { padding: 8px 2px 12px; }
.shell.zu .gruppe, .shell.zu .leiste-name, .shell.zu .nav-text { display: none; }
.shell.zu .nav-punkt { justify-content: center; padding: 8px 0; }
.shell.zu .zaehler { position: absolute; top: 0; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }

.haupt { min-width: 0; display: flex; flex-direction: column; }
.kopf { display: none; }
.schleier { display: none; }

.page { --fg: var(--ink); --fg2: var(--ink-2); color: var(--fg); flex: 1; padding: 28px clamp(16px, 3vw, 36px) 56px; width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 18px; animation: auf 200ms ease-out; }
.page.schmal { max-width: 620px; }
@keyframes auf { from { transform: translateY(4px); } to { transform: none; } }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { color: var(--fg2); font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.empty { color: var(--fg2); padding: 6px 0; }

/* Karten: alles Lesbare liegt auf Dunkelgrau */
.card, .rows, .form, .stat-table, .kpi, details.person, .site-card, .notice, .week {
  --fg: var(--ink); --fg2: var(--ink-2);
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.form { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.form .form, .sheet .form { padding: 0; background: none; border: 0; border-radius: 0; }
.rows { overflow: hidden; }
.rows .rows { background: none; border: 0; border-radius: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; min-height: 54px; color: inherit; }
.row:first-child { border-top: 0; }
button.row:hover { background: var(--hover); }
.row-title { font-weight: 600; }
.row-end { text-align: right; flex: none; }

/* Kennzahlen */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { display: block; width: 100%; text-align: left; padding: 15px 18px; }
button.kpi:hover { background: var(--hover); }
.kpi-lab { display: block; font-size: 13px; color: var(--fg2); }
.kpi-val { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.two-col { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line-2); }
.dot.in { background: #2e9e68; }
.dot.fahrt { background: var(--ink); }
.dot.pause { background: #d19a2a; }
.dot.urlaub, .dot.sonstiges, .dot.krank { background: var(--grey); }

.flag { display: inline-block; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg2); margin: 4px 4px 0 0; }
.flags { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.flags:empty { display: none; }
.ort-link { text-decoration: underline; text-decoration-color: var(--grey); text-underline-offset: 2px; }
.flag-lab { font-size: 12px; color: var(--fg2); margin: 4px 4px 0 0; min-width: 42px; }
.sub.warn { color: var(--soft-red); font-weight: 500; }
.btn-col { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ort { font-size: 13px; font-weight: 500; color: var(--fg); margin: 4px 8px 0 0; }
.event { align-items: flex-start; }
.event-time { flex: none; width: 44px; font-weight: 600; padding-top: 1px; }
svg.event-icon { color: var(--grey); margin-top: 2px; }
.flag.bad { color: var(--soft-red); border-color: currentColor; }
.flag.good { color: var(--soft-green); border-color: currentColor; }

.notice { display: block; width: 100%; text-align: left; padding: 11px 14px; font-size: 14px; font-weight: 500; }
button.notice:hover { background: var(--hover); }
.notice.bad { color: var(--soft-red); }
.notices { display: flex; flex-direction: column; gap: 8px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--fg2); }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; flex: none; accent-color: var(--red); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.segmented { display: flex; gap: 2px; padding: 3px; background: var(--sunk); border-radius: 11px; flex-wrap: wrap; }
.segmented button { flex: 1 1 auto; min-height: 38px; border: 0; background: none; color: var(--ink-2); border-radius: 8px; font-size: 14px; font-weight: 500; padding: 4px 10px; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--grey); color: #fff; font-weight: 600; }
.month { max-width: 220px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 16px; border: 0; background: var(--grey); color: #fff; border-radius: 10px; font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background 120ms ease-out; }
.btn:hover { background: #6e6e6e; }
.stamp.gruen, .btn.gruen { background: var(--soft-green); border-color: var(--soft-green); color: #fff; }
.stamp.gruen:hover, .btn.gruen:hover { background: #18613d; border-color: #18613d; }
.pause-uhr { font-size: 34px; line-height: 1.1; font-weight: 700; color: var(--soft-green); font-variant-numeric: tabular-nums; }
.btn.primary, .stamp { background: var(--red); color: #fff; }
.btn.primary:hover, .stamp:hover { background: var(--red-deep); }
.btn.quiet { background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.btn.quiet:hover { background: var(--hover); }
.btn.small { min-height: 36px; padding: 5px 12px; font-size: 13.5px; }
.btn:disabled { opacity: .55; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }
.head .btn-row .btn { flex: none; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0; color: var(--fg); font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.photo-btn { width: 100%; min-height: 128px; border: 1.5px dashed var(--grey); background: var(--sunk); color: var(--ink); border-radius: 12px; font-weight: 600; padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.photo-btn:hover { border-color: var(--ink); }
.photo-btn img { max-width: 100%; max-height: 240px; display: block; border-radius: 8px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img, .row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--line); border: 0; display: block; }
.shot { width: 100%; max-height: 60dvh; object-fit: contain; background: var(--sunk); border-radius: 10px; }
.sign-pad { width: 100%; height: 170px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; touch-action: none; display: block; }

/* Stempeluhr */
.clock-card { align-items: stretch; gap: 16px; padding: 22px; }
.clock-time { font-size: clamp(56px, 15vw, 76px); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.clock-state { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; }
.stamp { width: 100%; min-height: 76px; border: 0; border-radius: 13px; color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -.01em; transition: background 120ms ease-out; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 600; text-align: left; }
.tile:hover { background: var(--hover); }
.pending { background: var(--sunk); color: var(--soft-amber); padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }

/* Zeiten */
details.person { overflow: hidden; }
details.person > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
details.person > summary::-webkit-details-marker { display: none; }
details.person > summary:hover { background: var(--hover); }
details.person svg.pfeil { color: var(--fg2); transition: transform 140ms ease-out; }
details.person[open] svg.pfeil { transform: rotate(90deg); }
.person-body { border-top: 1px solid var(--line); }
.person-tools { padding: 10px 16px; display: flex; }

/* Plan */
.days { display: flex; gap: 4px; }
.days button { flex: 1; min-width: 0; min-height: 54px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; font-size: 13px; font-weight: 600; padding: 2px; }
.days button[aria-pressed="true"] { background: var(--grey); border-color: var(--grey); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip { min-height: 32px; border: 0; background: var(--grey); color: #fff; padding: 4px 7px; border-radius: 8px; font-weight: 500; font-size: 12.5px; text-align: left; overflow-wrap: break-word; max-width: 100%; }
.chip:hover { background: #6e6e6e; }
.week { display: none; overflow-x: auto; padding: 4px; }
.week-grid { display: grid; grid-template-columns: 104px repeat(7, minmax(92px, 1fr)); min-width: 780px; }
.week-grid > div { padding: 8px; border-top: 1px solid var(--line); min-height: 58px; }
.week-grid > .wk-head { border-top: 0; min-height: 0; font-size: 13px; font-weight: 600; color: var(--fg2); }
.wk-head.heute { color: var(--ink); }
.wk-person { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.wk-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.wk-add { width: 100%; flex: 1; min-height: 28px; border: 0; background: none; border-radius: 8px; color: transparent; font-size: 18px; line-height: 1; }
.wk-add:hover, .wk-add:focus-visible { background: var(--hover); color: var(--ink); }
.wk-off { color: var(--fg2); font-size: 12.5px; }

/* Baustellen */
.site-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.site-card { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 16px 18px; text-align: left; }
.site-card:hover { background: var(--hover); }
.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--grey); border-radius: 999px; }
.bar i.over { background: var(--red); }

.stat-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.stat-table td { padding: 11px 16px; border-top: 1px solid var(--line); }
.stat-table tr:first-child td { border-top: 0; }
.stat-table td:first-child { color: var(--fg2); }
.stat-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .stat-table { background: none; }

/* Blatt: am Handy von unten, sonst in der Mitte */
.sheet-back { position: fixed; inset: 0; background: rgba(20, 20, 22, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { --fg: var(--ink); --fg2: var(--ink-2); color: var(--ink); background: #fff; width: 100%; max-width: 560px; max-height: 94dvh; overflow-y: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { font-size: 19px; }
.sheet .shot { max-height: 42dvh; flex: none; }

#toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, .28); display: none; }
#toast.show { display: block; animation: toast-hoch 180ms ease-out; }
@keyframes toast-hoch { from { transform: translateY(16px); opacity: 0; } }
#toast.bad { background: var(--red); color: #fff; }

/* Anmeldung */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.login-logo { display: block; width: 100%; height: auto; }
.login-title { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); text-align: center; margin-top: -8px; }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.login-form { padding: 22px; }
.pin-input { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* Monatsbericht zum Drucken */
.print-doc { background: #fff; color: #111; padding: 24px; margin: 20px; border-radius: 10px; max-width: 900px; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.print-doc th, .print-doc td { border: 1px solid #777; padding: 4px 6px; text-align: left; }
.print-logo { display: block; width: 260px; height: auto; margin-bottom: 18px; }
.print-doc .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.print-doc .signs div { border-top: 1px solid #000; padding-top: 4px; font-size: 13px; }

@media print {
  .no-print, .leiste, .kopf, #toast { display: none !important; }
  .shell { display: block; }
  body, .print-doc { background: #fff; padding: 0; margin: 0; }
}

/* Kaesten wie im Leitstand: farbige Kopfzeile sagt, was es ist, darunter weisse Abteile auf Grau */
.card, .rows, .form, .stat-table, .kpi, details.person, .site-card, .week {
  --fg: var(--ink); --fg2: #45464a;
  background: var(--box);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 2px 8px rgba(20, 22, 26, .05);
}
[data-title]::before {
  content: attr(data-title);
  display: block;
  grid-column: 1 / -1;
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0;
  padding: 9px 16px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}
.card, .form { --pad: 14px; padding: 14px; overflow: hidden; }
.clock-card { --pad: 18px; padding: 18px; }
.form .form, .sheet .form { background: none; padding: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.rows { --pad: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.rows .rows { background: none; padding: 0; box-shadow: none; border-radius: 0; }
.row { background: #fff; border: 0; border-top: 0; border-radius: 12px; min-height: 48px; padding: 10px 12px; --fg2: var(--ink-2); }
.rows > p.fach-leer { padding: 8px; }
button.row:hover { background: #f1f1f2; }
.week { --pad: 8px; padding: 8px; }
.week-grid > div { border-top-color: #bdbdbf; }
.wk-add:hover, .wk-add:focus-visible { background: rgba(255, 255, 255, .6); }
.kpi { padding: 0; overflow: hidden; }
.kpi-lab { display: flex; align-items: center; gap: 6px; background: var(--red); color: #fff; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.kpi-val { padding: 10px 14px 12px; font-size: 24px; color: var(--ink); }
button.kpi:hover { background: #cbcbcb; }
.notice, .sheet .notice { background: #fff; border: 0; border-radius: 12px; color: var(--ink); }
button.notice:hover { background: #f1f1f2; }
.notice.bad { color: var(--soft-red); }
details.person > summary { background: var(--red); color: #fff; --fg: #fff; --fg2: #f2dcda; padding: 10px 14px; }
details.person > summary:hover { background: var(--red-deep); }
details.person svg.pfeil { color: #fff; }
.person-body { border-top: 0; padding-bottom: 2px; }
.person-tools { padding: 8px 8px 0; }
.site-card { padding: 0; gap: 0; overflow: hidden; }
.site-card:hover { background: #cbcbcb; }
.site-head { display: flex; gap: 10px; padding: 9px 14px; background: var(--red); color: #fff; font-size: 14px; font-weight: 650; }
.site-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 12px; }
.bar { background: #bdbdbf; }
.tile { background: var(--box); border: 0; }
.tile:hover { background: #cbcbcb; }
.segmented { background: var(--box); }
.form .segmented, .rows .segmented { background: #fff; }
.stat-table td { border-top-color: #bdbdbf; }
.photo-btn { background: #fff; }
.sheet { --pad: 18px; padding: var(--pad) var(--pad) calc(var(--pad) + env(safe-area-inset-bottom)); }
/* Innerhalb eines Fensters nur eine rote Kopfzeile, darunter schlichte Zwischentitel */
.sheet .rows { background: var(--sunk); box-shadow: none; }
.sheet [data-title]::before { background: none; color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding: 6px 8px 2px; margin: -8px -8px 0; }
.sheet > h2:first-child { flex: none; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0; padding: 12px var(--pad); background: var(--red); color: #fff; font-size: 16px; }

.lang-switch { display: inline-flex; gap: 2px; padding: 3px; margin: 0 10px 8px; background: var(--dark-2); border-radius: 9px; }
.lang-switch button { min-width: 36px; min-height: 30px; border: 0; border-radius: 7px; background: none; color: #c9cacc; font-size: 12.5px; font-weight: 600; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--dark); }
.shell.zu .leiste .lang-switch { display: none; }

.tile-voll { width: 100%; justify-content: center; font-size: 17px; min-height: 68px; }
.link-btn { align-self: center; border: 0; background: none; padding: 4px; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
details.mehr > summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--fg2); padding: 4px 0; }
details.mehr[open] > summary { margin-bottom: 8px; }
.privacy { gap: 14px; }
.privacy h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 650; }
.privacy p { font-size: 14.5px; line-height: 1.45; }

/* Menue: Seltenes liegt unter Mehr */
details.nav-mehr > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 5px 10px; margin-top: 6px; border-radius: 9px; color: #b9babc; font-size: 14px; font-weight: 500; }
details.nav-mehr > summary::-webkit-details-marker { display: none; }
details.nav-mehr > summary:hover { background: var(--dark-2); color: #fff; }
details.nav-mehr > summary svg { transition: transform 140ms ease-out; }
details.nav-mehr[open] > summary svg { transform: rotate(90deg); }
.shell.zu details.nav-mehr > summary { justify-content: center; padding: 8px 0; }
.shell.zu details.nav-mehr > summary span { display: none; }

/* Rechnungen einer Person zum Ausklappen */
details.rechnungen { background: #fff; border-radius: 12px; overflow: hidden; }
details.rechnungen > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; }
details.rechnungen > summary::-webkit-details-marker { display: none; }
details.rechnungen > summary svg { color: var(--grey); transition: transform 140ms ease-out; }
details.rechnungen[open] > summary svg { transform: rotate(90deg); }
.rechnungen-liste { border-top: 1px solid var(--line); }
.rechnungen-liste .row { border-radius: 0; border-top: 1px solid var(--line); }
.rechnungen-liste .row:first-child { border-top: 0; }

/* Abteil einer Person */
.faecher { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px; }
.fach { flex-direction: column; align-items: stretch; gap: 6px; }
.fach-kopf { display: flex; align-items: center; gap: 8px; }
.fach-zeile { border-top: 1px solid var(--line); padding-top: 6px; font-size: 13.5px; }
.fach-site { display: flex; gap: 8px; align-items: baseline; }
.fach-site b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.fach-summe { border-top: 1px solid var(--line); padding-top: 6px; font-size: 13px; font-weight: 600; text-align: right; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--sunk); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.in { background: #e4f2ea; color: #1f5c3d; }
.badge.pause { background: #1f7a4d; color: #fff; }
.fach-pause { margin-top: 5px; }
.row-wert { flex: none; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.badge.fahrt { background: var(--ink); color: #fff; }

@media (max-width: 767.98px) {
  .shell, .shell.zu { display: block; }
  .leiste { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(272px, 82vw); transform: translateX(-104%); visibility: hidden; transition: transform 200ms ease-out, visibility 0s linear 200ms; }
  .shell.offen .leiste { transform: none; visibility: visible; transition: transform 200ms ease-out; }
  .shell.offen .schleier { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 20, 22, .55); }
  .zuklapp { display: none; }
  .nav-punkt { min-height: 44px; font-size: 15px; }
  .kopf { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--dark); color: #fff; }
  .menue { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--dark-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
  .kopf-logo { display: block; width: 170px; max-width: 46vw; height: auto; }
  .kopf .lang-switch { margin: 0 0 0 auto; }
  .page { padding-top: 18px; padding-bottom: 40px; }
  h1 { font-size: 23px; }
}
@media (min-width: 620px) {
  .sheet-back { align-items: center; padding: 20px; }
  .sheet { --pad: 22px; border-radius: 16px; }
  #toast { left: auto; width: 360px; }
}
@media (min-width: 760px) {
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .two-col.zuerst > :first-child { order: 2; }
  .site-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week { display: block; }
  .plan-phone { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
