/* Fahrer-Plan v2 — Port aus .planning/sketches/011-fahrer-redesign.
   Alle Klassen .fp-* praefixiert, keine Kollision mit styles.css.
   Aktiv nur wenn body.lp-fahrerv2-on gesetzt ist (stage-gated via app.js).
   Tagesablauf-Modal wird NICHT hier definiert — wir reusen openTimelineModal
   aus app.js (Details/Fotos/Pruefung-Tabs bleiben so erhalten).
*/

/* ===== Sichtbarkeits-Schalter =====
   Wenn v2 an ist UND die Dienstplan-Sektion (eingabe) gerade aktiv ist:
     - alte tab-bar weg (die fp-tabs uebernehmen Tab-Wechsel)
     - alte toolbar + dutiesContainer weg (die zeigt v2 jetzt)
   Auf anderen Tabs (Katalog/Statistik/...) bleibt die alte tab-bar sichtbar,
   damit der User wieder zurueckkommt. :has() ist in PWA-relevanten Browsern
   (iOS Safari 15.4+, Chrome 105+) verfuegbar. */
/* hidden-Attribut greift natuerlich; brauchen keinen expliziten display:block,
   damit das Media-Query-Grid (Tablet-Split) hoehere Spezifitaet bekommt. */
body.lp-fahrerv2-on #tab-eingabe > .toolbar,
body.lp-fahrerv2-on #tab-eingabe > #dutiesContainer { display: none; }
/* Alte top-level Hero-Karte (LinienPilot-Brand + "Kein Dienstplan geladen")
   weicht der v2-Topbar/Greeting. */
body.lp-fahrerv2-on .hero { display: none; }
/* Alte Tab-Navigation NUR ausblenden, wenn der Dienstplan-Tab aktiv ist —
   so kommt der User von anderen Tabs (Katalog/Statistik/...) wieder zurueck.
   .tabs ist die echte Klasse (nicht .tab-bar). */
body.lp-fahrerv2-on:has(#tab-eingabe:not(.hidden)) nav.tabs { display: none; }
/* Vollflaechiger v2-Hintergrund: In v2 bekommt der <body> dieselbe Creme-Farbe
   wie #fahrerPlanV2Root (--fp-bg). Sonst scheint in den Randzonen — Safe-Area-
   Insets (Notch/Home-Indicator) und .app-Gutter (padding:24px) — der helle
   Body-Verlauf durch und erzeugt einen weissen Rahmen aussen herum.
   Literal-Wert, weil --fp-* nur auf #fahrerPlanV2Root gescopt sind. */
body.lp-fahrerv2-on { background: #fbf7ee; }

/* Auth-Leiste im v2: helleres Navy (#0f172a statt #020617) + echte volle Breite.
   Die .auth-bar saesse sonst im .app-Gutter (24px Desktop / 14px mobil) mit nur oben
   gerundeten Ecken -> wirkt wie geclippt. Hier brechen wir aus .app-Padding + body-
   Safe-Area aus (negative Margins) und geben die Safe-Area als Innen-Padding zurueck,
   sodass der Inhalt nicht unter Notch/Insets rutscht. border-radius:0 = saubere Kante. */
body.lp-fahrerv2-on .auth-bar {
  background: #0f172a;
  border-radius: 0;
  margin-top:   calc(-24px - env(safe-area-inset-top));
  margin-left:  calc(-24px - env(safe-area-inset-left));
  margin-right: calc(-24px - env(safe-area-inset-right));
  padding: calc(0.55rem + env(safe-area-inset-top))
           calc(1.4rem + env(safe-area-inset-right))
           0.55rem
           calc(1.4rem + env(safe-area-inset-left));
}
@media (max-width: 640px) {
  body.lp-fahrerv2-on .auth-bar {
    margin-top:   calc(-14px - env(safe-area-inset-top));
    margin-left:  calc(-14px - env(safe-area-inset-left));
    margin-right: calc(-14px - env(safe-area-inset-right));
    padding: calc(0.5rem + env(safe-area-inset-top))
             calc(0.9rem + env(safe-area-inset-right))
             0.5rem
             calc(0.9rem + env(safe-area-inset-left));
  }
}

/* ===== Farbpalette (Graphite + warmes Cream) =====
   Identisch zum Sketch. Status-Farben sind semantisch und nicht ueberschrieben. */
#fahrerPlanV2Root {
  --fp-bg: #fbf7ee;
  --fp-surface: #ffffff;
  --fp-surface-2: #f7f3ea;
  --fp-border: #e7e1d3;
  --fp-divider: #efeadc;
  --fp-text: #0f172a;
  --fp-text-2: #475569;
  --fp-text-muted: #94a3b8;

  --fp-brand-dark: #0f172a;
  --fp-brand-teal: #0891b2;
  --fp-brand-blue: #2563eb;

  --fp-status-ok:   #10b981;
  --fp-status-warn: #f59e0b;
  --fp-status-err:  #ef4444;
  --fp-status-off:  #94a3b8;

  --fp-hero-blue-1: #2256d8;
  --fp-hero-blue-2: #1c40a8;
  --fp-hero-amber-1:#f59e0b;
  --fp-hero-amber-2:#b45309;
  --fp-hero-green-1:#10b981;
  --fp-hero-green-2:#047857;
  --fp-hero-pastel-1:#67a3f5;
  --fp-hero-pastel-2:#3b82f6;
  --fp-hero-grey-1: #64748b;
  --fp-hero-grey-2: #334155;

  background: var(--fp-bg);
  color: var(--fp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: block;
}

#fahrerPlanV2Root, #fahrerPlanV2Root * { box-sizing: border-box; }

/* ===== Top-Bar (Wordmark + Sync-Dot) ===== */
.fp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px 4px;
}
.fp-mark { display: inline-flex; align-items: center; gap: 8px; }
.fp-mark-shield {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--fp-brand-dark), #1f2937);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.fp-wordmark { font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--fp-brand-dark); }
.fp-wordmark-pilot {
  background: linear-gradient(90deg, var(--fp-brand-blue), var(--fp-brand-teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fp-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fp-text-2); font-weight: 500; }
.fp-sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fp-status-ok); box-shadow: 0 0 0 3px rgba(16,185,129,.18);
}
.fp-sync[data-state="saving"] .fp-sync-dot { background: var(--fp-status-warn); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.fp-sync[data-state="offline"] .fp-sync-dot { background: var(--fp-status-off); box-shadow: 0 0 0 3px rgba(148,163,184,.18); }
.fp-sync[data-state="idle"] .fp-sync-dot { background: var(--fp-status-off); box-shadow: 0 0 0 3px rgba(148,163,184,.18); }

/* ===== Tab-Strip ===== */
.fp-tabs {
  display: flex; gap: 4px; padding: 6px 14px 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.fp-tabs::-webkit-scrollbar { display: none; }
.fp-tab {
  flex-shrink: 0; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: transparent; color: var(--fp-text-2);
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  font-family: inherit;
}
.fp-tab.is-active {
  background: var(--fp-surface); color: var(--fp-brand-dark);
  border-color: var(--fp-border); box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.fp-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--fp-status-err); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.fp-tab-badge[hidden] { display: none; }

/* ===== Greeting + Avatar ===== */
.fp-greeting { padding: 10px 22px 14px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.fp-greet-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--fp-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fp-greet-wave { font-size: 24px; }
.fp-greet-sub { font-size: 13px; color: var(--fp-text-2); margin-top: 3px; font-weight: 500; }
.fp-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--fp-surface); border: 1px solid var(--fp-border);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--fp-brand-dark); font-size: 17px; letter-spacing: -.01em;
}

