/* Airtec Zeiterfassung — Airtec-Designsystem (Skill airtec-design): Manrope, Flame Orange #F29100 als einzige
   Akzentfarbe, warmes Steingrau, kantige Radien, flache Karten. Tokens wie Kaminplaner/ACI/Auftragstool.
   iPad zuerst (E8): grosse Tippflächen, Tab-Leiste unten bis 1100 px, darüber Navigation oben. */
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f5f2; --surface: #ffffff; --surface-2: #efede8; --surface-3: #e6e3dc;
  --line: #dedbd3; --line-strong: #c8c4ba;
  --ink: #1d1c19; --ink-2: #4a4843; --muted: #7a776f;
  --accent: #f29100; --accent-hover: #d87f00; --accent-pressed: #bf6f00; --accent-soft: #fff1dc; --accent-ink: #8a5200; --on-accent: #ffffff;
  --ok: #2f7a4f; --ok-soft: #e4f2e9; --warn: #8a6d00; --warn-soft: #fbf3d2; --danger: #b3261e; --danger-soft: #fae8e6;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-xs: 11px; --t-sm: 13px; --t-base: 15px; --t-md: 17px; --t-lg: 20px; --t-xl: 26px; --t-xxl: 32px;
  --lh: 1.5; --lh-eng: 1.2; --r-sm: 4px; --r-md: 6px; --r-lg: 8px;
  --sh-1: 0 1px 2px rgba(29, 28, 25, 0.06); --sh-2: 0 8px 28px rgba(29, 28, 25, 0.14);
  --dur: 160ms; --ease: cubic-bezier(0.2, 0, 0, 1); --topbar-h: 60px; --tabbar-h: 64px; --tap: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151412; --surface: #1e1d1a; --surface-2: #27251f; --surface-3: #312e27; --line: #34322c; --line-strong: #4a4740;
    --ink: #ecebe6; --ink-2: #c9c7c0; --muted: #9a978f;
    --accent: #ffa32b; --accent-hover: #ffb24d; --accent-pressed: #f29100; --accent-soft: #3a2a12; --accent-ink: #ffc97f; --on-accent: #1d1c19;
    --ok: #6ccb93; --ok-soft: #163220; --warn: #e6c25a; --warn-soft: #3a3113; --danger: #f0908a; --danger-soft: #3b1b18;
    --sh-1: 0 1px 2px rgba(0,0,0,.35); --sh-2: 0 8px 28px rgba(0,0,0,.55);
  }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; font: var(--t-base) / var(--lh) var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
input, textarea, select, button { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; } .muted { color: var(--muted); } [hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 0.92em; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
svg.i.k { width: 16px; height: 16px; vertical-align: -3px; }
svg.i.g { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- Kopf */
.topbar { position: sticky; top: 0; z-index: 50; height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--s-6) 0;
  display: flex; align-items: center; gap: var(--s-5);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line); }
.marke { display: flex; align-items: center; gap: var(--s-3); color: var(--ink); min-width: 0; }
.marke img { height: 36px; width: auto; display: block; align-self: center; }
.marke .wort { font-weight: 800; font-size: var(--t-md); letter-spacing: -0.01em; line-height: 1; padding-left: var(--s-3); border-left: 1px solid var(--line-strong); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.marke .wort svg { color: var(--accent); }
.nav-oben { display: flex; gap: var(--s-1); margin-left: var(--s-2); }
.nav-oben button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: var(--r-md); padding: 8px 12px; font-weight: 700; font-size: var(--t-sm); color: var(--muted); cursor: pointer; }
.nav-oben button:hover { background: var(--surface-2); color: var(--ink); }
.nav-oben button.aktiv { background: var(--ink); color: var(--bg); }
.topbar .rechts { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.konto { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); font-weight: 700; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: var(--t-sm); }
.konto button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: var(--r-md); display: inline-flex; }
.konto button:hover { color: var(--ink); background: var(--surface-2); }

