/* 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;
  --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;
    --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;
  --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; flex-wrap: wrap; min-height: 100vh; }
.menue { flex: 1 1 232px; max-width: 260px; min-width: 220px; background: var(--surface);
  border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; }
.marke { padding: 0 12px 24px; display: flex; flex-direction: column; gap: 2px; }
.marke strong { font-size: 17px; letter-spacing: -0.01em; }
.marke strong span { color: var(--accent); }
.menue a { text-decoration: none; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.menue a:hover { background: var(--field); text-decoration: none; }
.menue a.aktiv { background: var(--accent-soft); font-weight: 600; }
.menue a.spaeter { color: var(--muted); }
.menue .trenner { height: 1px; background: var(--line); margin: 12px 4px; }
.menue .unten { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.inhalt { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px; }



.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%, 420px), 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; 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: 200px; }
input[type=text], input[type=email], input[type=password], input[type=url] { width: 260px; }
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; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.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; }

@media (max-width: 780px) {
  .menue { display: none; position: fixed; inset: 0 0 72px 0; z-index: 20; max-width: none; overflow-y: auto; border-right: 0; }
  .menue.offen { display: flex; }
  .inhalt { padding: 18px 14px 96px; }
  .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(10px + env(safe-area-inset-bottom)); }
  .untennav a { 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 a.aktiv { color: var(--accent); font-weight: 600; }
  h1 { font-size: 22px; }
}

/* 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; }
}
