/* LODRIVO Business, Schritt 1. Grundlage ist das Stylesheet von LODRIVO Core (Figma ylTVXC4kesL39CtIrTc1fc, Nucleus UI Lite,
   Markenfarben Option B, vorläufig und nicht freigegeben). Ergänzungen für Business stehen im letzten Abschnitt. */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Markenfarben (CI 0.3, gemessen, nicht freigegeben) und daraus abgeleitete Stufen wie in Figma */
  --violett: #951B81; --violett-dunkel: #6E1360; --violett-hell: #C55EB0; --violett-heller: #DCA1D0; --violett-hellst: #F4E4F0;
  --cyan: #77CBEA; --cyan-hell: #E3F4FB; --navy: #0F1B2D;
  /* Nucleus-Neutraltöne */
  --text: #0F1B2D; --text-2: #46566A; --text-3: #5E7182; --linie: #E3E9EF; --flaeche: #F5F8FB; --karte: #FFFFFF; --grau-chip: #EEF2F6;
  /* Statusfarben (Nucleus-Standard, keine CI) */
  --gruen: #1F7A3A; --gruen-hell: #E7F6EC; --gelb: #8A5A00; --gelb-hell: #FFF4D6; --rot: #B42318; --rot-hell: #FDECEA;
  --radius-karte: 16px; --radius-chip: 999px; --schatten: 0 1px 2px rgba(15,27,45,.06), 0 4px 16px rgba(15,27,45,.06);
  /* Bewegung (Figma-Dokumentation, Abschnitt 5) */
  --t-karte: 250ms; --t-gedrueckt: 90ms; --t-hover: 130ms; --t-nav: 150ms; --t-details: 220ms; --t-menue: 300ms;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-karte: 0ms; --t-gedrueckt: 0ms; --t-hover: 0ms; --t-nav: 0ms; --t-details: 0ms; --t-menue: 0ms; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.5; color: var(--text);
  background: var(--flaeche); overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--violett); }
:focus-visible { outline: 3px solid var(--violett); outline-offset: 2px; border-radius: 6px; }
[data-fokus]:focus, main:focus { outline: none; }        /* Fokus nach Bildwechsel nur für Screenreader, kein Rahmen um Überschriften */
.unsichtbar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Grundgerüst ---------- */
.geruest { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.seitenleiste { background: var(--karte); border-right: 1px solid var(--linie); display: flex; flex-direction: column; padding: 20px 24px 24px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.logo { display: block; width: 232px; height: auto; margin: 0 auto 16px; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.nav a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px 0 18px; border-radius: 12px; text-decoration: none;
  color: var(--text-2); font-weight: 500; position: relative; transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.nav a:hover { background: var(--flaeche); color: var(--text); }
.nav a[aria-current="page"] { background: var(--violett-hellst); color: var(--violett); font-weight: 650; }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--violett); }
.nav .zahl { margin-left: auto; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--violett); color: #fff;
  font-size: 16px; font-weight: 700; display: inline-grid; place-items: center; }
.nav .zahl[hidden] { display: none; }
.nav-unten { margin-top: auto; padding-top: 16px; }

.haupt { min-width: 0; display: flex; flex-direction: column; }
.kopf { height: 72px; background: var(--karte); border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 16px; padding: 0 40px;
  position: sticky; top: 0; z-index: 5; }
