/* ============ Salesium Network — Premium UI (folgt dem System: Dunkel & Hell) ============ */
/* ============ SALESIUM — Black Metal. Modern Gold. White Reflection. ============
 * Tiefschwarz als Basis, Anthrazit für Flächen, entsättigtes Metallgold als Akzent.
 * Weiß ist KEINE eigene Farbe, sondern Licht: Kantenglanz, Reflexion, Spiegelung.
 * Gold wird sparsam gesetzt — aktive Elemente, Fortschritt, Kennzahlen, Premium.
 */
:root {
  color-scheme: dark;
  /* --- Schwarzstufen: nie flach, immer eine Nuance Unterschied --- */
  --bg: #08090b;
  --bg-elev: #0e1013;
  --bg-card: #131519;
  --bg-card-hover: #191c21;
  --border: #24272d;
  --border-soft: #1a1d22;
  /* --- Weiß als Licht --- */
  --text: #f1f3f6;
  --text-dim: #a5abb4;
  --text-faint: #6d737c;
  --glanz: rgba(255, 255, 255, 0.02);     /* Kantenlicht — dezent, kein Leuchten */
  --glanz-stark: rgba(255, 255, 255, 0.035);
  /* --- Metallgold: satt genug, um wie Metall zu wirken, aber nie gelb-grell --- */
  --gold: #dcb055;
  --gold-hi: #f7e7b0;                       /* Lichtkante */
  --gold-lo: #94742a;                       /* Schattenseite */
  --gold-soft: rgba(220, 176, 85, 0.13);
  /* Der Schimmer: EIN Gold, das das Licht fängt — die Stopps liegen nah beieinander,
   * es entsteht Metallglanz statt eines Hell-Dunkel-Streifens. Trägt alle goldenen
   * Flächen (Knöpfe, Balken, Plaketten). */
  --gold-schimmer: linear-gradient(118deg, #eec570 0%, #dcb055 32%, #cda241 56%, #e9bf68 78%, #d8ab4e 100%);
  /* Volles Metall: bleibt allein dem Podiumsplatz 1 vorbehalten. */
  --gold-metall: linear-gradient(135deg, #fbf0c4 0%, #dcb055 32%, #8a6a1f 58%, #e9d493 82%, #c79c3e 100%);
  /* --- Statusfarben: klar erkennbar, aber nicht Signalfarbe --- */
  --green: #46cd88;
  --green-soft: rgba(70, 205, 136, 0.14);
  --red: #e85c4f;
  --red-soft: rgba(232, 92, 79, 0.14);
  --blue: #5cb8b0;
  --blue-soft: rgba(92, 184, 176, 0.14);
  --purple: #ac72ec;
  --bubble-mine: #1c2026;
  /* Der Hero trägt die Ligafarbe: --liga wird pro Mitglied im Markup gesetzt. */
  --liga: var(--gold);
  --liga-dunkel: var(--gold-lo);
  --hero-grad: var(--bg-card);
  --topbar-bg: rgba(8, 9, 11, 0.86);
  --tabbar-bg: rgba(14, 16, 19, 0.96);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============ Ligafarben: je Liga eine eigene Farbe, metallisch gedacht ============ */
:root {
  --lv-starter: #a3aab3;      --lv-starter-d: #5a616a;      /* Grau */
  --lv-challenger: #bd7f3e;   --lv-challenger-d: #704820;   /* Braun */
  --lv-performer: #4d9fe6;    --lv-performer-d: #2b62a0;    /* Blau */
  --lv-elite: #e8bf58;        --lv-elite-d: #94742a;        /* Gold */
  --lv-titan: #3fc789;        --lv-titan-d: #25805a;        /* Grün */
  --lv-legend: #ac72ec;       --lv-legend-d: #6541b0;       /* Lila */
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --lv-starter: #5b626b;    --lv-performer: #1f6cb5;   --lv-titan: #0f8353;
    --lv-challenger: #8f5a20; --lv-elite: #a37d20;       --lv-legend: #6a41bd;
  }
}
:root[data-theme="light"] {
  --lv-starter: #5b626b;    --lv-performer: #1f6cb5;   --lv-titan: #0f8353;
  --lv-challenger: #8f5a20; --lv-elite: #a37d20;       --lv-legend: #6a41bd;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Heller Modus: gleiche Struktur, helle Palette — folgt automatisch der Systemeinstellung */
/* ============ Design-Modus ============
 * Standard: folgt dem System. In den Einstellungen kann pro Gerät
 * Hell oder Dunkel erzwungen werden (html[data-theme]).
 * WICHTIG: Die beiden hellen Blöcke (Media-Query + data-theme) müssen
 * inhaltlich identisch bleiben.
 */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2f3f5;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f7f8fa;
    --border: #d5d8dd;
    --border-soft: #e5e7eb;
    --text: #16181c;
    --text-dim: #545a63;
    --text-faint: #868d97;
    --glanz: rgba(255, 255, 255, 0.9);
    --glanz-stark: rgba(255, 255, 255, 1);
    --gold: #a37d20;
    --gold-hi: #c9a544;
    --gold-lo: #6e551c;
    --gold-soft: rgba(163, 125, 32, 0.11);
    --gold-schimmer: linear-gradient(118deg, #b98f28 0%, #a37d20 32%, #90701a 56%, #b28927 78%, #a67f21 100%);
    --gold-metall: linear-gradient(135deg, #d6b348 0%, #a37d20 40%, #6e551c 70%, #c7a238 100%);
    --green: #08904f;
    --green-soft: rgba(8, 144, 79, 0.12);
    --red: #c72f24;
    --red-soft: rgba(199, 47, 36, 0.12);
    --blue: #1d8175;
    --blue-soft: rgba(29, 129, 117, 0.12);
    --purple: #6a41bd;
    --bubble-mine: #eceff3;
    --hero-grad: var(--bg-card);
    --topbar-bg: rgba(242, 243, 245, 0.86);
    --tabbar-bg: rgba(255, 255, 255, 0.96);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3f5;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f8fa;
  --border: #d5d8dd;
  --border-soft: #e5e7eb;
  --text: #16181c;
  --text-dim: #545a63;
  --text-faint: #868d97;
  --glanz: rgba(255, 255, 255, 0.9);
  --glanz-stark: rgba(255, 255, 255, 1);
  --gold: #a37d20;
  --gold-hi: #c9a544;
  --gold-lo: #6e551c;
  --gold-soft: rgba(163, 125, 32, 0.11);
  --gold-schimmer: linear-gradient(118deg, #b98f28 0%, #a37d20 32%, #90701a 56%, #b28927 78%, #a67f21 100%);
  --gold-metall: linear-gradient(135deg, #d6b348 0%, #a37d20 40%, #6e551c 70%, #c7a238 100%);
  --green: #08904f;
  --green-soft: rgba(8, 144, 79, 0.12);
  --red: #c72f24;
  --red-soft: rgba(199, 47, 36, 0.12);
  --blue: #1d8175;
  --blue-soft: rgba(29, 129, 117, 0.12);
  --purple: #6a41bd;
  --bubble-mine: #eceff3;
  --hero-grad: var(--bg-card);
  --topbar-bg: rgba(242, 243, 245, 0.86);
  --tabbar-bg: rgba(255, 255, 255, 0.96);
}


button { font-family: inherit; cursor: pointer; }
/* Alle Eingabefelder folgen dem Theme — auch ohne .field/.input-Wrapper (z. B. Chat-Eingabe) */
input, select, textarea { font-family: inherit; font-size: 14px; }
/* iOS zoomt bei Eingabefeldern unter 16px automatisch hinein — auf Touch-Geräten deshalb 16px */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; }
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
/* Checkboxen & Radios: deutlich sichtbar, einheitlich gold */
input[type="checkbox"], input[type="radio"] {
  width: 22px !important; height: 22px !important;
  min-width: 22px;
  accent-color: var(--gold);
  flex-shrink: 0; margin: 0;
  cursor: pointer;
}
textarea { width: 100%; resize: vertical; }
::placeholder { color: var(--text-faint); opacity: 1; }
a { color: var(--gold); text-decoration: none; }
.hidden { display: none !important; }

#app { display: flex; min-height: 100vh; }

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elev);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  /* Salesium-Logo (goldenes S, transparent) statt Text-Platzhalter */
  background: url("/logo-mark.png") center / contain no-repeat;
  color: transparent; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 14px; }
.brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: 2px; text-transform: uppercase; }

.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none; background: none;
  color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg-card); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, var(--gold-soft), transparent 70%);
  color: var(--gold);
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-item svg { flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
}
.nav-section {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--text-faint); padding: 16px 12px 6px;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar { flex-shrink: 0; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-status { font-size: 11px; color: var(--text-faint); }
.logout-btn {
  background: none; border: none; color: var(--text-faint);
  padding: 6px; border-radius: 7px;
}
.logout-btn:hover { color: var(--red); background: var(--red-soft); }

/* ============ Main / Topbar ============ */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.main.no-sidebar { margin-left: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim);
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--text-faint); }
.notif-dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg);
}

.view { flex: 1; padding: 26px 28px 60px; max-width: 1060px; width: 100%; margin: 0 auto; min-width: 0; }

/* ============ Tabbar (mobile) ============ */
.tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--tabbar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  z-index: 50;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.tab-item {
  background: none; border: none;
  color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600;
  padding: 6px 10px; border-radius: 9px;
  flex: 1; max-width: 84px;
}
.tab-item.active { color: var(--gold); }

/* ============ Cards & general ============ */
/* Karte = ruhige, dunkle Fläche — gleiche Zurückhaltung wie die Ranking-Zeilen.
 * Kein Verlauf, kein Lichtschleier: nur ein Hauch Kantenlicht und ein weicher Schatten. */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  min-width: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
