/* =====================================================
   AI Revenue System — Portal-Interface (Mockup)
   Look 1:1 leaderlogic.de — alle Werte via tokens.css
   ===================================================== */

* { box-sizing: border-box; }

html {
  background: var(--portal-bg);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--body-font);
  font-weight: 400;
  background: var(--portal-bg);
  color: var(--portal-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: rgba(var(--c-accent-rgb), 0.28); }

h1, h2, h3 { font-family: var(--heading-font); margin: 0; }

.kicker {
  font-size: var(--kicker-size);
  letter-spacing: var(--kicker-spacing);
  text-transform: uppercase;
  color: var(--portal-text-soft);
  font-weight: 500;
}

/* =========== BUTTONS =========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 16px;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn--accent { background: var(--portal-accent); color: var(--portal-accent-ink); }
.btn--accent:hover { background: var(--portal-accent-hover); }
.btn--ghost {
  background: transparent;
  color: var(--portal-text);
  border: 1px solid var(--c-line);
}
.btn--ghost:hover { border-color: var(--portal-text-soft); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* =========== LOGO / BRAND =========== */
.logo-mark {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--portal-text);
  text-decoration: none;
}
.logo-mark strong { font-weight: 500; }

/* Produkt-Brand: "AI Revenue System" groß, "by LeaderLogic" klein darunter */
/* Klassisches LeaderLogic-Logo (wie leaderlogic.de: „Leader" 500, „Logic" 400)
   + darunter KUNDENPORTAL in kleinen Großbuchstaben */
.brand-block .brand-name {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--portal-text);
}
.brand-block .brand-name strong { font-weight: 500; }
.brand-block .brand-portal {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--portal-text-soft);
  margin-top: 3px;
}

/* Login-Fehler/-Hinweise */
.login-error {
  background: rgba(var(--c-accent-rgb), 0.08);
  border: 1px solid rgba(var(--c-accent-rgb), 0.35);
  color: var(--portal-text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14.5px !important;
  line-height: 1.5;
  margin: 0 0 20px !important;
}

/* =====================================================
   LOGIN
   ===================================================== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(var(--c-accent-rgb), 0.07) 0%, transparent 60%),
    var(--portal-bg);
}
.login-logo { position: absolute; top: 28px; left: clamp(20px, 3vw, 40px); }

/* Überschrift ÜBER der Login-Karte (zentriert) */
.login-wrap { width: min(460px, 100%); }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .brand-name { font-size: 26px; }

.login-error-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--portal-text-soft);
  font-weight: 400;
}
.login-devlink {
  display: inline-block;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--portal-text-faint);
  text-decoration: none;
}
.login-devlink:hover { color: var(--portal-accent); }

.login-card {
  width: 100%;
  background: radial-gradient(ellipse 110% 75% at 30% -20%, #2a2a2c 0%, #19191b 55%, #121214 100%);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 52px);
  box-shadow: var(--shadow-card);
}
.login-card .kicker {
  margin: 0 0 18px;
  font-size: var(--kicker-size);   /* 12px — gewinnt gegen die 16px der Karten-Absätze */
  color: var(--portal-text-soft);
}
.login-card h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: var(--portal-h1-weight);
  letter-spacing: var(--portal-h1-spacing);
  line-height: 1.12;
  margin-bottom: 10px;
}
.login-card p { color: var(--portal-text-soft); line-height: 1.55; margin: 0 0 28px; font-size: 16px; }

.login-step { display: none; }
.login-step.is-active { display: block; }

.field {
  display: block;
  width: 100%;
  font-family: var(--body-font);
  font-size: var(--field-font-size);
  color: var(--portal-text);
  background: var(--field-bg);
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.field::placeholder { color: var(--portal-text-faint); }
.field:focus { border-color: rgba(var(--c-accent-rgb), 0.55); background: var(--field-bg-focus); }

.login-form { display: grid; gap: 14px; }

/* Floating-Label — Mechanik 1:1 von leaderlogic.de (.ll-field), dunkel gethemt:
   Label liegt mittig als Platzhalter, wandert bei Fokus/Inhalt klein nach oben links */
.ll-field { display: block; position: relative; }
.ll-field .field { width: 100%; }
.ll-field .field::placeholder { color: transparent; }
.ll-field-label {
  position: absolute;
  left: 16px;   /* Feld-Padding 15px + 1px Border */
  top: 50%;
  transform: translateY(-50%);
  color: var(--portal-text-faint);
  font: 400 var(--field-font-size) var(--body-font);
  pointer-events: none;
  transition: top .15s ease, font-size .15s ease, transform .15s ease, color .15s ease;
}
.ll-field .field:focus + .ll-field-label,
.ll-field .field:not(:placeholder-shown) + .ll-field-label {
  top: 7px;
  transform: none;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--portal-text-soft);
}
.ll-field .field:focus,
.ll-field .field:not(:placeholder-shown) { padding-top: 21px; padding-bottom: 5px; }
.login-alt {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--portal-line);
  font-size: 14.5px;
  color: var(--portal-text-soft);
}
.login-alt a { color: var(--portal-accent); text-decoration: none; }
.login-alt a:hover { text-decoration: underline; }

