/* Mitarbeiterportal – Gestaltung nach dem freigegebenen Entwurf (nur helle Fassung).
   Farben der Praxis-Website, freie Schriften lokal (OFL), Bedienung fürs iPad. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --grund: #f7f5f2;
  --flaeche: #ffffff;
  --text: #3a322d;
  --leise: #75685f;
  --linie: #e4ddd5;
  --braun: #8c623a;
  --sand: #c69c6d;
  --sand-hell: #f1e6d8;
  --taupe: #534741;
  --zu: #e2dbd3;
  --gut: #4f7a4a;
  --gut-hell: #e5efe2;
  --warn: #b5532f;
  --warn-hell: #f8e4da;
  --frei: #efebe6;
  --auf-braun: #ffffff;
  --schrift-titel: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --schrift-text: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 17px/1.45 var(--schrift-text); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--braun); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 600; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
.etikett { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--leise); font-weight: 600; }
.leerzustand { color: var(--leise); margin: 0; }
.klein { font-size: 0.9rem; color: var(--leise); }

/* Kopf */
.kopf { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--flaeche); border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 12px 16px; padding: 8px 16px; flex-wrap: wrap; }
.marke { margin-right: auto; }
.marke button, .marke a { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 8px 4px 4px; border-radius: 12px; text-align: left; min-height: 52px; text-decoration: none; color: var(--text); }
.marke button:hover { background: var(--grund); }
.marke img { width: 44px; height: 44px; }
.marke b { display: block; font-family: var(--schrift-titel); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--braun); line-height: 1; }
.marke small { display: block; color: var(--leise); font-size: 0.8rem; }
.reiter { display: flex; gap: 4px; flex-wrap: wrap; }
.reiter a { border-radius: 10px; padding: 12px 16px; min-height: 48px; color: var(--leise); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.reiter.viele a { padding: 8px 10px; font-size: 0.92rem; min-height: 44px; }
.reiter a[aria-current="page"] { color: var(--text); background: var(--sand-hell); }
.reiter .zahl { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--warn); color: var(--auf-braun); font-size: 0.75rem; margin-left: 6px; padding: 0 6px; }
.person { display: flex; align-items: center; gap: 10px; color: var(--leise); }
.person form { margin: 0; }
.person button { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px; padding: 8px 14px; min-height: 44px; }

/* Seitenleiste */
.schleier { position: fixed; inset: 0; background: rgba(40, 30, 22, 0.35); z-index: 30; }
.leiste { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: var(--flaeche); z-index: 31; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 16px; display: grid; align-content: start; gap: 6px; box-shadow: 8px 0 24px rgba(40, 30, 22, 0.15); overflow-y: auto; }
.leiste-kopf { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid var(--linie); margin-bottom: 8px; }
.leiste-kopf img { width: 44px; height: 44px; }
.leiste-kopf b { font-family: var(--schrift-titel); font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--braun); }
.app { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; min-height: 60px; color: var(--text); text-decoration: none; }
.app:hover { background: var(--grund); }
.app[aria-current="page"] { background: var(--sand-hell); }
.app .symbol { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grund); color: var(--braun); font-family: var(--schrift-titel); font-weight: 700; font-size: 1.1rem; }
.app small { display: block; color: var(--leise); font-size: 0.82rem; }
.app .marker { font-size: 0.75rem; color: var(--leise); border: 1px solid var(--linie); border-radius: 999px; padding: 2px 8px; }
.app.aus { opacity: 0.55; pointer-events: none; }
.leiste .etikett { padding: 12px 8px 2px; }

/* Rahmen */
main { max-width: 1180px; margin: 0 auto; padding-block: 24px 48px; padding-inline: 16px; }
.raster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .raster { grid-template-columns: minmax(0, 1fr); } }
.feld { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 24px; display: grid; gap: 12px; }
.karte.schmal { max-width: 440px; margin: 32px auto; }
.fuss { color: var(--leise); font-size: 0.85rem; text-align: center; padding-top: 24px; }
.zurueck { margin: 8px 0 0; }