:root[data-theme="light"] .card, :root:not([data-theme="dark"]) .card {
  box-shadow: 0 1px 3px rgba(20, 24, 30, 0.07), 0 6px 18px rgba(20, 24, 30, 0.05);
}
.card-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-link { font-size: 12px; font-weight: 600; color: var(--gold); background: none; border: none; letter-spacing: 0; text-transform: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.page-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.page-head p { color: var(--text-dim); font-size: 14px; margin-top: 3px; max-width: 560px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
/* Einheitlicher Hover für ALLE Buttons: goldener Rand + leichtes Anheben (wie die Abo-Karten) */
.btn:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; transform: translateY(-1px); }
/* Gold ist EINE Farbe, kein Verlauf: keine Hell-Dunkel-Sprünge auf der Fläche. */
.btn-primary {
  background: var(--gold-schimmer); color: #141210;
  border-color: var(--gold-lo);
  box-shadow: none;
  text-shadow: none;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: none; }
.btn-secondary {
  background: var(--bg-card-hover);
  border-color: var(--border); color: var(--text);
}
:root[data-theme="light"] .btn-secondary { background: var(--bg-card); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn-secondary { background: var(--bg-card); } }
.btn-ghost { background: none; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-success { background: var(--green-soft); color: var(--green); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============ Status badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 4px 11px; border-radius: 99px;
  border: 1px solid;
}
.badge-sm { font-size: 10px; padding: 2px 8px; }
.badge.lv-starter    { color: var(--lv-starter);    border-color: var(--lv-starter-d);    background: rgba(141,148,156,0.09); }
.badge.lv-challenger { color: var(--lv-challenger); border-color: var(--lv-challenger-d); background: rgba(189,127,62,0.10); }
.badge.lv-performer  { color: var(--lv-performer);  border-color: var(--lv-performer-d);  background: rgba(77,159,230,0.10); }
.badge.lv-elite      { color: var(--lv-elite);      border-color: var(--lv-elite-d);      background: rgba(232,191,88,0.11); }
.badge.lv-titan      { color: var(--lv-titan);      border-color: var(--lv-titan-d);      background: rgba(63,199,137,0.10); }
.badge.lv-legend     { color: var(--lv-legend);     border-color: var(--lv-legend-d);     background: rgba(172,114,236,0.12); }
.badge.b-neutral { color: var(--text-dim); border-color: var(--border); background: var(--bg-elev); }
.badge.b-green { color: var(--green); border-color: rgba(70,205,136,0.34); background: var(--green-soft); }
.badge.b-red { color: var(--red); border-color: rgba(232,92,79,0.34); background: var(--red-soft); }
.badge.b-gold { color: var(--gold); border-color: rgba(220,176,85,0.38); background: var(--gold-soft); }

/* ============ Avatar ============ */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}
.avatar-lg { width: 74px; height: 74px; font-size: 24px; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.anon { background: #1a1d22 !important; color: var(--text-faint); border: 1px dashed var(--border); }

/* ============ Home dashboard ============ */
.status-hero {
  background: var(--hero-grad);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hero-greet { font-size: 14px; color: var(--text-dim); }
.hero-level { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin: 2px 0 4px; }
.hero-avg { font-size: 14px; color: var(--text-dim); }
.hero-avg strong { color: var(--text); font-size: 16px; }
.hero-ranks { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.rank-chip {
  background: rgba(255,255,255,0.018); border: 1px solid var(--border);
  border-radius: 11px; padding: 10px 16px;
  min-width: 130px;
}
.rank-chip .rc-label { font-size: 11px; color: var(--text-faint); letter-spacing: 0.8px; text-transform: uppercase; }
.rank-chip .rc-value { font-size: 19px; font-weight: 800; margin-top: 1px; }
.rank-chip .rc-value span { font-size: 12px; color: var(--text-faint); font-weight: 500; }

.progress-wrap { margin-top: 20px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; }
.progress-labels strong { color: var(--gold); }
.progress-bar {
  height: 9px; border-radius: 99px; background: var(--border); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: var(--gold-schimmer);
  transition: width 0.6s ease;
}

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: none; padding-bottom: 0; }
.list-row:first-of-type { padding-top: 2px; }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-sub { font-size: 12px; color: var(--text-faint); }
.lr-end { text-align: right; flex-shrink: 0; }
.lr-amount { font-weight: 700; font-size: 14px; }

/* ============ Ranking table ============ */
.rank-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 6px;
  background: var(--bg-card);
}
.rank-row.me { border-color: rgba(220,176,85,0.45); background: linear-gradient(90deg, rgba(220,176,85,0.07), var(--bg-card)); }
.rank-pos {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  background: var(--bg-elev); color: var(--text-dim);
  flex-shrink: 0;
}
.rank-pos.top1 { background: var(--gold-metall); color: #141210; box-shadow: inset 0 1px 0 rgba(255,255,255,0.26); }
.rank-pos.top2 { background: linear-gradient(135deg,#e2e8ef,#9aa4b1); color: #14171b; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.rank-pos.top3 { background: linear-gradient(135deg,#c98f5c,#7a5230); color: #17100a; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }
.rank-name { font-weight: 600; font-size: 14px; }
.rank-meta { font-size: 12px; color: var(--text-faint); }
.rank-liga { flex-shrink: 0; display: flex; justify-content: center; align-items: center; min-width: 66px; }
.rank-amount { font-weight: 800; font-size: 15px; text-align: right; flex-shrink: 0; min-width: 104px; }
.rank-amount small { display: block; font-size: 11px; color: var(--text-faint); font-weight: 500; }
/* Schmale Screens (Handy): Liga-Badge in eigene Zeile unter den Namen, damit nichts überlappt */
@media (max-width: 600px) {
  .rank-row { flex-wrap: wrap; row-gap: 4px; }
  .rank-amount { min-width: 0; margin-left: auto; }
  .rank-liga { order: 10; flex-basis: 100%; justify-content: flex-start; padding-left: 102px; min-width: 0; }
}

/* ============ Filters ============ */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 99px;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--gold-soft); border-color: rgba(220,176,85,0.5); color: var(--gold); font-weight: 600; }

/* ============ Feed ============ */
.post-card { padding: 18px 20px; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.post-author { font-weight: 700; font-size: 14px; }
.post-meta { font-size: 12px; color: var(--text-faint); }
.post-body { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }
.post-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.post-actions {
  display: flex; gap: 4px; margin-top: 13px; padding-top: 11px;
  border-top: 1px solid var(--border-soft);
}
.post-action {
  background: none; border: none; color: var(--text-faint);
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 6px 11px; border-radius: 8px;
}
.post-action:hover { background: var(--bg-elev); color: var(--text); }
.post-action.liked { color: var(--gold); }
.post-action.saved { color: var(--blue); }

.comments { margin-top: 12px; padding-top: 4px; }
/* Kommentarliste bei vielen Einträgen scrollbar — Eingabefeld darunter bleibt sichtbar */
.comments-scroll { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }

/* Standortanalyse: Kompetenzfeld + 1–10-Skala */
.sa-feld { background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; }
.sa-nr { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 12px; flex-shrink: 0; }
.sa-dot { flex: 1; min-width: 26px; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-faint); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.sa-dot:hover { border-color: var(--gold); }
.sa-dot.aktiv { background: var(--gold-schimmer); color: #141210; border-color: var(--gold-lo); }
.sa-trenner { height: 1px; background: var(--border-soft); margin: 18px 0 14px; }
.sa-tab { background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; }
.sa-tab-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 13px; color: var(--text-dim); border-top: 1px solid var(--border-soft); }
.sa-tab-row:first-child { border-top: none; }
.sa-tab-val { font-weight: 800; min-width: 28px; text-align: right; color: var(--text); }
.sa-tab-sum { background: rgba(127,127,127,0.06); }
.comment { display: flex; gap: 9px; padding: 7px 0; }
.comment-bubble {
  background: var(--bg-elev); border-radius: 11px; padding: 8px 13px; flex: 1;
}
.comment-author { font-size: 12.5px; font-weight: 700; }
.comment-text { font-size: 13.5px; }
.comment-input-row { display: flex; gap: 9px; margin-top: 8px; }
.comment-input-row input { flex: 1; }

/* ============ Composer ============ */
.composer { display: flex; gap: 12px; align-items: flex-start; }
.composer-input {
  flex: 1;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 11px; color: var(--text);
  padding: 11px 15px; font-size: 14px;
  text-align: left; cursor: pointer;
}
.composer-input:hover { border-color: var(--text-faint); }
.composer-input.placeholder { color: var(--text-faint); }

/* ============ Forms ============ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.field .req { color: var(--red); }
.input, .field input[type=text], .field input[type=number], .field input[type=email],
.field input[type=password], .field input[type=date], .field input[type=month],
.field input[type=time], .field select, .field textarea {
  width: 100%;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 84px; }
.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.file-drop {
  border: 1.5px dashed var(--border); border-radius: 11px;
  padding: 18px; text-align: center; color: var(--text-faint);
  font-size: 13px; cursor: pointer; transition: border-color 0.15s;
  background: var(--bg-elev);
}
.file-drop:hover { border-color: var(--gold); color: var(--text-dim); }
.file-drop.has-file { border-color: var(--green); color: var(--green); border-style: solid; }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto;
  padding: 24px;
  animation: slideUp 0.2s ease;
}
.modal-wide { max-width: 640px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h2 { font-size: 18px; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-faint); font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 7px; }
.modal-close:hover { color: var(--text); background: var(--bg-elev); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }

/* ============ Toast ============ */
/* Oben statt unten: so verdeckt weder Tastatur noch Tab-Leiste die Meldung */
#toast-root { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 480px); }
@keyframes slideDown { from { transform: translateY(-14px); opacity: 0; } }

/* Kleine Aktivitäts-Popups oben rechts (neue Nachricht, Event …) */
#notif-toast-root { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 320; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-width: min(86vw, 330px); pointer-events: none; }
.notif-toast { display: flex; align-items: flex-start; gap: 9px; background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 12px; padding: 10px 13px; box-shadow: 0 10px 34px rgba(0,0,0,0.42); font-size: 13px; line-height: 1.4; transform: translateX(120%); opacity: 0; transition: transform 0.32s ease, opacity 0.32s ease; }
.notif-toast.show { transform: translateX(0); opacity: 1; }
.notif-toast .nt-icon { flex-shrink: 0; font-size: 15px; line-height: 1.3; }
.notif-toast .nt-text { color: var(--text); }
.toast {
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.45;
  padding: 13px 20px; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  animation: slideDown 0.2s ease;
  display: flex; align-items: flex-start; gap: 9px;
  max-width: 100%;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); background: var(--bg-card); color: var(--text); }

/* ============ Login ============ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 45% at 70% 0%, rgba(220,176,85,0.07), transparent),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(92,184,176,0.05), transparent),
    var(--bg);
}
.login-box { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 30px; }
.login-brand .brand-mark { width: 64px; height: 64px; font-size: 21px; border-radius: 17px; margin: 0 auto 16px; }
/* Volles Salesium-Logo (transparent) auf Login/Registrierung — dezenter Schatten für Lesbarkeit im Hell-Modus */
.login-logo { width: 250px; max-width: 78%; display: block; margin: 0 auto 6px; filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.35)); }
.login-brand h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.login-brand p { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.login-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 18px; padding: 26px; }
/* Alle Felder der Login-/Registrierungskarte füllen die volle Breite — sonst wird ein <select>
   so breit wie seine längste Option (z. B. „Ich nutze Salesium …") und läuft aus dem Kasten. */
.login-card input:not([type=checkbox]):not([type=radio]), .login-card select, .login-card textarea { width: 100%; max-width: 100%; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.demo-user {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; margin-bottom: 8px;
  color: var(--text); text-align: left;
  transition: border-color 0.15s;
}
.demo-user:hover { border-color: var(--gold); }
.demo-user-name { font-weight: 600; font-size: 14px; }
.demo-user-sub { font-size: 12px; color: var(--text-faint); }

/* ============ Onboarding ============ */
.steps { display: flex; gap: 6px; margin-bottom: 26px; }
.step-dot { flex: 1; height: 4px; border-radius: 99px; background: var(--border); }
.step-dot.done { background: var(--gold); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card {
  background: var(--bg-elev); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px; text-align: left;
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: border-color 0.15s;
}
.choice-card:hover { border-color: var(--text-faint); }
.choice-card.selected { border-color: var(--gold); background: var(--gold-soft); }
.choice-card .cc-sub { display: block; font-size: 12px; color: var(--text-faint); font-weight: 400; margin-top: 3px; }

/* ============ Circles / chat ============ */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 235px); min-height: 380px; }
.chat-wrap.circle-chat { height: calc(100vh - 380px); min-height: 260px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 6px 2px; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-bubble {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 13px; padding: 9px 14px; max-width: 72%;
}
.chat-msg.mine .chat-bubble { background: var(--bubble-mine); border-color: rgba(220,176,85,0.25); }
.chat-author { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 2px; }
.chat-text { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.chat-time { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; }
.chat-report {
  background: none; border: none; padding: 0 0 0 8px;
  font-size: 10.5px; color: var(--text-faint); opacity: 0.55; cursor: pointer;
}
.chat-report:hover { opacity: 1; color: var(--red); }
.chat-input-row { display: flex; gap: 9px; padding-top: 12px; }
.chat-input-row input { flex: 1; }
.pinned-bar {
  background: var(--gold-soft); border: 1px solid rgba(220,176,85,0.3);
  border-radius: 10px; padding: 9px 14px; font-size: 13px;
  margin-bottom: 12px; display: flex; gap: 9px; align-items: center;
  color: var(--gold);
}

/* ============ Misc ============ */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-soft); border-radius: 13px; padding: 15px 17px;
}
.stat-tile .st-value { font-size: 22px; font-weight: 800; }
.stat-tile .st-label { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Globaler Lade-Indikator (Spinner-Overlay) */
#busy-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(4,5,7,0.44); z-index: 5000; }
#busy-overlay.on { display: flex; }
.busy-box { display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px 26px; box-shadow: 0 10px 34px rgba(0,0,0,0.35); }
.busy-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-soft); border-top-color: var(--gold); animation: busy-spin 0.7s linear infinite; }
.busy-text { font-size: 13.5px; color: var(--text-dim); font-weight: 600; }
.busy-text:empty { display: none; }
@keyframes busy-spin { to { transform: rotate(360deg); } }

/* Zielrechner: alle Zielzahlen gebündelt in einem Kasten, Tippen erklärt die Zahl */
.ziel-kasten .ziel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ziel-tile { background: var(--bg-elev, var(--bg-card)); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: border-color .15s, background .15s; }
.ziel-tile:hover { border-color: var(--gold); }
.ziel-tile .st-value { font-size: 21px; font-weight: 800; }
.ziel-tile .st-label { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.ziel-tile .ziel-info { display: none; font-size: 12px; color: var(--text-dim); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); line-height: 1.4; }
.ziel-tile.offen { border-color: var(--gold); background: var(--gold-soft); }
.ziel-tile.offen .ziel-info { display: block; }

/* Abo: 3-Spalten-Preistabelle (Free / Premium=Beliebteste / Mentoring) */
.paket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; align-items: start; }
.paket-card { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: 20px 16px; background: var(--bg-elev, var(--bg-card)); display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s, transform .15s; }
/* Hover: Rahmen erscheint schon beim Drüberfahren (vor dem Klick) */
.paket-card:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; transform: translateY(-2px); }
.paket-card.paket-pop { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; padding-top: 26px; }
.paket-card.paket-aktiv { outline: 2px solid var(--green); outline-offset: -1px; }
.paket-badge { position: absolute; top: -10px; left: 16px; background: var(--gold-schimmer); color: #141210; font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; padding: 3px 9px; border-radius: 6px; }
.paket-badge.paket-badge-neutral { background: var(--bg-elev); color: var(--text-dim); border: 1px solid var(--border); }
/* Kurzes Aufblinken, wenn der Kauf-CTA zur Paket-Karte scrollt */
.pitch-blink { animation: pitchBlink 0.8s ease-in-out 2; }
@keyframes pitchBlink { 50% { box-shadow: 0 0 0 3px var(--gold); } }
.paket-card { padding-top: 26px; } /* Platz für Badges auf allen Karten */
.paket-name { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); }
/* Paket-Identität über die Farbe: Free grau, Premium hell/prägnant, Mentoring gold —
   Rahmenfarbe passt jeweils zum Titel */
