/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════
   FOUNDATION v9 (23.10.2026): the one design system of dash (Backoffice) and zeit (Dienst & Zeit).
   Source of truth: this block at the top of dash/public/app.css; copied verbatim into dash_wt/zeit/public/app.css
   (DECISIONS D-01). Area blocks below never redefine a token or a component; they only compose them.

   Rules (FIXED FACTS + Sam 14./15./19.10.2026): system font stack, tabular numerals, 13 px minimum, German copy,
   real umlauts, no em/en dashes, no emoji, no icon fonts, no gradients, no pills (status = soft rectangle with
   the word inside), no shadows on things at rest, colour on status and data, one filled primary per screen.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ───────── 1 Tokens ───────── */
:root {
  /* type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-13: 13px; --fs-14: 14px; --fs-15: 15px; --fs-17: 17px; --fs-20: 20px; --fs-24: 24px; --fs-32: 32px;
  --lh: 1.45;
  /* ground, surfaces, lines (light only) */
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f7f9fb; --active: #e9eef5;
  --line: #e2e6ec; --line-2: #eef1f5; --control: #cdd4dd;
  /* ink, three tiers, every tier ≥ 4.5:1 on --bg and --surface */
  --ink: #121b2a; --ink-2: #364254; --muted: #5b6675; --faint: #66717f;
  /* brand: one navy as the primary fill and the active text, one red as the mark and the danger */
  --navy: #0d2a4a; --navy-900: #081a30; --navy-800: #0f3157; --navy-700: #163f6b; --navy-600: #1f4f82; --navy-100: #e8eef6;
  --red: #d42a1f; --red-700: #a91f16; --red-50: #fdf1f0;
  /* semantic */
  --ok: #1f6b45; --warn: #7a4f00; --bad: #a8201a;
  /* status boxes: pale tint + dark text of the same hue (word inside, ≥ 4.5:1) */
  --st-bad-bg: #fbe9e7;  --st-bad-ink: #8f1c13;  --st-bad-line: #f0c2bd;    /* fehlt, überfällig, abgelehnt */
  --st-warn-bg: #fff4dc; --st-warn-ink: #6b4a00; --st-warn-line: #ecd49c;   /* prüfen, bald fällig, offen */
  --st-wait-bg: #efe9f8; --st-wait-ink: #4d2a7a; --st-wait-line: #d5c6ea;   /* Genehmigung, wartet auf andere */
  --st-ok-bg: #e4f3ea;   --st-ok-ink: #175c37;   --st-ok-line: #a8d2b7;     /* bereit, bezahlt, erledigt, arbeitet */
  --st-out-bg: #e5edf6;  --st-out-ink: #0d2a4a;  --st-out-line: #b5c7dc;    /* an RZH, Brief raus, versendet */
  --st-doc-bg: #e1eef8;  --st-doc-ink: #134a78;  --st-doc-line: #a9c6e2;    /* Rechnung, Dokument */
  --st-neu-bg: #eef1f4;  --st-neu-ink: #364254;  --st-neu-line: #d3d8df;    /* neu, Notiz, neutral */
  /* case stages */
  --kasse: #2a64a3; --patient: #b8701a; --gericht: #9b2c3d; --erledigt: #6b7786;
  --kasse-bg: #e7f0fa; --kasse-ink: #1f4f82; --patient-bg: #fbf0e1; --patient-ink: #74460e;
  --gericht-bg: #f8e8eb; --gericht-ink: #85212f; --erledigt-bg: #e6f2ea; --erledigt-ink: #1f6b45;
  /* people (identity, pale) */
  --p1-bg: #e2f0f1; --p1-ink: #0b5560; --p2-bg: #efe9f8; --p2-ink: #4d2a7a; --p3-bg: #e7f0fa; --p3-ink: #163f6b;
  /* shape, space, elevation */
  --r-box: 4px; --r: 6px; --r-card: 8px; --r-sheet: 12px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --shadow: none;                                    /* nothing at rest casts a shadow */
  --shadow-pop: 0 10px 30px rgba(8, 26, 48, .16), 0 2px 6px rgba(8, 26, 48, .08);   /* menus, dialogs, toasts */
  /* shell */
  --side-w: 236px; --top-h: 52px; --ctl-h: 36px; --row-h: 44px; --bottom-h: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--fs-14)/var(--lh) var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: 0; }
