/* Sachlich-modern (zuletzt geladen): kleine Rundungen, klare Linien statt Schatten, ruhige Abzeichen,
   Reiter als Unterstreichung, Kartenköpfe mit Trennlinie. Farben weiter aus /farben.css. */
:root {
  --r-xl: 10px; --r-lg: 8px; --r-md: 6px; --r-sm: 6px; --pill: 6px;
  --border: #d0d7e1; --line: #e4e8ee; --divider: #e4e8ee; --input-border: #c9d1dc;
  --shadow: none; --shadow-sm: none; --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, .25);
  --text: #111827; --muted: #5b6575;
}
body { font-size: 14px; letter-spacing: 0; }
h1 { font: 650 26px/1.25 var(--font); letter-spacing: -.015em; color: var(--text); }
h2 { font: 650 16px/1.3 var(--font); letter-spacing: 0; }
h3 { font: 650 14px/1.3 var(--font); }
.note, #view > h1 + p.note, .seiten-hilfe { color: var(--muted); }

/* Kopfzeile und Seitenleiste */
header.top { box-shadow: inset 0 -3px 0 var(--akzent); }
.seitenleiste { padding: 14px 10px; }
.seitenleiste nav a { border-radius: 6px; padding: 9px 12px; font-weight: 500; color: #374151; gap: 11px; }
.seitenleiste nav a .nav-ico { color: #6b7280; display: inline-flex; }
.seitenleiste nav a:hover { background: #f1f4f8; }
.seitenleiste nav a.active { background: var(--marke-hell); color: var(--marke-dunkel); font-weight: 600; box-shadow: inset 3px 0 0 var(--marke); }
.seitenleiste nav a.active .nav-ico { color: var(--marke); }
.seitenleiste nav a .badge { background: #e5e7eb; color: #374151; border-radius: 4px; min-width: 20px; font-weight: 650; }
.seitenleiste-fuss a { display: flex; align-items: center; gap: 8px; }
.ico { flex: none; display: block; }

/* Reiter: klassische Unterstreichung */
.unterreiter { display: flex; padding: 0; background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; gap: 2px; margin-bottom: 20px; }
.unterreiter a { border-radius: 0; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); }
.unterreiter a:hover { background: none; color: var(--text); }
.unterreiter a.aktiv { background: none; color: var(--marke-dunkel); border-bottom-color: var(--marke); }
.unterreiter .badge, nav a .badge { background: #e5e7eb; color: #374151; border-radius: 4px; }
.reiterleiste, .ansicht-wahl, .tag-reiter { border-radius: 8px; background: #eef1f5; border-color: var(--border); }
.reiterleiste .btn, .ansicht-wahl button, .tag-reiter button { border-radius: 6px; }

/* Karten: Linie statt Schatten, Kopf mit Trennlinie */
.card { border-radius: 8px; box-shadow: none; padding: 18px 20px; }
.card > h2:first-child, .card > .toolbar:first-child > h2, .card > .sg-kopf:first-child, .card > .sk-kopf:first-child { margin-bottom: 14px; }
.card > h2:first-child { margin: -2px -20px 14px; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.stat { border-radius: 8px; box-shadow: none; }
.stat span { text-transform: uppercase; letter-spacing: .04em; font-size: 12px; font-weight: 600; }
table, .card table { box-shadow: none; border-radius: 6px; }
th { background: #f5f7fa; color: #4b5563; }
dialog { border-radius: 10px; }

/* Knöpfe und Felder */
.btn { border-radius: 6px; box-shadow: none; font-weight: 550; }
.btn.primary { box-shadow: none; }
.btn.primary:hover:not(:disabled) { box-shadow: none; }
input, select, textarea { border-radius: 6px; }

/* Abzeichen und Etiketten: ruhig, eckig */
.tag, .st, .quote, .abt-zahl, .saldo-pill { border-radius: 4px !important; }
ul.liste .zahl { background: #e5e7eb; color: #111827; border-radius: 4px; }
ul.liste .li-icon { color: var(--marke); display: inline-flex; justify-content: center; }
.card.alarm ul.liste .li-icon { color: var(--err); }
.abt-chips button, .abt-radio span, .art-radio span, .farb-kachel, .import-wege button { border-radius: 6px; }

/* Startklar: schlicht */
.startklar { background: #fff; border-color: var(--border); }
.sk-balken { height: 6px; border-radius: 3px; background: #e5e9ef; } .sk-balken span { border-radius: 3px; background: var(--marke); }
.sk-schritte li { border-radius: 6px; }

/* Anmeldung: schlichter Streifen */
.login { border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.login::before { background: var(--marke); height: 4px; }

/* Mitarbeiter-App: Reiter unten mit Linien-Symbolen */
.reiter.unten button { border-radius: 8px; }
.reiter.unten .r-ico { filter: none; opacity: 1; color: #6b7280; display: inline-flex; }
.reiter.unten button.aktiv { background: none; color: var(--marke); }
.reiter.unten button.aktiv .r-ico { color: var(--marke); }
.reiter.unten .badge { border-radius: 4px; }
.anw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #10b981; margin: 0 6px 1px 2px; }
.anw.pause { background: #f59e0b; }
/* Mitarbeiter-App: flache, klare Stempel-Knöpfe, Uhr in Markenfarbe statt Verlauf */
.stempel button { background: var(--marke) !important; box-shadow: none !important; border-radius: 8px !important; }
.stempel button.kommen { background: #059669 !important; }
.stempel button.gehen { background: #dc2626 !important; }
.stempel button.pause { background: #d97706 !important; }
.live-uhr { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: var(--marke-dunkel) !important; }
.live::before { height: 3px !important; }
.aufgaben-hinweis { border-width: 1px !important; border-radius: 8px !important; }
.card { border-radius: 8px; }
.app-hinweis { border-radius: 8px; }

/* ===== Feinschliff Grundstil (Büro, Stand 10/2026): Fokus, Abstände, Meldungen, leere Zustände =====
   Nur ergänzend – Grundklassen behalten ihre Form; Farben kommen aus den Variablen (/farben.css). */
:root { --fokus-ring: 0 0 0 3px color-mix(in srgb, var(--marke, #1d4f91) 25%, transparent); }
/* Sprunglink für Tastatur und Vorleser */
.sprung-inhalt { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: #fff; color: var(--marke-dunkel); border: 1px solid var(--border); border-radius: 6px; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
.sprung-inhalt:focus { top: 10px; }
#view:focus { outline: none; }
/* Fokus: überall gleich gut sichtbar (Maus bleibt ruhig, nur Tastatur zeigt den Rahmen) */
a:focus-visible, summary:focus-visible, button:focus-visible, [tabindex]:not(#view):focus-visible { outline: 2px solid var(--marke, #1d4f91); outline-offset: 2px; }
.btn:focus-visible { outline: 2px solid var(--marke, #1d4f91); outline-offset: 2px; box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--marke, #1d4f91); box-shadow: var(--fokus-ring); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--marke, #1d4f91); }
/* Seitenkopf: Erklärung direkt unter der Überschrift */
#view > h1 + .seiten-hilfe { margin: 0 0 18px; font-size: 14px; max-width: 80ch; }
/* Lesbarkeit: Zahlen in Tabellen gleich breit, Links unterstrichen erkennbar */
td, th { font-variant-numeric: tabular-nums; }
.note a, p a { text-underline-offset: 2px; }
/* Symbole in Knöpfen und Links */
.btn .ico { flex: none; }
.mit-ico { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.mit-ico .ico, .tag .ico, td .ico { flex: none; }
/* Aufklapp-Karten: ein Pfeil zeigt, dass es aufgeht */
details.card > summary, details.aufklappen > summary { list-style: none; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0; }
details.card > summary::-webkit-details-marker, details.aufklappen > summary::-webkit-details-marker { display: none; }
details.card > summary::before, details.aufklappen > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 1px 2px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform 150ms ease; align-self: center; }
details.card[open] > summary::before, details.aufklappen[open] > summary::before { transform: rotate(45deg); }
details.card[open] > summary { margin-bottom: 12px; }
details.aufklappen > summary { color: var(--marke-dunkel, #153a6a); font-size: 14px; margin: 8px 0; }
details.aufklappen > :not(summary) { margin-top: 6px; }
/* Leere Zustände: kurz sagen, was fehlt und wie es weitergeht */
.leer-zustand { text-align: center; padding: 28px 20px; color: var(--muted); }
.leer-zustand .ico { color: var(--marke, #1d4f91); opacity: .55; margin: 0 auto 8px; }
.leer-zustand b, .leer-zustand h2, .leer-zustand h1 { display: block; color: var(--text); margin: 0 0 4px; }
.leer-zustand p { margin: 4px auto; max-width: 60ch; }
.leer-zustand .btn { margin-top: 10px; }
td.leer-zelle { text-align: center; color: var(--muted); padding: 22px 12px; }
p.laedt { padding: 8px 0; }
/* Meldungen (Toasts): gestapelt, nicht übereinander */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toasts .toast { position: static; transform: none; pointer-events: auto; border-radius: 8px; padding: 10px 16px; max-width: 100%; box-shadow: 0 8px 24px -8px rgba(15, 23, 42, .4); }
.toast.ok { background: #0f172a; }
/* Dialoge: lange Formulare scrollen, die Knöpfe bleiben unten sichtbar */
dialog { max-height: calc(100vh - 32px); overflow: auto; }
.buero dialog > form > .actions:last-child { position: sticky; bottom: -24px; margin: 16px -26px -24px; padding: 12px 26px; background: #fff; border-top: 1px solid var(--line); z-index: 2; }
dialog h2 { padding-right: 8px; }
/* Ausklapp-Menü an Tabellenzeilen („Mehr“) */
.zeilen-menue { display: inline-block; }
.zeilen-menue > summary { list-style: none; }
.zeilen-menue > summary::-webkit-details-marker { display: none; }
.zeilen-menue .menue-liste { min-width: 200px; }
/* Speichern-Knopf einer Karte: wird zur Hauptaktion, sobald etwas geändert wurde */
.btn.speichern:not(.primary) { color: var(--muted); }
.ungespeichert-hinweis { font-size: 13px; color: var(--warn); align-self: center; }
@media (max-width: 760px) {
  dialog { padding: 18px 16px; }
  .buero dialog > form > .actions:last-child { margin: 16px -16px -18px; padding: 12px 16px; bottom: -18px; flex-wrap: wrap; }
}
@media print { .toasts, .sprung-inhalt { display: none !important; } }

/* ===== Seiten: Einstellungen ===== */
.sprung { gap: 4px; padding: 8px 0; }
.sprung a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #374151; }
.sprung a .ico { color: var(--muted); }
.sprung a.aktiv { background: var(--marke-hell); border-color: var(--marke); color: var(--marke-dunkel); }
.sprung a.aktiv .ico { color: var(--marke); }
h2.einst-titel { display: flex; align-items: center; gap: 10px; margin: 34px 0 4px; font: 650 20px/1.25 var(--font); color: var(--text); text-transform: none; letter-spacing: -.01em; scroll-margin-top: calc(var(--kopf-hoehe, 60px) + 64px); }
h2.einst-titel .ico { color: var(--marke); }
#view > h2.einst-titel:first-of-type { margin-top: 14px; }
h2.einst-titel + p.abschnitt-text { margin: 0 0 14px; font-size: 14px; }
#view > form.card h3, #view > div.card h3 { font-size: 16px; }
h3.einst-unter { margin: 26px 0 6px !important; padding-top: 18px; border-top: 1px solid var(--line); }
h4.abt-ueber { margin: 18px 0 4px; font-size: 14px; }
.card.notfall { border-color: #f1c4c4; }
.card.notfall h3 { display: flex; align-items: center; gap: 8px; color: var(--err); }
.card .actions .spacer { flex: 1; }
.card > .actions { flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .sprung { flex-wrap: nowrap; overflow-x: auto; } .sprung a { white-space: nowrap; } }
#view[data-view="einstellungen"] .card > .actions { justify-content: flex-start; }
#planf table.std-tab { width: auto; min-width: 0; } #planf table.std-tab td, #planf table.std-tab th { padding: 5px 8px; }
/* nur für Vorleser (unsichtbar) */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ===== Seiten: Mitarbeiter ===== */
.suchfeld { position: relative; display: inline-flex; align-items: center; flex: 1 1 280px; max-width: 380px; }
.suchfeld .ico { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.suchfeld input { width: 100%; padding-left: 34px; }
.ma-filter { margin-top: -4px; }
.ma-filter label.check { margin: 0; }
table.ma-tabelle td { vertical-align: middle; }
table.ma-tabelle td.aktionen { white-space: nowrap; text-align: right; }
table.ma-tabelle td.aktionen > * { vertical-align: middle; }
table.ma-tabelle .zeilen-menue > summary.btn { padding: 5px 8px; }
.ma-handy { display: inline-flex; vertical-align: -3px; color: var(--muted); margin-left: 2px; }
td.erreichbar span { display: inline-flex; align-items: center; color: #374151; }
td.erreichbar span.aus { color: var(--muted); }
.zeilen-menue .menue-liste { z-index: 70; }
.zeilen-menue .menue-liste .btn { font-weight: 500; }

/* ===== Seiten: Nachweise ===== */
h2.nw-einst { margin: 30px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.nw-legende { display: inline-block; padding: 0 6px; border-radius: 4px; font-weight: 600; }
.nw-legende.rot { background: var(--err-bg); color: var(--err); }
.nw-legende.gelb { background: var(--warn-bg); color: var(--warn); }
table.nachweise td.nw i.gelesen { display: inline-flex; vertical-align: -2px; color: var(--muted); }
.card > .note .ico { vertical-align: -2px; display: inline-block; }

/* ===== Seiten: Bewerbungen ===== */
.kanban { grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 10px; }
.spalte { background: #f8fafc; border-radius: 8px; padding: 10px; }
.spalte.ende { background: transparent; border-style: dashed; }
.spalte h2 { margin: 2px 2px 10px; font-size: 14px; }
.spalte-leer { margin: 4px 2px; }
.bkarte { border-radius: 6px; }
.bkarte:hover, .bkarte:focus-visible { border-color: var(--marke); }
.bkarte .tag .ico { margin-right: 2px; }
.bw-kontakt { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.bw-weitere { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
table.ma-tabelle td:nth-child(2) { min-width: 140px; max-width: 260px; overflow-wrap: anywhere; } /* lange Namen brechen um */
@media (max-width: 900px) {
  /* schmal: Eintritt und Erreichbarkeit stehen im Bearbeiten-Dialog */
  table.ma-tabelle th:nth-last-child(4), table.ma-tabelle td:nth-last-child(4), table.ma-tabelle th:nth-last-child(3), table.ma-tabelle td:nth-last-child(3) { display: none; }
}