.pfad { display: flex; align-items: center; gap: 12px; font-size: 17px; min-width: 0; }
.pfad .wurzel { color: var(--text-3); }
.pfad .trenner { color: var(--text-3); }
.pfad .hier { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.knopf-text { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 12px;
  border: 0; background: transparent; color: var(--violett); font-weight: 600; border-radius: 12px; cursor: pointer; text-decoration: none; }
.knopf-text:hover { background: var(--violett-hellst); }
.platzhalter-48 { width: 48px; height: 48px; flex: none; }

.inhalt { width: 100%; max-width: 1120px; padding: 40px 40px 64px; margin: 0; }

.mobil-kopf, .menue-blatt, .abdunklung { display: none; }

/* ---------- Bausteine ---------- */
.titel { font-size: 32px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.unter { color: var(--text-2); margin-top: 8px; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-karte); box-shadow: var(--schatten); }
.karte.innen { padding: 32px; }
.abschnitt { margin-top: 24px; }
.hinweis { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-radius: 14px; background: var(--violett-hellst); }
.hinweis .ic { color: var(--violett); margin-top: 2px; }
.hinweis.info { background: var(--cyan-hell); } .hinweis.info .ic { color: #0B5A78; }
.hinweis.warnung { background: var(--gelb-hell); } .hinweis.warnung .ic { color: var(--gelb); }
.hinweis.fehler { background: var(--rot-hell); } .hinweis.fehler .ic { color: var(--rot); }
.hinweis.erfolg { background: var(--gruen-hell); } .hinweis.erfolg .ic { color: var(--gruen); }
.hinweis strong { display: block; }
.hinweis .aktionen { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-chip); background: var(--grau-chip);
  font-size: 16px; color: var(--text); }
.chip .ic { width: 18px; height: 18px; }
.chip.gruen { background: var(--gruen-hell); color: var(--gruen); }
.chip.gelb { background: var(--gelb-hell); color: var(--gelb); }
.chip.violett { background: var(--violett-hellst); color: var(--violett); }
.label { color: var(--violett); font-weight: 650; }
.klein { font-size: 16px; color: var(--text-2); }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: var(--radius-chip);
  border: 1.5px solid var(--violett); background: var(--karte); color: var(--violett); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background var(--t-hover) var(--ease), transform var(--t-gedrueckt) var(--ease), box-shadow var(--t-hover) var(--ease);
  -webkit-tap-highlight-color: transparent; user-select: none; }
.knopf:hover { background: var(--violett-hellst); }
.knopf.primaer { background: var(--violett); color: #fff; }
.knopf.primaer:hover { background: var(--violett-dunkel); border-color: var(--violett-dunkel); }
.knopf:active:not(:disabled) { transform: scale(.97); }
.knopf.primaer:active:not(:disabled) { background: var(--violett-dunkel); }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.knopf.breit { width: 100%; }
.knopf[aria-busy="true"] { cursor: progress; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; }
.wechsel { animation: herein var(--t-karte) var(--ease) both; }
@keyframes herein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.aufklappen { animation: aufklappen var(--t-details) var(--ease) both; }
@keyframes aufklappen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wechsel, .aufklappen { animation: none; } .fortschritt span, .nav-auf .ic { transition: none; } }
/* Rückmeldeleiste (Snackbar) */
.rueckmeldung { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 30; width: max-content; display: flex; align-items: center; gap: 16px;
  max-width: min(640px, calc(100vw - 32px)); padding: 10px 10px 10px 20px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(15,27,45,.25);
  animation: herein var(--t-karte) var(--ease) both; }
.rueckmeldung .knopf-text { color: var(--violett-heller); }
.rueckmeldung .knopf-text:hover { background: rgba(255,255,255,.08); }
.rueckmeldung[hidden] { display: none; }
/* ---------- Menü mit Untermenü ---------- */
.nav-zeile { display: flex; align-items: center; gap: 4px; }
.nav-zeile a { flex: 1; min-width: 0; }
.nav-auf { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent;
  color: var(--text-2); cursor: pointer; transition: background var(--t-hover) var(--ease); }
.nav-auf:hover { background: var(--flaeche); }
.nav-auf .ic { transition: transform var(--t-details) var(--ease); }
.nav-auf[aria-expanded="true"] .ic { transform: rotate(90deg); }
.nav-unter { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 16px; padding-left: 6px; border-left: 2px solid var(--linie); }
.nav-unter[hidden] { display: none; }
.nav-unter a { font-weight: 500; gap: 10px; padding: 0 8px 0 12px; white-space: nowrap; }