/* Tab-Leiste unten (iPad hoch, Handy) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--muted); font-size: var(--t-xs); font-weight: 700; cursor: pointer; }
.tabbar button.aktiv { color: var(--accent-ink); }
.tabbar button.aktiv svg { color: var(--accent); }
@media (max-width: 1099px) {
  .nav-oben { display: none; }
  .tabbar { display: flex; }
  main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-6)) !important; }
}
@media (max-width: 560px) { .topbar { padding-left: var(--s-4); padding-right: var(--s-4); } .marke img { height: 30px; } .konto .name { display: none; } }

/* ---------------------------------------------------------------- Layout */
main { padding: var(--s-6); max-width: 1240px; margin: 0 auto; }
@media (max-width: 560px) { main { padding: var(--s-4); } }
.seitenkopf { display: flex; align-items: flex-end; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.seitenkopf .eyebrow { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); display: flex; align-items: center; gap: var(--s-2); }
.seitenkopf .eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--accent); }
.seitenkopf h1 { margin: 2px 0 0; font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; line-height: var(--lh-eng); }
.seitenkopf .unter { color: var(--muted); font-size: var(--t-sm); margin-top: 4px; }
.seitenkopf .werkzeuge { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.zwei { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .zwei { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; } }
@media (max-width: 999px) { .zwei { display: flex; flex-direction: column; } .zwei > .stapel { display: contents; } .zwei > .stapel > .card { order: var(--o, 0); } }
.stapel { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card > .kopf { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); min-height: 52px; }
.card > .kopf h2 { margin: 0; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: var(--s-2); }
.card > .kopf .werkzeuge { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.card > .inhalt { padding: var(--s-4) var(--s-5); } .card > .inhalt.eng { padding: 0; }
@media (max-width: 560px) { .card > .kopf, .card > .inhalt { padding-left: var(--s-4); padding-right: var(--s-4); } }

/* Kennzahlen */
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: var(--s-4); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); }
.kpi .l { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kpi .w { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 2px; }
.kpi .m { font-size: var(--t-xs); color: var(--muted); }
.kpi.haupt { border-color: var(--line-strong); box-shadow: inset 0 -3px 0 var(--accent); }
.plus { color: var(--ok); } .minus { color: var(--danger); }

/* ---------------------------------------------------------------- Knöpfe + Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: 8px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: var(--t-sm); cursor: pointer; white-space: nowrap; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:active { background: var(--accent-pressed); border-color: var(--accent-pressed); }
.btn.dunkel { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.gross { min-height: var(--tap); padding: 10px 20px; font-size: var(--t-base); }
.btn.voll { width: 100%; }
.btn.icon { padding: 0; width: 40px; min-width: 40px; }
.btn.gefahr { color: var(--danger); }
.btn .sub { font-weight: 600; opacity: .85; font-size: var(--t-sm); }
.btn.riesig { min-height: 72px; flex-direction: column; gap: 2px; font-size: var(--t-md); width: 100%; }

.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld label, .feld .label { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input:not([type]), select, textarea {
  min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); width: 100%; font-size: 16px; /* 16px: iOS zoomt sonst */ }
textarea { resize: vertical; min-height: 44px; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-2); }
input[type=time] { font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.raster-felder { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Chips (Absenz-Codes, Status) — Pillen nur für echte Auswahl-Chips (Design-Regel) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 700; font-size: var(--t-sm); cursor: pointer; }
.chip .c { font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); }
.chip:hover { background: var(--surface-2); }
.chip.aktiv { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.aktiv .c { color: var(--bg); opacity: .75; }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.marke-code { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-family: var(--mono); font-size: var(--t-xs); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-sm); font-size: var(--t-xs); font-weight: 800; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.gefahr { background: var(--danger-soft); color: var(--danger); }
.punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--line-strong); flex: none; }
.punkt.keiner { visibility: hidden; }
.punkt.ok { background: var(--ok); } .punkt.warn { background: var(--warn); } .punkt.gefahr { background: var(--danger); } .punkt.akzent { background: var(--accent); }

