/* Zeiterfassung – Gestaltung nach Mockup (hell/dunkel) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("schrift/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("schrift/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F4F3F1; --surface: #FFFFFF; --line: #E2DFDB; --ink: #1E1C1B; --muted: #625D58;
  --accent: #A11D2B; --accent-ink: #FFFFFF; --accent-soft: #F6E4E5;
  --plot-plus: #2F6FB0; --plot-minus: #C2502A; --good: #1D6A47; --good-soft: #E1F0E8; --warn: #7A4E00; --warn-soft: #FBF0DC;
  --bad: #A11D2B; --field: #FAF9F7; --bar: #C9C4BE;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --bg: #151414; --surface: #211F1E; --line: #383432; --ink: #F1EEEA; --muted: #ABA49E;
    --accent: #E8707A; --accent-ink: #1A0E0F; --accent-soft: #3A2225;
    --plot-plus: #4A8FD6; --plot-minus: #E0704C; --good: #74CFA1; --good-soft: #1B3328; --warn: #F0C36B; --warn-soft: #3A2F1A;
    --bad: #F08A92; --field: #1A1918; --bar: #4A4542;
    color-scheme: dark;
  }
}
:root[data-theme="dunkel"] {
  --bg: #151414; --surface: #211F1E; --line: #383432; --ink: #F1EEEA; --muted: #ABA49E;
  --accent: #E8707A; --accent-ink: #1A0E0F; --accent-soft: #3A2225;
  --plot-plus: #4A8FD6; --plot-minus: #E0704C; --good: #74CFA1; --good-soft: #1B3328; --warn: #F0C36B; --warn-soft: #3A2F1A;
  --bad: #F08A92; --field: #1A1918; --bar: #4A4542;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 15px;
  line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
.leise { color: var(--muted); }
.klein { font-size: 13px; }

/* Grundlayout */
.rahmen { display: flex; min-height: 100vh; }
.menue { flex: 0 0 240px; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 16px 24px;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marke { padding: 8px 12px 24px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.marke:hover { text-decoration: none; }
.marke strong { font-size: 17px; letter-spacing: -0.01em; }
.marke strong span { color: var(--accent); }
.menue a:not(.marke) { text-decoration: none; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.menue a:not(.marke):hover { background: var(--field); text-decoration: none; }
.menue a.aktiv { background: var(--accent-soft); font-weight: 600; }
.menue .trenner { height: 1px; background: var(--line); margin: 12px 4px; }
.spalte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.inhalt { flex: 1 1 auto; min-width: 0; width: 100%; padding: 20px clamp(16px, 2.4vw, 40px) 48px; display: flex; flex-direction: column; gap: 20px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  height: 64px; padding: 0 clamp(16px, 2.4vw, 40px); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-marke { display: none; margin-right: auto; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.topbar-marke span { color: var(--accent); }
.topbar-rechts { display: flex; align-items: center; gap: 8px; }
.profil { position: relative; }
.profil > summary { list-style: none; }
.profil > summary::-webkit-details-marker { display: none; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.profil[open] .avatar { outline: 2px solid var(--accent); outline-offset: 2px; }
.profil-menue { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 8px; display: flex; flex-direction: column; z-index: 40; }
.profil-kopf { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profil-menue a, .profil-menue button { display: flex; align-items: center; gap: 6px; padding: 10px; border-radius: 8px; color: var(--ink);
  text-decoration: none; background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; min-height: 44px; }
.profil-menue a:hover, .profil-menue button:hover { background: var(--field); text-decoration: none; }
.profil-menue form { margin: 0; }

.kopf { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.kopf .titel { display: flex; flex-direction: column; gap: 4px; }
.werkzeuge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Karten */
.karte { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.raster.breit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.raster.drei { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.kennzahl .wert { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kennzahl .wert small { font-size: 15px; font-weight: 500; color: var(--muted); }
.hinweis { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); }
.hinweis strong { color: var(--warn); }

/* Knöpfe */
.knopf, button.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px;
  padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf:hover { text-decoration: none; border-color: var(--muted); }
.knopf.haupt { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.knopf.gefahr { color: var(--bad); }
.knopf.symbol { width: 44px; padding: 0; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.icon-hell { display: none; }
:root[data-theme="dunkel"] .icon-hell { display: inline; }
:root[data-theme="dunkel"] .icon-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .icon-hell { display: inline; }
  :root:not([data-theme="hell"]) .icon-dunkel { display: none; }
}

/* Reiter */
.reiter { display: flex; flex-wrap: wrap; gap: 8px; }
.reiter a { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; font-size: 14px; }
.reiter a.aktiv { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; }
.feld > label { flex: 1 1 150px; }
.feld .eingabe { flex: 0 1 auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; max-width: 100%; }
.feld.gestapelt { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.feld.gestapelt .eingabe { align-items: stretch; }
.feld .hilfe { font-size: 13px; color: var(--muted); flex-basis: 100%; }
.feld .fehler, .fehlerliste { color: var(--bad); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url],
select, textarea { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; max-width: 100%; min-width: 0; }
textarea { height: auto; padding: 10px 12px; width: 100%; }
select { min-width: min(200px, 100%); }
input[type=text], input[type=email], input[type=password], input[type=url] { width: clamp(220px, 22vw, 380px); }
input.kurz, input[type=time], input[type=number] { width: 100px; text-align: right; }
input[type=date] { width: 170px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus, .knopf:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.trennlinie { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.wochentage { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: 8px; }
.wochentage label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.wochentage input { width: 100%; text-align: center; }

/* Tabellen */
.tabelle-box { overflow-x: auto; }
table.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 12px; border-bottom: 1px solid var(--line); }
.tabelle td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .rechts { text-align: right; }
.marke-klein { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); font-size: 12px; font-weight: 600; }
.marke-klein.gut { background: var(--good-soft); color: var(--good); }
.marke-klein.warn { background: var(--warn-soft); color: var(--warn); }

/* Meldungen */
.meldungen { display: flex; flex-direction: column; gap: 8px; }
.meldung { padding: 12px 14px; border-radius: 10px; background: var(--good-soft); color: var(--ink); }
.meldung.error { background: var(--accent-soft); }
.meldung.info, .meldung.warning { background: var(--warn-soft); }

/* Anmeldung */
.mitte { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.mitte .karte > .marke, .mitte .karte > h1, .mitte .karte > .zentriert { align-items: center; text-align: center; padding: 0; }
.mitte .karte > .marke strong { font-size: 20px; }
.mitte .karte { width: 100%; max-width: 420px; padding: 32px 28px; }
.mitte input[type=text], .mitte input[type=password] { width: 100%; }
.mitte .feld { flex-direction: column; align-items: stretch; }
.mitte .feld .eingabe { align-items: stretch; }
.qr svg { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; }
.qr path { fill: #000; }
code.geheim { font-size: 14px; letter-spacing: 0.08em; word-break: break-all; }

/* Woche */
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.woche .tag { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.woche .tag.heute { border-color: var(--accent); background: var(--accent-soft); }
.woche .tag .ft { font-size: 12px; color: var(--accent); overflow-wrap: anywhere; }

.feld.gestapelt > label { flex: none; }

.mitte .feld > label { flex: none; }

/* ---- Phase 2–4 ---- */
.knopf.abmelden { width: 100%; justify-content: flex-start; border: 0; font-weight: 400; padding: 0 12px; background: transparent; }
.zaehler { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }
.glocke { position: relative; }
.glocke .punkt { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.untennav { display: none; }

.untennav button { font: inherit; background: none; border: 0; cursor: pointer; }
.punkt-klein { position: absolute; top: 8px; margin-left: 18px; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.reiter-wahl { display: none; }
.einklappbar > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.einklappbar > summary::-webkit-details-marker { display: none; }
.einklappbar > summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.einklappbar[open] > summary::after { content: "–"; }
.einklappbar[open] > summary { margin-bottom: 4px; }
.schalter { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 14px; }
.schalter:hover { text-decoration: none; }
.schalter .spur { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.schalter .spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.schalter[aria-checked="true"] .spur { background: var(--accent); }
.schalter[aria-checked="true"] .spur::after { left: 21px; }

@media (max-width: 780px) {
  .rahmen { display: block; }
  .menue { display: none; position: fixed; inset: 64px 0 calc(68px + env(safe-area-inset-bottom)) 0; z-index: 20; height: auto;
    max-width: none; border-right: 0; padding: 8px 12px 16px; }
  .menue.offen { display: flex; }
  .menue .marke { display: none; }
  .topbar { padding: 0 12px 0 16px; height: 64px; justify-content: space-between; }
  .topbar-marke { display: block; overflow: hidden; text-overflow: ellipsis; }
  .topbar .knopf.symbol { width: 40px; height: 40px; }
  .avatar { width: 40px; height: 40px; }
  .inhalt { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); gap: 14px; }
  .untennav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); }
  .untennav a, .untennav button { position: relative; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--muted); font-size: 12px; }
  .untennav .aktiv { color: var(--accent); font-weight: 600; }
  h1 { font-size: 22px; }
  .kopf { gap: 10px; }
  .kopf .titel { flex: 1 1 100%; }
  .werkzeuge:empty { display: none; }
  .werkzeuge { width: 100%; }
  .werkzeuge .ma-wahl { flex: 1 1 100%; }
  .ma-wahl label { display: none; }
  .ma-wahl select { flex: 1; min-width: 0; width: 100%; }
  .reiter { display: none; }
  .reiter-wahl { display: block; }
  .reiter-wahl select { width: 100%; min-width: 0; font-weight: 600; }
  .karte { padding: 16px; border-radius: 12px; }
  .raster:not(.breit):not(.drei) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .raster.drei { grid-template-columns: minmax(0, 1fr); }
  .raster:not(.breit) .kennzahl { padding: 14px; gap: 4px; }
  .kennzahl .wert { font-size: 22px; }
  .kennzahl .wert small { font-size: 12px; }
  .kennzahl .klein { font-size: 12px; }
  .nur-gross { display: none !important; }
  input[type=text], input[type=email], input[type=password], input[type=url] { width: 100%; }
  .feld .eingabe { flex: 1 1 100%; align-items: stretch; }
  .feld .eingabe input[type=checkbox] { align-self: flex-start; }
  .feld .eingabe select, .feld .eingabe input[type=date] { width: 100%; }
  .feld .eingabe input.kurz, .feld .eingabe input[type=number] { width: 100%; text-align: left; }
  .feld:has(input[type=checkbox]) > label { flex: 1 1 0; min-width: 0; }
  .feld:has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
  select { min-width: 0; }
  .wochentage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Stempeluhr */
.stempel { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.stempel .status { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.stempel .status.ein { color: var(--good); }
.stempel .status.pause { color: var(--warn); }
.stempel .status i { width: 10px; height: 10px; border-radius: 5px; background: currentColor; display: inline-block; }
.stempel .uhr { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.stempel .knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.stempel .knoepfe .knopf { height: 56px; min-width: 150px; font-size: 16px; border-radius: 12px; }
@media (max-width: 780px) {
  .stempel { flex-direction: column; align-items: stretch; text-align: center; }
  .stempel .status { justify-content: center; }
  .stempel .uhr { font-size: 56px; }
  .stempel .knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .stempel .knoepfe .knopf { min-width: 0; height: 60px; }
  .stempel .knoepfe .knopf:only-child { grid-column: 1 / -1; }
}
.bloecke { display: flex; flex-wrap: wrap; gap: 6px; }
.block { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); font-size: 13px; text-decoration: none; color: var(--ink); }
.block.pause { background: var(--field); color: var(--muted); border: 1px dashed var(--line); }
.block.laeuft { background: transparent; border: 1.5px dashed var(--accent); }
.block.auto { background: var(--warn-soft); }
a.block:hover { text-decoration: none; outline: 1px solid var(--accent); }

/* Wochenbalken */
.balken { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 190px; position: relative; border-bottom: 1px solid var(--line); }
.balken .spalte { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 190px; gap: 4px; }
.balken .wert { font-size: 12px; font-weight: 600; }
.balken .saeule { width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: var(--accent); min-height: 0; }
.balken .heute .saeule { opacity: 0.6; }
.balken .soll { position: absolute; left: 8%; right: 8%; border-top: 2px dashed var(--muted); opacity: 0.7; }
.balken-namen { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.balken-namen .heute { color: var(--ink); font-weight: 600; }
.balken-namen small { display: block; font-size: 11px; color: var(--accent); }

/* Listen und Status */
.liste { display: flex; flex-direction: column; gap: 10px; }
.eintrag { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.eintrag .was { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eintrag.neu { border-color: var(--accent); background: var(--accent-soft); }
.farbpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.status-beantragt { color: var(--warn); font-weight: 600; }
.status-genehmigt { color: var(--good); font-weight: 600; }
.status-abgelehnt, .status-storniert { color: var(--muted); text-decoration: line-through; }
.plus { color: var(--good); font-weight: 600; }
.minus { color: var(--bad); font-weight: 600; }
.ma-wahl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ma-wahl select { min-width: 220px; }
.tabelle tr.wochenende td { background: var(--field); }
.tabelle tr.heute td { background: var(--accent-soft); }
.tabelle tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.warnung { color: var(--warn); font-size: 12px; display: block; }
.knopf.klein { height: 34px; padding: 0 12px; font-size: 13px; }
pre.roh { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; overflow-x: auto; max-height: 320px; }
details > summary { cursor: pointer; }
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.wochentage-kurz { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; font-size: 12px; text-align: center; }
.tabelle tr.heute .block:not(.laeuft):not(.pause) { background: var(--surface); }
.tabelle.woche-tabelle { min-width: 720px; }
@media (max-width: 780px) {
  .tabelle.woche-tabelle { min-width: 0; }
  .tabelle .nur-gross { display: none; }
  .tabelle td, .tabelle th { padding: 10px 8px; }
}
.nur-klein, .nur-klein-block { display: none; }
.blaettern { display: flex; gap: 8px; align-items: center; }
@media (max-width: 780px) {
  .nur-klein { display: initial; }
  .nur-klein-block { display: block; }
  .blaettern { margin-left: auto; }
  .werkzeuge > .knopf.haupt { flex: 1; }
}
.gross-knopf { height: 56px; font-size: 16px; width: 100%; }
.zentriert { text-align: center; }
.oder { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.oder::before, .oder::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.passkey-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.feld .eingabe { min-width: 0; }
.feld.gestapelt .eingabe { width: 100%; }
textarea { min-width: 0; box-sizing: border-box; }
.kennzahl .wert.wort { font-size: 22px; hyphens: auto; overflow-wrap: anywhere; }
@media (max-width: 780px) { .kennzahl .wert.wort { font-size: 16px; } }
.kennzahl .wert { overflow-wrap: anywhere; }
.einklappbar:not([open]) { padding-top: 14px; padding-bottom: 14px; }

/* Fenster (Dialoge) für neue Einträge */
dialog.fenster { border: 0; padding: 0; border-radius: 16px; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0,0,0,.35); overflow: hidden; }
dialog.fenster.breit { width: min(820px, calc(100vw - 32px)); }
dialog.fenster[open] { display: flex; flex-direction: column; animation: fenster-auf .16s ease-out; }
dialog.fenster::backdrop { background: rgba(10, 8, 8, .5); backdrop-filter: blur(2px); }
@keyframes fenster-auf { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.fenster-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px;
  border-bottom: 1px solid var(--line); }
.fenster-inhalt { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.fenster .feld { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.fenster .feld > label { flex: none; font-weight: 500; }
.fenster .feld .eingabe { align-items: stretch; }
.fenster .feld:has(input[type=checkbox]) { flex-direction: row; align-items: center; flex-wrap: wrap; }
.fenster .feld:has(input[type=checkbox]) > label { flex: 1 1 0; }
.fenster .feld:has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
.fenster input:not([type=checkbox]):not([type=radio]), .fenster select, .fenster textarea { width: 100%; }
.fenster .fuss { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.knopf .plus { font-size: 20px; line-height: 1; font-weight: 500; color: inherit; }
@media (max-width: 780px) {
  dialog.fenster, dialog.fenster.breit { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom); }
  @keyframes fenster-auf { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .fenster .fuss .knopf { flex: 1 1 0; }
}

/* Ablagefläche (Drag & Drop) */
.ablage { border: 2px dashed var(--line); border-radius: 14px; padding: 22px 16px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 6px; cursor: pointer; transition: border-color .15s, background .15s; }
.ablage:hover, .ablage.ueber { border-color: var(--accent); background: var(--accent-soft); }
.ablage strong { font-size: 15px; }
.ablage input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ablage .datei-name { font-weight: 600; color: var(--accent); word-break: break-all; }
body.zieht::after { content: "Datei hier ablegen"; position: fixed; inset: 12px; border: 3px dashed var(--accent); border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--accent); z-index: 100; pointer-events: none; }
.wochen-wahl select { min-width: 0; width: auto; height: 44px; font-weight: 600; }
.datum-sprung input[type=date] { width: 160px; }
.zwei-spalten.breit-links { grid-template-columns: minmax(0, 2fr) minmax(min(100%, 320px), 1fr); }
@media (max-width: 1000px) { .zwei-spalten.breit-links { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 780px) {
  .wochen-wahl { flex: 1 1 auto; min-width: 0; }
  .blaettern:has(.wochen-wahl) { flex: 1 1 100%; }
  .wochen-wahl select { width: 100%; }
  .datum-sprung { flex: 1 1 0; min-width: 0; }
  .datum-sprung input[type=date] { width: 100%; min-width: 0; }
  .datum-sprung + .knopf { flex: 0 0 auto; }
  .werkzeuge > .knopf.haupt[data-fenster] { flex: 1 1 100%; order: 10; }
}
.person-kopf { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar.gross { width: 56px; height: 56px; border-radius: 28px; font-size: 20px; flex: 0 0 auto; cursor: default; }
.kennzahl.verlinkt { text-decoration: none; color: inherit; transition: border-color .15s; }
.kennzahl.verlinkt:hover { border-color: var(--muted); text-decoration: none; }
.punkt-status { display: inline-block; width: 12px; height: 12px; border-radius: 6px; background: var(--line); margin-right: 8px; vertical-align: middle; }
.punkt-status.ein { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.punkt-status.pause { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.fenster .wochentage { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 780px) { .fenster .wochentage { grid-template-columns: repeat(4, minmax(0, 1fr)); } .person-kopf .avatar.gross { width: 44px; height: 44px; font-size: 16px; } }
.begruessung { text-wrap: balance; }
.raster.drei.unten { align-items: start; }
.person-zeile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar.klein-avatar { width: 36px; height: 36px; border-radius: 18px; font-size: 13px; flex: 0 0 auto; cursor: inherit; background: var(--field); color: var(--ink); }
.anwesend-ein .avatar.klein-avatar { background: var(--good-soft); color: var(--good); }
.anwesend-pause .avatar.klein-avatar { background: var(--warn-soft); color: var(--warn); }
.status-chip { --chip: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
  color: var(--chip); background: color-mix(in srgb, var(--chip) 14%, transparent); white-space: nowrap; }
.status-chip.ein { --chip: var(--good); }
.status-chip.pause { --chip: var(--warn); }

/* Diagramme */
.diagramm { width: 100%; height: auto; max-height: 320px; display: block; overflow: visible; }
.diagramm .gitter { stroke: var(--line); stroke-width: 1; }
.diagramm .achse-null { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.diagramm .achse-text { fill: var(--muted); font-size: calc(12px * var(--k, 1)); font-family: inherit; }
.diagramm .wert-text { fill: var(--ink); font-size: calc(13px * var(--k, 1)); font-weight: 700; font-family: inherit; }
.diagramm .balken-plus { fill: var(--plot-plus); }
.diagramm .balken-minus { fill: var(--plot-minus); }
.diagramm .linie { fill: none; stroke: var(--plot-plus); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .flaeche { fill: var(--plot-plus); opacity: .1; }
.diagramm .endpunkt, .diagramm .fadenpunkt { fill: var(--plot-plus); stroke: var(--surface); stroke-width: 2; }
.diagramm .fadenkreuz { stroke: var(--muted); stroke-width: 1; opacity: 0; }
.diagramm .fadenpunkt { opacity: 0; }
.diagramm.zeigt .fadenkreuz { opacity: .5; }
.diagramm.zeigt .fadenpunkt { opacity: 1; }
.diagramm .treffer { fill: transparent; cursor: crosshair; }
.diagramm .treffer:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.diagramm .treffer.spur:hover { fill: transparent; }
.diagramm-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px;
  border-radius: 8px; font-size: 13px; font-weight: 500; max-width: 260px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.legende { display: inline-flex; align-items: center; gap: 6px; }
.legende .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.legende .lg.plus { background: var(--plot-plus); }
.legende .lg.minus { background: var(--plot-minus); }
.tabelle-ansicht > summary { padding: 16px 22px; cursor: pointer; font-weight: 600; }

/* Formulare in schmalen Karten: Beschriftung über dem Feld */
.felder-gestapelt .feld { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.felder-gestapelt .feld > label { flex: none; }
.felder-gestapelt .feld .eingabe { align-items: stretch; }
.felder-gestapelt .feld:has(input[type=checkbox]) { flex-direction: row; align-items: center; flex-wrap: wrap; }
.felder-gestapelt .feld:has(input[type=checkbox]) > label { flex: 1 1 0; }
.felder-gestapelt .feld:has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
.felder-gestapelt input:not([type=checkbox]):not([type=radio]), .felder-gestapelt select, .felder-gestapelt textarea { width: 100%; }
