/* Praxisportal Lichtblick — Design nach abgenommenen Mockups */

@font-face {
  font-family: 'Comfortaa';
  src: url('/static/Comfortaa-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Comfortaa';
  src: url('/static/Comfortaa-Bold.ttf') format('truetype');
  font-weight: 700;
}

:root {
  /* Marke */
  --navy: #0D3A78;
  --navy-light: #e8eef8;
  --navy-mid: #3a6aaf;
  --magenta: #B5176F;        /* aufgefrischt, klarer */
  --magenta-light: #fbe9f3;
  /* Status (aufgefrischt, klarer/satter) */
  --green: #15803d;
  --green-bg: #e7f6ec;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #dc2626;
  --red-bg: #fde7e7;
  --gray: #64748b;
  --gray-bg: #f1f3f6;
  /* Aufgaben-Status-Standard (einheitlich, heller Badge-Stil): Offen=Grau, In Bearbeitung=Orange, Erledigt=Smaragd */
  --st-offen-fg: #64748b;   --st-offen-bg: #eef2f6;   --st-offen-bar: #cbd5e1;
  --st-bearb-fg: #c2410c;   --st-bearb-bg: #fdeee7;   --st-bearb-bar: #f6b78f;
  --st-done-fg:  #047857;   --st-done-bg:  #e6f5ee;   --st-done-bar: #8fd6bb;
  --st-wartet-fg: #4f46e5;  --st-wartet-bg: #eef0fe;  --st-wartet-bar: #b3bcf5;  /* „Wartet" = Indigo, bewusst distinkt von Bearbeitung-Orange */
  --st-neu-fg: #0d3a78;     --st-neu-bg: #e7eef9;     --st-neu-bar: #9dbbe4;     /* „Neu" (Postfach) = Navy, kräftiger als das entsättigte Offen-Slate */
  --purple: #6d28d9;
  --purple-bg: #ede9fe;
  /* Neutral / Flächen — ohne Blaustich */
  --bg: #fafbfc;
  --border: #ebedf1;
  --border-strong: #c9ced6;   /* kräftiger als --border, z. B. für gestrichelte Ränder */
  --text: #1a2233;
  --text-secondary: #64748b;
  /* Aus-Zustand des Schalters: bewusst kräftiger als --border, sonst liest er sich nicht als Bedienelement */
  --switch-off: #cfd6e0;
  /* Einheitliche Höhe für Bedienelemente in Werkzeugleisten (Knöpfe, Felder, Dropdowns,
     Segmente). 38px = die vorhandene .icon-btn-Größe, damit alles auf einer Linie steht. */
  --h-control: 38px;
  /* Token-Skalen (Abstände / Ecken / Tiefen / Schrift) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --shadow-1: 0 1px 3px rgba(16,24,40,.05);
  --shadow-2: 0 2px 10px rgba(13,58,120,.07);
  --shadow-3: 0 8px 28px rgba(13,58,120,.14);
  --ease-out: cubic-bezier(.23, 1, .32, 1);   /* sanftes Aufklappen (Popover/Menüs) */
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 18px; --fs-xl: 24px;
  /* Aliasse (Rückwärtskompatibilität) */
  --radius: var(--r-md);
  --shadow: var(--shadow-1);
  --font-brand: 'Comfortaa', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Kalender-Kategorie-Töne (Pillen/Balken) — Marke + Status wiederverwendet, wenige neue Töne */
  --cat-meeting-bg: var(--magenta-light);    --cat-meeting-fg: var(--magenta);
  --cat-feiertag-bg: var(--gray-bg);         --cat-feiertag-fg: var(--gray);
  --cat-checkliste-bg: var(--green-bg);      --cat-checkliste-fg: var(--green);
  --cat-frist-bg: var(--amber-bg);           --cat-frist-fg: var(--amber);
  --cat-abwesenheit-bg: #e6f5f0;             --cat-abwesenheit-fg: #0f6e56;  /* teal */
  --cat-geburtstag-bg: #fdeee7;              --cat-geburtstag-fg: #c2410c;   /* coral */
  --cat-eigen-bg: var(--navy-light);         --cat-eigen-fg: var(--navy);
  --cat-dienstplan-bg: #e7edf7;              --cat-dienstplan-fg: #1e4d8c;   /* navy-slate */
  --cat-gespraech-bg: #efedfb;               --cat-gespraech-fg: #4f46b5;    /* violett */
  --cat-zertifikat-bg: var(--red-bg);        --cat-zertifikat-fg: var(--red);

  /* Erweiterte Akzentfarben (u. a. Postfach-Kategorien) — zentrale Paare, keine Insel-Hex */
  --teal: #0f6e56;    --teal-bg: #e6f5f0;
  --orange: #c2410c;  --orange-bg: #fdeee7;
  --cyan: #0e7490;    --cyan-bg: #e0f2f7;
  --indigo: #4338ca;  --indigo-bg: #e8e9fb;
  --lime: #4d7c0f;    --lime-bg: #eef7e0;
  --braun: #92400e;   --braun-bg: #f5ece2;
}

/* ── Inline-Icons (Lucide via common.js) ── */
.ic { flex-shrink: 0; vertical-align: -0.18em; }
.spin { display: inline-flex; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Kalender: Kategorie-Farben (eine Klasse remappt --bg/--fg, Bausteine lesen sie) ── */
.k-meeting    { --bg: var(--cat-meeting-bg);    --fg: var(--cat-meeting-fg); }
.k-feiertag   { --bg: var(--cat-feiertag-bg);   --fg: var(--cat-feiertag-fg); }
.k-checkliste { --bg: var(--cat-checkliste-bg); --fg: var(--cat-checkliste-fg); }
.k-frist      { --bg: var(--cat-frist-bg);      --fg: var(--cat-frist-fg); }
.k-abwesenheit{ --bg: var(--cat-abwesenheit-bg);--fg: var(--cat-abwesenheit-fg); }
.k-geburtstag { --bg: var(--cat-geburtstag-bg); --fg: var(--cat-geburtstag-fg); }
.k-eigen      { --bg: var(--cat-eigen-bg);      --fg: var(--cat-eigen-fg); }
.k-dienstplan { --bg: var(--cat-dienstplan-bg); --fg: var(--cat-dienstplan-fg); }
.k-gespraech  { --bg: var(--cat-gespraech-bg);  --fg: var(--cat-gespraech-fg); }
.k-zertifikat { --bg: var(--cat-zertifikat-bg); --fg: var(--cat-zertifikat-fg); }
.cal-pill { background: var(--bg, var(--gray-bg)); color: var(--fg, var(--gray)); }
.cal-bar  { background: var(--bg, var(--gray-bg)); color: var(--fg, var(--gray)); }
.cal-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--fg, var(--gray)); flex-shrink: 0; display: inline-block; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Topbar ── */
.topbar {
  background: var(--navy);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--magenta);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { height: 40px; }
.topbar .brand .brand-mark { display: none; }  /* nur auf Mobile sichtbar (Zahn statt Wortmarke) */
.topbar .user { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 14px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; background: var(--magenta);
  flex-shrink: 0;
}
.btn-logout { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 13px; padding: 4px; }
.btn-logout:hover { color: #fff; }
.bell-wrap { position: relative; display: inline-flex; margin-right: 4px; }
.bell-btn { position: relative; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; color: rgba(255,255,255,0.9); }
.bell-btn:hover { color: #fff; }
.bell-badge {
  position: absolute; top: -2px; right: -3px;
  background: var(--magenta); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
/* ── Glocken-Dropdown ── */
.bell-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: 320px; max-width: 86vw; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(13,58,120,0.18); overflow: hidden;
}
.bell-head { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: space-between; }
.bell-count { font-size: 11px; font-weight: 600; background: var(--navy-light); color: var(--navy); border-radius: 999px; padding: 1px 8px; }
.bell-body { max-height: 56vh; overflow-y: auto; }
.bell-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--bg); text-decoration: none; color: var(--text); }
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: var(--bg); }
.bell-ic { width: 28px; height: 28px; border-radius: 7px; background: var(--navy-light); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bell-tb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bell-t { font-size: 13px; font-weight: 500; line-height: 1.25; }
.bell-m { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.bell-b { font-size: 10px; flex-shrink: 0; margin-top: 1px; white-space: nowrap; }
.bell-foot { padding: 10px 14px; text-align: center; border-top: 1px solid var(--border); }
.bell-foot a { font-size: 12px; color: var(--navy); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
/* ── Briefumschlag (Mitteilungen) — spiegelt die Glocke ── */
.mail-wrap { position: relative; display: inline-flex; margin-right: 4px; }
.mail-btn { position: relative; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; color: rgba(255,255,255,0.9); }
.mail-btn:hover { color: #fff; }
.mail-badge {
  position: absolute; top: -2px; right: -3px;
  background: #9A0167; color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
}
.mail-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: 320px; max-width: 86vw; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(13,58,120,0.18); overflow: hidden;
}
/* ── Aufgaben-Symbol (Meeting-Aufgaben) — spiegelt die Glocke ── */
.task-wrap { position: relative; display: inline-flex; margin-right: 4px; }
.task-btn { position: relative; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; color: rgba(255,255,255,0.9); }
.task-btn:hover { color: #fff; }
.task-badge {
  position: absolute; top: -2px; right: -3px;
  background: var(--magenta); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
}
.task-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: 320px; max-width: 86vw; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(13,58,120,0.18); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Konto-Menü (Topbar) ── */
.account-wrap { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  color: rgba(255,255,255,0.85); font-size: 14px; font-family: inherit; border-radius: 8px;
}
.account-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.account-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16); padding: 6px; min-width: 200px;
}
.account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--text); border-radius: 7px;
}
.account-menu button:hover { background: var(--bg); }
.account-menu hr { border: none; border-top: 1px solid var(--border); margin: 5px 4px; }