/* ---------------------------------------------------------------- Tag: Zeitblöcke */
.datumsnav { display: flex; align-items: center; gap: var(--s-2); }
.datumsnav .btn.icon { width: 44px; min-height: 44px; }
.banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); margin-bottom: var(--s-4); }
.banner.warn { background: var(--warn-soft); color: var(--warn); } .banner.gefahr { background: var(--danger-soft); color: var(--danger); }
.banner.lesen { background: var(--accent-soft); color: var(--accent-ink); }
.banner strong { color: inherit; }
.bloecke { display: flex; flex-direction: column; gap: var(--s-3); }
.block { display: grid; gap: var(--s-2) var(--s-3); grid-template-columns: 120px 18px 120px 1fr 40px; align-items: center; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.block .bis-strich { text-align: center; color: var(--muted); }
.block .dauer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.block .taetigkeit { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 170px; gap: var(--s-2); }
.block.laeuft { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.block .laeuft-txt { color: var(--accent-ink); font-weight: 800; font-size: var(--t-sm); }
@media (max-width: 640px) {
  .block { grid-template-columns: 1fr 14px 1fr 40px; }
  .block .dauer { grid-column: 1 / -1; order: 5; font-size: var(--t-sm); }
  .block .taetigkeit { grid-template-columns: 1fr; }
}
.knopfreihe { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.speicherstatus { font-size: var(--t-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 20px; }
.speicherstatus.fehler { color: var(--danger); font-weight: 700; }
.liste-hinweise { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.liste-hinweise li { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--t-sm); padding: 8px 10px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); }
.liste-hinweise li.fehler { background: var(--danger-soft); color: var(--danger); }
.notiz-admin { font-size: var(--t-xs); color: var(--muted); }

/* Fahrten */
.fahrt { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.fahrt:last-child { border-bottom: 0; }
.fahrt .was { flex: 1; min-width: 0; }
.fahrt .was .strecke { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fahrt .km { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fahrtform { display: grid; gap: var(--s-2); grid-template-columns: 110px 1fr 1fr; margin-top: var(--s-3); }
.fahrtform .zweck { grid-column: 1 / -1; }
.fahrtform .unten { grid-column: 1 / -1; display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 560px) { .fahrtform { grid-template-columns: 1fr 1fr; } .fahrtform .km-feld { grid-column: 1 / -1; } }

/* Wochenliste (rechts im Tag, eigene Ansicht Woche) */
.wliste { list-style: none; margin: 0; padding: 0; }
.wliste li { display: grid; grid-template-columns: 74px 1fr auto; gap: var(--s-3); align-items: center; padding: 10px var(--s-5); border-bottom: 1px solid var(--line); cursor: pointer; min-height: 52px; }
.wliste li:last-child { border-bottom: 0; }
.wliste li:hover { background: var(--surface-2); }
.wliste li.heute { background: var(--accent-soft); }
.wliste li.gewaehlt { background: var(--surface-3); }
.wliste li.wochenende { color: var(--muted); }
.wliste .wt { font-weight: 800; line-height: 1.2; } .wliste .wt small { display: block; font-weight: 600; color: var(--muted); font-size: var(--t-xs); }
.wliste .mitte { min-width: 0; font-size: var(--t-sm); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: var(--s-2); }
.wliste .rechts { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.wliste .rechts small { display: block; font-weight: 600; color: var(--muted); font-size: var(--t-xs); }
.summenzeile { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-5); background: var(--surface-2); font-weight: 800; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }

/* Woche gross */
.wtabelle { width: 100%; border-collapse: collapse; }
.wtabelle th { text-align: left; font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.wtabelle td { padding: 12px var(--s-4); border-bottom: 1px solid var(--line); vertical-align: top; font-size: var(--t-sm); }
.wtabelle tr { cursor: pointer; } .wtabelle tbody tr:hover td { background: var(--surface-2); }
.wtabelle tr.heute td { background: var(--accent-soft); }
.wtabelle td.zahl, .wtabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wtabelle td.zahl { font-weight: 800; }
.wtabelle .t { color: var(--ink-2); }
.wtabelle .klein { font-size: var(--t-xs); color: var(--muted); }
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) { .wtabelle .breit { display: none; } }

/* Monat: Kalender */
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: var(--s-4) var(--s-5); }
.kalender .kw { font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 2px; }
.ktag { min-height: 84px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; background: var(--surface); text-align: left; }
.ktag:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ktag .n { font-weight: 800; font-size: var(--t-sm); display: flex; justify-content: space-between; align-items: center; }
.ktag .ist { font-weight: 800; font-variant-numeric: tabular-nums; font-size: var(--t-md); }
.ktag .info { font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ktag.leer { visibility: hidden; }
.ktag.frei, .ktag.vor_erfassung { background: var(--surface-2); color: var(--muted); }
.ktag.feiertag { background: var(--surface-2); }
.ktag.fehlt { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.ktag.zukunft, .ktag.geplant { color: var(--muted); }
.ktag.heute { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 640px) { .kalender { gap: 3px; padding: var(--s-2); } .ktag { min-height: 60px; padding: 4px; } .ktag .ist { font-size: var(--t-sm); } .ktag .info { display: none; } }
.legende { display: flex; gap: var(--s-4); flex-wrap: wrap; padding: 0 var(--s-5) var(--s-4); font-size: var(--t-xs); color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* Tabellen (Admin) */
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tabelle th { text-align: left; font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tabelle td { padding: 12px var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tr.klickbar { cursor: pointer; } .tabelle tr.klickbar:hover td { background: var(--surface-2); }
.person { display: flex; align-items: center; gap: var(--s-3); font-weight: 800; white-space: nowrap; }
.person small { display: block; font-weight: 600; color: var(--muted); font-size: var(--t-xs); }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(21, 20, 18, .45); }
dialog .kopf { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
dialog .kopf h2 { margin: 0; font-size: var(--t-md); font-weight: 800; }
dialog .kopf .btn { margin-left: auto; }
dialog .inhalt { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); overflow-y: auto; }
dialog .fuss { display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.qr { display: grid; place-items: center; padding: var(--s-4); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.qr svg { width: min(300px, 70vw); height: auto; display: block; }
.linkzeile { display: flex; gap: var(--s-2); } .linkzeile input { font-family: var(--mono); font-size: 13px; }

/* Meldung unten */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-md); font-weight: 700; font-size: var(--t-sm); box-shadow: var(--sh-2); max-width: calc(100vw - 32px); }
.toast.fehler { background: var(--danger); color: #fff; }
@media (min-width: 1100px) { .toast { bottom: 24px; } }
.leer-hinweis { padding: var(--s-6) var(--s-5); text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- Login / Einrichtung */
.loginseite { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6) var(--s-4); }
.loginbox { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8) var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); box-shadow: var(--sh-1); }
.loginbox .marke img { height: 40px; }
.loginkopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.sprachwahl { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.sprachwahl button { min-width: 44px; min-height: 36px; padding: 6px 10px; border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: var(--t-xs); letter-spacing: .08em; cursor: pointer; }
.sprachwahl button + button { border-left: 1px solid var(--line-strong); }
.sprachwahl button:hover { color: var(--ink); background: var(--surface-2); }
.sprachwahl button.aktiv { background: var(--ink); color: var(--bg); }
.konto .sprachwahl button { min-height: 32px; min-width: 38px; }
.loginbox h1 { margin: var(--s-2) 0 0; font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; }
.loginbox .unter { margin: -8px 0 0; color: var(--muted); font-size: var(--t-sm); }
.loginbox .fehler { color: var(--danger); font-weight: 700; font-size: var(--t-sm); min-height: 20px; }
.loginbox .fuss { font-size: var(--t-xs); color: var(--muted); text-align: center; margin: 0; }

/* ---------------------------------------------------------------- Phase 2/3 */
.notizen { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.notiz { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.notiz.neu { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.notiz .inhalt { flex: 1; min-width: 0; }
.notiz .titel { font-weight: 800; }
.notiz .meta { font-size: var(--t-xs); color: var(--muted); }
.notiz .text { font-size: var(--t-sm); color: var(--ink-2); white-space: pre-wrap; margin-top: 2px; }
.aufgabe { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); }
.aufgabe:last-child { border-bottom: 0; }
.aufgabe .haken { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); display: inline-flex; }
.aufgabe .haken:hover { color: var(--ok); }
.aufgabe .haken svg { width: 26px; height: 26px; }
.aufgabe.erledigt .haken { color: var(--ok); }
.aufgabe .inhalt { flex: 1; min-width: 0; }
.aufgabe .titel { font-weight: 800; }
.aufgabe.erledigt .titel { color: var(--muted); text-decoration: line-through; }
.aufgabe .text { font-size: var(--t-sm); color: var(--ink-2); white-space: pre-wrap; margin-top: 2px; }
.aufgabe .meta { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: 4px; align-items: center; font-size: var(--t-xs); color: var(--muted); }
.mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mini span { display: inline-flex; align-items: center; gap: 3px; font-size: var(--t-xs); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini svg.i { width: 13px; height: 13px; vertical-align: -2px; color: var(--accent-ink); }
.ktag .mini svg.i { color: var(--accent); }
.abschluss-karte .zeile { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.abschluss-karte .zeile > span { flex: 1 1 220px; min-width: 0; }
.tabelle td.zeiten { white-space: nowrap; }
.liste-klein { list-style: none; margin: var(--s-2) 0 0; padding: 0; font-size: var(--t-sm); }
.liste-klein li { padding: 4px 0; border-bottom: 1px dashed var(--line); display: flex; gap: var(--s-2); align-items: baseline; }
.liste-klein li:last-child { border-bottom: 0; }
.liste-klein a { font-weight: 700; }
.akzentzeile { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.filter { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.kal-eintrag { display: block; width: 100%; text-align: left; font-size: var(--t-xs); padding: 2px 5px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); border: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.kal-eintrag.alle { background: var(--surface-3); color: var(--ink-2); }
.kal-eintrag.feiertag { background: transparent; color: var(--muted); padding-left: 0; cursor: default; font-weight: 600; }
.ktag.admin { min-height: 110px; gap: 3px; }
.ktag.admin .plus { opacity: 0; font-size: var(--t-xs); color: var(--muted); }
.ktag.admin:hover .plus { opacity: 1; }
.tabelle td.t { color: var(--ink-2); }
.tabelle .klein { font-size: var(--t-xs); color: var(--muted); }
.pruef-zeile.korrigierbar { cursor: pointer; }
.pruef-zeile.wochenende td { color: var(--muted); }
textarea.kommentar { min-height: 70px; }