.paket-free { border-color: var(--border); }
.paket-free .paket-name, .paket-free .paket-preis { color: var(--text-faint); }
.paket-premium { border-color: rgba(154, 165, 184, 0.75); box-shadow: 0 0 0 1px rgba(154, 165, 184, 0.35) inset; }
.paket-premium .paket-name, .paket-premium .paket-preis { color: var(--text); }
.paket-premium .paket-name { font-size: 13px; }
.paket-mentoring, .paket-card.paket-mentoring.paket-pop { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.paket-mentoring .paket-name, .paket-mentoring .paket-preis { color: var(--gold); }
.paket-card.paket-free:hover { border-color: var(--text-faint); box-shadow: 0 0 0 1px var(--text-faint) inset; }
.paket-card.paket-premium:hover { border-color: var(--text-dim); box-shadow: 0 0 0 1px var(--text-dim) inset; }
.paket-preis { font-size: 30px; font-weight: 800; margin-top: 4px; line-height: 1.1; }
.paket-mentoring .paket-preis { font-size: 21px; padding: 6px 0 3px; }
.paket-preis span { font-size: 13px; font-weight: 500; color: var(--text-faint); }
.paket-ust { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.paket-kond { font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.paket-identitaet { font-size: 12.5px; color: var(--text-dim); font-style: italic; line-height: 1.45; margin: 10px 0 0; padding: 8px 10px; background: rgba(127, 127, 127, 0.07); border-radius: 8px; }
.paket-mentoring .paket-identitaet { background: var(--gold-soft); color: var(--text); }
.paket-features { list-style: none; margin: 14px 0 16px; padding: 0; }
.paket-features li { position: relative; padding-left: 18px; font-size: 13px; color: var(--text-dim); line-height: 1.35; margin-bottom: 8px; }
/* Aufzählungs-Striche in der Farbe des jeweiligen Pakettitels */
.paket-features li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.paket-free .paket-features li::before { color: var(--text-faint); }
.paket-premium .paket-features li::before { color: var(--text); }
.paket-cta { width: 100%; margin-top: auto; }
/* Weißer Premium-CTA („Jetzt upgraden") */
.paket-cta-weiss { background: #ffffff; color: #1a150d; border: 1px solid rgba(0, 0, 0, 0.15); font-weight: 700; }
.paket-cta-weiss:hover { background: #f1f3f6; transform: translateY(-1px); }
.paket-current { margin-top: auto; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--green); padding: 9px 0; }
@media (max-width: 720px) {
  .paket-grid { grid-template-columns: 1fr; }
  .paket-card.paket-pop { padding-top: 26px; }
}

/* Abo: Testimonial-Carousel (Bild/Video, Sterne, Vorher→Nachher) */
.testi-slide { background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px 18px; }
.testi-foto { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--gold); }
.testi-foto-platzhalter { display: flex; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 20px; }
/* Anhang-Bild (z. B. Ergebnis-Screenshot) unter dem Testimonial */
.testi-anhang { display: block; width: 100%; max-height: 340px; object-fit: contain; border-radius: 10px; margin-top: 12px; border: 1px solid var(--border-soft); background: var(--bg-elev); cursor: zoom-in; }
.testi-vergleich { display: flex; align-items: stretch; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(220,176,85, 0.4); background: var(--gold-soft); flex-wrap: wrap; }
.testi-vergleich-teil { flex: 1; min-width: 140px; }
.testi-vergleich-pfeil { display: flex; align-items: center; font-size: 20px; font-weight: 800; color: var(--gold); }
.tv-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.tv-wert { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.testi-vergleich-teil.tv-nachher .tv-wert { color: var(--gold); font-weight: 800; }
.testi-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.testi-dots { display: flex; gap: 7px; }
.testi-dot { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: var(--border); cursor: pointer; transition: background .15s, transform .15s; }
.testi-dot.aktiv { background: var(--gold); transform: scale(1.25); }

/* Input Hub: Video-Thumbnail links in der Karteikarte */
.hub-thumb { position: relative; width: 118px; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--bg-elev); }
/* Bild liegt ÜBER dem ▶-Platzhalter; per opacity ein-/ausgeblendet (kein Layout-Sprung beim Retry) */
.hub-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.hub-thumb-play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; background: rgba(0, 0, 0, 0.22); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
@media (max-width: 560px) { .hub-thumb { width: 92px; } }

.empty-state { text-align: center; padding: 44px 20px; color: var(--text-faint); }
.empty-state .es-icon { font-size: 34px; margin-bottom: 10px; opacity: 0.7; }
.empty-state p { font-size: 14px; }

/* ---- Mitgliedschafts-Stufen: Badges hinter Namen ---- */
.tier-badge { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-left: 5px; font-weight: 800; line-height: 1; font-size: 9px; letter-spacing: .3px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; }
.tier-badge.tb-free { background: var(--border-soft, rgba(140,150,170,0.18)); color: var(--text-faint); font-weight: 700; }
.tier-badge.tb-premium { background: var(--gold-soft); color: var(--gold); }
.tier-badge.tb-mentoring { background: var(--gold-schimmer); color: #141210; }
/* Free-Namen im Ranking dezent ausgegraut */
.is-free-name { color: var(--text-faint) !important; opacity: 0.75; }

/* ---- Gesperrte Bereiche: Mini-Einblick + Verblassen + Schloss ---- */
.gate-wrap { position: relative; }
.gate-preview { max-height: 300px; overflow: hidden; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 96%); }
.gate-lock { text-align: center; margin-top: -40px; position: relative; z-index: 2;
  background: var(--bg-card); border: 1.5px solid var(--gold); border-radius: 16px;
  padding: 22px 20px 24px; max-width: 460px; margin-left: auto; margin-right: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28); }
.gate-lock-icon { font-size: 30px; margin-bottom: 6px; }
.gate-lock-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.gate-lock-text { font-size: 13.5px; color: var(--text-dim); margin: 0 auto 14px; max-width: 380px; line-height: 1.55; }
.gate-lock-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* Schloss-Icon an gesperrten Nav-Einträgen */
.nav-lock { margin-left: auto; font-size: 12px; opacity: 0.6; }
/* Gesperrte Bereiche deutlich blasser darstellen (Icon, Text und Schloss) */
.nav-item.nav-gesperrt { opacity: 0.42; }
.nav-item.nav-gesperrt:hover { opacity: 0.7; }

.tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--text-dim); background: var(--bg-elev); border: 1px solid var(--border); padding: 3px 10px; border-radius: 99px; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; color: var(--text-faint); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Mobil: Tabellenzeilen werden zu gestapelten Blöcken — kein seitliches
 * Scrollen und kein Bildschirmdrehen nötig. Desktop bleibt klassische Tabelle. */
@media (max-width: 700px) {
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td { display: block; width: 100%; }
  table.data-table thead { display: none; }
  table.data-table tr {
    border: 1px solid var(--border-soft); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 10px;
    background: var(--bg-elev);
  }
  table.data-table td { padding: 3px 0; border-bottom: none; font-size: 13.5px; }
  table.data-table td:empty { display: none; }
  table.data-table tr:last-child { margin-bottom: 0; }
}

.notif-item { display: flex; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread .notif-text { font-weight: 600; }
.notif-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-elev); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-text { font-size: 13.5px; flex: 1; }
.notif-time { font-size: 11.5px; color: var(--text-faint); }

.detail-list { font-size: 14px; }
.detail-list .dl-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.detail-list .dl-row:last-child { border-bottom: none; }
.detail-list .dl-label { color: var(--text-faint); flex-shrink: 0; }
.detail-list .dl-value { font-weight: 600; text-align: right; }

.hub-card { display: flex; gap: 14px; align-items: flex-start; }
.hub-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--bg-elev); border: 1px solid var(--border);
}
/* Klappbare Ordnerstruktur im Input Hub */
.hub-folder { margin-bottom: 10px; }
.hub-folder-head {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 10px 13px; border-radius: 11px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 14.5px; text-align: left;
}
.hub-folder-head:hover { background: var(--bg-elev); border-color: var(--gold); }
.hub-folder .hub-card { margin-bottom: 8px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .sidebar { display: none !important; }
  .main { margin-left: 0; }
  .tabbar { display: flex; }
  .tabbar.hidden { display: none; }
  /* Safe-Area (Notch/Statusleiste/Dynamic Island) in JEDEM Kontext: Web-Safari, PWA & native App.
     env(...) ist 0 ohne Notch → auf normalen Geräten kein Unterschied. */
  .view { padding: 18px calc(16px + env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
  .topbar { padding: calc(13px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 13px calc(16px + env(safe-area-inset-left)); }
  .login-wrap { padding-top: calc(24px + env(safe-area-inset-top)); }
  .grid-2, .grid-3, .form-row, .choice-grid { grid-template-columns: 1fr; }
  .status-hero { padding: 20px; }
  .hero-level { font-size: 26px; }
  .chat-wrap { height: calc(100vh - 300px); }
}

/* ============ Ligen & Status-Erlebnis ============ */
.hero-motivation {
  font-size: 13px; color: var(--text-dim); margin-top: 8px;
  font-style: italic;
}
/* ============ Der Kasten trägt die Farbe deiner Liga ============
 * .hero-<stufe> setzt --liga. Daraus entsteht EIN weicher, statischer Schein aus der
 * oberen rechten Ecke — mehr nicht. Bewusst keine Einfärbung der ganzen Fläche und kein
 * Innen-Glühen rundum: die Ligafarbe soll den Kasten streifen, nicht durchtränken.
 * Gilt für den Home-Kasten (.status-hero) und den Profilkopf (.profil-kopf). */
.hero-starter    { --liga: var(--lv-starter);    --liga-dunkel: var(--lv-starter-d); }
.hero-challenger { --liga: var(--lv-challenger); --liga-dunkel: var(--lv-challenger-d); }
.hero-performer  { --liga: var(--lv-performer);  --liga-dunkel: var(--lv-performer-d); }
.hero-elite      { --liga: var(--lv-elite);      --liga-dunkel: var(--lv-elite-d); }
.hero-titan      { --liga: var(--lv-titan);      --liga-dunkel: var(--lv-titan-d); }
.hero-legend     { --liga: var(--lv-legend);     --liga-dunkel: var(--lv-legend-d); }

.status-hero, .profil-kopf {
  /* Nur ein Hauch Ligafarbe im Rahmen — der Kasten bleibt ein dunkler Kasten. */
  border-color: color-mix(in srgb, var(--liga) 20%, var(--border));
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}
/* Der einzige Farbträger: ein weicher Schein aus der oberen rechten Ecke. Groß und
 * flach angesetzt, damit er ausläuft statt als Farbfleck zu stehen. */
.status-hero::after, .profil-kopf::after {
  content: "";
  position: absolute; top: -120px; right: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--liga) 15%, transparent) 0%,
    color-mix(in srgb, var(--liga) 6%, transparent) 45%,
    transparent 72%);
}
.status-hero::before, .profil-kopf::before { content: none; }
.status-hero .hero-level { color: var(--liga); }
.status-hero:hover { border-color: color-mix(in srgb, var(--liga) 32%, var(--border)); }
/* Sehr alte Browser ohne color-mix: der Kasten bleibt schlicht dunkel statt zu brechen */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .status-hero, .profil-kopf { border-color: var(--border); }
  .status-hero::after, .profil-kopf::after { background: radial-gradient(circle, var(--gold-soft), transparent 72%); }
}
/* Profilkopf anderer Mitglieder: dieselbe Sprache, nur kleiner. Der Kasten ist flacher
 * als der Home-Hero — der Schein wird deshalb schmaler angesetzt, bleibt aber genauso
 * zurückhaltend. */