h1 { font-size: var(--fs-24); line-height: 1.25; } h2 { font-size: var(--fs-17); line-height: 1.3; } h3 { font-size: var(--fs-15); }
a { color: var(--navy-600); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
small, .small { font-size: var(--fs-13); }                     /* never below 13 px (Sam: „still hard to read“) */
.num, .nr, .money, .amt, .cnt, kbd, .d, time, td.r, th.r { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .hidden { display: none !important; } .nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 1px; }
::selection { background: var(--navy-100); color: var(--navy-900); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ───────── 2 Buttons by rank: .btn (secondary) · .btn-primary · .btn-ghost · .btn-danger · .btn-sm · .btn-lg ───────── */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--ctl-h); padding: 0 14px;
  border-radius: var(--r); border: 1px solid var(--control); background: var(--surface); color: var(--ink); font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); border-color: #b6bfca; text-decoration: none; }
.btn:active { background: var(--active); }
.btn:focus-visible { outline-offset: -2px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.btn-primary:hover, .btn.primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-ghost, .btn.ghost, .btn.link { border-color: transparent; background: none; color: var(--navy-700); }
.btn-ghost:hover, .btn.ghost:hover, .btn.link:hover { background: var(--active); border-color: transparent; }
.btn-danger, .btn.danger { color: var(--red-700); border-color: #e4b3ae; background: var(--surface); }
.btn-danger:hover, .btn.danger:hover { background: var(--red-50); border-color: var(--red-700); }
.btn-danger.btn-primary, .btn.primary.danger { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: var(--fs-13); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: var(--fs-15); font-weight: 600; border-radius: var(--r-card); }
.btn.wide { width: 100%; }
/* the big question buttons (Sam: „a huge button to say closed or paid“) */
.bigbtn { appearance: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--control); border-radius: var(--r-card);
  background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.bigbtn b { font-size: var(--fs-17); font-weight: 600; line-height: 1.2; }
.bigbtn small { color: var(--muted); line-height: 1.3; }
.bigbtn:hover { background: var(--surface-2); border-color: #b6bfca; }
.bigbtn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .bigbtn.primary small { color: #c9d5e3; }
.bigbtn.paid { box-shadow: inset 4px 0 0 var(--ok); } .bigbtn.paid b { color: var(--ok); }
.bigbtn:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 2px; }

/* ───────── 3 Status box (.box + .b-…): a small soft rectangle with the word inside; never clickable, never a pill ───────── */
.box { display: inline-block; padding: 1px 8px; border: 1px solid transparent; border-radius: var(--r-box); font-size: var(--fs-13); font-weight: 600; line-height: 1.5;
  white-space: nowrap; vertical-align: 1px; font-variant-numeric: tabular-nums; cursor: default; background: var(--st-neu-bg); color: var(--st-neu-ink); border-color: var(--st-neu-line); }
.b-bad, .b-ffehlt, .b-ueber, .b-abgelehnt { background: var(--st-bad-bg); color: var(--st-bad-ink); border-color: var(--st-bad-line); }
.b-warn, .b-fpruefen, .b-bald, .b-offen, .b-st-offen { background: var(--st-warn-bg); color: var(--st-warn-ink); border-color: var(--st-warn-line); }
.b-wait, .b-fgen, .b-anruf, .b-anas, .b-genehmigt-wartet { background: var(--st-wait-bg); color: var(--st-wait-ink); border-color: var(--st-wait-line); }
.b-ok, .b-fbereit, .b-zahlung, .b-erledigt, .b-st-genehmigt, .b-arbeitet { background: var(--st-ok-bg); color: var(--st-ok-ink); border-color: var(--st-ok-line); }
.b-out, .b-frzh, .b-raus, .b-versendet { background: var(--st-out-bg); color: var(--st-out-ink); border-color: var(--st-out-line); }
.b-doc, .b-frechnung, .b-eingang { background: var(--st-doc-bg); color: var(--st-doc-ink); border-color: var(--st-doc-line); }
.b-neu, .b-fneu, .b-notiz, .b-hold, .b-person, .b-transport, .b-akte, .b-fzu { background: var(--st-neu-bg); color: var(--st-neu-ink); border-color: var(--st-neu-line); }
.b-intern, .b-stufe { background: var(--surface); color: var(--ink-2); border-style: dashed; border-color: #8792a2; }
.b-kasse { background: var(--kasse-bg); color: var(--kasse-ink); border-color: #b9cde6; }
.b-patient { background: var(--patient-bg); color: var(--patient-ink); border-color: #e7c99e; }
.b-gericht { background: var(--gericht-bg); color: var(--gericht-ink); border-color: #e3b5be; }
.b-osama { background: var(--p1-bg); color: var(--p1-ink); border-color: #a9cfd3; } .b-alaa { background: var(--p3-bg); color: var(--p3-ink); border-color: #9db6d6; }
.ev-box { width: 124px; text-align: center; }
/* paper (document) state: the same shape, outlined, white inside, so it never reads as the trip's status */
.dbox { background: var(--surface); border-width: 1.5px; padding: 0 7px; font-weight: 600; }
.o-ok { color: var(--ok); border-color: var(--ok); } .o-bad { color: var(--bad); border-color: var(--bad); }
.o-warn { color: var(--warn); border-color: #a06a00; } .o-neutral { color: #4b5565; border-color: #9aa3af; }
/* tag: a small square swatch and the word, no fill */
.tag { --tag: #5e6b66; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 500; white-space: nowrap; color: var(--ink-2); }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tag); flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 2px 10px; }
/* status dot + word (stage in lists) */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 500; white-space: nowrap; color: var(--ink-2); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.st.kasse::before { background: var(--kasse); } .st.patient::before { background: var(--patient); } .st.gericht::before { background: var(--gericht); } .st.erledigt::before { background: var(--erledigt); }
/* the four trip stages as one strip (DECISIONS D-06) */
.steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px; border-radius: var(--r-box); border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; }
.steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.steps li.done { color: var(--st-ok-ink); background: var(--st-ok-bg); border-color: var(--st-ok-line); } .steps li.done::before { background: currentColor; }
.steps li.now { color: var(--navy); background: var(--navy-100); border-color: #b5c7dc; font-weight: 600; } .steps li.now::before { background: currentColor; }
.steps li.skip { text-decoration: line-through; opacity: .7; }

/* ───────── 4 Cards, page structure, empty and error states ───────── */
.sheet, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }
.sheet + .sheet { margin-top: var(--sp-4); } .card { padding: var(--sp-4); margin-bottom: var(--sp-4); }
.card.flush { padding: 0; overflow: hidden; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sheet-head h2 { font-size: var(--fs-15); } .sheet-head .sub, .sheet-head .count { color: var(--muted); font-size: var(--fs-13); font-weight: 400; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: var(--sp-4); flex-wrap: wrap; }
.title-row h1 { font-size: var(--fs-24); line-height: 1.25; }
.title-row .stamp { font-size: var(--fs-13); color: var(--muted); }
.title-act { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.state { padding: 18px 16px; color: var(--muted); margin: 0; } .state.err { color: var(--red-700); }
.empty { padding: 32px 24px; text-align: center; color: var(--muted); }
.empty h2 { font-size: var(--fs-15); color: var(--ink); margin-bottom: 6px; } .empty p { margin: 0 auto 10px; max-width: 520px; }
.note, .hint { font-size: var(--fs-13); color: var(--muted); margin: 10px 2px 0; max-width: 980px; }
.err-block { padding: 12px 16px; border: 1px solid var(--st-bad-line); border-radius: var(--r); background: var(--st-bad-bg); color: var(--st-bad-ink); font-size: var(--fs-14); }
.err-block .btn { margin-left: 8px; }
/* loading: flat grey bars at the real size, no shimmer */
.skel { display: inline-block; height: 1em; width: 8em; border-radius: 3px; background: var(--line-2); vertical-align: middle; }

/* ───────── 5 Tables and list rows: 13 px grey header, no fill band, one rule under it, rows 44 px, numbers right ───────── */
table.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-14); }
table.list th { text-align: left; font-size: var(--fs-13); font-weight: 500; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: none; }
table.list td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; overflow-wrap: break-word; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: var(--surface-2); }
table.list td.r, table.list th.r, table.list td.money, table.list th.money { text-align: right; }
table.list td.money { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list td.name { font-weight: 600; } table.list td.name small { display: block; font-weight: 400; color: var(--muted); margin-top: 1px; }
table.list td .sub { color: var(--muted); font-size: var(--fs-13); display: block; }
table.list tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; background: none; }
table.list tr.voided td { color: var(--muted); text-decoration: line-through; }
table.list tr[data-href], table.list tr.link, table.list tr.rowlink { cursor: pointer; }
table.list tr.link:focus-visible td { background: var(--navy-100); }
.table-wrap, .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.due { color: var(--red-700); font-weight: 600; white-space: nowrap; } .wait { color: var(--muted); } .ok { color: var(--ok); font-weight: 600; }
.more { padding: 12px 16px; border-top: 1px solid var(--line-2); text-align: center; }
table.list td .m-only, table.list td.name small.n-only { display: none; }   /* phone-only cells, shown by the .cards rules below */
/* count line above a list */
.lst-count { margin: 0; font-size: var(--fs-15); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ───────── 6 Form field with label above and the error at the field ───────── */
.fld, label.field { display: block; min-width: 0; }
fieldset.fld { border: 0; padding: 0; margin: 0; } fieldset.fld > legend { padding: 0; }
.fld > b, .fld > legend > b, label.field > span.l { display: block; font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.fld > b em, .fld > legend > b em { font-style: normal; font-weight: 400; color: var(--muted); }
.fld input, .fld select, .fld textarea, label.field input, label.field select, label.field textarea { width: 100%; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=time], input[type=month], input[type=datetime-local], input[type=search], select, textarea {
  min-height: var(--ctl-h); border: 1px solid var(--control); border-radius: var(--r); padding: 6px 10px; font: inherit; font-size: var(--fs-14); background: var(--surface); color: var(--ink); }
.fld textarea, textarea { min-height: 76px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-600); outline-offset: -1px; border-color: var(--navy-600); }
.fld input::placeholder, textarea::placeholder, input::placeholder { color: var(--faint); }
.fld small { display: block; color: var(--muted); font-size: var(--fs-13); margin-top: 3px; }
.fld .fld-err { display: block; color: var(--red-700); font-size: var(--fs-13); font-weight: 600; margin-top: 4px; } .fld .fld-err:empty { display: none; }
.fld.invalid input, .fld.invalid select, .fld.invalid textarea { border-color: var(--red-700); outline: 1px solid var(--red-700); outline-offset: -1px; }
.fld.invalid > b { color: var(--red-700); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--navy); cursor: pointer; }
.toggle, .chk { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-14); color: var(--ink-2); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r-card) var(--r-card); }
.saved { font-size: var(--fs-13); color: var(--muted); } .saved.ok { color: var(--ok); font-weight: 600; } .saved.err { color: var(--red-700); }
/* segmented choice (large options in sheets) */
.segbig { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.segopt { position: relative; display: block; cursor: pointer; }
.segopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segopt > span { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--control); border-radius: var(--r); background: var(--surface); }
.segopt b { font-size: var(--fs-15); font-weight: 600; } .segopt small { color: var(--muted); line-height: 1.3; margin-top: 1px; }
.segopt:hover > span { border-color: #b6bfca; }
.segopt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; } .segopt input:checked + span small { color: #c9d5e3; }
.segopt input:focus-visible + span { outline: 2px solid var(--navy-600); outline-offset: 2px; }
/* small segmented control (filters) */
.seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.seg button { appearance: none; border: 0; background: none; border-radius: var(--r-box); min-height: 30px; padding: 0 10px; font: 500 var(--fs-13)/1.3 var(--font); color: var(--muted); cursor: pointer; }
.seg button.on, .seg button[aria-pressed=true] { background: var(--navy); color: #fff; }

/* ───────── 7 Dialog (sheet on the phone), popover, toast ───────── */
dialog { padding: 0; border: 1px solid var(--line); border-radius: var(--r-sheet); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(8, 26, 48, .4); }
dialog.dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
dialog .sheet-head { padding: 14px 18px; } dialog .sheet-head h2 { font-size: var(--fs-17); } dialog .sheet-head h2:focus { outline: none; }
dialog .fields { padding: 14px 18px 6px; overflow-y: auto; display: grid; gap: 12px; min-width: 0; } dialog .fields:focus { outline: none; }
dialog .actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
dialog .actions .gap { flex: 1; }
dialog .lead { margin: 0; color: var(--muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.dlg-err { color: var(--red-700); font-size: var(--fs-14); min-height: 1.2em; } .dlg-err:empty { display: none; }
.dlg-hint { margin: 0; padding: 10px 12px; border-left: 3px solid var(--control); border-radius: var(--r-box); background: var(--surface-2); font-size: var(--fs-14); color: var(--ink-2); } .dlg-hint:empty { display: none; }
.pop { position: absolute; z-index: 60; min-width: 220px; max-width: min(360px, calc(100vw - 16px)); max-height: min(480px, 72vh); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 6px; font-size: var(--fs-14); }
.pop h3 { font-size: var(--fs-13); font-weight: 600; color: var(--muted); padding: 6px 8px 4px; }
.pop .opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 6px 8px; border-radius: var(--r-box); cursor: pointer; appearance: none; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; }
.pop .opt:hover, .pop .opt:focus-visible { background: var(--active); outline: none; }
.pop .opt input { margin: 0; } .pop .opt .n { margin-left: auto; color: var(--faint); font-size: var(--fs-13); }
.pop .opt:disabled, .pop .opt.dis { color: var(--faint); cursor: not-allowed; } .pop .opt.danger { color: var(--red-700); }
.pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.msg, .toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; max-width: min(560px, calc(100vw - 32px)); background: var(--navy-900); color: #fff; border-radius: var(--r-card); padding: 10px 14px; font-size: var(--fs-14); font-weight: 500; box-shadow: var(--shadow-pop); }
.msg.err, .toast.err { background: var(--red-700); }

/* ───────── 8 App shell: light sidebar on the ground, 52 px top bar, phone bottom bar, environment bar ───────── */
aside.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--surface); color: var(--ink-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 10px; min-height: var(--top-h); padding: 10px 16px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.side-brand:hover { text-decoration: none; }
.side-brand img { width: 32px; height: 32px; flex: none; }
.side-brand b { display: block; font-size: var(--fs-15); font-weight: 650; line-height: 1.2; } .side-brand small { display: block; color: var(--muted); line-height: 1.3; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.side-nav a, nav.side button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; color: var(--ink-2); font-size: var(--fs-14); font-weight: 500; text-decoration: none; position: relative; cursor: pointer; text-align: left; white-space: nowrap; }
.side-nav a:hover, nav.side button:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-nav a.on, nav.side button.active { background: var(--active); color: var(--navy); font-weight: 600; }
.side-nav a.on::before, nav.side button.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--red); }
.side-nav .cnt { font-size: var(--fs-13); font-weight: 500; color: var(--muted); min-width: 20px; text-align: right; }
.side-nav .cnt.heute { color: var(--red-700); font-weight: 600; }
.nav-group { font-size: var(--fs-13); font-weight: 500; color: var(--muted); padding: 16px 10px 4px; }
.nav-sep { height: 1px; background: var(--line-2); margin: 6px 10px; }
.side-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line-2); display: grid; gap: 2px; }
.side-foot button, .side-foot a { appearance: none; background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: var(--fs-13); text-align: left; cursor: pointer; } .side-foot button:hover, .side-foot a:hover { color: var(--ink); }
.scrim { display: none; }
.page { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; min-height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-menu, .top-brand { display: none; } .top-brand img { width: 28px; height: 28px; display: block; }
.search-btn { appearance: none; flex: 0 1 460px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-size: var(--fs-13); cursor: text; text-align: left; }
.search-btn:hover { border-color: var(--control); background: var(--surface); }
.search-btn .search-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .search-btn .search-s { display: none; flex: 1; }
kbd { font: 500 var(--fs-13)/1 var(--font); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 3px 5px; background: var(--surface); white-space: nowrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { appearance: none; border: 1px solid transparent; background: none; border-radius: var(--r); padding: 6px 10px; font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.who:hover { background: var(--surface-2); border-color: var(--line); } .who small { color: var(--muted); font-weight: 400; margin-right: 4px; } .who.unset { color: var(--red-700); }
main { width: 100%; max-width: 1480px; padding: 22px 24px 48px; flex: 1; }
footer { max-width: 1480px; padding: 0 24px 24px; color: var(--muted); font-size: var(--fs-13); } footer a { color: var(--muted); }
/* environment bar: staging (yellow) and demo (blue), DECISIONS D-18 */
.envbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 32px; padding: 4px 16px; font-size: var(--fs-13); font-weight: 600; text-align: center; }
.envbar.staging { background: #ffe58a; color: #5c4400; border-bottom: 1px solid #e6c860; }
.envbar.demo { background: #cfe2f7; color: #0d2a4a; border-bottom: 1px solid #a9c6e2; }
body:has(.envbar) .top { top: 32px; } body:has(.envbar) aside.side { top: 32px; }
/* login card: the same card in both apps */
body.bare .side, body.bare .top, body.bare .bottom, body.bare .scrim, body.bare footer { display: none !important; }
body.bare .page { margin-left: 0; } body.bare main { max-width: 420px; margin: 0 auto; padding-top: 12vh; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand img { width: 44px; height: 44px; }
.login-brand b { display: block; font-size: var(--fs-17); font-weight: 650; color: var(--navy); } .login-brand small { display: block; color: var(--muted); }
.login .body { padding: 18px 16px 16px; display: grid; gap: 12px; } .login .lead { margin: 0; color: var(--muted); } .login .go { display: flex; justify-content: flex-end; gap: 8px; }
/* phone bottom bar: four destinations, short labels, counts only on queues */
.bottom { display: none; }
@media screen and (max-width: 760px) {
  .bottom { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bottom a, .bottom button { appearance: none; border: 0; background: none; font: 500 var(--fs-13)/1.2 var(--font); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; border-radius: var(--r); text-decoration: none; position: relative; cursor: pointer; padding: 4px 2px; }
  .bottom .cnt { font-size: var(--fs-13); color: var(--faint); }
  .bottom .on { color: var(--navy); font-weight: 650; }
  .bottom .on::before { content: ""; position: absolute; top: -5px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--red); }
}
/* drawer below 900 px, phone below 760 px */
@media screen and (max-width: 900px) {
  aside.side { transform: translateX(-100%); transition: transform .18s ease; }
  body.drawer aside.side { transform: none; box-shadow: var(--shadow-pop); }
  body.drawer .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(8, 26, 48, .35); }
  .page { margin-left: 0; } .top { padding: 0 16px; } .top-menu { display: inline-flex; }
  main { padding: 18px 16px 48px; } footer { padding: 0 16px 24px; }
}
@media screen and (max-width: 760px) {
  body { font-size: var(--fs-15); }
  :root { --ctl-h: 44px; --row-h: 52px; }
  aside.side { display: none; }
  .top { gap: 8px; padding: 0 12px; }
  .top-menu, .top-out, .who { display: none; } .top-brand { display: block; flex: none; }
  .search-btn { flex: 1; height: 38px; font-size: var(--fs-15); } .search-btn .search-l, .search-btn kbd { display: none; } .search-btn .search-s { display: block; }
  main { padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); } footer { padding: 0 16px calc(80px + env(safe-area-inset-bottom)); }
  body.bare main { padding: 8vh 16px 32px; }
  .title-row { margin-bottom: 12px; } .title-row h1 { font-size: var(--fs-20); }
  .btn { min-height: 44px; } .btn-sm { min-height: 36px; }
  .fld input, .fld select, .fld textarea, input, select, textarea { font-size: 16px; }   /* no zoom on focus */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 14px 14px 0 0; max-height: 92dvh; } dialog.dlg form { max-height: 92dvh; }
  .pop { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; width: auto; max-height: 72dvh; border-radius: 14px 14px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); font-size: var(--fs-15); }
  .pop .opt { min-height: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .segbig { grid-template-columns: 1fr 1fr; }
  /* table rows become two-line cards: identity + key number on line 1, the rest on line 2 */
  table.list.cards thead { display: none; }
  table.list.cards, table.list.cards tbody, table.list.cards tfoot { display: block; width: 100%; }
  table.list.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  table.list.cards tbody tr:last-child { border-bottom: 0; }
  table.list.cards td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-15); }
  table.list.cards tbody tr:hover td { background: none; }
  table.list.cards td.name { grid-column: 1; } table.list.cards td.money { grid-column: 2; grid-row: 1; text-align: right; }
  table.list.cards td.c-next, table.list.cards td.c-when { grid-column: 1 / -1; }
  table.list.cards td .m-only { display: block; font-weight: 400; white-space: normal; }
  table.list.cards tfoot tr { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; } table.list.cards tfoot td { display: block; background: none; }
}
/* print: the table only */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  html, body { background: #fff; font-size: 10pt; }
  .side, .bottom, .scrim, footer, .envbar, header.top, .top, .lst-views, .lst-bar, .bulk, .pop, dialog, .sel, .rowbtns, .more, .subnav, .tabs, .case-actions, .form-act, .tag-add, .bigacts, .qchips, .c-status { display: none !important; }
  .page { margin: 0; } main { padding: 0; max-width: none; }
  .sheet, .card { border: 0; } table.list { font-size: 9pt; }
  table.list th { border-bottom: 1px solid #000; color: #000; } table.list td { border-bottom: 1px solid #ccc; padding: 4px 6px; } table.list tr { break-inside: avoid; }
}
/* ───────── 9 Additions at merge (23.10.2026, component requests of the executors) ───────── */
aside.side[hidden], header.top[hidden], nav.bottom[hidden], .top[hidden] { display: none !important; }
body:has(.envbar:not([hidden])) .top { top: 32px; } body:has(.envbar:not([hidden])) aside.side { top: 32px; }
.form-act.end { justify-content: flex-end; } .form-act.end .saved { margin-right: auto; }
/* status band: the one state of a screen, full width, word first (zeit main card, dash job states) */
.zband { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--st-neu-line); background: var(--st-neu-bg); color: var(--st-neu-ink); box-shadow: inset 4px 0 0 currentColor; }
.zband b { font-size: var(--fs-20); font-weight: 650; line-height: 1.2; } .zband small { display: block; margin-top: 2px; opacity: .85; }
.zband .zb-num { font-size: var(--fs-24); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zband.working, .zband.ok { background: var(--st-ok-bg); color: var(--st-ok-ink); border-color: var(--st-ok-line); }
.zband.pause, .zband.warn { background: var(--st-warn-bg); color: var(--st-warn-ink); border-color: var(--st-warn-line); }
.zband.stale, .zband.bad { background: var(--st-bad-bg); color: var(--st-bad-ink); border-color: var(--st-bad-line); }
/* shift boxes (Früh / Spät / Sonntag) built from the status tints */
.box.b-sh-F { background: var(--st-doc-bg); color: var(--st-doc-ink); border-color: var(--st-doc-line); }
.box.b-sh-S { background: var(--st-warn-bg); color: var(--st-warn-ink); border-color: var(--st-warn-line); }
.box.b-sh-So { background: var(--st-ok-bg); color: var(--st-ok-ink); border-color: var(--st-ok-line); }
/* pick list: bordered list of row buttons, one choice */
.pick { border: 1px solid var(--control); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.pickrow, .pick-item { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: var(--row-h); padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pickrow:last-child, .pick-item:last-child { border-bottom: 0; }
.pickrow:hover, .pick-item:hover, .pickrow:focus-visible, .pick-item:focus-visible { background: var(--surface-2); outline: none; }
.pickrow.on, .pick-item.on, .pickrow[aria-pressed=true] { background: var(--navy-100); box-shadow: inset 3px 0 0 var(--navy-600); }
.pickrow small, .pick-item span { color: var(--muted); font-size: var(--fs-13); }
/* confirm sheet (phone: bottom sheet; desktop: centred) */
dialog.sheet { width: 100%; max-width: 520px; margin: auto auto 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border: 0; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-pop); }
dialog.sheet::backdrop { background: rgba(8, 26, 48, .55); }
@media (min-width: 600px) { dialog.sheet { margin: auto; border-radius: var(--r-sheet); padding-bottom: 24px; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
dialog.sheet h2 { margin: 0 0 12px; font-size: var(--fs-20); line-height: 1.25; } dialog.sheet h2:focus { outline: none; }
.sheet-lead { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-14); }
.sheet-actions { display: grid; gap: 8px; margin-top: 16px; } .sheet-actions .btn { width: 100%; min-height: 48px; font-size: var(--fs-15); }
/* per-file status list (uploads) */
.lk-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.lk-files li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--muted); } .lk-files li .box { flex: none; }
/* toast above a phone bottom bar */
@media screen and (max-width: 760px) { body:has(.bottom:not([hidden])) .msg, body:has(.tabbar) .toast, body:has(.bottom:not([hidden])) .toast { bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); } }
/* ═══════════════════ end of FOUNDATION v9 ═══════════════════ */

/* ───────── zeit brand layer (23.10.2026): aliases for the older token names, the header block, the flat brand rule ───────── */
:root { --signal: var(--red); --signal-dark: var(--red-700); --navy-2: var(--navy-700); --navy-deep: var(--navy-900); --accent: var(--navy); --accent-text: #fff;
  --text: var(--ink); --border: var(--line); --work: var(--ok); --pause: #a06a00; --off: var(--muted); --danger: var(--red); --white: #ffffff; --paper: var(--bg);
  --radius: var(--r); --display: var(--font); --body: var(--font); --wordmark: var(--font); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { height: 34px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: var(--fs-15); font-weight: 650; letter-spacing: 0; text-transform: none; }
.brand-sub { font-size: var(--fs-13); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.app-name { font-weight: 600; font-size: var(--fs-15); color: var(--navy-700); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); }
.stripe { height: 3px; background: var(--red); }
.btn-signal, .btn-red { background: var(--red); color: #fff; border-color: var(--red); } .btn-signal:hover, .btn-red:hover { background: var(--red-700); }