/* Code-Eingabe (6 Kästchen) */
.code-row { display: flex; gap: 10px; margin-bottom: 14px; }
.code-box {
  width: 54px; height: 64px;
  text-align: center;
  font-size: 26px;
  font-weight: 500;
  color: var(--portal-text);
  background: var(--field-bg);
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
}
.code-box:focus { border-color: rgba(var(--c-accent-rgb), 0.55); }
.login-hint { font-size: 14px; color: var(--portal-text-faint); margin-top: 14px; }

/* =====================================================
   PORTAL-LAYOUT
   ===================================================== */
.portal {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
  /* Sehr große Fenster: Menü + Inhalt als EINE Einheit zentriert
     (360px Menü + 1240px Inhalts-Deckel) */
  max-width: 1600px;
  margin-inline: auto;
}

/* =========== SIDEBAR =========== */
.sidebar {
  background: var(--portal-bg);
  padding: 22px 14px 0 24px;   /* Raster: gleiche Oberkante wie .main; Kästen laufen weiter nach rechts */
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;          /* niemals horizontal schwimmen */
  scrollbar-width: none;       /* kein sichtbarer Scrollbalken */
}
.sidebar::-webkit-scrollbar { display: none; }
/* Unten läuft das Menü ins Dunkle aus */
.sidebar::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  flex: 0 0 72px;
  margin-top: -72px;
  background: linear-gradient(to bottom, transparent, var(--portal-bg) 85%);
  pointer-events: none;
  z-index: 3;
}

/* Bausteine als Kästen — gleiche Karten-Ästhetik wie die Inhalte.
   EINE durchgehende Timeline (.bausteine-rail) läuft über alle Kästen;
   Kreise + Schloss-Kreise liegen opak darüber. */
.bausteine { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; position: relative; }
/* Die Timeline — der Farbverlauf (Stops an den Kreis-Positionen) kommt aus JS */
.bausteine-line {
  position: absolute;
  width: 2px;
  z-index: 1;
  pointer-events: none;
}

.sb-box {
  /* Freigeschaltete Kästen hell, gesperrte deutlich dunkler (Segmentierung) */
  background: radial-gradient(ellipse 110% 75% at 30% -20%, #232325 0%, #161618 55%, #121214 100%);
  border-radius: var(--radius-md);
  padding: 8px 14px 12px;
  box-shadow: var(--shadow-card);
  position: relative;
  /* Zustandswechsel (auf/zu) blenden sanft */
  transition: background 0.5s ease, padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-box.is-locked {
  background: #090909;
}
/* Komplett abgeschlossene Rubrik (zugeklappt): dunkel wie gesperrt —
   aufgeklappt bleibt sie hell (aktive Karte) */
.sb-box.is-zu.is-fertig {
  background: #090909;
}
/* Aufgeklappte Karten: EIN Padding für aktiv wie inaktiv — sonst springt
   das Layout, wenn ein Modul-Klick die Karte zur aktiven macht */
.sb-box.is-open {
  padding: 6px 4px 31px;
}
/* Ausgleich fürs schmalere Seiten-Padding (4px statt 14px): Inhalt 10px
   einrücken, damit die Zahlen-Kreise wieder exakt auf der Timeline liegen
   (Titel-Zeile bekommt den Ausgleich direkt in ihrer is-open-Regel unten) */
.sb-box.is-open .step { padding-left: 10px; }
/* Titel auf derselben Rasterlinie wie die Step-Labels (Kreis-Spalte 32px + 16px Gap) */
.sb-box-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--portal-text-faint);
  padding: 8px 0 6px 48px;
}
.sb-box-title { transition: color 0.45s ease, font-size 0.45s ease; }
.sb-box.is-open .sb-box-title {
  color: rgb(255 255 255);
  font-size: 14px;
  letter-spacing: -0.001em;
}
/* Gesperrte und zugeklappte Kästen: identisches Padding (gleiche Zeilenhöhe) */
.sb-box.is-locked,
.sb-box.is-zu { padding-top: 16px; padding-bottom: 16px; }

/* Verschlossener Baustein: Schloss im Kreis links, auf der Timeline */
.sb-lock-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 0;
}
.sb-lock-dot {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--portal-box-dot);
  border: 1px solid var(--portal-line);
  position: relative;
  z-index: 2;
}
/* Schloss-Emoji dezenter (Kreis/Umrandung bleiben voll sichtbar) */
.sb-lock-icon { opacity: 0.5; }
.sb-box-title--inline { padding: 0; }

/* Freigeschalteter Baustein: immer dieselbe Struktur (klickbare Kopfzeile +
   Steps-Container). Zugeklappt schiebt CSS die Steps weich zusammen. */