/* Meldungen und Hinweise */
.meldungen { list-style: none; padding: 0; margin: 0 auto 16px; max-width: 1180px; display: grid; gap: 8px; }
.meldung { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); }
.meldung.error, .meldung.warning { background: var(--warn-hell); color: var(--warn); border-color: transparent; }
.meldung.success { background: var(--gut-hell); color: var(--gut); border-color: transparent; }
.hinweis { border-radius: 12px; padding: 14px 16px; background: var(--sand-hell); display: grid; gap: 4px; }
.hinweis.warn { background: var(--warn-hell); }
.hinweis b { color: var(--braun); }
.hinweis.warn b { color: var(--warn); }
.fehler { color: var(--warn); }
.pflicht { color: var(--warn); }

/* Formulare */
label { display: block; margin: 12px 0 4px; color: var(--leise); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input:not([type]), textarea, select, .eingabe {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; border: 1px solid var(--linie); border-radius: 10px; background: var(--grund); color: var(--text);
}
textarea { min-height: 76px; resize: vertical; }
input[type="file"] { min-height: 48px; font: inherit; max-width: 100%; }
input.datei-versteckt { position: absolute; min-height: 0; padding: 0; border: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
label.datei-knopf { margin: 0; color: var(--text); cursor: pointer; min-height: 56px; font-size: 1.05rem; }
.datei-versteckt:focus-visible + label.datei-knopf { outline: 3px solid var(--sand); outline-offset: 2px; }
.tag.mein-g { background: var(--gut-hell); border-color: var(--gut); }
.tag.mein-g small { color: var(--gut); font-weight: 600; }
.tag.mein-a { background: repeating-linear-gradient(135deg, var(--sand-hell) 0 6px, var(--flaeche) 6px 12px); border: 1px dashed var(--sand); }
.tag.mein-a small { color: var(--braun); font-weight: 600; }
.legende .l-mein::before { background: var(--gut-hell); border: 1px solid var(--gut); }
.feldgruppe { display: grid; gap: 6px; }
.feldgruppe label { margin: 0; }
button.gross, .gross { background: var(--braun); color: var(--auf-braun); border: 0; border-radius: 14px; min-height: 60px; font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; padding: 0 20px; }
.gross:disabled { opacity: 0.45; }
.zweit { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; min-height: 52px; font-weight: 600; width: 100%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text); padding: 0 18px; }
.zweit.schmal { width: auto; }
.karte button[type="submit"], .karte form > button:not(.zweit) { background: var(--braun); color: var(--auf-braun); border: 0; border-radius: 12px; min-height: 52px; padding: 0 22px; font-weight: 700; margin-top: 12px; }
.karte img { max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.schalter { display: flex; gap: 8px; flex-wrap: wrap; }
.schalter button { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 10px 18px; min-height: 48px; font-weight: 600; color: var(--text); }
.schalter button[aria-pressed="true"] { background: var(--braun); border-color: var(--braun); color: var(--auf-braun); }
.schalter label.knopf { margin: 0; position: relative; }
.schalter label.knopf input { position: absolute; opacity: 0; pointer-events: none; }
.schalter label.knopf span { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 10px 18px; min-height: 48px; font-weight: 600; display: inline-flex; align-items: center; color: var(--text); cursor: pointer; }
.schalter label.knopf input:checked + span { background: var(--braun); border-color: var(--braun); color: var(--auf-braun); }
.schalter label.knopf input:focus-visible + span { outline: 3px solid var(--sand); outline-offset: 2px; }

/* Startseite */
.jahre { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.konto { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.ring { width: 104px; height: 104px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .mitte { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .mitte b { font-family: var(--schrift-titel); font-size: 2.1rem; line-height: 1; color: var(--braun); font-variant-numeric: tabular-nums; }
.ring .mitte span { font-size: 0.8rem; color: var(--leise); }
.jahre h3 { color: var(--braun); }
.zahlen { display: grid; gap: 6px; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.zahlen div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--linie); padding-bottom: 4px; }
.kasten { max-height: 380px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 12px; padding: 0 14px; overscroll-behavior: contain; }
.zeile { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); align-items: center; }
.zeile:last-child { border-bottom: 0; }
.zeile .klein { grid-column: 1; }
.pille { font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; grid-row: span 2; align-self: start; }
.pille.beantragt { background: var(--sand-hell); color: var(--braun); border: 1px dashed var(--sand); }
.pille.genehmigt { background: var(--gut-hell); color: var(--gut); }
.pille.abgelehnt, .pille.storno { background: var(--warn-hell); color: var(--warn); }
.pille.storno { border: 1px dashed var(--warn); }
.aktionen { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.aktionen form { margin: 0; }
.aktionen a, .aktionen button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; }
.aktionen .weg { color: var(--warn); border-color: var(--warn); }
.heute { display: flex; flex-wrap: wrap; gap: 8px; }
.kopfchen { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--grund); border: 1px solid var(--linie); font-size: 0.95rem; }
.kopfchen i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--auf-braun); font-style: normal; font-weight: 700; font-size: 0.8rem; }

/* Antrag: Kalender */
.monatskopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.monatskopf button, .monatskopf a { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); font-size: 1.3rem; display: grid; place-items: center; text-decoration: none; color: var(--text); }
.monatskopf button:disabled { opacity: 0.35; }
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.kalender .wt { text-align: center; font-size: 0.8rem; color: var(--leise); font-weight: 600; }
.tag { aspect-ratio: 1 / 0.86; max-width: 100%; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); display: grid; align-content: space-between; padding: 6px 8px; text-align: left; min-height: 52px; position: relative; font-variant-numeric: tabular-nums; }
.tag b { font-size: 1.05rem; }
.tag small { font-size: 0.68rem; color: var(--leise); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.leer { visibility: hidden; }
.tag.frei { background: var(--frei); color: var(--leise); border-color: transparent; }
.tag.feiertag { background: transparent; border-color: transparent; color: var(--braun); box-shadow: inset 0 -4px 0 var(--sand); border-radius: 4px; }
.tag.feiertag small { color: var(--braun); font-weight: 600; }
.tag.zu { background: repeating-linear-gradient(135deg, var(--zu) 0 6px, var(--frei) 6px 12px); border-color: transparent; color: var(--taupe); }
.tag.zu small { color: var(--taupe); font-weight: 600; }
.tag.gewaehlt { background: var(--braun); border-color: var(--braun); color: var(--auf-braun); box-shadow: none; }
.tag.gewaehlt small { color: var(--auf-braun); opacity: 0.85; }
.tag.voll::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.tag.vergangen { opacity: 0.4; }
.punkte { display: flex; gap: 2px; }
.punkte span { width: 6px; height: 6px; border-radius: 50%; background: var(--sand); }
.tag.gewaehlt .punkte span { background: var(--auf-braun); }
.zusammenfassung { display: grid; gap: 12px; position: sticky; top: 96px; }
.summe { display: flex; align-items: baseline; gap: 10px; }
.summe b { font-family: var(--schrift-titel); font-size: 3.4rem; line-height: 1; color: var(--braun); font-variant-numeric: tabular-nums; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--leise); }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; background: var(--frei); }
.legende .l-gew::before { background: var(--braun); }
.legende .l-ft::before { background: var(--sand); border-radius: 0; height: 4px; vertical-align: 2px; }
.legende .l-zu::before { background: repeating-linear-gradient(135deg, var(--zu) 0 3px, var(--frei) 3px 6px); }
.legende .l-kol::before { background: var(--sand); border-radius: 50%; width: 8px; height: 8px; }
.legende .l-voll::before { background: var(--warn); border-radius: 50%; width: 10px; height: 10px; }
.legende .l-ant::before { background: repeating-linear-gradient(135deg, var(--sand) 0 3px, var(--sand-hell) 3px 6px); }
.legende .l-fb::before { background: var(--taupe); opacity: 0.55; }
.legende .l-ue::before { background: var(--gut); opacity: 0.7; }
.legende .l-so::before { background: var(--leise); opacity: 0.5; }
.weg-liste { display: grid; gap: 4px; font-size: 0.95rem; }
.weg-liste div { display: flex; justify-content: space-between; gap: 12px; }
.weg-liste span:last-child { color: var(--leise); font-variant-numeric: tabular-nums; }
.bestaetigt { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 16px; }
.haken { width: 72px; height: 72px; border-radius: 50%; background: var(--gut-hell); color: var(--gut); display: grid; place-items: center; font-size: 2.4rem; }
.laedt { opacity: 0.6; transition: opacity 120ms; }