/* ===== HEUTE-Hero — State-Machine =====
   Basis-Karte + Modifier (.is-dienst/urlaub/feiertag/ferien/frei). */
.fp-hero {
  margin: 4px 18px 12px;
  border-radius: 22px; padding: 16px 18px 18px;
  color: #fff; position: relative; overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.fp-hero[data-clickable="true"] { cursor: pointer; }
.fp-hero[data-clickable="true"]:hover { transform: translateY(-1px); }
.fp-hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.04);
}

.fp-hero.is-dienst {
  background: linear-gradient(180deg, var(--fp-hero-blue-1) 0%, var(--fp-hero-blue-2) 100%);
  box-shadow: 0 20px 35px -22px rgba(28,64,168,.55), 0 6px 14px -8px rgba(28,64,168,.5);
}
.fp-hero.is-urlaub {
  background: linear-gradient(180deg, var(--fp-hero-amber-1) 0%, var(--fp-hero-amber-2) 100%);
  box-shadow: 0 20px 35px -22px rgba(180,83,9,.55), 0 6px 14px -8px rgba(180,83,9,.5);
}
.fp-hero.is-feiertag {
  background: linear-gradient(180deg, var(--fp-hero-green-1) 0%, var(--fp-hero-green-2) 100%);
  box-shadow: 0 20px 35px -22px rgba(4,120,87,.55), 0 6px 14px -8px rgba(4,120,87,.5);
}
.fp-hero.is-ferien {
  background: linear-gradient(180deg, var(--fp-hero-pastel-1) 0%, var(--fp-hero-pastel-2) 100%);
  box-shadow: 0 20px 35px -22px rgba(59,130,246,.45), 0 6px 14px -8px rgba(59,130,246,.4);
}
.fp-hero.is-frei {
  background: linear-gradient(180deg, var(--fp-hero-grey-1) 0%, var(--fp-hero-grey-2) 100%);
  color: #f8fafc;
  box-shadow: 0 16px 28px -20px rgba(15,23,42,.4), 0 4px 10px -6px rgba(15,23,42,.3);
}

.fp-hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; position: relative; z-index: 1; }
.fp-hero-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.fp-hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.fp-hero-line { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; position: relative; z-index: 1; }
.fp-hero-line .fp-arr { color: rgba(255,255,255,.6); margin: 0 4px; font-weight: 500; }
/* Herkunfts-Zeile fuer vom Disponent gepushte Dienste (source:"einsatzplan") */
.fp-hero-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: -6px 0 14px; position: relative; z-index: 1; }
.fp-hero-src-tag {
  display: inline-flex; align-items: center; background: rgba(255,255,255,.18);
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .01em; backdrop-filter: blur(4px);
}
.fp-hero-src-meta { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.82); }
.fp-hero-times {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 8px; padding: 6px 0 14px;
  position: relative; z-index: 1;
}
.fp-hero-time-block { display: grid; gap: 2px; }
.fp-hero-time-block.end { text-align: right; }
.fp-hero-time-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.7); letter-spacing: .04em; text-transform: uppercase; }
.fp-hero-time-val { font-size: 38px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.fp-hero-arrow { font-size: 22px; color: rgba(255,255,255,.5); padding: 0 4px 14px; align-self: center; }
.fp-hero-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13px; position: relative; z-index: 1;
}
.fp-hero-foot-meta { color: rgba(255,255,255,.92); font-weight: 600; flex: 1; min-width: 0; }
.fp-hero-foot-cta { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Status-Hero (Urlaub/Feiertag/Ferien/Frei) — kein Times-Grid, eigene Detail-Zeile */
.fp-hero-status-body {
  padding: 4px 0 14px; position: relative; z-index: 1;
  display: grid; gap: 6px;
}
.fp-hero-status-main { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.fp-hero-status-sub  { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.88); }

/* Status-Chips: zeigen Feiertag/Urlaub/Ferien auch dann, wenn der Tag durch
   einen Dienst belegt ist (sonst gewinnt der Dienst und die Info verschwindet).
   Leben im Hero (innerhalb #fahrerPlanV2Root) -> CSS-Vars loesen sauber auf. */
.fp-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; position: relative; z-index: 1; }
.fp-hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); color: #fff;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.fp-hero-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.fp-hero-chip[data-kind="urlaub"]   .fp-hero-chip-dot { background: var(--fp-hero-amber-1); }
.fp-hero-chip[data-kind="feiertag"] .fp-hero-chip-dot { background: var(--fp-status-ok); }
.fp-hero-chip[data-kind="ferien"]   .fp-hero-chip-dot { background: var(--fp-hero-pastel-2); }

/* ===== Sektion-Header ===== */
.fp-section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 22px 8px; gap: 8px; }
.fp-section-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fp-text-muted); }
.fp-section-aside { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--fp-text-muted); text-align: right; }
.fp-section-aside strong { color: var(--fp-text-2); font-weight: 700; }

/* ===== Eingebettete Read-Views (Schwarzes Brett / Rote Mappe / Statistik) =====
   Hosten die UNVERAENDERTEN app.js-Render-Funktionen mit ihren GLOBALEN Klassen
   (.sb-*/.rm-*/.settings-group/.stat-*/.kpi-*). Hier nur die Randabstaende, damit
   sie sauber im v2-Cream-Layout sitzen; das Innenleben bringen die Klassen mit. */