.sb-box-dot {
  transition: border-color 0.45s ease, background 0.45s ease;
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--portal-box-dot);
  border: 1px solid var(--portal-line);
  color: var(--portal-text-soft);
  position: relative;
  z-index: 2;
}
/* Umrandung der Baustein-Kreise setzt portal.js auf die Linienfarbe ihrer Höhe */
.sb-box-dot.is-done { color: var(--portal-accent); }
/* „In Bearbeitung": pulsierender Akzent-Punkt im Baustein-Kreis */
.sb-box-dot-puls {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--portal-accent);
  animation: sb-puls 2.2s ease-in-out infinite;
}
@keyframes sb-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--c-accent-rgb), 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(var(--c-accent-rgb), 0); }
}
/* Kopfzeile jedes freigeschalteten Bausteins: Status-Kreis + Titel auf der
   Raster-Flucht, klickbar (Akkordeon) */
.sb-titel-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 0;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--body-font);
  transition: padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-box.is-open .sb-titel-row { padding: 15px 0 15px 10px; }   /* 10px = Timeline-Ausgleich */
.sb-box.is-zu .sb-titel-row:hover .sb-box-title { color: var(--portal-text-soft); }

/* Auf-/Zuschieben der Steps: 1fr ↔ 0fr läuft als weiche Transition, der
   Inhalt wird währenddessen gecroppt */
.sb-steps-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-box.is-zu .sb-steps-wrap { grid-template-rows: 0fr; }
.sb-steps-wrap > .steps { overflow: hidden; min-height: 0; }

/* Geheimer Bonus-Titel: unkenntlich geblurrt */
.sb-geheim {
  filter: blur(4px);
  margin-left: 6px;
  opacity: 0.8;
  user-select: none;
}