/* Schwebehinweis */
.blase { position: fixed; z-index: 20; pointer-events: none; background: var(--taupe); color: var(--grund); border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; max-width: 260px; box-shadow: 0 6px 18px rgba(40, 30, 22, 0.18); }
.blase b { display: block; margin-bottom: 2px; }

/* Mein Jahr */
.jahr { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.mini { display: grid; gap: 6px; }
.mini h3 { font-size: 1.05rem; }
.gitter { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; font-variant-numeric: tabular-nums; }
.gitter span { aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; font-size: 0.78rem; border-radius: 6px; }
.gitter .we { color: #b8aca1; }
.gitter .ft { color: var(--braun); font-weight: 700; box-shadow: inset 0 -3px 0 var(--sand); border-radius: 2px; }
.gitter .zu { background: repeating-linear-gradient(135deg, var(--zu) 0 4px, var(--frei) 4px 8px); color: var(--taupe); }
.gitter .g { background: var(--braun); color: var(--auf-braun); }
.gitter .a { background: repeating-linear-gradient(135deg, var(--sand) 0 4px, var(--sand-hell) 4px 8px); }
.gitter .h { font-size: 0.65rem; color: var(--leise); }
.leiste-knopf { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* Genehmigen */
.antrag { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; padding: 18px 0; border-bottom: 1px solid var(--linie); }
.antrag:last-child { border-bottom: 0; }
.antrag .wer { display: flex; gap: 12px; align-items: center; }
.antrag .wer i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--auf-braun); font-style: normal; font-weight: 700; flex: none; }
.antrag .details { color: var(--leise); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.antrag .unten { grid-column: 1 / -1; display: grid; gap: 6px; }
.notiz { background: var(--grund); border-left: 3px solid var(--sand); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 0.95rem; }
.warnung { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-hell); border-radius: 10px; padding: 10px 12px; font-size: 0.95rem; }
.warnung::before { content: "!"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: var(--auf-braun); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.warnung.info { background: var(--sand-hell); }
.warnung.info::before { content: "i"; background: var(--sand); }
.knoepfe { display: flex; gap: 10px; flex-wrap: wrap; align-items: start; }
.knoepfe form { margin: 0; }
.ja { background: var(--gut); color: var(--auf-braun); border: 0; border-radius: 12px; min-height: 52px; padding: 0 22px; font-weight: 700; }
.nein { background: var(--flaeche); color: var(--warn); border: 1px solid var(--warn); border-radius: 12px; min-height: 52px; padding: 0 22px; font-weight: 700; display: inline-flex; align-items: center; }
details.ablehnen { grid-column: 1 / -1; }
details.genehmigte > summary { list-style: none; }
details.genehmigte > summary::-webkit-details-marker { display: none; }
.pille.storniert { background: var(--warn-hell); color: var(--warn); }
details.ablehnen > summary { list-style: none; display: inline-flex; }
details.ablehnen > summary::-webkit-details-marker { display: none; }
details.ablehnen form { display: grid; gap: 8px; margin-top: 8px; }
.eintragen { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.eintragen:last-child { border-bottom: 0; }
.eintragen form { margin: 0; }
.haekchen { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); font-weight: 600; }
.haekchen[aria-pressed="true"] { background: var(--gut-hell); border-color: var(--gut); color: var(--gut); }
.haekchen span { width: 22px; height: 22px; border-radius: 6px; border: 2px solid currentColor; display: grid; place-items: center; font-size: 0.85rem; }
.sz { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.sz form { margin: 0; }
.sz-tage { display: flex; flex-wrap: wrap; gap: 6px; }
.sz-tage button { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); font-variant-numeric: tabular-nums; }
.sz-tage button.h { background: var(--sand-hell); border-color: var(--sand); color: var(--braun); font-weight: 700; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.reihe > * { flex: 1; min-width: 140px; }

/* Teamkalender */
.plan-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); }
.plan { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; min-width: 100%; }
.plan th, .plan td { padding: 0; text-align: center; border-bottom: 1px solid var(--linie); }
.plan thead th { font-size: 0.72rem; color: var(--leise); font-weight: 600; padding: 6px 0; min-width: 30px; }
.plan thead th.we { color: #b8aca1; }
.plan thead th.ft { color: var(--braun); box-shadow: inset 0 -3px 0 var(--sand); }
.plan tbody th { text-align: left; padding: 8px 14px; white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: var(--flaeche); z-index: 1; font-size: 0.95rem; }
.plan tbody th small { display: block; color: var(--leise); font-weight: 400; font-size: 0.75rem; }
.plan td { height: 44px; }
.plan td.we { background: var(--frei); }
.plan td.zu { background: repeating-linear-gradient(135deg, var(--zu) 0 5px, var(--frei) 5px 10px); }
.plan td .b { display: block; height: 22px; margin: 0 1px; border-radius: 4px; }
.plan td .b.g { background: var(--braun); }
.plan td .b.a { background: repeating-linear-gradient(135deg, var(--sand) 0 4px, var(--sand-hell) 4px 8px); }
.plan td .b.f { background: var(--taupe); opacity: 0.55; }
.plan td .b.u { background: var(--gut); opacity: 0.7; }
.plan td .b.s { background: var(--leise); opacity: 0.5; }
.plan tfoot td { font-size: 0.75rem; color: var(--leise); padding: 6px 0; height: auto; border-bottom: 0; }
.plan tfoot td.voll { color: var(--warn); font-weight: 700; }
.plan tfoot th { text-align: left; padding: 6px 14px; font-size: 0.75rem; color: var(--leise); position: sticky; left: 0; background: var(--flaeche); font-weight: 600; }
.plan tr.ich th { color: var(--braun); }
.plan th.markiert, .plan tfoot td.markiert { background: var(--sand-hell); color: var(--text); }
.plan td.markiert { background-color: color-mix(in srgb, var(--sand-hell) 60%, transparent); }
.plan tr.antragsteller th { color: var(--braun); background: var(--sand-hell); }
.plan td .b.dieser { outline: 2px solid var(--taupe); outline-offset: 1px; }
.legende .l-dieser::before { background: var(--braun); outline: 2px solid var(--taupe); outline-offset: 1px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kennzahlen div { background: var(--grund); border-radius: 10px; padding: 10px 12px; }
.kennzahlen b { display: block; font-family: var(--schrift-titel); font-size: 1.6rem; color: var(--braun); font-variant-numeric: tabular-nums; }
.kennzahlen span { font-size: 0.8rem; color: var(--leise); }
.verlauf { display: grid; gap: 4px; font-size: 0.92rem; }
.verlauf div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--linie); padding-bottom: 4px; }

/* Tabellen (Import-Vorschau) */
.tabelle-huelle { overflow-x: auto; }
table.liste { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
table.liste th, table.liste td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
table.liste th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--leise); }
table.liste tr.neu td { background: var(--gut-hell); }
table.liste tr.fehlt td { background: var(--warn-hell); }