/* ── Einklappbare Navigationsgruppen ── */
.nav-group-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; border-left: 3px solid transparent; cursor: pointer;
  font-family: inherit; padding: 11px 18px; font-size: 14px; color: var(--text-secondary);
}
.nav-group-head:hover { background: var(--bg); }
.nav-group-head span { flex: 1; text-align: left; }
.nav-group-head .ic:last-child { transition: transform 0.18s; width: 14px; height: 14px; }
.nav-group-head.collapsed .ic:last-child { transform: rotate(-90deg); }
.nav-group[hidden] { display: none; }


/* ── Layout ── */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 220px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--border);
  padding: 16px 0;
  position: sticky; top: 60px; align-self: flex-start;
  height: calc(100vh - 60px); overflow: hidden;
  transition: width .15s;
}
/* Scrollbarer Nav-Bereich; der Einklapp-Knopf bleibt darunter fixiert */
.nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.nav-collapse {
  flex: none; display: flex; align-items: center; justify-content: flex-end;
  width: 100%; padding: 9px 18px; border: none; border-top: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.nav-collapse:hover { background: var(--bg); color: var(--text); }
.nav-collapse .ic { transition: transform .15s; }
/* Eingeklappt: nur Symbole (Desktop). Mobil greift das Horizontal-Nav weiter unten. */
@media (min-width: 761px) {
  body.nav-mini .sidebar { width: 64px; }
  body.nav-mini .nav-item { justify-content: center; gap: 0; padding: 8px 0; font-size: 0; border-left-width: 0; }
  body.nav-mini .nav-item .ic { width: 18px; height: 18px; }
  /* Aktiv-Markierung ohne Layout-Versatz (der border-left entfällt eingeklappt) */
  body.nav-mini .nav-item.active { box-shadow: inset 3px 0 0 var(--navy); }
  body.nav-mini .nav-item.nav-lumi, body.nav-mini .nav-item.nav-lumi.active { box-shadow: inset 3px 0 0 var(--magenta); }
  body.nav-mini .nav-div { margin: 6px 16px; }
  body.nav-mini .nav-section { font-size: 0; padding: 6px 0; }
  body.nav-mini .nav-item > span:not(.nav-badge) { display: none !important; }
  /* Zähler-Pille eingeklappt als Overlay oben rechts aufs Icon (wie die Topbar-Badges) */
  body.nav-mini .nav-badge { position: absolute; top: 3px; right: 12px; margin: 0;
    font-size: 9px; min-width: 15px; height: 15px; padding: 0 3px; }
  body.nav-mini .nav-collapse { justify-content: center; padding: 9px 0; }
  body.nav-mini .nav-collapse .ic { transform: rotate(180deg); }
}
@media (max-width: 760px) { .nav-collapse { display: none; } }
/* Tooltip mit Menünamen im eingeklappten Menü — fixiert (kein Clipping durch .nav-scroll) */
#nav-tip {
  position: fixed; z-index: 200; transform: translateY(-50%); pointer-events: none;
  background: var(--text); color: #fff; padding: 5px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(13, 58, 120, 0.22);
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
#nav-tip.show { opacity: 1; visibility: visible; }
/* Bleibende Meldung bei Neuem — steht unter der Topbar, bis man sie anklickt/wegklickt.
   Fixiert, greift also NICHT ins Seitenlayout ein. */
#neu-bar {
  position: fixed; top: 74px; right: 20px; z-index: 190; max-width: 430px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--magenta);
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px;
  box-shadow: var(--shadow-3);
}
#neu-bar .nb-ic { color: var(--magenta); display: inline-flex; flex: none; }
#neu-bar .nb-t { flex: 1; min-width: 0; }
#neu-bar .nb-go {
  flex: none; border: none; cursor: pointer; background: var(--magenta); color: #fff;
  border-radius: 7px; padding: 5px 11px; font-size: 12.5px; font-weight: 600;
}
#neu-bar .nb-x {
  flex: none; border: none; cursor: pointer; background: none;
  color: var(--text-secondary); display: inline-flex; padding: 4px;
}
#neu-bar .nb-x:hover { color: var(--text); }
/* Mobil: nach unten (oben sitzt die horizontale Navigation) */
@media (max-width: 760px) {
  #neu-bar { top: auto; bottom: 14px; left: 12px; right: 12px; max-width: none; }
}
/* Abgetrennte Fußsektion: unten angepinnt, mit Trennlinie */
.nav-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 6px; }
/* Wiederverwendbarer Icon-Button (z.B. Einstellungs-Zahnrad oben rechts in Hub-Headern) */
.icon-btn {
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none; flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); padding: 14px 18px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 18px; font-size: 13px; color: var(--text-secondary);
  text-decoration: none; border-left: 3px solid transparent;
  position: relative;   /* Anker für die eingeklappte Zähler-Pille (.nav-badge) */
}
/* Zähler-Pille in der Seitenleiste (Aufgaben/Chat/Mail) — aufgeklappt rechts am Zeilenende;
   Sichtbarkeit steuert JS über style.display (applyBadges). */