/* Gesperrte Zone: Cursor komplett aus — nur das mitlaufende Label ist sichtbar */
body.lock-zone, body.lock-zone * { cursor: none !important; }
.lock-tip {
  position: fixed;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #202023;
  border: 1px solid var(--portal-line);
  color: var(--portal-text);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.lock-tip svg { width: 13px; height: 13px; flex: 0 0 13px; }
.lock-tip.is-visible { opacity: 1; }
/* Erste Zeile links (Brand) und rechts (Topbar/Profil) sind GLEICH hoch —
   dadurch starten Menü-Kasten und Inhalts-Kasten auf exakt einer Höhe */
.sidebar-brand {
  height: 52px;
  margin-bottom: 10px;      /* + 8px Flex-Gap = 18px wie .topbar */
  padding-left: 30px;       /* Raster: beginnt exakt auf der Timeline-Linie (14px Kasten-Pad + 16px Kreis-Mitte) */
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 10px 16px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: #222;
  margin-bottom: 5px;
  width: 100%;
  text-align: left;
  font-family: var(--body-font);
  color: var(--portal-text-soft);
  font-size: 15.5px;
  transition: color var(--transition);
}
.step-dot {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
  /* OPAK in Kasten-Farbe: die Rail-Linie läuft dahinter durch und ist
     nur ZWISCHEN den Kreisen sichtbar — nie durch den Kreis hindurch */
  background: var(--portal-box-dot);
  border: 1px solid var(--portal-line);
  color: var(--portal-text-soft);
  position: relative;
  z-index: 2;
  transition: all var(--transition);
}
.step:hover:not(.is-locked) { color: var(--portal-text); }

/* ---- Status-Systematik ----
   Erledigt  = gedämpftes Grün + „Erledigt"
   Offen     = Akzent-RING + „Offen"-Pille (Handlungsbedarf)
   Angeklickt (geöffnetes Modul) = Kreis VOLL in Akzent + weißes Label */
.step.is-done .step-dot {
  /* erledigt: Umrandung = gedimmte Timeline-Farbe dieser Zone */
  background: var(--portal-box-dot);
  border-color: var(--tl-done);
  color: var(--portal-text-soft);
}

/* Erledigt-Check rechts, auf der Ebene der To-do/Geplant-Pillen */
.check-state {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--portal-accent);   /* volle Akzentfarbe — hebt sich klar von den Pillen ab */
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
/* Check-Icon (1:1 leaderlogic.de, per Stroke etwas dicker) — Größen pro Kontext */
.ll-check { display: block; width: 10px; height: 10px; }
.sb-box-dot .ll-check { width: 15px; height: 16px; }
.status-pille .ll-check {
  display: inline-block;
  width: 11px; height: 11px;
  vertical-align: -1px;
  margin-right: 8px;
}
.save-check .ll-check { width: 9px; height: 9px; }
.step.is-open .step-dot {
  /* heißeste Zone: Umrandung = volle Timeline-Helligkeit.
     Die ZAHL bleibt gedimmt wie bei allen inaktiven Punkten —
     100% weiß wird sie nur über .is-active-view (angeklickt) */
  border-color: var(--tl-hot);
}
/* Angeklickt = NUR heller: Label weiß + Zahl weiß. Die Kreis-Optik selbst
   ändert sich ausschließlich über den Status (erledigt/offen/gesperrt). */
.step.is-active-view { color: var(--portal-text); font-weight: 500; background: #333; }
.step.is-active-view .step-dot { color: var(--portal-text); }
/* Klickbar erst, wenn etwas vorliegt (z.B. Dokumente ohne Inhalt) */
.step.is-inaktiv { cursor: default; }
.step.is-locked { cursor: default; color: var(--portal-text-faint); }
.step.is-locked .step-dot { color: var(--portal-text-faint); }
.step-label { flex: 1; }
.step-state { font-size: 13px; }
.step.is-done .step-state { color: var(--portal-accent); }

/* „Offen"-Pille — kurz, akzentfarben = hier ist Handlungsbedarf */
.state-pill {
  display: inline-block;
  background: rgba(var(--c-accent-rgb), 0.13);
  border: 1px solid rgba(var(--c-accent-rgb), 0.45);
  color: var(--portal-accent);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
/* Sanduhr solo im Menü (In Vorbereitung) — etwas größer für Erkennbarkeit */
.state-sanduhr { font-size: 19px; line-height: 1; }

/* Neutral (z.B. „Geplant" — Termin steht, kein Handlungsdruck) */
.state-pill--neutral {
  background: rgba(255,255,255,0.06);
  border-color: var(--portal-line);
  color: var(--portal-text-soft);
}

.sidebar-user {
  border-top: 1px solid var(--portal-line);
  padding-top: 16px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--portal-text-faint);
  display: none;   /* Desktop: Profil sitzt oben rechts — mobil unten im Menü */
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sidebar-user a { color: var(--portal-text-soft); text-decoration: none; }
.sidebar-user a:hover { color: var(--portal-text); }

/* =========== MAIN =========== */
.main {
  padding: 22px clamp(24px, 3vw, 48px) 56px 26px;
  min-width: 0;
  /* Bei sehr großen Fenstern: Inhalt nicht endlos breit, sondern
     gedeckelt und mittig in der verfügbaren Fläche */
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

/* Kopfzeile rechts: Profil (gleiche Höhe wie .sidebar-brand → Raster) */
.topbar {
  height: 52px;
  margin-bottom: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 22px;
}
/* Mobile-Bausteine: Logo über dem Inhalt + Begrüßung im Menü + Menü-Kreuz —
   auf Desktop komplett aus */
.main-brand { display: none; }
.sidebar-gruss { display: none; }
.menu-zu { display: none; }

/* Sanftes Hereingleiten von rechts mit elegantem Abbremsen: kurze Distanz
   + Fade (Premium-Standard) — stützt den Flow, statt zu unterbrechen */
@keyframes inhalt-rein {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* Bis zum ersten fertigen Render bleibt die Karten-Hülle unsichtbar —
   sonst blitzt eine leere Fläche auf, die dann „neu aufbaut" (Ruckeln) */
.content-card.wartet { opacity: 0; }
/* easeOutExpo-artig: zügig los, sehr langes weiches Andocken */
.content-card.karte-rein {
  animation: inhalt-rein 0.7s cubic-bezier(0.19, 1, 0.22, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .content-card.karte-rein,
  .portal-notiz-karte { animation: none; }
}

/* Wegklickbare Notiz-Karte (Custom Field Kundenportal-Notiz) über dem Inhalt:
   Info-Icon in Akzent statt farbiger Kante — gleitet wie eine eintreffende
   Nachricht leicht verzögert herein */
.portal-notiz-karte {
  animation: inhalt-rein 0.85s cubic-bezier(0.19, 1, 0.22, 1) both;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #161618;
  border-radius: var(--radius-md);
  padding: 18px 54px 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.portal-notiz-icon {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  color: var(--portal-accent);
  margin-top: 2px;
}
.portal-notiz-icon svg { width: 100%; height: 100%; display: block; }
.portal-notiz-karte p {
  margin: 0;
  color: var(--portal-text);
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.portal-notiz-zu {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: var(--portal-text-faint);
  font-size: 22px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
  transition: color var(--transition);
}
.portal-notiz-zu:hover { color: var(--portal-text); }

/* Persönliche Begrüßung: Hauptzeile in Logo-Größe + Willkommens-Unterzeile */
.topbar-gruss {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}
.gruss-zeile {
  font-family: var(--heading-font);
  font-size: 26px;
  font-weight: 400;
  color: var(--portal-text);
  line-height: 1.15;
}
.gruss-sub {
  font-size: 13.5px;
  color: var(--portal-text-soft);
  margin-top: 2px;
}
.profil-wrap { position: relative; }
.profil {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);        /* Hover-Optik ist der Dauerzustand */
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-pill);
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  font-family: var(--body-font);
  color: var(--portal-text-soft);
  transition: background var(--transition), border-color var(--transition);
}
.profil:hover { background: rgba(255,255,255,0.09); border-color: var(--portal-text-faint); }
.profil-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--portal-text-soft);
  display: grid;
  place-items: center;
}
.profil-avatar svg { width: 17px; height: 17px; }
.profil-mail { font-size: 14px; }
.profil-caret { font-size: 10px; color: var(--portal-text-faint); }
.profil-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: #161618;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  padding: 6px;
  z-index: 40;
  box-shadow: var(--shadow-card);
}
.profil-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--portal-text);
  font: 400 15px var(--body-font);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.profil-menu button:hover { background: rgba(255,255,255,0.06); }

/* Der gesamte Modul-Inhalt in EINEM Kasten (gleiche Ästhetik wie Menü-Kästen) */
.content-card {
  background: radial-gradient(ellipse 110% 75% at 30% -20%, #232325 0%, #161618 55%, #121214 100%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 44px);
  box-shadow: var(--shadow-card);
  position: relative;
}
/* Innere Karten werden im großen Kasten flacher (kein Gradient-auf-Gradient) */
.content-card .card {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.module-head { max-width: 860px; margin-bottom: clamp(24px, 3vw, 40px); }
.module-head .kicker { margin: 0 0 14px; }
.module-head h1 {
  font-size: calc(var(--portal-h1-size) * 0.9);   /* 10% kleiner (Jan, 2026-07-06) */
  font-weight: var(--portal-h1-weight);
  letter-spacing: var(--portal-h1-spacing);
  line-height: 1.1;
  margin-bottom: 14px;
}
.module-head .intro { color: var(--portal-text-soft); font-size: 17px; line-height: 1.6; margin: 0; max-width: 640px; }
/* Orientierung: Modul-Nummer im Kreis. Desktop: neben der Headline.
   Mobile (Media-Query unten): mittig AUF der oberen Kartenkante. */
.head-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.head-title h1 { margin-bottom: 0; }
/* Rubrik (Baustein-Titel) über der Headline — nur auf Mobile sichtbar */
.content-rubrik { display: none; }
.content-nr {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 500;
  background: var(--portal-box-dot);
  border: 1px solid var(--portal-line);
  color: var(--portal-text-soft);
  z-index: 2;
}


.done-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--c-accent-rgb), 0.10);
  border: 1px solid rgba(var(--c-accent-rgb), 0.35);
  color: var(--portal-accent);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 22px;
}
/* Status-Pillen — in ALLEN Karten an derselben Stelle: direkt unter der H1 */
.state-banner,
.status-pille {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 11px;
}
.state-banner {
  background: rgba(var(--c-accent-rgb), 0.13);
  border: 1px solid rgba(var(--c-accent-rgb), 0.45);
  color: var(--portal-accent);
}
.state-banner--neutral {
  background: rgba(255,255,255,0.06);
  border-color: var(--portal-line);
  color: var(--portal-text-soft);
}
.status-pille--done {
  background: var(--portal-accent);
  color: #000;
}

/* =========== TERMIN-MODUL (Kick-off) — Kachel-Maße 1:1 Terminportal =========== */
/* Kachel links NEBEN der Headline; Datum + Buttons darunter */
.termin-hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 760px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.termin-hero-col { flex: 1 1 320px; min-width: 0; }
.termin-hero-col h1 {
  font-size: var(--portal-h1-size);
  font-weight: var(--portal-h1-weight);
  letter-spacing: var(--portal-h1-spacing);
  line-height: 1.1;
  margin: 0 0 12px;
}
.termin-hero .termin-when {
  font-size: 21px;               /* so hoch wie die Geplant-Pille */
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.state-banner--inline { margin: 0; }
.termin-hero .termin-actions { margin-top: 20px; }
.termin-date-badge {
  flex: 0 0 70px;
  width: 70px;
  height: 74px;
  display: grid;
  grid-template-rows: 29px 1fr;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--portal-line);
  background: #1b1b1e;
  color: var(--portal-text);
  text-align: center;
}
.termin-date-badge span {
  display: grid;
  place-items: center;
  color: var(--portal-text-soft);
  background: rgba(255,255,255,0.07);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.termin-date-badge strong {
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.termin-body { flex: 1 1 300px; min-width: 0; }
.termin-titel { font-size: 20px; font-weight: 500; margin: 2px 0 8px; }
.termin-when { margin: 0 0 3px; font-size: 15.5px; color: var(--portal-text); }
.termin-sub { margin: 0 0 18px; font-size: 13.5px; color: var(--portal-text-faint); }
/* Retrospektive unter vergangenen Terminen: die Zielsetzung aus der
   ursprünglichen Buchung (Discovery-Feld) — anzeigen, nicht editierbar */
.termin-retro {
  max-width: 640px;
  margin-top: 20px;
  padding: 16px 19px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--portal-line);
  border-radius: 10px;
}
.termin-retro-label {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--portal-text-faint);
}
.termin-retro-text {
  margin: 0;
  color: var(--portal-text-soft);
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.termin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.termin-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-pill);
  color: var(--portal-text-soft);
  background: rgba(255,255,255,0.05);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.termin-pill:hover { color: var(--portal-text); border-color: var(--portal-text-faint); }
.termin-pill--accent {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: var(--portal-accent-ink);
}
.termin-pill--accent:hover { background: var(--portal-accent-hover); color: var(--portal-accent-ink); }
.termin-pill--danger:hover { border-color: rgba(224, 72, 61, 0.6); color: #ff8a80; }
.termin-pill:disabled { opacity: 0.4; cursor: default; }

/* Flow-Panels unter den Termin-Buttons — linke Flucht = Video-Call-Button
   (Datums-Kachel 70px + 24px Gap) */
.termin-panels { max-width: 760px; margin-top: 26px; margin-left: 94px; }
.termin-panels .terminportal-flow { margin-top: 8px; }
.termin-when.is-struck { text-decoration: line-through; opacity: 0.55; }

.workbook-card--follow { margin-top: 24px; }

/* Teaser (Willkommen): geblurrte Platzhalter-Blöcke + Video-Bild */
.teaser-blur {
  max-width: 720px;
  filter: blur(7px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.teaser-line {
  height: 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.16);
  margin: 13px 0;
}
.teaser-video {
  aspect-ratio: 16 / 9;
  max-width: 540px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #232326, #101012);
  border: 1px solid var(--portal-line);
  display: grid;
  place-items: center;
  margin: 24px 0;
}
.teaser-play {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--portal-text);
  padding-left: 5px;
}

/* Gültigkeits-Hinweis unter der Vereinbarungs-Karte (zeitliche Verknappung) */
.gueltig-hinweis {
  margin: 16px 0 0 4px;
  font-size: 14px;
  color: var(--portal-text-soft);
}
.gueltig-hinweis strong { color: var(--portal-text); font-weight: 500; }
/* In der Dokument-Karte unter dem Button */
.gueltig-hinweis--karte { margin: 14px 0 0; font-size: 13px; }

/* =========== CARDS =========== */
.card {
  background: radial-gradient(ellipse 110% 75% at 30% -20%, #232325 0%, #161618 55%, #121214 100%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-card);
}

/* Workbook */
.workbook-card { max-width: 640px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.workbook-thumb {
  flex: 0 0 96px;
  width: 96px; height: 124px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #1e1e20, #0f0f11);
  border: 1px solid var(--portal-line);
  display: grid;
  place-items: center;
  font-size: 34px;
  color: var(--portal-text-soft);   /* für SVG-Icons (Signatur) */
}
.workbook-thumb svg { width: 42px; height: 42px; }
/* Emoji-Symbol in der Dokument-Kachel: richtig groß (z.B. 📄 Vereinbarung) */
.workbook-thumb .thumb-emoji { font-size: 64px; line-height: 1; }
/* Icons in Aktions-Buttons (Unterzeichnen, Download) */
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
/* Status-Pille IN der Dokument-Karte (To-do / In Vorbereitung / Unterschrieben) */
.dok-pille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--portal-line);
  color: var(--portal-text-soft);
  margin: 0 0 10px;
}
/* Nur HANDLUNGS-Pillen tragen Akzent — Erledigtes (Unterschrieben,
   Bereitgestellt) bleibt grau, allein der Haken leuchtet */
.dok-pille--todo {
  background: var(--portal-accent);
  border-color: transparent;
  color: #000;
}
.dok-pille .ll-check { width: 9px; height: 9px; color: var(--portal-accent); }
/* Haupt-CTA (Jetzt unterzeichnen): eine Stufe größer */
.btn--gross { font-size: 17.5px; padding: 17px 34px; }
.btn--gross svg { width: 19px; height: 19px; }
.workbook-info { flex: 1 1 260px; }
.workbook-info h3 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.workbook-info p { color: var(--portal-text-soft); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }

/* Formular — liegt direkt im Inhalts-Kasten, kein doppelter Rahmen */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; }
/* Meine Daten: alle Feld-Texte (Werte + Labels) in 17px */
.form-grid .field { font-size: 17px; }
.form-grid .ll-field-label { font-size: 17px; }
.form-grid .span-2 { grid-column: span 2; }
.form-field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--portal-text-faint);
  margin-bottom: 7px;
  font-weight: 500;
}
.form-actions { margin-top: 26px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Speicher-Status rechts neben dem Button: Spinner -> ✓ Gespeichert am … */
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--portal-text);
}
.save-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(var(--c-accent-rgb), 0.25);
  border-top-color: var(--portal-accent);
  border-radius: 50%;
  animation: booking-spin 0.7s linear infinite;   /* Keyframes aus booking.css */
}
.save-check {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--portal-accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
}
.save-fehler { color: #ff8a80; font-size: 14px; }
.form-note { font-size: 13.5px; color: var(--portal-text-faint); }

/* =====================================================
   KI-MODUL: Chat + Empfehlung
   ===================================================== */
.duo {
  display: grid;
  grid-template-columns: minmax(380px, 46%) 1fr;
  gap: 24px;
  align-items: start;
}

/* Tabs nur mobil sichtbar */
.duo-tabs { display: none; }

/* ---- Chat ---- */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: min(72vh, 760px);
  padding: 0;
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--portal-line);
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--portal-accent);
  color: var(--portal-accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.chat-head-name { font-size: 15px; font-weight: 500; }
.chat-head-sub { font-size: 12.5px; color: var(--portal-text-soft); }
.chat-head-sub .dot-on {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--portal-accent); margin-right: 5px;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.5;
  animation: bubble-in 0.28s cubic-bezier(.3,1.2,.4,1);
}
@keyframes bubble-in {
  from { opacity: 0.2; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1;   transform: none; }
}
.bubble--ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.07);
  border-bottom-left-radius: 5px;
}
.bubble--user {
  align-self: flex-end;
  background: rgba(var(--c-accent-rgb), 0.16);
  border: 1px solid rgba(var(--c-accent-rgb), 0.22);
  border-bottom-right-radius: 5px;
}
.bubble--typing { display: inline-flex; gap: 5px; padding: 15px 18px; }
.bubble--typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--portal-text-soft);
  animation: typing 1.1s infinite;
}
.bubble--typing i:nth-child(2) { animation-delay: 0.18s; }
.bubble--typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* Upload-Dropzone im Chat-Flow */
.dropzone {
  align-self: stretch;
  border: 1.5px dashed rgba(var(--c-accent-rgb), 0.4);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  color: var(--portal-text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.dropzone:hover { background: rgba(var(--c-accent-rgb), 0.05); }
.dropzone strong { color: var(--portal-text); font-weight: 500; }
.dropzone .sub { font-size: 12.5px; color: var(--portal-text-faint); margin-top: 4px; }
.file-chip {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13.5px;
}

/* Antwort-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 12px; }
.chip {
  border: 1px solid rgba(var(--c-accent-rgb), 0.4);
  background: transparent;
  color: var(--portal-text);
  font-family: var(--body-font);
  font-size: 14px;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.chip:hover { background: rgba(var(--c-accent-rgb), 0.12); }

.chat-composer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--portal-line);
}
.chat-composer .field { flex: 1; padding: 13px 16px; font-size: 16px; border-radius: var(--radius-pill); resize: none; max-height: 120px; }
.chat-send {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--portal-accent);
  color: var(--portal-accent-ink);
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition), transform var(--transition);
}
.chat-send:hover { background: var(--portal-accent-hover); }
.chat-send:active { transform: scale(0.94); }

/* ---- Ergebnis / lebendes Briefing ---- */
.result-panel { padding: 0; overflow: hidden; }
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--portal-line);
}
.result-head h3 { font-size: 17px; font-weight: 500; }
.badge {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  white-space: nowrap;
}
.badge--draft { background: rgba(255,255,255,0.08); color: var(--portal-text-soft); }
.badge--review { background: rgba(var(--c-accent-rgb), 0.14); color: var(--portal-accent); border: 1px solid rgba(var(--c-accent-rgb), 0.4); }