.fp-sbhost, .fp-rmhost, .fp-statshost { padding: 4px 18px 24px; }

/* ===== Wochenstreifen (Mo–So Pillen) ===== */
.fp-weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 4px 18px 4px; }
.fp-day {
  background: var(--fp-surface); border: 1px solid var(--fp-border);
  border-radius: 14px; padding: 8px 0 9px;
  display: grid; gap: 3px; justify-items: center;
  cursor: pointer;
  transition: transform 100ms ease, border-color 100ms ease, background 100ms ease;
  position: relative; font-variant-numeric: tabular-nums; font-family: inherit;
}
.fp-day-wd { font-size: 10px; font-weight: 600; color: var(--fp-text-muted); letter-spacing: .04em; }
.fp-day-num { font-size: 17px; font-weight: 700; color: var(--fp-text); letter-spacing: -.01em; }
.fp-day-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; margin-top: 2px; }
.fp-day[data-state="dienst"] .fp-day-dot { background: var(--fp-brand-blue); }
.fp-day[data-state="urlaub"] .fp-day-dot { background: var(--fp-hero-amber-1); }
.fp-day[data-state="feiertag"] .fp-day-dot { background: var(--fp-status-ok); }
.fp-day[data-state="ferien"] .fp-day-dot { background: var(--fp-hero-pastel-2); }
/* Eck-Marker: Dienst-Tag, der zugleich Feiertag/Urlaub/Ferien ist. */
.fp-day-extra {
  position: absolute; top: 5px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--fp-surface);
}
.fp-day-extra[data-kind="urlaub"]   { background: var(--fp-hero-amber-1); }
.fp-day-extra[data-kind="feiertag"] { background: var(--fp-status-ok); }
.fp-day-extra[data-kind="ferien"]   { background: var(--fp-hero-pastel-2); }
/* Roter Punkt: an diesem Tag wurde ein noch ungesehener Dienst gepusht.
   Links oben, damit er nicht mit dem Feiertag/Urlaub-Eck-Marker (rechts) kollidiert. */