.nav-badge {
  margin-left: auto; display: none;
  background: var(--magenta); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  align-items: center; justify-content: center;
}
.nav-badge.nb-navy { background: var(--navy); }
/* Feiner Trenner zwischen den Nav-Gruppen (statt Text-Überschriften) */
.nav-div { border-top: 1px solid var(--border); margin: 6px 12px; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { color: var(--navy); background: var(--navy-light); border-left-color: var(--navy); font-weight: 600; }
/* LUMI: dauerhafte Hervorhebung wie der aktive Dashboard-Eintrag, nur in Magenta */
.nav-item.nav-lumi, .nav-item.nav-lumi.active { color: var(--magenta); background: var(--magenta-light); border-left-color: var(--magenta); font-weight: 600; }
.nav-item.nav-lumi:hover { background: #f0d8e7; }
.nav-item.nav-sub { padding-left: 30px; }
main { flex: 1; padding: 28px; min-width: 0; }

/* ── Typo / Header ── */
h1 { font-family: var(--font-brand); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
h2 { font-family: var(--font-brand); font-weight: 700; }
.subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 22px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

/* ── Abschnitts-Köpfe & Karten-Links (ersetzen wiederholte Inline-Styles) ── */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.section-head > strong { font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.section-head > strong .ic { color: var(--navy); }
.card-link { font-size: 13px; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.card-link:hover { text-decoration: underline; }

/* ── Leerzustand ── */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 0; color: var(--text-secondary); font-size: 14px; text-align: center; }
.empty-state .ic { color: var(--green); }

/* ── Aufgaben-Fortschrittsbalken (offen/in Bearbeitung/erledigt) ── */
.taskbar { display: flex; gap: 3px; height: 10px; }
.taskbar .seg { display: block; height: 100%; border-radius: 999px; }
.taskbar .seg-erledigt { background: var(--st-done-bar); }
.taskbar .seg-bearb { background: var(--st-bearb-bar); }
.taskbar .seg-offen { background: var(--st-offen-bar); }
.taskbar-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.taskbar-legend .tb-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.taskbar-legend .tb-erledigt { background: var(--st-done-bg); color: var(--st-done-fg); }
.taskbar-legend .tb-bearb { background: var(--st-bearb-bg); color: var(--st-bearb-fg); }
.taskbar-legend .tb-offen { background: var(--st-offen-bg); color: var(--st-offen-fg); }
.taskbar-legend .tb-chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.taskbar-empty { font-size: 13px; color: var(--text-secondary); margin: 2px 0; }

/* Status-Poll (segmentierte Auswahl je Aufgabe — ersetzt Dropdown) */
.status-poll { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.status-poll .sp-opt { appearance: none; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 12px; padding: 5px 12px; color: var(--text-secondary); border-left: 1px solid var(--border); white-space: nowrap; }
.status-poll .sp-opt:first-child { border-left: none; }
.status-poll .sp-opt:hover { background: var(--bg); }
.status-poll .sp-opt.is-offen  { background: var(--st-offen-bg);  color: var(--st-offen-fg);  font-weight: 500; }
.status-poll .sp-opt.is-bearb  { background: var(--st-bearb-bg);  color: var(--st-bearb-fg);  font-weight: 500; }
.status-poll .sp-opt.is-done   { background: var(--st-done-bg);   color: var(--st-done-fg);   font-weight: 500; }

/* Frist-Badge mit Restzeit (dueBadge in common.js) */
.due-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 8px; background: var(--bg); color: var(--text-secondary); white-space: nowrap; }
.due-badge .ic { width: 12px; height: 12px; }
.due-badge.over { background: #fee2e2; color: #b91c1c; }
.due-badge.soon { background: #fef9c3; color: #a16207; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 8px;
  background: #fff; color: var(--text); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
  text-decoration: none;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--magenta); color: #fff; border-color: transparent; }
.btn-primary:hover { background: #7d0153; }
.btn-navy { background: var(--navy); color: #fff; border-color: transparent; }
.btn-navy:hover { background: #0a2d5e; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
/* KI-Werkzeug: magenta = KI in der ganzen App. Bewusst GETÖNT statt voll magenta —
   `.btn-primary` ist der volle Magenta-Ton, der die Primäraktion markiert. */
.btn-ki { background: var(--magenta-light); color: var(--magenta); border-color: var(--magenta-light); }
.btn-ki:hover { background: var(--magenta-light); border-color: var(--magenta); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: transparent; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 8px;
  background: none; color: var(--text-secondary); border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled, .btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Switch (Toggle) ──
   DER Toggle der App (DESIGN.md §5). Layout-agnostisch: die Zeile drumherum gehört der Seite,
   hier steckt nur das Bedienelement. Markup:
     <span class="switch"><input type="checkbox"><span class="slider"></span></span>
   Als <label class="switch"> genauso nutzbar, wenn kein Text danebensteht. */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--switch-off); border-radius: 999px; transition: background .15s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--navy); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--navy-mid); outline-offset: 2px; }
/* Kleine Variante für dichte Tabellen/Zellen */
.switch.switch-sm { width: 30px; height: 17px; }
.switch.switch-sm .slider::before { width: 13px; height: 13px; }
.switch.switch-sm input:checked + .slider::before { transform: translateX(13px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row > span { font-size: 14px; }
/* Modifier: Schalter links vor dem Text (statt rechts ausgerichtet) */
.switch-row.left { justify-content: flex-start; }
.switch-row.left > span { order: 2; }
.switch-row.left > .switch { order: 1; }

/* ── Auswahl-Pills (Mehrfachauswahl) ──
   DIE Mehrfachauswahl der App: anklickbare Pills statt <select multiple>. Markup:
     <div class="cb-liste"><span class="cb-pill" data-v="1">Name</span>…</div>
   Aktiv = Klasse „on"; die Seite toggelt sie und liest die aktiven data-v aus. */
.cb-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text-secondary); }
.cb-pill.on { background: var(--navy-light); border-color: var(--navy-light); color: var(--navy); font-weight: 600; }

/* ── Prioritäts-Pills ──
   Einfachauswahl hoch|mittel|niedrig; gerendert über prioPills()/pickPrio() in common.js.
   .prio-dot ist der farbige Punkt für Listen. */
.prio-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prio-dot.p-hoch { background: var(--red); }
.prio-dot.p-mittel { background: var(--amber); }
.prio-dot.p-niedrig { background: var(--gray); }
.prio-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.prio-pill { font-size: 12px; font-weight: 600; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.prio-pill.on.pp-hoch { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.prio-pill.on.pp-mittel { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.prio-pill.on.pp-niedrig { background: var(--gray-bg); color: var(--gray); border-color: var(--gray); }

/* ── Fälligkeits-Schnellknöpfe (+1 T / +1 W / +2 W) ──
   Neben einem <input type="date">; gerendert über dueQuick()/dueSet() in common.js. */
.date-quick { display: inline-flex; gap: 4px; margin-top: 5px; }
.date-quick button { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.date-quick button:hover { border-color: var(--navy); color: var(--navy); }

/* ── Unteraufgaben-Liste ──
   Checkbox + Text + Aktion je Zeile, darunter eine Zeile zum Hinzufügen. Markup:
     <div class="sub-list">…<div class="sub-item"><span class="sub-check"></span>
       <span class="sub-t">Titel</span><button class="sub-move">×</button></div>…</div>
     <div class="sub-add"><input …></div> */
.sub-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sub-item { display: flex; align-items: center; gap: 9px; padding: 5px 2px; }
.sub-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong, #c9ced6); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.sub-check.done { background: var(--green); border-color: var(--green); }
.sub-check.done .ic { color: #fff; }
.sub-item .sub-t { flex: 1; font-size: 14px; }
.sub-item .sub-t.done { color: var(--text-secondary); text-decoration: line-through; }
.sub-move { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 2px; opacity: .6; }
.sub-move:hover { opacity: 1; }
.sub-add { display: flex; align-items: center; gap: 8px; padding: 6px 2px 2px; }
.sub-add input { flex: 1; font-size: 13px; border: none; border-bottom: 1px dashed var(--border-strong, #c9ced6); background: transparent; padding: 4px 0; outline: none; }

/* ── Cards / Metrics ── */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.metric.with-icon { display: flex; align-items: center; gap: 13px; }
.metric .m-body { min-width: 0; }
.metric .micon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.metric .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 4px; }
.metric .value { font-family: var(--font-brand); font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.metric .value.magenta { color: var(--magenta); }
.metric .value.green { color: var(--green); }
.metric .value.red { color: var(--red); }

/* ── Kennzahlen-Karten (Personalakte + /kennzahlen, gerendert von kzMetriken) ── */
.kz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.kz-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; }
.kz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kz-title { font-size: 14px; font-weight: 600; color: var(--text); }
.kz-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.kz-now { font-family: var(--font-brand); font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.1; flex: none; font-variant-numeric: tabular-nums; }
.kz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kz-chip { font-size: 11.5px; color: var(--text-secondary); background: var(--gray-bg); border-radius: 999px; padding: 2px 9px; }
.kz-chip.warn { color: var(--amber); background: var(--amber-bg); }
.kz-chart { margin-top: 12px; }
.kz-foot { font-size: 11.5px; color: var(--text-secondary); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }

/* ── Getönte Icon-Quadrate (Status-Karten, Metriken) ── */
.icon-tint { color: var(--navy); background: var(--navy-light); }
.icon-tint.green { color: var(--green); background: var(--green-bg); }
.icon-tint.amber { color: var(--amber); background: var(--amber-bg); }
.icon-tint.red { color: var(--red); background: var(--red-bg); }
.icon-tint.magenta { color: var(--magenta); background: var(--magenta-light); }
.icon-tint.gray { color: var(--gray); background: var(--gray-bg); }

/* ── Status-Karten (Mitarbeiter-Dashboard) ── */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.status-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; border-left: 4px solid var(--border); }
.status-card.valid { border-left-color: #3a9a47; }
.status-card.due_soon { border-left-color: #d4860a; }
.status-card.expired, .status-card.missing { border-left-color: #c42020; }
.status-card.paused, .status-card.not_required, .status-card.grace { border-left-color: var(--gray); }
.status-card.not_required { opacity: 0.7; }
.status-card.counting { border-left-color: var(--navy); }
.status-card .icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; font-size: 17px; }
.status-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.status-card .meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 9px; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge.valid { background: var(--green-bg); color: var(--green); }
.badge.due_soon { background: var(--amber-bg); color: var(--amber); }
.badge.expired, .badge.missing { background: var(--red-bg); color: var(--red); }
.badge.paused, .badge.not_required, .badge.grace, .badge.gray, .badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge.counting, .badge.navy { background: var(--navy-light); color: var(--navy); }
.badge.magenta { background: var(--magenta-light); color: var(--magenta); }
.badge.cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge.braun { background: var(--braun-bg); color: var(--braun); }

/* ── Hinweis-Boxen ── */
.box { border-radius: 8px; padding: 12px 16px; margin-bottom: 14px; display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.box.error { background: var(--red-bg); border: 1px solid #f0a5a5; color: var(--red); }
.box.warn { background: var(--amber-bg); border: 1px solid #e8c46a; color: var(--amber); }
.box.info { background: var(--navy-light); border: 1px solid #a8c4e8; color: var(--navy); }
.box.success { background: var(--green-bg); border: 1px solid #9ed0a5; color: var(--green); }

/* ── Formulare ── */
label { display: block; font-size: 13px; font-weight: 600; letter-spacing: normal; color: var(--text-secondary); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-mid); border-color: transparent; }
/* Checkbox/Radio von der vollbreiten Feldregel ausnehmen — sonst werden sie aufgebläht/verzerrt */
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; margin: 0; }
/* Labels, die eine Checkbox/Radio umschließen, normal (nicht uppercase) darstellen.
   Bewusst OHNE display-Override: das geerbte display:block hält jedes Label auf eigener
   Zeile (Checkbox + Text inline), und seitenspezifische Layouts (z.B. .leit-check als Flex)
   bleiben unangetastet. */
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) {
  text-transform: none; font-weight: 400; letter-spacing: normal;
  font-size: 14px; color: var(--text); margin-bottom: 0; cursor: pointer;
}
/* Alle Dropdowns app-weit im neuen Look: eigener Chevron statt nativem Browser-Chrome */
select {
  -webkit-appearance: none; appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
/* Schlankes, rundes Dropdown (eigener Chevron statt nativem Browser-Chrome) — opt-in per Klasse */
select.select-slim {
  -webkit-appearance: none; appearance: none; width: auto;
  border: 1px solid var(--border); border-radius: 8px; background-color: #fff; color: var(--text);
  padding: 6px 30px 6px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
/* Aufpolierter geschlossener Zustand für ALLE Selects: weicher CI-Fokusring + Hover
   (überschreibt die harte gemeinsame :focus-Kante nur für Selects). */
select { transition: border-color .12s, box-shadow .12s; }
select:hover:not(:disabled) { border-color: var(--border-strong); }
select:focus { outline: none; border-color: var(--navy-mid); box-shadow: 0 0 0 3px var(--navy-light); }
/* „nice-select": gestaltete Optionsliste über einem nativen <select> — opt-in per
   Klasse select-nice, nur am Desktop (Handy behält das native Auswahlrad). */
.nice-select { position: relative; display: inline-block; }
.nice-select.nice-block { display: block; width: 100%; }
.nice-select.nice-block .nice-trigger { width: 100%; }
.nice-select > select, .nice-select > input { display: none; }
.nice-trigger { display: inline-flex; align-items: center; gap: 8px; height: var(--h-control);
  padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff;
  color: var(--text); font-family: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: border-color .12s, box-shadow .12s; }
.nice-trigger:hover:not(:disabled) { border-color: var(--border-strong); }
.nice-trigger:disabled { opacity: .55; cursor: not-allowed; background: var(--bg); }
.nice-trigger[aria-expanded="true"], .nice-trigger:focus-visible {
  outline: none; border-color: var(--navy-mid); box-shadow: 0 0 0 3px var(--navy-light); }
.nice-trigger .nice-lbl { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.nice-trigger svg { color: var(--navy-mid); flex: none; transition: transform .12s; }
.nice-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Tippbarer Datums-/Zeit-Auslöser: Textfeld + Icon-Knopf. */
.nice-di { padding: 0; gap: 0; align-items: stretch; overflow: hidden; }
.nice-di[aria-expanded="true"] svg { transform: none; }   /* Kalender-/Uhr-Icon nicht drehen */
.nice-di:focus-within { border-color: var(--navy-mid); box-shadow: 0 0 0 3px var(--navy-light); }
.nice-din { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: 14px; color: var(--text); padding: 0 4px 0 12px; }
.nice-din::placeholder { color: var(--text-secondary); }
.nice-dib { border: none; background: none; cursor: pointer; color: var(--navy-mid); display: inline-flex; align-items: center; padding: 0 10px; }
.nice-dib:hover:not(:disabled) { color: var(--navy); }
.nice-din:disabled, .nice-dib:disabled { cursor: not-allowed; }
/* fixed + an <body> gehängt (JS setzt left/top/min-width) → nie in Modals/Cards abgeschnitten;
   z-index über den Modal-Kulissen (100/210). Geteilt von Select-Menü + Datums-/Zeit-Panel. */
.nice-menu, .nice-pop { position: fixed; z-index: 2000; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.nice-menu { max-height: 300px; overflow-y: auto; padding: 5px; }
.nice-pop { padding: 10px 12px; }
.nice-menu.nice-in, .nice-pop.nice-in { animation: niceIn .16s var(--ease-out); }
@keyframes niceIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nice-lbl.nice-ph { color: var(--text-secondary); }
.nice-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.nice-opt .nice-ck { width: 16px; height: 16px; flex: none; display: inline-flex; color: var(--navy); }
.nice-opt.active { background: var(--bg); }
.nice-opt.sel { background: var(--navy-light); color: var(--navy); font-weight: 500; }
/* Datums-Kalender */
.nd-cal { width: 256px; }
.nd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.nd-nav { border: none; background: none; cursor: pointer; color: var(--navy-mid); display: inline-flex; padding: 4px; border-radius: var(--r-sm); }
.nd-nav:hover { background: var(--bg); }
.nd-title { border: none; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text); padding: 4px 8px; border-radius: var(--r-sm); }
.nd-title:hover { background: var(--bg); }
.nd-wd { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.nd-wd span { text-align: center; font-size: 11px; color: var(--text-secondary); }
.nd-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.nd-day { height: 30px; border: none; background: none; cursor: pointer; border-radius: var(--r-sm); font-size: 13px; color: var(--text); font-family: inherit; }
.nd-day:hover:not(:disabled) { background: var(--bg); }
.nd-day.mut, .nd-day:disabled { color: var(--border-strong); }
.nd-day:disabled { cursor: default; }
.nd-day.today { box-shadow: inset 0 0 0 1.5px var(--navy); color: var(--navy); font-weight: 500; }
.nd-day.sel { background: var(--navy); color: #fff; font-weight: 500; }
.nd-day.foc:not(.sel) { outline: 2px solid var(--navy-light); outline-offset: -2px; }
.nd-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.nd-foot button { border: none; background: none; cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: var(--r-sm); font-family: inherit; }
.nd-foot button[data-today], .nd-foot button[data-done] { color: var(--navy); font-weight: 500; }
.nd-foot button[data-clear] { color: var(--text-secondary); }
.nd-foot button[data-done] { margin-left: auto; }
.nd-foot button:hover { background: var(--bg); }
.nd-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nd-cell { height: 40px; border: none; background: none; cursor: pointer; border-radius: var(--r-sm); font-size: 13px; color: var(--text); font-family: inherit; }
.nd-cell:hover { background: var(--bg); }
.nd-cell.sel { background: var(--navy); color: #fff; font-weight: 500; }
/* Uhrzeit-Wähler (zwei Spalten) */
.nt-pop { display: flex; gap: 8px; }
.nt-col { display: flex; flex-direction: column; width: 66px; }
.nt-h { font-size: 11px; color: var(--text-secondary); text-align: center; margin-bottom: 4px; }
.nt-scroll { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nt-sep { width: 1px; background: var(--border); }
.nt-i { border: none; background: none; cursor: pointer; border-radius: var(--r-sm); font-size: 14px; color: var(--text); height: 30px; flex: none; font-family: inherit; }
.nt-i:hover { background: var(--bg); }
.nt-i.sel { background: var(--navy); color: #fff; font-weight: 500; }
/* Datum + Uhrzeit kombiniert */
.ndt-pop { width: 256px; }
.ndt-time { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.ndt-time .nt-col { width: 50px; }
.ndt-tl { font-size: 12px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ndt-scroll { max-height: 120px; }
@media (prefers-reduced-motion: reduce) { .nice-menu.nice-in, .nice-pop.nice-in { animation: none; } }
/* Zurück-Breadcrumb oberhalb des Seitentitels */
.breadcrumb { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.breadcrumb a { color: var(--navy); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
/* Bestätigungs-Fortschrittsbalken (rot bis vollständig, grün bei 100 %) */
.conf-wrap { display: inline-flex; align-items: center; gap: 8px; }
.conf-bar { width: 70px; height: 8px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; display: inline-block; vertical-align: middle; }
.conf-bar.full { display: block; width: 100%; height: 12px; border-radius: 6px; }
.conf-bar > i { display: block; height: 100%; border-radius: inherit; }
.conf-num { font-size: 12px; font-weight: 600; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Tabellen ── */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; background: #fff; }
/* Rahmenloser Scroll-Wrapper für Tabellen, die schon in einer Karte stecken — kein Desktop-Effekt,
   scrollt nur auf schmal (Mobile) statt die Seite zu überlaufen. */
.table-scroll { overflow-x: auto; }
th { padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--bg); }

/* ── Filter / Suche ── */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] { flex: 1; min-width: 180px; width: auto; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-secondary); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Login ── */
.login-page { display: flex; min-height: 100vh; }
.login-side {
  width: 42%; color: #fff;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy) 45%, var(--magenta) 115%);
  display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 4vw, 56px);
}
.login-side img.logo { width: clamp(170px, 16vw, 240px); margin-bottom: 28px; }
.login-side h2 { font-family: 'Comfortaa', sans-serif; font-size: 22px; margin-bottom: 14px; }
.login-side ul { list-style: none; }
.login-side li { padding: 7px 0; color: rgba(255,255,255,0.8); font-size: clamp(13px, 0.95vw, 16px); display: flex; gap: 9px; align-items: center; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin-bottom: 6px; }
.login-card .sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 26px; }

/* ── Upload ── */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; cursor: pointer; background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--magenta); background: var(--magenta-light); }
.dropzone .big-icon { font-size: 40px; margin-bottom: 10px; }
.steps { display: flex; gap: 8px; margin-bottom: 22px; font-size: 13px; color: var(--text-secondary); align-items: center; }
.step { display: flex; align-items: center; gap: 7px; }
.step .num { width: 24px; height: 24px; border-radius: 50%; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.step.active .num { background: var(--magenta); color: #fff; }
.step.done .num { background: var(--green-bg); color: var(--green); }
.upload-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pdf-frame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* ── Onboarding ── */
.welcome-banner {
  background: linear-gradient(120deg, var(--navy), var(--magenta));
  color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 22px;
}
.welcome-banner h2 { font-family: 'Comfortaa', sans-serif; margin-bottom: 6px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.check-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.check-item .mark { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.check-item.done .mark { background: var(--green-bg); color: var(--green); }
.check-item.todo .mark { background: var(--gray-bg); color: var(--gray); }
.check-item.done { opacity: 0.7; }

/* ── Progress ── */
.progress { background: var(--gray-bg); border-radius: 999px; height: 6px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--navy); border-radius: 999px; transition: width 0.3s; }

/* ── Typeahead-Popover ──
   Gemeinsame Hülle für Vorschlagslisten am Cursor: @-Erwähnungen im Chat und das
   Adressbuch im Postfach-Composer. Positioniert wird per JS (fixed + Viewport-Klemmung);
   `.mp-row.active` markiert die Zeile, auf der ↑↓ gerade steht. */
/* z-index 300: MUSS über jedem Dialog liegen. Im Chat reichten 60, weil dort nichts
   darüber ist — im Postfach steckt das Adressfeld in einem Modal, und die Composer-Kulisse
   dort (.modal-bg, seiten-lokal) liegt auf 210. Mit 60 (oder auch 200) rendert die
   Vorschlagsliste unsichtbar HINTER dem Dialog: im Browser genau so gesehen. 300 ist über
   allen Dialogen und unter Lightbox (500) und Notiz-Menü (600), die zu Recht alles decken. */
.mention-pop { position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-2, 0 4px 16px rgba(0,0,0,.15)); width: 240px; max-height: 210px; overflow-y: auto; }
.mention-pop .mp-row { display: flex; align-items: center; gap: 9px; padding: 7px 11px; cursor: pointer; }
.mention-pop .mp-row:hover, .mention-pop .mp-row.active { background: var(--bg); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--gray); }
.tl-item.expired::before, .tl-item.missing::before { border-color: #c42020; }
.tl-item.due_soon::before { border-color: #d4860a; }
.tl-item .title { font-weight: 600; font-size: 14px; }
.tl-item .date { font-size: 13px; color: var(--text-secondary); }

/* ── Modal ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13,58,120,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 18px; margin-bottom: 14px; }
.hidden { display: none !important; }

/* ── Toast ── */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 14px; z-index: 200; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
#toast:empty { display: none; }  /* leeren Platzhalter ausblenden — toast() erzeugt bei Bedarf ein gefülltes Element */

/* ── Archiv ── */
.year-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.file-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; gap: 8px; }
.file-row:last-child { border-bottom: none; }
.file-row a { color: var(--navy); text-decoration: none; }
.file-row .date { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.group-header { background: var(--bg); padding: 10px 14px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }

/* ── Mobile ── */
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; flex-direction: row; overflow-x: auto; padding: 0; border-right: none; border-bottom: 1px solid var(--border); position: sticky; top: 60px; z-index: 40; height: auto; align-self: auto; overflow-y: visible; }
  .nav-section, .nav-group-head, .nav-div { display: none; }
  /* Wrapper auflösen → Nav-Items werden wieder direkte Kinder der horizontalen Leiste */
  .nav-scroll { display: contents; }
  .nav-foot { display: contents; }
  /* Gruppen auf Mobile auflösen → alle Einträge in der horizontalen Scroll-Leiste */
  .nav-group, .nav-group[hidden] { display: contents; }
  .nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; flex-shrink: 0; }
  .nav-item.active { border-bottom-color: var(--navy); border-left: none; }
  .nav-item.nav-sub { padding-left: 18px; }
  main { padding: 16px; }
  .upload-split { grid-template-columns: 1fr; }
  .pdf-frame { height: 320px; }
  .form-row { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .topbar .user .name { display: none; }
  /* Mobile: nur das Zahn-Logo (Wortmarke raus → Topbar-Icons bekommen Platz) */
  .brand-word { display: none; }
  .topbar .brand .brand-mark { display: block; height: 34px; }
  /* Responsive Raster klappen auf 1 Spalte */
  .grid-2 { grid-template-columns: minmax(0,1fr); }
}

/* ════════ Design-Standard – globale Bausteine (Batch 0) ════════ */
/* Diese Klassen sind OPT-IN: bestehende Seiten bleiben unverändert, bis sie sie nutzen. */

/* Tabellen-Feinschliff (greift auf bestehende Tabellen) */
tbody tr:hover td { background: var(--bg); }

/* Dialog-Fenster: einheitlicher Kopf / Inhalt / Fuß (nur Modals mit .modal-head) */
.modal:has(.modal-head) { padding: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2, .modal-head h3 { font-size: 17px; margin: 0; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-secondary); display: inline-flex; padding: 4px; border-radius: var(--r-sm); font-size: 18px; line-height: 1; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* Toast-Varianten (Erfolg/Fehler) */
#toast.ok { background: var(--green); }
#toast.err { background: var(--red); }

/* Schwebender LUMI-Schnellzugang (unten rechts, app-weit außer /lumi + /chat) */
#lumi-fab-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex;
  flex-direction: column; align-items: flex-end; gap: 10px; }
.lumi-fab-btn { width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--magenta)); box-shadow: 0 6px 20px rgba(13,58,120,.32);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .18s, background .18s, color .18s, opacity .18s, border-color .18s; }
.lumi-fab-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13,58,120,.4); }
.lumi-fab-btn.open { transform: scale(.95); }
/* Auf Geräten mit echtem Hover: standardmäßig dezent/durchscheinend, erst bei Mouseover farbig.
   Auf Touch (kein Hover) bleibt der Button sichtbar farbig → antippbar. */
@media (hover: hover) {
  .lumi-fab-btn { background: transparent; color: var(--navy); border: 1px solid var(--border);
    box-shadow: none; opacity: .45; }
  .lumi-fab-btn:hover, .lumi-fab-btn.open { background: linear-gradient(135deg, var(--navy), var(--magenta));
    color: #fff; border-color: transparent; opacity: 1; box-shadow: 0 10px 26px rgba(13,58,120,.4); }
}
.lumi-fab-pop { width: 320px; max-width: calc(100vw - 44px); background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 14px 40px rgba(13,58,120,.22); padding: 12px; }
.lumi-fab-pop[hidden] { display: none; }
.lfp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lfp-title { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--navy); font-size: 14px; }
.lfp-title svg { color: var(--magenta); }
.lfp-x { border: none; background: none; cursor: pointer; color: var(--text-secondary); font-size: 14px;
  line-height: 1; padding: 4px 6px; border-radius: 6px; }
.lfp-x:hover { background: var(--navy-light); color: var(--navy); }
.lfp-box { display: flex; align-items: flex-end; gap: 6px; background: #fff; border: 2px solid var(--navy);
  border-radius: 12px; padding: 6px 6px 6px 12px; }
.lfp-box:focus-within { border-color: var(--magenta); }
#lumi-fab-input { flex: 1; border: none; outline: none; resize: none; font-family: inherit; font-size: 14px;
  line-height: 1.4; max-height: 110px; padding: 5px 0; background: transparent; color: var(--text); }
.lfp-mic, .lfp-send { width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lfp-mic { background: var(--navy-light); color: var(--navy); }
.lfp-mic.recording { background: var(--red); color: #fff; }
.lfp-send { background: var(--magenta); color: #fff; }
.lfp-hint { text-align: center; font-size: 11px; color: var(--text-secondary); margin: 7px 0 1px; }
@media (max-width: 760px) {
  #lumi-fab-wrap { right: 16px; bottom: 16px; }
  .lumi-fab-btn { width: 50px; height: 50px; }
}

/* Kachel-System: Kennzahl / Navigation / Status */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); }
/* Responsive Layout-Raster — klappen auf Mobile selbst um (Seiten brauchen kein eigenes @media) */
.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--space-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 20px; }
.tnum { font-variant-numeric: tabular-nums; }
.tile-kpi, .tile-nav, .tile-status { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 15px 16px; box-shadow: var(--shadow-1); }
.tile-status { border-left: 3px solid var(--border); }
.tile-nav { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .12s; }
.tile-nav:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tile-kpi .n { font-size: var(--fs-xl); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-kpi .l { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.tile-ic { width: 36px; height: 36px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--navy-light); color: var(--navy); }
.tile-nav .t, .tile-status .t { font-size: var(--fs-md); font-weight: 500; margin-top: 9px; }
.tile-nav .s { font-size: var(--fs-sm); color: var(--text-secondary); }
/* Horizontale Hub-Kachel (Vorbild Zeit & Dienst): Icon-Chip links + Text rechts */
.tile-nav.row { display: flex; align-items: center; gap: 14px; }
.tile-nav.row .tile-ic { width: 46px; height: 46px; border-radius: 12px; }
.tile-nav.row .tbody { min-width: 0; }
.tile-nav.row .t { margin-top: 0; font-size: 16px; }

/* Listen-Zeile (Inhalt links, Meta rechts) */
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.list-row:last-child { border-bottom: none; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-meta { font-size: var(--fs-sm); color: var(--text-secondary); white-space: nowrap; }
.list-row:hover .lr-main { color: var(--navy); }

/* Fehler-Zustand (Pendant zu .empty-state) */
.error-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0; color: var(--text-secondary); font-size: var(--fs-md); text-align: center; }
.error-state .ic { color: var(--red); }

/* Lade-Skelett */
.skeleton { background: linear-gradient(90deg, var(--gray-bg) 25%, #eef0f4 37%, var(--gray-bg) 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; border-radius: var(--r-sm); height: 12px; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Such-/Filterleiste */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .grow { flex: 1; min-width: 160px; }

/* Sichtbarer Tastatur-Fokus (Barrierefreiheit) */
:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 2px; }

/* ── ZE-Terminplanung: Timeline (Karten = Termine, Verbindung = Abstand) ── */
/* Eine durchgehende Schiene hinter jeder Einheit (Karte + Verbindung); der Knoten deckt sie ab. */
.tl-unit { position: relative; }
.tl-unit:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.tl-step { display: flex; gap: var(--space-3); align-items: flex-start; }
.tl-rail { width: 30px; display: flex; justify-content: center; flex-shrink: 0; }
.tl-node { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600; background: var(--navy-light); color: var(--navy); flex-shrink: 0; }
.tl-node.grab { cursor: grab; }
.tl-node.done { background: var(--green-bg); color: var(--green); }
.tl-node.einwand { background: var(--red-bg); color: var(--red); }
.tl-body { flex: 1; min-width: 0; }
.tl-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.tl-card.open { border-color: var(--magenta); }
.tl-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tl-warn { color: var(--magenta); font-size: var(--fs-xs); margin-top: 4px; }
/* Verbindung mit Abstand-Editor zwischen zwei Terminkarten */
.tl-gap { display: flex; gap: var(--space-3); align-items: center; }
.tl-gap .tl-railcell { width: 30px; flex-shrink: 0; }   /* Spacer; Linie kommt von .tl-unit::before */
.tl-gap .tl-gapedit { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--text-secondary); padding: 6px 0; }
/* „Danach X Tage" als magenta getönte Pille — Eingabe bleibt editierbar */
.tl-gap .gap-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--magenta-light); color: var(--magenta);
  font-weight: 600; border-radius: var(--r-pill); padding: 3px 8px 3px 12px; font-size: var(--fs-sm); }
/* Zahl + Einheit auf identisches Box-Modell, damit nichts „verschoben" wirkt (auch iOS-Safari) */
.tl-gap .gap-pill input.gap-num,
.tl-gap .gap-pill select { height: 26px; box-sizing: border-box; margin: 0; font-family: inherit; font-size: var(--fs-sm);
  font-weight: 600; color: var(--magenta); line-height: 1; vertical-align: middle; }
.tl-gap .gap-pill input.gap-num { width: 46px; text-align: center; background: #fff; border: 1px solid #fff;
  border-radius: var(--r-sm); padding: 0 4px; -moz-appearance: textfield; }
.tl-gap .gap-pill select { appearance: none; -webkit-appearance: none; border: none; background-color: transparent; cursor: pointer;
  padding: 0 17px 0 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23B5176F' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 3px center; }

/* Statuskette (auch vom Schienen-Bereich genutzt) */
.flow { display: flex; align-items: center; flex-shrink: 0; }
.fseg { display: flex; align-items: center; }
.fdot { width: 11px; height: 11px; border-radius: var(--r-pill); flex-shrink: 0;
  border: 2px solid var(--border); background: #fff; box-sizing: border-box; }
.fdot.done { background: var(--navy); border-color: var(--navy); }
.fdot.cur { background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-light); }
.fdot.fin { background: var(--green); border-color: var(--green); }
.fline { width: 14px; height: 2px; background: var(--border); }
.fline.done { background: var(--navy); }

/* Pipeline-Board (ZE-Übersicht und Schienen-Fertigung) */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; } }
.board-col { min-height: 60px; }
.board-head { display: flex; justify-content: space-between; font-size: var(--fs-sm);
  color: var(--text-secondary); margin-bottom: 7px; padding: 0 2px; }
.board-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 10px; margin-bottom: 7px; text-decoration: none; color: inherit; }
.board-card:hover { border-color: var(--navy-mid, var(--navy)); }
.sortable-ghost { opacity: .45; }

/* Statuskette als klickbare Stufen (Schienen-Fertigung) */
.kette { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-pill); overflow: hidden; }
.kette button { font-size: var(--fs-sm); padding: 4px 11px; border: none; border-right: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); cursor: pointer; font-family: inherit; white-space: nowrap; }
.kette button:last-child { border-right: none; }
.kette button:hover { background: var(--bg); }
.kette button.done { background: var(--navy-light); color: var(--navy); font-weight: 600; }
.kette button.cur { background: var(--magenta); color: #fff; font-weight: 600; }

/* ── ZE-Terminplanung: Infos & Verlauf (Team / Patient / Labor / System) ── */
.vl { position: relative; }
.ve { position: relative; padding-left: 26px; padding-bottom: 9px; }
.ve:last-child { padding-bottom: 0; }
.ve:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.vd { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: var(--r-pill);
  box-sizing: border-box; border: 2px solid #fff; background: var(--gray); }
.vd.team { background: var(--navy); }
.vd.patient { background: var(--amber); }
.vd.labor { background: var(--purple); }
/* Alles in EINER Zeile: Quelle · Text · (rechts) Autor/Datum · Knöpfe. Der Text stand
   früher darunter — bei vielen Einträgen kostete das die halbe Seite, während rechts
   die Breite ungenutzt blieb. `baseline`, damit Badge, Text und Datum auf einer
   Schriftlinie sitzen. */
.vtop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vtop .vmeta { margin-left: auto; }
.vtop .vact { display: inline-flex; gap: 4px; flex-shrink: 0; align-self: center; }
/* Die Flex-BASIS ist der Kniff: kurze Texte passen daneben, der Eintrag bleibt
   einzeilig; ein langer Text passt nicht mehr, rutscht auf eine eigene Zeile und
   bekommt dort die VOLLE Breite. Mit `flex:1 1 auto` blieb er in einer schmalen Spalte
   hängen und brauchte MEHR Höhe als vorher (gemessen 118 statt 93 px) — mit Basis
   sind es 52 px. 380px statt 320px, weil der lange Text sonst im 680px breiten
   Schienen-Modal knapp inline bleibt (dort 129 → 108 px); breite Seiten sind bei
   beiden Werten gleich. */
.vtxt { flex: 1 1 380px; min-width: 0; font-size: var(--fs-md); color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.vmeta { font-size: var(--fs-xs); color: var(--text-secondary); }
.vchip { font-size: var(--fs-xs); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 1px 8px; color: var(--text-secondary); }
/* Schmal ist für eine gemeinsame Zeile kein Platz — dort der Text bewusst unter die
   Kopfzeile, sonst wickeln Text UND Autor/Datum getrennt um und der Eintrag wird höher
   als vorher (gemessen 504 statt 484 px bei 375 px Breite). */
@media (max-width: 820px) {
  .vtxt { flex: 0 0 100%; order: 9; }
}

/* Zweispaltiges Breitbild-Layout: Timeline links, mitlaufendes Panel rechts */
.tp-cols { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
.tp-aside { display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 960px) {
  .tp-cols { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
  .tp-aside { position: sticky; top: 16px; }
}

/* Kompakte Chips (Wochentage) + Implantat-Badge */
.chip.chip-sm { padding: 3px 10px; font-size: var(--fs-sm); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }

/* ════════ Persönliches Notizzettel-Board (Overlay über der App) ════════ */
/* Topbar-Symbol (spiegelt Glocke/Briefumschlag) */
.note-wrap { position: relative; display: inline-flex; margin-right: 4px; }
.note-btn { position: relative; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; color: rgba(255,255,255,0.9); }
.note-btn:hover { color: #fff; }

/* Zettel-Farben: eine Klasse remappt --nbg (Fläche) + --nfg (Akzent) auf Marke/Status-Töne */
.nc-blue   { --nbg: color-mix(in srgb, var(--navy) 22%, #fff);    --nfg: var(--navy); }     /* Blau (Navy) */
.nc-pink   { --nbg: color-mix(in srgb, var(--magenta) 22%, #fff); --nfg: var(--magenta); }  /* Magenta */
.nc-gray   { --nbg: color-mix(in srgb, var(--gray) 15%, #fff);    --nfg: var(--gray); }     /* Neutral */
.nc-white  { --nbg: #fff;                                          --nfg: var(--gray); }     /* Weiß */
/* Legacy (v1): Gelb/Grün/Lila auf die neue Palette abbilden, damit Bestandsnotizen nicht brechen */
.nc-yellow { --nbg: #fff;                --nfg: var(--gray); }
.nc-green  { --nbg: var(--gray-bg);      --nfg: var(--gray); }
.nc-purple { --nbg: var(--gray-bg);      --nfg: var(--gray); }

/* Frosted-Overlay: App scheint durch, Zettel im Fokus */
.notes-overlay {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column;
  background: rgba(13,25,48,0.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
body.notes-open { overflow: hidden; }
.notes-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.notes-bar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.notes-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; }
.notes-private { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--green); background: var(--green-bg); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.notes-bar-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Suche ist das dehn-/schrumpfbare Element; Umschalter/Steuerungen bleiben voll → kein Clipping */
#notes-search { flex: 1 1 130px; }
.notes-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: none; }
.notes-seg button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; background: #fff; border: none; cursor: pointer; color: var(--text-secondary); font-family: inherit; white-space: nowrap; }
.notes-seg button.on { background: var(--navy); color: #fff; }
.notes-showdone { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; line-height: 1; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.notes-showdone .switch { flex: none; }
.notes-add { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: none; background: var(--magenta); color: #fff; cursor: pointer; font-family: inherit; white-space: nowrap; }
.notes-add:hover { filter: brightness(0.96); }
.notes-close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-secondary); cursor: pointer; }
.notes-close:hover { background: var(--bg); }
.notes-scroll { flex: 1; overflow: auto; position: relative; padding: 18px; }

/* Board-Bühne: Zettel absolut in % positioniert (gerätesicher) */
.notes-stage { position: relative; width: 100%; min-height: 100%; }
.note-card {
  position: absolute; box-sizing: border-box; width: 220px; height: 220px;
  background: var(--nbg, var(--amber-bg)); color: var(--text);
  border: 1px solid rgba(13,58,120,0.07); border-radius: 12px; box-shadow: var(--shadow-3);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 5px;
}
.note-card.sz-s { width: 170px; height: 170px; }
.note-card.sz-m { width: 220px; height: 220px; }
.note-card.sz-l { width: 290px; height: 290px; }
.note-card.collapsed { height: auto; padding: 5px 8px; }
.note-card .note-text { flex: 1; overflow: auto; }
.note-bar { display: flex; align-items: center; gap: 6px; }
.note-title { flex: 1; min-width: 0; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-card.dragging { box-shadow: 0 16px 36px rgba(13,58,120,0.30); }
.note-top { display: flex; align-items: center; justify-content: space-between; }
.note-drag { display: inline-flex; background: none; border: none; cursor: grab; color: var(--nfg); opacity: 0.65; padding: 2px; touch-action: none; }
.note-drag:active { cursor: grabbing; }
.note-top-r { display: inline-flex; align-items: center; gap: 2px; }
.note-ic { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--nfg); opacity: 0.75; padding: 3px; border-radius: 6px; }
.note-ic:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.note-ic.on { opacity: 1; background: rgba(0,0,0,0.10); }
.note-text { border: none; background: transparent; resize: none; width: 100%; font-family: inherit; font-size: 13px; line-height: 1.5; color: var(--text); outline: none; }
.note-text::placeholder { color: var(--text-secondary); opacity: 0.7; }
.note-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.note-donebtn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--nfg); background: transparent; color: var(--nfg); cursor: pointer; font-family: inherit; opacity: 0.9; }
.note-donebtn:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.note-donebtn.is-done { background: var(--nfg); color: #fff; border-color: var(--nfg); }
.note-due { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-weight: 600; white-space: nowrap; }
.note-due.over { background: var(--red-bg); color: var(--red); }
.note-taken { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--navy-light); color: var(--navy); font-weight: 600; white-space: nowrap; }

/* Listen-Ansicht (auch die Mobil-Sicht) */
.notes-listwrap { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin: 0 auto; }
.note-row { display: flex; align-items: flex-start; gap: 10px; background: var(--nbg, #fff); border-radius: 10px; border-left: 4px solid var(--nfg); padding: 8px 10px; box-shadow: var(--shadow-1); }
.note-row .note-text { min-height: 40px; }
.note-row-r { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.notes-empty { max-width: 440px; margin: 9vh auto; text-align: center; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.notes-empty p { font-size: 14px; margin: 0; }

/* Popover: Farbe · Frist · Übernehmen */
.note-menu { position: fixed; z-index: 600; width: 244px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-3); padding: 8px; display: none; }
.nm-sec { padding: 8px 6px; border-bottom: 1px solid var(--bg); }
.nm-sec:last-child { border-bottom: none; }
.nm-colors { display: flex; gap: 8px; }
.nm-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--nbg); border: 2px solid var(--border); cursor: pointer; padding: 0; }
.nm-dot.on { border-color: var(--nfg); }
.nm-lbl { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.02em; margin-bottom: 6px; display: block; }
.nm-row { display: flex; align-items: center; gap: 6px; }
.nm-due { flex: 1; font-size: 13px; }
.nm-clear { display: inline-flex; align-items: center; background: none; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--text-secondary); padding: 5px; }
.nm-take { display: flex; flex-direction: column; gap: 6px; }
.nm-take button { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text); font-family: inherit; text-align: left; }
.nm-take button:hover { background: var(--bg); }
.nm-sizes { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.nm-sz { flex: 1; padding: 6px 0; background: #fff; border: none; border-left: 1px solid var(--border); cursor: pointer; font-family: inherit; font-size: 13px; color: var(--text-secondary); }
.nm-sz:first-child { border-left: none; }
.nm-sz.on { background: var(--navy); color: #fff; }
.nm-actions { display: flex; flex-direction: column; gap: 6px; }
.nm-act { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text); font-family: inherit; text-align: left; }
.nm-act:hover { background: var(--bg); }

/* Übernehmen-Dialog (im Board, über den Karten) */
.note-take-modal { position: fixed; inset: 0; z-index: 700; display: none; align-items: center; justify-content: center; background: rgba(13,25,48,0.35); padding: 20px; }
.note-take-modal .ntk-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow-3); width: 480px; max-width: 96vw; padding: 20px 22px; max-height: 90vh; overflow-y: auto; }
.note-take-modal h3 { margin: 0 0 14px; font-size: 16px; }
.note-take-modal .ntk-f { margin-bottom: 12px; }
.note-take-modal .ntk-f label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); }
.note-take-modal .ntk-f .input { width: 100%; }
.note-take-modal .ntk-desc { min-height: 64px; resize: vertical; }
.note-take-modal .ntk-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

@media (max-width: 767px) {
  .notes-bar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .notes-bar-r { flex-wrap: wrap; gap: 8px 10px; width: 100%; justify-content: flex-end; }
  #notes-search { flex-basis: 100%; }    /* Suche eigene Zeile, volle Breite */
  .notes-private { display: none; }       /* Deko-Pille spart Platz */
  .notes-seg { display: none; }          /* mobil immer Liste */
  .notes-title { font-size: 15px; }
  .notes-scroll { padding: 12px; }
}

/* ── Topbar-Suche (Command-Palette-Auslöser) ──────────────────────────────────── */
/* Desktop: zentral in der Topbar, breit & dezent (ruhige Such-Leiste). Die .topbar ist
   position:sticky = Positionierungs-Kontext → .search-wrap wird absolut zentriert (aus
   dem Fluss, unabhängig von Brand-/Icon-Cluster). Mobil bleibt es das kompakte Icon. */
.topbar .search-wrap {
  display: flex; align-items: center;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.search-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px;
  width: clamp(260px, 34vw, 440px); justify-content: flex-start;
  border-radius: var(--r-pill); background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.72); cursor: pointer;
  font-size: 13px; font-family: inherit; transition: background .12s ease, border-color .12s ease;
}
.search-btn:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.9); }
.search-btn .ic { color: rgba(255,255,255,.6); }
.search-btn:hover .ic { color: rgba(255,255,255,.85); }
.search-btn .search-hint { font-weight: 500; }
.search-btn .search-kbd {
  margin-left: auto; font-family: inherit; font-size: 11px; background: rgba(255,255,255,.12);
  border-radius: 5px; padding: 2px 6px; letter-spacing: .3px; color: rgba(255,255,255,.75);
}

/* ── Einstellungs-Sektions-Leiste (unter der Topbar, außerhalb <main>) ─────────── */
.settings-subbar { background: #fff; border-bottom: 1px solid var(--border); }
.settings-subbar-inner { display: flex; align-items: center; gap: 14px; padding: 9px 20px; }
.settings-subbar-lead {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-weight: 700; font-size: 13px; color: var(--navy);
}
.settings-subbar-lead .ic { color: var(--magenta); }
.settings-tabs { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--text-secondary); text-decoration: none; border: 1px solid transparent;
  transition: background .12s ease, color .12s ease;
}
.settings-tab .ic { color: var(--text-secondary); }
.settings-tab:hover { background: var(--bg); color: var(--navy); }
.settings-tab:hover .ic { color: var(--navy); }
.settings-tab.active { background: var(--navy); color: #fff; }
.settings-tab.active .ic { color: #fff; }

/* ── Einstellungsseiten-Standard (global; siehe DESIGN.md §5) ───────────────────
   Einheitliche Kopf-/Feld-/Speichern-Bausteine + kompaktes, mehrspaltiges Karten-
   Raster (Desktop), damit Kacheln nicht unnötig breit sind. */
.sec-head { font-size: 16px; font-weight: 600; color: var(--navy); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.sec-head [data-icon], .sec-head svg { color: var(--navy); }
.sec-sub { font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 22px; }
.field-grid > .full { grid-column: 1 / -1; }
.cfg-field { margin-bottom: 14px; max-width: 460px; }
.field-grid .cfg-field { max-width: none; }
.cfg-field > label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.cfg-field input, .cfg-field select, .cfg-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text); }
.cfg-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.45; }
.save-row { display: flex; justify-content: flex-end; margin-top: 12px; }
/* Dichte + Harmonie: gleichmäßig breite, höhenflexible Kacheln (Standardbreite), die die volle
   Seitenbreite füllen; nur inhaltlich breite Karten .wide (2 Spalten) bzw. .full (volle Breite). */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 360px)); justify-content: start; gap: 16px; align-items: start; margin-bottom: 16px; }
.settings-grid > .full { grid-column: 1 / -1; }
.settings-grid > .wide { grid-column: span 2; }
@media (max-width: 720px) { .settings-grid > .wide { grid-column: 1 / -1; } }
.settings-grid > .card { margin-bottom: 0; padding: 15px 16px; }
/* Reiter (Unterstrich) — global, damit jede Einstellungsseite dieselben Reiter nutzt */
.tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; margin: 4px 0 18px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { height: 0; }
.tab-btn { background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; padding: 9px 6px; font-size: 14px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
/* Speichern-Button: erst farbig, wenn sich etwas geändert hat (dirty); sonst grau/inaktiv */
.btn-save { background: var(--magenta); color: #fff; border-color: transparent; }
.btn-save:hover:not(:disabled) { background: #7d0153; }
.btn-save:disabled { background: #eef0f3; color: var(--text-secondary); border-color: var(--border); cursor: default; opacity: 1; }

/* ── Command-Palette (⌘K) ─────────────────────────────────────────────────────── */
.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 1000; background: rgba(13,25,48,.42);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
}
.cmdk-panel {
  width: 100%; max-width: 600px; max-height: 70vh; background: #fff;
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden;
  display: flex; flex-direction: column;
  animation: cmdk-in .14s var(--ease-out, cubic-bezier(.23,1,.32,1));
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.cmdk-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmdk-input-row .ic { color: var(--text-secondary); flex-shrink: 0; }
#cmdk-input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; color: var(--text); font-family: inherit; }
.cmdk-esc { font-size: 11px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; }
.cmdk-results { overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); padding: 8px 10px 4px; }
.cmdk-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: none; background: transparent; border-radius: 8px; cursor: pointer;
  text-align: left; font-size: 14px; color: var(--text); font-family: inherit;
}
.cmdk-item .cmdk-ic { display: inline-flex; color: var(--navy); flex-shrink: 0; }
.cmdk-item .cmdk-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .cmdk-path { font-size: 11px; color: var(--text-secondary); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; flex-shrink: 0; }
.cmdk-item .cmdk-sub { font-size: 11.5px; color: var(--text-secondary); flex-shrink: 0; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item.active { background: var(--navy); color: #fff; }
.cmdk-item.active .cmdk-ic, .cmdk-item.active .cmdk-path, .cmdk-item.active .cmdk-sub { color: rgba(255,255,255,.85); }
.cmdk-searching { display: flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 12px; color: var(--text-secondary); }
.cmdk-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px; color: var(--text-secondary); }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-secondary); }
.cmdk-foot kbd { font-family: inherit; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; margin-right: 3px; }
@media (prefers-reduced-motion: reduce) { .cmdk-panel { animation: none; } .search-btn, .settings-tab { transition: none; } }

@media (max-width: 760px) {
  .topbar .search-wrap { position: static; transform: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; background: transparent; border: none; }
  .search-btn .search-hint, .search-btn .search-kbd { display: none; }
  .settings-subbar-inner { padding: 8px 12px; gap: 8px; }
  .settings-subbar-lead span { display: none; }
  .cmdk-backdrop { padding: 8vh 10px 10px; }
  .cmdk-foot { display: none; }
  /* Topbar-Dropdowns: fest unter der Topbar über die volle Breite einblenden
     (nicht am einzelnen Icon verankert) → nie am Bildschirmrand abgeschnitten */
  .bell-menu, .task-menu, .mail-menu, .account-menu {
    position: fixed; top: 66px; right: 8px; left: 8px; width: auto; max-width: none;
  }
}

/* Auswahlleiste für Mehrfachauswahl — genutzt von Team-Verwaltung und Postfach.
   Zweiter Nutzer ⇒ zentral, sonst laufen zwei Kopien auseinander (wie damals beim .switch). */
.bulk-bar { display:flex; align-items:center; gap:12px; background:var(--navy); color:#fff; padding:10px 16px; border-radius:var(--radius); margin-bottom:14px; }
.bulk-bar .spacer { flex:1; }
.bulk-bar .btn { background:transparent; border-color:rgba(255,255,255,.5); color:#fff; }
.bulk-bar .btn:hover { background:rgba(255,255,255,.15); }
.bulk-bar .btn.btn-primary { background:var(--magenta); border-color:var(--magenta); }
.bulk-bar .btn.btn-primary:hover { background:#7d0153; }

/* Persönliches Merken-Fähnchen (Stern) — Mitteilungen, Aufgaben-Hub, Postfach.
   Lag zweimal seitenlokal kopiert und beide Male mit hartem Hex (#f59e0b); der dritte
   Abnehmer war der Anlass, es hierher zu ziehen. Farbe jetzt über die Tokens. */
.fav-star { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border:none; background:none; cursor:pointer; color:var(--text-secondary); opacity:.45; padding:0; flex:none; align-self:center; }
.fav-star:hover { opacity:.9; }
.fav-star.on { opacity:1; color:var(--amber); }
.fav-star.on .ic { fill:var(--amber); }