.result-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.result-empty { color: var(--portal-text-faint); font-size: 15px; line-height: 1.6; padding: 18px 0 26px; text-align: center; }

.brief-item { animation: bubble-in 0.35s cubic-bezier(.3,1.2,.4,1); }
.brief-item h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--portal-text-faint);
  margin: 0 0 6px;
  font-weight: 500;
}
.brief-item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--portal-text); }

/* Zielgruppen-Karten */
.persona {
  border: 1px solid var(--portal-line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  animation: bubble-in 0.35s cubic-bezier(.3,1.2,.4,1);
}
.persona.is-reco { border-color: rgba(var(--c-accent-rgb), 0.55); background: rgba(var(--c-accent-rgb), 0.05); }
.persona-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--portal-accent);
  font-weight: 500;
  margin-bottom: 6px;
}
.persona h4 { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.persona p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--portal-text-soft); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1180px) {
  .duo { grid-template-columns: 1fr; }
  .duo-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
  }
  .duo-tab {
    flex: 1;
    border: 1px solid var(--portal-line);
    background: transparent;
    color: var(--portal-text-soft);
    font-family: var(--body-font);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    padding: 11px 16px;
    cursor: pointer;
  }
  .duo-tab.is-active {
    background: var(--portal-accent);
    border-color: var(--portal-accent);
    color: var(--portal-accent-ink);
  }
  .duo[data-view="chat"] .result-panel { display: none; }
  .duo[data-view="result"] .chat-panel { display: none; }
}