.profil-kopf { position: relative; overflow: hidden; }
.profil-kopf > * { position: relative; z-index: 1; }
.profil-kopf { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22); }
.profil-kopf::after { width: 250px; height: 250px; top: -95px; right: -95px; }

.league-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 13px; padding: 15px 17px; margin-bottom: 11px;
  position: relative; overflow: hidden;
}
.league-card.current {
  border-color: rgba(220,176,85,0.55);
  background: linear-gradient(145deg, rgba(220,176,85,0.07), var(--bg-elev) 55%);
}
.league-benefits { list-style: none; padding: 0; margin: 0; }
.league-benefits li {
  font-size: 13px; color: var(--text-dim);
  padding: 2.5px 0 2.5px 20px; position: relative;
}
.league-benefits li::before {
  content: "✦"; position: absolute; left: 2px; color: var(--gold); font-size: 11px;
}

/* ============ Haupt-Tabs (Rankings, Input Hub) ============ */
.main-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  border-radius: 13px; padding: 5px;
}
.main-tab {
  flex: 1; background: none; border: none;
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: 9px;
  transition: background 0.15s, color 0.15s;
}
.main-tab:hover { color: var(--text); }
.main-tab.active {
  background: var(--bg-card); color: var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  border: 1px solid rgba(220,176,85,0.3);
}

/* ============ KI-Entwicklungsbereich ============ */
.score-ring {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0;
  background: var(--bg-elev); border: 3px solid var(--border);
}
.score-ring.good { border-color: var(--green); color: var(--green); }
.score-ring.mid { border-color: var(--gold); color: var(--gold); }
.score-ring.low { border-color: var(--red); color: var(--red); }
.cat-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.cat-bar-label { font-size: 12.5px; color: var(--text-dim); width: 170px; flex-shrink: 0; }
.cat-bar { flex: 1; height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 99px; background: var(--gold-schimmer); }
.cat-bar-value { font-size: 12px; font-weight: 700; width: 30px; text-align: right; }
.hebel-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 9px;
}
.disclaimer {
  background: rgba(92,184,176,0.07); border: 1px solid rgba(92,184,176,0.25);
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--text-dim);
  margin-bottom: 16px;
}

/* ============ Intro / App-Einführung ============ */
.intro-slide { text-align: center; padding: 8px 0 4px; }
.intro-icon { font-size: 46px; margin-bottom: 14px; }
.intro-slide h2 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.intro-slide p { font-size: 14px; color: var(--text-dim); max-width: 400px; margin: 0 auto 8px; }
.video-placeholder {
  background: var(--bg-elev); border: 1.5px dashed var(--border);
  border-radius: 14px; padding: 30px 20px; margin: 14px auto;
  max-width: 380px; color: var(--text-faint); font-size: 13px;
}
.video-placeholder .vp-play {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--gold-soft); border: 1px solid rgba(220,176,85,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin: 0 auto 10px; color: var(--gold);
}

/* ============ Profilbilder, Online-Status, Chat-Liste ============ */
img.avatar { object-fit: cover; background: var(--bg-elev); }
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--bg-card);
}
.unread-badge {
  background: var(--gold); color: #16110a;
  font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px;
}
.read-receipt { font-size: 10.5px; color: var(--text-faint); text-align: right; margin-top: 2px; }
.read-receipt.read { color: var(--blue); }
.chat-att-img { max-width: 240px; max-height: 240px; border-radius: 10px; display: block; margin-top: 6px; cursor: pointer; }
.chat-att-file {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; margin-top: 6px;
  font-size: 13px; color: var(--text); text-decoration: none;
}
.status-select {
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 5px 8px; font-size: 12.5px;
}
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 14px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prio-hoch { color: var(--red); } .prio-mittel { color: var(--gold); } .prio-niedrig { color: var(--text-faint); }

/* Einwand-Trainer: Feier-Animation bei „Einwand gelöst" (sehr seltener Fall) */
.einwand-celebrate { position: relative; text-align: center; padding: 18px 10px 22px; overflow: hidden; }
.einwand-check { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--green); color: #fff; font-size: 46px; font-weight: 900; display: flex; align-items: center; justify-content: center; animation: einwandPop .5s cubic-bezier(.2,1.3,.4,1) both, einwandGlow 1.6s ease-out .45s 2; }
@keyframes einwandPop { 0% { transform: scale(0) rotate(-25deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes einwandGlow { 0% { box-shadow: 0 0 0 0 rgba(70,205,136,0.55); } 100% { box-shadow: 0 0 0 26px rgba(70,205,136,0); } }
.einwand-confetti { position: absolute; inset: 0; pointer-events: none; }
.einwand-confetti span { position: absolute; top: -14px; left: calc(50% + (var(--i) - 7) * 22px); width: 8px; height: 14px; border-radius: 2px; background: hsl(calc(var(--i) * 47deg), 85%, 60%); opacity: 0; animation: einwandFall 1.5s ease-in forwards; animation-delay: calc(var(--i) * 55ms + .3s); }
@keyframes einwandFall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(260px) rotate(560deg); opacity: 0; } }

/* Einwand-Trainer: Slot-Maschine (Einwand ziehen) */
.slot-window { position: relative; overflow: hidden; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border-soft); box-shadow: inset 0 6px 20px rgba(0,0,0,0.35), inset 0 -6px 20px rgba(0,0,0,0.35); -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent); mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent); }
.slot-reel { display: flex; flex-direction: column; will-change: transform; }
.slot-item { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; font-size: 16px; padding: 0 14px; color: var(--text); }
.slot-frame { position: absolute; left: 6px; right: 6px; top: 58px; height: 58px; border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); background: rgba(220,176,85,0.10); border-radius: 8px; pointer-events: none; }

/* ============ PWA / natives App-Gefühl ============ */
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
/* Seitliches Verschieben der Gesamtseite komplett unterbinden —
   breite Inhalte scrollen nur in ihren eigenen Containern (.table-scroll) */