/* ---------- Übersicht: Core-Dashboard (Nucleus: Progress Bars, Tables, Badges: Status: Pill) ---------- */
.kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.kennzahl { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.zahlwert { font-size: 28px; line-height: 1.2; font-weight: 750; letter-spacing: -.01em; }
.fortschritt { height: 4px; border-radius: 2px; background: var(--violett-hellst); overflow: hidden; }
.fortschritt span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--violett); transition: width var(--t-details) var(--ease); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.spalte { display: grid; gap: 20px; min-width: 0; }
.modul { padding: 22px 24px; }
.modul h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.modul h2 .ic { color: var(--violett); }
.liste { list-style: none; margin: 8px 0 0; padding: 0; }
.liste > li + li { border-top: 1px solid var(--linie); }
.zeile { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; }
.zeile .text { flex: 1; min-width: 0; }
.zeile .text strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.zeile .text span, .projekt .text span { color: var(--text-2); }
.wann { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.punkt { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--violett-hellst); color: var(--violett); display: grid; place-items: center; }
.punkt .ic { width: 18px; height: 18px; }
.ziel, .projekt { display: grid; gap: 8px; padding: 14px 0; }
.ziel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ziel-kopf strong { font-weight: 600; }
.ziel-kopf > span { color: var(--violett); font-weight: 700; white-space: nowrap; }
.projekt .text strong { display: block; font-weight: 600; }
.marke { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--text-3); background: var(--karte); }
.marke.erreicht { background: #198155; border-color: #198155; }
.marke.laeuft { border-color: var(--violett); background: var(--violett-hellst); }
.badge { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: var(--radius-chip); font-size: 16px; font-weight: 600; white-space: nowrap; }
.badge.erfolg { background: #E3F3EB; color: #146C47; }
.badge.info { background: var(--cyan-hell); color: #0B5A78; }
.badge.warnung { background: var(--gelb-hell); color: var(--gelb); }
.badge.neutral { background: var(--grau-chip); color: var(--text-2); }
.kosten-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0 10px; }

/* ---------- Zustände ---------- */
.zustand { padding: 40px 32px; text-align: center; }
.zustand .kreis { width: 64px; height: 64px; border-radius: 50%; background: var(--violett-hellst); color: var(--violett); display: grid; place-items: center; margin: 0 auto 16px; }
.zustand .kreis .ic { width: 30px; height: 30px; }
.zustand h2 { font-size: 22px; }
.zustand p { margin-top: 8px; color: var(--text-2); }
.zustand .knopfreihe { justify-content: center; margin-top: 22px; }
.lade { display: grid; gap: 14px; }
.lade .balken { height: 18px; border-radius: 9px; background: linear-gradient(90deg, #EEF2F6 0%, #F7F9FB 50%, #EEF2F6 100%); background-size: 200% 100%;
  animation: schimmer 1.2s linear infinite; }
@keyframes schimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .lade .balken { animation: none; } }
.lade .balken.kurz { width: 55%; } .lade .balken.dick { height: 28px; width: 85%; }

.abstand-4 { margin-top: 4px; } .abstand-8 { margin-top: 8px; } .abstand-12 { margin-top: 12px; } .abstand-16 { margin-top: 16px; }

/* ---------- Mobil ---------- */
@media (max-width: 899px) {
  .geruest { display: block; }
  .seitenleiste, .kopf { display: none; }
  .mobil-kopf { display: flex; position: sticky; top: 0; z-index: 10; height: 56px; align-items: center; justify-content: space-between; padding: 0 4px;
    background: var(--karte); border-bottom: 1px solid var(--linie); }
  .mobil-kopf h1 { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .inhalt { padding: 16px 16px 48px; }
  .titel { font-size: 26px; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
  .kennzahl { padding: 16px; }
  .zahlwert { font-size: 24px; }
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .spalte { gap: 12px; }
  .modul { padding: 18px 16px; }
  .rueckmeldung { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .abdunklung { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(15,27,45,.45); opacity: 0; pointer-events: none;
    transition: opacity var(--t-menue) var(--ease); }
  .menue-blatt { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 41; width: min(320px, 86vw);
    background: var(--karte); padding: 12px 16px 24px; transform: translateX(-102%); transition: transform var(--t-menue) var(--ease);
    overflow-y: auto; visibility: hidden; transition: transform var(--t-menue) var(--ease), visibility 0s linear var(--t-menue); }
  body.menue-offen .abdunklung { opacity: 1; pointer-events: auto; }
  body.menue-offen .menue-blatt { transform: none; visibility: visible; transition: transform var(--t-menue) var(--ease), visibility 0s; }
  .menue-blatt .logo { width: 180px; margin: 4px auto 8px; }
  .menue-blatt .schliessen { align-self: flex-end; }
}

/* ---------- LODRIVO Business ---------- */
body.ohne-geruest .geruest { display: none; }
body:not(.ohne-geruest) .einzel { display: none; }
.einzel { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.einzel-karte { width: min(100%, 460px); padding: 32px; }
.einzel-karte .logo { width: 120px; margin: 0 auto 20px; }
.einzel-karte .titel { font-size: 28px; text-align: center; }
.einzel-karte .unter { text-align: center; }
.konto-zeile { color: var(--text-3); font-size: 15px; overflow-wrap: anywhere; }

.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.formular.einspaltig { grid-template-columns: minmax(0, 1fr); }
.formular .voll, .formular h2, .formular [data-meldung] { grid-column: 1 / -1; }
.formular [data-meldung]:empty { display: none; }
.abstand-24 { margin-top: 24px; }
.feld { display: grid; gap: 6px; font-weight: 600; }
.feld em { font-style: normal; font-weight: 400; color: var(--text-3); }
.feld small { font-weight: 400; color: var(--text-2); font-size: 15px; }
.feld input, .feld select { min-height: 48px; padding: 10px 14px; border: 1.5px solid #C9D3DD; border-radius: 12px; background: var(--karte); font-weight: 400; width: 100%; }
.feld input:focus-visible, .feld select:focus-visible { outline: 3px solid var(--violett); outline-offset: 1px; border-color: var(--violett); }
.haken-feld { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.haken-feld input { width: 22px; height: 22px; accent-color: var(--violett); }
.fehlerliste { margin: 6px 0 0; padding-left: 20px; }
.feld input[aria-invalid="true"], .feld select[aria-invalid="true"] { border-color: var(--rot); background: var(--rot-hell); }

.seitenkopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.zurueck { margin: -8px 0 8px -12px; }
.liste-karte { padding: 4px 24px; }
.zeile.verweis { text-decoration: none; color: inherit; border-radius: 12px; margin: 0 -12px; padding: 10px 12px;
  transition: background var(--t-hover) var(--ease); }
.zeile.verweis:hover { background: var(--flaeche); }
.zeile.verweis > .ic { color: var(--text-3); }
.anteil { width: 160px; flex: none; display: grid; gap: 6px; }
.anteil-zahl { font-weight: 650; color: var(--violett); text-align: right; }

.akte { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.gesamt-zahl { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 10px; flex-wrap: wrap; }
.phasen-leiste { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; }
.phasen-leiste li { display: grid; place-items: center; height: 36px; border-radius: 10px; background: var(--grau-chip); color: var(--text-2); font-weight: 650; }
.phasen-leiste li.laeuft { background: var(--violett-hellst); color: var(--violett); outline: 2px solid var(--violett); outline-offset: -2px; }
.phasen-leiste li.fertig { background: #E3F3EB; color: #146C47; }
.daten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 14px 0 0; }
.daten dt { color: var(--text-2); font-size: 15px; }
.daten dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

.phasen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.phase-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phase-kopf h2 { display: grid; gap: 2px; font-size: 18px; }
.phase-nr { color: var(--violett); font-size: 15px; font-weight: 650; }
.phase-stand { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 14px 0 6px; color: var(--text-2); }
.schritte { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.schritt { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent;
  text-align: left; cursor: pointer; transition: background var(--t-hover) var(--ease); -webkit-tap-highlight-color: transparent; }
.schritt:hover:not(:disabled) { background: var(--flaeche); }
.schritt:disabled { cursor: default; }
.schritt[aria-busy="true"] { cursor: progress; opacity: .6; }
.kaestchen { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid #9AA8B6; display: grid; place-items: center; color: #fff;
  transition: background var(--t-gedrueckt) var(--ease), border-color var(--t-gedrueckt) var(--ease); }
.kaestchen .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.kaestchen .ic circle { display: none; }
.schritt[aria-pressed="true"] .kaestchen { background: var(--violett); border-color: var(--violett); }
.schritt[aria-pressed="true"] .schritt-text { color: var(--text-2); }

@media (max-width: 899px) {
  .einzel-karte { padding: 24px 20px; }
  .formular { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .akte, .phasen { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .liste-karte { padding: 2px 16px; }
  .anteil { width: 76px; }
  .daten { grid-template-columns: minmax(0, 1fr); }
  .seitenkopf .knopf { width: 100%; }
}