@media (prefers-reduced-motion: no-preference) { main { animation: auf 160ms ease-out; } @keyframes auf { from { opacity: 0.7; transform: translateY(3px); } } }

/* ---------- Fahrtkosten ---------- */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kennzahlen div { background: var(--grund); border-radius: 12px; padding: 12px 14px; }
.kennzahlen b { display: block; font-family: var(--schrift-titel); font-size: 1.8rem; color: var(--braun); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kennzahlen span { font-size: 0.8rem; color: var(--leise); }
.fahrtliste { display: grid; gap: 8px; }
.fahrtzeile { display: grid; grid-template-columns: 60px minmax(0, 1fr) 92px; gap: 4px 12px; align-items: center; text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 14px; }
.fahrtzeile:hover { border-color: var(--sand); }
.fahrtzeile[aria-current="true"] { border-color: var(--braun); box-shadow: 0 0 0 2px var(--sand-hell); }
.fahrtzeile .datum { font-family: var(--schrift-titel); font-size: 1.25rem; line-height: 1; }
.fahrtzeile .datum small { display: block; font-family: var(--schrift-text); font-size: 0.75rem; color: var(--leise); }
.fahrtzeile .mitte { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.fahrtzeile .weg { font-size: 0.95rem; line-height: 1.5; }
.fahrtzeile .st { white-space: nowrap; }
.fahrtzeile .pf { color: var(--sand); margin: 0 4px; }
.uhr { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--taupe); }
.fahrtzeile .betrag { text-align: right; font-variant-numeric: tabular-nums; }
.fahrtzeile .betrag b { display: block; }
.pille.auto { background: var(--grund); color: var(--leise); }
.pille.offen, .pille.abweichung { background: var(--warn-hell); color: var(--warn); }
.pille.abweichung { border: 1px dashed var(--warn); }
.pille.geaendert, .pille.zurueckgegeben { background: var(--sand-hell); color: var(--braun); }
.pille.eingereicht { background: var(--sand-hell); color: var(--braun); border: 1px dashed var(--sand); }
.frage { background: var(--warn-hell); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.frage b { color: var(--warn); }
.frage form { margin: 0; display: inline; }
.frage .schalter button { margin: 0; }
.termin-karte { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); }
.termin-karte.ausser { border-left: 4px solid var(--braun); }
.termin-karte.geloescht { opacity: 0.5; }
.termin-karte.geloescht .was { text-decoration: line-through; }
.termin-karte .zeit { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--taupe); }
.termin-karte .zeit small { display: block; font-weight: 400; color: var(--leise); }
.termin-karte .was small { display: block; color: var(--leise); font-size: 0.85rem; }
.mk { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-right: 6px; background: var(--sand-hell); color: var(--braun); }
.mk.p { background: var(--grund); color: var(--leise); }
.termin-karte .aktion { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.termin-karte .aktion form { margin: 0; }
.termin-karte .aktion button, .termin-karte .aktion a, .termin-karte .aktion summary { min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--linie); background: var(--flaeche); font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; cursor: pointer; list-style: none; }
.termin-karte details { grid-column: 2; }
.termin-karte details > summary { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 0.85rem; width: auto; display: inline-flex; }
.termin-karte details form { display: grid; gap: 6px; background: var(--grund); border-radius: 10px; padding: 10px; margin-top: 8px; }
.abschnitt { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; color: var(--leise); border-left: 3px solid var(--sand-hell); padding: 6px 10px; font-variant-numeric: tabular-nums; }
.rechnung { background: var(--grund); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.rechnung div { display: flex; justify-content: space-between; gap: 12px; }
.rechnung .summe { border-top: 1px solid var(--linie); padding-top: 6px; margin-top: 4px; font-weight: 700; }
.auswahl { position: relative; }
.vorschlaege { position: absolute; left: 0; right: 0; top: 100%; z-index: 10; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 8px 20px rgba(40, 30, 22, 0.12); margin-top: 4px; overflow: hidden; }
.vorschlaege button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; min-height: 44px; border-bottom: 1px solid var(--linie); }
.vorschlaege button:hover, .vorschlaege button:focus { background: var(--sand-hell); }
.ampel { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.ampel::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gut); }
.ampel.warn::before { background: var(--warn); }
.ampel.grau::before { background: var(--linie); }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }

/* Fahrtkosten: Verwaltung */
.hochladen { display: grid; gap: 8px; }
.hochladen .datei-name { font-size: 0.85rem; color: var(--leise); }

/* Verwaltung */
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kopfzeile h2 { margin: 0; }
a.knopf-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 12px; background: var(--braun); color: var(--auf-braun); font-weight: 700; text-decoration: none; width: auto; }
label.haekchen { display: flex; align-items: center; gap: 10px; margin: 6px 0; min-height: 44px; color: var(--text); cursor: pointer; }
label.haekchen input { width: 24px; height: 24px; accent-color: var(--braun); flex: 0 0 auto; }
tr.leise td { opacity: 0.55; }