/* Burger — nur mobil und nur wenn das Menü zu ist */
.burger {
  display: none;
  position: fixed;
  top: 14px; right: 14px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--portal-line);
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.burger span {
  display: block;
  width: 16px; height: 1.6px;
  background: var(--portal-text);
  border-radius: 2px;
}

/* =========== VERTIKALES LAYOUT-RASTER — EIN Rhythmus für alle Karten ======
   Überschreibt die historisch gewachsenen Einzelwerte mit den --r-*-Tokens
   (tokens.css, 4px-Basis). Hochwertigkeit = überall derselbe Takt:
   Titel →(xs) Pille →(s) Text →(m) Aktion · Blöcke/Karten im l-Abstand. */
.head-title { margin-bottom: var(--r-s); }
.state-banner,
.status-pille { margin-bottom: var(--r-s); }
.module-head { margin-bottom: var(--r-l); }
.module-head .intro { max-width: 640px; }

/* Termin-Karten */
.termin-hero { margin-top: var(--r-xs); }
.termin-when { margin-bottom: 4px; }
.termin-sub { margin-bottom: var(--r-m); }
.termin-hero .termin-actions { margin-top: var(--r-m); }
.termin-retro { margin-top: var(--r-m); }
.termin-retro-label { margin-bottom: var(--r-xs); }