html, body { overflow-x: hidden; overscroll-behavior-x: none; max-width: 100vw; }
@media (display-mode: standalone) {
  .topbar { padding-top: calc(13px + env(safe-area-inset-top)); }
  .login-wrap { padding-top: calc(24px + env(safe-area-inset-top)); }
  .sidebar-brand { padding-top: calc(22px + env(safe-area-inset-top)); }
  /* Kein Zoomen/Auswählen von UI-Elementen wie in nativen Apps */
  .nav-item, .tab-item, .btn, .chip, .main-tab { -webkit-user-select: none; user-select: none; }
}
@media (display-mode: standalone) and (max-width: 900px) {
  .view { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ============ Native App (Capacitor): Safe-Area wie eine echte iPhone-App ============
   In der nativen App ist display-mode NICHT "standalone", deshalb greifen die Regeln oben
   dort nicht. Über die Klasse .native-app (in app.js gesetzt) holen wir die Abstände nach,
   damit der Titel nicht unter die Statusleiste/Notch rutscht und rechts nichts abschneidet. */
html.native-app .topbar {
  padding-top: calc(13px + env(safe-area-inset-top));
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
}
html.native-app .view {
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
html.native-app .login-wrap { padding-top: calc(24px + env(safe-area-inset-top)); }
html.native-app .sidebar-brand { padding-top: calc(22px + env(safe-area-inset-top)); }

/* Überlauf-Schutz schmale Screens: lange Beschriftungen umbrechen statt abschneiden */
.progress-labels { flex-wrap: wrap; gap: 2px 12px; }
.progress-labels > span { min-width: 0; }
.status-hero, .card { max-width: 100%; }
.hero-top, .hero-ranks, .progress-wrap { max-width: 100%; }

/* ============ Einwand-Trainer: Sprach-Modus ============ */
/* Großer Sprech-Knopf statt Chat-Eingabe — der Trainer wird gesprochen, nicht getippt. */
.ew-leadbubble {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 14px; padding: 14px 16px; margin-top: 10px;
}
.ew-leadlabel {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 5px;
}
.ew-leadtext { font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; }
.ew-mic {
  position: relative; width: 108px; height: 108px; border-radius: 50%;
  border: none; cursor: pointer; flex-shrink: 0;
  background: linear-gradient(145deg, var(--gold), #c99a3a);
  box-shadow: 0 4px 14px rgba(220,176,85,0.20);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.ew-mic:active { transform: scale(0.96); }
.ew-mic-icon { font-size: 40px; line-height: 1; pointer-events: none; }
/* Pulsierender Ring während der Aufnahme */
.ew-mic-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(220,176,85,0.55); opacity: 0; pointer-events: none;
}
.ew-mic.is-rec { background: linear-gradient(145deg, #e85c4f, #9e4239); box-shadow: 0 4px 15px rgba(232,92,79,0.22); }
.ew-mic.is-rec .ew-mic-ring { opacity: 1; border-color: rgba(232,92,79,0.6); animation: ewPulse 1.25s ease-out infinite; }
.ew-mic.is-busy { background: var(--gold-schimmer); box-shadow: none; }
.ew-mic.is-busy .ew-mic-icon { animation: ewDenk 1.1s ease-in-out infinite; }
.ew-mic.is-off { background: var(--bg-elev); border: 1px solid var(--border); box-shadow: none; }
/* Sprachmodus: „bereit, ich höre zu" — ruhiger Goldpuls, damit man sieht, dass das
   Mikrofon offen ist, ohne dass es wie eine laufende Aufnahme aussieht. */
.ew-mic.is-live .ew-mic-ring { opacity: 1; animation: ewPulse 2.6s ease-out infinite; }
/* Der Lead spricht: grün, damit klar ist, dass man jetzt dazwischengehen darf. */
.ew-mic.is-lead { background: linear-gradient(145deg, #46cd88, #468f65); box-shadow: 0 4px 14px rgba(70,205,136,0.22); }
.ew-mic.is-lead .ew-mic-ring { opacity: 1; border-color: rgba(70,205,136,0.6); animation: ewPulse 1.6s ease-out infinite; }
@keyframes ewPulse { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes ewDenk { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ew-mic.is-rec .ew-mic-ring, .ew-mic.is-busy .ew-mic-icon,
  .ew-mic.is-live .ew-mic-ring, .ew-mic.is-lead .ew-mic-ring { animation: none; }
}

/* ============ Einwand-Trainer: Konzept-Banner & Slot-Gehäuse ============ */
/* Banner direkt unter der Überschrift — führt ins Sales-Training zum Konzept-Video. */
.ew-konzept {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(220,176,85,0.14), rgba(220,176,85,0.05));
  border: 1px solid rgba(220,176,85,0.45);
  transition: border-color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.ew-konzept.is-klick { cursor: pointer; }
.ew-konzept.is-klick:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(220,176,85,0.11);
  transform: translateY(-1px);
}
.ew-konzept-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.ew-konzept-titel { font-weight: 800; font-size: 15.5px; color: var(--text); }
.ew-konzept-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; line-height: 1.45; }
.ew-konzept-cta {
  font-size: 13px; font-weight: 800; color: var(--gold);
  white-space: nowrap; flex-shrink: 0;
}

/* Gehäuse um die Slot-Walze: klar umrandet, damit sie als Hauptelement gelesen wird. */
.ew-slot-box {
  max-width: 440px; margin: 0 auto;
  padding: 16px 16px 18px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 2px solid rgba(220,176,85,0.5);
  box-shadow: 0 6px 26px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(220,176,85,0.08);
}
.ew-slot-label {
  text-align: center; font-size: 11px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}

/* ---------- Teamkontext-Leiste ----------
 * Sitzt zwischen Kopfzeile und Inhalt und beantwortet die Frage, die sonst niemand
 * beantworten kann: „Warum sehe ich nur einen Teil des Netzwerks?" — plus dem Schalter,
 * mit dem man wieder herauskommt.
 */
.teamleiste {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-elev);
  position: sticky; top: 0; z-index: 29;
  font-size: 12.5px;
}
.teamleiste.is-team {
  background: linear-gradient(90deg, rgba(220,176,85,0.14), rgba(220,176,85,0.04));
  border-bottom-color: rgba(220,176,85,0.35);
}
.teamleiste-name { font-weight: 700; color: var(--text); white-space: nowrap; }
.teamleiste-hinweis { color: var(--text-dim); flex: 1; min-width: 140px; }
.teamleiste-schalter { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.teamleiste-schalter button {
  background: transparent; border: 0; cursor: pointer;
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  color: var(--text-dim); font-family: inherit;
}
.teamleiste-schalter button.aktiv { background: var(--gold); color: #1a1408; }
.teamleiste-schalter button:not(.aktiv):hover { color: var(--text); background: var(--bg-card); }
@media (max-width: 860px) {
  .teamleiste { padding: 8px 16px; font-size: 12px; }
  .teamleiste-hinweis { flex-basis: 100%; order: 3; min-width: 0; }
}

/* ============ Design-Stile (html[data-stil], Einstellungen → „Design-Stil") ============
 * Dritte Darstellungs-Dimension neben Design-Modus (System/Hell/Dunkel) und Farbschema.
 * Der Stil liefert die Welt (Schrift, Formen, Flächen), der Design-Modus wählt Hell/Dunkel
 * wie überall, und das Farbschema färbt den Akzent (--gold/--glow) stilgerecht um.
 * Muster wie beim Standard-Design: Basis-Variante + Media-Query-Variante + erzwungene
 * Variante über data-theme — die jeweils zwei Gegenmodus-Blöcke müssen inhaltlich
 * identisch bleiben. Alles Komponentenhafte hängt an Variablen, damit die Varianten
 * nur Paletten tauschen. */

/* ---- TECHNISCH — Basis: DUNKLES Cockpit, Neon, Monospace ---- */
:root[data-stil="technisch"] {
  color-scheme: dark;
  --bg: #06111a;
  --bg-elev: #0a1926;
  --bg-card: #0d1e2c;
  --bg-card-hover: #11283a;
  --border: #1b3a4d;
  --border-soft: #132c3c;
  --text: #d9f4f0;
  --text-dim: #8fb3b8;
  --text-faint: #5e7f8a;
  --gold: #23e6c8;
  --gold-soft: rgba(35, 230, 200, 0.13);
  --green: #35e08a;
  --green-soft: rgba(53, 224, 138, 0.13);
  --red: #ff5d68;
  --red-soft: rgba(255, 93, 104, 0.13);
  --blue: #38b6ff;
  --blue-soft: rgba(56, 182, 255, 0.13);
  --purple: #9d8cff;
  --bubble-mine: #123041;
  --hero-grad: linear-gradient(145deg, #0b2130 0%, #081722 60%, #06202a 100%);
  --topbar-bg: rgba(6, 17, 26, 0.88);
  --tabbar-bg: rgba(10, 25, 38, 0.97);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "SF Mono", ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --glow: rgba(35, 230, 200, 0.35);
  --ring-bahn: #102836;
}
/* Farbschema im dunklen Technisch: Neon-Blau / Neon-Grün */
/* Technisch HELL — folgt dem System (sofern nicht dunkel erzwungen) */
@media (prefers-color-scheme: light) {
  :root[data-stil="technisch"]:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eef4f6;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f2f8f9;
    --border: #c3d8dd;
    --border-soft: #d8e6e9;
    --text: #0f272e;
    --text-dim: #43606a;
    --text-faint: #7b959d;
    --gold: #078d7c;
    --gold-soft: rgba(7, 141, 124, 0.11);
    --green: #0f9e57;
    --green-soft: rgba(15, 158, 87, 0.11);
    --red: #d4404b;
    --red-soft: rgba(212, 64, 75, 0.11);
    --blue: #1273c4;
    --blue-soft: rgba(18, 115, 196, 0.11);
    --purple: #6d55d8;
    --bubble-mine: #dcecef;
    --hero-grad: linear-gradient(145deg, #ffffff 0%, #eef6f8 60%, #e3f1f3 100%);
    --topbar-bg: rgba(238, 244, 246, 0.88);
    --tabbar-bg: rgba(255, 255, 255, 0.97);
    --glow: rgba(7, 141, 124, 0.28);
    --ring-bahn: #d7e6ea;
  }
}
/* Technisch HELL, erzwungen — identisch zum Media-Query-Block darüber */
:root[data-stil="technisch"][data-theme="light"] {
  color-scheme: light;
  --bg: #eef4f6;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f8f9;
  --border: #c3d8dd;
  --border-soft: #d8e6e9;
  --text: #0f272e;
  --text-dim: #43606a;
  --text-faint: #7b959d;
  --gold: #078d7c;
  --gold-soft: rgba(7, 141, 124, 0.11);
  --green: #0f9e57;
  --green-soft: rgba(15, 158, 87, 0.11);
  --red: #d4404b;
  --red-soft: rgba(212, 64, 75, 0.11);
  --blue: #1273c4;
  --blue-soft: rgba(18, 115, 196, 0.11);
  --purple: #6d55d8;
  --bubble-mine: #dcecef;
  --hero-grad: linear-gradient(145deg, #ffffff 0%, #eef6f8 60%, #e3f1f3 100%);
  --topbar-bg: rgba(238, 244, 246, 0.88);
  --tabbar-bg: rgba(255, 255, 255, 0.97);
  --glow: rgba(7, 141, 124, 0.28);
  --ring-bahn: #d7e6ea;
}
/* Technisch: Bauteile (modusneutral — hängen nur an Variablen) */
:root[data-stil="technisch"] body { font-size: 14px; letter-spacing: 0.01em; }
:root[data-stil="technisch"] .btn-primary {
  background: var(--gold); /* folgt dem Farbschema statt festem Gold */
  color: #04110d;
  box-shadow: 0 0 16px var(--glow);
  text-shadow: none;
}
:root[data-stil="technisch"][data-theme="light"] .btn-primary { color: #ffffff; }
@media (prefers-color-scheme: light) {
  :root[data-stil="technisch"]:not([data-theme="dark"]) .btn-primary { color: #ffffff; }
}
:root[data-stil="technisch"] .btn-primary:hover { box-shadow: 0 0 24px var(--glow); }
:root[data-stil="technisch"] .card { box-shadow: inset 0 0 0 1px var(--gold-soft); }
:root[data-stil="technisch"] .card-title,
:root[data-stil="technisch"] h1, :root[data-stil="technisch"] h2 {
  text-transform: uppercase; letter-spacing: 0.06em;
}
:root[data-stil="technisch"] .badge { letter-spacing: 0.05em; }
:root[data-stil="technisch"] .chip.active { box-shadow: 0 0 10px var(--glow); }
/* Score-Ringe der KI-Auswertungen: farbrichtiges Neon-Glühen über currentColor */
:root[data-stil="technisch"] svg.sn-ring { filter: drop-shadow(0 0 6px currentColor); }
:root[data-stil="technisch"] svg.sn-ring circle[stroke="var(--border)"] { stroke: var(--ring-bahn); }

/* ---- OLDSCHOOL — Basis: HELLE Windows-XP-Ära (Tahoma, Grau-Beige, Fasen) ---- */
:root[data-stil="oldschool"] {
  color-scheme: light;
  --bg: #ece9d8;
  --bg-elev: #f5f4ea;
  --bg-card: #ffffff;
  --bg-card-hover: #f6f5ec;
  --border: #aca899;
  --border-soft: #c9c5b4;
  --text: #1a1a1a;
  --text-dim: #4a4a44;
  --text-faint: #7a776a;
  --gold: #245edb;
  --gold-soft: rgba(36, 94, 219, 0.10);
  --green: #3c9838;
  --green-soft: rgba(60, 152, 56, 0.12);
  --red: #d63e33;
  --red-soft: rgba(214, 62, 51, 0.12);
  --blue: #245edb;
  --blue-soft: rgba(36, 94, 219, 0.10);
  --purple: #7a4fc0;
  --bubble-mine: #dbe8f7;
  --hero-grad: linear-gradient(180deg, #ffffff 0%, #f2f1e6 100%);
  --topbar-bg: #ece9d8;
  --tabbar-bg: #f5f4ea;
  --radius: 3px;
  --radius-sm: 2px;
  --font: Tahoma, Verdana, "Segoe UI", Geneva, sans-serif;
  --xp-flaeche: linear-gradient(180deg, #fdfdfb, #f1efe2);
  --xp-fase-hell: rgba(255, 255, 255, 0.75);
  --xp-fase-dunkel: rgba(0, 0, 0, 0.12);
  --xp-chip-aktiv: linear-gradient(180deg, #dbe8f7, #c3d9f5);
}
/* Farbschema im hellen Oldschool: Petrol / XP-Grün */
/* Oldschool DUNKEL — folgt dem System (sofern nicht hell erzwungen): Windows-Classic-Nacht */
@media (prefers-color-scheme: dark) {
  :root[data-stil="oldschool"]:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #34332e;
    --bg-elev: #3e3d36;
    --bg-card: #45443c;
    --bg-card-hover: #4d4c43;
    --border: #6b675a;
    --border-soft: #57544a;
    --text: #f0efe6;
    --text-dim: #c2bfae;
    --text-faint: #98948a;
    --gold: #7fa8ee;
    --gold-soft: rgba(127, 168, 238, 0.14);
    --green: #7ed07a;
    --green-soft: rgba(126, 208, 122, 0.14);
    --red: #ef7d74;
    --red-soft: rgba(239, 125, 116, 0.14);
    --blue: #7fa8ee;
    --blue-soft: rgba(127, 168, 238, 0.14);
    --purple: #b39ae0;
    --bubble-mine: #3d4a61;
    --hero-grad: linear-gradient(180deg, #45443c 0%, #383730 100%);
    --topbar-bg: #34332e;
    --tabbar-bg: #3e3d36;
    --xp-flaeche: linear-gradient(180deg, #524f45, #443f36);
    --xp-fase-hell: rgba(255, 255, 255, 0.16);
    --xp-fase-dunkel: rgba(0, 0, 0, 0.4);
    --xp-chip-aktiv: linear-gradient(180deg, #46536b, #3a4559);
  }
}
/* Oldschool DUNKEL, erzwungen — identisch zum Media-Query-Block darüber */
:root[data-stil="oldschool"][data-theme="dark"] {
  color-scheme: dark;
  --bg: #34332e;
  --bg-elev: #3e3d36;
  --bg-card: #45443c;
  --bg-card-hover: #4d4c43;
  --border: #6b675a;
  --border-soft: #57544a;
  --text: #f0efe6;
  --text-dim: #c2bfae;
  --text-faint: #98948a;
  --gold: #7fa8ee;
  --gold-soft: rgba(127, 168, 238, 0.14);
  --green: #7ed07a;
  --green-soft: rgba(126, 208, 122, 0.14);
  --red: #ef7d74;
  --red-soft: rgba(239, 125, 116, 0.14);
  --blue: #7fa8ee;
  --blue-soft: rgba(127, 168, 238, 0.14);
  --purple: #b39ae0;
  --bubble-mine: #3d4a61;
  --hero-grad: linear-gradient(180deg, #45443c 0%, #383730 100%);
  --topbar-bg: #34332e;
  --tabbar-bg: #3e3d36;
  --xp-flaeche: linear-gradient(180deg, #524f45, #443f36);
  --xp-fase-hell: rgba(255, 255, 255, 0.16);
  --xp-fase-dunkel: rgba(0, 0, 0, 0.4);
  --xp-chip-aktiv: linear-gradient(180deg, #46536b, #3a4559);
}
/* Oldschool: Bauteile (modusneutral — Fasen & Flächen hängen an Variablen) */
:root[data-stil="oldschool"] body { font-size: 13.5px; }
:root[data-stil="oldschool"] button,
:root[data-stil="oldschool"] .btn {
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 var(--xp-fase-hell), inset -1px -1px 0 var(--xp-fase-dunkel);
}
:root[data-stil="oldschool"] .btn-secondary,
:root[data-stil="oldschool"] .btn-ghost,
:root[data-stil="oldschool"] .chip {
  background: var(--xp-flaeche);
  border: 1px solid var(--border);
  color: var(--text);
}
:root[data-stil="oldschool"] .btn-primary {
  background: linear-gradient(180deg, #4a86e8, #245edb);
  border: 1px solid #16408f;
  color: #fff;
}
:root[data-stil="oldschool"] .chip.active {
  background: var(--xp-chip-aktiv);
  border-color: var(--gold);
  color: var(--gold);
}
:root[data-stil="oldschool"] .card {
  border: 1px solid var(--border);
  box-shadow: 1px 1px 0 var(--xp-fase-dunkel);
}
:root[data-stil="oldschool"] .card-title { color: var(--gold); }
:root[data-stil="oldschool"] .topbar,
:root[data-stil="oldschool"] .tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ============ KI-Analyse im Free-Wochentakt ============
 * Der Ladebalken zeigt, wie viele der sieben Tage bis zur nächsten kostenlosen Analyse
 * schon vergangen sind. Ist er voll, schimmert der Navigationseintrag golden. */
.ai-takt-voll { background: var(--gold-schimmer); }
.ai-takt-leer { background: var(--border); }

/* Navigationseintrag „bereit": goldener Rahmen + ein sanft darüber wandernder Schimmer.
 * Der Rahmen trägt das Signal, der Schimmer holt den Blick — bewusst langsam und ohne
 * Farbwechsel: es soll auffallen, nicht blinken. Gilt für KI-Analyse und Einwand-Trainer
 * in jeder Stufe, sobald der Ladebalken im Bereich vollgelaufen ist. */
.nav-item.nav-glanz {
  position: relative;
  overflow: hidden;
  color: var(--gold);
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.nav-item.nav-glanz::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(220, 176, 85, 0.22) 50%, transparent 65%);
  animation: nav-glanz-lauf 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nav-glanz-lauf {
  0%   { transform: translateX(-120%); }
  60%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}
/* Dieselbe Sprache in der mobilen „Mehr"-Liste: goldener Rahmen um die Karte. */
.card.mehr-bereit {
  border-color: var(--gold);
  background: var(--gold-soft);
}
/* Und ein goldener Punkt am „Mehr"-Tab, damit man es auf dem Handy überhaupt bemerkt.
 * Er sitzt fest oben LINKS — rechts steht der Ungelesen-Zähler, dessen Breite mit der
 * Zahl wächst; ein Punkt daneben würde je nach Zählerstand darunter verschwinden. */
.tab-bereit {
  position: absolute; top: 5px; left: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
}
/* Wer Bewegung reduziert haben will, behält den Rahmen und verliert nur die Wanderung */
@media (prefers-reduced-motion: reduce) {
  .nav-item.nav-glanz::after { animation: none; background: none; }
}

/* ============ Vertriebler des Monats: Feier im Popup ============
 * Pokal, der einmal kräftig aufspringt, dann ruhig atmet — und Konfetti, das nach
 * unten fällt. Bewusst kurz: die Grafik zum Teilen ist der eigentliche Moment. */
.held-feier { position: relative; padding: 6px 0 14px; overflow: hidden; }
.held-pokal {
  font-size: 62px; text-align: center; line-height: 1;
  animation: held-sprung 900ms cubic-bezier(0.2, 1.4, 0.4, 1) both, held-atem 2.6s 900ms ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(220, 176, 85, 0.55));
}
@keyframes held-sprung {
  0%   { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  60%  { transform: scale(1.25) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes held-atem {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.held-konfetti { position: absolute; inset: 0; pointer-events: none; }
.held-konfetti span {
  position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  left: calc(var(--i) * 6.25%);
  background: var(--gold);
  animation: held-fall 2.2s linear infinite;
  animation-delay: calc(var(--i) * 120ms);
}
.held-konfetti span:nth-child(3n)   { background: var(--green); width: 6px; height: 10px; }
.held-konfetti span:nth-child(3n+1) { background: #f6d98a; }
@keyframes held-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(190px) rotate(540deg); opacity: 0; }
}
/* Wer Bewegung reduziert haben will, sieht den Pokal ruhig und ohne Konfetti */
@media (prefers-reduced-motion: reduce) {
  .held-pokal { animation: none; }
  .held-konfetti { display: none; }
}

/* ============ SALESIUM SALES INDEX (öffentlicher Einstieg vor dem Konto) ============
 * Eigener, ruhiger Rahmen: eine Karte in der Bildmitte, viel Luft, eine Handlung pro
 * Schritt. Bewusst nicht die App-Navigation — hier ist noch niemand angemeldet. */
.sx-wrap {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 0;   /* Flex-Kind von #app: ohne min-width würde es mitwachsen */
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, rgba(220, 176, 85, .07), transparent 60%), var(--bg);
}
.sx-box {
  /* min-width: 0 — als Flex-Kind würde die Box sonst auf die Inhaltsbreite wachsen
     und eine seitlich scrollbare Reihe die ganze Seite waagerecht schieben. */
  width: 100%; min-width: 0; max-width: 520px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 20px; padding: 26px 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.sx-weit { max-width: 660px; }
.sx-sehrweit { max-width: 880px; }   /* Stellenempfehlung: drei Kästen brauchen echte Breite */
.sx-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sx-logo { height: 26px; width: auto; }
.sx-marke { font-size: 10.5px; letter-spacing: 2.4px; font-weight: 800; color: var(--text-faint); }

.sx-titel { font-size: 27px; line-height: 1.22; font-weight: 900; margin: 6px 0 10px; }
.sx-sub { font-size: 14.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 22px; }
.sx-frage { font-size: 20px; line-height: 1.3; font-weight: 800; margin: 4px 0 14px; }
.sx-hinweis { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 16px; }
.sx-abschnitt { font-size: 16px; font-weight: 800; margin: 22px 0 10px; }

.sx-cta {
  display: block; width: 100%; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #f6d98a, var(--gold)); color: #14181f;
  font-size: 15.5px; font-weight: 800; padding: 15px 18px; margin-top: 6px;
}
.sx-cta:hover { filter: brightness(1.05); }
.sx-cta-klein { width: auto; padding: 11px 20px; font-size: 14px; margin: 0; }
.sx-cta-leise { background: transparent; border: 1px solid var(--border); color: var(--text); }
.sx-doppelcta { display: grid; gap: 9px; margin-top: 4px; }
.sx-micro { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 10px; }
.sx-fuss { text-align: center; font-size: 12.5px; color: var(--text-faint); margin-top: 18px; }
.sx-fuss a { color: var(--gold); }

.sx-fortschritt { margin-bottom: 16px; }
.sx-punkte { display: flex; gap: 5px; margin-bottom: 7px; }
.sx-punkte span { flex: 1; height: 3px; border-radius: 2px; background: var(--border); }
.sx-punkte span.voll { background: var(--gold); }
.sx-schrittzahl { font-size: 11.5px; letter-spacing: 1px; color: var(--text-faint); font-weight: 700; text-transform: uppercase; }

.sx-optionen { display: grid; gap: 8px; }
.sx-zwei { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .sx-zwei { grid-template-columns: 1fr; } }
.sx-option {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 15px; color: var(--text); font-size: 14.5px; font-weight: 600;
}
.sx-option:hover { border-color: var(--gold); background: var(--gold-soft); }
.sx-option.aktiv { border-color: var(--gold); background: var(--gold-soft); }
.sx-option-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sx-option-sub { font-size: 12.5px; font-weight: 500; color: var(--text-dim); }
.sx-option-pfeil { color: var(--text-faint); font-size: 18px; }

.sx-karten { display: grid; gap: 12px; }
@media (min-width: 620px) { .sx-karten { grid-template-columns: 1fr 1fr; } }
.sx-karte {
  text-align: left; cursor: pointer; color: var(--text); display: flex; flex-direction: column;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 16px; padding: 20px 18px;
}
.sx-karte:hover { border-color: var(--gold); background: var(--gold-soft); }
.sx-karte-titel { font-size: 22px; font-weight: 900; }
.sx-karte-unter { font-size: 13.5px; font-weight: 700; color: var(--text); margin-top: 2px; }
.sx-karte-text { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin: 10px 0 14px; flex: 1; }
.sx-karte-cta { font-size: 13.5px; font-weight: 800; color: var(--gold); }

.sx-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.sx-zurueck { background: none; border: none; cursor: pointer; color: var(--text-faint); font-size: 13px; padding: 6px 0; }
.sx-zurueck:hover { color: var(--text); }

.sx-toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.sx-toggle button { border: none; background: none; cursor: pointer; color: var(--text-dim); font-size: 13.5px; font-weight: 700; padding: 7px 16px; border-radius: 7px; }
.sx-toggle button.aktiv { background: var(--gold); color: #14181f; }
.sx-zahl-zeile { display: flex; align-items: center; gap: 10px; }
.sx-zahl {
  flex: 1; font-size: 30px; font-weight: 800; padding: 12px 14px; width: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text);
}
.sx-zahl:focus { outline: none; border-color: var(--gold); }
.sx-euro { font-size: 26px; font-weight: 800; color: var(--text-faint); }
.sx-bilanz { margin-top: 14px; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.sx-bilanz-zeile { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--border-soft); }
.sx-bilanz-zeile:last-child { border-bottom: none; }
.sx-bilanz-zeile span { color: var(--text-dim); }
.sx-bilanz-luecke strong { color: var(--gold); }

.sx-nachweise { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 16px; margin-bottom: 16px; }
.sx-nachweise-titel { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; color: var(--text-faint); margin-bottom: 6px; }
.sx-nachweise ul { margin: 0; padding-left: 18px; }
.sx-nachweise li { font-size: 13px; color: var(--text-dim); line-height: 1.7; }

/* Analyse-Sequenz */
.sx-analyse { text-align: center; padding: 10px 0; }
.sx-analyse-ring {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--gold); animation: sx-dreh 900ms linear infinite;
}
@keyframes sx-dreh { to { transform: rotate(360deg); } }
.sx-analyse-liste { display: grid; gap: 8px; margin-top: 18px; text-align: left; }
.sx-analyse-schritt { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); animation: sx-auf 260ms ease both; }
.sx-haken { color: var(--green); font-weight: 900; }
@keyframes sx-auf { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Ergebnis */
.sx-level { text-align: center; margin: 18px 0 20px; }
.sx-level-wert {
  font-size: 34px; font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(135deg, #f6d98a, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sx-level-text { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin-top: 8px; }
.sx-kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sx-kachel { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 10px; text-align: center; }
.sx-kachel-gold { border-color: var(--gold); background: var(--gold-soft); }
.sx-kachel-label { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.sx-kachel-wert { font-size: 17px; font-weight: 800; margin-top: 4px; }
.sx-gesperrt-block { display: grid; gap: 6px; margin: 18px 0; }
.sx-gesperrt { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-faint); background: var(--bg); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 13px; }

.sx-staerken { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .sx-staerken { grid-template-columns: 1fr; } }
.sx-staerke { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; }
.sx-staerke.sx-hebel { grid-column: 1 / -1; border-color: var(--gold); background: var(--gold-soft); }
.sx-staerke-label { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.sx-staerke-wert { font-size: 15px; font-weight: 800; margin-top: 3px; }

/* Job-Teaser */
.sx-jobs { display: grid; gap: 10px; }
.sx-job { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 15px 16px; }
.sx-job-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sx-job-titel { font-size: 16px; font-weight: 800; }
.sx-job-match { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .4px; padding: 4px 9px; border-radius: 20px; background: var(--border); color: var(--text-dim); }
.sx-job-match.stark { background: rgba(62, 207, 142, .16); color: var(--green); }
.sx-job-branche { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.sx-job-merkmale { margin: 10px 0 0; padding-left: 18px; }
.sx-job-merkmale li { font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.sx-job-schloss { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border-soft); }
.sx-job-schloss span { font-size: 12px; font-weight: 700; color: var(--text-faint); background: var(--bg-elev); border: 1px dashed var(--border); border-radius: 8px; padding: 5px 9px; }
.sx-verdienst { margin-top: 16px; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 14px; padding: 15px 16px; }
.sx-verdienst-titel { font-size: 15px; font-weight: 800; line-height: 1.4; }
.sx-verdienst p { font-size: 12.5px; color: var(--text-dim); margin-top: 7px; line-height: 1.55; }

/* Empfohlene Stellen als Reihe — der letzte Schritt vor der Registrierung.
   Gleich hohe Kästen nebeneinander, der beste Treffer trägt den Goldrand.
   Auf dem Handy wird daraus eine wischbare Reihe: nebeneinander bleibt nebeneinander. */
.sx-jobs-reihe {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: stretch; gap: 12px; margin-top: 4px;
}
.sx-jobs-reihe .sx-job {
  display: flex; flex-direction: column; background: var(--bg-card);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .22);
  transition: transform .18s ease, border-color .18s ease;
}
.sx-jobs-reihe .sx-job:hover { transform: translateY(-2px); border-color: var(--gold); }
/* Match-Kennzeichen als Zeile über dem Titel — in schmalen Kästen besser lesbar */
.sx-jobs-reihe .sx-job-kopf { flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
.sx-jobs-reihe .sx-job-merkmale { flex: 1; }
.sx-jobs-reihe .sx-job-schloss { margin-top: auto; gap: 6px; }
.sx-jobs-reihe .sx-job-schloss span { font-size: 11.5px; padding: 4px 8px; }
.sx-jobs-reihe .sx-job:first-child { border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .sx-jobs-reihe .sx-job:first-child { border-color: var(--gold-lo); }
}
@media (max-width: 620px) {
  .sx-jobs-reihe {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    margin-inline: -24px; padding: 2px 24px 10px;   /* bündig zum Rand von .sx-box */
  }
  .sx-jobs-reihe .sx-job { flex: 0 0 78%; scroll-snap-align: start; }
}

.sx-formular { display: grid; gap: 10px; margin: 16px 0 4px; }
.sx-feldlabel { font-size: 11.5px; color: var(--text-faint); margin-bottom: -6px; }
.sx-ds { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .sx-analyse-ring { animation: none; }
  .sx-analyse-schritt { animation: none; }
}

/* ============ „Bereit"-Signal: goldenes Pulsieren ============
 * Wenn ein enthaltener Durchlauf (KI-Analyse, Einwand-Trainer) wieder frei ist, soll das
 * ins Auge fallen — der Balken ist voll, jetzt darf es leuchten. Ein ruhiger Puls auf
 * Rahmen und Schein, kein Blinken. */
.bereit-glanz {
  border-color: var(--gold) !important;
  animation: bereit-puls 2.4s ease-in-out infinite;
}
@keyframes bereit-puls {
  0%, 100% { box-shadow: inset 0 1px 0 var(--glanz), 0 0 0 0 rgba(220, 176, 85, 0); }
  50%      { box-shadow: inset 0 1px 0 var(--glanz), 0 0 0 4px rgba(220, 176, 85, .12), 0 0 20px rgba(220, 176, 85, .18); }
}
/* Der Kopfsatz der Karte bekommt zusätzlich einen wandernden Goldschimmer */
.bereit-text {
  font-weight: 800; color: var(--gold);
  background: linear-gradient(100deg, var(--gold) 20%, var(--gold-hi) 42%, var(--gold) 64%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: bereit-schimmer 3.2s linear infinite;
}
@keyframes bereit-schimmer { to { background-position: -220% 0; } }
/* Volle Balkensegmente leuchten mit, sobald alles geladen ist */
.bereit-glanz .ai-takt-voll { box-shadow: 0 0 8px rgba(220, 176, 85, .55); }

@media (prefers-reduced-motion: reduce) {
  .bereit-glanz { animation: none; box-shadow: 0 0 0 3px rgba(220, 176, 85, .18); }
  .bereit-text { animation: none; background: none; -webkit-text-fill-color: var(--gold); color: var(--gold); }
}

/* ============ Priorisierungs-Check-up: Hauptproblem → Lücke → Hauptziel ============
 * Das Kernbild der Auswertung. Zwei Pole, dazwischen die Lücke — bewusst schlicht,
 * damit die Aussage trägt und nicht die Dekoration. */
.prio-bruecke {
  display: flex; flex-direction: column; gap: 8px;
  margin: 4px 0 16px;
}
.prio-pol {
  padding: 12px 15px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
}
.prio-pol span {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px;
}
.prio-pol strong { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.prio-pol.prio-ziel { border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); background: var(--gold-soft); }
.prio-pol.prio-ziel span { color: var(--gold); }
.prio-luecke {
  text-align: center; font-size: 12.5px; color: var(--text-dim);
  padding: 7px 14px; line-height: 1.5;
  border-left: 2px dashed var(--gold-lo); border-right: 2px dashed var(--gold-lo);
  margin: 0 auto; max-width: 92%;
}
.prio-bruecke-gross .prio-pol { padding: 15px 17px; }
.prio-bruecke-gross .prio-pol strong { font-size: 16px; }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .prio-pol.prio-ziel { border-color: var(--gold-lo); }
}

/* ============ Gold-Rahmen: „das ist für dich gedacht" ============
 * Zwei Abstufungen derselben Idee. Der dünne Rahmen markiert Karten, in denen etwas
 * kostenlos bereitsteht (Gratis-Testlauf); der Knopf-Rahmen hebt jeden Weg heraus, der
 * zur nächsten Stufe führt — überall gleich, damit Mitglieder ihn wiedererkennen. */
.gratis-rahmen {
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent) !important;
  box-shadow: inset 0 1px 0 var(--glanz), 0 0 0 1px rgba(220, 176, 85, 0.08), 0 4px 20px rgba(220, 176, 85, 0.06);
}
.btn-gold-rahmen {
  border: 1px solid var(--gold) !important;
  box-shadow: 0 0 0 1px rgba(217, 174, 78, 0.16);
}
.btn-gold-rahmen:hover { box-shadow: 0 0 0 2px rgba(217, 174, 78, 0.26); }

/* Kleines Etikett „1× gratis testen" — sitzt neben Überschriften und Knöpfen */
.gratis-tag {
  display: inline-block; vertical-align: middle;
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--gold); background: var(--gold-soft);
  border: 1px solid rgba(217, 174, 78, 0.45); border-radius: 20px;
  padding: 2px 8px; margin-left: 8px; white-space: nowrap;
}

/* ============ Gesperrte Events: sichtbar, aber unlesbar ============
 * Titel und Zeitraum bleiben scharf — man soll erkennen, DASS da etwas ist und wann.
 * Alles Weitere wird weichgezeichnet: neugierig machen, ohne den Inhalt herzugeben.
 * (Rein optisch — die Angaben stehen weiterhin im Seitenquelltext.) */
.event-verschwommen {
  filter: blur(4.5px);
  user-select: none; pointer-events: none;
  opacity: .85;
}
@media (prefers-reduced-motion: reduce) { .event-verschwommen { filter: blur(3px); } }

/* Stufen-Erklärung im Sales Index: was ELITE & Co. in Zahlen heißen */
.sx-einordnung {
  margin: -6px 0 18px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px;
}
.sx-einordnung-zeile { font-size: 13px; line-height: 1.55; color: var(--text-dim); }
.sx-einordnung-zeile + .sx-einordnung-zeile { margin-top: 6px; }
.sx-einordnung-zeile strong { color: var(--text); }

/* ============ Materialschliff: Kantenlicht auf den tragenden Flächen ============
 * Sidebar, Kopf- und Fußleiste bekommen dieselbe Behandlung wie die Karten — eine
 * feine helle Kante zur angrenzenden Fläche, damit Schwarz auf Schwarz nicht
 * verschwimmt, sondern wie zwei geschliffene Platten übereinander wirkt. */
.sidebar {
  background: linear-gradient(180deg, #101317 0%, var(--bg-elev) 34%, #0b0d10 100%);
  box-shadow: inset -1px 0 0 var(--glanz);
}
.topbar { box-shadow: inset 0 -1px 0 var(--glanz), 0 1px 12px rgba(0, 0, 0, 0.3); }
.tabbar { box-shadow: inset 0 1px 0 var(--glanz), 0 -2px 14px rgba(0, 0, 0, 0.34); }
.icon-btn {
  background: linear-gradient(170deg, #1b1e24, var(--bg-card));
  box-shadow: inset 0 1px 0 var(--glanz);
}
/* Eingabefelder: leicht eingesenkt statt aufgesetzt */
input.input, .field input, .field select, .field textarea, textarea {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.32);
}
/* Modale Ebene bekommt den stärksten Kantenglanz — sie liegt am weitesten vorn */
.modal { box-shadow: inset 0 1px 0 var(--glanz-stark), 0 24px 70px rgba(0, 0, 0, 0.6); }

/* Gold ist überall EINE Farbe (var(--gold)): Knöpfe, Balken, Plaketten, Text.
 * Der Metallverlauf --gold-metall bleibt allein dem Podiumsplatz 1 vorbehalten. */

/* Im hellen Modus trägt keine Fläche Kantenlicht — dort entsteht Tiefe über Schatten */
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .tabbar,
:root[data-theme="light"] .icon-btn { background: var(--bg-elev); box-shadow: none; }
:root[data-theme="light"] .modal { box-shadow: 0 24px 70px rgba(20, 24, 30, 0.22); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sidebar,
  :root:not([data-theme="dark"]) .topbar,
  :root:not([data-theme="dark"]) .tabbar,
  :root:not([data-theme="dark"]) .icon-btn { background: var(--bg-elev); box-shadow: none; }
  :root:not([data-theme="dark"]) .modal { box-shadow: 0 24px 70px rgba(20, 24, 30, 0.22); }
}

/* ===== Partnerbörse: Stellenanzeigen-Karten (Zonen-Layout) =====
 * Links: getöntes Logo-Panel mit Bewerben-Knopf (Tint kommt aus logoFarbeAnwenden),
 * rechts: Titel → Fakten-Chips → Beschreibung → Unterlagen → Fußzeile.
 * Mobil wird das linke Panel zur Kopfzeile. */
.job-karte { display: flex; padding: 0; overflow: hidden; transition: transform .18s ease; }
.job-karte:hover { transform: translateY(-2px); }
.job-links {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px;
  width: 156px; flex-shrink: 0; padding: 20px 16px;
  background: linear-gradient(180deg, rgba(127,127,127,0.07), rgba(127,127,127,0.015));
  border-right: 1px solid var(--border-soft);
}
/* Logo exakt so breit wie der Bewerben-Knopf darunter (volle Panel-Innenbreite) */
.job-logo { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: contain; border-radius: 20px; }
.job-logo-platzhalter {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; font-size: 44px;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
}
.job-bewerben { width: 100%; font-weight: 800; padding: 11px 6px; font-size: 14px; }
.job-status { width: 100%; text-align: center; font-size: 12px; border-radius: 12px; padding: 9px 6px; }
.job-rechts { flex: 1; min-width: 0; padding: 18px 20px 16px; }
.job-titel { font-weight: 800; font-size: 17.5px; line-height: 1.25; }
.job-meta { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.job-fakten { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.job-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  font-size: 12.5px; font-weight: 700; padding: 5px 12px;
  background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 999px;
}
.job-chip-geld { color: var(--green); border-color: rgba(70, 205, 136, 0.35); background: rgba(70, 205, 136, 0.08); }
.job-beschreibung { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; margin-top: 12px; }
.job-beschreibung.geklemmt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.job-mehr { background: none; border: none; cursor: pointer; padding: 4px 0 0; color: var(--gold); font-size: 12.5px; font-weight: 700; }
.job-absatz { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 10px; }
.job-absatz-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 2px;
}
.job-medien { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.job-medien .btn { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-fuss { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
@media (max-width: 640px) {
  .job-karte { flex-direction: column; }
  .job-links {
    width: 100%; flex-direction: row; justify-content: flex-start; gap: 14px;
    padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--border-soft);
  }
  .job-logo, .job-logo-platzhalter { width: 64px; height: 64px; border-radius: 14px; }
  .job-logo-platzhalter { font-size: 26px; }
  .job-bewerben, .job-status { width: auto; flex: 1; }
  .job-rechts { padding: 14px 16px; }
}

/* ===== Empfehlungsprogramm: Mystery-Box ===== */
.mystery-box {
  width: 116px; height: 116px; border-radius: 16px; flex-shrink: 0;
  object-fit: cover; display: block;
  border: 1px solid var(--gold-lo, var(--gold));
  box-shadow: 0 0 18px var(--gold-soft);
  animation: box-wackeln 2.6s ease-in-out infinite;
}
@keyframes box-wackeln {
  0%, 84%, 100% { transform: rotate(0); }
  88% { transform: rotate(-7deg) scale(1.04); }
  92% { transform: rotate(6deg) scale(1.06); }
  96% { transform: rotate(-4deg) scale(1.03); }
}
.mystery-box.box-oeffnet { animation: box-explodiert .9s ease-in forwards; }
@keyframes box-explodiert {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-10deg) scale(1.12); }
  55% { transform: rotate(9deg) scale(1.2); box-shadow: 0 0 34px rgba(220, 176, 85, 0.55); }
  100% { transform: rotate(0) scale(1.32); box-shadow: 0 0 46px rgba(220, 176, 85, 0.8); filter: brightness(1.6); }
}
.mystery-box.box-offen { animation: box-glanz 1.6s ease-out; box-shadow: 0 0 26px rgba(220, 176, 85, 0.45); }
@keyframes box-glanz {
  0% { transform: scale(1.32); filter: brightness(1.7); }
  100% { transform: scale(1); filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mystery-box, .mystery-box.box-oeffnet, .mystery-box.box-offen { animation: none; }
}

/* ===== Bewerbungs-Kanban (Bewerbungen-Bereich) ===== */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.kanban-spalte {
  flex: 1 0 190px; min-width: 190px;
  background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px;
}
.kanban-kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px;
}
.kanban-zahl { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.kanban-karte { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 9px; margin-bottom: 8px; }
.kanban-karte:last-of-type { margin-bottom: 0; }