.fp-day-new {
  position: absolute; top: 5px; left: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fp-status-err);
  box-shadow: 0 0 0 1.5px var(--fp-surface);
  animation: fp-new-pulse 1.8s ease-in-out infinite;
}
.fp-day.is-selected .fp-day-new { box-shadow: 0 0 0 1.5px var(--fp-hero-blue-2); }
@keyframes fp-new-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: .72; }
}
/* Gleicher Punkt in der Naechste-Woche-Liste: Ecke der Datums-Spalte. */
.fp-next-date { position: relative; }
.fp-next-date .fp-day-new { top: -3px; left: auto; right: -3px; }
.fp-day.is-selected {
  background: linear-gradient(180deg, var(--fp-hero-blue-1), var(--fp-hero-blue-2));
  border-color: transparent; box-shadow: 0 10px 18px -10px rgba(28,64,168,.55);
}
.fp-day.is-selected .fp-day-wd { color: rgba(255,255,255,.78); }
.fp-day.is-selected .fp-day-num { color: #fff; }
.fp-day.is-selected .fp-day-dot { background: rgba(255,255,255,.95); width: 6px; height: 6px; }
.fp-day.is-today:not(.is-selected) { border-color: var(--fp-brand-blue); border-width: 1.5px; }
.fp-day:not(.is-selected):hover { transform: translateY(-1px); border-color: #cbc6b3; }

/* ===== Naechste-Woche-Liste ===== */
.fp-next-list { display: grid; gap: 8px; padding: 4px 18px 6px; }
.fp-next-row {
  background: var(--fp-surface); border: 1px solid var(--fp-border);
  border-radius: 16px; padding: 12px 14px;
  display: grid; grid-template-columns: 50px 1fr auto;
  align-items: center; gap: 12px; cursor: pointer;
  transition: transform 100ms ease, border-color 100ms ease;
}
.fp-next-row:hover { transform: translateY(-1px); border-color: #cbc6b3; }
.fp-next-date { text-align: center; font-variant-numeric: tabular-nums; }
.fp-next-wd { font-size: 10px; font-weight: 700; color: var(--fp-text-muted); letter-spacing: .06em; text-transform: uppercase; }
.fp-next-day { font-size: 22px; font-weight: 700; color: var(--fp-text); letter-spacing: -.02em; line-height: 1; }
.fp-next-main { display: grid; gap: 3px; min-width: 0; }
.fp-next-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fp-next-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(34,86,216,.1); color: var(--fp-brand-blue);
  font-size: 12px; font-weight: 700; letter-spacing: -.01em;
}
.fp-next-pill[data-kind="urlaub"]   { background: rgba(245,158,11,.15); color: #b45309; }
.fp-next-pill[data-kind="feiertag"] { background: rgba(16,185,129,.15); color: #047857; }
.fp-next-pill[data-kind="ferien"]   { background: rgba(99,162,246,.18); color: #1d4ed8; }
.fp-next-time { font-size: 14px; font-weight: 600; color: var(--fp-text); font-variant-numeric: tabular-nums; }
.fp-next-linie { font-size: 12px; color: var(--fp-text-2); font-weight: 500; }
.fp-next-chev { color: var(--fp-text-muted); font-size: 18px; }
.fp-next-empty {
  background: var(--fp-surface-2); border: 1px dashed var(--fp-border);
  border-radius: 14px; padding: 14px; text-align: center;
  font-size: 13px; color: var(--fp-text-2);
}

/* ===== Monatsraster ===== */
.fp-month { margin: 4px 18px 4px; background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: 18px; padding: 14px 16px 12px; }
.fp-month-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.fp-month-title { font-size: 14px; font-weight: 700; color: var(--fp-text); }
.fp-month-aside { font-size: 11px; font-weight: 600; color: var(--fp-text-muted); }
.fp-month-aside strong { color: var(--fp-text-2); }
.fp-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-variant-numeric: tabular-nums; }
.fp-month-wd {
  font-size: 9px; font-weight: 700; color: var(--fp-text-muted);
  text-align: center; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 0 2px;
}
.fp-month-cell {
  aspect-ratio: 1; display: grid; justify-items: center; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--fp-text);
  padding-top: 4px; position: relative; cursor: pointer; border-radius: 8px;
  background: var(--fp-surface-2);
}
.fp-month-cell:empty { background: transparent; cursor: default; }
.fp-month-cell.weekend { color: var(--fp-text-muted); }
.fp-month-cell.today { background: var(--fp-brand-blue); color: #fff; }
.fp-month-cell .fp-mdot { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--fp-brand-blue); margin-top: 1px; }
.fp-month-cell[data-state="urlaub"]   .fp-mdot { background: var(--fp-hero-amber-1); }
.fp-month-cell[data-state="feiertag"] .fp-mdot { background: var(--fp-status-ok); }
.fp-month-cell[data-state="ferien"]   .fp-mdot { background: var(--fp-hero-pastel-2); }
.fp-month-cell.today .fp-mdot { background: #fff; }
/* Eck-Marker: Dienst-Tag, der zugleich Feiertag/Urlaub/Ferien ist. */
.fp-mcell-extra {
  position: absolute; top: 3px; right: 3px;
  width: 5px; height: 5px; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--fp-surface);
}
.fp-mcell-extra[data-kind="urlaub"]   { background: var(--fp-hero-amber-1); }
.fp-mcell-extra[data-kind="feiertag"] { background: var(--fp-status-ok); }
.fp-mcell-extra[data-kind="ferien"]   { background: var(--fp-hero-pastel-2); }

/* ===== Archiv-Band ===== */
.fp-archive {
  margin: 10px 18px 16px;
  background: var(--fp-surface-2); border: 1px dashed #d9d2bf;
  border-radius: 14px; padding: 12px 16px;
  text-align: center; font-size: 13px; color: var(--fp-text-2); cursor: pointer;
}
.fp-archive strong { color: var(--fp-brand-dark); font-weight: 600; }

/* ===== Mehr-Sheet (Bottom-Sheet) =====
   WICHTIG: Dieses Sheet wird per JS an document.body gehaengt — also AUSSERHALB
   von #fahrerPlanV2Root. Die --fp-* Palette lebt aber NUR auf diesem Root, und
   CSS-Variablen vererben sich nicht nach aussen. Darum hier bewusst LITERALE
   Werte (sonst loest var(--fp-surface) zu leer auf → transparentes Panel). */
.fp-sheet-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}
.fp-sheet-backdrop.is-open { opacity: 1; visibility: visible; }
.fp-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9001;
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 80%; overflow-y: auto;
  font-family: inherit; color: #0f172a;
  box-shadow: 0 -1px 0 rgba(15,23,42,.05), 0 -22px 50px -26px rgba(15,23,42,.45);
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(.32,.72,0,1);
}
.fp-sheet.is-open { transform: translateY(0); }
.fp-sheet-handle {
  width: 40px; height: 4px; border-radius: 999px;
  background: #d6dae2; margin: 8px auto 14px;
}
.fp-sheet-title {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #64748b;
  margin: 0 6px 6px;
}
.fp-sheet-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 13px 10px; margin: 2px 0;
  border: 0; border-radius: 14px;
  background: transparent; cursor: pointer;
  text-align: left; font-family: inherit; color: #0f172a;
  transition: background 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
.fp-sheet-item:hover  { background: #f3f5f9; }
.fp-sheet-item:active { background: #e9edf3; }
.fp-sheet-icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2f7; font-size: 19px;
}
.fp-sheet-icon.red   { background: #fdecec; color: #b91c1c; }
.fp-sheet-icon.blue  { background: #e6edff; color: #2563eb; }
.fp-sheet-icon.gray  { background: #eef2f7; color: #475569; }
.fp-sheet-icon.amber { background: #fef3c7; color: #b45309; }
.fp-sheet-icon.teal  { background: #cffafe; color: #0e7490; }
.fp-sheet-body { flex: 1; min-width: 0; }
.fp-sheet-name { font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.25; }
.fp-sheet-desc { font-size: 12.5px; color: #64748b; margin-top: 2px; line-height: 1.3; }
.fp-sheet-chev { flex: none; color: #c2cad6; font-size: 20px; }

/* ===== Responsive: kleiner Phone ≤ 380 px ===== */
@media (max-width: 380px) {
  .fp-hero-time-val { font-size: 32px; }
  .fp-greet-title { font-size: 22px; }
  .fp-hero { margin: 4px 12px 12px; padding: 14px 14px 16px; }
  .fp-section-head { padding: 14px 18px 6px; }
  .fp-weekstrip { padding: 4px 12px; gap: 4px; }
  .fp-next-list, .fp-month { margin-left: 12px; margin-right: 12px; }
}

/* ===== Responsive: Tablet-Split ≥ 1024 px =====
   Split-Layout — links die Mobile-Spalte, rechts ein permanent sichtbares
   Tagesablauf-Mirror (read-only Spiegel). Wir nutzen Grid auf dem Root. */
@media (min-width: 1024px) {
  #fahrerPlanV2Root.fp-has-tablet-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
    gap: 0;
    align-items: start;
  }
  #fahrerPlanV2Root.fp-has-tablet-split .fp-mirror-pane {
    border-left: 1px solid var(--fp-border);
    background: var(--fp-surface-2);
    padding: 18px 20px 22px;
    min-height: 100vh;
    position: sticky; top: 0;
    max-height: 100vh; overflow-y: auto;
  }
}
#fahrerPlanV2Root .fp-mirror-pane { display: none; }
#fahrerPlanV2Root.fp-has-tablet-split .fp-mirror-pane { display: block; }

.fp-mirror-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.fp-mirror-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--fp-text-muted); text-transform: uppercase; }
.fp-mirror-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--fp-brand-dark); color: #fff; font-size: 12px; font-weight: 700; }
.fp-mirror-line { font-size: 17px; font-weight: 700; color: var(--fp-text); margin-bottom: 4px; }
.fp-mirror-range { display: flex; gap: 18px; font-size: 13px; color: var(--fp-text-2); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.fp-mirror-range > div { display: grid; gap: 1px; }
.fp-mirror-range strong { font-size: 11px; font-weight: 700; color: var(--fp-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.fp-mirror-list { display: grid; grid-template-columns: 56px 1fr; gap: 10px 12px; }
.fp-mirror-time { font-variant-numeric: tabular-nums; font-size: 12px; line-height: 1.35; color: var(--fp-text-2); padding-top: 14px; text-align: right; font-weight: 500; white-space: pre-line; }
.fp-mirror-row {
  background: var(--fp-surface); border: 1px solid var(--fp-border);
  border-radius: 14px; padding: 10px 14px;
  display: grid; grid-template-columns: 30px 1fr;
  align-items: center; gap: 10px; cursor: pointer;
}
.fp-mirror-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: var(--fp-surface-2); color: var(--fp-text); }
.fp-mirror-row[data-kind="lenken"] { }
.fp-mirror-row[data-kind="lenken"] .fp-mirror-icon { background: #e6edff; color: var(--fp-brand-blue); }
.fp-mirror-row[data-kind="pause"]  { background: #fef9e7; border-color: #f3e7b0; }
.fp-mirror-row[data-kind="pause"] .fp-mirror-icon { background: #fbe9a8; color: #92590e; }
.fp-mirror-row[data-kind="rahmen"] .fp-mirror-icon { background: #e5e7eb; color: #475569; }
.fp-mirror-rowlabel { font-size: 14px; font-weight: 600; color: var(--fp-text); letter-spacing: -.01em; }
.fp-mirror-rowmeta  { font-size: 12px; color: var(--fp-text-2); margin-top: 1px; }
.fp-mirror-linepill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(34,86,216,.1); color: var(--fp-brand-blue);
  font-size: 11px; font-weight: 700; margin-right: 6px;
}
.fp-mirror-schicht-sep {
  margin: 14px 0 6px; padding: 6px 10px;
  background: var(--fp-surface); border-radius: 8px;
  font-size: 11px; font-weight: 700; color: var(--fp-text-muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.fp-mirror-empty { font-size: 13px; color: var(--fp-text-2); padding: 12px 0; }

/* =====================================================================
   Tagesablauf v2 — „Dot-on-a-Rail"-Timeline (.ta2-*)
   Gemeinsamer Scope fuer Tablet-Pane + Handy-Modal. Vars werden auf .ta2
   re-deklariert, weil das Modal ausserhalb #fahrerPlanV2Root an <body> haengt.
   ===================================================================== */
.ta2 {
  --fp-bg: #fbf7ee; --fp-surface: #ffffff; --fp-surface-2: #f7f3ea;
  --fp-border: #e7e1d3; --fp-text: #0f172a; --fp-text-2: #475569;
  --fp-text-muted: #94a3b8; --fp-brand-dark: #0f172a; --fp-brand-blue: #2563eb;
  --fp-status-warn: #f59e0b; --fp-status-off: #94a3b8;
  background: var(--fp-bg); color: var(--fp-text);
}

/* --- Header --- */
.ta2-head { padding: 18px 20px 4px; }
.ta2-headtop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ta2-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fp-brand-blue); }
.ta2-duty { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--fp-brand-dark); color: #fff; font-size: 13px; font-weight: 700; }
.ta2-line { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--fp-text); margin-top: 8px; }
.ta2-subloc { font-size: 14px; font-weight: 600; color: var(--fp-text-2); margin-top: 2px; }
.ta2-range { display: flex; gap: 28px; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.ta2-range > div { display: grid; gap: 1px; }
.ta2-range strong { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fp-text-muted); }
.ta2-range span { font-size: 22px; font-weight: 800; color: var(--fp-text); }

/* --- Zeilen --- */
.ta2-rows { padding: 8px 20px 22px; }
.ta2-row { display: grid; grid-template-columns: 56px 28px minmax(0, 1fr); align-items: stretch; column-gap: 12px; }

/* Spalte 1: Zeit */
.ta2-time { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding: 14px 0; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ta2-t1 { font-size: 13px; font-weight: 600; color: var(--fp-text); }
.ta2-t2 { font-size: 12px; color: var(--fp-text-2); }

/* Spalte 2: Schiene + Punkt */
.ta2-rail { position: relative; display: flex; align-items: center; justify-content: center; }
.ta2-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--fp-border); }
.ta2-row.is-first .ta2-rail::before { top: 50%; }
.ta2-row.is-last  .ta2-rail::before { bottom: 50%; }
.ta2-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--fp-status-off); box-shadow: 0 0 0 3px var(--fp-bg); }
.ta2-row[data-kind="rahmen"] .ta2-dot { background: #94a3b8; }
.ta2-row[data-kind="lenken"] .ta2-dot { background: var(--fp-brand-blue); }
.ta2-row[data-kind="pause"]  .ta2-dot { background: var(--fp-status-warn); }

/* Spalte 3: Karte */
.ta2-card { margin: 6px 0; align-self: center; min-width: 0; background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: 14px; padding: 10px 14px; }
.ta2-row[data-kind="pause"] .ta2-card { background: #fef9e7; border-color: #f3e7b0; }
.ta2-cardhead { display: flex; align-items: center; gap: 8px; }
.ta2-glyph { font-size: 14px; flex: none; }
.ta2-lbl { font-size: 14px; font-weight: 700; color: var(--fp-text); }
.ta2-loc { margin-left: auto; text-align: right; flex: none; font-size: 12px; color: var(--fp-text-muted); }
.ta2-cardline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ta2-pill { flex: none; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(37,99,235,.10); color: var(--fp-brand-blue); font-size: 11px; font-weight: 700; }
.ta2-route { min-width: 0; font-size: 13px; color: var(--fp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Schicht-Separator */
.ta2-sep { margin: 12px 0 8px; padding: 6px 0; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: var(--fp-text-muted); }

/* --- Handy-Modal (Slide-up) --- */
.ta2-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; z-index: 1200; }
.ta2-backdrop.is-open { display: block; }
.ta2-modal {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1201;
  display: flex; flex-direction: column; max-height: 92vh;
  background: var(--fp-bg, #fbf7ee); border-radius: 18px 18px 0 0;
  transform: translateY(100%); transition: transform 240ms ease;
  box-shadow: 0 -10px 40px -12px rgba(15,23,42,.4);
}
.ta2-modal.is-open { transform: translateY(0); }
.ta2-modalhead { position: relative; flex: none; padding: 14px 16px 8px; }
.ta2-handle { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 2px; background: #d8d3c4; }
.ta2-close { position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; border: none; border-radius: 10px; background: var(--fp-surface-2, #f7f3ea); color: var(--fp-text, #0f172a); font-size: 18px; font-family: inherit; cursor: pointer; }
.ta2-modalbody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.ta2-locked { overflow: hidden; }

/* Schmales Handy: Spalten enger, damit die Karten mehr Platz bekommen und
   der Ort nicht ueber den Rand laeuft. */
@media (max-width: 380px) {
  .ta2-head { padding: 16px 14px 4px; }
  .ta2-rows { padding: 8px 14px 20px; }
  .ta2-row { grid-template-columns: 46px 24px minmax(0, 1fr); column-gap: 8px; }
  .ta2-card { padding: 9px 12px; }
  .ta2-loc { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ta2-cardhead { min-width: 0; }
  .ta2-lbl { flex: 0 0 auto; }
}

/* =====================================================================
   Ansicht "Persoenliches" — warm-editorialer Dossier-Look ("Die persoenliche
   Mappe"). Bleibt im v2-System; setzt EINEN Display-Serif (Fraunces, SELF-HOSTED)
   fuer Name + grosse Urlaubszahl + Sektions-Indizes. Klassen .fp-person*,
   .fp-uhero*, .fp-action* leben im #fahrerPlanV2Root (bare .fp-*-Konvention).
   ===================================================================== */

/* Fraunces self-hosted (CSP: default-src 'self', kein font-src -> nur eigene Origin).
   Variable optische Serif, Instanz wght 600. Subsets latin (Umlaute via U+0000-00FF) + latin-ext. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/fraunces-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

#fahrerPlanV2Root {
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --fp-shadow-card: 0 1px 2px rgba(76,58,30,.05), 0 8px 22px -14px rgba(76,58,30,.22);
  --fp-shadow-lift: 0 2px 4px rgba(76,58,30,.06), 0 18px 34px -18px rgba(76,58,30,.3);
}

/* --- Persoenlicher Header --- */
.fp-person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 16px 22px 12px; }
.fp-person-avatar {
  width: 56px; height: 56px; border-radius: 18px; position: relative;
  background: linear-gradient(150deg, #1e293b, #0f172a 70%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 22px -12px rgba(15,23,42,.7);
}
.fp-person-avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 21px; border: 1.5px solid rgba(245,158,11,.4); }
.fp-person-name { font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: -.015em; line-height: 1.02; color: var(--fp-text); }
.fp-person-sub { font-size: 13px; color: var(--fp-text-2); font-weight: 600; margin-top: 5px; display: flex; align-items: center; gap: 8px; }
.fp-person-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fp-hero-amber-1); flex: none; }
.fp-iconbtn {
  flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--fp-surface);
  border: 1px solid var(--fp-border); color: var(--fp-text-2); font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--fp-shadow-card); transition: transform .12s, border-color .12s; font-family: inherit;
}
.fp-iconbtn:hover { transform: translateY(-1px); border-color: #d6cfb8; }

.fp-hairline { height: 1px; margin: 4px 22px 0; background: linear-gradient(90deg, transparent, var(--fp-divider) 18%, var(--fp-divider) 82%, transparent); }

/* Editoriale Sektions-Index-Ziffer (01 / 02) im Section-Header */
.fp-section-title { display: inline-flex; align-items: baseline; gap: 9px; }
.fp-section-idx { font-family: var(--serif); font-size: 13px; font-weight: 600; font-style: italic; color: var(--fp-hero-amber-2); letter-spacing: 0; }

/* --- Urlaubs-Hero (Feature-Karte) — baut auf .fp-hero.is-urlaub auf --- */
.fp-uhero > * { position: relative; z-index: 1; }   /* ueber dem dekorativen ::after-Orb */
.fp-uhero .fp-hero-top { margin-bottom: 14px; }
.fp-uhero-stat { display: flex; align-items: flex-end; gap: 10px; }
.fp-uhero-num { font-family: var(--serif); font-size: 60px; font-weight: 600; letter-spacing: -.03em; line-height: .82; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(120,60,0,.25); }
.fp-uhero-den { font-family: var(--serif); font-size: 23px; font-weight: 600; color: rgba(255,255,255,.72); letter-spacing: -.02em; padding-bottom: 6px; }
.fp-uhero-statlbl { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.82); padding-bottom: 8px; margin-left: auto; text-align: right; line-height: 1.4; }
.fp-uhero-bar { position: relative; height: 9px; border-radius: 999px; background: rgba(0,0,0,.16); margin: 16px 0 7px; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); overflow: hidden; }
.fp-uhero-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #fff, #fff3d6); box-shadow: 0 0 12px rgba(255,255,255,.6); }
.fp-uhero-barmeta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85); }
.fp-uhero-year { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin: 18px 0 4px; }
.fp-uhero-mo { display: grid; justify-items: center; gap: 5px; }
.fp-uhero-mo > b { height: 24px; width: 100%; border-radius: 5px; background: rgba(255,255,255,.2); }
.fp-uhero-mo.on > b { background: linear-gradient(180deg, #fff, #ffe9b8); height: 28px; margin-top: -4px; box-shadow: 0 4px 10px -4px rgba(120,60,0,.5); }
.fp-uhero-mo > span { font-size: 8px; font-weight: 700; letter-spacing: .03em; color: rgba(255,255,255,.6); }
.fp-uhero-mo.on > span { color: #fff; }
.fp-uhero .fp-hero-foot { gap: 9px; }
.fp-hero-act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 11px 12px; border-radius: 13px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; border: 0; transition: transform .12s, box-shadow .12s; }
.fp-hero-act.primary { background: #fff; color: var(--fp-hero-amber-2); box-shadow: 0 6px 14px -8px rgba(120,60,0,.6); }
.fp-hero-act.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 18px -8px rgba(120,60,0,.6); }
.fp-hero-act.ghost { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.fp-hero-act.ghost:hover { background: rgba(255,255,255,.24); }

/* --- Aktions-Liste (dichte Einspalten-Liste) --- */
.fp-action-list { display: grid; gap: 9px; padding: 4px 18px 6px; }
.fp-action-row {
  background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: 18px;
  padding: 14px 15px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px;
  cursor: pointer; text-align: left; font-family: inherit; width: 100%;
  box-shadow: var(--fp-shadow-card); position: relative; overflow: hidden;
  transition: transform .14s cubic-bezier(.22,.61,.36,1), box-shadow .14s, border-color .14s;
}
.fp-action-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--fp-brand-blue)); transform: translateX(-4px); transition: transform .16s; }
.fp-action-row:hover { transform: translateY(-2px); box-shadow: var(--fp-shadow-lift); border-color: #ddd4bd; }
.fp-action-row:hover::before { transform: none; }
.fp-action-row.red { --accent: var(--fp-status-err); }
.fp-action-row.amber { --accent: var(--fp-hero-amber-1); }
.fp-action-row.green { --accent: var(--fp-status-ok); }
.fp-action-row.gray { --accent: var(--fp-text-2); }
.fp-action-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; background: #eef2f7; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(0,0,0,.03); transition: transform .16s; }
.fp-action-row:hover .fp-action-icon { transform: scale(1.06) rotate(-3deg); }
.fp-action-icon.red { background: #fdecec; }
.fp-action-icon.amber { background: #fef3c7; }
.fp-action-icon.green { background: #dcfce7; }
.fp-action-icon.gray { background: #eef2f7; }
.fp-action-body { min-width: 0; }
.fp-action-name { font-size: 15.5px; font-weight: 600; color: var(--fp-text); line-height: 1.2; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.fp-action-desc { font-size: 12.5px; color: var(--fp-text-2); margin-top: 3px; line-height: 1.3; }
.fp-action-chev { color: var(--fp-text-muted); font-size: 21px; transition: transform .16s, color .16s; }
.fp-action-row:hover .fp-action-chev { transform: translateX(3px); color: var(--fp-text-2); }
.fp-badge-live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: rgba(239,68,68,.12); color: #b91c1c; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.fp-badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fp-status-err); }

.fp-foot-note { padding: 12px 26px 30px; font-size: 11.5px; color: var(--fp-text-muted); text-align: center; line-height: 1.5; }

@media (max-width: 380px) {
  .fp-person { padding: 14px 16px 10px; gap: 12px; }
  .fp-person-name { font-size: 24px; }
  .fp-uhero-num { font-size: 52px; }
  .fp-action-list { padding-left: 12px; padding-right: 12px; }
}

/* =====================================================================
   Persoenliches v2 — fuenf einheitliche Aufklapp-Sektionen (Accordion).
   Jahresurlaub ist KEIN Hero mehr; Krankmeldung/Unfall/Ferien/Bundeslaender
   sind native v2-Inline-Formulare. Alles im #fahrerPlanV2Root, .fp-*-Scope.
   ===================================================================== */
.fp-collapse-stack { display: grid; gap: 10px; padding: 6px 18px 4px; }

/* --- Aufklapp-Sektion --- */
.fp-collapse { background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: 18px; box-shadow: var(--fp-shadow-card); overflow: hidden; }
.fp-collapse-head { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px; padding: 14px 15px; background: transparent; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.fp-collapse-head:hover { background: rgba(120,90,40,.03); }
.fp-collapse-icon { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; background: #eef2f7; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(0,0,0,.03); }
.fp-collapse-icon.red { background: #fdecec; }
.fp-collapse-icon.amber { background: #fef3c7; }
.fp-collapse-icon.green { background: #dcfce7; }
.fp-collapse-icon.gray { background: #eef2f7; }
.fp-collapse-titlewrap { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fp-collapse-titleline { display: flex; align-items: baseline; gap: 8px; }
.fp-collapse-idx { font-family: var(--serif); font-size: 12px; font-weight: 600; font-style: italic; color: var(--fp-hero-amber-2); }
.fp-collapse-title { font-size: 15.5px; font-weight: 600; color: var(--fp-text); letter-spacing: -.01em; }
.fp-collapse-summary { font-size: 12.5px; color: var(--fp-text-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-collapse-chev { color: var(--fp-text-muted); font-size: 22px; line-height: 1; transition: transform .2s; }
.fp-collapse[data-open="true"] .fp-collapse-chev { transform: rotate(90deg); }
.fp-collapse-body { padding: 6px 16px 18px; border-top: 1px solid var(--fp-divider); }

/* --- Formular-Bausteine --- */
.fp-form { display: grid; gap: 2px; padding-top: 8px; }
.fp-form-hint { font-size: 12.5px; color: var(--fp-text-2); line-height: 1.45; margin: 6px 0 10px; }
.fp-group-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--fp-text); margin: 16px 0 8px; }
.fp-field { display: grid; gap: 6px; margin-bottom: 12px; }
.fp-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fp-text-muted); }
.fp-input, .fp-textarea { background: var(--fp-surface); border: 1px solid var(--fp-border); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 14px; color: var(--fp-text); width: 100%; transition: border-color .12s, box-shadow .12s; }
.fp-textarea { resize: vertical; min-height: 70px; }
.fp-input:focus, .fp-textarea:focus { outline: none; border-color: var(--fp-brand-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.fp-textarea.is-readonly { background: var(--fp-surface-2, #f7f3ea); color: var(--fp-text-2); }
.fp-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.fp-grid .fp-field-wide, .fp-grid .fp-inline-check { grid-column: 1 / -1; }
@media (min-width: 420px) { .fp-grid { grid-template-columns: 1fr 1fr; } }

.fp-btn-row { display: flex; gap: 9px; margin-top: 8px; flex-wrap: wrap; }
.fp-btn { flex: 1; min-width: 120px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; border: 0; transition: transform .12s, box-shadow .12s; }
.fp-btn:hover { transform: translateY(-1px); }
.fp-btn.primary { background: var(--fp-brand-blue); color: #fff; box-shadow: 0 8px 16px -8px rgba(37,99,235,.6); }
.fp-btn.ghost { background: var(--fp-surface); border: 1px solid var(--fp-border); color: var(--fp-text-2); }
.fp-feedback { font-size: 12.5px; font-weight: 600; margin: 4px 0; line-height: 1.4; }
.fp-feedback.error { color: var(--fp-status-err); }
.fp-feedback.info { color: var(--fp-brand-blue); }

/* --- Urlaub-Panel (neutral, kein Hero) --- */
.fp-upanel-stat { display: flex; align-items: flex-end; gap: 10px; }
.fp-upanel-num { font-family: var(--serif); font-size: 46px; font-weight: 600; line-height: .85; letter-spacing: -.03em; color: var(--fp-hero-amber-2); font-variant-numeric: tabular-nums; }
.fp-upanel-den { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--fp-text-muted); padding-bottom: 5px; }
.fp-upanel-statlbl { font-size: 11px; font-weight: 600; color: var(--fp-text-2); margin-left: auto; text-align: right; line-height: 1.6; padding-bottom: 4px; }
.fp-upanel-pill { display: inline-flex; align-items: center; gap: 5px; background: #fef3c7; color: var(--fp-hero-amber-2); padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.fp-upanel-bar { position: relative; height: 9px; border-radius: 999px; background: var(--fp-surface-2, #f1ece0); margin: 16px 0 7px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.fp-upanel-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #b45309); }
.fp-upanel-barmeta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--fp-text-2); }
.fp-upanel-year { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin: 16px 0 4px; }
.fp-upanel-mo { display: grid; justify-items: center; gap: 5px; }
.fp-upanel-mo > b { height: 22px; width: 100%; border-radius: 5px; background: var(--fp-surface-2, #eee7d8); }
.fp-upanel-mo.on > b { background: linear-gradient(180deg, #f8ad26, #b45309); height: 26px; margin-top: -4px; box-shadow: 0 4px 10px -4px rgba(120,60,0,.4); }
.fp-upanel-mo > span { font-size: 8px; font-weight: 700; color: var(--fp-text-muted); }
.fp-upanel-mo.on > span { color: var(--fp-hero-amber-2); }

/* --- Status-Karte (aktive Krankmeldung) --- */
.fp-statuscard { border-radius: 16px; padding: 16px; color: #fff; position: relative; overflow: hidden; margin-bottom: 12px; background: linear-gradient(155deg, #f8ad26, #ef9412 45%, #b45309); box-shadow: 0 16px 30px -20px rgba(180,83,9,.7); }
.fp-statuscard.red { background: linear-gradient(155deg, #f87171, #ef4444 45%, #b91c1c); box-shadow: 0 16px 30px -20px rgba(185,28,28,.6); }
.fp-statuscard-head { display: flex; align-items: center; gap: 12px; }
.fp-statuscard-emoji { font-size: 28px; }
.fp-statuscard-main { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.fp-statuscard-sub { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.92); margin-top: 3px; }
.fp-statuscard-note { margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.16); font-size: 13px; line-height: 1.45; }
.fp-subform { margin-top: 6px; padding: 12px; border: 1px solid var(--fp-border); border-radius: 14px; background: var(--fp-surface-2, #faf7f0); }

/* --- Unfall: Draftbar, Halter-Check, Polizei-Toggle, Skizze, Bestaetigung --- */
.fp-draftbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 11px; background: #fef3c7; color: var(--fp-hero-amber-2); font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.fp-draft-discard { background: transparent; border: 0; padding: 0; color: var(--fp-hero-amber-2); font-weight: 700; text-decoration: underline; cursor: pointer; font-family: inherit; font-size: 12.5px; }
.fp-inline-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--fp-text-2); margin: -4px 0 12px; }
.fp-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--fp-text-2); line-height: 1.45; margin: 10px 0 4px; }
.fp-confirm input, .fp-inline-check input { margin-top: 2px; flex: none; }
.fp-pol { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; flex-wrap: wrap; }
.fp-toggle { display: inline-flex; background: var(--fp-surface-2, #f1ece0); border-radius: 10px; padding: 3px; gap: 3px; }
.fp-toggle-btn { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--fp-text-2); cursor: pointer; font-family: inherit; }
.fp-toggle-btn[aria-pressed="true"] { background: var(--fp-surface); color: var(--fp-text); box-shadow: var(--fp-shadow-card); }
.fp-skizze-wrap { display: grid; gap: 8px; margin: 4px 0 12px; }
.fp-skizze-canvas { width: 100%; height: auto; aspect-ratio: 640 / 400; background: #fff; border: 1px solid var(--fp-border); border-radius: 12px; touch-action: none; cursor: crosshair; }
.fp-skizze-actions { display: flex; gap: 9px; }

/* --- Ferien & Feiertage (read-only) --- */
.fp-yearswitch { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.fp-year-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--fp-border); background: var(--fp-surface); color: var(--fp-text-2); font-size: 16px; cursor: pointer; font-family: inherit; }
.fp-year-current { font-weight: 700; font-size: 15px; color: var(--fp-text); min-width: 48px; text-align: center; }
.fp-ff-empty { font-size: 13px; color: var(--fp-text-2); line-height: 1.5; }
.fp-ff-group { margin-bottom: 14px; }
.fp-ff-grouphead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.fp-ff-grouptitle { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fp-text-2); }
.fp-ff-groupcount { font-size: 11px; font-weight: 700; color: #fff; background: var(--fp-text-muted); border-radius: 999px; padding: 1px 8px; }
.fp-ff-group-feiertage .fp-ff-groupcount { background: var(--fp-status-ok); }
.fp-ff-group-ferien .fp-ff-groupcount { background: var(--fp-brand-blue); }
.fp-ff-list { display: grid; gap: 0; }
.fp-ff-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--fp-divider); font-size: 13px; }
.fp-ff-when { color: var(--fp-text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.fp-ff-name { color: var(--fp-text); }

/* --- Bundeslaender-Auswahl --- */
.fp-bl-wrap { margin-top: 6px; overflow-x: hidden; }
/* WICHTIG: das globale styles.css hat `table { min-width: 920px }` (Daten-Tabellen
   im Backend) — ohne min-width:0 schiebt das unsere Auswahl-Tabelle aus dem Handy.
   table-layout:fixed haelt die Spaltenbreiten, lange Namen brechen um. */
.fp-bl-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 13.5px; }
.fp-bl-table th { font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--fp-text-muted); text-align: center; padding: 6px 2px; border-bottom: 1px solid var(--fp-border); }
.fp-bl-table th.fp-bl-namecol { text-align: left; }
.fp-bl-table td { padding: 8px 2px; border: 0; border-bottom: 1px solid var(--fp-divider); background: transparent; }
.fp-bl-table .fp-bl-namecol { overflow-wrap: break-word; }
.fp-bl-table .fp-bl-col { text-align: center; width: 64px; }
/* Highlight auf die TD setzen (das globale `td { background: white }` wuerde sonst
   eine Hintergrundfarbe auf der TR ueberdecken). */
.fp-bl-table tbody tr.is-ferien td, .fp-bl-table tbody tr.is-feiertage td { background: var(--fp-surface-2, #faf7f0); }
.fp-bl-blname { font-weight: 600; color: var(--fp-text); }
.fp-bl-code { color: var(--fp-text-muted); font-size: 11px; margin-left: 6px; }
.fp-bl-check { display: inline-flex; }
.fp-bl-check input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--fp-brand-blue); }

@media (max-width: 380px) {
  .fp-collapse-stack { padding-left: 12px; padding-right: 12px; }
  .fp-upanel-num { font-size: 40px; }
}