/* Dokument-/Workbook-Karten: Titel → Pille → Text → Button im festen Takt,
   Text klebt nie am Button, letzte Zeile erzeugt keinen Schiefstand */
.workbook-card--follow { margin-top: var(--r-m); }
.workbook-info h3 { margin-bottom: var(--r-xs); }
.dok-pille { margin: 0 0 var(--r-s); }
.workbook-info p { margin: 0 0 var(--r-m); }
.workbook-info p:last-child { margin-bottom: 0; }
.gueltig-hinweis--karte { margin-top: var(--r-s); }

/* Formular */
.form-actions { margin-top: var(--r-l); }

@media (max-width: 900px) {
  /* KEIN horizontales Schwimmen: die 200vw-Fläche darf nur der Burger bewegen,
     nicht der Finger (clip verhindert Panning, pan-y erlaubt nur vertikal) */
  html, body { overflow-x: clip; }
  .portal { touch-action: pan-y; }

  /* ECHTES Schieben: Menü + Inhalt liegen nebeneinander auf einer 2-Screens-
     breiten Fläche. Das Menü kommt von RECHTS herein (der Burger sitzt rechts
     oben): Inhalt links, Menü rechts — Menü offen = Fläche nach links geschoben. */
  .portal {
    display: flex;
    width: 200vw;
    max-width: none;    /* Desktop-Deckel gilt mobil nicht (2-Screens-Fläche!) */
    margin: 0;
    transform: translateX(-100vw);
    transition: transform 0.38s cubic-bezier(.4,0,.2,1);
  }
  body.menu-closed .portal { transform: translateX(0); }
  /* Drag-Geste: während des Ziehens folgt die Fläche dem Finger ohne
     Transition; beim Loslassen schnappt sie mit weichem Ausrollen ein */
  .portal.is-dragging { transition: none; }
  .portal.is-snapping { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

  .sidebar {
    order: 2;             /* Menü liegt RECHTS neben dem Inhalt */
    flex: 0 0 100vw;
    width: 100vw;
    height: 100dvh;
    border-right: none;
    padding: 24px 20px calc(16px + env(safe-area-inset-bottom));
  }
  .main {
    flex: 0 0 100vw;
    width: 100vw;
    padding-top: 20px;
  }

  /* Logo links oben ÜBER dem Inhalt (scrollt mit, schiebt mit dem Panel);
     im Menü ersetzt die persönliche Begrüßung das Logo */
  .main-brand { display: block; padding: 4px 20px 22px; }
  .sidebar .sidebar-brand { display: none; }
  .sidebar-gruss {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 26px;
  }
  .sidebar-gruss .gruss-zeile { font-size: 24px; }

  body.menu-closed .burger { display: flex; }

  /* Kreuz oben rechts IM Menü (fixed wirkt durch den transformierten .portal
     relativ zur 200vw-Fläche -> klebt an der rechten Kante des Menü-Panels
     und bleibt beim Scrollen sichtbar) */
  .menu-zu {
    display: grid;
    place-items: center;
    position: fixed;
    top: 14px; right: 14px;
    z-index: 60;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--portal-text);
    cursor: pointer;
  }
  .menu-zu svg { width: 20px; height: 20px; }

  /* Der Abdunklungs-Verlauf unten springt auf Mobile wie ein Fehler -> weg */
  .sidebar::after { display: none; }

  /* Buttons einzeilig halten: kompakter + kein Umbruch */
  .btn {
    font-size: 14.5px;
    padding: 12px 18px;
    white-space: nowrap;
  }
  .btn--gross { font-size: 15.5px; padding: 13px 20px; }
  .btn svg { width: 15px; height: 15px; }
  .termin-pill { white-space: nowrap; }

  /* Rubrik über der Headline (z.B. „Onboarding") — Orientierung auf Mobile */
  .content-rubrik {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--portal-text-faint);
    margin: 4px 0 8px;
  }
  /* Nummer-Kreis auf Mobile: rechts oben IN der Inhaltskarte, 30% größer.
     Headline + Rubrik bekommen rechts Freiraum, damit nichts drunterläuft */
  .head-title { display: block; margin-top: 2px; }
  .head-title h1,
  .content-rubrik { padding-right: 64px; }
  .content-nr {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 57px; height: 57px;
    font-size: 23px;
  }

  .bausteine { gap: 12px; }
  .termin-panels { margin-left: 0; }
  .topbar { display: none; }              /* Profil mobil unten im Voll-Menü */
  .sidebar-user { display: flex; }
  .content-card { padding: 20px 18px 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .chat-panel { height: 68vh; }
}
