/* ERZEUGTE DATEI: public/style.css entsteht aus den Teilen unter web/css/ (in der Reihenfolge ihrer Nummern).
   Nicht hier ändern, das geht beim nächsten Bau verloren. Quelltext unter web/css/ ändern, dann „npm run build“. */
/*
  Noya – Designsystem
  Gestaltung nach „000h by Cojeev“ (MIT, siehe web/cojeev/HERKUNFT.md): warmer Papiergrund, weiße Karten ohne Schatten,
  runde Formen (Knöpfe und Felder als Pillen, Karten mit weiten Ecken), vier Akzentfarben, ruhige kurze Bewegung.
  Die Werte hier sind die des Originals (web/cojeev/registry/cojeev/styles/tokens.css), unter Noyas Namen.
  Jede Blockfarbe hat genau eine Bedeutung und wird überall gleich verwendet:
    --work      Arbeit / eingestempelt / Jetzt-Linie (Rosa, die Akzentfarbe)
    --pause     Pause (Gelb)
    --plan      geplante Schicht, Soll (Umriss)
    --vacation  Urlaub (Oliv)
    --sick      Krank (Blau; auch Kind krank, Mutterschutz, Beschäftigungsverbot)
    --away      weitere Abwesenheiten (helles Blau: Sonderurlaub, Berufsschule, Überstundenabbau, unbezahlt …)
    --ink       Aktionen (Knöpfe), Text
  Text auf Blöcken ist immer dunkel (--on-block), wie bei bedrucktem Papier.
*/
/* DM Sans und Bricolage Grotesque (beide SIL Open Font License 1.1, siehe fonts/DMSans-OFL.txt und
   fonts/BricolageGrotesque-OFL.txt), lokal ausgeliefert, variable Stärke. Die App nutzt DM Sans in einer Fassung mit
   immer gleich breiten Ziffern (scripts/schrift-tabellenziffern.js): Zeiten und Beträge stehen sauber untereinander,
   Punkt, Komma und Leerzeichen behalten ihre normale Breite. Sie trägt einen eigenen Namen, damit sie sich nicht mit
   dem Original der Startseite mischt. */
@font-face { font-family: "Noya Sans"; src: url("/fonts/dm-sans-tabellenziffern.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-variable.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-stretch: 75% 100%; font-display: swap; }
:root {
  /* Flächen: Grund in warmem Papierton, Karten in Weiß, Beige für ruhige Füllungen (Felder, Chips, Überfahren). */
  --page: #F8F6F1;
  --page-web: #F8F6F1;
  --sidebar: #FFFFFF;
  --bg: #F8F6F1;
  --surface: #FFFFFF;
  --surface-2: #EEE9E1;
  --surface-3: #f3efe8;
  /* Linien: --line trennt ruhende Flächen (fein), --border umrandet Karten und Tafeln, --edge ist die Kante von
     Bedienelementen (Felder, Umriss-Knöpfe) und hält den nötigen Kontrast. */
  --line: #dedad2;
  --border: #b4b0ab;
  --edge: #706e6d;
  --text: #26282d;
  --text-2: #464951;
  --muted: #52565e;
  --ink: #26282d;
  --on-ink: #F8F6F1;
  --on-block: #14171B;
  /* Links stehen in Schriftfarbe und sind unterstrichen, wie im Original. */
  --link: #26282d;
  --warn-bg: #fdf9ec;
  --warn-line: #d6bc60;
  --warn-text: #695d33;

  /* Die vier Akzentfarben mit hellem Ton (Flächen) und dunklerem Ton (Überfahren, Wasserzeichen). */
  --pink: #F0A4CC; --pink-soft: #fbe9f3; --pink-deep: #d693b7;
  --olive: #A8BC75; --olive-soft: #eaefde; --olive-deep: #96a86a;
  --blue: #95BAE8; --blue-soft: #e6eef9; --blue-deep: #86a6cf;
  --yellow: #F1D369; --yellow-soft: #fcf4db; --yellow-deep: #d6bc60;
  --danger: #D7473C; --danger-fill: #B92D28; --danger-soft: #fae7e6;
  /* Dunkle Fläche für Schwebendes mit eigener Farbe (Hinweis-Leiste, Zähler): in beiden Designs dunkel. */
  --structure: #14171B; --on-structure: #F9FAFC;

  --work: var(--pink);
  /* Akzentfarbe als Text (kleine Beschriftungen): dunkler als die Fläche, damit der Kontrast reicht. */
  --work-text: #704f63;
  --pause: var(--yellow);
  /* Plan wird nie gefüllt, sondern als Umriss mit leichtem Farbhauch gezeigt: geplant = Linie, erledigt = Fläche. */
  --plan: #52565e;
  --plan-tint: rgba(82, 86, 94, .07);
  --vacation: var(--olive);
  --sick: var(--blue);
  /* weitere Abwesenheiten (Sonderurlaub, Berufsschule, Überstundenabbau, unbezahlt …) */
  --away: #cbd9ec;
  --neutral-block: #EEE9E1;

  --pos: #525d3d;
  --neg: #b2433b;
  /* Fokus: Brombeer im Hellen, Rosa im Dunkeln; nie die Akzentfläche selbst (zu wenig Kontrast auf Papier). */
  --focus: #845c73;
  --sel-bg: #fbe9f3;
  --sel-edge: #a87491;

  /* Ecken: jede Ecke ist eine dieser Stufen. */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-sheet: 28px;
  --pill: 999px;
  /* Höhen der Bedienelemente */
  --ctl-sm: 32px;
  --ctl: 40px;
  --ctl-lg: 48px;
  /* Tiefe: Flächen der App sind flach; nur Schwebendes (Menüs, Dialoge, Hinweise) bekommt einen Schatten. */
  --shadow-sm: 0 1px 0 rgba(17, 17, 17, .06);
  --shadow-md: 0 12px 32px -12px rgba(17, 17, 17, .18);
  --shadow-lg: 0 18px 44px -14px rgba(17, 17, 17, .22);
  --shadow-xl: 0 28px 72px -18px rgba(17, 17, 17, .3);
  --scrim: rgba(19, 24, 32, .46);
  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 26%, transparent);
  /* Bewegung: lebendig, aber unaufdringlich. */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.4, 0, 1, 1);
  --dur: .12s;
  --dur-2: .2s;
  --dur-3: .3s;
  --font: "Noya Sans", "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Titel in Bricolage Grotesque. Der Name --serif stammt aus der Zeit der Serifentitel und bleibt, damit alle
     Stellen dieselbe Titelschrift bekommen; --display ist derselbe Wert unter dem treffenden Namen. */
  --display: "Bricolage Grotesque", "Noya Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: var(--display);
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #15171A;
    --page-web: #15171A;
    --sidebar: #20242A;
    --bg: #15171A;
    --surface: #20242A;
    --surface-2: #292F37;
    --surface-3: #252a31;
    --line: #353a41;
    --border: #4e5359;
    --edge: #8c9094;
    --text: #f3f4f4;
    --text-2: #bdc1c5;
    --muted: #a9aeb4;
    --ink: #f3f4f4;
    --on-ink: #15171A;
    --link: #f3f4f4;
    --work-text: #F0A4CC;
    --warn-bg: #393932;
    --warn-line: #d6bc60;
    --warn-text: #F1D369;
    --pink-soft: #3f3742; --olive-soft: #343b35; --blue-soft: #323b47; --yellow-soft: #3f3e33; --danger-soft: #36282c;
    --neutral-block: #292F37;
    --plan: #a9aeb4;
    --plan-tint: rgba(169, 174, 180, .1);
    --away: #6f86a6;
    --pos: #adc07c;
    --neg: #e99891;
    --focus: #F0A4CC;
    --sel-bg: #433a46;
    --sel-edge: #F0A4CC;
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3);
    --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 18px 44px -14px rgba(0, 0, 0, .66);
    --shadow-xl: 0 28px 72px -18px rgba(0, 0, 0, .72);
    --scrim: rgba(0, 0, 0, .66);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* Touch-Geräte: Bedienelemente reagieren sofort und ohne Doppeltipp-Zoom (schnelle PIN-Eingabe am Terminal); Pinch-Zoom bleibt. */
button, a, label, input, select, textarea, [role="button"] { touch-action: manipulation; }
/* Platz für die Laufleiste immer freihalten: kurze und lange Seiten stehen exakt gleich. */
html { scrollbar-gutter: stable; }
body {
  background: var(--page);
  color: var(--text);
  font: 15px/1.45 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 600; letter-spacing: -.012em; }
/* Seitentitel in der Titelschrift (Bricolage Grotesque, mittlere Stärke, eng gesetzt), alles andere in DM Sans. */
h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; line-height: 1.05; letter-spacing: -.02em; }
h2 { font-size: 1rem; }
h3 { font-size: .92rem; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--text-2); }
::selection { background: var(--pink); color: #111111; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.boot { padding: 40px; color: var(--muted); text-align: center; }

/* ---------- Ziffern ---------- */
.fig {
  font-weight: 500; letter-spacing: -.045em; line-height: .92;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.unit {
  font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  vertical-align: top; margin-left: .3em; line-height: 1; opacity: .75;
  display: inline-block; transform: translateY(.25em);
}
.table .unit, .list .unit { font-size: .7em; transform: none; vertical-align: baseline; margin-left: .2em; }
.day-num { display: inline-flex; align-items: flex-start; gap: 4px; }
.day-num .fig { font-size: 1.35rem; }
.day-num .wd { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.day-num.today .wd { color: var(--work-text); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.2, .7, .2, 1); }
.sidebar {
  background: var(--sidebar); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); overflow: hidden;
}
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
.side-scroll::-webkit-scrollbar, .subnav::-webkit-scrollbar { display: none; }
.subnav { scrollbar-width: none; overflow-y: auto; }
.side-bottom { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); margin-inline: -12px; padding: 10px 12px 0; }
.shell.collapsed .side-bottom { margin-inline: -10px; padding-inline: 10px; align-items: center; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 10px 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; }
.brand .brand-mark { width: 26px; height: 26px; flex: none; }
/* Schriftzug „noya“ als Maske: übernimmt die Textfarbe, in Hell und Dunkel. */
.brand-name { display: block; flex: none; width: 46px; height: 27px; background-color: currentColor;
  -webkit-mask: url("/wortmarke.svg") center / contain no-repeat; mask: url("/wortmarke.svg") center / contain no-repeat; }
.brand-company { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  border: 0; background: none; border-radius: var(--radius); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.company-block, .search-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); color: var(--text); cursor: pointer; text-decoration: none;
}
.company-block:hover, .search-btn:hover { border-color: var(--muted); }
.company-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--work); flex: none; }
.company-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.search-btn { color: var(--muted); margin-bottom: 8px; }
.search-btn .label { flex: 1; }
kbd {
  font: 600 .7rem var(--font); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 0 5px; background: var(--surface);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-group-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500;
  border: 0; background: none; cursor: pointer; text-align: left; font-size: .95rem;
}
.nav a .label, .nav-group-btn .label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a .icon, .nav-group-btn .icon { color: var(--muted); }
.nav a:hover, .nav-group-btn:hover { background: var(--surface-2); }
.nav a.active { background: var(--surface-2); font-weight: 600; }
.nav a.active .icon { color: var(--text); }
.nav-group-btn .chev { transition: transform .15s; }
.nav-group.closed .nav-group-btn .chev { transform: rotate(-90deg); }
.nav-group.closed .nav-sub { display: none; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 30px; }
.nav-sub a { padding-block: 7px; }
.nav-sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 10px 4px; font-weight: 600; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--work); color: var(--on-block); font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.side-spacer { flex: 1; }
.side-notice {
  background: color-mix(in srgb, var(--warn-bg) 70%, var(--sidebar)); border: 1px solid color-mix(in srgb, var(--warn-line) 55%, transparent); color: var(--warn-text);
  border-radius: var(--radius-lg); padding: 10px 12px; font-size: .84rem; line-height: 1.4; display: flex; gap: 8px; margin: 6px 0;
}
.side-notice .icon { width: 16px; height: 16px; margin-top: 2px; }
.side-notice a, .side-notice button { color: inherit; font-weight: 600; }
.side-notice button { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; font: inherit; font-weight: 600; }
.side-sep { border-top: 1px solid var(--line); margin: 6px 0; }
.account {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none;
  border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text); position: relative;
}
.account:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: var(--radius); flex: none; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .8rem;
}
.account-text { flex: 1; min-width: 0; line-height: 1.25; }
.account-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-text span { font-size: .8rem; color: var(--muted); }
.account-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12); padding: 6px; display: flex; flex-direction: column;
}
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); border: 0; background: none;
  color: var(--text); text-decoration: none; font: inherit; cursor: pointer; text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); }

.account-wrap, .company-wrap { position: relative; }
.company-block .chev { color: var(--muted); }
.company-block.static { cursor: default; }
.company-block.static:hover { border-color: var(--line); }
.company-menu {
  position: fixed; z-index: 30; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.company-menu .menu-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 6px 10px 4px; }
.company-menu button, .company-menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); border: 0; background: none;
  color: var(--text); text-decoration: none; font: inherit; cursor: pointer; text-align: left;
}
.company-menu button:hover, .company-menu a:hover { background: var(--surface-2); }
.company-menu .current { font-weight: 600; }
.company-menu .label { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.company-menu .label small { color: var(--muted); font-weight: 400; font-size: .78rem; }
.company-menu .icon { color: var(--muted); }
.menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.btn .icon { width: 16px; height: 16px; }

/* Mitarbeiterauswahl mit Suche */
.picker { position: relative; }
.picker-btn {
  display: inline-flex; align-items: center; gap: 8px; min-width: 210px; max-width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; text-align: left;
}
.picker-btn:hover { border-color: var(--muted); }
.picker-btn .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn .icon { color: var(--muted); }
.picker-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: max(100%, 280px); max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}
.picker-pop .palette-list { max-height: 360px; }
.picker-group-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 10px 4px; }
.picker-pop .palette-item { padding-block: 7px; }

/* Feste Bedienleiste in „Zeiten“: gleiche Reihenfolge, Breite und Höhe in jeder Ansicht */
.viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.viewbar .seg, .viewbar .picker-btn, .viewbar .month-nav, .viewbar .btn { height: 38px; min-height: 0; }
.viewbar .seg button { display: inline-flex; align-items: center; }
.viewbar .picker-btn { width: 15rem; min-width: 0; padding-block: 0; }
.viewbar .period { display: inline-flex; align-items: center; gap: 8px; }
.viewbar .month-nav .btn { height: 100%; }
.viewbar .month-nav .label { width: 11.5rem; min-width: 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* „Heute“ klein im Zeitraum-Feld, nur sichtbar, wenn man nicht im aktuellen Zeitraum ist */
.month-nav .today-btn { flex: none; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0 2px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--work) 12%, transparent); color: var(--work-text); cursor: pointer; transition: background var(--dur) var(--ease); }
.month-nav .today-btn .icon { width: 15px; height: 15px; }
.month-nav .today-btn:hover { background: color-mix(in srgb, var(--work) 22%, transparent); }
.month-nav .today-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.month-nav .today-btn:disabled { visibility: hidden; }
/* Aktionen rechts; reicht der Platz nicht, brechen sie rechtsbündig um, statt die Seite breiter zu machen. */
.viewbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; max-width: 100%; }
.picker-pop { animation: pop-in .14s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .shell, .btn, .seg button, .picker-btn { transition: none; }
  .picker-pop { animation: none; }
}

/* Abwesenheiten, Monat: je Mitarbeiter und Tag eine Kachel */
table.ac { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.ac col.ac-name-col { width: 168px; }
.ac col.ac-sum-col { width: 76px; }
.ac th { padding: 0 1px 8px; text-align: center; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.ac th.name { text-align: left; font-size: .84rem; font-weight: 500; vertical-align: bottom; }
.ac th.ac-sum { font-size: .84rem; font-weight: 500; vertical-align: bottom; }
.ac th .d { display: block; font-size: .8rem; color: var(--text); font-variant-numeric: tabular-nums; }
.ac th .wd { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }
.ac th.we .d { color: var(--muted); }
.ac th.today .d { color: var(--work); }
.ac th.today .wd { color: var(--work); }
.ac td { padding: 4px 1.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ac tbody tr:last-child td { border-bottom: 0; }
.ac td.name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 12px 4px 0; }
.ac td.today { background: color-mix(in srgb, var(--work) 7%, transparent); }
.ac .group-row td { padding: 14px 0 6px; }
.ac-tile {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 26px; padding: 0; border: 0; border-radius: 5px;
  background: var(--bg); color: var(--on-block); font: inherit; font-size: .66rem; font-weight: 700; line-height: 1; letter-spacing: .02em;
}
.ac-tile.planned { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); }
.ac-tile.work { background: var(--work); }
.ac-tile.work.open { background: repeating-linear-gradient(135deg, var(--work) 0 5px, color-mix(in srgb, var(--work) 78%, white) 5px 10px); }
button.ac-tile.work:hover { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--text); }
/* Gearbeitet an einem geplanten Tag: orange mit dunkelgrauem Plan-Rand */
.ac-tile.work.planned { box-shadow: inset 0 0 0 1.5px var(--plan); }
button.ac-tile.work.planned:hover { box-shadow: inset 0 0 0 1.5px var(--plan), 0 0 0 1.5px var(--surface), 0 0 0 3px var(--text); }
.ac-tile.vacation { background: var(--vacation); box-shadow: none; }
.ac-tile.sick { background: var(--sick); box-shadow: none; }
.ac-tile.away { background: var(--away); box-shadow: none; }
/* „abwesend“ ohne Art (Gesundheitsdaten, die die Ansicht nicht zeigen darf): neutral schraffiert */
.ac-tile.other, .sw-other-tile { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, color-mix(in srgb, var(--muted) 35%, var(--surface-2)) 3px 5px); box-shadow: none; }
.ac-tile.vacation.off, .ac-tile.sick.off, .ac-tile.away.off, .ac-tile.other.off { opacity: .35; }
.ac-tile.half { background-image: linear-gradient(135deg, transparent 50%, var(--surface) 50%); }
.ac th.blocked { box-shadow: inset 0 3px 0 var(--neg); }
.ac-tile.pending { background: color-mix(in srgb, var(--vacation) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--vacation); color: color-mix(in srgb, var(--vacation) 55%, var(--text)); }
button.ac-tile { cursor: pointer; transition: box-shadow .12s ease, transform .12s ease, opacity .12s ease; }
button.ac-tile:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
button.ac-tile.vacation:hover, button.ac-tile.sick:hover, button.ac-tile.away:hover { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--text); }
button.ac-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ac .ac-sum { text-align: right; white-space: nowrap; font-size: .74rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 8px; }
.ac td.ac-sum span + span { margin-left: 8px; }
.ac-sw-pending { background: color-mix(in srgb, var(--vacation) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--vacation); }

/* Schlichte Liste direkt auf der Seite (wie Tabellen in der Console): Titel mit Zähler, ruhige Zeilen */
.list-section { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.list-section-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.list-section-head h2 { font-size: 1.08rem; font-weight: 600; }
.list-section-head .count {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.list-section-head .meta { margin-left: auto; font-size: .82rem; color: var(--muted); }
.list-section .table-wrap { margin: 0; padding: 0; }
table.table-plain { font-size: .92rem; }
table.table-plain th {
  text-transform: none; letter-spacing: 0; font-size: .84rem; font-weight: 500; color: var(--muted);
  padding: 12px 12px 10px; border-bottom: 1px solid var(--line);
}
table.table-plain td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
table.table-plain tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.table-plain tbody tr { transition: background-color .12s ease; }
table.table-plain tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
table.table-plain th:first-child, table.table-plain td:first-child { padding-left: 2px; }
table.table-plain .actions { width: 48px; text-align: right; padding-right: 2px; }
.person { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; min-width: 0; max-width: 100%; }
/* Lange Namen: gekürzt mit Auslassungspunkten, sobald der Platz nicht reicht (Avatar bleibt stehen). */
.person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.person .avatar { flex: none; }
/* In Tabellen nimmt ein sehr langer Name nicht die halbe Breite ein. */
.table td .person { max-width: 18rem; }
/* Team-Liste: Name und E-Mail begrenzt, damit Status und Menü ohne Scrollen sichtbar bleiben.
   Wird die Liste schmal (Fensterbreite, Seitenleiste), fallen zuerst Pers.-Nr. und PIN weg, dann Arbeitstage und Urlaub. */
.team-name .person-cell { max-width: 280px; }
.team-wrap .role { white-space: normal; }
html:not(.noya-app) .table-wrap.team-wrap { container-type: inline-size; }
@container (max-width: 1080px) { html:not(.noya-app) .team-wrap .col-opt1 { display: none; } }
@container (max-width: 900px) { html:not(.noya-app) .team-wrap .col-opt2 { display: none; } }
/* Person mit Zusatzzeile (E-Mail) unter dem Namen, eingerückt bis zum Namen */
.person-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person-sub { padding-left: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; line-height: 1.3; }
/* Leerer Zustand mit Symbol, Erklärung und dem nächsten Schritt */
.empty-state {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 22px 24px;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, var(--line)); border-radius: var(--radius-xl); background: color-mix(in srgb, var(--surface-2) 45%, transparent);
}
.empty-state > .icon { width: 28px; height: 28px; color: var(--muted); stroke-width: 1.4; flex: none; }
.empty-state > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.empty-state > div > span { color: var(--muted); line-height: 1.45; }
.empty-state > .btn { flex: none; }
.avatar.sm { width: 26px; height: 26px; border-radius: 50%; font-size: .66rem; background: var(--surface-2); border: 0; color: var(--text); }
.kind { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.kind .swatch { width: 11px; height: 11px; border-radius: 3px; }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--plan); }
.status.st-approved { color: var(--text); }
.status.st-approved::before { background: var(--pause); }
.status.st-pending { color: var(--warn-text); padding: 2px 9px; border-radius: 11px; background: var(--warn-bg); font-size: .84rem; font-weight: 500; }
.status.st-pending::before { background: var(--warn-line); }
.status.st-rejected { color: var(--neg); }
.status.st-rejected::before { background: var(--neg); }
.status.st-running::before { background: var(--work); box-shadow: 0 0 0 3px color-mix(in srgb, var(--work) 22%, transparent); }
.status.st-break::before { background: var(--pause); }
.status.st-idle { color: var(--muted); }
.status.st-idle::before { background: var(--line); }
.list-section-actions { display: flex; gap: 8px; margin-left: auto; }
.list-section-head .meta + .list-section-actions { margin-left: 12px; }
h1.with-count { display: flex; align-items: center; gap: 12px; }
.card-head h2 { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; max-width: 100%; }
.card-head h2 .h2-meta { flex: none; white-space: nowrap; color: var(--muted); font-weight: 400; }
/* Ein langer Name in der Überschrift bricht um (der Monat rutscht darunter), statt die Karte breiter als den Bildschirm zu machen. */
.card-head h2 .person { white-space: normal; }
.card-head h2 .person-name { overflow-wrap: anywhere; }
table.table .actions { width: 48px; text-align: right; }
table.table-plain th.num, table.table-plain td.num { padding-inline: 8px; }
table.table-plain td.tabular, .role { white-space: nowrap; }
table.table .actions.wide { width: 1%; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 6px; vertical-align: middle; margin-right: 4px; }
.list-section .empty { text-align: left; padding: 14px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h1.with-count .count, .list-section-head .count {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--surface-2); color: var(--muted); font: 600 .76rem var(--font); letter-spacing: 0; font-variant-numeric: tabular-nums;
}
h1.with-count .count { height: 24px; min-width: 26px; font-size: .8rem; }
/* Gruppenzeilen (Abteilungen) in schlichten Tabellen */
table.table-plain tr.group-row td { padding: 18px 2px 6px; background: none; }
table.table-plain tbody tr.group-row:hover td { background: none; }

/* Protokoll */
.audit-seal { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.audit-seal svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.audit-seal strong { display: block; font-weight: 600; }
.audit-seal span { color: var(--muted); font-size: .88rem; }
.audit-seal.ok svg { color: var(--pos); }
.audit-seal.bad { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.audit-seal.bad span { color: inherit; }
.audit-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.audit-search { flex: 1 1 220px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.audit-search:focus { outline: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); outline-offset: 1px; }
table.audit-table td { vertical-align: top; padding-block: 10px; }
table.audit-table tr.audit-day td { padding: 20px 2px 6px; font-weight: 600; font-size: .86rem; color: var(--muted); background: none; border-bottom: 1px solid var(--line); }
table.audit-table tbody tr.audit-day:hover td { background: none; }
.audit-who { display: grid; gap: 3px; }
.audit-channel { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; padding-left: 34px; white-space: nowrap; }
.audit-channel.ki { color: var(--work-text); }
.audit-channel svg { width: 12px; height: 12px; }
.audit-area { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); font-size: .78rem; white-space: nowrap; }
.audit-action { white-space: nowrap; font-weight: 500; }
.audit-detail { font-size: .86rem; line-height: 1.45; min-width: 260px; }
.audit-detail .was { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.audit-detail .arrow { color: var(--muted); }
.audit-reason { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.audit-more { display: flex; justify-content: center; margin-top: 14px; }
/* Schmal (Handy): jede Zeile als kleiner Block – Zeit links, rechts Wer, Bereich/Aktion und Details untereinander. */
@media (max-width: 760px) {
  .table-wrap.audit-wrap { margin: 0; padding: 0; overflow: visible; }
  table.audit-table, table.audit-table tbody { display: block; }
  table.audit-table thead { display: none; }
  table.audit-table tr.audit-day { display: block; }
  table.audit-table tr.audit-day td { display: block; padding: 18px 0 6px; }
  table.audit-table tr.audit-row { display: grid; grid-template-columns: 62px auto 1fr; grid-template-areas: "time who who" "time area act" "time det det";
    gap: 4px 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.audit-table tr.audit-row td { display: block; padding: 0; border: 0; min-width: 0; }
  table.audit-table tr.audit-row:hover td { background: none; }
  table.audit-table td:nth-child(1) { grid-area: time; align-self: start; padding-top: 4px; }
  table.audit-table td:nth-child(2) { grid-area: who; }
  table.audit-table td:nth-child(3) { grid-area: area; }
  table.audit-table td:nth-child(4) { grid-area: act; }
  table.audit-table td:nth-child(5) { grid-area: det; min-width: 0; overflow-wrap: anywhere; }
  .audit-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .audit-channel { padding-left: 0; }
}
.audit-more .btn[hidden] { display: none; }
/* Kurze Kachel-Abschnitte (z. B. „Gerade anwesend“) */
.presence { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 6px 2px 2px; min-width: 0; }
.presence .person { font-weight: 500; }
.presence .status { font-size: .84rem; color: var(--muted); }
.row-menu { display: inline-flex; }
.account-menu button.danger { color: var(--neg); }
.account-menu button.danger .icon { color: var(--neg); }

/* Gliederung nach Abteilungen in Tag, Woche und Monat */
.group-row td { padding: 14px 10px 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.roster tr.group-row td { border-left: 0; padding: 14px 6px 6px; }
.group-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.group-title .count { margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.inline-add { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; max-width: 520px; }
.inline-add .field { flex: 1; }

/* Schnellsuche */
dialog.palette { width: min(580px, calc(100vw - 32px)); margin: 12vh auto auto; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
input.palette-input { border: 0; padding: 0; min-height: 30px; font-size: 1rem; background: transparent; color: var(--text); }
input.palette-input:focus { outline: none; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; background: none; border-radius: var(--radius); text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.palette-item .icon { color: var(--muted); }
.palette-item.sel { background: var(--surface-2); }
.palette-item .label { flex: 1; }
.palette-item .hint { font-size: .8rem; color: var(--muted); max-width: 55%; text-align: right; line-height: 1.3; }

/* Eingeklappte Seitenleiste: nur Symbole */
.shell.collapsed { grid-template-columns: 68px minmax(0, 1fr); }
.shell.collapsed .sidebar { padding-inline: 10px; align-items: center; }
/* Nur in der Seitenleiste ausblenden – die Inhaltsseite behält ihre Beschriftungen. */
.shell.collapsed .sidebar :is(.brand-name, .label, .company-name, kbd, .chev, .side-notice, .account-text, .nav-sep),
.shell.collapsed .nav a .badge { display: none; }
.shell.collapsed .side-top { flex-direction: column; padding: 4px 0 8px; }
.shell.collapsed .company-block, .shell.collapsed .search-btn { width: 44px; justify-content: center; padding: 10px; }
.shell.collapsed .nav a, .shell.collapsed .nav-group-btn { justify-content: center; padding: 10px; }
.shell.collapsed .nav-sub { padding-left: 0; }
.shell.collapsed .nav-group.closed .nav-sub { display: flex; }
.shell.collapsed .nav-group-btn { display: none; }
.shell.collapsed .account { justify-content: center; }

.main { min-width: 0; padding-block: 36px 64px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
.page { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar select { width: auto; min-width: 180px; max-width: 100%; }
.topbar { display: none; }

/* Zweite Leiste (z. B. Einstellungen): sitzt direkt neben der Hauptnavigation, Inhalt rechts daneben. */
/* Geteilte Seite (zweite Leiste) ohne Rand. Über :has statt Klasse: Bleibt #main beim Seitenwechsel stehen, passt es trotzdem. */
.main:has(> .page-split) { padding: 0; }
.page.page-split { max-width: none; margin: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0; min-height: 100vh; align-items: start; }
.subnav {
  position: sticky; top: 0; height: 100vh; padding: 22px 12px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; background: var(--page);
}
.subnav-title { font-family: var(--serif); font-size: 1.2rem; color: var(--text); padding: 6px 10px 14px; }
.subnav a { padding: 7px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1.35; }
.subnav a:hover { background: var(--surface-2); }
.subnav a.active { background: var(--surface-2); font-weight: 600; }
.split-content {
  min-width: 0; max-width: 920px; display: flex; flex-direction: column; gap: 16px;
  padding-block: 30px 64px; padding-left: 32px; padding-right: max(32px, env(safe-area-inset-right, 0px));
}
.split-content.wide { max-width: 1280px; }
.subnav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 16px 10px 4px; }
.subnav .subnav-link.disabled { padding: 8px 10px; color: var(--muted); opacity: .55; cursor: not-allowed; font-weight: 500; }

/* Personalakte: Kopf in der zweiten Leiste */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 6px 10px; text-align: center; }
.profile-head .back-link { align-self: flex-start; font-size: .84rem; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.profile-head .back-link:hover { color: var(--text); }
.avatar.lg { width: 84px; height: 84px; border-radius: 50%; font-size: 1.5rem; font-weight: 600; background: var(--surface-2); border: 0; }
.avatar.marked { color: var(--on-block); border: 0; }
.profile-name { font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; }
.profile-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; align-items: center; }
.badge-soft { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }

/* Waagerechtes Formular: Abschnitt mit Symbol und Linie, Beschriftung links, Feld rechts */
.hform { display: flex; flex-direction: column; gap: 26px; }
.hform-section { display: flex; flex-direction: column; gap: 12px; }
.hform-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hform-title .icon { color: var(--muted); }
.hrow { display: grid; grid-template-columns: 190px minmax(0, 520px); gap: 6px 22px; align-items: start; }
.hrow-control > .picker, .hrow-control > input, .hrow-control > .form-picker { max-width: 440px; }
.hrow-label { font-weight: 500; font-size: .92rem; padding-top: 10px; color: var(--text); }
.hrow-control { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hrow-control > .hint { font-size: .78rem; color: var(--muted); }
.hrow-control > span:not(.hint) { padding-top: 9px; }
.hform-section textarea { max-width: 652px; }
.hform-actions { display: flex; gap: 8px; justify-content: flex-start; padding-left: 212px; }
.hform-actions.flush { padding-left: 0; margin-top: 14px; }
table.table-plain td > strong:first-child, table.table-plain td .check strong { white-space: nowrap; }
@media (max-width: 720px) {
  .hrow { grid-template-columns: minmax(0, 1fr); }
  .hrow-label { padding-top: 0; }
  .hform-actions { padding-left: 0; }
}
.seg-input .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-input .seg button { white-space: nowrap; }
.color-pick { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 4px; }
.swatch-btn { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .12s ease, box-shadow .12s ease; }
.swatch-btn:hover { transform: scale(1.08); }
.swatch-btn.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch-btn.none { background: var(--surface) linear-gradient(135deg, transparent 46%, var(--muted) 47%, var(--muted) 53%, transparent 54%); box-shadow: inset 0 0 0 1px var(--line); }
.swatch-btn.none.active { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* Hinweisbox (Warnungen in Lohnstammdaten, abgeschlossener Monat) */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); font-size: .9rem; }
.notice > div { display: flex; flex-direction: column; gap: 4px; }
.notice a { color: inherit; font-weight: 600; }
.notice.soft { background: var(--surface-2); border-color: var(--line); color: var(--text); }

/* Lohn: Prüfung, Übersicht, Tagesdetail */
.check-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.check-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.check-ok { padding: 12px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Geprüfte Warnungen (Freigabe durch Betriebsleitung oder Steuerberatung) treten zurück. */
.check-item.reviewed > span:nth-child(2) { color: var(--muted); }
.check-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.notice.soft.ok { border-color: color-mix(in srgb, var(--pos) 35%, var(--line)); }
.notice.soft.ok > svg { color: var(--pos); }

/* Abo: schmale Hinweiszeile oben auf der Seite, Tarifkarten unter Einstellungen › Abo und Rechnungen */
.billing-banner { align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 9px 14px; font-size: .88rem; }
.billing-banner > div { flex: 1 1 260px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.billing-banner > div > span { color: var(--muted); }
.billing-banner > .btn { flex: none; }
.billing-banner > .icon { width: 16px; height: 16px; align-self: center; }
.billing-banner:not(.soft) > div > span { color: inherit; }
.promo-form { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) auto; gap: 10px; align-items: end; max-width: 640px; }
@media (max-width: 640px) { .promo-form { grid-template-columns: 1fr; } }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan-card { gap: 8px; padding: 16px; background: var(--page); }
.plan-card.current { border-color: var(--text); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h3 { margin: 0; font-size: 1.05rem; }
.plan-price strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.plan-lines { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.plan-action { margin-top: auto; padding-top: 6px; }
.check.ack { margin-top: 10px; font-size: .88rem; }
table.payroll td.num.unmapped { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
table.payroll tr.open td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
table.payroll tr.total-row td { border-top: 1px solid var(--text); background: none; }
table.payroll tbody tr.detail-row:hover td, table.payroll tr.detail-row td { background: var(--bg); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 24px; padding: 6px 4px 10px; }
.detail-title { font-weight: 600; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
table.table-plain.mini { font-size: .82rem; }
table.table-plain.mini td, table.table-plain.mini th { padding: 6px 8px; }
.item-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.item-list .item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: .88rem; }
.neg-text { color: var(--neg); font-weight: 600; }
/* Mitarbeiter-Import: Vorschau mit Hinweisen je Zeile */
.import-preview { display: flex; flex-direction: column; gap: 10px; }
/* Berichte */
.report-list { display: flex; flex-direction: column; gap: 0; padding-block: 6px; }
.report-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.report-card:last-child { border-bottom: 0; }
.report-card > div:first-child { min-width: 0; }
.report-card > div:first-child strong { display: block; margin-bottom: 2px; }
.report-card .toolbar { flex: none; flex-wrap: nowrap; }
.report-card.active strong { color: var(--work-text); }
@media (max-width: 720px) { .report-card { flex-direction: column; align-items: flex-start; } .report-card .toolbar { flex-wrap: wrap; } }
/* Vorschläge für eine Schicht */
.candidates { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.candidate { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.candidate:last-of-type { border-bottom: 0; }
/* Monatsabschluss: Schritte in der Reihenfolge der Arbeit */
.closing-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.closing-steps li { display: flex; gap: 10px; align-items: flex-start; }
.closing-steps .step-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.closing-steps li.done .step-mark { background: var(--pos); border-color: var(--pos); color: var(--on-ink); }
.closing-steps .step-mark svg { width: 14px; height: 14px; }
/* Lohnkosten im Dienstplan (Schätzung) */
.roster .sum-row .cost { color: var(--muted); font-variant-numeric: tabular-nums; }
.roster-cost { font-size: .88rem; font-variant-numeric: tabular-nums; }
.import-preview .table-wrap { max-height: 46vh; overflow: auto; }
.import-preview tr.row-error td { background: color-mix(in srgb, var(--neg) 6%, transparent); }
.neg-soft { color: var(--neg); }
.rule-pick { display: flex; flex-direction: column; gap: 8px; }
.rule-pick .radio-card > span { gap: 4px; }
.person .rule-tag { font-weight: 400; margin-left: 2px; }
.cell-input { width: 96px; min-height: 34px; padding: 5px 8px; }
.cell-input.sm { width: 64px; }
.cell-select { width: auto; min-height: 34px; padding-block: 5px; }
.inline-unit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-unit > input.unit-input { width: 96px; flex: none; }
.checklist { display: flex; flex-direction: column; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row:last-child { border-bottom: 0; }
.check-row input { accent-color: var(--work); width: 17px; height: 17px; margin-top: 2px; }
.check-row.done span { color: var(--muted); text-decoration: line-through; }

@media (max-width: 900px) {
  .page.page-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .profile-head { display: none; }
  .subnav-group { display: none; }
  .subnav {
    position: static; height: auto; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding-block: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .subnav-title { display: none; }
  .subnav a { white-space: nowrap; padding: 6px 10px; }
  .split-content { padding-block: 18px calc(88px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Demo-Hinweis: am Desktop in der Seitenleiste, am Handy oben auf der Seite. */
.demo-banner {
  background: color-mix(in srgb, var(--warn-bg) 75%, var(--page)); border: 1px solid color-mix(in srgb, var(--warn-line) 55%, transparent); color: var(--warn-text); border-radius: var(--radius-lg); padding: 8px 12px;
  display: none; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; font-size: .84rem; line-height: 1.4;
}
.demo-banner > span { flex: 1 1 200px; }

@media (max-width: 900px) {
  .demo-banner { display: flex; }
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar {
    /* Die Statusleiste gehört in die Leiste selbst: Mit top: Safe-Area läge sie beim Start über dem Seitenanfang. */
    display: block; position: sticky; top: 0; padding-top: env(safe-area-inset-top, 0px); z-index: 20;
    background: var(--sidebar); border-bottom: 1px solid var(--line);
  }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--sidebar); }
  /* Oben nur Marke, Suche und Konto-Kreis; die Seiten liegen unten als Reiter (.tabbar). */
  .topbar-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px;
    padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .topbar-actions { display: flex; align-items: center; gap: 4px; }
  /* Unten Platz für die Reiterleiste (56 px plus Home-Leiste). */
  .main { padding-block: 18px calc(88px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 1.5rem; }
}


/* Hinweise über der Seite (Vertrag zur Auftragsverarbeitung, Abo): eigener Rahmen, damit React-Seiten sie nicht verdrängen */
.page-notices { gap: 0; }
.notice a.btn-primary { color: var(--on-ink); }
/* ---------- Flächen ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Kennzahl-Kacheln */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px; min-height: 118px; color: var(--text);
}
.stat .label { font-size: .92rem; font-weight: 400; color: var(--muted); }
/* Zahl immer direkt unter dem Titel, der Hinweis unten als Fußzeile: Kacheln einer Reihe stehen auf gleicher Höhe. */
.stat { gap: 6px; }
.stat .value { margin-top: 0; }
.stat .value .fig, .stat .value > span { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.stat .hint { font-size: .76rem; color: var(--muted); line-height: 1.3; margin-top: auto; padding-top: 6px; }
/* Kachel als Link oder Knopf: Rand beim Überfahren, kleiner Pfeil rechts neben dem Titel. */
.stat.stat-link { text-decoration: none; cursor: pointer; text-align: left; font: inherit; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.stat.stat-link .label { display: flex; align-items: center; gap: 4px; }
.stat-chev { width: 15px; height: 15px; margin-left: auto; color: var(--muted); opacity: .6; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.stat.stat-link:hover { border-color: color-mix(in srgb, var(--text) 28%, var(--line)); text-decoration: none; }
.stat.stat-link:hover .stat-chev { opacity: 1; transform: translateX(2px); }
.stat.stat-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Kacheln bleiben neutral; die Bedeutung zeigt ein kleines Farbquadrat vor dem Titel. */
.stat[class*="tone-"] .label::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px;
}
.stat.tone-work .label::before { background: var(--work); }
.stat.tone-pause .label::before { background: var(--pause); }
.stat.tone-vacation .label::before { background: var(--vacation); }
.stat.tone-plan .label::before { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); }

/* Legende */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-work { background: var(--work); } .sw-pause { background: var(--pause); }
.sw-plan { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); }
.sw-vacation { background: var(--vacation); } .sw-sick { background: var(--sick); } .sw-away { background: var(--away); }
.sw-blocked { background: transparent; box-shadow: inset 0 3px 0 var(--neg); }
.sw-draft { background: transparent; border: 1px dashed var(--plan); }
.sw-open { background: color-mix(in srgb, var(--work) 8%, transparent); box-shadow: inset 0 0 0 1px var(--work); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius); font-weight: 500; cursor: pointer;
  text-decoration: none; line-height: 1.25; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn, .seg button, .picker-btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink); opacity: .86; }
.btn-danger { color: var(--neg); }
.btn-ok { color: var(--pos); }
.btn-ghost { border-color: transparent; }
.btn-sm { padding: 4px 9px; font-size: .84rem; }
.btn-lg { padding: 16px 22px; font-size: 1.05rem; }
.btn-link { border: 0; background: none; color: var(--link); padding: 0; cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
/* Stempel-Aktionen: Farbe = Bedeutung */
.btn-in { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-out { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-in:hover, .btn-out:hover { background: var(--ink); opacity: .86; }
.btn-on-block { background: rgba(17, 17, 16, .9); border-color: transparent; color: #f5f5f3; }
.btn-on-block:hover { background: #111110; }
.btn-on-block.secondary { background: transparent; border-color: rgba(17, 17, 16, .35); color: #111110; }
.btn-on-block.secondary:hover { background: rgba(17, 17, 16, .08); }

/* ---------- Chips ---------- */
/* Chips wie Schlagworte: hell hinterlegt, ohne harte Kanten. */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px;
  font-size: .78rem; font-weight: 500; white-space: nowrap; border: 1px solid transparent; background: var(--surface-2); color: var(--text);
}
.chip-work { background: var(--work); border-color: var(--work); color: var(--on-block); }
.chip-pause { background: var(--pause); border-color: var(--pause); color: var(--on-block); }
.chip-plan { background: var(--plan-tint); border-color: var(--plan); color: var(--text); }
.chip-vacation { background: var(--vacation); border-color: var(--vacation); color: var(--on-block); }
.chip-sick { background: var(--sick); border-color: var(--sick); color: var(--on-block); }
.chip-away { background: var(--away); border-color: var(--away); color: var(--on-block); }
.chip-ok { background: var(--surface-2); }
.chip-pending { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.chip-alert { background: transparent; color: var(--neg); border-color: var(--neg); }
.chip-ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip-neutral { color: var(--muted); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 600; }
.field .hint { font-size: .76rem; color: var(--muted); font-weight: 400; }
/* Eingabefelder im selben Stil wie die Auswahlfelder: gleiche Höhe, Linie, Rundung und Hover */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; min-height: 40px;
  transition: border-color .15s ease;
}
input[type=search] { appearance: none; -webkit-appearance: none; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
:is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea):not(.palette-input):hover { border-color: var(--muted); }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6d66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
}
@media (prefers-color-scheme: dark) {
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a59c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=date], input[type=time] { font-variant-numeric: tabular-nums; }
input::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; transition: opacity .15s ease; }
input::-webkit-calendar-picker-indicator:hover { opacity: .8; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus, .picker-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
/* Auswahlfeld im Formular füllt die Spalte */
.form-picker .picker, .form-picker .picker-btn { width: 100%; min-width: 0; }
.form-picker .picker-btn .swatch { flex: none; }
.picker-pop.no-search .palette-search { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; opacity: 0; }
.picker-pop .palette-item .swatch { flex: none; margin-inline: 2px; }
.sw-other { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.inline-add.wide { max-width: none; margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--ink); }
.radio-card input { accent-color: var(--ink); margin-top: 3px; }
.radio-card > span { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.check input { accent-color: var(--work); width: 16px; height: 16px; }
/* Auch Haken und Optionen in Tabellen und Listen (Prüfliste, Freigaben) in der Akzentfarbe statt Systemblau. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--work); }
.days-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.days-pick label {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .86rem;
}
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.days-pick label:has(input:focus-visible) { outline: 2px solid var(--focus); }
.form-error { color: var(--neg); border-left: 4px solid var(--neg); padding: 6px 12px; font-size: .9rem; background: transparent; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-size: .84rem; color: var(--muted);
  font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.off td { color: var(--muted); }
.table tr.today td { box-shadow: inset 0 -2px 0 var(--work); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.entry-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.entry-line + .entry-line { margin-top: 4px; }
.cp-btn { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.entry-line .cp-btn { margin-left: 0; }
.cp-btn svg { width: 14px; height: 14px; flex: none; }
.cp-list { display: flex; flex-direction: column; gap: 16px; }
.cp-photo { margin: 0; }
.cp-photo img { display: block; width: 100%; border-radius: var(--radius); background: var(--surface); }
.cp-photo figcaption { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.cp-cap { flex: 1; min-width: 0; padding-top: 5px; }
.cp-export { margin: 0 -6px 0 0; }
.cp-photo figcaption strong { color: var(--text); font-weight: 500; }
.cp-btn-flag { color: var(--neg); }
.cp-flag { display: block; margin-top: 2px; color: var(--neg); }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* Tagesbalken (0–24 Uhr) in der Monatsliste */
.daybar { position: relative; height: 14px; min-width: 160px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.daybar::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent calc(25% - 1px), var(--line) 25%, transparent calc(25% + 1px),
    transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px),
    transparent calc(75% - 1px), var(--line) 75%, transparent calc(75% + 1px));
}
.daybar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.daybar .seg-work { background: var(--work); }
.daybar .seg-vacation { background: var(--vacation); left: 0; right: 0; }
.daybar .seg-sick { background: var(--sick); left: 0; right: 0; }
.daybar .seg-away { background: var(--away); left: 0; right: 0; }
.daybar .seg-other { background: var(--surface-2); left: 0; right: 0; }
.daybar .seg-other { background: var(--surface-2); left: 0; right: 0; }
.daybar-scale { display: flex; justify-content: space-between; font-size: .64rem; color: var(--muted); min-width: 160px; }
.daybar .seg-pause { background: var(--pause); z-index: 1; }
.daybar.mini { height: 8px; min-width: 84px; border-radius: 2px; }

/* Umschalter Tag / Woche / Monat */
.seg { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 4px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--ink); color: var(--on-ink); }


/* Wochenansicht */
.roster.week td.name { vertical-align: middle; }
.wk-cell { cursor: pointer; min-width: 96px; }
.wk-cell:hover, .wk-cell:focus-visible { background: var(--bg); }
.wk-cell.today { box-shadow: inset 0 -2px 0 var(--work); }
.wk-time { font-size: .74rem; color: var(--muted); margin-top: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-sum { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wk-total { vertical-align: middle; }
.wk-scale { max-width: 260px; }
@media (max-width: 700px) { .col-bar { display: none; } }

/* Monatsnavigation */
.month-nav { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.month-nav .label { min-width: 150px; text-align: center; font-weight: 600; }
.month-nav .btn { border: 0; padding: 6px 10px; }

/* ---------- Stempeln ---------- */
.today-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.today-date { display: flex; align-items: flex-start; gap: 6px; }
.today-date .fig { font-size: clamp(4rem, 9vw, 6rem); }
.today-date .wd { color: var(--work-text); font-weight: 700; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; margin-top: .5em; }
.today-date .mo { color: var(--muted); font-size: .9rem; margin-top: .5em; }
.today-clock { text-align: right; }
.today-clock .fig { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.today-clock .muted { font-size: .84rem; }

.state-block {
  border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 18px;
  background: var(--neutral-block); color: var(--text); min-height: 230px;
}
.state-block.st-in { background: var(--work); color: var(--on-block); }
.state-block.st-break { background: var(--pause); color: var(--on-block); }
.state-block .st-title { font-weight: 700; font-size: 1rem; }
.state-block .st-sub { opacity: .7; font-weight: 500; }
.state-block .st-fig .fig { font-size: clamp(3.4rem, 8vw, 5rem); }
.state-block .st-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.state-block .st-actions .btn { flex: 1 1 150px; padding: 15px 18px; font-size: 1.05rem; }
.state-block .st-note { margin-top: auto; font-weight: 600; border-top: 1px solid currentColor; padding-top: 12px; opacity: .8; }
.state-block .warn { font-weight: 600; border-left: 3px solid currentColor; padding-left: 10px; }

/* Tagesraster: Stunden links, Spalten Plan und Ist, rote Jetzt-Linie */
.tl { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); column-gap: 6px; }
.tl-head { display: contents; }
.tl-head span { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 6px; }
.tl-body { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); column-gap: 6px; }
.tl-hours { position: relative; }
.tl-hours span { position: absolute; left: 0; font-size: .7rem; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.tl-col { position: relative; }
.tl-grid { position: absolute; inset: 0 0 0 44px; pointer-events: none; }
.tl-grid i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.tl-block {
  position: absolute; left: 0; right: 0; border-radius: 5px; padding: 6px 8px; overflow: hidden;
  color: var(--on-block); display: flex; flex-direction: column; justify-content: space-between;
  border: 2px solid var(--surface);
}
.tl-block .t { font-weight: 700; font-size: .78rem; line-height: 1.15; }
.tl-block .s { white-space: pre-line; font-size: .74rem; opacity: .7; font-variant-numeric: tabular-nums; }
.tl-block .fig { font-size: 1.9rem; }
.tl-block.b-work { background: var(--work); }
.tl-block.b-plan { background: var(--plan-tint); border: 1.5px solid var(--plan); color: var(--text); }
.tl-block.b-plan .s { color: var(--muted); opacity: 1; }
.tl-block.b-vacation { background: var(--vacation); }
.tl-block.b-sick { background: var(--sick); }
.tl-block.b-away { background: var(--away); }
.tl-block.b-other { background: var(--surface-2); }
.tl-block.b-open { background: repeating-linear-gradient(135deg, var(--work) 0 10px, color-mix(in srgb, var(--work) 82%, white) 10px 20px); }
.tl-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--work); z-index: 3; pointer-events: none; }
.tl-now span { position: absolute; left: 0; top: -9px; background: var(--work); color: var(--on-block); font-size: .66rem; font-weight: 700; padding: 1px 4px; border-radius: 3px; }

.tiles-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }
.list-item > * { min-width: 0; overflow-wrap: anywhere; }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.progress > div { height: 100%; background: var(--work); }

/* ---------- Dienstplan ---------- */
/* Flexible Spalten: Name und Woche fest, die sieben Tage teilen sich den Rest, jeder Tag mindestens 96 px (Uhrzeit nie abgeschnitten).
   Kopf, Namensspalte und Wochenspalte kleben (Dienstplan bei echter Größe, Abschnitt „UX Dienstplan“ unten). */
.roster { border-collapse: separate; border-spacing: 0; width: 100%; min-width: calc(var(--rn) + var(--rw) + 7 * 96px); table-layout: fixed; font-size: .86rem; --rn: 160px; --rw: 112px; }
.roster col.col-name { width: var(--rn); }
.roster col.col-wk { width: var(--rw); }
@media (max-width: 1280px) { .roster { --rn: 132px; --rw: 84px; } }
@media (max-width: 600px) { .roster { --rn: 112px; --rw: 76px; } }
.roster th, .roster td { border-bottom: 1px solid var(--line); padding: 4px; vertical-align: top; }
.roster td + td, .roster th + th, .roster th + td { border-left: 1px solid var(--line); }
.roster th { text-align: left; font-weight: 600; background: var(--surface); border-bottom-color: var(--line); }
.roster th .hol { display: block; font-weight: 600; color: var(--muted); font-size: .7rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster .name { font-weight: 600; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 2; vertical-align: middle; }
.roster tr.me > .name { box-shadow: inset 3px 0 0 var(--work); }
.roster td.cell { min-width: 96px; height: 46px; }
.roster td.cell.can-edit { cursor: pointer; }
.roster td.cell.can-edit:hover { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
/* Schicht: Umriss in der Plan-Farbe, links ein farbiger Rand je Bereich (--dept). */
.shift {
  display: block; width: 100%; text-align: left; cursor: default; font: inherit;
  background: var(--plan-tint); border: 1px solid var(--plan); border-left: 3px solid var(--dept, var(--plan)); color: var(--text); border-radius: 4px; padding: 3px 4px;
  font-weight: 600; font-variant-numeric: tabular-nums; font-size: .76rem; line-height: 1.3; letter-spacing: -.005em;
}
.shift + .shift { margin-top: 3px; }
.can-edit .shift { cursor: pointer; }
.can-edit .shift:hover { border-color: var(--ink); border-left-color: var(--dept, var(--ink)); }
.roster .abs { display: block; margin-top: 3px; border-radius: 4px; padding: 2px 6px; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Entwurf: nur der gestrichelte Rahmen, kein Wort in der Kachel. Offene Schicht: ohne Person, mit Zahl der freien Plätze. */
.shift.draft { border-style: dashed; border-left-style: dashed; background: transparent; }
.shift.open-shift { border-color: var(--work); background: color-mix(in srgb, var(--work) 8%, transparent); }
.shift.warn { border-color: var(--neg); }
.shift-warn { display: flex; gap: 4px; align-items: flex-start; margin-top: 3px; font-size: .72rem; font-weight: 500; line-height: 1.3; color: var(--neg); white-space: normal; }
.shift-warn .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.roster tr.open-row td { background: color-mix(in srgb, var(--work) 3%, var(--surface)); }
.roster tr.sum-row td { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; vertical-align: middle; }
.roster tr.sum-row td strong { color: var(--text); font-size: .84rem; }
.roster th .day-actions { float: right; margin: -4px -4px 0 0; }
.roster th .day-actions .icon-btn { width: 26px; height: 26px; }
.roster-status { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 10px; font-size: .84rem; color: var(--muted); }
/* Wochenende als Spalte erkennbar; heute nur mit einer ruhigen Linie oben am Tageskopf, ohne Tönung (kein Warnsignal). */
.roster th.closed-day, .roster td.closed-day { background: color-mix(in srgb, var(--ink) 2.5%, var(--surface)); }
.roster th.today { box-shadow: inset 0 3px 0 var(--ink); }
.roster th.today .day-num .fig { color: var(--text); font-weight: 600; }
.roster .name .name-main { display: block; overflow: hidden; text-overflow: ellipsis; }
.roster .name .name-sub { display: block; margin-top: 1px; font-weight: 500; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.roster .name .name-sub.over { color: var(--neg); }
/* Wochenspalte rechts: klebt am rechten Rand, Stunden je Person klein und gut lesbar. */
.roster th.wk, .roster td.wk { text-align: right; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; position: sticky; right: 0; z-index: 2; background: var(--surface); box-shadow: inset 1px 0 0 var(--line); }
/* Schichtansicht: eine Zeile je Schicht, die eingeteilten Personen als kleine Kacheln */
.who {
  display: flex; align-items: center; gap: 4px; width: 100%; padding: 3px 6px; text-align: left;
  border: 1px solid var(--line); border-left: 3px solid var(--dept, var(--line)); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; font-size: .78rem; font-weight: 600; cursor: default;
}
.who + .who { margin-top: 3px; }
.can-edit .who { cursor: grab; }
.can-edit .who:hover { border-color: var(--ink); }
.who .who-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.who .icon { width: 13px; height: 13px; color: var(--neg); flex: none; }
.who.draft { border-style: dashed; }
.who.warn { border-color: var(--neg); }
.who.me { background: color-mix(in srgb, var(--work) 10%, var(--surface)); }
.who.open { border-color: var(--work); background: color-mix(in srgb, var(--work) 8%, transparent); }
.who.dragging { opacity: .4; }
.roster.shifts .name .name-main { font-variant-numeric: tabular-nums; }

.who { flex-wrap: wrap; }
.who small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.roster td.empty-cell { padding: 18px 12px; color: var(--muted); text-align: center; }
.quick-pick.off { opacity: .55; }
.quick-group { padding: 8px 8px 2px; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.quick-plan > .quick-more.first { border-top: 0; margin-top: 0; }
.quick-more.danger { color: var(--neg); }
.quick-more.danger .icon { color: var(--neg); }
.roster .name .row-tools { float: right; width: 26px; height: 26px; margin: -2px -4px 0 4px; }
/* Zeitstrahl: ein Tag, links die Uhrzeit von oben nach unten, je Person eine Spalte mit senkrechtem Balken, darunter der Name. */
.tl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 12px; }
.tl-days button { padding-inline: 10px; }
.tl-ranges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
/* Von und Bis: kleines Feld mit Pfeilen, gleiche Höhe und Rahmen wie das Zeitraum-Feld */
.tv-step { display: inline-flex; align-items: center; gap: 2px; height: 38px; box-sizing: border-box; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tv-step .btn { height: 100%; min-height: 0; padding: 0 9px; border: 0; background: none; box-shadow: none; }
@media (hover: hover) { .tv-step .btn:hover:not(:disabled) { background: var(--surface-2); } }
.tv-step .btn:disabled { opacity: .3; cursor: default; }
.tv-step .label { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 2px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-step-name { font-size: .8rem; font-weight: 400; color: var(--muted); }
/* „Automatisch“ neben Von und Bis: gleiche Höhe */
.tl-auto { height: 38px; min-height: 0; padding-block: 0; }
.tl-card { padding-top: 14px; }
.tv-title { margin: 0; font-size: 1rem; }
.tv { display: flex; align-items: flex-start; padding: 10px 0 18px; font-size: .8rem; } /* unten Platz für die Bildlaufleiste, sie liegt sonst über den Bereichen */
.tv-left { flex: none; align-self: stretch; width: 150px; position: sticky; left: 0; z-index: 3; background: var(--surface); }
.tv-left-top { display: flex; }
.tv-axis { position: relative; flex: none; width: 46px; }
.tv-axis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tv-cov { position: relative; flex: 1 1 auto; margin-right: 6px; border-right: 1px solid var(--line); }
.tv-cov i { position: absolute; left: 0; display: block; background: color-mix(in srgb, var(--work) 38%, transparent); border-bottom: 1px solid var(--surface); }
.tv-cov i.peak { background: var(--work); }
.tv-left-foot { display: flex; gap: 6px; padding-top: 8px; font-size: .68rem; font-weight: 600; color: var(--muted); }
.tv-left-foot > span:first-child { flex: none; width: 40px; text-align: right; }
.tv-left-foot b { font-weight: 600; display: block; }
.tv-main { flex: 1 1 auto; min-width: 0; }
.tv-plot { position: relative; border-bottom: 1px solid var(--line); }
.tv-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.tv-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--neg); opacity: .8; z-index: 2; pointer-events: none; }
.tv-cols { position: absolute; inset: 0; display: grid; }
.tv-col { position: relative; min-width: 0; border-left: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.tv-col.first { border-left: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
@media (max-width: 700px) { .tv-left { width: 96px; } .tv-axis { width: 42px; } .tv-left-foot > span:first-child { width: 36px; } }
.tv-col.can-edit { cursor: pointer; }
.tv-col.can-edit:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.tv-col.me { background: color-mix(in srgb, var(--work) 5%, transparent); }
.tv-mark { position: absolute; left: 50%; width: 0; height: 0; }
.tv-bar {
  position: absolute; left: 12%; right: 12%; box-sizing: border-box; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden;
  font: inherit; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); background: var(--plan-tint); border: 1.5px solid var(--plan); border-radius: 6px; text-align: center; cursor: default;
}
button.tv-bar { cursor: pointer; }
button.tv-bar:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.tv-bar small { font-size: .62rem; font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
.tv-bar.draft { border-style: dashed; background: var(--surface); }
.tv-bar.open { border-color: var(--work); background: color-mix(in srgb, var(--work) 12%, var(--surface)); }
.tv-bar.warn { border-color: var(--neg); }
.tv-abs { position: absolute; left: 6%; right: 6%; top: 8px; padding: 3px 2px; border-radius: 4px; font-size: .68rem; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.tv-names, .tv-bands { display: grid; }
.tv-name { min-width: 0; padding: 7px 3px 4px; text-align: center; line-height: 1.2; border-left: 1px solid transparent; }
.tv-name.first { border-left-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.tv-who { display: block; font-size: .74rem; font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.tv-name.me .tv-who { color: var(--work-text); }
.tv-name.open .tv-who { color: var(--muted); }
.tv-sub { display: block; margin-top: 1px; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tv-band { min-width: 0; margin: 4px 2px 0; padding-top: 4px; border-top: 2px solid var(--line); text-align: center; overflow: hidden; white-space: nowrap; }
.tv-band.empty { border-top-color: transparent; }
.swatch.sw-cov { background: var(--work); opacity: .6; }
.swatch.sw-now { background: var(--neg); width: 12px; height: 2px; }
/* Öffnungszeiten im Zeitstrahl: außerhalb ein Hauch Grau, Öffnung und Schluss als gepunktete Linie mit kleiner Beschriftung */
.tv-closed { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--ink) 3.5%, transparent); pointer-events: none; }
.tv-open { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dotted color-mix(in srgb, var(--plan) 75%, transparent); z-index: 2; pointer-events: none; }
.tv-open span { position: absolute; right: 4px; bottom: 2px; padding: 1px 6px; border-radius: 4px; background: var(--surface); color: var(--plan); font-size: .64rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); }
.tv-rest { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-size: .74rem; font-weight: 600; white-space: nowrap; pointer-events: none; }
.swatch.sw-open-hours { width: 14px; height: 0; border-top: 1.5px dotted var(--plan); background: none; }
/* Zeiten, Tag: Schicht als Umriss, darin die gestempelte Arbeit mit Pausen */
.tv-plan { position: absolute; left: 10%; right: 10%; box-sizing: border-box; border: 1.5px solid var(--plan); border-radius: 6px; background: var(--plan-tint); }
.tv-work {
  position: absolute; left: 24%; right: 24%; z-index: 1; box-sizing: border-box; padding: 3px 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden;
  border-radius: 4px; background: var(--work); color: var(--on-block); font-size: .62rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.tv-work span { position: relative; z-index: 1; }
.tv-work.open { background: repeating-linear-gradient(135deg, var(--work) 0 8px, color-mix(in srgb, var(--work) 80%, white) 8px 16px); }
.tv-work.stale { background: none; border: 1.5px dashed var(--neg); color: var(--neg); }
.tv-break { position: absolute; left: 0; right: 0; background: var(--pause); }
.tv-col.focus, .tv-name.focus { background: color-mix(in srgb, var(--work) 6%, transparent); }
a.tv-who { color: var(--text); text-decoration: none; }
a.tv-who:hover { text-decoration: underline; }
.tv-photos { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.tv-name .tv-cp { margin: 0; padding: 3px; border-radius: 5px; text-decoration: none; color: var(--muted); }
.tv-name .tv-cp:hover { background: var(--surface-2); color: var(--text); }
.tv-name .tv-cp.cp-btn-flag { color: var(--neg); }
/* Die Uhrzeit einer Schicht bleibt ab Tablet-Breite in einer Zeile; am Handy darf sie umbrechen. */
@media (min-width: 700px) { .shift-time { white-space: nowrap; } }
.roster td.wk strong { display: block; font-size: .84rem; font-weight: 700; color: var(--text); }
.roster td.wk .muted { margin-top: 1px; font-size: .7rem; font-weight: 500; }
.roster td.wk.over strong, .roster td.wk.over .muted { color: var(--neg); }
/* Die Wochenspalte steht fest neben dem Sonntag, nie schwebend über den Tagen. */
/* Hinweise über dem Plan dürfen am Handy umbrechen, sonst schiebt die Zeile die ganze Seite in die Breite. */
.roster-status .status { white-space: normal; }
/* Ziehen und Ablegen */
.can-edit .shift { cursor: grab; }
.can-edit .shift:active { cursor: grabbing; }
.shift.dragging { opacity: .4; }
.roster td.cell.drop-target { background: color-mix(in srgb, var(--work) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--work); }
/* Die Kachel schneidet nichts ab: Zeit und Hinweise stehen je in einer eigenen Zeile mit Auslassungspunkten. */
.shift { position: relative; overflow: hidden; }
/* Schwebendes Menü, z. B. die Schnellplanung */
.float-menu {
  position: fixed; z-index: 60; min-width: 250px; max-width: 320px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: toast-in .16s var(--ease);
}
.quick-head { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px 8px; }
.quick-list { display: flex; flex-direction: column; gap: 2px; }
.quick-pick {
  display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 8px; align-items: center; text-align: left;
  padding: 7px 8px; border: 0; border-radius: var(--radius); background: none; font: inherit; color: var(--text); cursor: pointer;
}
.quick-pick:hover, .quick-pick:focus-visible { background: var(--surface-2); }
.quick-pick .quick-kind { grid-row: 1 / 3; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.quick-pick strong { font-variant-numeric: tabular-nums; }
.quick-pick .muted { font-size: .76rem; }
.quick-more {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 9px 8px; border: 0; border-top: 1px solid var(--line);
  background: none; font: inherit; font-size: .84rem; color: var(--text); cursor: pointer; text-align: left;
}
.quick-more:hover, .quick-more:focus-visible { background: var(--surface-2); }
.quick-more .icon { width: 15px; height: 15px; color: var(--muted); }
.viewbar .viewbar-select { height: 38px; min-height: 0; padding-block: 0; width: auto; max-width: 15rem; }
.toast.with-action { display: flex; align-items: center; gap: 14px; }
.toast-action { border: 0; padding: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.ac-tile.shift-tile { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); color: var(--text); }
.ac-tile.shift-tile.draft { box-shadow: inset 0 0 0 1.5px var(--plan); background: transparent; border: 1px dashed var(--plan); }
.ac-tile.shift-tile.warn { box-shadow: inset 0 0 0 1.5px var(--neg); }

/* QR-Code (Ortsnachweis beim Stempeln, Anmeldung am Terminal, Zwei-Faktor) */
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.qr-box img { background: #fff; border-radius: 8px; border: 1px solid var(--line); padding: 6px; }
/* Tarifvorlagen: Entgeltgruppen im Editor */
.tariff-groups { display: flex; flex-direction: column; gap: 6px; }
.tariff-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 156px 110px 34px; gap: 6px; align-items: center; }
@media (max-width: 640px) { .tariff-row { grid-template-columns: 70px minmax(0, 1fr) 34px; } .tariff-row select, .tariff-row input[name=g_amount] { grid-column: span 1; } }
/* Wiederherstellungscodes (Anmeldung in zwei Schritten) */
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1.05rem; letter-spacing: .04em; }
.warn-text { color: var(--warn-text); font-weight: 600; }
.qr-box > div { flex: 1; min-width: 220px; }
/* Stempeln am Ort (Einstellungen › Terminals): Ort des Betriebs, Eingabe von Breite und Länge, Erklärung vor dem ersten Stempel */
.place-clock { display: flex; flex-direction: column; gap: 12px; }
.place-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.place-row > div { flex: 1 1 220px; min-width: 0; }
.place-row p { margin: 2px 0 0; }
.place-manual summary { cursor: pointer; color: var(--muted); }
.place-manual .toolbar { margin-top: 8px; }
.place-manual input { flex: 1 1 220px; min-width: 0; }
.place-clock .field { max-width: 260px; }
.place-explain ul { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Dialog ---------- */
dialog {
  border: 0; border-radius: 8px; padding: 0; width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
dialog::backdrop { background: rgba(17, 17, 16, .5); }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 80px); overflow-y: auto; }
.dialog-body h2 { font-size: 1.3rem; letter-spacing: -.02em; }
/* Feste Kopfleiste: Titel und X bleiben beim Blättern stehen */
.dialog-body.has-head { padding: 0; gap: 0; overflow: hidden; }
.dialog-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 16px 12px 22px; border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.dialog-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 14px 22px 22px; }
.dialog-head.scrolled { border-bottom-color: var(--line); }
/* Einstellungen › Firmendaten: Öffnungszeiten je Wochentag */
.oh-list { display: flex; flex-direction: column; }
.oh-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.oh-row:last-child { border-bottom: 0; }
.oh-day { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.oh-times { display: flex; align-items: center; gap: 10px; }
.oh-times input { width: 8rem; }
.oh-closed { display: none; }
.oh-row.closed .oh-times { display: none; }
.oh-row.closed .oh-closed { display: block; }
.oh-row.closed .oh-day span { color: var(--muted); }
@media (max-width: 700px) { .oh-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; } .oh-times input { width: auto; flex: 1; } }
.dialog-head h2 { flex: 1; min-width: 0; margin: 0; }
.dialog-x { width: 36px; height: 36px; border-radius: 50%; }
.dialog-x .icon { width: 18px; height: 18px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dialog-actions .spacer { flex: 1; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 100; }
/* Über einem offenen Dialog zeigt toast() die Meldungen als Popover (oberste Ebene): Vorgaben des Browsers dafür aufheben, Lage wie oben. */
:where(.toasts[popover]) { inset: auto; width: auto; height: auto; margin: 0; border: 0; padding: 0; overflow: visible; color: inherit; background: none; }
.toast {
  background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: var(--radius);
  max-width: 360px; font-size: .9rem; font-weight: 500; animation: toast-in .18s ease-out;
}
.toast.error { background: var(--neg); color: #fff; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }
body.has-ai .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* ---------- KI-Assistent: Knopf unten rechts, öffnet sich beim Überfahren ---------- */
.ai-widget { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
/* Nur Knopf und geöffnetes Fenster fangen die Maus; der leere Platz des geschlossenen Fensters lässt sie durch. */
.ai-widget > * { pointer-events: auto; }
.ai-fab {
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--ink); color: var(--on-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ai-fab .icon { width: 22px; height: 22px; }
.ai-fab:hover, .ai-widget.open .ai-fab { transform: scale(1.06); box-shadow: 0 12px 30px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .12); }
.ai-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.ai-panel {
  width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
  overflow: hidden; transform-origin: bottom right; transform: translateY(10px) scale(.96); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .2s;
}
.ai-widget.open .ai-panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .18s ease, transform .2s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.ai-panel.drop { box-shadow: 0 0 0 2px var(--work), 0 24px 60px rgba(0, 0, 0, .18); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.ai-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-title > div { display: flex; flex-direction: column; line-height: 1.25; }
.ai-title strong { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; }
.ai-title span:not(.ai-mark) { font-size: .74rem; color: var(--muted); }
.ai-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--work) 16%, transparent); color: var(--work-text); flex: none; }
.ai-mark .icon { width: 17px; height: 17px; }
.ai-head-actions { display: flex; gap: 2px; }
.ai-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; font-size: .92rem; }
.ai-empty { margin: auto 0; display: flex; flex-direction: column; gap: 8px; padding: 8px 2px; }
.ai-hello { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .84rem; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.ai-chip:hover { background: var(--surface-2); border-color: var(--muted); }
.ai-msg { max-width: 100%; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 6px; }
.ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0 6px; padding-left: 20px; }
.ai-msg li + li { margin-top: 2px; }
.ai-msg code { font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.ai-msg .ai-h { font-weight: 600; }
.ai-msg.user { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 86%; }
.ai-msg.user .bubble { background: var(--surface-2); padding: 8px 12px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.ai-msg-files { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.ai-msg.bot { align-self: stretch; }
.ai-msg.error { display: flex; gap: 8px; color: var(--neg); font-size: .86rem; align-items: flex-start; }
.ai-table-wrap { overflow-x: auto; margin: 4px 0 8px; }
.ai-table { border-collapse: collapse; font-size: .84rem; width: 100%; }
.ai-table th, .ai-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ai-table th { color: var(--muted); font-weight: 500; }
.ai-activity { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.ai-activity .dots { display: inline-flex; gap: 3px; }
.ai-activity .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--work); animation: ai-dot 1.1s infinite ease-in-out; }
.ai-activity .dots i:nth-child(2) { animation-delay: .15s; }
.ai-activity .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.ai-actions { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--page); }
.ai-actions-head { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ai-actions-head .icon { width: 15px; height: 15px; }
.ai-action { display: flex; flex-direction: column; gap: 4px; }
.ai-action + .ai-action { border-top: 1px solid var(--line); padding-top: 10px; }
.ai-action-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-action-title input { accent-color: var(--work); }
.ai-action-title .status { margin-left: auto; font-size: .8rem; }
.ai-action ul { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--text); }
.ai-action li { margin-top: 2px; }
.ai-action.st-declined, .ai-action.st-skipped { opacity: .6; }
.ai-err { color: var(--neg); }
.ai-actions-buttons { display: flex; justify-content: flex-end; gap: 6px; }
.ai-warn { display: flex; gap: 7px; align-items: flex-start; margin-top: 7px; padding: 7px 9px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); line-height: 1.4; }
.ai-warn svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.ai-sure { display: grid; gap: 8px; }
.ai-sure-check { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; line-height: 1.4; cursor: pointer; }
.ai-sure-check input { margin-top: 2px; flex: none; }
.ai-sure .btn:disabled { opacity: .4; cursor: not-allowed; }
.ai-input { border-top: 1px solid var(--line); padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.ai-input-row { display: flex; align-items: flex-end; gap: 6px; }
textarea.ai-text { flex: 1; min-height: 40px; max-height: 160px; resize: none; padding: 9px 12px; border-radius: 12px; line-height: 1.4; }
.ai-send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; flex: none; transition: opacity .15s ease; }
.ai-send:disabled { opacity: .35; cursor: default; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 8px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; }
.ai-file .icon { width: 14px; height: 14px; color: var(--muted); }
.ai-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ai-file .x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 2px; }
.ai-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 10px; font-size: .7rem; color: var(--muted); }
.ai-foot .usage { white-space: nowrap; }
/* Verlauf im Assistenten */
.ai-panel.history .ai-history-btn { background: var(--surface-2); color: var(--text); }
.ai-panel.history .ai-input { display: none; }
.ai-hist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-hist-head strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.ai-hist { display: flex; flex-direction: column; }
.ai-hist-group { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 4px 4px; }
.ai-hist-item { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.ai-hist-item:hover, .ai-hist-item.current { background: var(--surface-2); }
.ai-hist-open { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 8px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ai-hist-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-hist-meta { flex: none; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ai-hist-item .row-menu { opacity: 0; transition: opacity .12s ease; }
.ai-hist-item:hover .row-menu, .ai-hist-item:focus-within .row-menu { opacity: 1; }
.ai-hist-empty { padding: 20px 4px; }
.ai-hist-note { margin-top: auto; padding-top: 14px; }

/* Diktat: Mikrofon an, Text erscheint kursiv im Eingabefeld, Pegel als Punktreihe */
.ai-mic.off { opacity: .45; }
.ai-mic.recording { background: color-mix(in srgb, var(--link) 14%, transparent); color: var(--link); }
textarea.ai-text.dictating { font-style: italic; color: var(--muted); }
.ai-meter { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 2px; flex: none; }
.ai-meter i { width: 3px; height: 3px; border-radius: 2px; background: var(--muted); opacity: .75; transition: height .08s linear; }
.ai-meter.busy i { animation: ai-meter-wait 1.1s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes ai-meter-wait { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

@media (max-width: 560px) {
  .ai-widget { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .ai-panel { width: calc(100vw - 24px); height: calc(100vh - 96px); }
}
@media (prefers-reduced-motion: reduce) { .ai-panel, .ai-fab { transition: none; } .ai-activity .dots i { animation: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- Terminal ---------- */
/* Gemeinsames Gerät im Betrieb (Browser und Noya Terminal). Quer: links die Eingabe (PIN, dann die Stempel-Knöpfe),
   rechts die Bühne mit Uhr, Kamera und Bestätigung. Hoch: Bühne oben, Tastenfeld in voller Breite darunter. Alles mittig. */
.tk {
  --tk-key: clamp(64px, 12.5vh, 120px);
  /* Rahmen und Hinweise über dem Kamerabild: hell auf dunklem Schleier, in beiden Themen gleich (das Bild hat kein Thema). */
  --tk-on-video: #fff;
  --tk-shade: rgba(0, 0, 0, .52);
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "input head" "input stage" "input foot";
  column-gap: clamp(20px, 3.5vw, 56px); row-gap: 14px;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  background: var(--bg); color: var(--text); text-align: center;
  transition: background-color .3s var(--ease);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
/* Nach dem Stempel trägt kurz die ganze Fläche die Farbe des Zustands. */
.tk[data-tone="in"] { background: color-mix(in srgb, var(--work) 16%, var(--bg)); }
.tk[data-tone="break"] { background: color-mix(in srgb, var(--pause) 30%, var(--bg)); }
.tk[data-tone="out"] { background: color-mix(in srgb, var(--ink) 12%, var(--bg)); }
.tk-head { grid-area: head; display: flex; align-items: center; justify-content: center; gap: 8px 14px; min-width: 0; min-height: 44px; }
.tk-brand { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); cursor: default; -webkit-touch-callout: none; touch-action: manipulation; }
.tk-brand .brand-mark { width: 26px; height: 26px; }
.tk-brand .brand-name { width: 48px; height: 28px; }
.tk-brand.tk-holding { background: color-mix(in srgb, var(--ink) 10%, transparent); transition: background-color 1.5s linear; }
.tk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tk-small-time { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.tk[data-cam="off"] .tk-small-time { display: none; }
.tk-net { flex: none; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); font-size: .88rem; font-weight: 600; }
.tk-net[data-kind="sync"] { border-color: var(--line); background: var(--surface); color: var(--text); }
.tk-net .icon { width: 16px; height: 16px; }

/* Bühne: Uhr, an ihrer Stelle die Kamera, darüber die Bestätigung. */
.tk-stage { grid-area: stage; position: relative; display: grid; min-height: 0; overflow: hidden; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tk-stage > * { grid-area: 1 / 1; min-width: 0; min-height: 0; }
.tk-clockface { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; }
.tk-time { font-family: var(--serif); font-weight: 500; font-size: clamp(4rem, 10vw, 9rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.tk-date { font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--muted); }
.tk-cam { position: relative; display: none; margin: 0; background: var(--surface-2); }
.tk[data-cam="on"] .tk-cam { display: block; }
.tk[data-cam="on"] .tk-clockface { display: none; }
.tk-cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.tk-cam-frame {
  position: absolute; left: 50%; top: 46%; height: min(74%, 380px); max-width: 70%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); pointer-events: none;
  border: 3px solid color-mix(in srgb, var(--tk-on-video) 60%, transparent); border-radius: 46% 46% 42% 42% / 40% 40% 46% 46%;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .16); transition: border-color .2s var(--ease);
}
.tk-cam[data-face="yes"] .tk-cam-frame { border-color: var(--tk-on-video); }
.tk-cam[data-face="no"] .tk-cam-frame { border-style: dashed; border-color: var(--tk-on-video); }
.tk-cam-hint { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 999px; background: var(--tk-shade); color: var(--tk-on-video); font-size: 1.05rem; font-weight: 600; }
.tk-cam-hint:empty { display: none; }
.tk-cam figcaption { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 18px 12px 10px; background: linear-gradient(transparent, var(--tk-shade)); color: var(--tk-on-video); font-size: .82rem; }
.tk-cam figcaption .icon { width: 15px; height: 15px; }

/* Bestätigung: groß mit Häkchen, Aktion und Uhrzeit in der Farbe des Zustands; danach klein mit „Rückgängig“. */
.tk-done { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; background: var(--work); color: var(--on-block); animation: tk-pop .22s var(--ease); }
.tk-done[data-tone="break"] { background: var(--pause); }
.tk-done[data-tone="out"] { background: var(--ink); color: var(--on-ink); }
.tk-done[data-tone="undo"] { background: var(--surface-2); color: var(--text); }
.tk-check { width: clamp(72px, 13vh, 116px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 4px solid currentColor; }
.tk-check .icon { width: 58%; height: 58%; stroke-width: 2.6; }
.tk-done-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tk-done-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.tk-done-name { font-size: 1.12rem; opacity: .86; }
.tk-done-line { max-width: 36ch; font-size: 1rem; }
.tk-done-line.flag { font-weight: 600; }
.tk-undo { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 1.5px solid currentColor; border-radius: 26px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.tk-undo .icon { width: 18px; height: 18px; }
.tk-undo:disabled { opacity: .5; }
.tk-done.tk-done-small { align-self: end; flex-direction: row; justify-content: flex-start; gap: 12px; margin: 12px; padding: 8px 8px 8px 12px; border-radius: 20px; box-shadow: var(--shadow-md); text-align: left; animation: none; }
.tk-done-small .tk-check { width: 36px; border-width: 2px; }
.tk-done-small .tk-done-text { flex: 1; align-items: flex-start; gap: 0; }
.tk-done-small .tk-done-title { font-family: var(--font); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.tk-done-small .tk-done-name { font-size: .86rem; }
.tk-done-small .tk-done-line { display: none; }
.tk-done-small .tk-undo { min-height: 46px; }
@keyframes tk-pop { from { opacity: 0; transform: scale(.98); } }

/* Eingabe: PIN-Feld und Stempel-Knöpfe, mittig in fester Breite. */
.tk-input { grid-area: input; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tk-pin, .tk-stamp { width: min(100%, 520px); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.tk-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.01em; }
.tk-dots { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 24px; }
.tk-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); transition: background-color .08s; }
.tk-dots span.on { background: var(--ink); }
.tk-dots.tk-shake { animation: tk-shake .42s var(--ease); }
.tk-dots.tk-checking span.on { animation: tk-pulse .9s ease-in-out infinite; }
@keyframes tk-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes tk-pulse { 50% { opacity: .35; } }
.tk-msg { min-height: 1.5em; color: var(--neg); font-size: 1.05rem; font-weight: 600; }
.tk-msg.tk-msg-info { color: var(--text); font-weight: 500; }
.tk-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tk-pad button {
  height: var(--tk-key); border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer;
  font-family: var(--serif); font-size: calc(var(--tk-key) * .38); font-variant-numeric: lining-nums tabular-nums; touch-action: manipulation;
  transition: transform .08s var(--ease), background-color .08s var(--ease);
}
.tk-pad button:active { transform: scale(.96); background: color-mix(in srgb, var(--ink) 12%, var(--surface)); }
.tk-pad .ok { background: var(--ink); color: var(--on-ink); font-family: var(--font); font-size: 1.2rem; font-weight: 600; }
.tk-pad .ok:active { background: color-mix(in srgb, var(--ink) 80%, var(--bg)); }
.tk-pad .del { background: transparent; box-shadow: none; color: var(--muted); font-family: var(--font); font-size: 1.6rem; }
.tk-busy .tk-pad { pointer-events: none; }
.tk-badge { align-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 24px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.tk-badge .icon { width: 22px; height: 22px; }
.tk-forgot { color: var(--muted); font-size: .92rem; }
.tk-foot { grid-area: foot; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .88rem; }
.tk-demo { color: var(--text); }

.tk-hello { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -.02em; }
.tk-status { display: inline-flex; align-self: center; align-items: center; gap: 9px; color: var(--muted); font-size: 1.1rem; }
.tk-stamp[data-state="in"] .tk-status::before, .tk-stamp[data-state="break"] .tk-status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--work); }
.tk-stamp[data-state="break"] .tk-status::before { background: var(--pause); }
.tk-facts { margin: 4px 0 0; padding: 2px 18px; border-radius: 22px; background: var(--surface); text-align: left; }
.tk-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; }
.tk-facts > div + div { border-top: 1px solid var(--line); }
.tk-facts dt { color: var(--muted); }
.tk-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tk-facts strong { font-weight: 500; }
.tk-warn { padding: 10px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-text); }
/* Feste Plätze: links Pause (beginnen oder beenden), rechts Gehen; Kommen allein in voller Breite. */
.tk-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.tk-actions.one { grid-template-columns: minmax(0, 1fr); }
.tk-action {
  min-height: calc(var(--tk-key) * 1.15); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px;
  border: 0; border-radius: 24px; font: inherit; font-size: 1.3rem; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: transform .1s var(--ease), opacity .15s;
}
.tk-action .icon { width: 26px; height: 26px; }
.tk-action:active { transform: scale(.98); }
.tk-action:disabled { opacity: .5; cursor: default; }
.tk-action.tk-working:disabled { opacity: 1; }
.tk-action.tk-working span { animation: tk-pulse 1.1s ease-in-out infinite; }
.tk-actions.one .tk-action { min-height: calc(var(--tk-key) * 1.4); font-size: 1.6rem; }
/* Farbe = Bedeutung (design/bildsprache): Kommen Rost, Pause Salbei, Pause beenden Moos, Gehen Tusche. */
.tk-do-in { background: var(--work-text); color: var(--on-ink); }
.tk-do-break_start { background: var(--pause); color: var(--on-block); }
.tk-do-break_end { background: var(--pos); color: var(--on-ink); }
.tk-do-out { background: var(--ink); color: var(--on-ink); }
.tk-do-back { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tk-ask-text { grid-column: 1 / -1; font-size: 1.1rem; }
.tk-other { align-self: center; }
.tk-cancel { align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 200px; min-height: 56px; margin-top: 2px; padding: 0 26px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 500; cursor: pointer; }
/* Countdown erst in den letzten 10 Sekunden: Ring, der abläuft, mit den Sekunden in der Mitte. */
.tk-ring { --left: 1; position: relative; isolation: isolate; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; background: conic-gradient(var(--ink) calc(var(--left) * 360deg), var(--line) 0); }
.tk-ring::before { content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: 50%; background: var(--surface); }

@media (orientation: portrait), (max-width: 720px) {
  .tk { --tk-key: clamp(58px, 8.4vh, 104px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "head" "stage" "input" "foot"; row-gap: 12px; }
  .tk-stage { height: clamp(180px, 29vh, 380px); }
  .tk-time { font-size: clamp(3.6rem, 14vw, 7.5rem); }
  .tk-done { gap: 10px; padding: 16px; }
  .tk-check { width: clamp(52px, 8vh, 96px); border-width: 3px; }
  .tk-done-title { font-size: clamp(2rem, 6.4vw, 3.4rem); }
  .tk-pin, .tk-stamp { width: min(100%, 640px); }
}
@media (max-width: 480px) { .tk-stage { height: clamp(140px, 22vh, 240px); } .tk-hello { font-size: 1.9rem; } }
/* Die große Bestätigung nach dem Stempel braucht oft mehr Platz als Uhr oder Kamera (Hinweiszeile, „Rückgängig“):
   Im Hochformat wächst die Bühne dann mit, statt oben und unten abzuschneiden; am Handy wird sie zudem kompakter. */
@media (orientation: portrait), (max-width: 720px) {
  .tk-stage:has(> .tk-done:not([hidden]):not(.tk-done-small)) { height: auto; min-height: clamp(180px, 29vh, 380px); }
}
@media (max-width: 480px) {
  .tk-stage:has(> .tk-done:not([hidden]):not(.tk-done-small)) { min-height: clamp(140px, 22vh, 240px); }
  .tk-done { gap: 8px; padding: 14px 16px; }
  .tk-check { width: 48px; }
  .tk-done-title { font-size: clamp(1.8rem, 8.5vw, 2.4rem); }
  .tk-done-name { font-size: 1rem; }
  .tk-done-line { font-size: .92rem; }
  .tk-undo { min-height: 46px; }
}
@media (max-height: 560px) and (orientation: landscape) { .tk { --tk-key: 56px; } .tk-title { font-size: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { .tk, .tk-done, .tk-dots, .tk-dots span, .tk-action span, .tk-pad button { animation: none !important; transition: none !important; } }
/* Bilder vom QR-Ausweis-Scanner und Ausweis-Vorschau */
.scan-box { display: flex; justify-content: center; }
.scan-video { width: 100%; max-width: 480px; border-radius: var(--radius); background: #000; transform: scaleX(-1); }
.badge-card { width: 100%; max-width: 428px; height: auto; border-radius: 12px; box-shadow: var(--shadow-sm); }
.term-bar {
  background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 10px 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem;
}
.term-bar-right { display: inline-flex; align-items: center; gap: 12px; opacity: .9; }
.btn-on-ink { background: transparent; border-color: color-mix(in srgb, var(--on-ink) 55%, transparent); color: var(--on-ink); box-shadow: none; }
.btn-on-ink:hover { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }
.setup-name { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
.setup-name span { font-size: .8rem; color: var(--muted); }
.setup-name strong { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; -webkit-user-select: all; user-select: all; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-weight: 600; font-size: 1.2rem; text-align: center; }
.code-box { background: var(--bg); color: var(--text); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.code-fig { font-size: 2.6rem; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; line-height: 1; }
/* Einrichtungscode mit QR-Code zum Koppeln (Einstellungen › Terminals) */
.code-pair { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
.code-qr { flex: none; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.code-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; }
.pw { min-width: 9ch; display: inline-block; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-side { padding: 44px max(32px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--line); }
.auth-pitch h1 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 400; letter-spacing: -.02em; max-width: 16ch; line-height: 1.08; }
.auth-pitch p { margin-top: 14px; max-width: 46ch; color: var(--muted); font-size: 1rem; }
.auth-demo-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 54px; gap: 6px; max-width: 520px; }
.auth-demo-board div { border-radius: 5px; padding: 8px 10px; color: var(--on-block); display: flex; flex-direction: column; justify-content: space-between; }
.auth-demo-board .t { font-weight: 700; font-size: .78rem; }
.auth-demo-board .fig { font-size: 1.9rem; }
.auth-demo-caption { font-size: .76rem; color: var(--muted); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; }
/* Eintrittsfragebogen (öffentliche Seite) und Antworten in der Personalakte */
.qn-card { width: min(640px, 100%); }
.qn-fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; min-width: 0; }
.qn-fieldset legend { font-weight: 600; padding: 0 6px; }
.field.invalid input, .field.invalid select { border-color: var(--neg); }
.field-error { color: var(--neg); font-size: .8rem; font-weight: 600; }
.qn-answers { display: flex; flex-direction: column; gap: 14px; }
.qn-section h3 { font-size: .95rem; margin: 0 0 4px; }
.link-break { word-break: break-all; max-width: 32ch; }
.tabs { display: flex; gap: 2px; border: 1px solid var(--line); padding: 2px; border-radius: var(--radius); }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 4px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button.active { background: var(--ink); color: var(--on-ink); }
.demo-box { border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-left: 6px solid var(--vacation); }
.demo-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-box .row .btn { flex: 1; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.auth-links a { color: var(--muted); }
.auth-standalone { min-height: 100vh; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px 16px; padding-top: calc(28px + env(safe-area-inset-top, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-demo-board { display: none; }
}

/* ==========================================================================
   Feinschliff: Tiefe, Fokus, Bewegung und Abstände, einheitlich über alle Bausteine.
   Die Regeln hier verfeinern die Grundlagen oben und gelten überall; sie ändern keine Bedeutung von Farben.
   ========================================================================== */

/* ---------- Grundlagen ---------- */
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { font-feature-settings: "tnum" 1, "cv11" 1, "ss01" 1; }
::selection { background: color-mix(in srgb, var(--work) 26%, transparent); }
h1 { font-size: 2.15rem; letter-spacing: -.012em; line-height: 1.12; font-variant-numeric: lining-nums tabular-nums; }
h2 { letter-spacing: -.005em; }
.page-head .sub, .sub { max-width: 68ch; line-height: 1.5; }
.page { gap: 20px; }
.page-head { padding-bottom: 6px; }
a { transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
.muted a { color: inherit; }
/* Fokus: ein weicher Ring, überall gleich; Tastaturnutzer sehen ihn, Mausklicks lösen ihn nicht aus. */
/* Fenster sind ausgenommen: Auf Touch-Geräten bekommt beim Öffnen das Fenster selbst den Fokus (kein Feld wird vorgewählt)
   und trüge sonst den Ring statt seines Schattens. */
:focus-visible:where(:not(dialog)) { outline: 0; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); border-radius: var(--radius); }
.btn:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible, .nav a:focus-visible, .nav-group-btn:focus-visible,
.account:focus-visible, .company-block:focus-visible, .search-btn:focus-visible, .palette-item:focus-visible, .ai-chip:focus-visible,
.ai-fab:focus-visible, .swatch-btn:focus-visible, .ac-tile:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
input:focus, select:focus, textarea:focus, .picker-btn:focus-visible, .audit-search:focus {
  outline: 0; border-color: var(--work); box-shadow: var(--ring);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--ring); }
input.palette-input:focus, input.palette-input:focus-visible { box-shadow: none; border-color: transparent; }
/* Feine, zurückhaltende Laufleisten in Paneelen */
.side-scroll, .palette-list, .ai-body, .table-wrap, .dialog-body, .dialog-scroll, .subnav { scrollbar-color: color-mix(in srgb, var(--muted) 35%, transparent) transparent; }
.table-wrap::-webkit-scrollbar, .dialog-body::-webkit-scrollbar, .ai-body::-webkit-scrollbar, .palette-list::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-thumb, .dialog-body::-webkit-scrollbar-thumb, .ai-body::-webkit-scrollbar-thumb, .palette-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box;
}
/* Ladezustand: ruhig, mittig, mit dem Zeichen der Marke */
.boot { min-height: 60vh; display: grid; place-content: center; gap: 12px; color: var(--muted); font-size: .9rem; animation: boot-in .4s var(--ease) both; }
.boot::before { content: ""; width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--work); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes boot-in { from { opacity: 0; } }
/* Seitenwechsel: Inhalt gleitet sanft ein */
/* backwards statt both: Nach dem Einblenden bleibt kein transform stehen. Sonst wird .page zum Bezugsrahmen für
   position:fixed, und Drei-Punkte-Menüs erscheinen verschoben oder außerhalb des Bildschirms. */
.page, .split-content { animation: page-in .22s var(--ease) backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }
/* Neuaufbau nach einer Aktion und Blättern im Zeitraum: ohne Einblendung, sonst flackert es. */
.page.page-quiet, .page-quiet .split-content { animation: none; }
@media (min-width: 600px) { dialog.dialog-wide { width: min(720px, calc(100vw - 32px)); } }

/* Ladebalken oben: erscheint erst, wenn etwas länger als einen Augenblick dauert. */
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 2000; pointer-events: none; opacity: 0; overflow: hidden; transition: opacity .25s ease; }
html.is-loading .loadbar { opacity: 1; transition-duration: .1s; }
.loadbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; border-radius: 2px; background: var(--work); animation: loadbar 1.15s var(--ease) infinite; }
@keyframes loadbar { to { left: 100%; } }

/* Platzhalter beim Laden: Form der Seite in ruhigem Grau statt weißer Fläche. */
.skeleton { display: flex; flex-direction: column; gap: 16px; animation: boot-in .3s var(--ease) both; }
.sk { display: block; position: relative; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--muted) 17%, transparent); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: sk-shine 1.4s ease-in-out infinite; }
@keyframes sk-shine { to { transform: translateX(100%); } }
.sk-head { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 6px; }
.sk-title { width: 240px; max-width: 60%; height: 28px; }
.sk-sub { width: 360px; max-width: 80%; height: 13px; }
.sk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.sk-tile, .sk-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.sk-tile { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sk-label { width: 50%; height: 11px; }
.sk-value { width: 36%; height: 24px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.sk-row:first-child { border-top: 0; }
.sk-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; }
.sk-line { flex: 1; max-width: 320px; height: 12px; }
.sk-short { width: 64px; height: 12px; margin-left: auto; }

/* Ohne Netz: ruhige Karte mit neuem Versuch statt Fehlertext. */
.offline-card { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.offline-card > div { flex: 1; min-width: 200px; }
.offline-card p { margin: 2px 0 0; }
.offline-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.offline-icon .icon { width: 22px; height: 22px; }

/* Klickbare Zeilen sind auch per Tastatur erreichbar (Tab, dann Enter). */
.table tr.clickable:focus-visible { outline: none; }
.table tr.clickable:focus-visible td { background: var(--surface-2); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--focus) 45%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--focus) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .loadbar::before, .sk::after { animation: none; } }

/* ---------- Seitenleiste ---------- */
.nav a, .nav-group-btn, .subnav a, .account, .company-block, .search-btn, .icon-btn, .palette-item, .account-menu a, .account-menu button, .company-menu a, .company-menu button {
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav a, .nav-group-btn { padding-block: 7px; }
.nav a.active, .subnav a.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.nav a .icon, .nav-group-btn .icon { transition: color var(--dur) var(--ease); }
.nav a:hover .icon, .nav-group-btn:hover .icon { color: var(--text); }
.nav-sep { padding-top: 18px; font-size: .66rem; letter-spacing: .12em; color: color-mix(in srgb, var(--muted) 85%, transparent); }
.side-top { padding-bottom: 12px; }
/* Betrieb und Suche: ruhige, rahmenlose Zeilen; die Suche liegt als helles Feld darunter. */
.company-block { background: transparent; border-color: transparent; padding: 7px 8px; font-weight: 600; }
.company-block:hover { background: var(--surface); border-color: color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow-sm); }
.company-block.static:hover { background: transparent; border-color: transparent; box-shadow: none; }
.company-dot { border-radius: 4px; }
.search-btn { background: var(--surface); border-color: color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.search-btn:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.account:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.avatar { border-radius: 50%; background: var(--surface-2); border: 0; }
.account-menu, .company-menu, .picker-pop { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.account-menu { animation: pop-up .16s var(--ease); }
.company-menu { animation: pop-in .16s var(--ease); }
@keyframes pop-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.badge { font-weight: 600; min-width: 19px; height: 19px; font-size: .7rem; }
.side-notice { box-shadow: none; }
kbd { border-bottom-width: 1.5px; font-weight: 500; }

/* ---------- Knöpfe ---------- */
.btn {
  min-height: 36px; padding: 7px 14px; font-weight: 500; letter-spacing: 0;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform .1s var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); background: var(--surface-2); }
.btn:active { transform: scale(.985); }
.btn:disabled { transform: none; }
.btn-primary, .btn-in, .btn-out { box-shadow: var(--shadow-sm); }
.btn-primary:hover, .btn-in:hover, .btn-out:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 86%, var(--page)); border-color: color-mix(in srgb, var(--ink) 86%, var(--page)); }
.btn-primary:disabled { opacity: .45; box-shadow: none; }
.btn-danger:hover { background: color-mix(in srgb, var(--neg) 9%, transparent); border-color: color-mix(in srgb, var(--neg) 45%, var(--line)); }
.btn-ok:hover { background: color-mix(in srgb, var(--pos) 9%, transparent); border-color: color-mix(in srgb, var(--pos) 45%, var(--line)); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: transparent; background: var(--surface-2); }
.btn-sm { min-height: 30px; padding: 4px 10px; }
.btn-lg { min-height: 48px; }
.icon-btn { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform .1s var(--ease); }
.icon-btn:active { transform: scale(.94); }
.seg { background: var(--surface); }
.seg button { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.seg button.active { box-shadow: var(--shadow-sm); }
.month-nav { background: var(--surface); }
.month-nav .btn:hover { background: var(--surface-2); }
.tabs { background: var(--surface); }
.tabs button { transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }

/* ---------- Felder ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea {
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
:is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea):not(.palette-input):hover {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--line));
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.field > span { font-weight: 500; color: var(--text); }
.field .hint, .hrow-control > .hint { line-height: 1.4; }
.hrow-label { color: var(--text); }
.picker-btn { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.picker-btn:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.radio-card { transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.radio-card:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.radio-card:has(input:checked) { background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 0 0 1px var(--ink); }
.days-pick label { transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.days-pick label:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.days-pick label:has(input:focus-visible) { outline: 0; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
.check-row input, .check input { accent-color: var(--ink); }
.form-error { border-radius: 0 var(--radius) var(--radius) 0; background: color-mix(in srgb, var(--neg) 6%, transparent); padding-block: 8px; animation: pop-up .16s var(--ease); }

/* ---------- Flächen und Kennzahlen ---------- */
.card, .stat, .audit-seal { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--line) 85%, transparent); }
.stat { min-height: 110px; padding: 15px 18px 14px; gap: 10px; }
.stat .label { font-size: .84rem; }
.stat .value .fig, .stat .value > span { font-size: 1.95rem; font-weight: 500; letter-spacing: -.035em; }
.stat .hint { font-size: .78rem; }
.stats { gap: 12px; }
.list-section { margin-top: 10px; gap: 8px; }
.list-section-head h2 { font-size: 1.05rem; }
.list-section-head .meta { line-height: 1.4; }
.notice { box-shadow: none; line-height: 1.45; }
.notice.soft { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.empty { padding: 28px 0; line-height: 1.5; }
.list-section .empty { padding-block: 18px; }
.state-block { border-radius: var(--radius-xl); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); }
.state-block.st-in, .state-block.st-break { box-shadow: none; }
.state-block .st-actions .btn { min-height: 52px; }
.setup-name, .code-box { border-radius: var(--radius-lg); }

/* ---------- Tabellen ---------- */
table.table-plain th { font-size: .8rem; letter-spacing: .01em; padding: 10px 10px 9px; }
table.table-plain td { padding: 12px 10px; }
table.table tbody tr, table.table-plain tbody tr { transition: background-color var(--dur) var(--ease); }
.table tr.clickable:hover td, table.table-plain tbody tr.clickable:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
table.payroll tr.total-row td { border-top-color: color-mix(in srgb, var(--text) 60%, var(--line)); font-weight: 600; }
.roster td.cell.can-edit, .wk-cell { transition: background-color var(--dur) var(--ease); }
.shift { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.can-edit .shift:hover { box-shadow: var(--shadow-sm); }
.ac-tile { border-radius: 6px; }
.tl-block { transition: filter var(--dur) var(--ease); }
.status.st-pending { padding-block: 3px; }
.chip { line-height: 1.4; }
.audit-area { padding-block: 2px; }

/* ---------- Dialoge, Paletten, Toasts ---------- */
dialog { border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
dialog[open] { animation: dialog-in .22s var(--ease); }
dialog::backdrop { background: rgba(31, 30, 29, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (prefers-color-scheme: dark) { dialog::backdrop { background: rgba(0, 0, 0, .6); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog-body { padding: 24px; gap: 18px; }
.dialog-body h2 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; letter-spacing: -.015em; }
.dialog-actions { padding-top: 4px; }
dialog.palette { border-radius: var(--radius-xl); }
.palette-search { padding: 14px 18px; }
.palette-list { padding: 8px; }
.palette-item { padding: 9px 10px; }
.palette-item.sel { box-shadow: inset 2px 0 0 var(--work); }
.toast { border-radius: 10px; box-shadow: var(--shadow-lg); padding: 11px 16px; animation: toast-in .22s var(--ease); line-height: 1.4; }
@keyframes toast-in { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* ---------- KI-Assistent ---------- */
.ai-fab { box-shadow: var(--shadow-lg); }
.ai-panel { border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }
.ai-msg.user .bubble { border-radius: 16px 16px 4px 16px; }
textarea.ai-text { border-radius: 14px; }
.ai-send { border-radius: 14px; transition: opacity var(--dur) var(--ease), transform .1s var(--ease); }
.ai-send:not(:disabled):active { transform: scale(.94); }
.ai-actions { box-shadow: var(--shadow-sm); }
.ai-chip:active { transform: scale(.98); }

/* ---------- Anmeldung ---------- */
.auth-card { gap: 16px; }
.demo-box { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* ---------- Geführte Einrichtung: eine Frage pro Seite, große Felder, viel Ruhe ---------- */
.ob-shell { min-height: 100vh; background: var(--bg); }
.ob-main { padding: 0 max(16px, env(safe-area-inset-left, 0px)) 64px; }
.ob { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; font-size: 1.04rem; }
.ob-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 0 6px; }
.ob-progress { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 6px; }
.ob-progress li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--muted); font-size: .86rem; font-weight: 500; }
.ob-progress li.current { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ob-progress li.done { color: var(--text); }
.ob-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ob-progress li.current .ob-dot { background: var(--ink); color: var(--on-ink); }
.ob-progress li.done .ob-dot { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.ob-dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.ob-card-main { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-sm); animation: page-in .22s var(--ease) both; }
.ob-card-main h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.ob-why { color: var(--muted); line-height: 1.55; max-width: 60ch; }
.ob-form { display: flex; flex-direction: column; gap: 18px; }
.ob .field > span { font-size: 1rem; font-weight: 600; }
.ob .field .hint { font-size: .88rem; }
.ob input[type=text], .ob input[type=email], .ob input[type=number], .ob select { min-height: 48px; font-size: 1.05rem; padding-inline: 14px; }
.ob .radio-card.ob-radio { padding: 14px 16px; gap: 12px; align-items: flex-start; }
.ob .radio-card.ob-radio input { width: 18px; height: 18px; margin: 2px 0 0; }
.ob .radio-card.ob-radio strong { font-size: 1.02rem; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 6px; }
.ob-actions .btn-lg { min-height: 52px; padding-inline: 26px; font-size: 1.05rem; }
.ob-back { text-align: center; }
.ob-back a { color: var(--muted); text-decoration: none; }
.ob-back a:hover { color: var(--text); text-decoration: underline; }
/* Team: Assistent oben, darunter Zeilen zum Eintippen */
.ob-ai { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--work) 8%, transparent); }
.ob-ai .ai-mark { width: 36px; height: 36px; }
.ob-ai strong { display: block; margin-bottom: 2px; }
.ob-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.ob-or::before, .ob-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ob-rows { display: flex; flex-direction: column; gap: 8px; }
.ob-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr) auto; gap: 8px; align-items: center; }
.ob-row-head { font-size: .78rem; color: var(--muted); font-weight: 600; padding: 0 4px; }
.ob-unit { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ob-unit input { flex: 1; min-width: 0; }
.ob-row .check { white-space: nowrap; font-size: .9rem; }
/* Terminal-Code */
.ob-code { background: var(--bg); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ob-code .code-fig { font-size: 2.4rem; letter-spacing: .08em; }
/* Abschluss */
.ob-done { display: flex; flex-direction: column; }
.ob-done-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ob-done-line .status::before { width: 9px; height: 9px; }
.ob-done-line.ok .status::before { background: var(--pos); }
.ob-done-line a { white-space: nowrap; }
/* Karte „Einrichtung fortsetzen“ auf der Übersicht */
.ob-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); box-shadow: var(--shadow-sm); }
.ob-card .ob-card-orb { width: 30px; height: 30px; margin: 0 2px; }
.ob-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 720px) {
  .ob-head { grid-template-columns: 1fr auto; }
  .ob-progress { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .ob-progress li .ob-label { display: none; }
  .ob-progress li.current .ob-label { display: inline; }
  .ob-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ob-row-head { display: none; }
  .ob-ai { grid-template-columns: auto minmax(0, 1fr); }
  .ob-ai .btn { grid-column: 2; justify-self: start; }
  /* Schmal: Kugel, Text und Schließen oben (Schließen rechts wie überall), der Knopf darunter. */
  .ob-card { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 10px; align-items: start; }
  .ob-card .ob-card-orb { grid-column: 1; grid-row: 1; width: 26px; height: 26px; margin: 2px 0 0; }
  .ob-card .icon-btn { grid-column: 3; grid-row: 1; margin: -6px -8px 0 0; }
  .ob-card-text { grid-column: 2; grid-row: 1; }
  .ob-card .btn { grid-column: 2; grid-row: 2; justify-self: start; }
}

/* ---------- Übersicht: Posteingang ---------- */
.inbox { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.inbox-item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 4px 12px 2px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background-color var(--dur) var(--ease);
}
.inbox-item:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); text-decoration: none; }
.inbox-item .chev { color: var(--muted); transform: rotate(-90deg); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.inbox-item:hover .chev { color: var(--text); transform: rotate(-90deg) translateY(2px); }
.inbox-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.inbox-icon .icon { width: 17px; height: 17px; }
.inbox-item.tone-warn .inbox-icon { background: var(--warn-bg); color: var(--warn-text); }
.inbox-item.tone-bad .inbox-icon { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.inbox-item.tone-info .inbox-icon { background: color-mix(in srgb, var(--work) 14%, transparent); color: var(--work-text); }
.inbox-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.inbox-text strong { font-weight: 500; }
.grid-2 > .list-section { margin-top: 0; }
.grid-2 .list-section-head { flex-wrap: wrap; row-gap: 4px; }

/* ---------- Handy und Tablet ---------- */
@media (max-width: 900px) {
  .page { gap: 16px; }
  .inbox-item { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; }
  .inbox-icon { width: 32px; height: 32px; }
  /* Abschnittstitel bleiben auf einer Zeile, der Hinweistext rutscht darunter. */
  .list-section-head { flex-wrap: wrap; row-gap: 2px; }
  .list-section-head h2 { white-space: nowrap; }
  .list-section-head .meta { flex-basis: 100%; margin-left: 0; order: 9; }
  h1 { font-size: 1.6rem; }
  .icon-btn { width: 40px; height: 40px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 32px; }
  .stats { gap: 8px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .stat { padding: 14px; min-height: 100px; }
  .check-item { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 12px; }
  .check-item .status { justify-self: start; }
  /* Dialoge gleiten als Blatt von unten herein, mit sicherem Abstand zum Rand */
  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border: 0; max-height: calc(100dvh - 24px); }
  dialog.palette { margin: 10vh auto auto; width: calc(100vw - 24px); border-radius: var(--radius-xl); }
  dialog[open] { animation: sheet-in .26s var(--ease); }
  .dialog-body { padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 24px); }
  .dialog-actions .btn { flex: 1 1 auto; }
  .dialog-actions .spacer { display: none; }
  .toasts { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); align-items: center; }
  .toast { max-width: 100%; width: 100%; text-align: center; }
  .viewbar .picker-btn { width: 100%; }
  /* Personenwahl mit langem Namen: Name gekürzt, die Leiste bleibt so breit wie der Bildschirm. */
  .viewbar .picker { min-width: 0; max-width: 100%; }
  /* Tabellen laufen bis an den Bildschirmrand (16px Seitenrand), nicht darüber hinaus. */
  .table-wrap { margin-inline: -16px; padding-inline: 16px; }
  /* Monatswahl und Knöpfe brechen um, statt die Seite breiter als den Bildschirm zu machen. */
  .viewbar .period { max-width: 100%; min-width: 0; }
  .viewbar .month-nav { min-width: 0; }
  .viewbar .month-nav .label { width: auto; min-width: 0; flex: 1; }
  .viewbar-actions { justify-content: flex-start; margin-left: 0; }
  .viewbar-actions .btn { white-space: normal; text-align: left; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .viewbar .period { width: 100%; }
  .viewbar .month-nav { flex: 1; }
}
/* iPhone zoomt beim Antippen in jedes Feld unter 16px hinein und die Seite verrutscht. Auf Touch-Geräten daher 16px. */
@media (max-width: 900px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea,
  .cell-input, .cell-select, .audit-search, textarea.ai-text { font-size: 16px; }
  /* Mit 16px passt der Platzhalter im Assistenten nicht mehr in eine Zeile: abschneiden statt umbrechen. */
  textarea.ai-text::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Mobile Browser: 100vh reicht unter die Adressleiste. dvh ist die tatsächlich sichtbare Höhe. */
@supports (height: 100dvh) {
  .shell, .auth, .auth-standalone, .term, .lp, .ap, .ob-shell { min-height: 100dvh; }
  /* Seitenleiste und zweite Leiste: so hoch wie der sichtbare Bereich (Safari auf dem iPad blendet Leisten ein,
     100vh reichte darunter, unten fehlten Einstellungen, Hilfe und Konto). */
  @media (min-width: 901px) { .sidebar, .subnav { height: 100dvh; } }
  .ai-panel { height: min(640px, calc(100dvh - 110px)); }
  .dialog-body { max-height: calc(100dvh - 80px); }
  @media (max-width: 560px) { .ai-panel { height: calc(100dvh - 96px); } }
  @media (max-width: 900px) { .dialog-body { max-height: calc(100dvh - 24px); } }
}
@keyframes sheet-in { from { transform: translateY(16px); opacity: 0; } }
@media (hover: none) {
  .btn:hover { background: var(--surface); border-color: var(--line); }
  .btn-primary:hover, .btn-in:hover, .btn-out:hover { background: var(--ink); border-color: var(--ink); }
}

/* ---------- Statusleiste über dem Inhalt (iPhone-/iPad-App, PWA mit viewport-fit=cover) ----------
   Die App-Oberfläche (.topbar, body::before) kennt die Safe Area schon. Öffentliche Seiten, Anmeldeseiten, das
   Vollbild-Menü und die Seitenleiste fangen hier ebenfalls unter der Statusleiste an; im Browser ist der Wert 0. */
.lp, .ap { padding-top: env(safe-area-inset-top, 0px); }
.lp-head { top: env(safe-area-inset-top, 0px); }
.site-menu { padding-top: env(safe-area-inset-top, 0px); }
.sidebar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }


/* ---------- Drucken ---------- */
@media print {
  .sidebar, .topbar, .ai-widget, .toasts, .demo-banner, .toolbar, .viewbar-actions, .list-section-actions, .table .actions, .row-menu { display: none !important; }
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .main, .split-content { padding: 0; }
  .page, .split-content { animation: none; }
  .card, .stat { box-shadow: none; border-color: #ccc; }
  body { font-size: 12px; }
  a { color: inherit; text-decoration: none; }
}

/* ==========================================================================
   Öffentliche Seiten: Startseite (lp) und Anmeldeseiten (ap)
   ========================================================================== */
/* Öffentliche Seiten stehen auf dem warmen Beige der Seitenleiste; Karten und Felder bleiben weiß. */
.lp { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; overflow-x: hidden; overflow-x: clip; }
.lp-head {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px max(24px, env(safe-area-inset-right, 0px)) 14px max(24px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
/* Bildfläche: eigenes Foto (/hero.jpg) über einer gezeichneten Nordsee-Stimmung als Rückfall; Himmel, Watt, Sand. */
.lp-photo {
  position: relative; max-width: 1180px; width: calc(100% - 2 * max(24px, env(safe-area-inset-left, 0px))); margin: 0 auto;
  height: clamp(300px, 52vh, 560px); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md);
  background-color: #cfd5d3;
  background-image: url("/hero.jpg"), linear-gradient(180deg, #d9dfe2 0%, #c9d2d6 34%, #b7bfbb 46%, #d8cfb8 58%, #e2d6bb 100%);
  background-size: cover, cover; background-position: center, center;
}
/* Feines Korn, damit die gezeichnete Fläche nicht glatt wirkt; über dem Foto kaum sichtbar. */
.lp-photo::before {
  content: ""; position: absolute; inset: 0; opacity: .28; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .25 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Weicher Verlauf unten, damit Karte und Bildunterschrift immer lesbar sind. */
.lp-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 55%; background: linear-gradient(to top, rgba(31, 30, 29, .28), transparent); pointer-events: none; }
.lp-photo-card {
  position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 1; max-width: 420px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm);
}
.lp-photo-card p { line-height: 1.5; color: var(--text); }
.lp-kicker { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--work-text); }
.lp-photo-caption { position: absolute; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 1; font-size: .78rem; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.lp-band { margin-top: 28px; }
@media (prefers-color-scheme: dark) {
  .lp-photo { background-color: #3a3f40; background-image: url("/hero.jpg"), linear-gradient(180deg, #41484c 0%, #3a4246 34%, #383d3a 46%, #4a443a 58%, #4f473a 100%); }
}
.lp-pills { display: flex; gap: 6px; }
/* Pillen fügen sich in die Fläche ein: eine Stufe dunkler als das Beige, kein Rand. */
.pill {
  border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--text); border-radius: 999px; padding: 8px 16px;
  font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: background-color var(--dur) var(--ease);
}
.pill:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); text-decoration: none; }
.lp-icon-btn { width: 38px; height: 38px; color: var(--text); background: transparent; }
.lp-icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.lp-menu-btn { background: color-mix(in srgb, var(--ink) 6%, transparent); }
/* Vollbild-Menü: dunkel, links die Anmeldung, rechts die Seiten groß */
.site-menu {
  position: fixed; inset: 0; z-index: 95; background: #1f1e1d; color: #f5f4ee; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.site-menu.open { opacity: 1; transform: none; }
body.menu-open { overflow: hidden; }
.site-menu-close { position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); right: max(20px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; color: #f5f4ee; background: rgba(245, 244, 238, .1); z-index: 1; }
.site-menu-close:hover { background: rgba(245, 244, 238, .18); color: #fff; }
.site-menu-inner {
  min-height: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px;
  padding: clamp(56px, 10vh, 96px) max(24px, env(safe-area-inset-right, 0px)) 48px max(24px, env(safe-area-inset-left, 0px));
}
.site-menu .brand { color: #f5f4ee; }
.site-menu-left { display: flex; flex-direction: column; gap: 32px; }
.site-menu-login { max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.site-menu-login h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; }
.site-menu-who { margin-top: -8px; font-size: .95rem; }
.site-menu-login .form { background: rgba(245, 244, 238, .06); border: 1px solid rgba(245, 244, 238, .14); border-radius: var(--radius-xl); padding: 20px; }
.site-menu-login .field > span { color: rgba(245, 244, 238, .8); }
.site-menu-login input { background: #2a2927; border-color: rgba(245, 244, 238, .18); color: #f5f4ee; }
.site-menu-login input:focus { border-color: var(--focus); }
.site-menu-login .btn-primary { background: #f5f4ee; border-color: #f5f4ee; color: #1f1e1d; }
.site-menu-login .btn-primary:hover { background: #fff; border-color: #fff; }
.site-menu-login .ap-links a, .site-menu-login p a { color: rgba(245, 244, 238, .8); }
.site-menu-login p { color: rgba(245, 244, 238, .7); }
.site-menu-steps { display: flex; flex-direction: column; gap: 12px; }
.site-menu-login .ent-sso { background: rgba(245, 244, 238, .1); color: #f5f4ee; }
.site-menu-login .ent-sso:hover { background: rgba(245, 244, 238, .18); color: #fff; }
.site-menu-login .ent-or { color: rgba(245, 244, 238, .6); }
.site-menu-login .ent-mail { color: #f5f4ee; border-bottom-color: rgba(245, 244, 238, .18); }
.site-menu-login .btn-link { color: rgba(245, 244, 238, .8); }
.site-menu-login .form-error { color: #ff9b84; border-left-color: #ff9b84; background: rgba(255, 127, 92, .1); }
.site-menu-right { display: flex; flex-direction: column; gap: 36px; }
.site-menu-links { display: flex; flex-direction: column; gap: 6px; }
.site-menu-link { font-family: var(--font); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: rgba(245, 244, 238, .55); text-decoration: none; transition: color var(--dur) var(--ease); }
.site-menu-link:hover, .site-menu-link.current { color: #f5f4ee; text-decoration: none; }
.site-menu .lp-foot-groups { border-top: 1px solid rgba(245, 244, 238, .18); }
@media (max-width: 900px) {
  .site-menu-inner { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 36px; padding: 72px 16px 40px; }
  .site-menu-left { order: 2; }
  .site-menu-right { order: 1; }
}
.lp-brand { justify-self: center; }
.lp-brand .brand-mark { width: 30px; height: 30px; }
.lp-brand .brand-name { width: 54px; height: 32px; }
.lp-actions { display: flex; gap: 8px; justify-self: end; }
.lp-hero { max-width: 1180px; width: 100%; margin: 0 auto; padding: clamp(40px, 8vh, 96px) max(24px, env(safe-area-inset-left, 0px)) clamp(32px, 6vh, 64px); }
.lp-hero { position: relative; }
.lp-hero h1 {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4.2vw, 3.6rem); line-height: 1.12; letter-spacing: -.02em;
  max-width: 27ch; text-wrap: pretty; color: var(--muted);
}
/* Kopfleiste der öffentlichen Seiten: Anmelden als ruhiger, Kostenlos testen als dunkler Knopf. */
.lp-actions { align-items: center; }
.pill.lp-login, .pill.lp-try { white-space: nowrap; }
.pill.lp-try { background: var(--ink); color: var(--on-ink); }
.pill.lp-try:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
@media (max-width: 1100px) { .pill.lp-login { display: none; } }
@media (max-width: 900px) { .pill.lp-login { display: inline-flex; } }
@media (max-width: 520px) { .pill.lp-login { display: none; } .pill.lp-try { padding-inline: 12px; font-size: .84rem; } .lp-actions { gap: 4px; } }
/* Karten der Startseite: oben der bekannte Satz aus dem Alltag, darunter die Antwort. */
.lp-pain-head { margin-bottom: clamp(24px, 4vh, 40px); }
.lp-section .lp-pain-head h2 { font-family: var(--font); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 14px; text-wrap: balance; }
.lp-pain-head p { max-width: 38em; font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.4; color: var(--muted); }
.lp-pain { background: color-mix(in srgb, var(--ink) 4.5%, var(--bg)); border-radius: 10px; padding: clamp(22px, 2.4vw, 34px); display: flex; flex-direction: column; }
.lp-pain-area { font-size: .84rem; font-weight: 600; color: var(--work-text); }
.lp-pain-quote { margin: 14px 0 26px; min-height: 3.6em; font-family: var(--serif); font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.18; letter-spacing: -.012em; color: var(--text); text-wrap: balance; }
.lp-pain h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin-bottom: 8px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.lp-pain-text { color: var(--muted); line-height: 1.5; font-size: .96rem; }
.lp-pain-points { list-style: none; margin: auto 0 0; padding: 20px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: .92rem; font-weight: 500; }
.lp-pain-points li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.35; }
.lp-pain-points .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--work-text); }
.lp-pain-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: clamp(22px, 3vh, 32px); color: var(--muted); font-size: .95rem; }
.lp-pain-cta .btn { border-radius: 10px; }
/* Philosophie: große Aussagen untereinander, jede mit feiner Linie. */
.lp-beliefs { max-width: 860px; padding-bottom: clamp(48px, 8vh, 96px); }
.lp-beliefs h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.02em; line-height: 1.08; }
.lp-section .lp-beliefs-title { margin: clamp(32px, 6vh, 64px) 0 clamp(14px, 2vh, 22px); font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -.02em; scroll-margin-top: 90px; }
.lp-belief h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 600; letter-spacing: -.015em; margin: 0 0 8px; }
.lp-belief { border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); padding: 24px 0 32px; }
.lp-belief p { color: var(--muted); font-size: 1.08rem; line-height: 1.55; max-width: 40em; }
/* Kontakt: öffentlich zweispaltig, im Konto schmal. Das Feld für Bots liegt außerhalb des Bildes. */
.lp-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding-bottom: clamp(48px, 8vh, 96px); }
.lp-contact-side h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5.4vw, 4.6rem); letter-spacing: -.025em; line-height: 1.04; margin: 0 0 18px; }
.lp-contact-side .lp-lead { max-width: 30em; }
.lp-contact-mail { margin-top: 16px; color: var(--muted); }
.lp-contact-art { margin-top: clamp(22px, 4vh, 40px); max-width: 360px; }
.lp-contact-card.ent-card { width: 100%; margin-top: 0; box-sizing: border-box; }
.contact-in-app { max-width: 620px; }
.contact-form textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 130px; font: inherit; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { padding: 12px 0; }
.contact-done h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.015em; }
.contact-done p { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 900px) { .lp-contact { grid-template-columns: minmax(0, 1fr); } .lp-contact-art { display: none; } }
/* Code aus der E-Mail. */
.mail-code-hint { font-size: .92rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.mail-code-hint strong { color: var(--text); font-weight: 500; }
.site-menu-login .mail-code-hint strong { color: #f5f4ee; }
.mail-code-input { width: 100%; box-sizing: border-box; text-align: center; font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 1.7rem; font-weight: 600; letter-spacing: .28em; padding: 12px 8px 12px calc(8px + .28em); }
/* Knöpfe für Google und Apple im Eingang. */
.ent-sso { width: 100%; border: 0; font: inherit; cursor: pointer; color: inherit; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--text); font-weight: 500; font-size: .95rem; text-decoration: none; }
.ent-sso:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); text-decoration: none; }
.ent-sso svg { width: 18px; height: 18px; flex: none; }
.ent-or { text-align: center; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Eingang (Anmelden, Registrieren, Terminal): links Überschrift und Karte, rechts ein Bild. */
.ent { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--page); }
/* Terminal anmelden oder einrichten: ohne Bild, die Karte mittig (das Tablet braucht die Fläche nicht für Werbung). */
.ent.ent-solo { grid-template-columns: minmax(0, 1fr); }
.ent-card .tk-choice { padding: 16px; }
.ent-left { display: flex; flex-direction: column; min-width: 0; padding: 22px clamp(20px, 4vw, 64px) 14px; }
.ent-head .brand .brand-mark { width: 30px; height: 30px; }
.ent-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 0; }
.ent-main h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 3.3vw, 3.3rem); line-height: 1.12; letter-spacing: -.02em; text-align: center; max-width: 15em; text-wrap: balance; }
.ent-sub { margin-top: 12px; font-family: var(--serif); font-size: 1.1rem; text-align: center; color: var(--text); }
.ent-card { width: min(100%, 448px); margin-top: 28px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 8px 28px rgba(31, 30, 29, .06); display: flex; flex-direction: column; gap: 14px; }
.ent-card .form { gap: 14px; }
.ent-card input, .ent-card select { border-radius: 10px; }
.ent-card .btn-lg { width: 100%; border-radius: 10px; }
.ent-part { display: flex; flex-direction: column; gap: 14px; }
.ent-part[hidden] { display: none; }
.ent-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.ent-row-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ent-step { font-size: .84rem; font-weight: 600; color: var(--muted); }
.ent-mail { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ent-mail span { overflow-wrap: anywhere; font-weight: 500; }
.ent-note { font-size: .82rem; line-height: 1.45; text-align: center; color: var(--muted); }
.ent-note[hidden] { display: none; }
.ent-note-below { max-width: 400px; margin-top: 16px; }
.ent-below { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 16px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--text); font-size: .92rem; font-weight: 500; text-decoration: none; }
.ent-below:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); text-decoration: none; }
.ent-below .icon { width: 16px; height: 16px; }
.ent-foot { display: flex; justify-content: center; gap: 16px; color: var(--muted); }
.ent-foot a { color: var(--muted); }
.ent-art { position: sticky; top: 0; height: 100vh; height: 100dvh; box-sizing: border-box; padding: clamp(16px, 2.6vw, 40px) clamp(16px, 4vw, 72px) clamp(16px, 2.6vw, 40px) 0; display: flex; align-items: center; justify-content: flex-start; }
/* Das Video ist quer gedreht: Der Ausschnitt hält die Person in der Mitte und lässt die Speisekarte rechts weg. */
.ent-art video { height: 100%; max-height: 800px; aspect-ratio: 4 / 5; width: auto; max-width: 100%; min-height: 0; object-fit: cover; object-position: 44% 50%; border-radius: 18px; background: #4a3324; display: block; }
@media (max-width: 900px) {
  .ent { grid-template-columns: minmax(0, 1fr); }
  .ent-art { display: none; }
}
@media (max-width: 480px) {
  .ent-card { padding: 20px 18px; border-radius: 20px; }
}
/* Startseite: breiter Satzspiegel, ruhiger Aufmacher, ein Bild in stiller Fläche, Zeichnungen auf Farbflächen. */
.lp-wide, .lp-section.lp-wide { max-width: none; padding-inline: clamp(20px, 5.5vw, 104px); }
.lp-hero.lp-wide { padding-top: clamp(28px, 5vh, 56px); padding-bottom: clamp(24px, 4vh, 40px); }
.lp-hero.lp-wide h1 { max-width: none; font-size: clamp(1.7rem, 3vw, 3.2rem); line-height: 1.22; letter-spacing: -.012em; color: var(--text); }
/* Bilderfolge: --hs ist das große Bild; das Mosaik (14 × 8 Felder, das Bild belegt die 2 × 2 in der Mitte) liegt zentriert dahinter. */
.lp-story { --hs: min(600px, 78vw, 66vh); --cap: 132px; --pad: clamp(24px, 4.5vh, 56px); --shift: calc((var(--cap) + 12px) / 2);
  --zoom-time: 1.9s; --zoom-ease: cubic-bezier(.72, 0, .14, 1);
  position: relative; overflow: hidden; height: calc(var(--hs) + var(--cap) + 12px + var(--pad) * 2); margin-inline: clamp(8px, 1.6vw, 28px); background: color-mix(in srgb, var(--ink) 3%, var(--bg)); border-radius: 6px; }
.mos-hero { position: absolute; left: 50%; top: var(--pad); width: var(--hs); height: var(--hs); margin-left: calc(var(--hs) / -2); transition: transform var(--zoom-time) var(--zoom-ease); }
.mos-hero img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.mos-hero img.pop { animation: mos-pop .3s cubic-bezier(.2, .85, .25, 1) both; }
@keyframes mos-pop { from { opacity: 0; transform: scale(.965); } to { opacity: 1; transform: none; } }
/* In voller Größe wäre das Mosaik eine riesige Ebene: Es liegt in Endgröße vor und startet doppelt so groß, deckungsgleich zum Bild. */
.mos-rest { position: absolute; left: 50%; top: calc(var(--pad) + var(--hs) / 2); width: calc(var(--hs) * 3.6429); max-width: none; height: auto; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(2); transition: transform var(--zoom-time) var(--zoom-ease), opacity .9s ease .3s; }
.lp-story:not(.settled) .mos-hero, .lp-story:not(.settled) .mos-rest { will-change: transform; }
.lp-story.zoomed .mos-hero { transform: translateY(var(--shift)) scale(.5); }
.lp-story.zoomed .mos-rest { opacity: 1; transform: translate(-50%, -50%) translateY(var(--shift)) scale(1); }
.mos-cap { position: absolute; left: 50%; top: calc(var(--pad) + var(--hs) + 12px); width: var(--hs); height: var(--cap); margin-left: calc(var(--hs) / -2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-sizing: border-box; padding: 16px 22px; overflow: hidden; transition: opacity .22s ease, transform .4s ease; }
.lp-story.zoomed .mos-cap { opacity: 0; transform: translateY(16px); pointer-events: none; }
.mos-cap-in { animation: mos-cap .25s ease both; }
@keyframes mos-cap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mos-kicker { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 4px; }
.mos-cap h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.25rem, 2.6vw, 2.05rem); line-height: 1.14; letter-spacing: -.015em; text-wrap: balance; }
.lp-story.no-anim *, .lp-story.no-anim { transition: none !important; animation: none !important; }
.lp-story.paused .mos-hero img, .lp-story.paused .mos-cap-in { animation-play-state: paused; }
.lp-band-btn.mos-btn { position: absolute; right: 16px; bottom: 16px; z-index: 2; }
@media (max-width: 520px) { .lp-story { --cap: 118px; } .mos-cap { padding: 12px 14px; } .mos-kicker { font-size: .82rem; } }
.ink-art { display: block; width: 100%; height: 100%; }
.ink-serif { font-family: var(--serif); }
.lp-section.lp-arts { padding-top: clamp(56px, 9vh, 104px); padding-bottom: clamp(48px, 8vh, 88px); }
.lp-section.lp-arts > h2 { font-family: var(--font); font-size: 1rem; font-weight: 600; letter-spacing: -.005em; margin-bottom: 18px; }
.lp-art-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.lp-art-card { display: flex; flex-direction: column; gap: 8px; }
.lp-art-card h3 { margin-top: 8px; font-size: 1.15rem; font-weight: 600; letter-spacing: -.012em; }
.lp-art-card p { color: var(--muted); line-height: 1.5; font-size: .95rem; }
.lp-art-tile { aspect-ratio: 3 / 2; border-radius: 6px; padding: 7%; }
.lp-art-tile.tone-work { background: #d97757; }
.lp-art-tile.tone-pause { background: #b2b7a2; }
.lp-art-tile.tone-vacation { background: #eda7d8; }
.lp-art-tile.tone-sand { background: #e8c9a0; }
@media (max-width: 900px) { .lp-art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .lp-art-grid { grid-template-columns: minmax(0, 1fr); } }
/* Bewegter Hintergrund: vier weiche Farbflächen in den Farben der App, stark verwischt, hinter dem Aufmacher. */
.lp-ambient { position: absolute; inset: -40% -10% -30%; overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 70% 60% at 60% 50%, #000 40%, transparent 100%); }
.lp-ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.lp-ambient .a1 { width: 44vw; height: 44vw; max-width: 620px; max-height: 620px; left: 42%; top: 10%; background: var(--work); opacity: .34; }
.lp-ambient .a2 { width: 36vw; height: 36vw; max-width: 520px; max-height: 520px; left: 66%; top: 36%; background: var(--vacation); opacity: .4; }
.lp-ambient .a3 { width: 32vw; height: 32vw; max-width: 460px; max-height: 460px; left: 28%; top: 44%; background: var(--pause); opacity: .5; }
.lp-ambient .a4 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: 80%; top: 4%; background: #e8c9a0; opacity: .5; }
/* Ohne GSAP: dieselbe Bewegung als CSS-Animation */
.lp-ambient:not(.gsap) .a1 { animation: drift-a 26s ease-in-out infinite alternate; }
.lp-ambient:not(.gsap) .a2 { animation: drift-b 31s ease-in-out infinite alternate; }
.lp-ambient:not(.gsap) .a3 { animation: drift-c 23s ease-in-out infinite alternate; }
.lp-ambient:not(.gsap) .a4 { animation: drift-d 35s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(140px, -60px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-120px, 80px) scale(1.08); } }
@keyframes drift-c { to { transform: translate(90px, 110px) scale(1.15); } }
@keyframes drift-d { to { transform: translate(-150px, -40px) scale(1.1); } }
@media (prefers-color-scheme: dark) { .lp-ambient i { opacity: .22; } }
@media (max-width: 900px) { .lp-ambient { inset-inline: 0; } .lp-ambient i { filter: blur(50px); } .lp-ambient .a1 { width: 70vw; height: 70vw; } .lp-ambient .a2, .lp-ambient .a3, .lp-ambient .a4 { width: 55vw; height: 55vw; } }
@media (prefers-reduced-motion: reduce) { .lp-ambient i { animation: none; } }
.lp-hero h1 strong { font-family: var(--font); font-weight: 600; color: var(--text); letter-spacing: -.025em; }
/* Kachelband: zwei Reihen, die endlos in Gegenrichtung wandern; die Maus hält sie an. */
.lp-band { position: relative; overflow: hidden; padding: 6px 0 10px; display: flex; flex-direction: column; gap: 10px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
.lp-band-row { display: flex; gap: 10px; width: max-content; animation: band-left 70s linear infinite; }
.lp-band-row.rev { animation: band-right 84s linear infinite; }
.lp-band:hover .lp-band-row, .lp-band.paused .lp-band-row { animation-play-state: paused; }
@keyframes band-left { to { transform: translateX(-50%); } }
@keyframes band-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.lp-tile { flex: none; height: 168px; border-radius: 10px; display: grid; place-items: center; padding: 22px; color: var(--on-block); overflow: hidden; }
.lp-tile.s-s { width: 150px; } .lp-tile.s-m { width: 210px; } .lp-tile.s-l { width: 280px; }
.lp-tile svg { width: 100%; height: 100%; max-height: 124px; }
.lp-tile.bg-ink { background: var(--ink); color: var(--on-ink); }
.lp-tile.bg-work { background: var(--work); }
.lp-tile.bg-pause { background: var(--pause); }
.lp-tile.bg-vacation { background: var(--vacation); }
.lp-tile.bg-surface { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.lp-tile.bg-surface-2 { background: var(--surface-2); color: var(--text); }
.lp-tile.bg-plan { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); color: var(--text); }
.lp-tile.t-fig .fig { font-size: 3.2rem; font-weight: 500; }
.lp-band-row.rev .lp-tile { height: 140px; }
.lp-band-btn {
  position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); bottom: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md);
}
.lp-band-btn .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.lp-band-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.lp-section { max-width: 1180px; width: 100%; margin: 0 auto; padding: clamp(40px, 7vh, 80px) max(24px, env(safe-area-inset-left, 0px)) 0; }
.lp-section h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -.015em; margin-bottom: 20px; }
.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.lp-card h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.lp-card p { color: var(--muted); line-height: 1.5; }
.lp-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--work) 14%, transparent); color: var(--work-text); flex: none; margin-bottom: 4px; }
.lp-lines { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.lp-lines li { padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.lp-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-entry {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 20px; text-align: left;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); color: var(--text); text-decoration: none;
  font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lp-entry:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); text-decoration: none; }
.lp-entry .lp-icon { margin: 0; }
.lp-entry.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.lp-entry.primary .lp-icon { background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); }
.lp-entry.primary .lp-entry-text span { color: color-mix(in srgb, var(--on-ink) 72%, transparent); }
.lp-entry-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.lp-entry-text span { color: var(--muted); font-size: .88rem; }
.lp-entry .arrow { color: inherit; opacity: .6; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.lp-entry:hover .arrow { transform: translateX(3px); opacity: 1; }
.lp-note { margin-top: 16px; font-size: .9rem; max-width: 70ch; }
.pill.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* Erscheinen beim Scrollen: 50 px tiefer und unsichtbar, dann weich in die Ruhelage (Kurve entspricht power2.out).
   Karten in einem Raster kommen leicht versetzt nacheinander. */
.lp .reveal-element { opacity: 0; transform: translateY(50px); will-change: opacity, transform;
  transition: opacity .8s cubic-bezier(.25, .46, .45, .94), transform .8s cubic-bezier(.25, .46, .45, .94); }
.lp .reveal-element.is-visible { opacity: 1; transform: none; will-change: auto; }
/* Mit GSAP übernimmt die Bibliothek die Bewegung; die Transition bliebe sonst bei jedem Schritt dazwischen. */
.lp.gsap .reveal-element { transition: none; }
.lp .reveal-element:nth-child(2) { transition-delay: .1s; }
.lp .reveal-element:nth-child(3) { transition-delay: .2s; }
.lp .reveal-element:nth-child(4) { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .lp .reveal-element { opacity: 1; transform: none; transition: none; } }
/* Flache Karten: eine Stufe dunkler als die Fläche, ohne Rand und Schatten */
.lp-flat { background: color-mix(in srgb, var(--ink) 4.5%, var(--bg)); border-radius: var(--radius-xl); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.lp-flat-head { display: flex; align-items: center; gap: 12px; font-size: .86rem; color: var(--muted); }
.lp-dots { display: inline-grid; place-items: center; width: 34px; height: 22px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); }
.lp-dots .icon { width: 14px; height: 14px; transform: rotate(90deg); }
.lp-flat-meta { margin-left: auto; }
.lp-flat h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-top: 2px; }
.lp-flat > p { color: var(--muted); line-height: 1.5; }
.lp-flat-rows { margin: 28px 0 0; display: flex; flex-direction: column; }
.lp-flat-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); font-size: .95rem; }
.lp-flat-rows dt { font-weight: 500; }
.lp-flat-rows dd { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lp-flat-rows dd .arrow { width: 15px; height: 15px; }
.lp-flat-btn {
  margin-top: 4px; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--text); font-weight: 500; text-decoration: none; transition: background-color var(--dur) var(--ease);
}
.lp-flat-btn:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); text-decoration: none; }
.lp-flat-btn .arrow { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.lp-flat-btn:hover .arrow { transform: translateX(3px); }
/* Zweispalter: links die Aussage groß und fett, rechts der Satz in Serifen und die Knöpfe */
.lp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: clamp(56px, 9vh, 104px); }
.lp-two h2 { font-family: var(--font); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; margin: 0; max-width: 14ch; text-wrap: pretty; }
.lp-two-right { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.lp-two-right > p:first-child { font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.4; letter-spacing: -.005em; }
.lp-two-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.lp-two-actions .btn { border-radius: 8px; padding-inline: 18px; }
.lp-two-link { color: var(--text); font-weight: 500; text-decoration: none; }
.lp-two-link:hover { text-decoration: underline; }
/* Vier Grundsätze mit Linie darüber, Kleinschrift darüber */
.lp-purpose { padding-top: clamp(40px, 7vh, 72px); }
.lp-eyebrow { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lp-purpose-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.lp-purpose-item { border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.lp-purpose-item h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.lp-purpose-item p { color: var(--muted); line-height: 1.55; font-size: .95rem; }
/* Dunkler Fuß: Marke links, aufklappbare Gruppen in der Mitte, rechts Anspruch und Wege hinein. */
.lp > .lp-section:last-of-type { padding-bottom: clamp(56px, 10vh, 112px); }
/* Preise */
.lp-pricing-head { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.lp-pricing-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.02em; line-height: 1.15; max-width: 26ch; }
.lp-toggle { background: var(--surface); padding: 3px; }
.lp-toggle button { display: inline-flex; align-items: center; gap: 8px; }
.lp-save { font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--work) 18%, transparent); color: var(--work-text); }
.lp-toggle button.active .lp-save { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: var(--on-ink); }
.lp-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; max-width: 900px; }
/* Preisrechner und Begründung des Preises */
.lp-lead { font-size: 1.05rem; max-width: 60ch; color: var(--muted); }
.lp-calc { width: min(100%, 560px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lp-calc label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: .95rem; }
.lp-calc input[type=range] { width: 100%; accent-color: var(--ink); }
.lp-calc-out { display: flex; flex-direction: column; gap: 6px; }
.lp-calc-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.lp-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.lp-why-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.lp-why-item h3 { font-size: 1rem; margin: 0; }
.lp-why-item p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.lp-tier { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); padding: 8px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); }
.lp-tier.popular { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-md); }
.lp-tier-head { background: var(--bg); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.lp-tier-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lp-tier h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; }
.lp-tier-head p { color: var(--muted); font-size: .92rem; }
.lp-badge { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--work); color: var(--on-block); }
.lp-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.lp-price-fig { font-family: var(--serif); font-size: 3.4rem; line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lp-price-fig.lp-price-text { font-size: 1.6rem; line-height: 1.2; }
.lp-price-unit { font-size: 1.4rem; margin-left: 4px; }
.lp-price-meta { font-size: .78rem; color: var(--muted); text-align: right; line-height: 1.35; }
.lp-tier .chip { align-self: flex-start; margin-top: 4px; white-space: normal; line-height: 1.35; padding-block: 4px; }
.lp-tier .lp-lines { padding: 4px 14px 0; margin: 0; }
.lp-check li { display: flex; gap: 10px; align-items: flex-start; }
.lp-check .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--pos); }
.lp-tier .btn { margin: auto 8px 8px; }
.lp-faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 820px; }
.lp-faq-item { border-bottom: 1px solid var(--line); }
.lp-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-weight: 600; font-size: 1.05rem; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item .chev { color: var(--muted); transition: transform var(--dur) var(--ease); }
.lp-faq-item[open] .chev { transform: rotate(180deg); }
.lp-faq-item p { color: var(--muted); line-height: 1.55; padding: 0 0 18px; max-width: 70ch; }
/* Textseiten: Über uns, Impressum, Datenschutz */
.lp-prose { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.lp-prose h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 8px; }
.lp-prose h2 { font-size: 1.15rem; font-weight: 600; margin-top: 18px; }
.lp-prose p { line-height: 1.6; }
.lp-prose .lp-list { margin: 0; padding-left: 1.2em; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
.lp-prose .lp-lead { font-size: 1.15rem; color: var(--muted); }
.lp-prose .lp-grid { margin-top: 8px; }
.page .lp-entries { margin-top: 4px; }
@media (max-width: 900px) {
  .lp-head { grid-template-columns: auto 1fr; padding: 12px 16px; }
  .lp-pills { display: none; }
  .lp-brand { justify-self: start; }
  .lp-hero { padding-inline: 16px; }
  .lp-photo { width: calc(100% - 32px); height: 360px; }
  .lp-photo-card { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 14px 16px; font-size: .92rem; }
  .lp-photo-caption { top: 12px; right: 14px; bottom: auto; }
  .lp-section { padding: 40px 16px 0; }
  .lp-grid, .lp-entries { grid-template-columns: minmax(0, 1fr); }
  .lp-tile { height: 128px; padding: 16px; }
  .lp-tile.s-s { width: 112px; } .lp-tile.s-m { width: 160px; } .lp-tile.s-l { width: 220px; }
  .lp-band-row.rev .lp-tile { height: 108px; }
  .lp-tile.t-fig .fig { font-size: 2.4rem; }
  .lp-two { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lp-purpose-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lp-pricing { grid-template-columns: minmax(0, 1fr); }
  .lp-pricing-head h1 { font-size: 1.7rem; }
}

.ap { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.ap-card .form { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-sm); }
.ap-card .form input, .ap-card .form select { background: var(--page); }
.ap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px max(24px, env(safe-area-inset-right, 0px)) 16px max(24px, env(safe-area-inset-left, 0px)); }
.ap-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 48px; position: relative; overflow: hidden; overflow: clip; }
/* Farbflächen hinter der Anmeldekarte: leiser als auf der Startseite, mittig hinter der Karte. */
.ap-ambient { inset: -30% -10%; -webkit-mask-image: radial-gradient(ellipse 42% 48% at 50% 52%, #000 25%, transparent 100%); mask-image: radial-gradient(ellipse 42% 48% at 50% 52%, #000 25%, transparent 100%); }
.ap-ambient i { filter: blur(90px); }
.ap-ambient .a1 { left: 36%; top: 22%; opacity: .2; }
.ap-ambient .a2 { left: 52%; top: 44%; opacity: .22; }
.ap-ambient .a3 { left: 30%; top: 56%; opacity: .22; }
.ap-ambient .a4 { left: 56%; top: 12%; opacity: .3; }
@media (prefers-color-scheme: dark) { .ap-ambient i { opacity: .12; } }
.ap-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; }
.ap-card h1 { font-size: 2rem; }
.ap-card .sub { color: var(--muted); margin-top: -8px; }
.ap-card .form { gap: 16px; }
/* Rollenwahl: alle Optionen in einer Reihe, gleich breit; bei drei Optionen wird die Schrift etwas kleiner. */
.ap-seg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ap-seg button { padding: 9px 6px; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Schmal (Handy): drei Rollen passen nicht in eine Reihe, darum untereinander, jede in voller Breite. */
@media (max-width: 480px) {
  .ap-seg { grid-auto-flow: row; grid-auto-columns: auto; gap: 3px; }
  .ap-seg button { font-size: .95rem; padding: 9px 12px; }
}
.ap-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.ap-foot { display: flex; gap: 16px; justify-content: center; padding: 16px; color: var(--muted); }
.ap-foot a { color: var(--muted); }
/* Rechtsseiten der iPhone-/iPad-App (renderLegal in app.js) */
.app-legal { align-items: flex-start; }
.app-legal .lp-prose { max-width: 640px; }


/* Vertrag zur Auftragsverarbeitung (web/app/39-avv.js): Tabellen im Fließtext, Häkchen beim Anlegen, Drucken als PDF */
.lp-prose.avv ol.lp-list { padding-left: 1.4em; }
.avv-table { overflow-x: auto; }
.avv-table .table { width: 100%; font-size: .92rem; line-height: 1.5; }
.avv-table .table td, .avv-table .table th { vertical-align: top; text-align: left; }
.avv-tools { justify-content: flex-end; }
.avv-check { align-items: flex-start; line-height: 1.45; }
.avv-check a { text-decoration: underline; text-underline-offset: 2px; }
@media print {
  .sidebar, .topbar, .tabbar, .avv-tools, .avv-state, .lp-head, .lp-foot, .ai-fab { display: none !important; }
  .lp-prose.avv { max-width: none; }
}
/* ==========================================================================
   Öffentliche Seiten in Beige mit Pillen; die App selbst bleibt weiß mit den Bausteinen der Konsole.
   ========================================================================== */
.lp, .ap { background: var(--bg); }
.lp-head { background: color-mix(in srgb, var(--bg) 86%, transparent); }
.lp-photo-card { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.lp-card, .lp-entry:not(.primary), .lp-tile.bg-surface { background: var(--surface); }
.ap-card .form input, .ap-card .form select { background: var(--surface); }
/* Pillen nur auf Startseite und Anmeldung, wie die Leisten dort. */
:is(.lp, .ap) .btn { border-radius: 999px; padding-inline: 16px; }
:is(.lp, .ap) .btn-lg { padding-inline: 24px; }
:is(.lp, .ap) .seg, :is(.lp, .ap) .seg button { border-radius: 999px; }
:is(.lp, .ap) .seg { padding: 3px; background: var(--surface); }
.lp-band-btn, .ai-fab { border-radius: 50%; }
/* In der App: Abschnitte mit feiner Linie darüber, Titel links, Hinweis rechts (wie Listen in der Konsole). */
.list-section { gap: 10px; margin-top: 14px; }
.list-section-head { border-top: 1px solid var(--line); padding-top: 14px; }
.list-section-head h2 { font-size: 1rem; }
.inbox, .check-list, .check-ok { border-top: 0; }
.list-section .empty { border-top: 0; }
.page-head { padding-bottom: 10px; }
.chip, .badge-soft, .status.st-pending, .audit-area { border-radius: 999px; }
.account-menu, .company-menu, .picker-pop { border-radius: 14px; padding: 8px; }
.card, .stat, .audit-seal, .term-panel { border-radius: var(--radius-xl); }

/* Weniger Bewegung, wenn das System es wünscht */
@media (prefers-reduced-motion: reduce) {
  .lp-band-row { animation-play-state: paused; }
  .lp-entry, .lp-entry .arrow { transition: none; }
  .page, .split-content, .boot, .boot::before, dialog[open], .account-menu, .company-menu, .picker-pop, .form-error { animation: none; }
  .btn, .icon-btn, .nav a, .subnav a, .seg button, .picker-btn, .radio-card, .days-pick label, .pin-pad button, .ai-send, input, select, textarea { transition: none; }
  .btn:active, .icon-btn:active, .pin-pad button:active { transform: none; }
}

/* Hilfe: öffentlich und in der App dieselben Seiten */
.help h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; }
.help h2 { font-family: var(--font); letter-spacing: 0; }
.help-lead { font-size: 1.12rem; line-height: 1.55; color: var(--muted); max-width: 680px; margin: 0 0 22px; }
.help-search { position: relative; max-width: 620px; margin-bottom: clamp(26px, 5vh, 44px); }
.help-search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.help-search .help-search-input { width: 100%; padding: 14px 16px 14px 46px; font-size: 1rem; border-radius: 12px; }
.help-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.help-topics[hidden], .help-results[hidden] { display: none; }
.help-topic { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
/* Themenbild (helpTopicArt): Fläche, Form und Symbol bringt das Bild selbst mit, gleich in hell und dunkel. */
.help-art { margin-bottom: 10px; border-radius: var(--radius-lg); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.help-art svg { display: block; width: 100%; height: auto; }
.help-topic:hover .help-art { transform: translateY(-3px) rotate(-.6deg); }
@media (prefers-reduced-motion: reduce) { .help-art { transition: none; } .help-topic:hover .help-art { transform: none; } }
.help-topic h2 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.help-topic p { margin: 0; color: var(--muted); line-height: 1.45; font-size: .95rem; }
.help-count { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.help-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.help-crumbs > * + *::before { content: '›'; margin-right: 8px; color: var(--muted); }
.help-crumbs a { color: inherit; }
.help-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 820px; }
.help-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: var(--radius); transition: background-color .16s ease; }
.help-row:hover { background: var(--surface-2); }
.help-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.help-row-text strong { font-weight: 600; }
.help-row-text span { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.help-row .icon { flex: none; color: var(--muted); transform: rotate(-90deg); }
.help-empty { color: var(--muted); padding: 12px 0; }
.help-contact { color: var(--muted); margin: clamp(26px, 5vh, 44px) 0 0; }
.help-article { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.help-main { min-width: 0; }
.help-meta { color: var(--muted); font-size: .9rem; margin: -10px 0 18px; }
.help-open-top { margin-bottom: 8px; }
.help-steps { list-style: none; counter-reset: help-step; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: clamp(26px, 5vh, 40px); }
.help-step { counter-increment: help-step; position: relative; padding-left: 46px; min-width: 0; }
.help-step::before { content: counter(help-step); position: absolute; left: 0; top: -3px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-family: var(--display); font-weight: 600; font-size: .95rem; }
.help-step h2 { font-family: var(--display); font-size: 1.22rem; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; }
.help-step p { margin: 0; line-height: 1.6; }
.help-shot { margin: 14px 0 0; }
.help-shot a { display: block; }
.help-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.help-tips { margin-top: clamp(28px, 5vh, 44px); padding: 20px 24px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--yellow) 22%, var(--surface)); }
.help-tips h2 { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; }
.help-tips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.help-open-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding: 18px 22px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--pink) 18%, var(--surface)); }
.help-main > .help-contact { margin-top: 18px; }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.help-pager-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; text-decoration: none; min-width: 0; transition: background-color .16s ease; }
.help-pager-link:hover { background: var(--surface-2); }
.help-pager-link span { color: var(--muted); font-size: .85rem; }
.help-pager-link strong { font-weight: 600; font-size: .95rem; }
.help-pager-link.next { text-align: right; grid-column: 2; }
.help-side { position: sticky; top: 90px; font-size: .94rem; }
.help-in-app .help-side { top: 20px; }
.help-side h2 { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.help-side ul + h2 { margin-top: 22px; }
.help-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.help-side a { color: inherit; text-decoration: none; line-height: 1.35; }
.help-side a:hover { text-decoration: underline; }
.help-side a.active { font-weight: 600; color: var(--link); }
@media (max-width: 900px) {
  .help-article { grid-template-columns: minmax(0, 1fr); }
  .help-side { position: static; border-top: 1px solid var(--line); padding-top: 20px; }
}
@media (max-width: 560px) {
  .help-step { padding-left: 0; }
  .help-step::before { position: static; margin-bottom: 8px; }
  .help-pager { grid-template-columns: minmax(0, 1fr); }
  .help-pager-link.next { grid-column: 1; }
}

/* Pilotphase: kleiner Hinweis über der Überschrift der Startseite und Kasten auf der Preisseite. */
.lp-pilot-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: clamp(14px, 2.2vh, 22px); padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .88rem; text-decoration: none; max-width: 100%; transition: border-color .2s ease; }
.lp-pilot-tag:hover { border-color: var(--work); }
.lp-pilot-tag strong { color: var(--text); font-weight: 600; }
.lp-pilot-tag strong::after { content: ''; display: inline-block; width: 1px; height: .9em; margin-left: 8px; vertical-align: -1px; background: var(--line); }
.lp-pilot-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--work); box-shadow: 0 0 0 3px color-mix(in srgb, var(--work) 22%, transparent); }
.lp-pilot-note { max-width: 70ch; padding: 16px 20px; border: 1px solid var(--line); border-left: 3px solid var(--work); border-radius: 12px; background: var(--surface); }
.lp-pilot-note strong { display: block; margin-bottom: 4px; }
.lp-pilot-note p { margin: 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 560px) { .lp-pilot-tag { font-size: .82rem; } }

/* ---------- Willkommen: Einrichtung im Gespräch (Kugel, public/kugel.js). Hell oder dunkel wie das Gerät. ---------- */
.wl-on .ai-widget { display: none; }
.wl {
  --wl-bg: #f5f4ef; --wl-text: #1f1e1d; --wl-muted: rgba(31, 30, 29, .62); --wl-dim: rgba(31, 30, 29, .42);
  --wl-glass: rgba(255, 255, 255, .72); --wl-line: rgba(31, 30, 29, .11); --wl-accent: #d97757; --wl-on-light: #ffffff; --wl-fill: #1f1e1d;
  --wl-ok: #2f7d4a; --wl-err: #b3402a;
  position: fixed; inset: 0; z-index: 60; background: var(--wl-bg); color: var(--wl-text); color-scheme: light;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  font-family: var(--font);
}
.wl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  .wl {
    --wl-bg: #070605; --wl-text: #f7f1ea; --wl-muted: rgba(247, 241, 234, .58); --wl-dim: rgba(247, 241, 234, .34);
    --wl-glass: rgba(255, 244, 236, .065); --wl-line: rgba(255, 236, 222, .14); --wl-accent: #ff8a4c; --wl-on-light: #120d0a; --wl-fill: #f7f1ea;
    --wl-ok: #8fd19e; --wl-err: #ffb4a0;
    color-scheme: dark;
  }
}
.wl > header, .wl > main, .wl > footer { position: relative; }
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wl-brand { display: flex; align-items: center; gap: 8px; }
.wl-brand .brand-mark { width: 22px; height: 22px; }
.wl-brand { color: var(--wl-text); }
.wl-top-actions { display: flex; align-items: center; gap: 10px; }
.wl-later { color: var(--wl-muted); font-size: .9rem; text-decoration: none; padding: 8px 4px; }
.wl-later:hover { color: var(--wl-text); }
.wl-icon {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--wl-line); background: var(--wl-glass); color: var(--wl-text);
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.wl-icon svg { width: 18px; height: 18px; }
.wl-icon.on { background: color-mix(in srgb, var(--wl-accent) 26%, transparent); border-color: color-mix(in srgb, var(--wl-accent) 70%, transparent); }

.wl-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(12px, 2.4vh, 24px); min-height: 0; padding-block: 8px; }
/* Nur der Text darf schrumpfen und scrollen; Kugel, eigene Antwort und Knöpfe behalten ihre Größe. */
.wl-center > * { flex-shrink: 0; }
.wl-center > .wl-caption { flex: 0 1 auto; min-height: 0; }
.wl-orb { width: min(30vh, 62vw, 300px); aspect-ratio: 1; flex: none; border: 0; padding: 0; background: none; border-radius: 50%; cursor: default; }
.wl-orb:focus-visible { outline: 2px solid var(--wl-accent); outline-offset: 6px; }
.wl-orb.kugel-ersatz { border-radius: 50%; background: radial-gradient(circle at 38% 34%, #fff0f8, #f0a4cc 38%, #b0468a 78%); box-shadow: 0 0 120px 20px rgba(240, 164, 204, .4); }
.wl-said { margin: 0; max-width: min(46ch, 100%); color: var(--wl-muted); font-size: .92rem; line-height: 1.4; text-align: center; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.wl-said[hidden] { display: none; }
.wl-caption {
  max-width: 34rem; width: 100%; overflow-y: auto; text-align: center; padding-bottom: 2px;
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.38; letter-spacing: -.01em; text-wrap: balance;
  scrollbar-width: none;
}
.wl-caption::-webkit-scrollbar { display: none; }
/* Längere Antworten lesen sich wie im Chat: linksbündig, ruhige Schrift, Listen normal eingerückt. */
.wl-caption.long { max-width: 36rem; text-align: left; font-family: var(--font); font-weight: 400; font-size: 1rem; line-height: 1.6; letter-spacing: 0; }
.wl-caption.long ul, .wl-caption.long ol { display: block; font-size: 1em; padding-left: 1.2em; color: var(--wl-text); }
.wl-caption.long li { margin: .15em 0; }
.wl-caption.scrolls:not(.at-top) { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px); mask-image: linear-gradient(to bottom, transparent 0, #000 18px); }
.wl-caption.scrolls.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }
.wl-caption.scrolls.more-below:not(.at-top) { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 22px), transparent); }
.wl-more { display: inline-flex; align-items: center; gap: 4px; margin-top: calc(-1 * clamp(6px, 1.4vh, 14px)); border: 0; background: none; color: var(--wl-muted); font: inherit; font-size: .84rem; font-weight: 500; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.wl-more:hover { color: var(--wl-text); background: var(--wl-glass); }
.wl-more svg { width: 14px; height: 14px; }
.wl-more[hidden] { display: none; }
.wl-caption p { margin: 0 0 .5em; }
.wl-caption .wl-lead { font-size: 1.3em; }
.wl-caption ul, .wl-caption ol { text-align: left; display: inline-block; margin: 0 0 .5em; font-family: var(--font); font-size: .7em; line-height: 1.5; color: var(--wl-muted); }
.wl-caption table { font-family: var(--font); font-size: .62em; margin: 0 auto .5em; border-collapse: collapse; color: var(--wl-muted); }
.wl-caption th, .wl-caption td { padding: 4px 8px; border-bottom: 1px solid var(--wl-line); text-align: left; }
.wl-caption strong { font-weight: 500; color: var(--wl-text); }
.wl-extra { width: 100%; max-width: 30rem; max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.wl-extra::-webkit-scrollbar { display: none; }
.wl-extra:empty { display: none; }
.wl-actions { border: 1px solid var(--wl-line); background: var(--wl-glass); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.wl-action { display: flex; flex-direction: column; gap: 4px; }
.wl-action + .wl-action { border-top: 1px solid var(--wl-line); padding-top: 10px; }
.wl-action-title { display: flex; align-items: center; gap: 8px; }
.wl-action-title strong { font-weight: 600; }
.wl-action-state { margin-left: auto; font-size: .8rem; color: var(--wl-muted); }
.wl-action.st-done .wl-action-state { color: var(--wl-ok); }
.wl-action ul { margin: 0; padding-left: 1.1em; font-size: .88rem; color: var(--wl-muted); line-height: 1.5; }
.wl-action-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.wl-err { margin: 0; color: var(--wl-err); font-size: .88rem; }
.wl-small { margin: 0; font-size: .88rem; color: var(--wl-muted); line-height: 1.5; padding-left: 1.1em; }
p.wl-small { padding-left: 0; }
.wl-pins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.wl-pins li { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; }
.wl-pins strong { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.wl-code { font-size: 2rem; font-weight: 600; letter-spacing: .14em; text-align: center; font-variant-numeric: tabular-nums; }
.wl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 0; }
.wl-chip {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--wl-line); background: var(--wl-glass); color: var(--wl-text);
  font: inherit; font-weight: 500; font-size: .92rem; border-radius: 999px; padding: 9px 16px; cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .2s ease, background .2s ease;
}
.wl-chip svg { width: 15px; height: 15px; }
.wl-chip:hover:not(:disabled) { border-color: color-mix(in srgb, var(--wl-accent) 55%, transparent); background: color-mix(in srgb, var(--wl-accent) 10%, transparent); }
.wl-primary {
  display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--wl-fill); color: var(--wl-on-light); font: inherit; font-weight: 600;
  border-radius: 999px; padding: 12px 24px; cursor: pointer; box-shadow: 0 12px 50px -12px color-mix(in srgb, var(--wl-accent) 70%, transparent);
}
.wl-primary svg { width: 14px; height: 14px; }
.wl-chip:disabled, .wl-primary:disabled { opacity: .5; cursor: default; }
.wl-link { color: var(--wl-muted); font-size: .9rem; align-self: center; padding: 8px; }

.wl-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wl-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--wl-line); background: var(--wl-bg); border-radius: 18px; box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .35); }
.wl-menu[hidden] { display: none; }
.wl-menu button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; color: var(--wl-text); font: inherit; text-align: left; cursor: pointer; }
.wl-menu button:hover, .wl-menu button:focus-visible { background: var(--wl-glass); }
.wl-menu button > svg { width: 20px; height: 20px; flex: none; color: var(--wl-muted); }
.wl-menu strong { display: block; font-weight: 600; font-size: .95rem; }
.wl-menu span span { display: block; color: var(--wl-muted); font-size: .84rem; }
.wl-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wl-tools:empty, .wl-files[hidden] { display: none; }
.wl-files { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wl-file { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--wl-muted); border: 1px solid var(--wl-line); border-radius: 999px; padding: 4px 6px 4px 10px; }
.wl-file svg { width: 13px; height: 13px; }
.wl-file button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 2px; }
.wl-bar {
  position: relative; display: flex; align-items: flex-end; gap: 8px; width: 100%; max-width: 40rem; border: 1px solid var(--wl-line); background: var(--wl-glass);
  border-radius: 22px; padding: 6px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: border-color .25s ease, box-shadow .25s ease;
}
.wl-bar:focus-within { border-color: color-mix(in srgb, var(--wl-accent) 60%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--wl-accent) 12%, transparent); }
.wl-bar .wl-icon { border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.wl-bar .wl-icon.on { background: color-mix(in srgb, var(--wl-accent) 26%, transparent); }
.wl-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--wl-text); font: inherit; font-size: 16px; line-height: 1.4; resize: none; outline: none; padding: 11px 4px; min-height: 44px; max-height: 140px; }
.wl-input::placeholder { color: var(--wl-muted); }
.wl-send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--wl-fill); color: var(--wl-on-light); display: grid; place-items: center; cursor: pointer; }
.wl-send svg { width: 17px; height: 17px; }
.wl-send:disabled { opacity: .4; cursor: default; }
.wl-send[hidden], .wl-icon[hidden] { display: none; }
.wl-progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: .8rem; color: var(--wl-muted); }
.wl-progress li { display: inline-flex; align-items: center; gap: 5px; }
.wl-progress li.ok { color: var(--wl-text); }
.wl-progress svg { width: 12px; height: 12px; color: var(--wl-accent); }
.wl-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--wl-muted); }
.wl-note { margin: 0; max-width: 46rem; text-align: center; font-size: .8rem; line-height: 1.5; color: var(--wl-muted); }
.wl-note summary { cursor: pointer; list-style: none; display: inline-flex; padding: 4px 8px; border-radius: 999px; text-decoration: underline; text-decoration-color: var(--wl-line); text-underline-offset: 3px; }
.wl-note summary::-webkit-details-marker { display: none; }
.wl-note summary:hover { color: var(--wl-text); }
.wl-note summary:focus-visible { outline: 2px solid var(--wl-accent); outline-offset: 2px; }
.wl-note p { margin: 6px 0 0; }
.wl-note a { color: var(--wl-text); }
.wl button:focus-visible, .wl a:focus-visible { outline: 2px solid var(--wl-accent); outline-offset: 3px; }
.wl-orb, .wl-caption { transition: width .5s cubic-bezier(.2, .7, .2, 1), font-size .3s ease; }
.wl.compact .wl-orb { width: min(15vh, 34vw, 150px); }
.wl.has-extra .wl-caption { max-height: 18vh; }
.wl.compact .wl-caption:not(.long) { font-size: clamp(1rem, 1.6vw, 1.18rem); }
.wl.compact .wl-extra { max-height: 44vh; }
@media (max-width: 560px) {
  .wl-orb { width: min(24vh, 52vw); }
  .wl-caption:not(.long) { font-size: 1.12rem; }
  .wl-caption.long { font-size: .96rem; }
  .wl-progress { font-size: .78rem; gap: 2px 10px; }
  .wl-note { font-size: .78rem; }
}
/* Diktat und Live-Gespräch */
.wl-bar.dictating { border-color: color-mix(in srgb, var(--wl-accent) 60%, transparent); }
.wl-livebar { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--wl-accent) 14%, transparent); color: var(--wl-text); font-size: .9rem; }
.wl-livebar[hidden] { display: none; }
.wl-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wl-accent); animation: wl-pulse 1.6s ease-in-out infinite; }
@keyframes wl-pulse { 50% { opacity: .35; transform: scale(.8); } }
.wl-live-end { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--wl-fill); color: var(--wl-on-light); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.wl.busy .wl-input { opacity: .7; }
/* Verlauf: legt sich über die Mitte, unten bleibt die Eingabe */
.wl-history { position: relative; grid-row: 2; z-index: 2; width: 100%; max-width: 40rem; justify-self: center; overflow-y: auto; padding: 0 4px 12px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; }
.wl-history::-webkit-scrollbar { display: none; }
.wl-history[hidden] { display: none; }
.wl.history-open .wl-center { display: none; }
.wl-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 1; padding: 10px 0 14px; background: linear-gradient(var(--wl-bg) 78%, transparent); }
.wl-history-list { display: flex; flex-direction: column; gap: 12px; }
.wl-h-user { align-self: flex-end; max-width: 80%; padding: 9px 14px; border-radius: 18px 18px 4px 18px; background: var(--wl-glass); border: 1px solid var(--wl-line); font-size: .95rem; }
.wl-h-bot { max-width: 92%; font-size: .95rem; line-height: 1.55; }
.wl-h-bot p { margin: 0 0 .4em; }
.wl-h-act { font-size: .85rem; color: var(--wl-muted); display: flex; flex-direction: column; gap: 2px; }
.wl-h-act svg { width: 12px; height: 12px; vertical-align: -1px; color: var(--wl-accent); }
/* Ohne KI: vier nummerierte Schritte mit Stand, der nächste offene ist hervorgehoben (welcomePlain) */
.wl-plain { background: var(--wl-bg); overflow-y: auto; }
.wl-plain-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 0; min-width: 0; }
.wl-plain-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.015em; text-align: center; text-wrap: balance; }
.wl-plain-sub { margin: 0 0 6px; color: var(--wl-muted); text-align: center; font-size: 1rem; }
.wl-steps { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 30rem; display: flex; flex-direction: column; gap: 8px; }
.wl-step { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--wl-line); border-radius: 16px; background: var(--wl-glass); color: var(--wl-text); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.wl-step:hover { border-color: color-mix(in srgb, var(--wl-accent) 55%, transparent); text-decoration: none; }
.wl-step.next { border-color: color-mix(in srgb, var(--wl-accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wl-accent) 14%, transparent); }
.wl-step-num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--wl-line); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.wl-step.next .wl-step-num { background: var(--wl-fill); border-color: var(--wl-fill); color: var(--wl-on-light); }
.wl-step.done .wl-step-num { border-color: transparent; background: color-mix(in srgb, var(--wl-ok) 16%, transparent); color: var(--wl-ok); }
.wl-step-num svg { width: 16px; height: 16px; }
.wl-step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wl-step-text strong { font-weight: 600; }
.wl-step-text span { color: var(--wl-muted); font-size: .88rem; }
.wl-step-state { font-size: .8rem; color: var(--wl-muted); white-space: nowrap; }
.wl-step.done .wl-step-state { color: var(--wl-ok); }
.wl-step-go { width: 16px; height: 16px; flex: none; color: var(--wl-muted); transform: rotate(-90deg); }
.wl-plain-go { margin-top: 8px; text-decoration: none; }
.wl-plain-go:hover { text-decoration: none; opacity: .92; }
/* Am Handy zeigt die Ziffer bzw. der Haken den Stand; der Text bleibt für Screenreader. */
@media (max-width: 420px) { .wl-step-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
@media (max-height: 700px) { .wl-orb { width: min(22vh, 52vw); } }

/* ---------- Kleine leuchtende Kugel (public/kugel.js, durchsichtig) für den KI-Knopf und den Assistenten in der App ---------- */
.mini-orb { position: relative; display: inline-block; flex: none; }
.mini-orb-slot { position: absolute; inset: 0; border-radius: 50%; }
/* Die Leinwand ist größer als die Kugel, damit der Schein nicht abgeschnitten wird. */
.mini-orb-canvas { position: absolute; inset: -45%; width: 190%; height: 190%; pointer-events: none; }
.mini-orb-ersatz .mini-orb-slot { background: radial-gradient(circle at 38% 34%, #fff0f8, #f0a4cc 40%, #b0468a 82%); box-shadow: 0 0 18px rgba(240, 164, 204, .5); }
.ai-fab {
  width: 58px; height: 58px; background: transparent; color: inherit; box-shadow: none; overflow: visible;
}
.ai-fab:hover, .ai-widget.open .ai-fab { transform: scale(1.06); box-shadow: none; }
.ai-fab .mini-orb { width: 44px; height: 44px; }
.ai-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
/* Live-Gespräch im KI-Fenster: oben die Kugel, darunter „Live: sprich einfach“ */
.ai-live { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.ai-live[hidden] { display: none; }
.ai-live-orb { border: 0; padding: 0; background: none; width: 96px; height: 96px; border-radius: 50%; cursor: default; display: grid; place-items: center; }
.ai-live-orb .mini-orb { width: 72px; height: 72px; }
.ai-live-orb:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.ai-live-bar { display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px; border-radius: 999px; background: color-mix(in srgb, var(--work) 14%, transparent); font-size: .88rem; }
.ai-live-end { border: 0; border-radius: 999px; padding: 5px 12px; background: var(--ink); color: var(--on-ink); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.ai-live-btn.on { background: color-mix(in srgb, var(--work) 22%, transparent); color: var(--work-text); }
/* Kugel als ruhiges Zeichen (orbMark): Kopf des KI-Fensters, Hinweis zur Einrichtung, Knopf oben in der App */
.orb-mark .mini-orb-slot { box-shadow: 0 0 8px rgba(240, 164, 204, .35); }
.ai-mark:has(.orb-mark) { background: none; }
.ai-mark .orb-mark { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .ai-live .wl-live-dot { animation: none; } }
.ai-live .wl-live-dot { background: var(--work); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; font-weight: 500; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.ai-chip:hover { border-color: var(--work); }

/* ===== UX einstieg ===== */
/* Passwortfeld mit Augen-Knopf (pwInput) */
.pw-field { position: relative; display: block; min-width: 0; }
.pw-field input { padding-right: 46px; }
.pw-eye { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--text); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pw-eye:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pw-eye .icon { width: 18px; height: 18px; }
.site-menu-login .pw-eye { color: rgba(245, 244, 238, .7); }
.site-menu-login .pw-eye:hover { color: #f5f4ee; background: rgba(245, 244, 238, .1); }
/* Feldkopf mit Link rechts („Passwort vergessen?“ direkt am Feld) */
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-head label { font-size: .8rem; font-weight: 600; }
.field-head a { font-size: .82rem; }
.field.invalid .pw-field input { border-color: var(--neg); }
.site-menu-login .field-head label { color: rgba(245, 244, 238, .8); }
.site-menu-login .field-head a { color: rgba(245, 244, 238, .8); }
/* Knopf arbeitet (busyWhile): kleiner Kreis vor der Beschriftung, keine zweite Eingabe */
.btn.is-busy, .btn-link.is-busy, .ent-typo.is-busy { cursor: progress; }
.btn.is-busy:disabled { opacity: .8; }
.btn.is-busy::before, .ent-typo.is-busy::before { content: ""; width: 1em; height: 1em; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-link.is-busy { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before, .ent-typo.is-busy::before { animation-duration: 1.6s; } }
/* Code aus der E-Mail: großes Feld */
.mail-code-input { min-height: 56px; }
/* Eingang: Rückfrage bei unbekannter Adresse */
.ent-ask { margin: 0; font-size: .95rem; }
.ent-typo { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--work) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--work) 7%, var(--surface)); color: var(--text); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
.ent-typo:hover { border-color: var(--work); }
.ent-typo .icon { width: 16px; height: 16px; color: var(--work-text); }
.ent-typo strong { font-weight: 600; overflow-wrap: anywhere; }
.ent-choices { display: flex; flex-direction: column; gap: 8px; }
.ent-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.ent-choice:hover { border-color: var(--muted); background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.ent-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ent-choice-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.ent-choice-icon .icon { width: 19px; height: 19px; }
.ent-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ent-choice-text strong { font-weight: 600; font-size: .98rem; }
.ent-choice-text span { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.ent-choice-chev { width: 16px; height: 16px; color: var(--muted); transition: transform var(--dur) var(--ease); }
.ent-choice[aria-expanded="true"] .ent-choice-chev { transform: rotate(180deg); }
.ent-help { display: flex; flex-direction: column; gap: 8px; margin: -2px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .92rem; line-height: 1.5; }
.ent-help[hidden] { display: none; }
.ent-help p { margin: 0; }
.ent-help .btn { align-self: flex-start; }
.ent-qr .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ent-note a { white-space: nowrap; }

/* Einführung für neue Mitarbeitende (viewIntro, #/einfuehrung) */
.intro { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top, 0px)) 0 max(24px, env(safe-area-inset-bottom, 0px)); }
.intro-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.intro-head .brand .brand-mark { width: 28px; height: 28px; }
.intro-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px 0; }
.intro-main h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.15; letter-spacing: -.015em; text-align: center; text-wrap: balance; }
.intro-sub { margin: 0 0 8px; max-width: 34rem; text-align: center; color: var(--muted); }
.intro-cards { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.intro-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.intro-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.intro-icon .icon { width: 20px; height: 20px; }
.intro-text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.intro-text h2 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.intro-text p { margin: 0; font-size: .92rem; line-height: 1.5; }
.intro-text p.muted { font-size: .86rem; }
.intro-shift { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.intro-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; align-self: flex-start; font-size: .9rem; text-decoration: none; min-height: 32px; }
.intro-link .icon { width: 15px; height: 15px; }
.intro-go { margin-top: 10px; min-width: min(100%, 280px); }
@media (max-width: 560px) {
  .intro-card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px; }
  .intro-go { width: 100%; }
}

/* ===== UX native: Navigation am Handy und Tablet, Seitenleiste, Konto-Kreis ===== */
/* Seitenleiste zwischen 901 und 1279 px: eingeklappt (renderShell, NARROW_SIDEBAR). Aufgeklappt liegt sie über dem
   Inhalt, damit der Dienstplan bis Sonntag sichtbar bleibt; ein Tipp daneben klappt sie wieder ein. */
@media (min-width: 901px) and (max-width: 1279px) {
  .shell.peek { grid-template-columns: 68px minmax(0, 1fr); }
  .shell.peek .main-col { grid-column: 2; }
  .shell.peek .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 252px; height: auto; z-index: 60; box-shadow: var(--shadow-xl); animation: peek-in .2s var(--ease); }
}
@keyframes peek-in { from { transform: translateX(-16px); opacity: .5; } }

/* Tastenkürzel nur mit Tastatur; Hinweise wie „anklicken“ oder „Strg“ fallen auf Touch-Geräten weg (tidyNavigation). */
@media (hover: none) and (pointer: coarse) {
  html:not(.has-keyboard) .key-hint { display: none; }
  .touch-hide { display: none !important; }
}

/* Konto oben am Handy: nur der Kreis mit den Initialen, das Menü öffnet darunter. */
.account.account-compact { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.account.account-compact:hover { box-shadow: none; }
.account-compact .avatar { width: 34px; height: 34px; border-radius: 50%; font-size: .76rem; }
.account-menu-head { display: flex; flex-direction: column; min-width: 0; padding: 6px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); line-height: 1.3; }
.account-menu-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.account-menu-head span { font-size: .8rem; color: var(--muted); }
.account-menu .menu-sep { margin: 4px 0; }

/* Untere Reiterleiste (tabBar): am Handy und Tablet im Browser; die App legt sie als schwebende Leiste darüber (phone.css). */
.tabbar { display: none; }
.tab { -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: stretch; justify-content: space-around;
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--sidebar) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tab {
    flex: 1 1 0; min-width: 0; max-width: 170px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 2px 5px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
  }
  .tab:hover { text-decoration: none; color: var(--text); }
  .tab-icon { position: relative; display: grid; place-items: center; width: 54px; height: 30px; border-radius: 15px; transition: background-color var(--dur) var(--ease); }
  .tab-icon .icon { width: 22px; height: 22px; stroke-width: 1.6; }
  .tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tab.active { color: var(--text); font-weight: 600; }
  .tab.active .tab-icon { background: color-mix(in srgb, var(--ink) 9%, transparent); }
  .tab:active .tab-icon { background: color-mix(in srgb, var(--ink) 12%, transparent); }
  .tab:focus-visible { outline: none; }
  .tab:focus-visible .tab-icon { box-shadow: var(--ring); }
  .tab .badge { position: absolute; top: -2px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; font-size: .64rem; box-shadow: 0 0 0 2px var(--sidebar); }
  /* Platz über der Leiste: KI-Knopf und Meldungen rücken nach oben. */
  .ai-widget { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.has-ai .toasts { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
  /* Seitliche Reiter einer Seite: weicher Rand, wo es weitergeht (tidyNavigation). */
  .subnav.fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .subnav.fade-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
  .subnav.fade-start.fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
}
/* Ab Tablet-Breite: Zeichen und Wort nebeneinander, die Reiter stehen in der Mitte. */
@media (min-width: 600px) and (max-width: 900px) {
  .tabbar { justify-content: center; gap: 6px; }
  .tab { flex: 0 1 172px; flex-direction: row; gap: 6px; font-size: .86rem; }
  .tab-icon { width: 40px; }
}
@media print { .tabbar { display: none !important; } }

/* Blatt „Mehr“ (moreSheet): am Handy von unten, die Seiten als ruhige Liste. */
dialog.nav-sheet { padding: 0; }
.nav-sheet-box { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
.nav-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 0 8px; }
.nav-sheet-head h2 { font-size: 1.05rem; }
.nav-sheet-list { display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface-2); overflow: hidden; }
.nav-sheet-item { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; color: var(--text); font-weight: 500; text-decoration: none; }
.nav-sheet-item:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.nav-sheet-item:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav-sheet-item + .nav-sheet-item::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--line); }
.nav-sheet-item > .icon:first-child { width: 20px; height: 20px; color: var(--muted); }
.nav-sheet-item .label { flex: 1; min-width: 0; }
.nav-sheet-item .chev { width: 16px; height: 16px; color: var(--muted); transform: rotate(-90deg); }
.nav-sheet-item.active { font-weight: 600; }
.nav-sheet-item.active > .icon:first-child { color: var(--text); }

/* ===== UX mitarbeitende ===== */
/* Stempelblock: Bestätigung, Doppeltipp-Schutz, Ortsnachweis, vergessenes Ausstempeln */
.state-block .st-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.state-block .st-done { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--text); font-weight: 600; font-size: .9rem; animation: st-done-in .32s var(--ease); transition: opacity .4s ease; }
.state-block .st-done .icon { width: 16px; height: 16px; color: var(--pos); stroke-width: 2.4; }
.state-block .st-done.gone { opacity: 0; }
@keyframes st-done-in { from { transform: scale(.92); opacity: 0; } }
.state-block.is-busy .st-actions .btn { cursor: progress; }
.state-block.is-busy .st-sub { font-style: italic; }
.state-block.st-stale { background: var(--warn-bg); color: var(--warn-text); box-shadow: inset 0 0 0 1px var(--warn-line); }
.state-block.st-stale .st-sub { opacity: .85; }
.state-block .st-actions .btn .icon { width: 18px; height: 18px; }
/* Der allgemeine Hover (.btn:hover, weiter oben) machte dunkle Knöpfe auf dem Farbblock hell mit weißer Schrift. */
html:not(.noya-app) .state-block .btn.btn-on-block:hover { background: #111110; border-color: transparent; }
html:not(.noya-app) .state-block .btn.btn-on-block.secondary:hover { background: rgba(17, 17, 16, .08); border-color: rgba(17, 17, 16, .5); }
.state-block .st-fig .unit { font-size: .95rem; font-weight: 600; opacity: .7; margin-left: 6px; letter-spacing: 0; }
.state-block .st-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .84rem; font-weight: 600; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); font-variant-numeric: tabular-nums; }
.state-block .st-chip .icon { width: 15px; height: 15px; }
.state-block .st-foot { margin-top: -6px; }
.state-block .st-link { color: inherit; opacity: .78; font-size: .9rem; }
.state-block .st-link:hover { opacity: 1; }
@media (max-width: 600px) {
  .state-block .st-actions .btn { min-height: 56px; font-size: 1.1rem; }
  .state-block { min-height: 0; gap: 12px; padding: 16px; }
  .state-block .st-fig .fig { font-size: 2.9rem; }
}
@media (prefers-reduced-motion: reduce) { .state-block .st-done { animation: none; transition: none; } }

/* Kopf der Stempeln-Seite am Handy: „Krank melden“ rechts neben dem Gruß statt in einer eigenen Zeile */
@media (max-width: 600px) {
  .clock-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
  .clock-head .toolbar .btn { padding: 7px 11px; font-size: .88rem; }
  .clock-head .sub { font-size: .88rem; }
}

/* Kurzübersicht unter dem Stempelblock */
.glance { padding: 4px 0; gap: 0; }
.glance-row { display: grid; grid-template-columns: 20px minmax(0, auto) minmax(0, 1fr) 16px; align-items: center; gap: 12px; padding: 13px 18px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); min-height: 48px; }
.glance-row:last-child { border-bottom: 0; }
.glance-row > .icon { width: 18px; height: 18px; color: var(--muted); }
.glance-label { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.glance-value { text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.glance-value strong { font-weight: 600; }
.glance-row .chev { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); }
a.glance-row:hover { background: var(--surface-2); }
.glance .neg, .times-sum .neg { color: var(--neg); }
.glance .pos, .times-sum .pos { color: var(--pos); }
@media (max-width: 420px) {
  .glance-row { grid-template-columns: 18px minmax(0, 1fr) 14px; row-gap: 2px; }
  .glance-value { grid-column: 2; text-align: left; }
  .glance-row .chev { grid-row: 1 / span 2; grid-column: 3; }
}

/* Mitteilungen oben auf „Stempeln“ */
.news-card { gap: 10px; padding: 16px 18px; border-color: color-mix(in srgb, var(--work) 30%, var(--line)); }
.news-card h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.news-card h2 .icon { width: 18px; height: 18px; color: var(--work-text); }
.news-card h2 .count { font-size: .78rem; font-weight: 700; color: var(--on-block); background: var(--work); border-radius: 999px; padding: 1px 7px; }
.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.news-item > .icon { width: 17px; height: 17px; color: var(--muted); }
.news-link { color: inherit; text-decoration: none; }
.news-link:hover .news-text { text-decoration: underline; text-underline-offset: 3px; }
.news-text { line-height: 1.4; }
.news-item.needs-answer .news-text { font-weight: 600; }
.news-actions { display: flex; gap: 6px; }
@media (max-width: 600px) { .news-actions { grid-column: 2 / -1; } .news-actions .btn { flex: 1; min-height: 40px; } }
.swap-answer { display: flex; flex-wrap: wrap; gap: 8px; }
.swap-answer .btn { flex: 1 1 140px; min-height: 48px; justify-content: center; }
.notice .notice-x { margin-left: auto; flex: none; color: inherit; }

/* Heute: ohne Daten eine Zeile, sonst einklappbar */
.today-empty { flex-direction: row; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }
.today-empty h2 { font-size: 1rem; }
.fold-card { padding: 0; gap: 0; }
.fold-card > summary { display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary h2 { font-size: 1rem; }
.fold-card > summary .chev { margin-left: auto; width: 16px; height: 16px; color: var(--muted); align-self: center; transition: transform var(--dur) var(--ease); }
.fold-card[open] > summary .chev { transform: rotate(180deg); }
.fold-body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 14px; }
/* Sehr kurze Blöcke im Zeitstrahl: nur der Farbbalken */
.tl-block.tiny { padding: 0; }

/* Nächste Schichten: ganze Zeile tippbar, Uhrzeit als Text statt Pille */
.shift-row { color: inherit; text-decoration: none; flex-wrap: nowrap; justify-content: flex-start; gap: 14px; padding: 10px 4px; border-radius: var(--radius); }
.shift-row:hover { background: var(--surface-2); }
.shift-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; flex: 1; }
.shift-row .chev { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); flex: none; }

/* Auswahl in Segmenten über die volle Breite (Krank melden, Darstellung) */
.seg.seg-wide { display: flex; width: 100%; }
.seg.seg-wide button { flex: 1; min-height: 40px; padding-inline: 6px; }
.sick-summary { font-weight: 600; margin: 0; }

/* Nachtrag: Pause mit Schnellwahl, Pflichtfelder, Hinweis als ⓘ */
.break-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.break-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; font-weight: 500; border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.chip-btn:hover { border-color: var(--muted); }
.chip-btn.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.break-pick input.break-num { width: 84px; flex: none; }
.break-pick .inline-unit { flex-wrap: nowrap; }
/* Fehler am Feld (Nachtrag, Abwesenheit, Ende nachtragen): rot, auch gegen die allgemeine Farbe der Feldtexte. */
.field > .field-error { color: var(--neg); font-weight: 600; }
.req { color: var(--neg); margin-left: 3px; font-weight: 700; }
.info-tip { display: inline-flex; vertical-align: -3px; margin-left: 4px; color: var(--muted); cursor: help; }
.info-tip .icon { width: 15px; height: 15px; }
.brk-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.brk-blocks .chip { font-size: .8rem; }

/* Zeiten (eigene): Zusammenfassung in einer Zeile, Monat über die volle Breite, Tageskarten am Handy */
.times-nav .month-nav-wide { display: flex; width: 100%; }
.month-nav.month-nav-wide .label { flex: 1; min-width: 0; }
.month-nav.month-nav-wide .btn { min-width: 44px; min-height: 44px; font-size: 1.2rem; }
.times-sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.times-sum > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 14px 18px; cursor: pointer; list-style: none; line-height: 1.4; }
.times-sum > summary::-webkit-details-marker { display: none; }
.times-sum > summary strong { font-weight: 600; }
.times-more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; }
.times-more .chev { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.times-sum[open] .times-more .chev { transform: rotate(180deg); }
.times-sum > .stats { padding: 0 14px 14px; }
.times-table tr.add-row { cursor: pointer; }
.times-table .add-hint { display: inline-flex; color: var(--muted); opacity: 0; transition: opacity var(--dur) ease; }
.times-table .add-hint .icon { width: 16px; height: 16px; }
.times-table tr.add-row:hover .add-hint, .times-table tr.add-row:focus-visible .add-hint { opacity: 1; }
@media (hover: none) { .times-table .add-hint { opacity: .55; } }
.pend-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; }
.pend-line.rejected .chip { text-decoration: line-through; }
.tday-card { display: none; padding: 4px 0; }
.tday-list { display: flex; flex-direction: column; }
.tday { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; width: 100%; }
.tday:last-child { border-bottom: 0; }
button.tday { cursor: pointer; }
button.tday:active { background: var(--surface-2); }
.tday.today { box-shadow: inset 3px 0 0 var(--work); }
.tday-day { display: flex; flex-direction: column; line-height: 1.1; }
.tday-day strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tday-day span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tday-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tday-times { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tday-pend { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tday-pend .pend-line { margin: 0; }
.tday-num { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: .9rem; }
.tday-num .fig { font-size: .82rem; font-weight: 600; }
.tday-add { width: 16px; height: 16px; color: var(--muted); }
.tday-free { grid-template-columns: 42px minmax(0, 1fr); padding-block: 8px; }
@media (max-width: 600px) {
  .times-card { display: none; }
  .tday-card { display: flex; }
}

/* Abwesenheiten: Urlaubskonto in einer Zeile, eigener Monatskalender, Liste als Karten */
.vac-sum { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding: 16px 20px; }
.vac-rest { display: flex; flex-direction: column; gap: 2px; }
.vac-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.vac-fig .fig { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; }
.vac-line { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; max-width: 62ch; }
.pm { display: flex; flex-direction: column; gap: 6px; }
.pm-head, .pm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pm-head span { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pm-cell { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 0; border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 0; }
.pm-cell.pm-pad { background: color-mix(in srgb, var(--bg) 45%, transparent); cursor: default; }
.pm-cell.we:not(.ac-tile):not(.planned) { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.pm-cell.ac-tile { height: auto; color: var(--on-block); }
.pm-cell.ac-tile.pending { color: var(--text); }
.pm-cell.planned { background: var(--plan-tint); box-shadow: inset 0 0 0 1.5px var(--plan); }
.pm-cell.today { outline: 2px solid var(--work); outline-offset: 1px; }
.pm-cell.blocked::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: var(--neg); }
.pm-cell:hover:not(.pm-pad) { box-shadow: inset 0 0 0 1.5px var(--muted); }
.pm-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pm-d { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .92rem; }
.pm-l { font-size: .62rem; font-weight: 700; letter-spacing: .03em; opacity: .85; }
.abs-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.abs-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.abs-item:last-child { border-bottom: 0; }
.abs-item.off { opacity: .6; }
.abs-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.abs-preview { margin: 0; font-weight: 600; min-height: 1.4em; }
.abs-preview.neg { color: var(--neg); }
.abs-rule { margin: 0; }
.field-person { min-width: 200px; }
.abs-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.form-picker.is-empty .picker-btn .label { color: var(--muted); }
.field.invalid .picker-btn { border-color: var(--neg); }
.name-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-link:hover { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.ac .ac-extra { color: var(--text); }
.ac .ac-extra .neg { color: var(--neg); }

/* Kennzahl: Wert direkt unter dem Label (Reihen auf gleicher Höhe), im Browser als Link mit Pfeil */
.stat.stat-top .value { margin-top: 0; }
.stat.stat-top .hint { margin-top: auto; }
a.stat.stat-link { text-decoration: none; transition: border-color var(--dur) ease; }
a.stat.stat-link:hover { border-color: var(--muted); }
.stat .stat-arrow { width: 14px; height: 14px; float: right; color: var(--muted); margin-top: 2px; }

/* Mein Konto mit nur einem Eintrag: ohne zweite Leiste, schmaler */
.page.account-page { max-width: 760px; }

/* Hilfe für Mitarbeitende am Handy: kompakte Liste statt großer Bildkacheln */
@media (max-width: 600px) {
  .help-team .help-topics { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
  .help-team .help-topic { padding: 14px 4px; border-bottom: 1px solid var(--line); gap: 3px; }
  .help-team .help-topic .help-art { display: none; }
  .help-team .help-search { margin-bottom: 20px; }
}

/* ===== UX Büro ===== */
/* KI-Knopf unten rechts: Platz unter dem Inhalt, damit er keine letzte Zeile, Spalte oder Aktion verdeckt (auch im Dienstplan). */
body.has-ai .page { padding-bottom: 76px; }
body.has-ai .ap-bar { margin-right: 72px; }

/* Übersicht: vier Kennzahlen; am Handy zuerst „Zu erledigen“, die Kennzahlen als kompakte Leiste darunter. */
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ov-stats { order: 1; gap: 8px; }
  .ov-stats ~ .grid-2 { order: 2; }
  .ov-stats .stat { min-height: 0; padding: 10px 12px; gap: 2px; }
  .ov-stats .stat .value .fig, .ov-stats .stat .value > span { font-size: 1.35rem; }
  .ov-stats .stat .hint { display: none; }
  .ov-stats .stat .label { font-size: .8rem; }
}

/* Heute: Namenslisten in Gruppen */
.today-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.tp-head { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.tp-head .count { font-size: .74rem; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: 0; }
.tp-late .tp-head { color: var(--neg); }
.tp-late .tp-head .count { background: color-mix(in srgb, var(--neg) 14%, transparent); color: var(--neg); }
.tp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tp-sub { font-size: .8rem; color: var(--muted); padding-left: 34px; line-height: 1.35; }
.tp-warn .tp-sub { color: var(--neg); }
.tp-sub.warn-text { color: var(--warn-text); }
.tp-muted .person { opacity: .78; }
.tp-dialog { gap: 12px; }

/* Freigaben: gemeinsames Raster für alle Abschnitte, feste Aktionsspalte rechts */
.ap-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ap-row {
  display: grid; grid-template-columns: 24px minmax(150px, 210px) minmax(0, 1.1fr) minmax(150px, .9fr) minmax(0, 1.3fr) 236px;
  gap: 4px 14px; align-items: start; padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.ap-row > div { min-width: 0; }
.ap-sel { padding-top: 3px; }
.ap-check { width: 16px; height: 16px; margin: 0; }
.ap-what strong { font-weight: 500; }
.ap-when { font-size: .9rem; }
.ap-basis { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.ap-basis .shift-warn { color: var(--warn-text); margin-top: 0; font-size: .76rem; }
.ap-stop { display: flex; gap: 4px; align-items: flex-start; color: var(--neg); font-size: .76rem; font-weight: 600; }
.ap-stop .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.ap-free { margin-top: 4px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.ap-blocked .ap-who, .ap-blocked .ap-what { opacity: .85; }
.ap-rest { margin: 0; padding-left: 2px; }
/* Sammelaktion: Leiste unten, solange etwas ausgewählt ist */
.ap-bar {
  position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg);
}
.ap-bar[hidden] { display: none; }
.ap-bar .spacer { flex: 1; }
/* Ablehnen mit Grund: kleines Feld am Knopf */
.reject-pop { display: flex; flex-direction: column; gap: 8px; padding: 10px; width: min(320px, calc(100vw - 32px)); }
.reject-pop input { width: 100%; }
.reject-pop-actions { display: flex; justify-content: flex-end; gap: 6px; }
@media (max-width: 1100px) {
  .ap-row { grid-template-columns: 24px minmax(140px, 190px) minmax(0, 1fr) minmax(0, 1fr); }
  .ap-basis { grid-column: 3 / 5; }
  .ap-actions { grid-column: 2 / 5; justify-content: flex-start; }
}
/* Schmal: jede Zeile eine Karte, Knöpfe unten in voller Breite erreichbar */
@media (max-width: 760px) {
  .ap-list { border-top: 0; gap: 10px; }
  .ap-row { grid-template-columns: 24px minmax(0, 1fr); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
  .ap-sel { grid-row: 1; grid-column: 1; }
  .ap-who { grid-row: 1; grid-column: 2; }
  .ap-what, .ap-when, .ap-basis, .ap-actions { grid-column: 1 / 3; }
  .ap-sel:empty { display: none; }
  .ap-sel:empty + .ap-who { grid-column: 1 / 3; }
  .ap-actions { justify-content: stretch; margin-top: 6px; }
  .ap-actions .btn { flex: 1 1 auto; min-height: 40px; justify-content: center; }
  .ap-bar { bottom: 10px; }
}
/* Zoll-Prüfung */
.zoll-card { display: flex; flex-direction: column; gap: 12px; }
.zoll-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.zoll-range .field { flex: 1 1 200px; min-width: 180px; }
.zoll-range .field select { width: 100%; }
.zoll-list { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.zoll-here { border-top: 1px solid var(--line); padding-top: 12px; }
/* Reiter oben (Lohn): statt zweiter Seitenleiste, die Tabelle bekommt die volle Breite */
.page-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-top: -4px; }
.page-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.page-tabs a:hover { color: var(--text); text-decoration: none; }
.page-tabs a.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.page-tabs .page-tab-ext { margin-left: auto; font-size: .9rem; }
.page-tabs .page-tab-ext .icon { width: 14px; height: 14px; }
/* Monatsabschluss: drei Schritte mit Stand, jeder Schritt mit eigener Aktion */
/* So viele gleich breite Spalten wie Schritte (Monatsabschluss: Zeiten, Prüfen, Abschließen, Exportieren). */
.steps-row { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.steps-row a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; background: var(--surface); }
.steps-row a:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); text-decoration: none; }
.steps-row li.current a { border-color: var(--text); }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.steps-row .step-mark, .step-title .step-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.steps-row li.done .step-mark, .step-card.done .step-title .step-mark { background: var(--pause); color: var(--on-block); }
.steps-row li.current .step-mark, .step-card.current .step-title .step-mark { background: var(--ink); color: var(--on-ink); }
.steps-row .step-mark .icon, .step-title .step-mark .icon { width: 14px; height: 14px; }
.step-card { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.step-card.done:not(.current) { background: transparent; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; }
.step-state { margin-left: auto; font-weight: 400; }
.step-body { display: flex; flex-direction: column; gap: 12px; }
.check-group { display: flex; flex-direction: column; gap: 4px; }
.check-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check-group-head .count { font-size: .74rem; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.check-group-head .btn { margin-left: auto; }
.check-link { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.check-link .icon { width: 13px; height: 13px; }
.inline-fix { display: inline-flex; gap: 6px; align-items: center; }
.inline-fix .cell-input { width: 92px; }
.check-item.flash { animation: check-flash 1.6s var(--ease); }
@keyframes check-flash { 0%, 40% { background: color-mix(in srgb, var(--neg) 12%, transparent); } }
@media (max-width: 760px) { .steps-row { grid-auto-flow: row; grid-template-columns: 1fr; gap: 6px; } }
/* Mehrere Betriebe: Stand je Betrieb */
.company-status { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cs-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.legal-head { flex-wrap: wrap; }
.legal-head .list-section-actions { align-items: center; }
@media (max-width: 600px) { .legal-head .list-section-actions { flex-wrap: wrap; min-width: 0; } .legal-head .list-section-actions .btn { white-space: normal; max-width: 100%; } }
.legal-sub { margin: -2px 2px 4px; }

/* Tabellen: Sortieren per Spaltenkopf, feste Kopfzeile bei langen Listen, feste erste Spalten */
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-sort-icon { width: 13px; height: 13px; opacity: 0; transition: opacity var(--dur) var(--ease); }
.th-sort:hover .th-sort-icon, .th-sort.on .th-sort-icon, .th-sort:focus-visible .th-sort-icon { opacity: .9; }
th.num .th-sort { flex-direction: row-reverse; }
.sticky-head { max-height: calc(100vh - 150px); overflow: auto; }
.sticky-head thead th { position: sticky; top: 0; z-index: 3; background: var(--page); box-shadow: inset 0 -1px 0 var(--line); }
.sticky-cols-1 tbody tr:not(.detail-row) > td:nth-child(1), .sticky-cols-1 thead th:nth-child(1),
.sticky-cols-2 tbody tr:not(.detail-row) > td:nth-child(-n+2), .sticky-cols-2 thead th:nth-child(-n+2) { position: sticky; left: 0; z-index: 2; background: var(--page); }
.sticky-cols-2 thead th:nth-child(-n+2) { z-index: 4; }
.sticky-cols-2 tbody tr:not(.detail-row) > td:nth-child(1), .sticky-cols-2 thead th:nth-child(1) { min-width: 74px; width: 74px; }
.sticky-cols-2 tbody tr:not(.detail-row) > td:nth-child(2), .sticky-cols-2 thead th:nth-child(2) { left: 74px; box-shadow: inset -1px 0 0 var(--line); }
.table tr.clickable:hover > td { background: var(--surface-2); }
.rule-cell { white-space: nowrap; }
/* Anklickbare Zeilen: Pfeil am Ende statt Erklärsatz */
.chev-cell { width: 28px; padding-left: 0 !important; padding-right: 4px !important; color: var(--muted); text-align: right; }
.chev-cell .icon { width: 15px; height: 15px; vertical-align: middle; opacity: .55; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
tr.clickable:hover .chev-cell .icon { opacity: 1; transform: translateX(2px); }
/* Monatsraster: vergangene Schicht ohne Stempel (roter Rand), offener Nachtrag (gestrichelt) */
.ac-tile.planned.missing { background: color-mix(in srgb, var(--neg) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--neg); }
button.ac-tile.planned.missing:hover { box-shadow: inset 0 0 0 2px var(--neg); }
.ac-tile.pend { background: transparent; box-shadow: none; outline: 1.5px dashed var(--work); outline-offset: -2px; }
.ac-tile.work.pend { outline-color: var(--text); }
.sw-running { background: repeating-linear-gradient(135deg, var(--work) 0 3px, color-mix(in srgb, var(--work) 70%, white) 3px 6px); }
.sw-pend { background: transparent; outline: 1.5px dashed var(--work); outline-offset: -2px; }
.sw-missing { background: color-mix(in srgb, var(--neg) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--neg); }
/* Monatsraster als aufklappbare Karte */
.grid-card > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; font-weight: 600; padding: 2px 0 10px; }
.grid-card > summary::-webkit-details-marker { display: none; }
.grid-card > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform var(--dur) var(--ease); align-self: center; margin-right: 2px; }
.grid-card[open] > summary::before { transform: rotate(45deg); }
.grid-card:not([open]) { padding-bottom: 8px; }
/* Menü mit Einträgen (Export) */
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu-item .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--muted); flex: none; }
.menu-item span { display: flex; flex-direction: column; line-height: 1.3; }
.menu-item small { color: var(--muted); font-size: .78rem; }
.btn .btn-chev { width: 14px; height: 14px; margin-left: 2px; opacity: .7; }
/* Woche: Differenz zum Soll */
.wk-diff { font-size: .78rem; font-weight: 600; }
.pos-text { color: var(--pos); }
.neg-soft { color: var(--neg); }
/* Tagesansicht: Namen oben */
.tv-wrap.names-top { display: flex; flex-direction: column; }
.tv-headrow { display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.tv-corner { flex: none; width: 150px; position: sticky; left: 0; z-index: 3; background: var(--surface); align-self: stretch; display: flex; align-items: flex-end; }
.tv-corner .tv-left-foot { padding: 0 0 6px; }
.tv-heads { flex: 1 1 auto; min-width: 0; }
.names-top .tv { padding-top: 12px; }
@media (max-width: 700px) { .tv-corner { width: 96px; } }
.tv-work.can-edit { border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.tv-work.can-edit:hover { filter: brightness(1.06); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text); }
.tv-work.can-edit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Zeiten am Handy: zwei Kern-Kennzahlen, Monatswerte als Liste je Person */
@media (max-width: 640px) {
  .stats-core { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats-core .stat:nth-child(n+3) { display: none; }
  .stats-core .stat { min-height: 0; padding: 10px 12px; }
  html:not(.noya-app) .table.stack-sm thead { display: none; }
  html:not(.noya-app) .table.stack-sm, html:not(.noya-app) .table.stack-sm tbody { display: block; }
  html:not(.noya-app) .table.stack-sm tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  html:not(.noya-app) .table.stack-sm tr.group-row { display: block; padding: 10px 2px 4px; }
  html:not(.noya-app) .table.stack-sm td { display: flex; flex-direction: column; padding: 0; border: 0; text-align: left; }
  html:not(.noya-app) .table.stack-sm td:first-child { grid-column: 1 / -1; }
  html:not(.noya-app) .table.stack-sm td[data-label]:not(:first-child)::before { content: attr(data-label); font-size: .72rem; color: var(--muted); font-weight: 500; }
  html:not(.noya-app) .table.stack-sm td.chev-cell { display: none; }
  html:not(.noya-app) .sort-wrap.sticky-head:has(.stack-sm) { max-height: none; overflow: visible; }
}
/* Team: Suche, Filter-Chips, Rollen als Abzeichen, Reiter Aktiv/Ausgetreten */
.page-tabs .n { font-size: .74rem; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.team-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.team-search { flex: 0 1 280px; min-width: 200px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; }
.filter-chip:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.filter-chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.filter-chip .n { font-size: .74rem; color: inherit; opacity: .65; }
.team-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.chip-btn { cursor: pointer; font: inherit; }
.team-table td.team-name { max-width: none; }
/* Fristen: Warnzeile mit Aktion */
.deadline-box { display: flex; flex-direction: column; gap: 8px; }
.notice.warn-row { align-items: center; }
.notice.warn-row > div { flex: 1; }
.check-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; }
/* Neue Person: Vorlagen */
.tpl-seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.pin-show { font-size: 2rem; font-weight: 700; letter-spacing: .14em; }
/* Personalakte: Kopf mit dem Wichtigsten, Speichern-Leiste bei Änderungen, nur lesen */
.head-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.head-chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--text); text-decoration: none; background: var(--surface); }
a.head-chip:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); text-decoration: none; }
.head-chip.neg strong { color: var(--neg); }
.head-chip.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.head-chip.warn strong, .head-chip.warn .muted { color: var(--warn-text); }
.head-chip.muted-chip { opacity: .7; }
.hform-actions.save-bar { position: sticky; bottom: 12px; z-index: 15; display: none; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 12px; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hform-actions.save-bar.show { display: flex; }
.save-note { margin-right: auto; font-size: .88rem; color: var(--warn-text); font-weight: 500; }
body.has-ai .hform-actions.save-bar { margin-right: 70px; }
.read-only input, .read-only select, .read-only textarea { background: transparent; }
.read-only .picker-btn, .read-only .seg { pointer-events: none; }
.inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.empty-action { display: flex; flex-direction: column; gap: 12px; padding: 18px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-action p { margin: 0; }
/* Urlaubskonto: Rest zuerst und betont */
.vac-tiles { grid-template-columns: minmax(200px, 1.4fr) repeat(auto-fit, minmax(130px, 1fr)); }
.stat-main { border-color: color-mix(in srgb, var(--vacation) 60%, var(--line)); background: color-mix(in srgb, var(--vacation) 9%, var(--surface)); }
.stat-main .value .fig { font-size: 2.2rem; }
@media (max-width: 640px) { .vac-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vac-tiles .stat-main { grid-column: 1 / -1; } }
/* Seitenkopf: Aktionen bleiben rechts, auch wenn der Untertitel umbricht (festes Muster: Zeitraum, Filter, Aktionen rechts). */
.page-head > .toolbar { margin-left: auto; }
/* Berichte: ganze Zeile öffnet die Vorschau, PDF und Excel als Symbol-Knöpfe */
.report-row { cursor: pointer; padding-inline: 8px; margin-inline: -8px; border-radius: var(--radius); transition: background-color var(--dur) var(--ease); }
.report-row:hover { background: var(--surface-2); }
.report-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.report-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.report-chev { width: 16px; height: 16px; color: var(--muted); margin-left: 6px; transition: transform var(--dur) var(--ease); }
.report-row.active .report-chev { transform: rotate(90deg); color: var(--work-text); }
@media (max-width: 720px) { .report-row { flex-direction: row; align-items: center; } }
/* Abo: Staffel als Info-Zeichen an der Preiszeile */
.info-tip { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--muted); cursor: help; }
.info-tip .icon { width: 16px; height: 16px; }
.info-tip:focus-visible { outline: 2px solid var(--focus); border-radius: 50%; }
/* Protokoll: Schnellfilter */
.audit-quick { margin-top: -4px; }
/* Dienstplan (Planung): offene Bewerbungen und Tausch an der Schicht */
.tag.tag-request { display: inline-flex; align-items: center; gap: 3px; background: color-mix(in srgb, var(--work) 16%, transparent); color: var(--work-text); cursor: pointer; }
.tag.tag-request .icon { width: 11px; height: 11px; }
.tag.tag-request:hover { background: color-mix(in srgb, var(--work) 26%, transparent); }

/* Personalakte: weitere Bereiche als Reihe von Haken */
.dept-picks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
/* ===== UX Dienstplan ===== */
/* Farben je Bereich: ruhige Töne, die sich von Arbeit (Terrakotta) und offenen Schichten absetzen; dunkel heller. */
:root { --dept-0: #6a8caf; --dept-1: #7a9e6e; --dept-2: #b7799e; --dept-3: #c9a227; --dept-4: #8a7f6b; --dept-5: #5f9ea0; }
@media (prefers-color-scheme: dark) {
  :root { --dept-0: #8fb0d3; --dept-1: #9cc290; --dept-2: #d39cbc; --dept-3: #e0bf4f; --dept-4: #b8ad96; --dept-5: #84c3c4; }
}
[data-dept="0"] { --dept: var(--dept-0); } [data-dept="1"] { --dept: var(--dept-1); } [data-dept="2"] { --dept: var(--dept-2); }
[data-dept="3"] { --dept: var(--dept-3); } [data-dept="4"] { --dept: var(--dept-4); } [data-dept="5"] { --dept: var(--dept-5); }
.page.roster-page { max-width: 1640px; }
@media (max-width: 1280px) and (min-width: 901px) { .page.roster-page { margin-inline: -20px; } }
.roster-root { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.roster-head { align-items: center; padding-bottom: 0; }
.roster-head h1 { margin: 0; }
.roster-head-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.my-items .dr-go { font-size: 0; }
.my-items .dr-go .icon { width: 16px; height: 16px; }
/* Eine feste Leiste in allen Ansichten: links Ansicht und Bereich, in der Mitte die Woche, rechts die Aktionen.
   Wird es zu eng, rutscht die Woche samt Aktionen geschlossen in die zweite Zeile (die Knöpfe selbst brechen nie um). */
.viewbar.roster-bar { flex-wrap: wrap; row-gap: 8px; container-type: inline-size; }
.viewbar.roster-bar .seg button { padding-inline: 10px; }
/* Wird die Leiste knapp, steht „+ Schicht“ nur noch als Zeichen da (Name im Tooltip). */
@container (max-width: 1180px) { .roster-new .btn-label { display: none; } .roster-new { padding-inline: 10px; } }
.viewbar.roster-bar .roster-period { margin-inline: auto; }
.viewbar.roster-bar .viewbar-actions { flex-wrap: nowrap; margin-left: 0; }
.roster-period .month-nav .label { width: auto; min-width: 9rem; padding-inline: 6px; text-align: center; }
.viewbar.roster-bar .viewbar-select { max-width: 11rem; }
.roster-today { height: 38px; min-height: 0; padding-block: 0; }
.roster-today:disabled { opacity: .45; cursor: default; }
.roster-publish .btn-label { font-variant-numeric: tabular-nums; }
/* Statuszeile: Zahlen und Sprünge statt Sätzen. */
.roster-status { margin: 0; gap: 6px 12px; }
.roster-warn-chip { cursor: pointer; font: inherit; font-size: .8rem; }
.roster-warn-chip .icon { width: 13px; height: 13px; }
.roster-elsewhere { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--link); text-decoration: none; }
.roster-elsewhere:hover { text-decoration: underline; }
.roster-elsewhere .icon { width: 13px; height: 13px; }
.roster-elsewhere.neg { color: var(--neg); }
.roster-empty .row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Raster bei echter Größe: eigener Laufbereich, Tageskopf oben, Namen links und Woche rechts kleben. */
.roster-card { padding: 12px; gap: 10px; }
.roster-card > .legend { padding-inline: 4px; }
/* Ohne Innenabstand: Kopf, Namen und Woche kleben genau am Rand des Laufbereichs (sonst schauen Tage daneben hervor). */
.roster-scroll { overflow: auto; max-height: calc(100dvh - 88px); margin: 0; padding: 0; scrollbar-color: color-mix(in srgb, var(--muted) 35%, transparent) transparent; }
@media (max-width: 900px) { .roster-scroll { max-height: calc(100dvh - 150px); } }
.roster thead th { position: sticky; top: 0; z-index: 3; vertical-align: bottom; padding-block: 6px 5px; box-shadow: inset 0 -1px 0 var(--line); }
.roster thead th.name { left: 0; z-index: 5; }
.roster thead th.wk { right: 0; z-index: 5; box-shadow: inset 1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.roster thead th.today { box-shadow: inset 0 3px 0 var(--ink), inset 0 -1px 0 var(--line); }
.roster .day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 26px; }
.roster .day-sum { margin-top: 2px; font-size: .72rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster .day-sum > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.roster .day-cost { font-size: .7rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.roster th .day-actions { float: none; margin: 0 -2px 0 0; opacity: 0; transition: opacity var(--dur) var(--ease); }
.roster th:hover .day-actions, .roster th:focus-within .day-actions { opacity: 1; }
@media (hover: none) { .roster th .day-actions { opacity: .7; } }
.roster th .day-actions .icon-btn { width: 26px; height: 26px; }
.roster thead th.name .day-top { font-size: .78rem; color: var(--muted); }
.roster tbody .name { padding-inline: 8px 6px; }
.roster .name .you { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--work) 14%, transparent); color: var(--work-text); font-size: .68rem; font-weight: 600; }
.roster tr.me > td.cell { background: color-mix(in srgb, var(--work) 4%, var(--surface)); }
.roster tr.me > .name { background: color-mix(in srgb, var(--work) 6%, var(--surface)); }
.roster tr.group-row td { padding: 12px 0 5px; background: var(--surface); }
.roster tr.group-row .group-title { position: sticky; left: 8px; display: inline-flex; align-items: center; gap: 6px; }
.dept-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dept, var(--plan)); flex: none; }
/* Flächen einheitlich (auch dunkel): offene Zeile und Wochenspalte auf derselben Fläche wie das Raster. */
.roster tr.open-row > td, .roster tr.open-row > th { background: var(--surface); }
.roster tr.open-row > td.closed-day { background: color-mix(in srgb, var(--ink) 2.5%, var(--surface)); }
.roster tr.open-row > td, .roster tr.open-row > th { border-bottom: 1px solid color-mix(in srgb, var(--work) 30%, var(--line)); }
.roster td.cell { position: relative; padding: 2px; }
.roster td.cell:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Leeres Feld: Plus erst beim Zeigen oder mit der Tastatur, als Fläche ohne eigenen Platz. */
.roster td.cell.can-edit.empty:hover::after, .roster td.cell.can-edit.empty:focus-visible::after {
  content: "+"; position: absolute; inset: 3px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); font-size: 1.1rem; pointer-events: none;
}
.roster td.cell.unavail { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 12%, transparent) 0 2px, transparent 2px 7px); }
.cell-hint { display: block; padding: 2px 4px; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster .abs-pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--vacation) 45%, transparent) 0 4px, transparent 4px 8px); border: 1px dashed var(--vacation); color: var(--text); }
.shift-time { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.shift-time .mine-icon { width: 12px; height: 12px; margin-left: auto; color: var(--work-text); flex: none; }
.shift-meta { display: flex; gap: 6px; margin-top: 1px; font-size: .7rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; }
.shift-meta > span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shift-meta > span:last-child { flex: 1 1 auto; }
.shift-meta .icon { width: 11px; height: 11px; flex: none; }
.sm-open { color: var(--work-text); font-weight: 600; }
.sm-warn { color: var(--neg); }
.sm-warn .icon { color: var(--neg); }
.sm-pend { color: var(--work-text); }
.sm-note { white-space: nowrap; }
.shift-flags { display: none; align-items: center; gap: 3px; }
.shift-flags .icon { width: 11px; height: 11px; color: var(--muted); }
.shift-flags .f-warn { color: var(--neg); }
.shift-flags b { font-size: .68rem; color: var(--work-text); }
.shift.mine { background: color-mix(in srgb, var(--work) 10%, var(--surface)); }
.shift.pending { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--work) 45%, transparent); }
.shift.busy, .who.busy { opacity: .6; }
.shift.flash, .who.flash, .tv-bar.flash, .day-row.flash { animation: roster-flash 1.4s var(--ease); }
@keyframes roster-flash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--work) 55%, transparent); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .shift.flash, .who.flash, .tv-bar.flash, .day-row.flash { animation: none; outline: 2px solid var(--work); } }
/* Kompakt: eine Zeile je Schicht, Hinweis und Notiz nur als Zeichen. */
.roster.compact td.cell { height: 34px; padding: 2px; }
.roster.compact .shift { display: flex; align-items: center; gap: 4px; padding: 1px 4px; font-size: .74rem; }
.roster.compact .shift + .shift { margin-top: 2px; }
.roster.compact .shift-meta { display: none; }
.roster.compact .shift-flags { display: inline-flex; margin-left: auto; flex: none; }
.roster.compact .shift-flags > :nth-child(n+2) { display: none; } /* nur das wichtigste Zeichen, die Uhrzeit bleibt ganz */
.roster.compact .shift-time { flex: 0 1 auto; min-width: 0; }
.shift-flags .f-open { color: var(--work-text); }
.roster.compact .shift-time .mine-icon { display: none; }
.roster.compact .abs { padding: 0 5px; margin-top: 2px; font-size: .7rem; }
.roster.compact td.wk .muted { display: none; }
.roster.compact .day-cost { display: none; }
.roster.compact .who { padding: 1px 5px; }
/* Schichtansicht: Personen einzeilig mit „Vorname N.“, Zeichen für Hinweis, Notiz, eigene Schicht. */
.who .icon.who-note, .who .icon.who-swap { color: var(--muted); }
.who.me .icon.who-swap { color: var(--work-text); }
.who.pending { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--work) 45%, transparent); }
.roster.shifts .name { border-left: 3px solid var(--dept, transparent); }
.roster .name .row-tools { opacity: 0; transition: opacity var(--dur) var(--ease); }
.roster tr:hover .row-tools, .roster .row-tools:focus-visible, .roster .row-tools[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .roster .name .row-tools { opacity: .7; } }
/* Wochenspalte: Kosten und Minijob-Stand im Monat */
.roster td.wk .muted { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .roster td.wk .wk-cost { display: none; } }
.roster td.wk .mj { margin-top: 1px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.roster td.wk .mj .load-bar { width: 26px; flex: none; }
.roster td.wk .mj small { font-size: .66rem; color: var(--muted); }
.roster td.wk .mj.over small { color: var(--neg); font-weight: 600; }
.load-bar { display: block; width: 100%; max-width: 72px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.load-bar i { display: block; height: 100%; background: var(--plan); }
.mj.over .load-bar i { background: var(--neg); }
.legend .sw-dept { background: var(--dept); }
.legend .legend-icon { width: 13px; height: 13px; color: var(--neg); }
.legend .sw-unavail { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 35%, transparent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--line); }
/* Schild mit dem ganzen Satz zu einer Schicht */
.roster-tip { position: fixed; z-index: 70; max-width: 340px; padding: 8px 10px; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); font-size: .78rem; line-height: 1.45; white-space: pre-line; box-shadow: var(--shadow-md); pointer-events: none; }
/* Menüs im Dienstplan */
.roster-menu { min-width: 240px; }
.roster-menu .quick-more { margin-top: 0; border-top: 0; border-radius: var(--radius); }
.roster-menu .quick-more:disabled { opacity: .45; cursor: default; background: none; }
.roster-menu .qm-label { flex: 1 1 auto; }
.roster-menu .qm-check { color: var(--text); }
.roster-menu kbd { font-size: .7rem; color: var(--muted); }
.roster-menu .menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.roster-menu .quick-group:first-child { padding-top: 2px; }
.quick-pick.soft { opacity: .8; }
.quick-warn { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--neg); }
.quick-warn .icon { width: 12px; height: 12px; flex: none; }
.quick-more kbd { margin-left: auto; font-size: .7rem; color: var(--muted); }
.roster-help { max-width: 340px; }
.help-list { margin: 0; padding: 0 8px 4px 24px; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; line-height: 1.45; }
.help-list.keys { list-style: none; padding-left: 8px; }
.help-list kbd { margin-inline: 1px; }
/* Dialoge: Prüfung live, schnelle Aktionen, Besetzen */
.dialog-quick { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.live-check:empty { display: none; }
.live-check { display: flex; flex-direction: column; gap: 4px; }
.live-ok { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--pos); }
.live-ok .icon { width: 14px; height: 14px; }
.warn-list { display: flex; flex-direction: column; gap: 3px; }
.fill-sub { font-weight: 600; }
.fill-notify { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; }
.fill-notify input { margin-top: 3px; }
.fill-body { display: flex; flex-direction: column; gap: 14px; }
.fill-sec { display: flex; flex-direction: column; }
.fill-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.fill-sec-head .detail-title { margin: 0; }
.cand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.cand-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cand-main .load-bar { max-width: 140px; }
.cand-why { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--muted); }
.cand-why .sm-warn { display: inline-flex; align-items: center; gap: 3px; }
.cand-why .icon { width: 12px; height: 12px; }
.cand .btn { flex: none; }
.fill-out summary, .fill-edit summary { cursor: pointer; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.fill-edit summary .icon { width: 14px; height: 14px; }
.fill-edit[open] summary { color: var(--text); }
.fill-edit .form { padding-top: 6px; }
.fill-edit .row-actions { display: flex; justify-content: space-between; gap: 8px; }
.plain-list { margin: 0; padding: 0 0 0 18px; font-size: .84rem; display: flex; flex-direction: column; gap: 2px; }
.publish-period { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.publish-period .icon { width: 18px; height: 18px; color: var(--muted); }
.publish-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.publish-warn { color: var(--neg); }
.publish-warn .icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.publish-list details summary { cursor: pointer; }
.link-btn { border: 0; padding: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.tpl-row { display: flex; align-items: center; gap: 8px; }
.tpl-row input { flex: 1 1 auto; }
/* Mitarbeitende: Hinweise oben (nächste Schicht, Anfragen an dich) */
.roster-hint { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.roster-hint > .icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.roster-hint > div:not(.row-actions) { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.roster-hint .row-actions { display: flex; gap: 6px; flex: none; }
.roster-hint.ask { border-color: color-mix(in srgb, var(--work) 45%, var(--line)); background: color-mix(in srgb, var(--work) 5%, var(--surface)); }
.roster-hint.ask > .icon { color: var(--work-text); }
.roster-hint .neg { color: var(--neg); }
@media (max-width: 640px) {
  .roster-hint { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 8px 12px; }
  .roster-hint > .btn, .roster-hint > .row-actions { grid-column: 2; justify-self: start; }
}
.roster-avail { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 4px 14px; }
.roster-avail > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-weight: 600; }
.roster-avail > summary .icon { width: 16px; height: 16px; color: var(--muted); }
.roster-avail[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.roster-avail .grid-2 { padding-bottom: 12px; }
/* Tag als Liste und meine Woche (Handy) */
.tl-days button { display: inline-flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.2; }
.tl-days button small { font-size: .66rem; font-weight: 600; color: var(--muted); }
.tl-days button.active small { color: inherit; opacity: .75; }
.tl-days button.is-today:not(.active) span { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.day-card { gap: 10px; }
.day-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-card-head h2 { font-size: 1.02rem; }
.day-group { display: flex; flex-direction: column; }
.day-group > .quick-group { display: flex; align-items: center; gap: 6px; padding-inline: 2px; }
.day-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 8px; text-align: left;
  border: 0; border-left: 3px solid var(--dept, var(--plan)); border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: default;
}
button.day-row { cursor: pointer; }
button.day-row:hover { background: var(--surface-2); }
.day-row.draft { border-left-style: dashed; }
.day-row.open { background: color-mix(in srgb, var(--work) 6%, transparent); border-left-color: var(--work); }
.day-row.mine { background: color-mix(in srgb, var(--work) 9%, transparent); }
.dr-time { font-weight: 600; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-main { display: flex; flex-direction: column; min-width: 0; }
.dr-main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: .78rem; color: var(--muted); }
.dr-meta .sm-warn { display: inline-flex; align-items: center; gap: 3px; }
.dr-meta .icon { width: 12px; height: 12px; }
.dr-go { display: inline-flex; align-items: center; gap: 2px; font-size: .82rem; color: var(--muted); }
.dr-go .icon { width: 14px; height: 14px; transform: rotate(-90deg); }
.day-away { padding-top: 4px; }
.my-week { gap: 0; }
.my-week > .day-card-head { padding-bottom: 8px; }
.my-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.my-day.today .my-date strong { color: var(--work-text); }
.my-day.past { opacity: .6; }
.my-date { display: flex; flex-direction: column; line-height: 1.2; padding-top: 6px; }
.my-date span { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.my-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.my-items > .muted { padding-top: 6px; }
.my-items .day-row { border-bottom: 0; border-radius: var(--radius); }
.my-items .abs { align-self: flex-start; }
.my-open { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 10px; border: 1px dashed var(--work); border-radius: 999px; background: none; color: var(--work-text); font: inherit; font-size: .82rem; cursor: pointer; }
.my-open .icon { width: 13px; height: 13px; }
/* Monat: Früh, Spät, Nacht unterscheidbar; offene Plätze als eigene Zeile */
.roster-month .ac-tile.shift-tile.k-early { background: color-mix(in srgb, var(--plan) 8%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-mid { background: color-mix(in srgb, var(--plan) 16%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-late { background: color-mix(in srgb, var(--plan) 30%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-night { background: color-mix(in srgb, var(--plan) 55%, var(--surface)); color: var(--on-ink); }
@media (prefers-color-scheme: dark) { .roster-month .ac-tile.shift-tile.k-night { color: var(--text); background: color-mix(in srgb, var(--plan) 45%, var(--surface)); } }
.roster-month .ac-tile.shift-tile.draft { background: transparent; }
.roster-month .ac-tile.open-tile { background: color-mix(in srgb, var(--work) 10%, transparent); box-shadow: inset 0 0 0 1.5px var(--work); color: var(--work-text); font-weight: 700; }
.roster-month .ac-tile.pending-tile { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--vacation) 50%, transparent) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--vacation); }
.legend .swatch.sw-plan.k-early { background: color-mix(in srgb, var(--plan) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--plan); }
.legend .swatch.sw-plan.k-late { background: color-mix(in srgb, var(--plan) 30%, var(--surface)); box-shadow: inset 0 0 0 1px var(--plan); }
.legend .swatch.sw-plan.k-night { background: color-mix(in srgb, var(--plan) 55%, var(--surface)); box-shadow: inset 0 0 0 1px var(--plan); }
@media (max-width: 640px) { .roster-month .ac-tile { font-size: .6rem; letter-spacing: -.02em; } }
/* Zeitstrahl: Namen und Bereiche oben; Besetzung zählt nur Personen, offene Plätze schraffiert dahinter */
.tv.names-top .tv-left { display: flex; flex-direction: column; }
.tv.names-top .tv-left-foot { padding: 0 0 8px; align-items: flex-end; min-height: 58px; }
.tv.names-top .tv-band { margin: 0 2px 4px; padding: 0 0 4px; border-top: 0; border-bottom: 2px solid var(--dept, var(--line)); }
.tv.names-top .tv-band.empty { border-bottom-color: transparent; }
.tv.names-top .tv-name { padding: 0 3px 6px; }
.tv.names-top .tv-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.tv-bar { border-left-width: 3px; border-left-color: var(--dept, var(--plan)); }
.tv-bar.open { border-left-color: var(--work); }
.tv-cov i.mixed { background: linear-gradient(to right, color-mix(in srgb, var(--work) 38%, transparent) 0 var(--n), transparent var(--n)), repeating-linear-gradient(135deg, color-mix(in srgb, var(--work) 30%, transparent) 0 2px, transparent 2px 5px); }
.tv-cov i.mixed.peak { background: linear-gradient(to right, var(--work) 0 var(--n), transparent var(--n)), repeating-linear-gradient(135deg, color-mix(in srgb, var(--work) 30%, transparent) 0 2px, transparent 2px 5px); }
.swatch.sw-cov-open { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--work) 45%, transparent) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--work) 40%, transparent); }
@media (prefers-color-scheme: dark) {
  .tv-bar { background: color-mix(in srgb, var(--plan) 20%, var(--surface)); border-color: color-mix(in srgb, var(--plan) 85%, var(--text)); }
  .tv-bar.draft { background: var(--surface); }
  .tv-bar.open { background: color-mix(in srgb, var(--work) 18%, var(--surface)); border-color: var(--work); }
}
.tr-flip button { padding-inline: 10px; }
.tl-card .table-wrap { margin-inline: 0; padding-inline: 0; }
/* Waagerechte Zeitachse: je Person eine Zeile */
.tr { --tr-name: 170px; position: relative; min-width: 720px; font-size: .8rem; padding-bottom: 6px; }
@media (max-width: 640px) { .tr { --tr-name: 110px; min-width: 560px; } }
.tr-row { display: grid; grid-template-columns: var(--tr-name) minmax(0, 1fr); align-items: stretch; min-height: 32px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.tr-row.me { background: color-mix(in srgb, var(--work) 5%, transparent); }
.tr-name { position: sticky; left: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 2px 8px 2px 0; background: var(--surface); min-width: 0; }
.tr-row.me .tr-name { background: color-mix(in srgb, var(--work) 5%, var(--surface)); }
.tr-name strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-name small { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-track { position: relative; min-height: 30px; }
.tr-track.can-edit { cursor: pointer; }
.tr-track.can-edit:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.tr-line { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--line) 70%, transparent); pointer-events: none; }
.tr-head { position: sticky; top: 0; z-index: 3; background: var(--surface); min-height: 24px; }
.tr-tick { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: .7rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Die erste Stunde steht am linken Rand: nicht halb abschneiden („10“ statt „0“). */
.tr-tick:first-child { transform: none; }
.tr-bar { position: absolute; top: 4px; bottom: 4px; left: 0; display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap; flex-direction: row; justify-content: flex-start; }
.tr-bar span { overflow: hidden; text-overflow: ellipsis; font-size: .7rem; }
.tr-covtrack { min-height: 40px; }
.tr-cov { position: absolute; bottom: 2px; top: 2px; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.tr-cov i { display: block; width: calc(100% - 1px); }
.tr-cov i.n { background: color-mix(in srgb, var(--work) 45%, transparent); }
.tr-cov i.o { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--work) 40%, transparent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--work) 30%, transparent); }
.tr-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--neg); opacity: .8; z-index: 1; pointer-events: none; }
.tr-group { display: flex; align-items: center; gap: 6px; padding: 12px 0 4px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); position: sticky; left: 0; }
.tr-group .count { font-weight: 500; letter-spacing: 0; text-transform: none; }
.tr-abs { position: absolute; top: 5px; bottom: 5px; left: 0; right: 0; display: flex; align-items: center; padding: 0 8px; border-radius: 4px; font-size: .72rem; font-weight: 600; }
.tr-open .tr-name strong { color: var(--muted); }
/* Sprungziele (Link „Ersatz gesucht“, Push): nicht halb unter der Kopfleiste */
[data-scroll-to], .roster [data-shift], .day-row { scroll-margin-top: 120px; scroll-margin-bottom: 24px; }
@media (max-width: 900px) { [data-scroll-to], .roster [data-shift], .day-row { scroll-margin-top: calc(130px + env(safe-area-inset-top, 0px)); } }

/* Tablet und Handy: Bedienelemente mindestens 44 px, Aktionen ohne Umbruch, Plan beginnt weit oben */
@media (max-width: 900px) {
  .viewbar.roster-bar { flex-wrap: wrap; }
  .viewbar.roster-bar .viewbar-actions { flex-wrap: nowrap; margin-left: auto; }
  .roster-card { padding: 10px; }
}
@media (max-width: 640px), (pointer: coarse) {
  .roster-bar .seg button, .roster-bar .month-nav .btn, .roster-today, .roster-bar .btn, .roster-bar .icon-btn { min-height: 44px; }
  .roster-bar .month-nav, .roster-bar .seg { height: auto; }
  .roster .shift { font-size: .8rem; padding-block: 4px; }
  .roster .shift-meta { font-size: .74rem; }
}
@media (max-width: 640px) {
  .roster-head h1 { font-size: 1.45rem; }
  .viewbar.roster-bar { gap: 8px; }
  .roster-bar .seg { width: 100%; }
  .roster-bar .seg button { flex: 1 1 0; justify-content: center; padding-inline: 6px; }
  .roster-bar .roster-period { width: auto; flex: 1 1 220px; }
  .roster-bar .roster-period .month-nav { flex: 1 1 auto; }
  .roster-bar .roster-period .month-nav .label { min-width: 0; font-size: .86rem; }
  .roster-bar .month-nav .btn { width: 44px; justify-content: center; }
  .roster-bar .viewbar-actions { width: auto; flex: 1 1 auto; justify-content: flex-start; }
  .roster-bar .viewbar-actions .roster-publish { margin-left: auto; }
  .roster-bar .viewbar-select { flex: 1 1 auto; max-width: none; height: 44px; }
  .roster-status { font-size: .8rem; gap: 4px 10px; }
  .roster-status .roster-cost, .roster-status .roster-elsewhere.neg { display: none; }
  .dr-go { font-size: .76rem; }
  /* Am Handy klebt nur die Namensspalte; die Woche läuft mit, damit mehr Tage zu sehen sind. */
  .roster { --rn: 100px; }
  .roster td.wk { position: static; }
  .roster thead th.wk { right: auto; z-index: 3; }
  .tl-days { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tl-days button { flex: 1 0 auto; min-height: 44px; padding-inline: 6px; }
  .day-row { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 8px; padding-inline: 6px; }
  .tl-controls .tl-ranges { margin-left: 0; }
}
/* App: Platz für den schwebenden Knopf unten, damit er keine Schicht verdeckt. */
html.noya-app .day-card, html.noya-app .my-week { margin-bottom: 72px; }

/* Drucken und PDF: A4 quer, je Bereich eine Seite, große Zeiten, ohne Bedienelemente */
.roster-print { display: none; }
@page roster { size: A4 landscape; margin: 10mm; }
@media print {
  body.printing-roster > *:not(.roster-print) { display: none !important; }
  body.printing-roster { background: #fff; color: #000; }
  body.printing-roster .roster-print { display: block; }
  .roster-print .pr-page { page: roster; break-after: page; font: 10pt/1.3 var(--font); color: #000; }
  .roster-print .pr-page:last-child { break-after: auto; }
  .roster-print header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6mm; }
  .roster-print h1 { font-size: 16pt; margin: 0; }
  .roster-print header p { margin: 0; font-size: 9pt; color: #444; }
  .roster-print table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .roster-print th, .roster-print td { border: .3mm solid #999; padding: 1.5mm; vertical-align: top; text-align: left; }
  .roster-print th { font-size: 9pt; background: #f0f0f0; }
  .roster-print th small { display: block; font-weight: 400; }
  .roster-print th:first-child, .roster-print td:first-child { width: 34mm; font-weight: 600; }
  .roster-print tr { break-inside: avoid; }
  .roster-print .pr-shift strong { font-size: 12pt; font-variant-numeric: tabular-nums; }
  .roster-print .pr-shift small { display: block; font-size: 8pt; }
  .roster-print .pr-shift.draft { border: .3mm dashed #666; padding: .5mm 1mm; }
  .roster-print .pr-open td:first-child { font-style: italic; }
  .roster-print td > small { display: block; font-size: 8pt; color: #444; }
  .roster-print .pr-foot { margin-top: 3mm; font-size: 8pt; color: #444; }
}

/* Freigaben bei schmalen Fenstern (iPad hochkant, 1024 px): Spalten brechen um, die Entscheidungsknöpfe bleiben im Bild. */
@media (max-width: 1280px) {
  .approvals table.table td { white-space: normal; }
  .approvals table.table td.num { white-space: nowrap; }
  .approvals table.table td.muted, .approvals table.table td.small { max-width: 200px; overflow-wrap: anywhere; }
  .approvals table.table .actions.wide { white-space: normal; width: auto; min-width: 0; }
  .approvals .row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-right: 0; }
}

/* Eintrag und Nachtrag: Datum etwas breiter als die beiden Uhrzeiten, alle drei bleiben in ihrer Spalte. */
.entry-form .form-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 520px) {
  .entry-form .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .entry-form .form-row > :first-child { grid-column: 1 / -1; }
}
/* iPhone und iPad (Browser und Apps): Datums- und Zeitfelder haben dort eine feste Mindestbreite und ragten über ihre
   Spalte in das Nachbarfeld. Ohne eigenes Aussehen des Systems halten sie die Breite ihrer Spalte. */
@supports (-webkit-touch-callout: none) {
  input[type=date], input[type=time], input[type=month], input[type=datetime-local] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; text-align: left; }
  input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value, input[type=month]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
}
/* Ein Dialog, der selbst den Fokus hat (kein Feld vorgewählt), bekommt keinen Rahmen. */
dialog:focus, dialog:focus-visible { outline: 0; }

/* Feste Leiste im Dienstplan (Tablet und Rechner): Ansicht, Bereich, Zeitraum und „Heute“ stehen immer an derselben Stelle,
   egal ob Woche oder Monat, welche Woche und was rechts gerade steht. Nichts wird mehr mittig zwischen wechselnd breite
   Nachbarn gesetzt; Zeitraum, Bereich und Hauptknopf haben eine feste Breite. */
@media (min-width: 641px) {
  .viewbar.roster-bar .roster-period { margin-inline: 0; }
  .viewbar.roster-bar .viewbar-actions { margin-left: auto; }
  .roster-period .month-nav .label { width: 12.5rem; min-width: 12.5rem; padding-inline: 4px; }
  .viewbar.roster-bar .viewbar-select { width: 11rem; max-width: 11rem; }
  .roster-publish { min-width: 12.5rem; justify-content: center; }
  /* Die Zeile mit Hinweisen (Entwürfe, Lohnkosten) ist immer da, auch leer: Der Plan darunter springt nicht. */
  .roster-status { min-height: 30px; align-items: center; }
}
/* Zeitraum in allen Leisten (Zeiten, Abwesenheiten, Berichte, Lohn): feste Breite ab Tablet, auch hochkant. So stehen
   Auswahl und Ansicht daneben immer am selben Platz, egal ob „Mai 2026“ oder „KW 46 · 09.11. – 15.11.“ dasteht. */
@media (min-width: 641px) {
  .viewbar .period { flex: none; }
  .viewbar .month-nav { flex: none; }
  .viewbar .month-nav .label { flex: none; width: 12.5rem; min-width: 12.5rem; text-align: center; }
}

/* ===== Eigene Zeiten (ownTimes): Kennzahlen, Aufgaben nur bei Bedarf, Tage als Tabelle =====
   Sachlich wie ein gutes Verwaltungswerkzeug: Karten mit feinem Rand, eine Tabelle mit Kopfzeile und Trennlinien,
   kleine rechteckige Marken für Zustände. Farbe nur als Signal (Gelb: bitte handeln, Akzent: läuft gerade). */
.own-times { gap: 20px; }
.ot-head { align-items: center; }
.ot-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.ot-title h1 { margin: 0; }
.ot-title .month-nav .label { width: 9.5rem; min-width: 9.5rem; text-align: center; }

/* Kennzahlen */
.ot-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ot-kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ot-kpi { padding: 18px 20px 20px; gap: 0; }
.ot-kpi h2 { font-size: .9rem; font-weight: 600; margin: 0 0 18px; }
.ot-num { font-size: 1.7rem; line-height: 1.1; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ot-num small { font-size: .95rem; font-weight: 500; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.ot-sub { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 6px; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Marken für Zustände */
.ot-badge { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 500; line-height: 1; padding: 5px 8px; border-radius: 6px; white-space: nowrap; color: var(--muted); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ot-badge.warn { color: var(--warn-text); background: var(--warn-bg); }
.ot-badge.live { color: var(--work-text); background: color-mix(in srgb, var(--work) 14%, transparent); }

/* Zu erledigen */
.ot-todo { padding: 0; gap: 0; }
.ot-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; }
.ot-card-head h2 { font-size: .98rem; font-weight: 600; margin: 0; }
.ot-todo ul { list-style: none; margin: 0; padding: 0 20px 6px; }
.ot-todo li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ot-todo-when { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ot-todo-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; font-weight: 500; }
.ot-todo-what small { font-weight: 400; font-size: .82rem; color: var(--muted); }

/* Tage */
.ot-list { padding: 0; gap: 0; overflow: hidden; }
/* Spalten: Tag | Beginn | Ende | Pause | Hinweis | Ist | Saldo | Aktion. Die Stempel eines Tages stehen als eigene Zeilen
   (.ot-line) im Bereich Beginn bis Hinweis; deren Raster hat dieselben Breiten, damit alles untereinander steht. */
.ot-cols, .ot-day, .ot-week-head { display: grid; grid-template-columns: 64px 56px 62px 64px minmax(0, 1fr) 84px 60px 60px 70px 132px; align-items: center; gap: 14px; padding-inline: 20px; }
.ot-plan, .ot-soll { text-align: right; font-variant-numeric: tabular-nums; }
.ot-day .ot-plan { color: var(--muted); }
.ot-week-head .ot-plan, .ot-week-head .ot-soll { font-size: .86rem; font-weight: 500; color: var(--muted); }
.ot-week-meta { display: none; }
.ot-lines { grid-column: 2 / 6; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ot-line { display: grid; grid-template-columns: 56px 62px 64px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 28px; font-variant-numeric: tabular-nums; }
.ot-line.wide { grid-template-columns: minmax(0, 1fr); }
.ot-b, .ot-e { white-space: nowrap; }
.ot-e sup { font-size: .64rem; color: var(--muted); margin-left: 2px; }
.ot-p { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.ot-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; color: var(--muted); }
.ot-line.muted .ot-b, .ot-line.muted .ot-e { color: var(--muted); }
.ot-live { color: var(--work-text); font-weight: 500; }
.ot-day.run .ot-b { font-weight: 600; }
.ot-cols { padding-block: 13px; font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.ot-ist, .ot-saldo { text-align: right; font-variant-numeric: tabular-nums; }
.ot-act { display: flex; justify-content: flex-end; }
.ot-week-head { padding-block: 9px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); border-bottom: 1px solid var(--line); }
.ot-week-name { grid-column: 1 / 6; display: flex; align-items: baseline; gap: 10px; font-size: .82rem; font-weight: 600; }
.ot-week-name small { font-size: .8rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.ot-week-head .ot-ist, .ot-week-head .ot-saldo { font-size: .86rem; font-weight: 600; }
.ot-week-head .ot-saldo.plus { color: var(--pos); }
.ot-month-row { padding-block: 14px; border-top: 1px solid var(--line); border-bottom: 0; }
.ot-month-row .ot-week-name { font-size: .92rem; }
.ot-month-row .ot-ist, .ot-month-row .ot-saldo { font-size: .95rem; }
.ot-day { min-height: 48px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.ot-list > .ot-week:last-child .ot-day:last-child { border-bottom: 0; }
.ot-date { display: flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; }
.ot-date strong { font-weight: 600; }
.ot-date span { font-size: .8rem; color: var(--muted); }
.ot-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; font-variant-numeric: tabular-nums; }
.ot-span { white-space: nowrap; }
.ot-span sup { font-size: .64rem; color: var(--muted); margin-left: 2px; }
.ot-span small, .ot-blips { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.ot-span small { margin-left: 8px; }
.ot-tag { color: var(--muted); }
.ot-day .ot-saldo { color: var(--muted); }
.ot-saldo.plus { color: var(--pos); }
.ot-day.quiet .ot-date strong { font-weight: 400; color: var(--muted); }
.ot-day .ot-act .btn { white-space: nowrap; }
.ot-run { font-weight: 600; }
.ot-day.today { background: color-mix(in srgb, var(--work) 6%, var(--surface)); }
.ot-day.today .ot-date strong { color: var(--work-text); }
.ot-day.later { color: var(--muted); }
.ot-day.later .ot-date strong { font-weight: 400; }
.ot-later > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-size: .9rem; font-weight: 500; }
.ot-later > summary:hover { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.ot-later > summary::-webkit-details-marker { display: none; }
.ot-later > summary .muted { font-weight: 400; }
.ot-later > summary .chev { width: 14px; height: 14px; margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.ot-later[open] > summary { border-bottom: 1px solid var(--line); }
.ot-later[open] > summary .chev { transform: rotate(180deg); }
.ot-later .ot-week:last-child .ot-day:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .ot-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ot-kpis:not(.two) .ot-kpi:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .own-times { gap: 14px; }
  .ot-title { gap: 10px; }
  .ot-title .month-nav .label { width: auto; min-width: 7.6rem; }
  .ot-kpis { gap: 10px; }
  .ot-kpi { padding: 14px 16px 16px; }
  .ot-kpi h2 { margin-bottom: 10px; }
  .ot-num { font-size: 1.45rem; }
  .ot-card-head { padding: 14px 16px; }
  .ot-todo ul { padding: 0 16px 4px; }
  .ot-todo li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .ot-todo-when { grid-column: 1 / -1; font-size: .8rem; }
  .ot-cols { display: none; }
  .ot-day, .ot-week-head { grid-template-columns: 52px minmax(0, 1fr) auto auto; padding-inline: 16px; gap: 10px; }
  .ot-week-name { grid-column: 1 / 3; }
  .ot-lines { grid-column: 2; }
  .ot-line { grid-template-columns: auto auto minmax(0, 1fr); gap: 2px 10px; }
  .ot-line .ot-p { grid-column: 1 / -1; }
  .ot-line .ot-p::before { content: "Pause "; }
  .ot-line .ot-p.none { display: none; }
  .ot-e::before { content: "– "; color: var(--muted); }
  .ot-e:empty::before { content: none; }
  .ot-line .ot-note:not(:empty) { grid-column: 1 / -1; }
  .ot-line .ot-note:empty { display: none; }
  .ot-p { font-size: .8rem; }
  .ot-day .ot-ist, .ot-week-head .ot-ist { min-width: 2.6rem; text-align: right; }
  .ot-plan, .ot-soll { display: none; }
  .ot-week-meta:not(:empty) { display: block; grid-column: 1 / -1; margin-top: -4px; font-size: .78rem; color: var(--muted); font-weight: 400; }
  .ot-day .ot-act { grid-column: 2 / -1; justify-content: flex-start; }
  .ot-day .ot-act:empty, .ot-week-head .ot-act { display: none; }
  .ot-span small { display: block; margin-left: 0; }
}

/* Eigener Monatskalender (Abwesenheiten): füllt die Breite. Ab Tablet flache, breite Kacheln mit der Zahl oben links
   und der Art ausgeschrieben; am Handy bleiben es Quadrate mit Kürzel. */
.pm-long { display: none; }
@media (min-width: 641px) {
  .pm-head, .pm-grid { gap: 6px; }
  .pm-head span { text-align: left; padding-left: 12px; }
  .pm-cell { aspect-ratio: auto; height: clamp(76px, 10.5vh, 112px); align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 10px 12px; border-radius: 10px; text-align: left; }
  .pm-cell.ac-tile { height: clamp(76px, 10.5vh, 112px); }
  .pm-d { font-size: 1rem; }
  .pm-short { display: none; }
  .pm-long { display: block; }
  .pm-l { font-size: .76rem; font-weight: 500; letter-spacing: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pm-plan { color: var(--muted); }
  .pm-cell.blocked::after { left: 12px; right: 12px; top: 4px; }
}

/* Tagesdetails (Klick auf einen Tag in den eigenen Zeiten) */
.ot-day.tap { cursor: pointer; }
@media (hover: hover) {
  .ot-day.tap:hover { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
  .ot-day.today.tap:hover { background: color-mix(in srgb, var(--work) 10%, var(--surface)); }
}
.ot-day.tap:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.td { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 641px) { .td { min-width: 440px; } }
.td-figs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.td-fig { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.td-fig + .td-fig { border-left: 1px solid var(--line); }
.td-fig span { font-size: .78rem; color: var(--muted); }
.td-fig strong { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.td-fig.plus strong { color: var(--pos); }
.td-fig.minus strong { color: var(--neg); }
.td-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.td-meta strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.td-steps { list-style: none; margin: 0; padding: 0; }
.td-step { position: relative; display: grid; grid-template-columns: 6.6rem 14px 1fr; align-items: center; gap: 14px; padding-block: 9px; }
.td-step::before { content: ""; position: absolute; left: calc(6.6rem + 14px + 6px); top: 0; bottom: 0; width: 2px; background: var(--line); }
.td-step:first-child::before { top: 50%; }
.td-step:last-child::before { bottom: 50%; }
.td-step:only-child::before { display: none; }
.td-time { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--work); }
.td-step.pause .td-dot { width: 10px; height: 10px; margin-left: 2px; border-color: var(--muted); }
.td-step.pause .td-time { font-weight: 400; color: var(--muted); }
.td-step.warn .td-dot { border-color: var(--neg); }
.td-step.live .td-dot { background: var(--work); }
.td-what { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.td-what small { color: var(--muted); font-size: .8rem; }
.td-step.muted .td-time, .td-step.muted .td-what { color: var(--muted); }
.td-step.muted .td-dot { border-color: var(--muted); }
.td-pend { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.td-pend-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-empty { margin: 0; color: var(--muted); }
/* Feld „Ende“ mit Schalter „nach Bedarf“ (Dienstplan) */
.end-field { display: flex; flex-direction: column; gap: 6px; }
.end-field .end-open { margin: 0; font-size: .82rem; color: var(--muted); }
.td-entry { display: flex; flex-direction: column; gap: 6px; }
.td-entry + .td-entry { padding-top: 12px; border-top: 1px solid var(--line); }
.td-del { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: calc(6.6rem + 28px); }
.td-del .btn .icon { width: 15px; height: 15px; }
.td-blip .td-del, .td-blip .td-pend-head { padding-left: 0; }
@media (max-width: 520px) { .td-del { padding-left: calc(5.4rem + 26px); } }
@media (max-width: 520px) {
  .td-step { grid-template-columns: 5.4rem 14px 1fr; gap: 12px; }
  .td-step::before { left: calc(5.4rem + 12px + 6px); }
  .td-fig { padding: 10px 12px; }
  .td-fig strong { font-size: 1.1rem; }
}

/* Zeiten mit Dienstplan- und Soll-Spalte: auf schmaleren Flächen (iPad hoch, kleine Laptops) enger */
@media (min-width: 641px) and (max-width: 1180px) {
  .ot-cols, .ot-day, .ot-week-head { grid-template-columns: 52px 46px 58px 52px minmax(0, 1fr) 76px 50px 50px 58px auto; gap: 10px; padding-inline: 16px; }
  .ot-line { grid-template-columns: 46px 58px 52px minmax(0, 1fr); gap: 10px; }
}

/* ===== Feinschliff (11/2026): feinere Schrift, leisere Linien, weichere Tiefe =====
   Ändert nur Farbe, Linie, Schatten, Rundung und Schriftbild. Maße von Leisten und Rastern bleiben, damit nichts springt.
   Die Apps (app/native) überschreiben am Handy vieles davon mit ihrem eigenen Bild. */
:root {
  --warn-bg: #fbf3e0;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 30, 29, .04), 0 3px 8px -5px rgba(31, 30, 29, .09), 0 0 0 1px rgba(31, 30, 29, .025);
  --shadow-md: 0 8px 20px -8px rgba(31, 30, 29, .14), 0 2px 5px rgba(31, 30, 29, .05);
  --shadow-lg: 0 22px 48px -14px rgba(31, 30, 29, .2), 0 4px 10px rgba(31, 30, 29, .05);
  --shadow-xl: 0 40px 90px -24px rgba(31, 30, 29, .32), 0 8px 20px rgba(31, 30, 29, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --warn-bg: #372d18;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28), 0 0 0 1px rgba(255, 255, 255, .035);
    --shadow-md: 0 8px 20px -8px rgba(0, 0, 0, .5), 0 2px 5px rgba(0, 0, 0, .3);
    --shadow-lg: 0 22px 48px -14px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .35);
    --shadow-xl: 0 40px 90px -24px rgba(0, 0, 0, .7), 0 8px 20px rgba(0, 0, 0, .4);
  }
}

/* ---------- Schrift: etwas enger gesetzt, mit optischer Größe und sauberem Ausgleich ---------- */
body { letter-spacing: -.006em; text-rendering: optimizeLegibility; font-optical-sizing: auto; font-kerning: normal; }
h2, h3 { letter-spacing: -.014em; }
.page-head .sub { color: color-mix(in srgb, var(--muted) 92%, var(--text)); }

/* ---------- Knöpfe ---------- */
.btn { box-shadow: 0 1px 1px rgba(31, 30, 29, .035); }
.btn-ghost, .btn-link, .month-nav .btn, .btn-on-block.secondary, .btn-on-ink { box-shadow: none; }
/* Dunkler Knopf: feine Lichtkante oben, klarer Schatten darunter. */
.btn-primary, .btn-in, .btn-out, .seg button.active, .chip-btn.active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 1px 2px rgba(31, 30, 29, .22);
}
/* Gesperrter Hauptknopf: helle, ruhige Fläche statt grauem Block (beim Laden bleibt er dunkel). */
.btn-primary:disabled:not(.is-busy) {
  opacity: 1; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); border-color: transparent;
  color: color-mix(in srgb, var(--muted) 78%, transparent); box-shadow: none;
}
.btn-primary:disabled:not(.is-busy):hover { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); border-color: transparent; }
/* Innenliegende Knöpfe folgen der Rundung ihres Rahmens. */
.seg button, .month-nav .btn { border-radius: 7px; }

/* ---------- Häkchen und Auswahlpunkte: eigene Form statt der des Systems ---------- */
:where(input[type=checkbox]), :where(input[type=radio]) {
  appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 0; padding: 0; min-height: 0;
  border: 1.5px solid color-mix(in srgb, var(--muted) 50%, var(--line)); background: var(--surface) center / 12px 12px no-repeat;
  cursor: pointer; vertical-align: -3px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
:where(input[type=checkbox]) { border-radius: 5px; }
:where(input[type=radio]) { border-radius: 50%; }
:where(input[type=checkbox], input[type=radio]):hover { border-color: var(--muted); }
:where(input[type=checkbox]):checked {
  background-color: var(--ink); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-5'/%3E%3C/svg%3E");
}
:where(input[type=checkbox]):indeterminate {
  background-color: var(--ink); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E");
}
:where(input[type=radio]):checked { border-color: var(--ink); background-image: radial-gradient(circle, var(--ink) 0 3.6px, transparent 4.4px); background-size: 100% 100%; }
:where(input[type=checkbox], input[type=radio]):disabled { opacity: .5; cursor: not-allowed; }
:where(input[type=checkbox], input[type=radio]):focus-visible { outline: 0; border-color: var(--focus); box-shadow: var(--ring); }
@media (prefers-color-scheme: dark) {
  :where(input[type=checkbox]):checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231f1e1d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-5'/%3E%3C/svg%3E");
  }
  :where(input[type=checkbox]):indeterminate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231f1e1d' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E");
  }
}

/* ---------- Hinweise: heller Grund, feine Linie statt kräftigem Rahmen ---------- */
.notice { border-color: color-mix(in srgb, var(--warn-line) 50%, transparent); }
.status.st-pending, .chip-pending { border-color: color-mix(in srgb, var(--warn-line) 55%, transparent); }

/* ---------- Dienstplan: Kacheln mit leiser Kontur, die Abteilungsfarbe trägt ---------- */
.shift { border-radius: 6px; border-color: color-mix(in srgb, var(--dept, var(--plan)) 34%, var(--line)); border-left-color: var(--dept, var(--plan)); background: color-mix(in srgb, var(--dept, var(--plan)) 9%, var(--surface)); }
.who { border-radius: 6px; }
.tv-bar { border-width: 1px; border-color: color-mix(in srgb, var(--plan) 55%, transparent); border-radius: 7px; }
.shift.warn, .tv-bar.warn { border-color: color-mix(in srgb, var(--neg) 70%, transparent); }
.shift.open-shift { border-color: color-mix(in srgb, var(--work) 75%, transparent); }
.shift.draft { border-color: color-mix(in srgb, var(--plan) 60%, transparent); border-left-color: var(--dept, var(--plan)); }
.can-edit .shift:hover { box-shadow: 0 2px 6px -2px rgba(31, 30, 29, .18); }

/* ---------- Tabellen, Menüs, Fenster ---------- */
.table th { letter-spacing: 0; }
.table tr.clickable td { transition: background-color var(--dur) var(--ease); }
dialog::backdrop { background: rgba(31, 30, 29, .4); -webkit-backdrop-filter: blur(5px) saturate(1.05); backdrop-filter: blur(5px) saturate(1.05); }
.float-menu, .picker-pop, .account-menu, .company-menu { box-shadow: var(--shadow-lg); }

/* Kopfzeile der eigenen Zeiten: alle Spaltentitel gleich groß. */
.ot-cols .ot-p, .ot-cols .ot-plan, .ot-cols .ot-soll { font-size: inherit; color: inherit; font-weight: inherit; }

/* ===== Bausteine nach shadcn/ui (Aufbau und Maße aus deren offenem Code, Farben und Schrift von Noya) ===== */

/* ---------- KI-Eingabe als ein Feld („Prompt Input“: Input Group mit Anhängen oben und Knöpfen unten) ---------- */
.ai-input { border-top: 0; padding: 6px 12px 8px; gap: 0; }
.ai-group {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid transparent; border-radius: 16px; cursor: text;
  background: color-mix(in srgb, var(--ink) 5%, var(--surface));
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.ai-group:focus-within { border-color: color-mix(in srgb, var(--focus) 65%, transparent); box-shadow: var(--ring); }
.ai-group > textarea.ai-text, .ai-group > textarea.ai-text:focus, .ai-group > textarea.ai-text:hover {
  flex: none; width: 100%; min-height: 44px; padding: 12px 12px 6px; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
}
.ai-group .ai-input-row { align-items: center; gap: 8px; padding: 2px 10px 8px; }
.ai-spacer { flex: 1; }
.ai-attach, .ai-group .ai-mic, .ai-group .ai-live-btn, .ai-group .ai-send { flex: none; width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.ai-attach { border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform .1s var(--ease); }
.ai-attach:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.ai-attach:active { transform: scale(.94); }
.ai-attach .icon, .ai-group .ai-send .icon, .ai-group .ai-mic .icon, .ai-group .ai-live-btn .icon { width: 16px; height: 16px; }
.ai-group .ai-send { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 1px 2px rgba(31, 30, 29, .22); }
.ai-group .ai-send:disabled { opacity: 1; background: color-mix(in srgb, var(--ink) 14%, var(--surface)); color: color-mix(in srgb, var(--muted) 75%, transparent); box-shadow: none; }
.ai-attach:focus-visible, .ai-group .ai-send:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
/* Anhänge („Attachment“, klein): Marke mit Symbolfeld, Name und Entfernen. */
.ai-group .ai-files { gap: 8px; padding: 8px 10px 0; }
.ai-file { gap: 8px; padding: 5px 4px 5px 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .76rem; font-weight: 500; line-height: 1.2; }
.ai-file-media { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.ai-file-media .icon { width: 15px; height: 15px; color: inherit; }
.ai-file .name { max-width: 180px; }
.ai-file .x { width: 24px; height: 24px; padding: 0; border-radius: 8px; display: grid; place-items: center; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.ai-file .x:hover { background: var(--surface-2); color: var(--text); }
.ai-file .x .icon { width: 13px; height: 13px; }
.ai-msg-files .ai-file { padding: 4px 8px 4px 6px; border-radius: 8px; }
/* Finger brauchen größere Ziele. */
@media (pointer: coarse) {
  .ai-attach, .ai-group .ai-mic, .ai-group .ai-live-btn, .ai-group .ai-send { width: 40px; height: 40px; }
  .ai-attach .icon, .ai-group .ai-send .icon, .ai-group .ai-mic .icon, .ai-group .ai-live-btn .icon { width: 18px; height: 18px; }
  .ai-file .x { width: 30px; height: 30px; }
}

/* ---------- Code-Eingabe in Kästchen („Input OTP“) ---------- */
.otp { position: relative; display: inline-flex; align-items: center; gap: 10px; align-self: center; max-width: 100%; }
.field > .otp { align-self: flex-start; }
.otp-slots { display: flex; }
.otp-slot {
  position: relative; display: flex; align-items: center; justify-content: center; width: 46px; height: 54px;
  border: 1px solid color-mix(in srgb, var(--muted) 38%, var(--line)); border-left-width: 0; background: var(--surface); color: var(--text);
  font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.otp-slots .otp-slot:first-child { border-left-width: 1px; border-radius: 10px 0 0 10px; }
.otp-slots .otp-slot:last-child { border-radius: 0 10px 10px 0; }
.otp-slot.active { z-index: 1; border-color: var(--work); box-shadow: 0 0 0 1px var(--work), var(--ring); }
.otp-slot.caret::after { content: ""; width: 1.5px; height: 22px; border-radius: 1px; background: var(--text); animation: otp-caret 1.1s steps(1, end) infinite; }
@keyframes otp-caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.otp-sep { flex: none; width: 10px; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.field.invalid .otp-slot, .otp:has(.otp-input[aria-invalid="true"]) .otp-slot { border-color: var(--neg); }
/* Das echte Feld: deckt alles ab, zeigt aber weder Text noch Rahmen (16 px gegen das Hineinzoomen am iPhone). */
div.otp > input.otp-input, div.otp > input.otp-input:focus, div.otp > input.otp-input:hover {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0 !important; border-radius: 10px;
  background: transparent !important; box-shadow: none !important; outline: 0; color: transparent; caret-color: transparent;
  font-size: 16px; letter-spacing: 0; text-align: left; cursor: text; -webkit-text-fill-color: transparent;
}
div.otp > input.otp-input::selection { background: transparent; }
@media (max-width: 380px) { .otp { gap: 6px; } .otp-slot { width: 40px; height: 50px; font-size: 1.3rem; } }
dialog .otp-slot { width: 42px; height: 48px; font-size: 1.3rem; }

/* ---------- Schalter für Ein/Aus („Switch“) ---------- */
input[type=checkbox].switch {
  position: relative; width: 34px; height: 20px; border: 1px solid transparent; border-radius: 999px; background-image: none;
  background-color: color-mix(in srgb, var(--muted) 42%, var(--surface)); box-shadow: inset 0 1px 1px rgba(31, 30, 29, .08);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input[type=checkbox].switch::before {
  content: ""; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(31, 30, 29, .28); transition: transform var(--dur) var(--ease);
}
input[type=checkbox].switch:hover { border-color: transparent; }
input[type=checkbox].switch:checked { background-color: var(--ink); background-image: none; border-color: transparent; }
input[type=checkbox].switch:checked::before { transform: translateX(14px); }
input[type=checkbox].switch:focus-visible { border-color: transparent; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
@media (prefers-color-scheme: dark) {
  input[type=checkbox].switch { background-color: color-mix(in srgb, var(--muted) 45%, var(--surface)); background-image: none; }
  input[type=checkbox].switch:checked { background-image: none; }
  input[type=checkbox].switch:checked::before { background: var(--on-ink); }
}
@media (pointer: coarse) {
  input[type=checkbox].switch { width: 44px; height: 26px; }
  input[type=checkbox].switch::before { width: 22px; height: 22px; }
  input[type=checkbox].switch:checked::before { transform: translateX(18px); }
}

/* ===== Datums- und Uhrzeitauswahl (Kalender nach „Calendar“ von shadcn/ui: Zellen im Raster, 12 px Rand) ===== */
/* Das eigene Symbol steht rechts im Feld; die Auswahl des Systems öffnet sich nicht mehr. */
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { display: none; }
input[type=date], input[type=time] {
  cursor: pointer; padding-right: 34px; background-repeat: no-repeat; background-position: right 10px center; background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6d66' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
input[type=time] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6d66' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  input[type=date] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a59c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
  input[type=time] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a59c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
}
input[type=date]:disabled, input[type=time]:disabled { cursor: not-allowed; }
/* Touch: Die Felder nehmen keine Berührung an, sonst öffnet iOS beim Fokus seine eigene Auswahl (siehe pickTarget). */
@media (pointer: coarse) { input[type=date], input[type=time] { pointer-events: none; } }
html.noya-app input[type=date], html.noya-app input[type=time] { pointer-events: none; }

dialog.pick { padding: 0; width: fit-content; max-width: calc(100vw - 16px); overflow: visible; border-radius: var(--radius-xl); background: var(--surface); color: var(--text); }
dialog.pick.anchored { position: fixed; right: auto; bottom: auto; margin: 0; box-shadow: var(--shadow-lg); }
dialog.pick.anchored::backdrop { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
dialog.pick.anchored[open] { animation: pop-in .14s ease-out; }
@media (max-width: 640px) { dialog.pick { width: 100%; max-width: none; padding-bottom: env(safe-area-inset-bottom, 0px); } dialog.pick > * { margin-inline: auto; } }
@media (min-width: 641px) and (max-width: 900px) { dialog.pick { width: fit-content; margin: auto; border-radius: var(--radius-xl); } dialog.pick[open] { animation: dialog-in .22s var(--ease); } }

.cal { --cell: 36px; width: fit-content; padding: 12px; user-select: none; -webkit-user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: var(--cell); margin-bottom: 6px; }
.cal-nav { flex: none; width: var(--cell); height: var(--cell); padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.cal-nav:hover { background: var(--surface-2); }
.cal-nav:disabled { opacity: .3; cursor: default; background: none; }
.cal-nav .icon { width: 16px; height: 16px; }
.cal-nav .flip { transform: rotate(180deg); }
.cal-caption { display: flex; align-items: center; gap: 2px; }
.cal .cal-caption select.cal-select {
  width: auto; min-height: 0; height: 30px; padding: 0 22px 0 8px; border: 0; border-radius: 8px; background-color: transparent;
  background-position: right 4px center; background-size: 14px 14px; box-shadow: none; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.cal .cal-caption select.cal-select:hover { background-color: var(--surface-2); }
.cal-weekdays, .cal-week { display: grid; grid-template-columns: repeat(7, var(--cell)); }
.cal-weekdays span { height: 26px; line-height: 26px; text-align: center; font-size: .78rem; color: var(--muted); }
.cal-week { margin-top: 2px; }
.cal-day {
  position: relative; width: var(--cell); height: var(--cell); padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text);
  font: inherit; font-size: .88rem; font-variant-numeric: tabular-nums; display: grid; place-items: center; cursor: pointer;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.out { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.cal-day.today { background: var(--surface-2); font-weight: 600; }
.cal-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--work); }
.cal-day.sel, .cal-day.sel:hover { background: var(--ink); color: var(--on-ink); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13); }
.cal-day.sel.today::after { background: var(--on-ink); }
.cal-day:disabled { opacity: .3; cursor: default; background: none; }
.cal-day:focus-visible, .tp-grid button:focus-visible { outline: 0; z-index: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.cal-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal > .cal-foot { justify-content: space-between; }

.tp { width: min(332px, calc(100vw - 16px)); padding: 14px; user-select: none; -webkit-user-select: none; }
.tp-display { text-align: center; font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tp-label { margin: 10px 2px 6px; font-size: .68rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.tp-grid.few { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tp-grid button {
  height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: .9rem;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .12s var(--ease), color .12s var(--ease);
}
.tp-grid button:hover { background: var(--surface-2); }
.tp-grid button.sel, .tp-grid button.sel:hover { background: var(--ink); color: var(--on-ink); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13); }
.tp-fine { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.tp .spacer { flex: 1; }
/* Finger brauchen größere Felder. */
@media (pointer: coarse) {
  .cal { --cell: 44px; padding: 14px; }
  .cal-day { font-size: 1rem; }
  .cal .cal-caption select.cal-select { height: 38px; font-size: 1rem; }
  .tp { width: min(372px, calc(100vw - 16px)); }
  .tp-grid button { height: 44px; font-size: 1rem; }
}
@media (pointer: coarse) and (max-width: 360px) { .cal { --cell: 40px; padding: 10px; } }

/* ===== Bausteine II nach shadcn/ui: Button Group, Menüs, Command, Combobox, Kbd, Empty, Sidebar, Skeleton, Scroll Area =====
   Aufbau und Maße aus deren offenem Code, Farben und Schrift von Noya. Gilt für alle Seiten, weil es die gemeinsamen
   Bausteine trifft (Leisten, Menüs, Suche, Auswahllisten), nicht einzelne Seiten. Höhen der Leisten bleiben. */

/* ---------- Button Group: Blättern (Monat, Woche, Tag) und Umschalter als verbundene Gruppe ---------- */
.month-nav { padding: 0; gap: 0; align-items: stretch; overflow: hidden; border-radius: var(--radius); box-shadow: 0 1px 1px rgba(31, 30, 29, .035); }
.month-nav > .btn, .viewbar .month-nav > .btn {
  flex: none; width: 36px; min-width: 36px; height: auto; min-height: 34px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text);
}
.month-nav > .btn:first-child { border-right: 1px solid var(--line); }
.month-nav > .btn:last-child { border-left: 1px solid var(--line); }
.month-nav > .btn:hover { background: var(--surface-2); }
.month-nav > .btn:active { transform: none; background: color-mix(in srgb, var(--ink) 9%, var(--surface)); }
.month-nav > .btn .icon { width: 16px; height: 16px; }
.month-nav .flip { transform: rotate(180deg); }
.month-nav > .label { align-self: center; padding-inline: 14px; font-weight: 500; }
.month-nav .today-btn { margin: 0 6px 0 -6px; }
.month-nav.month-nav-wide > .btn { width: 44px; min-width: 44px; }

.seg { padding: 0; gap: 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 1px 1px rgba(31, 30, 29, .035); }
.seg button { border-radius: 0; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover:not(.active) { background: var(--surface-2); }
.seg button.active { box-shadow: none; }
.seg button.active + button, .seg button.active { border-left-color: transparent; }
.seg button:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }

/* ---------- Menüs (Dropdown Menu, Context Menu, Popover): eine Form für alle ---------- */
.float-menu, .account-menu, .company-menu, .picker-pop {
  padding: 4px; border: 1px solid color-mix(in srgb, var(--line) 90%, transparent); border-radius: 12px; box-shadow: var(--shadow-md);
}
.account-menu :is(a, button), .company-menu :is(a, button), .menu-item, .quick-more, .picker-pop .palette-item {
  gap: 8px; min-height: 34px; padding: 6px 8px; border-radius: 8px; font-size: .9rem;
}
.account-menu :is(a, button) .icon, .company-menu :is(a, button) .icon, .menu-item .icon, .quick-more .icon, .picker-pop .palette-item .icon { width: 16px; height: 16px; flex: none; }
.menu-item { align-items: center; }
.menu-item .icon { margin-top: 0; }
.menu-list { gap: 0; }
.company-menu .menu-title, .menu-title, .quick-group > .muted:first-child { padding: 6px 8px 4px; font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.menu-sep, .account-menu .menu-sep, .roster-menu .menu-sep { height: 0; margin: 4px -4px; border: 0; border-top: 1px solid var(--line); background: none; }
.account-menu-head { margin: 0 -4px 4px; padding: 8px 12px 10px; }
.company-menu .current { font-weight: 500; }
.company-menu .current > .icon:last-child, .picker-pop .palette-item > .icon:last-child { margin-left: auto; color: var(--text); }
.reject-pop { padding: 8px; }
/* Tastenkürzel im Menü: rechts, klein, ohne Kasten. */
.float-menu kbd, .roster-menu kbd, .quick-more kbd { margin-left: auto; height: auto; min-width: 0; padding: 0; background: none; font-size: .75rem; letter-spacing: .08em; color: var(--muted); }

/* ---------- Command (Suche) und Combobox (Auswahl mit Suche) ---------- */
dialog.palette { border-radius: 14px; }
.palette-search { margin: 8px 8px 0; height: 38px; padding: 0 10px; gap: 8px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.palette-search .icon { width: 16px; height: 16px; flex: none; }
.palette-list { padding: 6px 8px 8px; gap: 1px; scroll-padding-block: 6px; }
.palette-item { gap: 10px; min-height: 36px; padding: 7px 8px; border-radius: 8px; font-size: .92rem; }
.palette-item .icon { width: 16px; height: 16px; flex: none; }
.palette-item.sel { background: var(--surface-2); box-shadow: none; }
.palette-item .hint { font-size: .76rem; }
.picker-pop .palette-search { margin: 4px 4px 0; height: 34px; }
.picker-pop .palette-list { padding: 4px 0 0; }
.picker-btn { box-shadow: 0 1px 1px rgba(31, 30, 29, .035); }
.picker-btn > .icon:last-child { width: 15px; height: 15px; }

/* ---------- Kbd: Tastenkürzel als flache Marke ---------- */
kbd { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 5px; border: 0; border-radius: 5px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); font: 500 .72rem var(--font); line-height: 1; }

/* ---------- Seitenleiste (Sidebar): ruhige Gruppentitel, Akzentfläche statt Karte ---------- */
.nav-sep { padding: 16px 10px 6px; font-size: .76rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: color-mix(in srgb, var(--muted) 92%, var(--text)); }
.nav a, .nav-group-btn, .subnav a { gap: 10px; border-radius: 8px; }
.nav a.active, .subnav a.active { background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: none; }
.nav a:hover, .nav-group-btn:hover, .subnav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.company-block, .account { border-radius: 10px; }
.company-block:hover, .account:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); border-color: transparent; box-shadow: none; }
.company-block.static:hover { background: transparent; }
.company-block .chev, .account .chev { width: 16px; height: 16px; color: var(--muted); }
.company-tile { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 600; line-height: 1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.company-menu .company-tile { width: 24px; height: 24px; border-radius: 7px; font-size: .74rem; }
.search-btn { border-radius: 10px; box-shadow: 0 1px 1px rgba(31, 30, 29, .035); }

/* ---------- Empty: leerer Zustand mittig, Symbol in einer Kachel ---------- */
.empty-state { flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 14px; padding: 36px 24px; text-align: center; background: none; border-color: color-mix(in srgb, var(--muted) 35%, var(--line)); }
.empty-state > .icon { box-sizing: border-box; width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--surface-2); color: var(--text); stroke-width: 1.6; }
.empty-state > div { flex: none; align-items: center; gap: 6px; max-width: 26rem; }
.empty-state > div > strong { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.empty-state > div > span { font-size: .9rem; line-height: 1.55; text-wrap: balance; }
.empty { font-size: .92rem; text-wrap: balance; }

/* ---------- Skeleton: ruhiges Pulsieren ---------- */
.sk { border-radius: 8px; background: color-mix(in srgb, var(--ink) 8%, transparent); animation: sk-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
.sk::after { display: none; }
@keyframes sk-pulse { 50% { opacity: .5; } }

/* ---------- Scroll Area: schmale, runde Laufleisten ---------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 32%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--muted) 32%, transparent); background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.palette-search input.palette-input, .palette-search input.palette-input:focus, .palette-search input.palette-input:hover { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0; }
.tv-step .flip { transform: rotate(180deg); }
.tv-step .btn .icon { width: 16px; height: 16px; }

/* ===== Paket 1 nach shadcn/ui: Toast, Tooltip, Alert Dialog. Nur was vorher schwächer war; Felder, Reiter, Marken und
   Listen waren schon gleichwertig und bleiben. ===== */

/* ---------- Toast: helle Karte mit Symbol, Aktion als Knopf (statt schwarzem und rotem Block) ---------- */
.toast, .toast.with-action {
  display: flex; align-items: flex-start; gap: 10px; width: max-content; max-width: min(380px, calc(100vw - 32px)); padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent); border-radius: 12px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 500; line-height: 1.4;
}
.toasts { align-items: flex-end; }
.toast-icon { flex: none; width: 17px; height: 17px; margin-top: 1.5px; color: var(--pos); stroke-width: 2; }
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast.error { background: var(--surface); color: var(--text); border-color: color-mix(in srgb, var(--neg) 35%, var(--line)); }
.toast.error .toast-icon { color: var(--neg); }
.toast-action {
  flex: none; align-self: center; height: 26px; margin: -2px -4px -2px 4px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--ink); color: var(--on-ink);
  font-size: .8rem; font-weight: 500; text-decoration: none; transition: opacity var(--dur) var(--ease);
}
.toast-action:hover { opacity: .88; }
.toast-action:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
html.noya-app .toast, html.noya-app .toast.error { border-radius: 16px; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); background: var(--surface); color: var(--text); box-shadow: 0 8px 24px rgba(31, 30, 29, .16); padding: 13px 16px; }
html.noya-app .toast-action { height: 32px; border-radius: 10px; }

/* ---------- Tooltip: dunkle Marke über dem Element ---------- */
.tip {
  position: fixed; z-index: 300; left: 0; top: 0; width: max-content; max-width: 280px; padding: 6px 10px; border-radius: 8px; pointer-events: none;
  background: var(--ink); color: var(--on-ink); font-size: .76rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-align: left;
  white-space: pre-line; text-wrap: balance; box-shadow: var(--shadow-md); animation: tip-in .12s var(--ease);
}
.tip.below { animation-name: tip-in-below; }
@keyframes tip-in { from { opacity: 0; transform: translateY(3px) scale(.97); } }
@keyframes tip-in-below { from { opacity: 0; transform: translateY(-3px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .tip { animation: none; } }

/* ---------- Alert Dialog: Löschen als rote Fläche mit weißer Schrift (vorher rote Schrift auf Schwarz) ---------- */
.btn-primary.btn-danger, html.noya-app .btn-primary.btn-danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn-primary.btn-danger:hover { background: color-mix(in srgb, var(--neg) 88%, #000); border-color: color-mix(in srgb, var(--neg) 88%, #000); }
.btn-primary.btn-danger:focus-visible { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px color-mix(in srgb, var(--neg) 55%, transparent); }
@media (prefers-color-scheme: dark) { .btn-primary.btn-danger, html.noya-app .btn-primary.btn-danger { color: #1f1e1d; } }
dialog.alert-dialog { width: min(440px, calc(100vw - 32px)); }
dialog.alert-dialog .dialog-body > p { color: var(--muted); line-height: 1.5; }

/* ---------- Zweite Leiste (Personalakte, Lohn, Einstellungen): Gruppentitel wie in der Hauptleiste ---------- */
.subnav-group { font-size: .76rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: color-mix(in srgb, var(--muted) 92%, var(--text)); }

/* ===== Paket 2 nach shadcn/ui (AI Elements): Arbeitsschritte und Bestätigung. Nachrichten und Vorschläge waren schon
   gleichwertig und bleiben. ===== */
/* ---------- Arbeitsschritte („Task“, „Chain of Thought“): laufender Schritt, danach aufklappbare Zusammenfassung ---------- */
.ai-steps { align-self: stretch; font-size: .84rem; color: var(--muted); }
.ai-steps summary { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 8px 3px 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.ai-steps summary::-webkit-details-marker { display: none; }
.ai-steps summary:hover { background: var(--surface-2); color: var(--text); }
.ai-steps summary:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.ai-steps-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-steps .chev { width: 14px; height: 14px; flex: none; transition: transform var(--dur) var(--ease); transform: rotate(-90deg); }
.ai-steps[open] .chev { transform: none; }
.ai-step-icon { width: 14px; height: 14px; flex: none; stroke-width: 2; }
.ai-steps.done summary .ai-step-icon { color: var(--pos); }
.ai-spin { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--work) 30%, transparent); border-top-color: var(--work); animation: spin .8s linear infinite; }
.ai-steps ol { list-style: none; margin: 6px 0 2px 1px; padding: 0 0 0 13px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ai-steps li { display: flex; align-items: center; gap: 8px; }
.ai-steps li.now { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .ai-spin { animation: none; border-top-color: color-mix(in srgb, var(--work) 30%, transparent); background: var(--work); border-width: 4px; width: 9px; height: 9px; } }

/* ---------- Bestätigung („Confirmation“): ruhiger Kopf, nach der Entscheidung das Ergebnis ---------- */
.ai-actions { border-radius: 14px; padding: 12px 14px; border-color: color-mix(in srgb, var(--line) 90%, transparent); }
.ai-actions-head { gap: 7px; font-size: .8rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.ai-actions-head.ok { color: var(--pos); }
.ai-actions-head.bad { color: var(--neg); }
.ai-actions-head .icon { stroke-width: 2; }
.ai-warn { border-color: color-mix(in srgb, var(--warn-line) 50%, transparent); border-radius: 10px; }
.ai-actions-buttons { padding-top: 2px; }

/* ===== Paket 3 nach shadcn/ui: Diagramme in Berichten, Fortschritt, Berichtsliste. Die Tabellen selbst waren schon
   gleichwertig (Sortieren, feste Kopfzeile, Summen) und bleiben. ===== */
/* ---------- Chart: Säulen mit Hilfslinien, Legende darunter ---------- */
.report-body { display: flex; flex-direction: column; gap: 14px; }
.chart { margin: 0; width: fit-content; max-width: 100%; box-sizing: border-box; padding: 16px 18px 12px; border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-sm); }
.chart-scroll { overflow-x: auto; scrollbar-width: none; }
.chart-scroll::-webkit-scrollbar { display: none; }
.chart-svg { display: block; max-width: none; font-variant-numeric: tabular-nums; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-grid.base { stroke-dasharray: none; stroke: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.ch-tick, .ch-label { fill: var(--muted); font-size: 11.5px; }
.ch-value { fill: var(--text); font-size: 11px; font-weight: 500; }
.ch-bar.ch-plan { fill: color-mix(in srgb, var(--plan) 34%, var(--surface)); }
.ch-bar.ch-ist { fill: var(--work); }
.ch-hit { fill: transparent; }
.ch-group:hover .ch-hit { fill: color-mix(in srgb, var(--ink) 4%, transparent); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; padding-left: 44px; font-size: .8rem; color: var(--muted); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ch-swatch { width: 10px; height: 10px; border-radius: 3px; }
.ch-swatch.ch-plan { background: color-mix(in srgb, var(--plan) 34%, var(--surface)); }
.ch-swatch.ch-ist { background: var(--work); }
.chart-unit { margin-left: auto; padding-left: 24px; }
@media (max-width: 640px) { .chart { padding: 14px 12px 10px; } .chart-legend { padding-left: 0; } }

/* ---------- Progress: schmale runde Spur ---------- */
.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); margin: 0; }
.progress > div { border-radius: 999px; background: var(--ink); transition: width .3s var(--ease); }
.ob-card-text > .progress { width: min(260px, 100%); margin-top: 8px; }

/* ---------- Berichtsliste: Zeilen mit feiner, gerader Trennlinie (vorher wirkte jede Zeile wie eine Karte mit Schatten) ---------- */
.report-card { position: relative; border-bottom: 0; }
.report-card + .report-card::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; border-top: 1px solid var(--line); }
.report-row:hover::before, .report-row:hover + .report-row::before { border-top-color: transparent; }

/* ==================== Paket 4 „Menschlich“ (11/2026) ====================
   Fragebogen mit Fortschritt, leere Zustände mit nächstem Schritt, Ablagefläche für Dateien, Personenkreise in Kacheln,
   Eintritt als Weg, Noya-Zeichen als Ladezeichen. Verhalten nach den Bausteinen von Cojeev UI (MIT), in Noyas Farben. */

/* ---------- Leerer Zustand ohne Rahmen (in Karten, Listen, Dialogen) und mit mehreren Knöpfen ---------- */
.empty-state.es-plain { border: 0; padding: 26px 12px; }
.empty-state > .row-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; max-width: none; }

/* ---------- Personenkreise: überlappend, mit feinem Rand in der Farbe der Fläche ---------- */
.avatar-group { display: flex; align-items: center; flex: none; }
.avatar-group .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-group .avatar + .avatar { margin-left: -4px; }
.avatar-group .avatar-more { color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: -.02em; }
.stat .value.has-people { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Ablagefläche für eine Datei ---------- */
.dropzone {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, var(--line)); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent); transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dropzone > .icon { box-sizing: border-box; width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--surface-2); flex: none; transition: background .15s var(--ease), color .15s var(--ease); }
.dropzone > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dropzone strong { font-size: .92rem; font-weight: 500; overflow-wrap: anywhere; }
.dropzone > div > span { color: var(--muted); font-size: .82rem; font-weight: 400; line-height: 1.45; }
.dropzone > div > span:empty { display: none; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: var(--surface-2); }
.dropzone.over, .dropzone.has-file { border-style: solid; }
.dropzone.has-file { background: var(--surface); }
.dropzone.has-file > .icon, .dropzone.over > .icon { background: var(--ink); color: var(--on-ink); }
.dropzone:focus-within { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
input.dz-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* ---------- Weg: Schritte an einer Linie; erledigt gefüllt, der nächste hervorgehoben, spätere gepunktet ---------- */
.path { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.path-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding-bottom: 22px; }
.path-step:last-child { padding-bottom: 0; }
.path-step::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: 4px; border-left: 2px dotted color-mix(in srgb, var(--muted) 45%, var(--line)); }
.path-step.done::before { border-left: 2px solid var(--ink); }
.path-step:last-child::before { display: none; }
.path-dot { box-sizing: border-box; width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 45%, var(--line)); background: var(--surface); display: grid; place-items: center; }
.path-step.done .path-dot { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.path-dot .icon { width: 12px; height: 12px; stroke-width: 3; }
.path-step.next .path-dot { border-color: var(--work); box-shadow: 0 0 0 4px color-mix(in srgb, var(--work) 18%, transparent); }
.path-step.next .path-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--work); }
.path-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.path-main strong { font-weight: 500; }
.path-main .small { line-height: 1.45; }
.path-side { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 10px; }
@media (max-width: 640px) {
  .path-step { grid-template-columns: 22px minmax(0, 1fr); }
  .path-side { grid-column: 2; justify-content: flex-start; }
}

/* ---------- Eintrittsfragebogen: Fortschritt bleibt oben stehen, Abschnitte mit Nummer ---------- */
.qn-progress { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 12px 0 10px; background: var(--page); }
.qn-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .84rem; color: var(--muted); }
.qn-progress-row strong { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.qn-fieldset legend { display: flex; align-items: center; gap: 10px; }
.qn-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .2s var(--ease), color .2s var(--ease); }
.qn-no .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.qn-fieldset.done .qn-no { background: var(--ink); color: var(--on-ink); }
.qn-left { margin: 0; }

/* ---------- Ladezeichen: das Noya-Zeichen öffnet sich wie eine Blüte ---------- */
.boot::before { width: 34px; height: 34px; border: 0; border-radius: 0; background: url(/icon.svg) center / contain no-repeat; animation: bloom 1.8s var(--ease) infinite; }
@keyframes bloom { 0%, 100% { transform: scale(.8) rotate(0deg); opacity: .5; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot::before { animation: none; } }

/* ---------- Dialog mit fester Kopfleiste: Die Knopfzeile bekommt denselben Rand wie Kopf und Inhalt (die Hülle hat dort keinen) ---------- */
.dialog-body.has-head > .dialog-actions { padding: 12px 22px 22px; }
@media (max-width: 900px) { .dialog-body.has-head > .dialog-actions { padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); } }
/* Rollende Ziffern (web/react/lib/SlidingNumber.tsx, nach „Sliding Number“ von Motion Primitives). Jede Ziffer ist
   eine Spalte 1ch breit; die zehn Ziffern liegen übereinander und werden senkrecht verschoben. */
.sliding-number, .sliding-time { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.sn-row, .sn-part { display: inline-flex; align-items: center; }
.sn-digit { position: relative; display: inline-block; width: 1ch; overflow-x: visible; overflow-y: clip; line-height: 1; }
.sn-ghost { visibility: hidden; display: block; }
.sn-measure { visibility: hidden; position: absolute; }
.sn-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sn-sep { padding: 0 .02em; }
.sn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sliding-number, .sliding-time { position: relative; }
/* Startseite: „In vier Schritten startklar“ (web/react/oeffentlich/VierSchritte.tsx, nach „Feature Carousel“ von
   Cult UI). Karte mit Schritt-Pillen, links der Text, rechts die Bildschirmfotos. */
.fc-card { position: relative; isolation: isolate; overflow: hidden; border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); padding: clamp(18px, 3vw, 34px); box-shadow: var(--shadow-sm); }
/* Heller Schein, der der Maus folgt */
.fc-card::before { content: ''; position: absolute; inset: -1px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(640px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--work) 20%, transparent) 0, color-mix(in srgb, var(--plan) 10%, transparent) 30%, transparent 60%); }
.fc-card:hover::before { opacity: 1; }

.fc-steps ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 clamp(18px, 3vw, 28px); padding: 0; }
.fc-step button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); transition: background .25s, color .25s; }
.fc-step button:hover { color: var(--text); }
.fc-step button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.fc-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .78rem; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.fc-dot .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.fc-step.is-done .fc-dot { background: var(--work); color: var(--on-block); }
.fc-step.is-current button { background: var(--ink); color: var(--on-ink); }
.fc-step.is-current .fc-dot { background: var(--work); color: var(--on-block); }

.fc-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.fc-text { display: flex; flex-direction: column; gap: 18px; min-height: 230px; justify-content: center; }
.fc-kicker { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--work-text); margin-bottom: 10px; }
.fc-text h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15; letter-spacing: -.015em; }
.fc-text p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 1.02rem; text-wrap: pretty; max-width: 34em; }
.fc-actions .btn .icon { margin-left: 6px; margin-right: 0; }

.fc-stage { position: relative; aspect-ratio: 4 / 3; }
.fc-frame { position: absolute; inset: 0; }
/* Fotos im Browser- und Handy-Rahmen (lib/geraete/); der Schatten folgt der Form des Rahmens. */
.fc-shot { position: absolute; filter: drop-shadow(0 18px 30px rgba(31, 30, 29, .14)) drop-shadow(0 2px 6px rgba(31, 30, 29, .08)); }
.fc-w-full { width: 100%; left: 0; top: 10%; }
.fc-w-back { width: 86%; left: 0; top: 4%; }
.fc-w-front { width: 46%; right: 0; bottom: -1%; }
.fc-phone { width: 26%; right: 3%; bottom: -2%; }

.fc-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.fc-trust li { display: inline-flex; align-items: center; gap: 8px; }
.fc-trust .icon { width: 18px; height: 18px; color: var(--work-text); }

@media (max-width: 860px) {
  .fc-body { grid-template-columns: 1fr; }
  .fc-text { min-height: 0; }
  .fc-stage { aspect-ratio: 5 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-card::before, .fc-step button { transition: none; }
}
/* Geräte-Rahmen um Bildschirmfotos (web/react/lib/geraete/, nach Magic UI): Browser (Safari) und Handy (iPhone). */
.mk { position: relative; display: inline-block; width: 100%; vertical-align: middle; line-height: 0; }
.mk-screen { position: absolute; z-index: 0; overflow: hidden; pointer-events: none; }
.mk-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mk-svg { position: absolute; inset: 0; z-index: 10; width: 100%; height: 100%; }
.mk-frame { fill: #e5e5e5; }
.mk-line { stroke: #e5e5e5; stroke-width: .5; }
.mk-face { fill: #fff; }
.mk-island { fill: #f5f5f5; }
.mk-blend { mix-blend-mode: luminosity; }
@media (prefers-color-scheme: dark) {
  .mk-frame { fill: #404040; }
  .mk-line { stroke: #404040; }
  .mk-face, .mk-island { fill: #262626; }
}
/* ==========================================================================
   Website in Weiß und die neue Startseite (web/react/oeffentlich/Start.tsx).
   Bausteine nach Magic UI und Cult UI (MIT): Ripple, Dot Pattern, Marquee, Magic Card, Hero Dithering.
   ========================================================================== */

/* Öffentliche Seiten und Anmeldung: Weiß statt Beige (im Dunkeln die Seitenfarbe der App). */
.lp, .ap { background: var(--page); }
.lp-head { background: color-mix(in srgb, var(--page) 84%, transparent); }
.lp-photo-card { background: color-mix(in srgb, var(--page) 92%, transparent); }

/* ---------- Grundmaß ---------- */
.nx { --nx-max: 1200px; --nx-pad: clamp(20px, 5vw, 64px); --nx-radius: 24px; --nx-hair: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.nx-section { max-width: var(--nx-max); margin: 0 auto; padding: clamp(72px, 12vh, 136px) var(--nx-pad) 0; scroll-margin-top: 72px; }
.nx-kicker { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--work-text); margin-bottom: 14px; }
.nx-head { max-width: 760px; margin-bottom: clamp(32px, 5vh, 56px); }
.nx-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 16px; text-wrap: balance; }
.nx-head p { font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.6; color: var(--muted); margin: 0; text-wrap: pretty; }
.nx-head-center { margin-inline: auto; text-align: center; }
.nx-note { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- Knöpfe ---------- */
.nx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.nx-actions-center { justify-content: center; }
.nx .btn-lg { padding: 13px 24px; font-size: 1rem; }
.nx .nx-ghost { background: var(--page); color: var(--text); border: 1px solid var(--nx-hair); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent); }
.nx .nx-ghost:hover { border-color: color-mix(in srgb, var(--text) 22%, transparent); background: var(--page); }

/* ---------- Aufmacher ---------- */
.nx-hero { max-width: var(--nx-max); margin: 0 auto; padding: clamp(40px, 9vh, 104px) var(--nx-pad) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.nx-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 22px; text-wrap: balance; }
.nx-lead { font-size: clamp(1.06rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 31em; margin: 0; text-wrap: pretty; }
.nx-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid var(--nx-hair);
  background: var(--page); font-size: .86rem; color: var(--muted); text-decoration: none; box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent); }
.nx-pill strong { color: var(--text); font-weight: 600; }
.nx-pill .icon { width: 14px; height: 14px; }
a.nx-pill:hover { border-color: color-mix(in srgb, var(--text) 20%, transparent); }
.nx-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--work); box-shadow: 0 0 0 4px color-mix(in srgb, var(--work) 18%, transparent); }

.nx-hero-visual { position: relative; aspect-ratio: 1 / 1.02; border-radius: 32px; overflow: hidden; border: 1px solid var(--nx-hair);
  background: radial-gradient(120% 90% at 85% 100%, color-mix(in srgb, var(--work) 7%, var(--page)) 0%, var(--page) 60%); isolation: isolate; }
.fx-dither { display: block; width: 100%; height: 100%; color: var(--work); image-rendering: pixelated; pointer-events: none; }
.nx-hero-dither { position: absolute; inset: 0; opacity: .8; }
.nx-hero-web { position: absolute; left: 9%; top: 13%; width: 92%; filter: drop-shadow(0 24px 48px color-mix(in srgb, var(--text) 14%, transparent)); }
.nx-hero-phone { position: absolute; right: 7%; bottom: -12%; width: 30%; filter: drop-shadow(0 22px 40px color-mix(in srgb, var(--text) 22%, transparent)); }

/* ---------- Laufband ---------- */
.nx-venues { max-width: var(--nx-max); margin: clamp(56px, 9vh, 96px) auto 0; padding: 0 var(--nx-pad); }
.fx-marquee { --gap: clamp(28px, 4vw, 56px); display: flex; gap: var(--gap); overflow: hidden; user-select: none;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.fx-marquee-row { display: flex; flex: none; gap: var(--gap); min-width: max-content; animation: fx-marquee 38s linear infinite; }
.fx-marquee:hover .fx-marquee-row { animation-play-state: paused; }
@keyframes fx-marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.nx-venue { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.01em; color: color-mix(in srgb, var(--text) 38%, transparent); white-space: nowrap; }
.nx-venue::after { content: "·"; margin-left: var(--gap); color: var(--work); }

/* ---------- Funktionen: Karten mit Lichtschein ---------- */
.nx-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fx-card { --mx: -400px; --my: -400px; position: relative; isolation: isolate; border-radius: var(--nx-radius); background: var(--page);
  border: 1px solid var(--nx-hair); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.fx-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--work) 9%, transparent), transparent 70%); }
.fx-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx) var(--my), color-mix(in srgb, var(--work) 55%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.fx-card:hover { box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--text) 30%, transparent); }
.nx-feature { padding: clamp(24px, 2.4vw, 34px); display: flex; flex-direction: column; min-height: 100%; }
.fx-dots { position: absolute; inset: 0 0 auto auto; width: 70%; height: 55%; z-index: -1; fill: color-mix(in srgb, var(--text) 16%, transparent); pointer-events: none;
  mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%); }
.nx-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; color: var(--text); }
.nx-eyebrow-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--page); border: 1px solid var(--nx-hair);
  color: var(--work-text); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent); }
.nx-eyebrow-icon .icon { width: 17px; height: 17px; }
.nx-feature-quote { margin: 26px 0 28px; min-height: 3.6em; font-family: var(--serif); font-size: clamp(1.4rem, 1.9vw, 1.8rem); line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.nx-feature h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; margin: 0 0 8px; padding-top: 20px; border-top: 1px solid var(--nx-hair); }
.nx-feature-text { color: var(--muted); line-height: 1.55; font-size: .95rem; margin: 0; }
.nx-points { list-style: none; margin: auto 0 0; padding: 22px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: .9rem; font-weight: 500; }
.nx-points li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.35; }
.nx-points .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--work-text); }

/* Die vier Schritte auf Weiß, Überschrift wie die übrigen Abschnitte */
.nx .fc-section { max-width: var(--nx-max); margin: 0 auto; padding: clamp(72px, 12vh, 136px) var(--nx-pad) 0; }
.nx .fc-section .lp-pain-head { max-width: 760px; margin-bottom: clamp(32px, 5vh, 56px); }
.nx .fc-section .lp-pain-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; }
.nx .fc-section .lp-pain-head p { font-family: var(--font); font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.6; }
.nx .fc-card { background: var(--page); border: 1px solid var(--nx-hair); box-shadow: none; }

/* ---------- Assistent mit Wellen ---------- */
.nx-ai-stage { position: relative; height: clamp(260px, 34vw, 340px); margin: 0 auto clamp(8px, 2vh, 20px); max-width: 760px; }
.fx-ripple { position: absolute; inset: 0; pointer-events: none; user-select: none; color: var(--text);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
.fx-ripple-circle { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 5%, transparent); box-shadow: 0 10px 30px -18px color-mix(in srgb, currentColor 40%, transparent);
  transform: translate(-50%, -50%) scale(1); animation: fx-ripple 3.4s ease calc(var(--i, 0) * .2s) infinite; }
@keyframes fx-ripple { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(.9); } }
.nx-ai-mark { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); padding: 16px; box-sizing: content-box;
  border-radius: 50%; background: var(--page); border: 1px solid var(--nx-hair); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--text) 30%, transparent); }
.nx-bubble { position: absolute; max-width: 15em; padding: 10px 14px; border-radius: 16px; background: var(--page); border: 1px solid var(--nx-hair);
  font-size: .9rem; line-height: 1.35; box-shadow: 0 10px 28px -16px color-mix(in srgb, var(--text) 35%, transparent); }
.nx-bubble-a { left: 2%; top: 16%; border-bottom-left-radius: 4px; }
.nx-bubble-b { right: 2%; bottom: 14%; border-bottom-right-radius: 4px; }
.nx-principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(20px, 4vh, 40px); }
.nx-principle { padding-top: 22px; border-top: 1px solid var(--nx-hair); }
.nx-principle-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--work-text);
  background: color-mix(in srgb, var(--work) 9%, var(--page)); margin-bottom: 16px; }
.nx-principle-icon .icon { width: 16px; height: 16px; }
.nx-principle h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }
.nx-principle p { font-size: .93rem; line-height: 1.55; color: var(--muted); margin: 0; }

/* ---------- Abschluss ---------- */
.nx-final { position: relative; max-width: var(--nx-max); margin: clamp(80px, 13vh, 144px) auto clamp(64px, 10vh, 112px); padding: 0 var(--nx-pad); }
.nx-final-inner { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(64px, 11vh, 112px) clamp(20px, 4vw, 48px); border-radius: 32px; border: 1px solid var(--nx-hair); }
.nx-final-dither { position: absolute; inset: 0; z-index: -1; opacity: .5;
  mask-image: radial-gradient(ellipse 70% 80% at center, transparent 35%, #000 100%); }
.nx-final h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -.03em; margin: 0 auto 14px; max-width: 14em; text-wrap: balance; }
.nx-final p { color: var(--muted); margin: 0; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 960px) {
  .nx-hero { grid-template-columns: minmax(0, 1fr); }
  .nx-hero-visual { aspect-ratio: 4 / 3.4; }
  .nx-features { grid-template-columns: minmax(0, 1fr); }
  .nx-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .nx-hero h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .nx-actions .btn { flex: 1 1 auto; justify-content: center; }
  .nx-hero-visual { aspect-ratio: 1 / 1.05; border-radius: 24px; }
  .nx-hero-web { left: 7%; top: 9%; width: 108%; }
  .nx-hero-phone { width: 40%; right: 5%; bottom: -8%; }
  .nx-principles { grid-template-columns: minmax(0, 1fr); }
  .nx-bubble { font-size: .82rem; max-width: 12em; }
  .nx-bubble-a { left: 0; top: 6%; }
  .nx-bubble-b { right: 0; bottom: 6%; }
  .nx-feature-quote { min-height: 0; }
}

/* ---------- Dunkel ---------- */
@media (prefers-color-scheme: dark) {
  .nx-hero-visual { background: radial-gradient(120% 90% at 85% 100%, color-mix(in srgb, var(--work) 12%, var(--page)) 0%, var(--page) 60%); }
  .nx-hero-dither { opacity: .7; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-marquee-row, .fx-ripple-circle { animation: none; }
  .fx-card, .fx-card::before, .fx-card::after { transition: none; }
}

/* Übrige öffentliche Seiten: Karten weiß mit feiner Linie statt beige getönt. */
.lp .lp-flat, .lp .lp-pain { background: var(--page); border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); border-radius: 20px; }
.lp .help-tips { background: color-mix(in srgb, var(--text) 3%, var(--page)); }
.lp .lp-tier-head { background: color-mix(in srgb, var(--text) 3%, var(--page)); }
/* ============ Gestaltung nach „000h by Cojeev“: Bausteine der App ============
   Diese Schicht steht am Ende und gibt den Bausteinen aus den Teilen davor Form, Farbe und Bewegung des Originals
   (MIT, siehe web/cojeev/HERKUNFT.md; Maße und Regeln aus web/cojeev/registry/cojeev/styles/). Aufbau und Abstände
   der Seiten bleiben, wie sie sind: Hier ändert sich nur, wie etwas aussieht und sich anfühlt.
   Leitlinien des Originals: Flächen sind flach (Papier auf warmem Grund), nur Schwebendes wirft Schatten;
   Bedienelemente sind Pillen; Auswahl ist eine dunkle Pille (im dunklen Design Rosa); Bewegung ist kurz. */

/* ---------- Gerüst: schwebende Seitenleiste aus Papier, warmer Grund mit zartem Farbschein ---------- */
@media (min-width: 901px) {
  .shell { grid-template-columns: 268px minmax(0, 1fr); }
  .shell.collapsed { grid-template-columns: 88px minmax(0, 1fr); }
  .sidebar {
    top: 12px; height: calc(100vh - 24px); margin: 12px 0 12px 12px; padding: 16px 14px 14px;
    border: 0; border-radius: var(--radius-xl);
    background: radial-gradient(ellipse at 12% 0%, var(--blue-soft), transparent 70%) var(--sidebar);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 45%, transparent);
  }
  @supports (height: 100dvh) { .sidebar { height: calc(100dvh - 24px); } }
  .shell.collapsed .sidebar { padding-inline: 12px; }
}
.main {
  background:
    radial-gradient(820px 320px at 16% -130px, color-mix(in srgb, var(--pink-soft) 90%, transparent), transparent 72%),
    radial-gradient(900px 340px at 70% -150px, color-mix(in srgb, var(--yellow-soft) 95%, transparent), transparent 72%);
  background-repeat: no-repeat;
}
.side-bottom { border-top-color: var(--line); margin-inline: -14px; padding-inline: 14px; }
.side-top { padding: 4px 4px 12px 8px; }

/* Navigation: ruhige Zeilen, Überfahren in Beige, die aktive Seite in hellem Blau mit Marke am Rand. */
.nav { gap: 2px; }
.nav a, .nav-group-btn { min-height: 40px; padding: 9px 12px; border-radius: var(--radius); font-size: .9rem; font-weight: 400; line-height: 1.4; gap: 12px; }
.nav a .icon, .nav-group-btn .icon { width: 18px; height: 18px; color: var(--text); transition: transform var(--dur-2) var(--ease); }
.nav a:hover, .nav-group-btn:hover { background: var(--surface-2); }
.nav a:hover .icon { transform: translateY(-1px) rotate(-6deg); }
.nav a:active .icon { transform: scale(.92); }
.nav a.active, .subnav a.active { background: var(--blue-soft); box-shadow: inset 2px 0 var(--blue); font-weight: 600; }
.nav-sep, .subnav-group { font-size: 11px; letter-spacing: .05em; font-weight: 500; color: var(--muted); }
.nav-sep { padding: 14px 12px 6px; }
.subnav a { padding: 9px 12px; border-radius: var(--radius); font-size: .9rem; font-weight: 400; }
.subnav a:hover { background: var(--surface-2); }
.subnav { border-right-color: var(--line); background: transparent; }
.subnav-title { font-weight: 500; font-size: 1.3rem; letter-spacing: -.015em; }
@media (prefers-reduced-motion: reduce) { .nav a:hover .icon, .nav a:active .icon { transform: none; } }

/* Zähler (offene Freigaben): dunkle Pille, wie der Zähler des Originals. */
.badge { min-width: 22px; height: 22px; padding: 0 8px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: 11px; font-weight: 600; }

/* Betrieb, Suche, Konto: weiche Flächen mit Kante. */
.company-block, .search-btn { min-height: 44px; padding: 8px 12px; border-radius: var(--radius); border-color: var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.company-block:hover, .search-btn:hover { border-color: var(--edge); background: var(--surface); }
.company-block.static:hover { border-color: var(--border); }
.company-dot { border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; }
kbd { border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-weight: 500; background: transparent; }
.account { border-radius: var(--radius); padding: 8px; }
.icon-btn { border-radius: 50%; width: 36px; height: 36px; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: translateY(1px); }
.side-notice { border: 0; border-radius: var(--radius-md); }

/* ---------- Titel ---------- */
.page-head h1 { letter-spacing: -.02em; }
.page-head .sub { color: var(--text-2); }
h2 { font-size: 1.0625rem; }
.subnav-title, .profile-name, .ai-hello, .ent-sub, .lp-price-fig, .lp-pain-quote, .nx-venue, .nx-feature-quote { font-weight: 500; }

/* ---------- Knöpfe: Pillen ---------- */
.btn {
  min-height: var(--ctl); padding: 0 18px; border: 1px solid var(--edge); border-radius: var(--pill);
  background: transparent; color: var(--text); box-shadow: none; font-size: .9333rem; font-weight: 500; line-height: 1.15; gap: 8px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--edge); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 1; transform: none; background: var(--surface-2); border-color: var(--edge); color: var(--muted); cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary, .btn-in, .btn-out { background: var(--ink); border-color: var(--ink); color: var(--on-ink); box-shadow: none; }
.btn-primary:hover, .btn-in:hover, .btn-out:hover { background: color-mix(in oklab, var(--ink) 88%, var(--page)); border-color: color-mix(in oklab, var(--ink) 88%, var(--page)); opacity: 1; }
.btn-primary:disabled:not(.is-busy), .btn-primary:disabled:not(.is-busy):hover { background: var(--surface-2); border-color: var(--edge); color: var(--muted); box-shadow: none; }
.btn-primary.is-busy:disabled, .btn.is-busy:disabled { opacity: 1; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: transparent; background: var(--surface-2); }
.btn-danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 70%, transparent); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--neg); }
.btn-ok { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 70%, transparent); }
.btn-ok:hover { background: var(--olive-soft); border-color: var(--pos); }
.btn-sm { min-height: var(--ctl-sm); padding: 0 14px; font-size: .8667rem; }
.btn-lg { min-height: var(--ctl-lg); padding: 0 24px; font-size: 1rem; }
.btn-link { color: var(--text); font-weight: 500; text-underline-offset: 2px; }
.btn-link:hover { color: var(--text-2); }
.btn-on-block { border-radius: var(--pill); }
@media (prefers-color-scheme: dark) {
  /* Im dunklen Design ist die Hauptaktion Rosa mit dunkler Schrift. */
  .btn-primary, .btn-in, .btn-out { background: var(--pink); border-color: var(--pink); color: var(--on-block); }
  .btn-primary:hover, .btn-in:hover, .btn-out:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
}
@media (prefers-reduced-motion: reduce) { .btn:active, .icon-btn:active { transform: none; } }

/* ---------- Felder: Pillen in Beige mit Kante; im Fokus hellrosa mit Brombeer-Ring ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select {
  min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--edge); border-radius: var(--pill); background-color: var(--surface-2);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
textarea {
  padding: 12px 16px; border: 1px solid var(--edge); border-radius: var(--radius-md); background-color: var(--surface-2); line-height: 1.5;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
:is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea):not(.palette-input):hover {
  border-color: var(--edge); background-color: color-mix(in oklab, var(--surface-2) 92%, var(--page));
}
input::placeholder, textarea::placeholder { color: var(--text-2); opacity: 1; }
input:focus, select:focus, textarea:focus, .picker-btn:focus-visible, .audit-search:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0; border-color: var(--focus); background-color: var(--pink-soft); box-shadow: inset 0 0 0 1px var(--focus);
}
input:disabled, select:disabled, textarea:disabled { background-color: var(--surface-2); border-color: var(--edge); color: var(--muted); opacity: 1; }
select { padding-right: 40px; background-position: right 14px center; }
.field > span, .field-head label { font-size: .9333rem; font-weight: 600; }
.field .hint, .hrow-control > .hint { font-size: .8667rem; color: var(--text-2); }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .pw-field input, input[aria-invalid="true"] { border-color: var(--danger-fill); background-color: var(--danger-soft); box-shadow: inset 0 0 0 .5px var(--danger-fill); }
.field-error, .field > .field-error { color: var(--neg); font-weight: 500; }
.picker-btn { min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--edge); border-radius: var(--pill); background: var(--surface-2); }
.picker-btn:hover { border-color: var(--edge); background: color-mix(in oklab, var(--surface-2) 92%, var(--page)); }
input.palette-input, input.palette-input:focus, input.palette-input:focus-visible { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; }
@media (prefers-color-scheme: dark) {
  input:focus, select:focus, textarea:focus, .picker-btn:focus-visible, .audit-search:focus,
  input:focus-visible, select:focus-visible, textarea:focus-visible { background-color: color-mix(in oklab, var(--pink) 14%, var(--page)); }
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdc1c5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}

/* Häkchen und Auswahlpunkte: Kante wie bei den Feldern, gewählt in Dunkel (im dunklen Design Rosa). */
:where(input[type=checkbox]), :where(input[type=radio]) { width: 20px; height: 20px; border: 1.5px solid var(--edge); background-color: var(--surface); background-size: 13px 13px; vertical-align: -5px; }
:where(input[type=checkbox]) { border-radius: 7px; }
:where(input[type=checkbox], input[type=radio]):hover { border-color: var(--text); }
:where(input[type=checkbox]):active, :where(input[type=radio]):active { transform: scale(.94); }
@media (prefers-color-scheme: dark) {
  :where(input[type=checkbox]):checked, :where(input[type=checkbox]):indeterminate { background-color: var(--pink); border-color: var(--pink); }
  :where(input[type=checkbox]):checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2314171B' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-5'/%3E%3C/svg%3E"); }
  :where(input[type=checkbox]):indeterminate { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2314171B' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E"); }
  :where(input[type=radio]):checked { border-color: var(--pink); background-image: radial-gradient(circle, var(--pink) 0 4.2px, transparent 5px); }
}

/* Schalter: beige Kapsel mit Kante, der Knopf leicht unrund; an = Rosa mit dunklem Knopf. */
input[type=checkbox].switch {
  width: 38px; height: 22px; border: 0; border-radius: var(--pill); background-color: var(--surface-2); background-image: none;
  box-shadow: inset 0 0 0 1px var(--edge); vertical-align: -6px;
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
input[type=checkbox].switch::before {
  top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; background: var(--page);
  box-shadow: inset 0 0 0 1.5px var(--edge); transition: transform var(--dur-3) cubic-bezier(.3, 1.3, .45, 1), background-color var(--dur-2) var(--ease);
}
input[type=checkbox].switch:hover { background-color: color-mix(in oklab, var(--surface-2) 90%, var(--ink)); }
input[type=checkbox].switch:hover::before { box-shadow: inset 0 0 0 1.5px var(--text); }
input[type=checkbox].switch:checked { background-color: var(--pink); box-shadow: none; }
input[type=checkbox].switch:checked::before { transform: translateX(16px); background: #111111; box-shadow: none; }
input[type=checkbox].switch:checked:hover { background-color: color-mix(in oklab, var(--pink) 88%, #111111); }
input[type=checkbox].switch:active { transform: none; }
input[type=checkbox].switch:active::before { transform: scaleX(1.18); }
input[type=checkbox].switch:checked:active::before { transform: translateX(14px) scaleX(1.18); }
input[type=checkbox].switch:disabled { background-color: var(--surface-2); box-shadow: inset 0 0 0 1px var(--edge); }
@media (prefers-reduced-motion: reduce) { input[type=checkbox].switch::before { transition: none; } }

/* ---------- Auswahl in Pillen: ruhige beige Pillen, die gewählte dunkel ---------- */
.seg, .tabs { border: 0; padding: 0; gap: 6px; background: transparent; box-shadow: none; border-radius: 0; }
.seg button, .tabs button, .chip-btn {
  min-height: var(--ctl-sm); padding: 0 16px; border: 0; border-radius: var(--pill); background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge); font-size: .8667rem; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.seg button:hover, .tabs button:hover, .chip-btn:hover { background: var(--surface-3); color: var(--text); }
.seg button:active, .tabs button:active, .chip-btn:active { transform: translateY(1px); }
.seg button.active, .tabs button.active, .chip-btn.active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.seg button:focus-visible { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
.viewbar .seg { height: auto; }
.viewbar .seg button { min-height: 38px; }
.seg.seg-wide button { min-height: var(--ctl); }
.tabs button { min-height: var(--ctl); }
@media (prefers-color-scheme: dark) {
  .seg button.active, .tabs button.active, .chip-btn.active { background: var(--pink); color: var(--on-block); }
}

/* Reiter auf einer Linie: Leseschrift auf einer feinen Linie, eine rosa Marke zeigt die Wahl. */
.page-tabs { gap: 22px; border-bottom-color: var(--border); }
.page-tabs a { padding: 8px 2px 11px; font-size: 1rem; font-weight: 500; color: var(--text-2); }
.page-tabs a.active { color: var(--text); border-bottom-color: var(--pink); font-weight: 500; }
.page-tabs .page-tab-ext { font-size: .9rem; }

/* Monats- und Wochenwahl: eine Pille mit runden Pfeilen. */
.month-nav { border: 1px solid var(--edge); border-radius: var(--pill); background: var(--surface-2); box-shadow: none; overflow: hidden; }
.month-nav > .btn, .viewbar .month-nav > .btn { width: 38px; min-width: 38px; border: 0; border-radius: 0; }
.month-nav > .btn:first-child, .month-nav > .btn:last-child { border: 0; }
.month-nav > .btn:hover { background: color-mix(in oklab, var(--surface-2) 86%, var(--ink)); }
.month-nav > .label { font-weight: 500; }

/* ---------- Flächen ---------- */
.card, .stat, .audit-seal { border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-radius: var(--radius-lg); box-shadow: none; }
.card { padding: 22px; }
.stat { padding: 18px 20px 16px; }
.stat .label { font-size: .8667rem; color: var(--text-2); }
.stat .value .fig, .stat .value > span { font-family: var(--display); font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }
.stat.stat-link { transition: border-color var(--dur) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.stat.stat-link:hover { border-color: var(--border); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat[class*="tone-"] .label::before, .swatch { border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; }
@media (prefers-reduced-motion: reduce) { .stat.stat-link:hover { transform: none; } }

/* Chips, Marken und Zustände: Pillen. */
.chip { min-height: 24px; padding: 2px 10px; border-radius: var(--pill); font-size: .8rem; letter-spacing: .005em; }
.chip-alert { background: var(--danger-soft); border-color: transparent; color: var(--neg); }
.chip-pending { border-color: transparent; }
.badge-soft { border-radius: var(--pill); padding: 3px 10px; font-size: 11px; letter-spacing: .08em; color: var(--text-2); }
.status.st-pending { border-radius: var(--pill); padding: 3px 11px; }

/* Hinweise: getönte Flächen ohne Rand. */
.notice { border: 0; border-radius: var(--radius-md); padding: 14px 16px; }
.notice.soft { background: var(--surface-2); }
.notice.soft.ok { background: var(--olive-soft); }
.empty-state { border-radius: var(--radius-lg); }

/* ---------- Tabellen: kleine Versalien im Kopf, feine dunkle Linien ---------- */
.table th { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 10px 10px; border-bottom-color: var(--edge); }
.table td { padding: 12px 10px; border-bottom-color: var(--line); }
.table tr.clickable:hover td { background: var(--surface-3); }
.table tr.clickable:active td { background: var(--surface-2); }

/* ---------- Schwebendes: Dialoge, Menüs, Hinweise ---------- */
dialog { border: 0; border-radius: var(--radius-sheet); box-shadow: var(--shadow-xl); }
dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: none; backdrop-filter: none; }
.dialog-body { padding: 26px; gap: 18px; }
.dialog-head { padding: 22px 18px 12px 26px; }
.dialog-scroll { padding: 14px 26px 26px; }
.dialog-body h2, .dialog-head h2 { font-family: var(--display); font-weight: 500; font-size: 1.625rem; line-height: 1.15; letter-spacing: -.015em; }
.dialog-actions { gap: 10px; }
dialog.palette, dialog.pick { border-radius: var(--radius-xl); }
dialog.pick.anchored { box-shadow: var(--shadow-md); border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.account-menu, .company-menu { border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 6px; }
.account-menu a, .account-menu button, .company-menu a, .company-menu button, .menu-item { border-radius: 10px; min-height: 38px; }
.menu-sep { border-top-color: var(--line); }
.toast { border-radius: var(--radius-md); padding: 12px 18px; background: var(--structure); color: var(--on-structure); box-shadow: var(--shadow-md); }
.toast.error { background: var(--danger-fill); color: #fff; }

/* Schlichte Tabellen (Listen): derselbe Kopf, Zeilen mit feiner Linie. */
table.table-plain th { font-size: 11px; letter-spacing: .08em; padding: 10px 10px 10px; border-bottom-color: var(--edge); }
table.table-plain td { border-bottom-color: var(--line); }
table.table-plain tbody tr:hover td { background: var(--surface-3); }

/* Kürzel einer Person: die leicht unrunde Scheibe des Originals. */
.avatar { border: 0; border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; background: var(--surface-2); }
.avatar.sm, .avatar.lg { border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; }

/* Zeichen der Marke in Schriftfarbe (wie die Wortmarke daneben): hell und dunkel ohne zweite Datei. */
.brand-mark { display: block; flex: none; width: 26px; height: 26px; background-color: currentColor;
  -webkit-mask: url("/icon.svg") center / contain no-repeat; mask: url("/icon.svg") center / contain no-repeat; }
table.table-plain th { text-transform: uppercase; font-weight: 600; color: var(--text-2); }
/* Sortierbare Spaltenköpfe sind Knöpfe: Schreibweise und Laufweite wie die übrigen Köpfe (font: inherit erbt sie nicht). */
.th-sort { text-transform: inherit; letter-spacing: inherit; }
/* Genehmigt ist „in Ordnung“: Oliv, nicht die Farbe der Pause. */
.status.st-approved::before { background: var(--olive); }
.steps-row li.done .step-mark, .step-card.done .step-title .step-mark { background: var(--olive); }

/* ============ Website: Kopf und Fuß wie auf der Startseite ============
   Maße aus web/cojeev/components/landing/landing.css (story-header, story-link, story-footer): Marke links mit
   kleiner Zeile, Wege rechts als ruhige Pillen, der Einstieg in Rosa, darunter eine Fußzeile mit feiner Linie. */
.lp-head {
  position: relative; top: auto; z-index: 30; display: flex; align-items: center; gap: 20px; min-height: 100px;
  max-width: 1600px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 80px);
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.lp-brand { justify-self: auto; gap: 8px; }
.lp-brand .brand-mark { width: 29px; height: 29px; }
.lp-brand .brand-name { width: 69px; height: 30px; }
.lp-brand-ui { margin-left: 4px; font-size: 14px; font-weight: 500; letter-spacing: 0; white-space: nowrap; color: var(--text); }
.lp-pills { margin-left: auto; gap: 12px; }
.lp-actions { gap: 12px; justify-self: auto; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 16px;
  background: transparent; border-radius: var(--pill); font-size: 14px; font-weight: 400; line-height: 1.2; white-space: nowrap;
}
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill.active { background: var(--surface-2); color: var(--text); border-color: transparent; }
.pill .icon { width: 20px; height: 20px; }
.lp-try {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px; border-radius: var(--radius);
  background: var(--pink); color: var(--on-block); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lp-try:hover { background: var(--pink-deep); color: var(--on-block); text-decoration: none; }
.lp-try:active { transform: translateY(1px); }
.lp-try .icon { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease); }
.lp-try:hover .icon { transform: translate(1px, -1px); }
.lp-icon-btn { width: 44px; height: 44px; }
.lp-icon-btn:hover { background: var(--surface-2); }
.lp-menu-btn { display: none; background: var(--blue); color: var(--on-block); border-radius: var(--pill); width: 44px; height: 32px; }
.lp-menu-btn:hover { background: var(--blue-deep); }
@media (max-width: 1280px) { .lp-terminal > span { display: none; } .pill.lp-terminal { padding: 12px; } }
@media (max-width: 1100px) { .lp-head { gap: 8px; } .lp-pills { gap: 0; } .lp-actions { gap: 4px; } .pill { padding-inline: 12px; } .pill.lp-login { display: inline-flex; } }
@media (max-width: 1000px) {
  .lp-head { min-height: 82px; }
  .lp-actions { margin-left: auto; }
  .lp-pills, .pill.lp-login, .pill.lp-terminal { display: none; }
  .lp-menu-btn { display: inline-flex; }
}
@media (max-width: 900px) { .lp-head { display: flex; padding: 0 24px; } .lp-pills { display: none; } }
@media (max-width: 620px) { .lp-head { padding: 0 20px; gap: 3px; } .lp-try { min-height: 40px; padding: 0 12px; } .lp-try .icon { display: none; } .lp-brand .brand-mark { width: 26px; height: 26px; } .lp-brand .brand-name { width: 60px; height: 26px; } }
@media (max-width: 520px) { .pill.lp-login { display: none; } }
@media (max-width: 440px) { .lp-brand-ui { display: none; } }

.lp-foot { max-width: 1600px; margin: 0 auto; padding: 24px clamp(20px, 5vw, 80px) 28px; border-top: 1px solid var(--border); background: transparent; color: var(--text); }
.lp-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-foot-copy { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.lp-foot-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.lp-foot-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 12px 16px; border-radius: var(--pill);
  color: var(--text); font-size: 14px; text-decoration: none; transition: background-color var(--dur) var(--ease);
}
.lp-foot-links a:hover { background: var(--surface-2); }
@media (max-width: 900px) { .lp-foot { padding-inline: 24px; } .lp-foot-links { margin-left: -12px; } .lp-foot-links a { padding-inline: 12px; } }

/* ============ Eingang: Anmelden, Registrieren, Terminal ============ */
.ent-left {
  background:
    radial-gradient(640px 420px at 70% 38%, color-mix(in srgb, var(--yellow-soft) 85%, transparent), transparent 70%),
    radial-gradient(520px 380px at 12% 4%, color-mix(in srgb, var(--pink-soft) 80%, transparent), transparent 70%);
  background-repeat: no-repeat;
}
.ent-main h1 { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 3.7vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; }
.ent-sub { font-family: var(--font); font-weight: 400; font-size: 1.0625rem; color: var(--text-2); }
.ent-card { padding: 28px; gap: 16px; border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-radius: var(--radius-sheet); box-shadow: none; }
.ent-card input, .ent-card select { min-height: var(--ctl-lg); padding-inline: 20px; border-radius: var(--pill); }
.ent-card .btn-lg { border-radius: var(--pill); min-height: var(--ctl-lg); }
.ent-sso { min-height: var(--ctl-lg); border: 1px solid var(--edge); border-radius: var(--pill); background: transparent; font-weight: 500; transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.ent-sso:hover { background: var(--surface-3); }
.ent-sso:active { transform: translateY(1px); }
.ent-or { font-size: 11px; letter-spacing: .08em; color: var(--text-2); }
.ent-below { min-height: var(--ctl); padding: 0 18px; border: 1px solid var(--edge); border-radius: var(--pill); background: transparent; font-size: .9333rem; transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.ent-below:hover { background: var(--surface-3); }
.ent-below:active { transform: translateY(1px); }
.ent-choice { border-color: color-mix(in srgb, var(--border) 55%, transparent); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur-2) var(--ease); }
.ent-choice:hover { border-color: var(--edge); background: var(--surface); transform: translateY(-1px); }
.ent-choice-icon { border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; }
.ent-typo { border-color: var(--sel-edge); border-radius: var(--radius-md); background: var(--sel-bg); }
.ent-typo:hover { border-color: var(--focus); }
.ent-help { border-radius: var(--radius-md); }
.ent-mail { border-bottom-color: var(--line); }
.ent-note { color: var(--text-2); }
.ent-foot, .ent-foot a { color: var(--text-2); }
.ent-art video { border-radius: 40px; }
.pw-eye { right: 4px; border-radius: 50%; color: var(--text-2); }
.pw-eye:hover { background: color-mix(in oklab, var(--surface-2) 86%, var(--ink)); }
.otp-slot { background: var(--surface-2); border-color: var(--edge); }
.otp-slots .otp-slot:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.otp-slots .otp-slot:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.otp-slot.active { border-color: var(--focus); background: var(--pink-soft); box-shadow: inset 0 0 0 1px var(--focus); }
@media (prefers-reduced-motion: reduce) { .ent-choice:hover, .lp-try:active, .ent-sso:active, .ent-below:active { transform: none; } }
/* Kopf und Fuß füllen die Breite (der Rahmen ist eine Spalte; ohne Breite schrumpfen sie auf ihren Inhalt). */
.lp-head, .lp-foot { width: 100%; box-sizing: border-box; }

/* Bildkacheln der Website (Druckgrafik-Stil): weite Ecken wie die Karten. */
.lp-art-tile, .lp-art-tile img, .lp-art-tile svg { border-radius: var(--radius-lg); }
.help-search .help-search-input { min-height: var(--ctl-lg); padding: 0 20px 0 48px; border-radius: var(--pill); }
.help-search .icon { left: 18px; color: var(--text-2); }

/* ---------- Umschalter „Design“ (hell und dunkel): in den Kopfleisten wie auf der Startseite ---------- */
.theme-btn { font: inherit; color: var(--text); cursor: pointer; }
.theme-btn .icon { width: 20px; height: 20px; flex: none; transition: transform var(--dur-3) var(--ease); }
.theme-btn:hover .icon { transform: rotate(18deg); }
.theme-btn:active .icon { transform: scale(.9); }
@media (max-width: 1280px) { .lp-theme > span { display: none; } .pill.lp-theme { padding: 12px; } }
@media (max-width: 620px) { .pill.lp-theme { width: 44px; min-width: 44px; height: 44px; padding: 0; } }
.ent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ent-theme { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; transition: background-color var(--dur) var(--ease); }
.ent-theme:hover { background: var(--surface-2); }
.ent-theme > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .theme-btn:hover .icon, .theme-btn:active .icon { transform: none; } }

/* Fußzeile: Die Linie beginnt wie auf der Startseite am Seitenrand des Inhalts, nicht am Fensterrand. */
.lp-foot { border-top: 0; padding-top: 0; }
.lp-foot-row { border-top: 1px solid var(--border); padding-top: 24px; }

/* ---------- Menü der Website (Handy): die dunkle Fläche des Originals, in beiden Designs dunkel ---------- */
.site-menu { background: var(--structure); color: var(--on-structure); }
.site-menu .brand { color: var(--on-structure); }
.site-menu-close { width: 44px; height: 44px; border-radius: 50%; color: var(--on-structure); background: rgba(251, 244, 230, .1); }
.site-menu-close:hover { background: rgba(251, 244, 230, .18); color: var(--on-structure); }
.site-menu-link { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; color: rgba(249, 250, 252, .55); }
.site-menu-link:hover, .site-menu-link.current { color: var(--on-structure); }
.site-menu-login h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.015em; }
.site-menu-login .form { background: #242931; border-color: #565D68; border-radius: var(--radius-xl); }
.site-menu-login p, .site-menu-login .ap-links a, .site-menu-login p a, .site-menu-login .btn-link, .site-menu-login .field-head a { color: #E2E6ED; }
.site-menu-login .field > span, .site-menu-login .field-head label { color: var(--on-structure); }
.site-menu-login input, .site-menu .site-menu-login input:hover { background-color: var(--structure); border-color: #565D68; color: var(--on-structure); }
.site-menu-login input::placeholder { color: #B4BDCA; }
.site-menu-login input:focus, .site-menu-login input:focus-visible { background-color: color-mix(in oklab, var(--pink) 14%, var(--structure)); border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.site-menu-login .btn-primary { background: var(--pink); border-color: var(--pink); color: var(--on-block); }
.site-menu-login .btn-primary:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
.site-menu-login .btn-primary:disabled:not(.is-busy), .site-menu-login .btn-primary:disabled:not(.is-busy):hover { background: #242931; border-color: #565D68; color: #B4BDCA; }
.site-menu-login .ent-sso { border-color: #565D68; background: transparent; color: var(--on-structure); }
.site-menu-login .ent-sso:hover { background: rgba(251, 244, 230, .07); color: var(--on-structure); }
.site-menu-login .ent-or { color: #B4BDCA; }
.site-menu-login .ent-mail { color: var(--on-structure); border-bottom-color: #565D68; }
.site-menu-login .pw-eye { color: #B4BDCA; }
.site-menu-login .pw-eye:hover { color: var(--on-structure); background: rgba(251, 244, 230, .1); }
.site-menu-login .otp-slot { background: var(--structure); border-color: #565D68; color: var(--on-structure); }
.site-menu-login .otp-slot.active { background: color-mix(in oklab, var(--pink) 14%, var(--structure)); border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }

/* ============ Seiten der App wie die Vorschauen der Startseite (18.11.2026) ============
   Vorbild sind die drei Karten im Aufmacher der Startseite (web/start/organism.tsx, nach organism-composition von
   „000h by Cojeev“, MIT): weiße Karte mit weiten Ecken und weichem Schatten, kleine Zeile in Großbuchstaben, Titel in
   zwei Zeilen, zwei Formen oben rechts, Schritte mit farbigem Kiesel und Nummer, dicke Fortschrittslinie.
   Bausteine dazu in React: web/react/lib/Shape.tsx (Shape, Mark, CardArt, CardHead, Progress).
   Zeiten, Dienstplan und Abwesenheiten haben schon ihre eigene Gestaltung und bleiben unberührt: Die Karten gelten nur
   auf den Seiten, deren Name am Hauptbereich steht (data-page, web/app/06-geruest.js). */

/* ---------- Formen ---------- */
.cj-shape { display: block; fill: var(--blue); }
.cj-shape[data-tone="yellow"] { fill: var(--yellow); }
.cj-shape[data-tone="pink"] { fill: var(--pink); }
.cj-shape[data-tone="olive"] { fill: var(--olive); }
.cj-shape[data-tone="beige"] { fill: var(--surface-2); }
.cj-shape[data-tone="red"] { fill: var(--danger); }

/* Marke einer Zeile: Symbol auf einem Kiesel, immer dunkle Schrift (wie bedrucktes Papier). */
.cj-mark { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; color: var(--on-block); }
.cj-mark > .cj-shape { position: absolute; inset: 0; width: 100%; height: 100%; transition: fill var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.cj-mark > .icon { position: relative; width: 17px; height: 17px; }

/* Bild oben rechts: große Form schräg, kleine Form davor. */
.cj-art { position: relative; flex: none; width: 64px; height: 76px; margin: -4px -4px 0 0; }
.cj-art > .cj-shape { position: absolute; width: 54px; height: 69px; left: 2px; top: 0; rotate: 16deg; }
.cj-art > .cj-shape + .cj-shape { width: 38px; height: 38px; left: 22px; top: 40px; rotate: -19deg; }

/* ---------- Karte ---------- */
.cj-card {
  display: flex; flex-direction: column; gap: 18px; padding: 26px 28px 24px; border-radius: var(--radius-sheet);
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 26px 52px -30px rgba(17, 17, 17, .26);
}
.cj-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cj-card-titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cj-eyebrow { margin: 0; font-size: .75rem; font-weight: 600; line-height: 1.35; letter-spacing: .09em; color: var(--text-2); overflow-wrap: anywhere; }
.cj-card-title { margin: 0; font-family: var(--font); font-size: clamp(1.32rem, 1.5vw, 1.5rem); font-weight: 600; line-height: 1.16; letter-spacing: -.035em; white-space: pre-line; }
.cj-summary { display: flex; align-items: center; gap: 12px; }
.cj-badge { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--pill); background: var(--olive-soft); color: var(--pos); font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cj-meta { font-size: .8rem; line-height: 1.35; color: var(--text-2); }
.cj-note { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--text-2); }

/* Schritte: Kiesel, Titel mit Beschreibung, Nummer rechts, feine Linie darunter. */
.cj-items { display: flex; flex-direction: column; }
.cj-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 4px 13px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.cj-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cj-item-text strong { font-size: .94rem; font-weight: 600; line-height: 1.25; }
.cj-item-text > span { font-size: .8rem; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cj-item-no { flex: none; font-size: .8rem; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cj-item[data-complete="true"] strong { text-decoration: line-through; text-decoration-color: var(--text-2); }
.cj-item:hover .cj-mark > .cj-shape { transform: rotate(-8deg) scale(1.06); }
.cj-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cj-item[data-complete="true"]:hover strong { text-decoration: line-through; }
.cj-item:focus-visible { outline: 0; border-radius: var(--radius); box-shadow: var(--ring); }

/* Fortschritt: dicke Linie in Gelb, Prozent rechts. Breite über --v (0–1), gesetzt von Progress. */
.cj-progress { display: flex; align-items: center; gap: 14px; }
.cj-progress-track { position: relative; flex: 1; height: 7px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.cj-progress-fill { --v: 0; position: absolute; inset: 0; border-radius: inherit; background: var(--yellow); transform-origin: left center; transform: scaleX(var(--v)); transition: transform .6s var(--ease); }
.cj-progress-value { flex: none; min-width: 3.2ch; text-align: right; font-size: .8rem; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Abschnitte als Karten (nur auf den genannten Seiten) ---------- */
.cj-sheet,
:is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section:not(.card .list-section) {
  margin-top: 0; padding: 20px 24px 10px; gap: 10px; border-radius: var(--radius-sheet); background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 22px 46px -32px rgba(17, 17, 17, .24);
}
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) .list-section-head { border-top: 0; padding: 0; gap: 12px; }
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) .list-section-head h2 { font-family: var(--font); font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; }
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) .list-section-head .count { background: var(--olive-soft); color: var(--pos); border: 0; }
.list-section-head .cj-mark { width: 32px; height: 32px; }
.list-section-head .cj-mark > .icon { width: 15px; height: 15px; }
/* In der Karte: Zeilen ohne Linie oben, die letzte ohne Linie unten. */
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) :is(.inbox, .ap-list) { border-top: 0; }
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) :is(.inbox-item, .ap-row):last-child { border-bottom: 0; }
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) .empty { border: 0; padding-inline: 0; }
[data-page="uebersicht"] .grid-2 { gap: 20px; align-items: stretch; }
/* Kopf einer Karte in einer Zeile: Wird es eng, kürzt sich der Hinweis, statt den Knopf in eine zweite Zeile zu schieben. */
@media (min-width: 761px) {
  :is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) > .list-section-head { flex-wrap: nowrap; }
  :is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) > .list-section-head .meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section) > .list-section-head :is(h2, .count, .list-section-actions, .cj-mark) { flex: none; }
}
[data-page="uebersicht"] .ov-inbox .list-section { padding-bottom: 6px; }

/* Büroseiten: Karten ohne Rand mit weichem Schatten, Tabellen, die frei auf der Seite stehen, auf einer Karte. */
:is([data-page="uebersicht"], [data-page="freigaben"], [data-page="team"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="protokoll"], [data-page="einstellungen"], [data-page="hilfe"], [data-page="kontakt"]) .card:not(.plan-card, .step-card) {
  border: 0; border-radius: var(--radius-sheet);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 22px 46px -32px rgba(17, 17, 17, .24);
}
:is([data-page="team"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="hilfe"], [data-page="kontakt"]) :is(.card > h2, .card-head h2, .step-title) {
  font-family: var(--font); font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em;
}
:is([data-page="team"], [data-page="protokoll"]) .table-wrap:not(.card .table-wrap, .list-section .table-wrap, .dialog .table-wrap) {
  padding: 6px 18px; border-radius: var(--radius-xl); background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 22px 46px -32px rgba(17, 17, 17, .24);
}
:is([data-page="team"], [data-page="protokoll"]) .table-wrap:not(.card .table-wrap, .list-section .table-wrap, .dialog .table-wrap) table.table-plain tr:last-child td { border-bottom: 0; }
:is([data-page="team"], [data-page="lohn"], [data-page="nachweis"]) .stat { border: 0; border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -30px rgba(17, 17, 17, .24); }

/* Feste Kopfzeilen und Spalten auf einer Karte tragen deren Weiß, nicht den Seitengrund (18-ux-buero.css). */
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="team"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="protokoll"], [data-page="einstellungen"], [data-page="hilfe"], [data-page="kontakt"]) .card, :is([data-page="team"], [data-page="protokoll"]) .table-wrap) :is(.sticky-head thead th, .sticky-cols-1 tbody tr:not(.detail-row) > td:nth-child(1), .sticky-cols-1 thead th:nth-child(1), .sticky-cols-2 tbody tr:not(.detail-row) > td:nth-child(-n+2), .sticky-cols-2 thead th:nth-child(-n+2)) { background: var(--surface); }
:is(.cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="team"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="protokoll"], [data-page="einstellungen"], [data-page="hilfe"], [data-page="kontakt"]) .card, :is([data-page="team"], [data-page="protokoll"]) .table-wrap) .table tr.clickable:hover > td { background: var(--surface-2); }
/* Formulare der Personalakte und der Einstellungen: jeder Abschnitt eine Karte. */
:is([data-page="team"], [data-page="einstellungen"]) .page .hform { gap: 20px; }
:is([data-page="team"], [data-page="einstellungen"]) .page .hform > .hform-section {
  padding: 20px 24px 22px; border-radius: var(--radius-sheet); background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 22px 46px -32px rgba(17, 17, 17, .24);
}
:is([data-page="team"], [data-page="einstellungen"]) .page .hform > .hform-section > .hform-title { font-family: var(--font); font-size: 1.12rem; letter-spacing: -.02em; border-bottom: 0; padding-bottom: 2px; }
@media (max-width: 720px) { :is([data-page="team"], [data-page="einstellungen"]) .page .hform > .hform-section { padding: 16px 16px 18px; border-radius: var(--radius-xl); } }

/* Berichte: Zeilen wie die Schritte der Startseite, Kiesel links. Protokoll: Siegel als Karte. */
.report-card > .cj-mark { flex: none; }
.report-card > .report-text { flex: 1; min-width: 0; }
.report-card > .report-text strong { display: block; margin-bottom: 2px; font-weight: 600; }
[data-page="berichte"] .report-list { padding-block: 10px; }
[data-page="berichte"] .report-card { justify-content: flex-start; gap: 14px; border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent); }
[data-page="berichte"] .report-card.active { background: var(--blue-soft); }
[data-page="berichte"] .report-card.active strong { color: var(--text); }
[data-page="berichte"] .report-card:hover .cj-mark > .cj-shape { transform: rotate(-8deg) scale(1.06); }
@media (max-width: 720px) {
  [data-page="berichte"] .report-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
  [data-page="berichte"] .report-card > .report-text { flex-basis: calc(100% - 60px); }
  [data-page="berichte"] .report-card > .report-actions { margin-left: 50px; }
}
[data-page="protokoll"] .audit-seal { border: 0; border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -30px rgba(17, 17, 17, .24); }

/* Posteingang: Kiesel statt Kreis, Linien wie bei den Schritten. */
.inbox-item { border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent); }
.inbox-item > .cj-mark { justify-self: center; }
.inbox-item:hover > .cj-mark > .cj-shape { transform: rotate(-8deg) scale(1.06); }
.inbox-text strong { font-weight: 600; }

/* Kacheln der Übersicht: weiße Karten ohne Rand mit weichem Schatten, wie die Karten der Startseite. */
[data-page="uebersicht"] .stat {
  border: 0; border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -30px rgba(17, 17, 17, .24);
}
[data-page="uebersicht"] .stat.stat-link:hover { box-shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 24px 46px -28px rgba(17, 17, 17, .3); }

/* Platzhalter beim Laden in derselben Form wie die Karten. */
.sk-tile, .sk-card { border: 0; border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -30px rgba(17, 17, 17, .2); }
.sk-card { border-radius: var(--radius-sheet); }
.sk-row { border-top-color: color-mix(in srgb, var(--border) 45%, transparent); }

/* ---------- Zu erledigen: Fahrplan links, Arbeit rechts ---------- */
/* Nichts offen: die Karte allein in der Mitte statt verloren links. */
.todo-layout.is-empty { grid-template-columns: minmax(0, 460px); justify-content: center; padding-top: 4vh; }
.todo-layout.is-empty .todo-main { display: none; }
.todo-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.todo-aside { position: sticky; top: 24px; min-width: 0; }
.todo-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.todo-main .ap-rest { padding-left: 8px; }
.todo-main .pr-in-inbox { padding-bottom: 20px; }
/* Rechts ist weniger Platz: die Zeilen gleich in zwei Reihen (wie sonst unter 1100 px). */
@media (min-width: 761px) {
  .todo-main .ap-row { grid-template-columns: 24px minmax(140px, 190px) minmax(0, 1fr) minmax(0, 1fr); padding-block: 14px; }
  .todo-main .ap-basis { grid-column: 3 / 5; }
  .todo-main .ap-actions { grid-column: 2 / 5; justify-content: flex-start; }
}
@media (max-width: 1100px) {
  .todo-layout { grid-template-columns: minmax(0, 1fr); }
  .todo-aside { position: static; }
}
@media (max-width: 760px) {
  .cj-card { padding: 22px 20px 20px; gap: 16px; }
  .cj-sheet, :is([data-page="uebersicht"], [data-page="freigaben"], [data-page="lohn"], [data-page="berichte"], [data-page="nachweis"], [data-page="einstellungen"], [data-page="team"]) .list-section:not(.card .list-section) { padding: 16px 16px 6px; border-radius: var(--radius-xl); }
  /* Zeilen in der Karte nicht noch einmal als Karte. */
  .cj-sheet .ap-list { gap: 0; }
  .cj-sheet .ap-row { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cj-progress-fill, .cj-mark > .cj-shape { transition: none; }
  .cj-item:hover .cj-mark > .cj-shape, .inbox-item:hover > .cj-mark > .cj-shape { transform: none; }
}

/* ---------- Lohn: Fahrplan des Monatsabschlusses als Karte, die vier Schritte nebeneinander ---------- */
.lohn-plan { gap: 16px; }
.lohn-plan .steps-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 22px; }
.lohn-plan .steps-row a.cj-item { padding: 12px 2px 14px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: 0; background: none; }
.lohn-plan .steps-row a.cj-item.current { border-bottom: 2px solid var(--pink); }
.lohn-plan .steps-row a.cj-item:hover { border-color: color-mix(in srgb, var(--border) 70%, transparent); text-decoration: none; }
.lohn-plan .steps-row a.cj-item.current:hover { border-bottom-color: var(--pink); }
.step-card .step-title .cj-mark { width: 32px; height: 32px; }
.step-card .step-title .cj-mark > .icon { width: 15px; height: 15px; }
[data-page="lohn"] .step-card { border: 0; border-radius: var(--radius-sheet); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 22px 46px -32px rgba(17, 17, 17, .24); }
[data-page="lohn"] .step-card.done:not(.current) { background: var(--surface); opacity: .92; }
[data-page="lohn"] .step-card.current { box-shadow: 0 0 0 2px var(--pink), 0 22px 46px -32px rgba(17, 17, 17, .24); }
@media (max-width: 900px) {
  .lohn-plan .steps-row { grid-auto-flow: row; grid-auto-columns: auto; }
}

/* ---------- Terminal: Karte wie „Stempeln“ auf der Startseite ----------
   Gruß und Blüte oben, die heute gearbeitete Zeit groß in der Mitte, darunter Stand, Linie bis zum Ende der Schicht und
   die Knöpfe als Pillen: Hauptaktion in der Farbe ihrer Bedeutung (Kommen Rosa, Pause Gelb), Gehen daneben in Creme. */
.tk-stamp.cj-card { width: min(100%, 540px); gap: 16px; padding: clamp(22px, 3.2vh, 32px) clamp(22px, 2.6vw, 32px); text-align: left; }
.tk-stamp.cj-card .cj-eyebrow { font-size: .8rem; }
.tk-stamp.cj-card .tk-hello { font-family: var(--font); font-size: clamp(1.55rem, 2.5vw, 2.05rem); font-weight: 600; line-height: 1.12; letter-spacing: -.03em; }
.tk-art { flex: none; width: clamp(62px, 8.5vh, 84px); aspect-ratio: 1; margin: -6px -6px 0 0; }
.tk-art > .cj-shape { width: 100%; height: 100%; rotate: -13deg; }
.tk-clock { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(4px, 1.6vh, 16px) 0 2px; text-align: center; }
.tk-worked { font-family: var(--display); font-weight: 500; font-size: clamp(3.4rem, 9.5vh, 5.8rem); line-height: 1; letter-spacing: -.055em; font-variant-numeric: lining-nums tabular-nums; }
.tk-stamp.cj-card .tk-status { align-self: center; font-size: 1rem; color: var(--text-2); }
.tk-progress .cj-progress-track { height: 8px; }
.tk-progress .cj-progress-fill { background: var(--work); }
.tk-stamp[data-state="break"] .tk-progress .cj-progress-fill { background: var(--pause); }
.tk-plan { margin: 0; text-align: center; font-size: .98rem; color: var(--text-2); }
.tk-stamp.cj-card .tk-warn { text-align: center; }
.tk-stamp.cj-card .tk-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.tk-stamp.cj-card .tk-action {
  flex: 1 1 0; min-height: clamp(62px, 8.6vh, 84px); flex-direction: row; gap: 12px; padding: 0 24px;
  border-radius: var(--pill); font-size: 1.22rem; box-shadow: none;
}
.tk-stamp.cj-card .tk-action .icon { width: 24px; height: 24px; }
.tk-stamp.cj-card .tk-actions.one .tk-action { min-height: clamp(70px, 9.6vh, 92px); font-size: 1.38rem; }
.tk-stamp.cj-card :is(.tk-do-in, .tk-do-break_end) { background: var(--pink); color: var(--on-block); }
.tk-stamp.cj-card .tk-do-break_start { background: var(--yellow); color: var(--on-block); }
/* Gehen steht neben der Hauptaktion in Creme; bei der Rückfrage („Wirklich gehen?“) wird es zur dunklen Hauptaktion. */
.tk-stamp.cj-card .tk-do-out { flex: 0 1 38%; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tk-stamp.cj-card .tk-actions.one .tk-do-out, .tk-stamp.cj-card .tk-ask .tk-do-out { flex: 1 1 0; background: var(--ink); color: var(--on-ink); box-shadow: none; }
.tk-stamp.cj-card .tk-do-back { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tk-stamp.cj-card .tk-ask-text { flex-basis: 100%; margin: 0; text-align: center; }
.tk-stamp.cj-card .tk-actions:not(.tk-ask) { flex-wrap: nowrap; }
@media (max-width: 480px) {
  .tk-stamp.cj-card .tk-actions { gap: 10px; }
  .tk-stamp.cj-card .tk-action { padding: 0 16px; gap: 8px; font-size: 1.1rem; }
  .tk-stamp.cj-card .tk-do-out { flex-basis: auto; }
}
.tk-stamp.cj-card .tk-msg { text-align: center; }
.tk-stamp.cj-card .tk-msg:empty { display: none; }
.tk-stamp.cj-card .tk-other { align-self: center; }
.tk-stamp.cj-card .tk-cancel { min-height: 48px; min-width: 0; margin-top: -2px; padding: 0 18px; border: 0; background: none; color: var(--text-2); font-size: .98rem; }
.tk-stamp.cj-card .tk-cancel:active { background: var(--surface-2); }
/* PIN-Feld in derselben Sprache: Tasten als weiche Kissen, OK in Rosa wie die Hauptaktion. */
.tk-pad button { border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 14px 28px -24px rgba(17, 17, 17, .3); }
.tk-pad .ok { background: var(--pink); color: var(--on-block); }
.tk-pad .ok:active { background: var(--pink-deep); }
.tk-stage { border-radius: var(--radius-sheet); box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 26px 52px -30px rgba(17, 17, 17, .26); }
@media (orientation: portrait), (max-width: 720px) {
  .tk-stamp.cj-card { width: min(100%, 640px); }
}
@media (max-height: 640px) and (orientation: landscape) {
  .tk-stamp.cj-card { gap: 10px; padding: 18px 22px; }
  .tk-worked { font-size: 3rem; }
  .tk-art { width: 52px; }
}

/* ---------- Assistent: wie die Vorschau „Assistent“ der Startseite ---------- */
.ai-panel { border: 0; border-radius: var(--radius-sheet); background: var(--surface); box-shadow: 0 2px 6px rgba(17, 17, 17, .05), 0 34px 70px -28px rgba(17, 17, 17, .34); }
.ai-head { align-items: center; padding: 20px 18px 6px 20px; border-bottom: 0; cursor: default; }
.ai-title { gap: 14px; }
.ai-avatar { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: var(--on-block); font-weight: 600; font-size: 1rem; box-shadow: 0 0 0 4px var(--pink-soft); }
.ai-title > div { gap: 2px; }
.ai-title strong { font-family: var(--font); font-size: 1.16rem; font-weight: 600; letter-spacing: -.02em; }
.ai-title .ai-sub { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); }
.ai-dot { width: 7px; height: 7px; border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%; background: var(--olive); }
.ai-title { flex: 1; min-width: 0; }
.ai-title > div { min-width: 0; }
.ai-title strong, .ai-title .ai-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-head-actions { flex: none; gap: 4px; }
.ai-head-actions .icon-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.ai-head-actions .icon-btn:hover { background: var(--surface-2); }
.ai-head-actions .icon-btn .icon { width: 16px; height: 16px; }
.ai-widget.big .ai-head-actions { gap: 6px; }
.ai-widget.big .ai-head-actions .icon-btn { width: 36px; height: 36px; }
.ai-day { margin: 0; padding: 4px 20px 2px; text-align: center; font-size: .8rem; color: var(--text-2); }
.ai-panel.history .ai-day { display: none; }
.ai-body { padding: 12px 20px 16px; gap: 16px; }
/* Blasen: Noya in zartem Blau mit Spitze unten links, du in Blau mit Spitze unten rechts. */
.ai-msg.bot { align-self: flex-start; max-width: 92%; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: color-mix(in srgb, var(--surface) 72%, var(--blue)); color: var(--text); }
.ai-msg.bot .ai-table-wrap { background: var(--surface); border-radius: var(--radius); padding: 2px 6px; }
.ai-msg.user { max-width: 86%; }
.ai-msg.user .bubble { padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: var(--blue); color: var(--on-block); }
.ai-empty .ai-hello { align-self: flex-start; max-width: 92%; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: color-mix(in srgb, var(--surface) 72%, var(--blue)); font-family: var(--font); font-size: 1rem; font-weight: 500; }
.ai-actions { border: 0; border-radius: var(--radius-xl); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
/* Eingabe als beige Pille, Senden als rosa Kreis. */
.ai-input { padding: 6px 16px 8px; }
.ai-group { border: 0; border-radius: var(--radius-xl); background: var(--surface-2); box-shadow: none; }
.ai-group:focus-within { box-shadow: var(--ring); }
.ai-group .ai-send { width: 36px; height: 36px; background: var(--pink); color: var(--on-block); box-shadow: none; }
.ai-group .ai-send:disabled { background: color-mix(in srgb, var(--pink) 32%, var(--surface-2)); color: color-mix(in srgb, var(--on-block) 55%, transparent); }
.ai-attach { background: var(--surface); border-color: transparent; }
.ai-foot { justify-content: center; flex-wrap: wrap; text-align: center; padding: 0 18px 14px; font-size: .74rem; color: var(--text-2); }

/* Groß: Das Fenster füllt die Fläche neben der Seitenleiste. Die Leiste bleibt und lässt sich weiter ein- und
   ausklappen; der Inhalt der Seite liegt darunter. Der Knopf mit der Kugel tritt so lange zurück. */
.ai-widget.big.open { inset: 12px 12px 12px 292px; align-items: stretch; transition: left .22s cubic-bezier(.2, .7, .2, 1); }
body:has(.shell.collapsed) .ai-widget.big.open { left: 112px; }
.ai-widget.big.open .ai-fab { display: none; }
.ai-widget.big.open .ai-panel { width: auto; height: auto; flex: 1; min-height: 0; transform: none; }
.ai-widget.big .ai-body, .ai-widget.big .ai-input { padding-inline: max(20px, calc((100% - 820px) / 2)); }
.ai-widget.big .ai-head { padding: 22px 22px 6px 26px; }
body.ai-big .main { visibility: hidden; }
body.ai-big .shell.peek .sidebar { z-index: 95; }
@media (max-width: 1279px) and (min-width: 901px) { .ai-widget.big.open { left: 112px; } }
@media (max-width: 900px) {
  .ai-widget.big.open { inset: 0; }
  .ai-widget.big.open .ai-panel { border-radius: 0; }
  .ai-big-btn { display: none; }
  body.ai-big .main { visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { .ai-widget.big.open { transition: none; } }
/* Handy: Das Fenster liegt als Blatt zwischen oberem Rand und Reiterleiste; die Kugel tritt so lange zurück (vorher
   ragte der Kopf mit dem Schließen-Knopf oben aus dem Bild). */
@media (max-width: 560px) {
  .ai-widget.open:not(.big) .ai-panel {
    position: fixed; top: max(12px, env(safe-area-inset-top, 0px)); left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    width: auto; height: auto;
  }
  .ai-widget.open .ai-fab { display: none; }
  .ai-head { padding: 14px 12px 4px 14px; }
  .ai-title { gap: 10px; }
  .ai-avatar { width: 34px; height: 34px; font-size: .9rem; box-shadow: 0 0 0 3px var(--pink-soft); }
  .ai-title strong { font-size: 1.02rem; }
  .ai-head-actions .icon-btn { width: 30px; height: 30px; }
}
/* ============ Gestaltung nach „000h by Cojeev“: Bewegung und Handy (Reiter, Dialoge, Reiterleiste) ============
   Wie in 33-cojeev-bausteine.css nur Aussehen und Bewegung, der Aufbau der Seiten bleibt. Vorbilder (MIT, siehe
   web/cojeev/HERKUNFT.md): die gleitende Auswahl der Reiter (styles/tabs.css, flow-press.css), das Blatt von unten
   (styles/sheet.css) und der Dock (styles/dock.css). Die gleitende Fläche setzt web/app/38-gleiten.js. */

/* ---------- Gleitende Auswahl: Pillen-Reiter (.seg) und Reiter auf einer Linie (.page-tabs) ---------- */
.seg.has-glide, .page-tabs.has-glide { position: relative; isolation: isolate; }
.seg-glide, .tabs-glide {
  position: absolute; z-index: -1; top: 0; left: 0; pointer-events: none; opacity: 0;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), width .24s cubic-bezier(.2, .8, .2, 1), height .24s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}
.seg-glide { border-radius: var(--pill); background: var(--ink); }
.seg-glide.on, .tabs-glide.on { opacity: 1; }
/* Solange die Fläche gleitet, trägt der gewählte Knopf keine eigene Fläche, nur die helle Schrift. */
.seg.has-glide button.active { background: transparent; box-shadow: none; }
.seg.has-glide button.active { color: var(--on-ink); }
.tabs-glide { top: auto; bottom: -1px; height: 2px; border-radius: 2px; background: var(--pink); }
.page-tabs.has-glide a.active { border-bottom-color: transparent; }
.seg-glide.instant, .tabs-glide.instant { transition: none; }
@media (prefers-color-scheme: dark) {
  .seg-glide { background: var(--pink); }
  .seg.has-glide button.active { color: var(--on-block); }
}
@media (prefers-reduced-motion: reduce) { .seg-glide, .tabs-glide { transition: opacity .18s ease; } }

/* ---------- Dialoge am Handy: ein Blatt, das von unten kommt (nur im Browser; die Apps haben app/native/phone.css) ---------- */
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 600px) {
  :root:not(.noya-app) dialog:not(.anchored):not(.palette):not(.pick) {
    width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); margin: auto 0 0; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  :root:not(.noya-app) dialog:not(.anchored):not(.palette):not(.pick)[open] { animation: sheet-up .3s cubic-bezier(.2, .8, .2, 1); }
  /* Griff oben am Blatt, wie im Original */
  :root:not(.noya-app) dialog:not(.anchored):not(.palette):not(.pick)::before {
    content: ""; display: block; width: 40px; height: 4px; margin: 10px auto 0; border-radius: var(--pill); background: var(--border);
  }
  :root:not(.noya-app) dialog .dialog-body { max-height: calc(100dvh - 60px); }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { dialog:not(.anchored):not(.palette):not(.pick)[open] { animation: none; } }

/* ---------- Reiterleiste am Handy: wie in der iPhone-App (app/native/phone.css) ----------
   Schwebende Leiste, Symbole einfarbig in Schriftfarbe, der gewählte Reiter als zartes Feld, Beschriftung darunter.
   (Bis 18.11.2026 standen die Symbole auf farbigen Feldern; das gab es nur im Browser.) */
@media (max-width: 900px) {
  :root:not(.noya-app) .tabbar {
    left: 50%; right: auto; bottom: max(10px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    width: min(calc(100% - 24px), 440px); padding: 4px; gap: 0; justify-content: space-between;
    border: 0; border-radius: 32px; background: color-mix(in srgb, var(--surface) 86%, transparent);
    -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
    box-shadow: 0 0 0 .5px color-mix(in srgb, var(--ink) 12%, transparent), 0 1px 2px rgba(31, 30, 29, .05), 0 10px 30px rgba(31, 30, 29, .12);
  }
  :root:not(.noya-app) .tab {
    flex: 1 1 0; min-width: 0; max-width: none; min-height: 56px; flex-direction: column; gap: 1px; padding: 4px 2px;
    border-radius: 28px; font-size: .68rem; font-weight: 500; letter-spacing: .005em; color: var(--muted);
    transition: background-color var(--dur) var(--ease);
  }
  :root:not(.noya-app) .tab .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :root:not(.noya-app) .tab-icon { width: auto; height: 28px; background: none; border-radius: 0; color: inherit; }
  :root:not(.noya-app) .tab-icon .icon { width: 24px; height: 24px; stroke-width: 1.55; color: inherit; }
  :root:not(.noya-app) .tab.active { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--ink) 8%, transparent); }
  :root:not(.noya-app) .tab.active .tab-icon .icon { stroke-width: 1.9; }
  :root:not(.noya-app) .tab:active { background: color-mix(in srgb, var(--ink) 10%, transparent); }
  :root:not(.noya-app) .tab .badge { top: -1px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: .62rem; font-weight: 600; box-shadow: 0 0 0 2px var(--surface); }
  /* Platz über der schwebenden Leiste */
  :root:not(.noya-app) .main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  :root:not(.noya-app) .ai-widget { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  :root:not(.noya-app) .toasts { bottom: calc(98px + env(safe-area-inset-bottom, 0px)); }
  :root:not(.noya-app) body.has-ai .toasts { bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .tab { transition: none; } }
/* ============ Gestaltung nach „000h by Cojeev“: Dienstplan ============
   Nur Aussehen, Aufbau und Abläufe bleiben (wie 33-cojeev-bausteine.css). Vorbild ist der Kalender des Originals
   (styles/calendar.css, MIT, siehe web/cojeev/HERKUNFT.md): Die Schrift trägt die Rangfolge, die Farbe den Zustand;
   kaum Linien, weiche Flächen, der heutige Tag als farbige Blase. Schichten sind gefüllte Kacheln in der Farbe ihres
   Bereichs statt Umrisse mit farbigem Rand. */

/* ---------- Bereichsfarben aus der Palette des Originals ---------- */
:root { --dept-0: var(--blue); --dept-1: var(--olive); --dept-2: var(--pink); --dept-3: var(--yellow); --dept-4: #cdbda8; --dept-5: #9fcac2; }
@media (prefers-color-scheme: dark) { :root { --dept-4: #b9aa95; --dept-5: #86b9b0; } }

/* ---------- Raster: kaum Linien, ruhige Flächen ---------- */
.roster { font-size: .875rem; }
.roster th, .roster td { border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent); }
.roster td + td, .roster th + th, .roster th + td { border-left-color: color-mix(in srgb, var(--line) 55%, transparent); }
.roster td.cell { height: 50px; padding: 4px; vertical-align: middle; }
.roster.compact td.cell { height: auto; padding: 3px; }
.roster th.closed-day, .roster td.closed-day, .roster tr.open-row > td.closed-day { background: color-mix(in srgb, var(--surface-2) 42%, var(--surface)); }
.roster td.cell.can-edit:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.roster td.cell.can-edit.empty:hover::after, .roster td.cell.can-edit.empty:focus-visible::after { border-radius: var(--radius); }

/* ---------- Kopf: Tageszahl groß in der Titelschrift, Wochentag in Versalien, heute als Blase ---------- */
.roster thead th { padding-block: 10px 8px; background: var(--surface); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--line) 75%, transparent); }
.roster thead th.closed-day { background: color-mix(in srgb, var(--surface-2) 42%, var(--surface)); }
.roster thead th.wk { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--line) 75%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--line) 75%, transparent); }
.roster thead th.today { box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--line) 75%, transparent); }
.roster .day-top { min-height: 34px; }
.roster .day-num { display: inline-flex; align-items: baseline; gap: 5px; }
.roster .day-num .fig { font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1; letter-spacing: -.035em; color: var(--text); }
.roster .day-num .wd { font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.roster thead th.today .day-num .fig {
  display: inline-grid; place-items: center; min-width: 1.75em; height: 1.5em; margin: -.14em -.04em -.12em -.3em; padding: 0 .3em;
  border-radius: 43% 57% 48% 52% / 55% 44% 56% 45%; background: var(--pink); color: var(--on-block); font-weight: 700;
}
.roster thead th.today .day-num .wd { color: var(--work-text); }
.roster .day-sum { margin-top: 5px; font-size: .72rem; font-weight: 500; color: var(--text-2); }
.roster .day-cost { font-size: .7rem; color: var(--text-2); }
.roster thead th.name .day-top { min-height: 0; font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.roster thead th.name .day-sum { color: var(--text-2); }
.roster thead th.wk { font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
.roster thead th.wk .day-sum, .roster thead th.wk .day-cost { font-family: var(--font); letter-spacing: 0; }
.roster th .day-actions .icon-btn { border-radius: var(--pill); }

/* ---------- Namen, Woche und Gruppen ---------- */
.roster tbody .name { padding-inline: 10px 6px; font-weight: 600; }
.roster tr.me > .name { box-shadow: inset 3px 0 0 var(--pink); }
.roster td.wk strong { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; }
.roster td.wk .muted { color: var(--text-2); }
.roster tr.group-row td { padding: 16px 0 7px; border-bottom: 0; }
.roster tr.group-row .group-title {
  left: 10px; gap: 7px; padding: 4px 6px 4px 10px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--dept, var(--surface-2)) 26%, var(--surface)); color: var(--text);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.roster tr.group-row .group-title .count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0; padding: 0 5px; border-radius: var(--pill);
  background: var(--surface); color: var(--text-2); font-size: .68rem; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.roster tr.group-row .dept-dot { width: 7px; height: 7px; background: color-mix(in srgb, var(--dept, var(--edge)) 70%, var(--text)); }
.roster tr.open-row > td, .roster tr.open-row > th { background: color-mix(in srgb, var(--pink) 7%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--pink) 45%, var(--line)); }
.roster tr.open-row > td.closed-day { background: color-mix(in srgb, var(--pink) 7%, color-mix(in srgb, var(--surface-2) 42%, var(--surface))); }

/* ---------- Schicht-Kacheln: gefüllt in der Farbe des Bereichs ---------- */
.roster .shift, .roster .who {
  border: 0; border-radius: 10px; padding: 6px 8px; box-shadow: none;
  background: color-mix(in srgb, var(--dept, var(--surface-2)) 30%, var(--surface)); color: var(--text);
  font-size: .78rem; font-weight: 600; letter-spacing: -.005em;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
.roster .shift + .shift, .roster .who + .who { margin-top: 4px; }
.roster .can-edit .shift:hover, .roster .can-edit .who:hover {
  background: color-mix(in srgb, var(--dept, var(--surface-2)) 46%, var(--surface));
  transform: translateY(-1px); box-shadow: 0 8px 16px -10px rgba(17, 17, 17, .35);
}
.roster .can-edit .shift:active, .roster .can-edit .who:active { transform: scale(.98); box-shadow: none; }
.roster .shift-meta { margin-top: 2px; color: color-mix(in srgb, var(--text) 72%, transparent); }
/* Entwurf: gestrichelt, ohne Fläche */
.roster .shift.draft, .roster .who.draft {
  padding: 4.5px 6.5px; background: transparent;
  border: 1.5px dashed color-mix(in srgb, var(--dept, var(--edge)) 70%, var(--text));
}
.roster .can-edit .shift.draft:hover { background: color-mix(in srgb, var(--dept, var(--surface-2)) 14%, var(--surface)); }
/* Offene Schicht: Rosa, die Farbe der Aufmerksamkeit */
.roster .shift.open-shift { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.roster .can-edit .shift.open-shift:hover { background: color-mix(in srgb, var(--pink) 38%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink), 0 8px 16px -10px rgba(17, 17, 17, .35); }
.roster .who.open { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.roster .can-edit .who.open:hover { background: color-mix(in srgb, var(--pink) 38%, var(--surface)); }
.roster .shift.warn, .roster .who.warn { box-shadow: inset 0 0 0 1.5px var(--neg); }
.roster .shift.mine, .roster .who.me { box-shadow: inset 0 0 0 1.5px var(--pink); }
.roster .shift.pending, .roster .who.pending { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pink) 70%, transparent); }
.roster .shift.dragging { opacity: .4; transform: none; }
.roster td.cell.drop-target { background: color-mix(in srgb, var(--pink) 16%, var(--surface)); box-shadow: inset 0 0 0 2px var(--pink); }
.roster .abs { border-radius: var(--pill); padding: 2px 8px; }

/* Schichten-Ansicht: die Zeile der Schicht trägt die Bereichsfarbe als weiche Fläche statt Randlinie */
.roster.shifts .name { border-left: 0; box-shadow: inset 4px 0 0 color-mix(in srgb, var(--dept, var(--surface-2)) 80%, transparent); }
.roster.shifts .name .name-main { font-family: var(--display); font-size: .98rem; font-weight: 600; letter-spacing: -.02em; }

/* ---------- Zeitstrahl ---------- */
.tv-bar {
  border: 0; border-radius: 12px; background: color-mix(in srgb, var(--dept, var(--surface-2)) 32%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dept, var(--edge)) 45%, transparent);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
button.tv-bar:hover { background: color-mix(in srgb, var(--dept, var(--surface-2)) 46%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dept, var(--edge)) 60%, transparent), 0 8px 18px -10px rgba(17, 17, 17, .35); }
.tv-bar.draft { background: var(--surface); box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--dept, var(--edge)) 70%, var(--text)); }
.tv-bar.open { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.tv-bar.warn { box-shadow: inset 0 0 0 1.5px var(--neg); }
@media (prefers-color-scheme: dark) {
  .tv-bar { background: color-mix(in srgb, var(--dept, var(--surface-2)) 30%, var(--surface)); border: 0; }
  .tv-bar.draft { background: var(--surface); }
  .tv-bar.open { background: color-mix(in srgb, var(--pink) 22%, var(--surface)); }
}

/* ---------- Tag am Handy und „Meine Woche“: dieselben gefüllten Kacheln statt Zeilen mit Randlinie ---------- */
.day-group { gap: 6px; }
.day-group > .quick-group {
  align-self: flex-start; margin: 10px 0 2px; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-2); color: var(--text);
  font-size: .68rem; letter-spacing: .08em;
}
.day-row {
  border: 0; border-radius: 14px; padding: 9px 10px 9px 12px; min-height: 52px;
  background: color-mix(in srgb, var(--dept, var(--surface-2)) 26%, var(--surface));
  transition: transform .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease);
}
button.day-row:hover { background: color-mix(in srgb, var(--dept, var(--surface-2)) 40%, var(--surface)); }
button.day-row:active { transform: scale(.985); }
.day-row.draft { padding: 7.5px 8.5px 7.5px 10.5px; background: transparent; border: 1.5px dashed color-mix(in srgb, var(--dept, var(--edge)) 70%, var(--text)); }
.day-row.open { background: color-mix(in srgb, var(--pink) 22%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.day-row.mine { box-shadow: inset 0 0 0 1.5px var(--pink); }
.dr-time { font-family: var(--display); font-size: .95rem; letter-spacing: -.02em; }
.dr-meta, .dr-go { color: color-mix(in srgb, var(--text) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { .day-row { transition: none; } button.day-row:active { transform: none; } }

/* ---------- Tage über dem Zeitstrahl: Pillen mit Tag oben und Zahl der Personen darunter, heute mit rosa Punkt ---------- */
.seg.tl-days { height: auto; align-items: stretch; }
.tl-days button { height: auto; min-height: 44px; padding: 5px 14px; justify-content: center; line-height: 1.15; }
.tl-days button span { font-weight: 600; }
.tl-days button small { margin-top: 1px; font-size: .66rem; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tl-days button.is-today:not(.active) span { text-decoration: none; }
.tl-days button.is-today span::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: var(--pink); vertical-align: middle; }

/* ---------- Monat: weiche Felder ohne Ring, die Tageszeit als Abstufung von hell (früh) bis dunkel (Nacht) ---------- */
.roster-month .ac-tile { border-radius: 8px; }
.roster-month .ac-tile.shift-tile { box-shadow: none; color: var(--text); }
.roster-month .ac-tile.shift-tile.k-early, .roster-month .legend .swatch.sw-plan.k-early { background: color-mix(in srgb, var(--ink) 14%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-mid { background: color-mix(in srgb, var(--ink) 26%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-late, .roster-month .legend .swatch.sw-plan.k-late { background: color-mix(in srgb, var(--ink) 42%, var(--surface)); }
.roster-month .ac-tile.shift-tile.k-night, .roster-month .legend .swatch.sw-plan.k-night { background: color-mix(in srgb, var(--ink) 78%, var(--surface)); color: var(--surface); }
.roster-month .legend .swatch.sw-plan { box-shadow: none; }
.roster-month button.ac-tile.shift-tile:hover { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--text); }
.roster-month .ac th .d { font-family: var(--display); font-size: .92rem; font-weight: 600; letter-spacing: -.02em; }
.roster-month .ac th .wd { font-weight: 600; letter-spacing: .06em; color: var(--text-2); }
.roster-month .ac th.today .d { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.55em; border-radius: 43% 57% 48% 52% / 55% 44% 56% 45%; background: var(--pink); color: var(--on-block); }
.roster-month .ac th.today .wd { color: var(--work-text); }
.roster-month .ac td.today { background: color-mix(in srgb, var(--pink) 10%, transparent); }
.roster-month .ac th, .roster-month .ac td { border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent); }
.roster-month .ac .group-row td { padding: 16px 0 7px; border-bottom: 0; }
.roster-month .ac .group-title {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 10px; border-radius: var(--pill); background: var(--surface-2); color: var(--text);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.roster-month .ac .group-title .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0; padding: 0 5px; border-radius: var(--pill); background: var(--surface); color: var(--text-2); letter-spacing: 0; }
.roster-month .ac-tile.shift-tile.draft { box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--plan) 70%, transparent); }
.roster-month .ac-tile.open-tile { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.roster-month .ac-tile.shift-tile.warn { box-shadow: inset 0 0 0 1.5px var(--neg); }

/* ---------- Legende: dieselben Flächen wie die Kacheln ---------- */
.roster-card .legend .swatch.sw-plan { background: color-mix(in srgb, var(--edge) 32%, var(--surface)); box-shadow: none; }
.roster-card .legend .swatch.sw-open { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pink); }
.roster-card .legend .swatch.sw-draft { border: 1.5px dashed var(--edge); }

@media (prefers-reduced-motion: reduce) {
  .roster .shift, .roster .who, .tv-bar { transition: none; }
  .roster .can-edit .shift:hover, .roster .can-edit .who:hover, .roster .can-edit .shift:active, .roster .can-edit .who:active { transform: none; }
}
/* ============ Gesicht des Assistenten (statt der Kugel) ============
   Nachgebaut nach „Agent State“ aus „000h by Cojeev“ (styles/agent-state.css, MIT, siehe web/cojeev/HERKUNFT.md):
   dieselben Farbpaare je Zustand. Die Farben sind fest (wie die farbigen Flächen des Originals) und gelten in beiden
   Themen; Augen und Mund sind immer dunkel. Gezeichnet von createNoyaFace (web/app/34-kugel-stimme.js). */
.noya-face {
  --agent-base: var(--pink); --agent-light: var(--yellow); --agent-deep: var(--pink-deep); --agent-cream: #fbf8f1; --agent-ink: #14171b;
  --nf-level: 0;
  position: relative; display: block; width: 100%; height: 100%;
}
.noya-face[data-mode="think"] { --agent-base: var(--blue); --agent-light: var(--pink); --agent-deep: var(--blue-deep); }
.noya-face[data-mode="speak"] { --agent-base: var(--pink); --agent-light: var(--yellow); --agent-deep: var(--pink-deep); }
.noya-face[data-mode="listen"] { --agent-base: var(--yellow); --agent-light: var(--agent-cream); --agent-deep: var(--yellow-deep); }
.nf-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.nf-light { stop-color: var(--agent-light); transition: stop-color .45s ease; }
.nf-base { stop-color: var(--agent-base); transition: stop-color .45s ease; }
.nf-deep { stop-color: var(--agent-deep); transition: stop-color .45s ease; }
.nf-cream { stop-color: var(--agent-cream); }
.nf-shadow { fill: var(--agent-deep); opacity: .14; transition: fill .45s ease; }
.nf-crease { stroke: var(--agent-deep); stroke-opacity: .25; }
.nf-face { fill: none; stroke: var(--agent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nf-mouth-open { fill: var(--agent-ink); stroke: none; opacity: 0; transition: opacity .15s ease; }
.noya-face[data-mode="speak"] .nf-mouth-open { opacity: 1; }
.noya-face[data-mode="speak"] .nf-mouth-line { opacity: 0; }
.nf-mouth-line { transition: opacity .15s ease; }
/* Denkt nach: der Blick geht nach oben zur Seite, der Mund wird gerade. */
.nf-eyes { transform-box: fill-box; transform-origin: center; animation: nf-blink 6s infinite; animation-delay: var(--nf-blink-delay, 0s); }
.noya-face[data-mode="think"] .nf-face { transform: translate(3px, -3px); }
.nf-face { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
/* Atmen und Mitschwingen: in Ruhe kaum sichtbar, beim Zuhören mit der Stimme */
.nf-body { transform-box: view-box; transform-origin: 90px 84px; animation: nf-breathe 4.8s ease-in-out infinite; }
.noya-face[data-mode="listen"] .nf-body { animation: none; transform: scale(calc(1 + var(--nf-level) * .07)); transition: transform .12s ease-out; }
.nf-fold { transform-box: view-box; transform-origin: 90px 80px; }
.noya-face:is([data-mode="think"], [data-mode="speak"]) .nf-fold { animation: nf-fold 10s ease-in-out infinite; }
.noya-face.intro .nf-svg { animation: nf-intro .9s cubic-bezier(.3, 1.3, .45, 1) both; }
@keyframes nf-blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes nf-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018) translateY(-.6px); } }
@keyframes nf-fold { 0%, 100% { transform: rotate(0) translateX(0); } 33% { transform: rotate(12deg) translateX(5px); } 66% { transform: rotate(-6deg) translateX(-3px); } }
@keyframes nf-intro { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* Ruhiges Zeichen: keine Bewegung, dafür kräftigere Striche, damit das Gesicht auch klein lesbar ist. */
.noya-face.still .nf-body, .noya-face.still .nf-eyes { animation: none; }
.ai-face-mark { display: inline-block; flex: none; width: 24px; height: 24px; }
/* Eng zugeschnitten (kleine Stellen): ohne Schatten, Gesicht etwas größer und kräftiger, damit es auch klein lesbar ist. */
.noya-face.tight .nf-shadow { display: none; }
.noya-face.tight .nf-face { stroke-width: 6.5; transform: translate(90px, 86px) scale(1.3) translate(-90px, -86px); }
.noya-face.tight[data-mode="think"] .nf-face { transform: translate(93px, 83px) scale(1.3) translate(-90px, -86px); }
/* Größen an den alten Stellen der Kugel */
.ai-face { display: inline-block; flex: none; }
.ai-fab .ai-face { width: 48px; height: 48px; filter: drop-shadow(0 6px 10px rgba(17, 17, 17, .16)); }
.ai-fab:hover .ai-face, .ai-widget.open .ai-fab .ai-face { filter: drop-shadow(0 8px 14px rgba(17, 17, 17, .2)); }
.ai-live-orb .ai-face { width: 84px; height: 84px; }
.ai-live-orb .nf-face { stroke-width: 3.4; }
.ai-mark .ai-face-mark { width: 30px; height: 30px; }
.ai-mark:has(.ai-face-mark) { background: none; }
.ob-card .ob-card-orb.ai-face-mark { width: 34px; height: 34px; }
/* Willkommen-Seite: das Gesicht im großen Knopf, ohne den alten Schein */
.wl-orb .noya-face { width: 100%; height: 100%; }
.wl-orb:has(.noya-face) { border-radius: 0; box-shadow: none; background: none; }
.wl-orb .nf-face { stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) {
  .nf-eyes, .nf-body, .nf-fold, .noya-face.intro .nf-svg { animation: none !important; }
  .noya-face[data-mode="listen"] .nf-body { transform: none; }
}
@media (forced-colors: active) { .nf-svg { forced-color-adjust: none; } }
/* ============ Seite „Prüfung“: Lage, Regeln, Nachweis (web/react/pruefung/Pruefung.tsx) ============
   Gestaltung nach „000h by Cojeev“ (MIT, siehe web/cojeev/HERKUNFT.md): Statuskarte mit weicher Form wie „Agent State“
   (Oliv = alles in Ordnung, Gelb = Hinweise, Rosa = dringend), Hinweise als gefüllte Kacheln, Regeln als aufklappbare
   Zeilen mit runden Umschaltern. Farben aus 01-grundlagen.css, hell und dunkel. */

/* ---------- Lage: Statuskarte ---------- */
.pr-status {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 22px;
  padding: 18px 24px 18px 14px; border: 0; border-radius: var(--radius-sheet);
  --pr-tone: var(--olive); --pr-soft: color-mix(in srgb, var(--olive) 22%, var(--surface));
  background: var(--pr-soft);
}
.pr-status.is-hinweise { --pr-tone: var(--yellow); --pr-soft: color-mix(in srgb, var(--yellow) 26%, var(--surface)); }
.pr-status.is-dringend { --pr-tone: var(--pink); --pr-soft: color-mix(in srgb, var(--pink) 24%, var(--surface)); }
.pr-blob { width: 104px; height: auto; overflow: visible; }
.pr-blob-body { fill: var(--pr-tone); }
.pr-blob-shadow { fill: var(--text); opacity: .08; }
.pr-blob-mark { fill: none; stroke: var(--on-block); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.pr-status.is-dringend .pr-blob, .pr-status.is-hinweise .pr-blob { animation: pr-breathe 4.8s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes pr-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03) translateY(-1px); } }
.pr-status-text h2 { margin: 0; font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.pr-status-text p { margin: 6px 0 0; color: var(--text-2); }
.pr-status .btn { background: var(--surface); }
@media (max-width: 640px) {
  .pr-status { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .pr-status .btn { grid-column: 1 / -1; justify-self: start; }
  .pr-blob { width: 76px; }
}

/* ---------- Lage: Ansicht und Hinweise ---------- */
.pr-views { margin: 18px 0 4px; }
.pr-views button { gap: 8px; }
.pr-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pill); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-views button.active .pr-count { background: color-mix(in srgb, var(--on-ink) 22%, transparent); }
.pr-empty { margin-top: 18px; }
.pr-group { margin-top: 22px; }
.pr-group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin: 0 2px 10px; }
.pr-group-head h3 { margin: 0; font-family: var(--display); font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; }
.pr-law { padding: 2px 9px; border-radius: var(--pill); background: var(--surface-2); color: var(--text-2); font-size: .72rem; font-weight: 600; }
.pr-group-head .check-less { margin-left: auto; }
.pr-items { display: grid; gap: 8px; }
.pr-item {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 12px 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--yellow) 22%, var(--surface));
}
.pr-item.urgent { background: color-mix(in srgb, var(--pink) 24%, var(--surface)); }
.pr-item.done { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.pr-item-text { flex: 1 1 320px; min-width: 0; line-height: 1.45; }
.pr-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pr-item-actions .btn { background: color-mix(in srgb, var(--surface) 85%, transparent); }
.pr-foot { margin-top: 22px; }
.check-less { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.check-less:hover { color: var(--text); }

/* ---------- Regeln: Stufe ---------- */
.pr-level h2 { font-family: var(--display); letter-spacing: -.02em; }
.pr-level-seg { margin-top: 14px; max-width: 520px; }
.pr-level-text { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--pink) 12%, var(--surface)); }

/* ---------- Regeln: einzeln anpassen ---------- */
.pr-rules { margin-top: 22px; }
.pr-rules > h2 { margin: 0 2px 10px; font-family: var(--display); font-size: 1.15rem; letter-spacing: -.02em; }
.pr-rule { margin-bottom: 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); transition: background-color .2s ease; }
.pr-rule-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border: 0; border-radius: 18px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pr-rule-head:hover { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.pr-rule-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pr-rule-dot { width: 12px; height: 12px; border-radius: 43% 57% 48% 52% / 55% 44% 56% 45%; background: var(--pink); }
.pr-rule.mode-off .pr-rule-dot { background: var(--border); }
.pr-rule-title { display: grid; gap: 1px; min-width: 0; }
.pr-rule-title strong { font-weight: 600; }
.pr-rule-title small { color: var(--text-2); font-size: .78rem; }
.pr-rule-state { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .86rem; white-space: nowrap; }
.pr-rule-state em { padding: 1px 8px; border-radius: var(--pill); background: color-mix(in srgb, var(--yellow) 40%, var(--surface)); color: var(--text); font-size: .7rem; font-style: normal; font-weight: 600; }
.pr-rule-head .icon { width: 16px; height: 16px; color: var(--text-2); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.pr-rule.open .pr-rule-head .icon { transform: rotate(180deg); }
.pr-rule-body { display: grid; gap: 12px; justify-items: start; padding: 0 16px 16px 40px; }
.pr-rule-body > p { margin: 0; color: var(--text-2); max-width: 70ch; }
.pr-mail { display: inline-flex; align-items: center; gap: 10px; }
/* Erklärung je Regel: so prüft Noya, Beispiel, wo es erscheint */
.pr-explain { display: grid; gap: 10px; margin: 0; max-width: 78ch; }
.pr-explain > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 14px; }
.pr-explain dt { color: var(--text-2); font-size: .8rem; font-weight: 600; letter-spacing: .02em; padding-top: 2px; }
.pr-explain dd { margin: 0; line-height: 1.5; }
.pr-explain > div:nth-child(2) dd { padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 20%, var(--surface)); }
.pr-off-note { margin: 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--pink) 16%, var(--surface)); max-width: 78ch; }
@media (max-width: 640px) { .pr-explain > div { grid-template-columns: 1fr; } }
.pr-rule.flash { animation: pr-flash 1.6s ease-out 1; }
@keyframes pr-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--pink); } 100% { box-shadow: var(--shadow-sm); } }
@media (max-width: 640px) {
  .pr-rule-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pr-rule-state { grid-column: 2; grid-row: 2; }
  .pr-rule-body { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .pr-blob, .pr-rule.flash { animation: none !important; } .pr-rule-head .icon { transition: none; } }
/* Am Handy: Offen, still gesammelt und erledigt nebeneinander in voller Breite, ohne Abschneiden */
@media (max-width: 640px) {
  .pr-views { display: flex; width: 100%; box-sizing: border-box; }
  .pr-views button { flex: 1 1 auto; justify-content: center; padding-inline: 8px; font-size: .84rem; }
}
/* Seitenleiste am Computer (seit 17.11.2026): Zähler bei „Zu erledigen“ als helle Pille mit Rand. Dringende Hinweise nach
   Gesetz zählen dort mit (der frühere rote Punkt an „Prüfung“ ist mit der Aufteilung der Seite entfallen). Sonst gilt die
   Gestaltung von Cojeev (33-cojeev-bausteine.css). Reiterleiste am Handy und die Apps sind davon nicht betroffen. */
.sidebar .nav a .badge[data-badge="freigaben"] {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); font-weight: 500;
}
/* ============ Dienstplan: klarere Kacheln und eine Kopfzeile ============
   1. Die Uhrzeit einer Schicht passt auch auf dem iPad quer (1024 px) ganz in ihre Kachel.
   2. Der Bereich ist ein Streifen links an der Schicht, die Fläche bleibt neutral. Gefüllt in Bereichsfarbe sahen Küche
      (Blau) und Service (Oliv) aus wie Krank und Urlaub. Abwesenheiten behalten ihre volle Farbe; Entwurf, offene Schicht,
      Hinweis und „meine Schicht“ bleiben, wie sie sind (35-cojeev-dienstplan.css).
   3. Ansicht, Bereich, Zeitraum, „Heute“, „Schicht“ und „Veröffentlichen“ stehen ab iPad quer in einer Zeile; das Menü
      „Weitere Aktionen“ sitzt oben neben der Hilfe. */

/* ---------- 1 und 2: Schicht-Kacheln ---------- */
.roster .shift, .roster .who {
  background-color: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  background-image: linear-gradient(var(--dept, color-mix(in srgb, var(--text) 22%, transparent)), var(--dept, color-mix(in srgb, var(--text) 22%, transparent)));
  background-size: 4px 100%; background-repeat: no-repeat;
  padding: 6px 5px 6px 9px;
}
.roster .can-edit .shift:hover, .roster .can-edit .who:hover { background-color: color-mix(in srgb, var(--surface-2) 95%, var(--surface)); }
.roster .shift-time { letter-spacing: -.012em; }
.roster.compact .shift { padding: 1px 4px 1px 8px; }
/* Entwurf und offene Schicht: ohne Streifen (gestrichelter Rand bzw. Rosa sagen genug) */
.roster .shift.draft, .roster .who.draft, .roster .shift.open-shift, .roster .who.open { background-image: none; }
.roster .shift.draft, .roster .who.draft { padding-left: 6.5px; }

/* Legende: Bereich als Streifen wie an der Schicht, „Schicht“ als neutrale Fläche */
.roster-card .legend .sw-dept { width: 4px; height: 12px; border-radius: 2px; }

/* ---------- 3: Kopfzeile ---------- */
.roster-today svg { display: none; }
@media (min-width: 1000px) {
  .viewbar.roster-bar { flex-wrap: nowrap; }
  .viewbar.roster-bar .seg, .viewbar.roster-bar .viewbar-actions { flex: none; }
  .viewbar.roster-bar .viewbar-select { flex: 0 1 11rem; width: auto; min-width: 7.5rem; }
  .viewbar.roster-bar .roster-period, .viewbar.roster-bar .roster-period .month-nav { flex: 0 1 auto; min-width: 0; }
  .viewbar.roster-bar .roster-period .month-nav .label { flex: 0 1 12.5rem; width: auto; min-width: 8.5rem; }
  .roster-publish { min-width: 0; }
  /* Schmale Leiste (iPad quer, kleiner Laptop): „Heute“ als Symbol */
  @container (max-width: 1100px) {
    .roster-today { width: 38px; padding-inline: 0; justify-content: center; }
    .roster-today svg { display: block; }
    .roster-today .btn-label { display: none; }
  }
}

/* Offene Schicht: „2 offen“ bleibt ganz stehen, gekürzt wird die Notiz daneben. */
.roster .shift-meta .sm-open { flex: none; }

/* ---------- Woche nach Personen oder nach Schichten: kleiner Umschalter in der Ecke der Tabelle ---------- */
.roster .week-by { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--pill); background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.roster .week-by button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .74rem; font-weight: 600;
  padding: 3px 8px; border-radius: var(--pill); cursor: pointer;
}
.roster .week-by button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(17, 17, 17, .12); }
.roster .week-by button:focus-visible { outline: 2px solid var(--work); outline-offset: 1px; }

/* ---------- Bedarf: Zeile im Plan und Dialog „Bedarf festlegen“ ---------- */
.roster tr.need-row > th, .roster tr.need-row > td { background: color-mix(in srgb, var(--surface-2) 30%, var(--surface)); }
.roster .need-edit { all: unset; cursor: pointer; display: block; }
.roster .need-edit:hover .name-main { text-decoration: underline; text-underline-offset: 3px; }
.roster .need-edit:focus-visible { outline: 2px solid var(--work); outline-offset: 2px; border-radius: 4px; }
.roster td.need-cell { padding: 4px; vertical-align: middle; font-size: .72rem; }
.roster .need-short { display: block; color: var(--neg); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster .need-ok { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-size: .72rem; }
.roster .need-ok svg { width: 12px; height: 12px; color: var(--pos); }
.roster .need-more { font-size: .7rem; color: var(--neg); }
.need-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.need-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.need-line select { width: auto; max-width: 11rem; }
.need-line input[type="time"] { width: 6.5rem; }
.need-line input[type="number"] { width: 4rem; }
.need-days { display: inline-flex; gap: 2px; }
.need-day { position: relative; display: inline-flex; }
.need-day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.need-day span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; font-size: .76rem; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.need-day input:checked + span { background: var(--text); color: var(--surface); box-shadow: none; }
.need-day input:focus-visible + span { outline: 2px solid var(--work); outline-offset: 1px; }
/* Zeitstrahl: Besetzung unter dem Bedarf rot */
.tv-cov i.short { background: color-mix(in srgb, var(--neg) 55%, transparent); }
.tv-cov i.short.peak { background: var(--neg); }
.tr-cov.short { box-shadow: inset 0 -3px 0 var(--neg); }
.tr-cov.short i.n { background: color-mix(in srgb, var(--neg) 50%, transparent); }
.roster .need-gap { display: block; line-height: 1.25; }
.roster .need-gap + .need-gap { margin-top: 3px; }
.roster .need-gap small { display: block; color: var(--text-2); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Dienstplan, nur für die Planung: Lücken in der Öffnungszeit im Tageskopf („niemand 09:00–11:00“) und Plan und Ist. */
.roster .day-gap { margin-top: 2px; font-size: .7rem; font-weight: 500; line-height: 1.25; color: var(--neg); }
/* Plan und Ist: was an einer vergangenen Schicht gestempelt wurde (unter der geplanten Zeit, kleiner und gedämpft). */
.roster .shift-meta .sm-ist { color: var(--text-2); font-size: .68rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
/* Dienstplan am Handy: die Bedienelemente in zwei Zeilen statt drei, damit der Plan früher beginnt.
   Oben die Ansicht (Tag, Woche, Monat) und „Veröffentlichen“ bzw. „Informieren“ als Symbol mit Zahl, darunter der
   Zeitraum, „Heute“ als Symbol und „Schicht“ (+). Die Reihenfolge im Quelltext bleibt (Tastatur und Bildschirmleser), nur das Raster ordnet. */
@media (max-width: 699px) {
  .viewbar.roster-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 8px;
    grid-template-areas: "seg pub pub" "nav today new";
  }
  .viewbar.roster-bar .roster-period, .viewbar.roster-bar .viewbar-actions { display: contents; }
  .viewbar.roster-bar .seg { grid-area: seg; min-width: 0; }
  .viewbar.roster-bar .seg button { min-width: 0; padding-inline: 6px; }
  .viewbar.roster-bar .roster-period .month-nav { grid-area: nav; min-width: 0; width: auto; }
  .viewbar.roster-bar .roster-period .month-nav .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .viewbar.roster-bar .roster-today { grid-area: today; width: 44px; padding-inline: 0; justify-content: center; }
  .viewbar.roster-bar .roster-today svg { display: block; }
  .viewbar.roster-bar .roster-today .btn-label { display: none; }
  .viewbar.roster-bar .roster-new { grid-area: new; width: 44px; padding-inline: 0; justify-content: center; }
  .viewbar.roster-bar .roster-publish { grid-area: pub; justify-self: stretch; width: 100%; min-width: 0; padding-inline: 8px; justify-content: center; }
}
/* Zeiten der Leitung: Kacheln, offene Punkte je Person, Tage ohne Stempel, offene Stempel, Woche am Handy. */

/* Vier Kacheln in einer Reihe; am Handy nur Gearbeitet und Saldo. */
.stats-zeiten { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .stats-zeiten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .stats-zeiten { gap: 8px; }
  .stats-zeiten .stat { min-height: 0; padding: 10px 12px; }
  .stats-zeiten .stat:nth-child(1), .stats-zeiten .stat:nth-child(4) { display: none; }
}

/* „2 offen“ hinter dem Namen in den Monatswerten */
.zl-open { margin-left: 8px; font-size: .72rem; white-space: nowrap; }

/* Ansicht einer Person: geplante Schicht und Tag ohne Stempel */
.zl-plan { margin-bottom: 2px; }
.zl-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Woche: Stempel ohne „Gehen“ */
.wk-cell.wk-stale { background: color-mix(in srgb, var(--neg) 7%, transparent); }
.wk-stale-chip { display: inline-block; margin-top: 2px; font-size: .7rem; }

/* Tag: „Ende fehlt seit …“ unter dem Namen */
.tv-stale { display: inline-block; margin-top: 4px; font-size: .7rem; border: 0; cursor: pointer; text-align: left; white-space: normal; }
span.tv-stale { cursor: default; }

/* Woche am Handy: Summe und Saldo unter dem Namen, die Spalte „Woche“ fällt weg (sonst nur durch Wischen erreichbar). */
.wk-name-sum { display: none; font-weight: 400; margin-top: 2px; }
@media (max-width: 640px) {
  .roster.week .wk-name-sum { display: block; }
  .roster.week th:last-child, .roster.week td.wk-total { display: none; }
  .roster.week td.name { position: sticky; left: 0; z-index: 1; background: var(--surface); }
}

/* Kappung an die Planzeit: echte Stempelzeit neben der gezählten, mit „übernehmen“ für die Leitung; Hinweis in den Einstellungen. */
.entry-line .btn-link { margin-left: 6px; font-size: inherit; }
.notice.cap-note { margin-top: 12px; }
.notice.cap-note > div { gap: 6px; }
/* Monatsansicht einer Person (Leitung): Wochenzeile mit Dienstplan, Ist, Soll und Saldo, wie in den eigenen Zeiten. */
.times-table tr.zl-week > td { padding-block: 9px; background: color-mix(in srgb, var(--surface-2) 45%, transparent); border-bottom: 1px solid var(--line); font-weight: 500; }
.times-table tr.zl-week > td:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.times-table tr.zl-week > td:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.zl-week-name { font-family: var(--display); font-size: 1rem; margin-right: 10px; }
/* Einstellungen › Fehlerberichte (Noya-Verwaltung): Filter über der Tabelle, Fehlertext umbrechen, Ablauf aufklappbar. */
.split-content .seg[aria-label="Quelle"] { margin: 0 0 14px; flex-wrap: wrap; }
.error-cell { overflow-wrap: anywhere; min-width: 180px; }
table.table-plain td.error-cell > strong.error-text { display: block; font-weight: 500; white-space: normal; }
.error-stack {
  margin: 6px 0 0; padding: 10px 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
}
