/* ============================================================
   RKX Kundenbereich
   Im RKX-Designsystem: dunkel, lila Akzent, Schaltplan-Anleihen.
   Tokens und Sprache identisch zur RKX-Website (rkx-theme.css)
   und zur Invesco-Plattform.

   Fonts werden in lib/layout.js eingebunden:
   Unbounded (Display) · Sora (UI/Text) · JetBrains Mono (Labels/Daten)
   ============================================================ */
:root {
  /* Flächen: von tief nach hoch — RKX-Palette */
  --bg:        #0a0a13;
  --panel:     #131322;
  --panel-2:   #1a1a2c;
  --panel-3:   #232338;
  --border:    rgba(160,107,255,.16);
  --border-hi: rgba(160,107,255,.34);

  /* Text */
  --text:      #eae7f5;
  --text-2:    #9d97b5;
  --muted:     #6b6684;

  /* Akzente — Lila als Haupt-, Cyan als Signalfarbe */
  --accent:      #a06bff;
  --accent-hi:   #c6a6ff;
  --accent-deep: #4d3384;
  --accent-dim:  rgba(160,107,255,.12);
  --wire:        #4de1e8;
  --ok:          #4de1e8;
  --ok-dim:      rgba(77,225,232,.10);
  --warn:        #ffab6b;
  --warn-dim:    rgba(255,171,107,.12);
  --danger:      #ff7a7a;

  /* Typografie */
  --font-display: 'Unbounded', 'Segoe UI', sans-serif;
  --font-body:    'Sora', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 16px 40px -22px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.03);
  --shadow-lg: 0 30px 60px -30px rgba(160,107,255,.25);

  --sidebar-w: 236px;
  --filters-w: 224px;
}

/* ============================================================
   Reset & Basis
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-hi); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

p { margin: 0 0 10px; }

.muted { color: var(--muted); }
.small { font-size: .84em; }

::selection { background: var(--accent-dim); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(160,107,255,.22); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }

:focus-visible {
  outline: 2px solid var(--wire);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Grundlayout: Nav-Spalte · (Filter-Spalte) · Inhalt
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #15152a 0%, #0b0b16 100%);
  border-right: 1px solid var(--border);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .01em;
  margin-bottom: 28px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.sidebar .brand span {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .08em;
}

.sidebar nav { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 0 10px;
  margin-bottom: 6px;
}
.sidebar nav a {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.sidebar nav a:hover { background: rgba(160,107,255,.08); color: var(--text); }
.sidebar nav a.active {
  background: var(--accent-dim);
  color: var(--accent-hi);
  font-weight: 600;
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(160,107,255,.7);
}

.logout-form { margin-top: 12px; }
.logout-form button {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  font-weight: 500;
  transition: all .15s ease;
}
.logout-form button:hover { color: var(--text); border-color: var(--border-hi); background: rgba(160,107,255,.08); }

/* Filter-Spalte */
.filters-col {
  width: var(--filters-w);
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 26px 18px;
  overflow-y: auto;
  max-height: 100vh;
  position: sticky;
  top: 0;
}
.filters-col h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--wire);
}
.filters-col .filter-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.filters-col .filter-group:last-of-type { border-bottom: none; }
.filters-col label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  margin: 0 -6px;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text-2);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.filters-col label.check:hover { background: rgba(160,107,255,.08); color: var(--text); }
.filters-col label.check .fc { color: var(--muted); margin-left: auto; font-size: .78em; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.filters-col a.clear-filters { font-size: .78rem; font-family: var(--font-mono); color: var(--muted); display: inline-block; margin-top: 10px; }
.filters-col a.clear-filters:hover { color: var(--accent-hi); }
.filters-col button { width: 100%; }

input[type=checkbox] {
  appearance: none;
  width: 15px; height: 15px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-hi);
  border-radius: 4px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  transition: all .12s ease;
}
input[type=checkbox]:hover { border-color: var(--accent); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #0a0a13;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Inhaltsbereich */
.content { flex: 1; padding: 34px 44px 64px; max-width: 1240px; min-width: 0; position: relative; }

h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.015em; }
h2 { margin: 36px 0 14px; font-family: var(--font-display); font-size: 1.04rem; font-weight: 700; letter-spacing: -.01em; }
h3 { margin: 26px 0 10px; font-size: .95rem; font-weight: 600; }
h1 + p.muted, h1 + .muted { margin-top: -2px; }

/* ============================================================
   Kennzahlen-Kacheln
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.stat {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 18px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  position: relative;
}
/* Blueprint-Eckmarke */
.stat::before {
  content: "";
  position: absolute;
  top: 7px; left: 7px;
  width: 8px; height: 8px;
  border: solid var(--border-hi);
  border-width: 1px 0 0 1px;
  opacity: .8;
}
.stat:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 26px 52px -24px rgba(0,0,0,.75), 0 0 26px -8px rgba(160,107,255,.28), inset 0 1px 0 rgba(255,255,255,.04);
}
.stat.muted { opacity: .5; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--accent-hi);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 6px;
  line-height: 1.5;
}

/* ============================================================
   Taxonomie-Balken
   ============================================================ */
.tax-bars { display: flex; flex-direction: column; gap: 9px; }
.tax-bar-row {
  display: grid;
  grid-template-columns: 240px 1fr 46px;
  align-items: center;
  gap: 14px;
}
.tax-bar-label { font-size: .87rem; color: var(--text-2); }
.tax-bar-track { background: var(--panel-2); border-radius: 100px; height: 8px; overflow: hidden; border: 1px solid var(--border); }
.tax-bar-fill {
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent) 100%);
  height: 100%;
  border-radius: 100px;
  box-shadow: 0 0 12px rgba(160,107,255,.5);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.tax-bar-count { text-align: right; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* ============================================================
   Seitenkopf & Aufklapp-Abschnitte
   ============================================================ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head-actions { display: flex; gap: 8px; }
.btn-ghost {
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  transition: all .15s ease;
}
.btn-ghost:hover { border-color: var(--accent-hi); background: rgba(160,107,255,.08); color: var(--text); transform: translateY(-1px); }

.disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin: 10px 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.disclosure > summary {
  cursor: pointer;
  padding: 13px 18px;
  font-size: .89rem;
  font-weight: 600;
  color: var(--text-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: background .15s ease, color .15s ease;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--accent-hi);
  transition: transform .2s ease;
}
.disclosure[open] > summary { color: var(--text); border-bottom: 1px solid var(--border); }
.disclosure[open] > summary::before { transform: rotate(45deg); }
.disclosure > summary:hover { background: rgba(160,107,255,.06); color: var(--text); }
.disclosure-body { padding: 18px; }
.disclosure-body > :first-child { margin-top: 0; }
.disclosure-body > :last-child { margin-bottom: 0; }
.stat.accent { border-color: var(--border-hi); background: linear-gradient(160deg, rgba(160,107,255,.14) 0%, var(--panel) 100%); }
.stat.accent .stat-num { color: var(--accent-hi); }

/* ============================================================
   Profilseite: Kennzahlen, Abschnitte, Notizen
   ============================================================ */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.profile-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0 4px;
  box-shadow: var(--shadow);
}
.profile-kpis > div {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.kpi-num { font-family: var(--font-display); font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.kpi-label { font-family: var(--font-mono); font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.profile-section { margin-top: 30px; }
.profile-section > h3 { margin-bottom: 10px; }

.note-list { display: flex; flex-direction: column; gap: 7px; }
.note-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .86rem;
  color: var(--text-2);
}
.note-item.flag { border-left: 3px solid var(--muted); }
.note-item.warn { border-left: 3px solid var(--warn); }
.research-card {
  background: linear-gradient(150deg, #171029 0%, var(--panel) 60%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 20px 50px -28px rgba(160,107,255,.4), inset 0 1px 0 rgba(255,255,255,.04);
}
.research-card > p:first-child { font-size: .92rem; color: var(--text); }
.research-facts { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0; }
.research-facts > div { background: var(--panel); padding: 9px 13px; display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: .86rem; align-items: baseline; }
.rf-label { color: var(--wire); font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; }
@media (max-width: 700px) { .research-facts > div { grid-template-columns: 1fr; gap: 2px; } }

.note-form { display: flex; gap: 8px; flex-wrap: wrap; }
.note-form input[type=text] { flex: 1; min-width: 220px; }
.inline-details { margin-top: 12px; }
.inline-details summary { cursor: pointer; font-family: var(--font-mono); font-size: .8rem; color: var(--wire); }
.inline-details summary:hover { color: var(--accent-hi); }
.inline-details .deal-form { margin-top: 12px; }
.info-box {
  background: var(--ok-dim);
  border: 1px solid rgba(77,225,232,.35);
  color: var(--wire);
  font-family: var(--font-mono);
  font-size: .78rem;
  margin: 0;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
}

.current-user { display: flex; align-items: center; gap: 9px; padding: 9px 4px 12px; border-top: 1px solid var(--border); margin-bottom: 8px; }
.user-avatar {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-hi);
  color: var(--accent-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 800;
}
.user-name { font-size: .84rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.note-src { flex-shrink: 0; text-align: right; max-width: 200px; overflow-wrap: anywhere; }
code { background: var(--panel-3); padding: 1px 6px; border-radius: 4px; font-size: .85em; font-family: var(--font-mono); color: var(--accent-hi); }

/* ============================================================
   Nutzbarkeits-Trichter
   ============================================================ */
.funnel { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 22px; }
.funnel-row {
  display: grid;
  grid-template-columns: 220px 1fr 72px;
  grid-template-areas: "label track num" ". note note";
  align-items: center;
  gap: 4px 14px;
}
.funnel-label { grid-area: label; font-size: .88rem; color: var(--text-2); font-weight: 500; }
.funnel-track { grid-area: track; background: var(--panel-2); border: 1px solid var(--border); border-radius: 100px; height: 22px; overflow: hidden; }
.funnel-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent) 100%);
  box-shadow: 0 0 16px rgba(160,107,255,.45);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.funnel-fill.final { background: linear-gradient(90deg, rgba(77,225,232,.45) 0%, var(--wire) 100%); box-shadow: 0 0 16px rgba(77,225,232,.45); }
.funnel-num { grid-area: num; text-align: right; font-family: var(--font-display); font-size: .92rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.funnel-note { grid-area: note; font-size: .77rem; line-height: 1.5; }

@media (max-width: 860px) {
  .funnel-row { grid-template-columns: 1fr 68px; grid-template-areas: "label num" "track track" "note note"; }
}

/* ============================================================
   Karten / Schnellzugriff
   ============================================================ */
.quicklinks { display: flex; gap: 12px; flex-wrap: wrap; }
.card-link {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  padding: 15px 20px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: all .18s ease;
}
.card-link:hover {
  border-color: var(--border-hi);
  background: var(--panel-2);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 26px 52px -24px rgba(0,0,0,.75), 0 0 26px -8px rgba(160,107,255,.28);
}

/* ============================================================
   Formularelemente
   ============================================================ */
.filter-bar { display: flex; gap: 9px; margin: 18px 0 14px; }
.filter-bar input { flex: 1; }

input[type=text], input[type=password], input[type=date], select, textarea {
  background: #0e0e1a;
  border: 1px solid var(--border-hi);
  color: var(--text);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: var(--font-mono);
  transition: border-color .15s ease, background .15s ease;
}
textarea { font-family: var(--font-body); }
input[type=text]:hover, select:hover, textarea:hover { border-color: rgba(160,107,255,.5); }
input[type=text]:focus, input[type=password]:focus, input[type=date]:focus, select:focus, textarea:focus {
  border-color: var(--wire);
  background: var(--panel-2);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select[multiple] { padding: 6px; }
select[multiple] option { padding: 4px 6px; border-radius: 4px; }

button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #0a0a13;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  font-weight: 500;
  box-shadow: 0 6px 20px -6px rgba(160,107,255,.6);
  transition: all .15s ease;
  white-space: nowrap;
}
button:hover { background: var(--accent-hi); border-color: var(--accent-hi); transform: translateY(-1px); box-shadow: 0 10px 26px -6px rgba(160,107,255,.75); }
button:active { transform: translateY(1px); }

fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
legend { color: var(--wire); font-family: var(--font-mono); font-size: .66rem; font-weight: 500; padding: 0 6px; text-transform: uppercase; letter-spacing: .12em; }

/* ============================================================
   Tabellen
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th {
  text-align: left;
  color: var(--wire);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 12px 14px;
  background: #0e0e1a;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background .12s ease; }
.data-table tbody tr:hover { background: rgba(160,107,255,.07); }
.data-table tbody tr.muted { opacity: .5; cursor: default; }
.data-table tbody tr.muted:hover { background: none; }
.data-table td:first-child { font-weight: 500; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ============================================================
   Badges, Chips, Punkte
   ============================================================ */
.badge {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border-hi);
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .08em;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  line-height: 1.7;
}
.badge.warn { background: var(--warn-dim); border-color: rgba(255,171,107,.35); color: var(--warn); }
.badge.person { background: var(--accent-dim); border-color: var(--border-hi); color: var(--accent-hi); }
.badge.tier-klein  { color: var(--muted); }
.badge.tier-mittel { color: var(--accent-hi); border-color: var(--border-hi); }
.badge.tier-groß   { color: var(--wire); background: var(--ok-dim); border-color: rgba(77,225,232,.35); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border-hi); }
.dot.ok { background: var(--wire); box-shadow: 0 0 8px var(--wire); }

.co-investor-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 4px; }
.co-investor-chip {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: .83rem;
  color: var(--text-2);
  transition: all .15s ease;
}
.co-investor-chip:hover { border-color: var(--accent); background: var(--panel-3); color: var(--text); }

/* ============================================================
   Seitennavigation
   ============================================================ */
.pagination {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .8rem;
}
.pagination a { font-weight: 500; }

.back-link { display: inline-block; margin-bottom: 14px; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; color: var(--muted); }
.back-link:hover { color: var(--accent-hi); }

.pill-link {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  margin-left: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-2);
  transition: all .15s ease;
}
.pill-link:hover { border-color: var(--accent); color: var(--accent-hi); }

/* ============================================================
   Profil-Raster
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.profile-grid > div {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.profile-grid > div::after {
  content: "";
  position: absolute;
  bottom: 7px; right: 7px;
  width: 8px; height: 8px;
  border: solid var(--border-hi);
  border-width: 0 1px 1px 0;
  opacity: .8;
}
.profile-grid h3 { margin: 0 0 12px; font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .13em; color: var(--wire); font-weight: 500; }
.profile-grid p { font-size: .88rem; margin-bottom: 7px; }
.profile-grid p:last-child { margin-bottom: 0; }

/* ============================================================
   Hinweisboxen
   ============================================================ */
.notice {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-2);
  box-shadow: var(--shadow);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice.warn { border-left-color: var(--warn); }
.notice p:last-child { margin-bottom: 0; }
.research-block .badge { margin-left: 6px; }
.research-block form { margin-top: 10px; }

/* ============================================================
   Taxonomie-Karten
   ============================================================ */
.tax-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.tax-card {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.tax-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 26px 52px -24px rgba(0,0,0,.75), 0 0 26px -8px rgba(160,107,255,.28);
}
.tax-card h3 { margin: 0 0 8px; font-size: .94rem; }
.tax-card p { font-size: .86rem; color: var(--text-2); }
.tax-card.behaviour { border-left: 3px solid var(--accent); }
.tax-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tax-hint { background: #0e0e1a; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .82rem !important; margin-top: 10px; }
.tax-hint strong { color: var(--text); }

.axis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 20px 0; }
.axis-card {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.axis-name { font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .13em; color: var(--wire); font-weight: 500; margin-bottom: 10px; }
.axis-poles { display: flex; align-items: center; gap: 10px; font-size: .89rem; font-weight: 600; color: var(--text); margin-bottom: 10px; flex-wrap: wrap; }
.axis-arrow { color: var(--accent); font-size: 1.1rem; }
.axis-card p { margin: 0; }

/* ============================================================
   Kanban-Pipeline
   ============================================================ */
.kanban { display: flex; gap: 13px; overflow-x: auto; margin-top: 20px; padding-bottom: 10px; }
.kanban-col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  min-width: 236px;
  flex: 1 0 236px;
  box-shadow: var(--shadow);
}
.kanban-col h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--wire);
  display: flex;
  justify-content: space-between;
}
.kanban-card {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  margin-top: 8px;
  color: var(--text);
  transition: all .16s ease;
}
.kanban-card:hover { border-color: var(--accent); background: var(--panel-3); transform: translateX(2px); box-shadow: 0 0 20px -6px rgba(160,107,255,.35); }
.kanban-card strong { font-size: .89rem; font-weight: 600; display: block; }

.new-deal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
.new-deal summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent-hi);
  list-style: none;
}
.new-deal summary::-webkit-details-marker { display: none; }
.new-deal summary:hover { color: var(--accent); }
.deal-form { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; max-width: 500px; }
.deal-form label { display: flex; flex-direction: column; gap: 5px; font-family: var(--font-mono); font-size: .66rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.deal-form label input, .deal-form label select, .deal-form label textarea { font-weight: 400; text-transform: none; letter-spacing: 0; }
.deal-form button { align-self: flex-start; margin-top: 4px; }
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 3px 14px 3px 0;
  color: var(--text-2);
  font-size: .85rem;
  cursor: pointer;
}
.checkbox-inline:hover { color: var(--text); }

.stage-bar { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.stage-btn { background: var(--panel-2); border-color: var(--border); color: var(--muted); font-weight: 500; box-shadow: none; }
.stage-btn:hover { background: var(--panel-3); border-color: var(--border-hi); color: var(--text-2); box-shadow: none; }
.stage-btn.active { background: var(--accent); border-color: var(--accent); color: #0a0a13; font-weight: 600; box-shadow: 0 6px 20px -6px rgba(160,107,255,.6); }

.inline-form { display: inline-flex; gap: 7px; align-items: center; }
.inline-form select { padding: 6px 10px; font-size: .82rem; }
.inline-form button { padding: 7px 13px; font-size: .74rem; }

.timeline { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.timeline-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-size: .87rem;
  color: var(--text-2);
}
.timeline-item strong { color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ============================================================
   Login — Hero-Anmutung wie auf rkx-consulting.de
   ============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 55% at 50% 12%, rgba(160,107,255,.16), transparent 70%),
    var(--bg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
/* Leiterbahn-Muster im Hintergrund */
.login-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%23a06bff' stroke-width='1' opacity='.5'%3E%3Cpath d='M0 24 H36 L48 36 V78 L60 90 H140'/%3E%3Cpath d='M24 0 V32 L36 44 H96 L108 56 V140'/%3E%3Cpath d='M140 100 H108 L96 112 V140'/%3E%3Ccircle cx='48' cy='36' r='2.6' fill='%23a06bff'/%3E%3Ccircle cx='108' cy='56' r='2.6' fill='%23a06bff'/%3E%3Ccircle cx='96' cy='112' r='2.6' fill='%23a06bff'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .22;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000, transparent 78%);
  pointer-events: none;
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
/* Blueprint-Eckmarken */
.login-card::before, .login-card::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--border-hi);
  border-style: solid;
}
.login-card::before { top: 9px; left: 9px; border-width: 1px 0 0 1px; }
.login-card::after { bottom: 9px; right: 9px; border-width: 0 1px 1px 0; }
.login-card .brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: .01em; margin-bottom: 2px; }
.login-card .brand span { font-family: var(--font-mono); color: var(--accent); font-weight: 500; font-size: .78rem; letter-spacing: .08em; }
.login-card p.muted { font-size: .82rem; line-height: 1.55; margin-bottom: 6px; }
.login-card .error {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: .78rem;
  margin: 0;
  padding: 9px 13px;
  background: rgba(255,122,122,.1);
  border: 1px solid rgba(255,122,122,.25);
  border-radius: var(--radius-sm);
}
.login-card input { padding: 12px 13px; }
.login-card button { padding: 12px; margin-top: 2px; }

/* ============================================================
   Responsiv
   ============================================================ */
@media (max-width: 1100px) {
  .filters-col { width: 190px; padding: 22px 14px; }
  .content { padding: 28px 26px 56px; }
  .tax-bar-row { grid-template-columns: 180px 1fr 42px; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 16px;
    padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar nav { flex-direction: row; gap: 14px; align-items: center; }
  .nav-group { flex-direction: row; gap: 4px; align-items: center; }
  .nav-group-label { display: none; }
  .sidebar nav a.active::before { display: none; }
  .logout-form { margin-top: 0; margin-left: auto; }
  .logout-form button { width: auto; padding: 8px 14px; }
  .filters-col { width: 100%; max-height: none; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .content { padding: 22px 18px 48px; }
  .tax-bar-row { grid-template-columns: 1fr 60px; }
  .tax-bar-track { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}

/* ============================================================
   ============================================================
   PORTAL-SPEZIFISCH
   Ergänzungen für den Kundenbereich. Die Basis oben bleibt
   deckungsgleich mit Invesco, damit beide Systeme gleich wirken.
   ============================================================
   ============================================================ */

/* ---------- Marke in der Seitenleiste (zweizeilig wie auf der Website) ---------- */
.sidebar .brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-decoration: none;
  color: var(--text);
}
.sidebar .brand span {
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-card .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
.login-card .brand span { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.login-foot { font-size: .74rem; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }

/* Zähler an Navigationspunkten (offene Rechnungen, Anfragen) */
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-badge {
  background: var(--accent);
  color: #0a0a13;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 100px;
  text-align: center;
}
.nav-ext { color: var(--muted) !important; }
.nav-ext:hover { color: var(--wire) !important; }
.ext-mark { color: var(--wire); font-size: .8em; }

.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-org {
  font-family: var(--font-mono); font-size: .62rem; color: var(--muted); letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Zweispaltiger Inhalt ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 8px; }
.two-col > section > h2:first-child { margin-top: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; gap: 8px; } }

.empty-state {
  color: var(--muted);
  font-size: .87rem;
  background: #0e0e1a;
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 10px 0;
}
.empty-state.small { padding: 10px; text-align: center; font-size: .8rem; }
.block { display: block; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
th.num { text-align: right; }

/* ---------- Status-Pillen ---------- */
.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-hi);
  color: var(--text-2);
  white-space: nowrap;
}
.pill.st-open  { color: var(--accent-hi); border-color: var(--border-hi); background: var(--accent-dim); }
.pill.st-paid  { color: var(--wire); border-color: rgba(77,225,232,.35); background: var(--ok-dim); }
.pill.st-late  { color: var(--danger); border-color: rgba(255,122,122,.35); background: rgba(255,122,122,.1); }
.pill.st-draft { color: var(--muted); }
.pill.st-void  { color: var(--muted); opacity: .7; }

.unit-tag {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wire);
}

/* ---------- Mandate ---------- */
.mandate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 8px; }
.mandate-grid.dimmed { opacity: .62; }
.mandate-card, .mandate-row {
  display: block;
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
}
.mandate-row { margin-bottom: 12px; }
.mandate-card:hover, .mandate-row:hover {
  transform: translateY(-2px);
  border-color: var(--border-hi);
  box-shadow: 0 26px 52px -24px rgba(0,0,0,.75), 0 0 26px -8px rgba(160,107,255,.28);
  color: var(--text);
}
.mandate-card::after {
  content: "";
  position: absolute;
  bottom: 7px; right: 7px;
  width: 8px; height: 8px;
  border: solid var(--border-hi);
  border-width: 0 1px 1px 0;
  opacity: .8;
}
.mandate-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.mandate-card h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.mandate-row strong { display: block; font-size: .98rem; margin-bottom: 10px; }
.mandate-next { display: block; font-size: .8rem; color: var(--muted); margin-top: 9px; }

.progress { background: var(--panel-2); border: 1px solid var(--border); border-radius: 100px; height: 6px; overflow: hidden; margin-top: 12px; }
.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent) 100%);
  box-shadow: 0 0 12px rgba(160,107,255,.5);
}

.kv-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 5px 0;
  font-size: .84rem;
  border-bottom: 1px solid var(--border);
}
.kv-row:last-child { border-bottom: none; }
.kv-row > span:first-child {
  color: var(--muted); font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em; flex-shrink: 0;
}
.kv-row > span:last-child { text-align: right; }
.mono { font-family: var(--font-mono); }

/* ---------- Aufgabenliste (Dashboard) ---------- */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  color: var(--text);
  transition: all .15s ease;
}
.todo-item:hover { border-color: var(--border-hi); border-left-color: var(--accent); background: var(--panel-2); color: var(--text); }
.todo-item.late { border-left-color: var(--danger); }
.todo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-amount { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Reiter ---------- */
.tabs { display: flex; gap: 6px; margin: 22px 0 4px; flex-wrap: wrap; }
.tab {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  transition: all .15s ease;
}
.tab:hover { border-color: var(--border-hi); color: var(--text-2); }
.tab.active { background: var(--accent-dim); border-color: var(--border-hi); color: var(--accent-hi); }

.due-late { font-family: var(--font-mono); font-size: .7rem; color: var(--danger); margin-left: 6px; }
.credit { color: var(--wire); }

/* ---------- Rechnungsdetail ---------- */
.invoice-head { display: grid; grid-template-columns: 300px 1fr; gap: 24px; margin: 22px 0 8px; align-items: start; }
@media (max-width: 860px) { .invoice-head { grid-template-columns: 1fr; } }
.invoice-status-box {
  background: linear-gradient(150deg, #171029, var(--panel));
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 24px 56px -30px rgba(160,107,255,.45), inset 0 1px 0 rgba(255,255,255,.04);
}
.invoice-status-box.st-late { border-color: rgba(255,122,122,.4); background: linear-gradient(150deg, #2a1519, var(--panel)); }
.invoice-status-box.st-paid { border-color: rgba(77,225,232,.35); background: linear-gradient(150deg, #0f2429, var(--panel)); }
.invoice-status-box .pill { align-self: flex-start; }
.invoice-total { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.invoice-meta {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}

.data-table tr.no-hover { cursor: default; }
.data-table tr.no-hover:hover { background: none; }
.invoice-items tfoot td {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  font-size: .86rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.invoice-items tfoot tr.total-row td {
  border-top: 1px solid var(--border-hi);
  color: var(--accent-hi);
  font-size: 1rem;
  font-weight: 600;
  padding-top: 12px; padding-bottom: 14px;
}

/* ---------- Zahlungswege ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 8px; }
.method-card {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow);
}
.method-card.is-default { border-color: var(--border-hi); box-shadow: 0 20px 44px -26px rgba(160,107,255,.4), inset 0 1px 0 rgba(255,255,255,.04); }
.method-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.method-card strong { font-size: .95rem; margin-bottom: 6px; }
.method-card form { margin-top: 12px; }
.method-card .btn-ghost { display: inline-block; width: 100%; text-align: center; background: transparent; box-shadow: none; }
.method-card.add-card { border-style: dashed; justify-content: center; }
.method-card.add-card p { margin: 6px 0 12px; }

/* ---------- Dokumente ---------- */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  color: var(--text);
  transition: all .15s ease;
}
.doc-item:not(.no-link):hover { border-color: var(--border-hi); background: var(--panel-2); color: var(--text); }
.doc-item.no-link { cursor: default; }
.doc-kind {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--wire); border: 1px solid rgba(77,225,232,.3); border-radius: 100px;
  padding: 3px 8px; text-align: center;
}
.doc-title { font-size: .89rem; min-width: 0; }
.doc-item > span:last-child { text-align: right; white-space: nowrap; line-height: 1.45; }
@media (max-width: 700px) {
  .doc-item { grid-template-columns: 1fr; gap: 6px; }
  .doc-kind { justify-self: start; }
  .doc-item > span:last-child { text-align: left; }
}

/* ---------- Pitch-Analysen ---------- */
.report-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.report-card {
  display: grid; grid-template-columns: 110px 1fr; gap: 22px;
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
@media (max-width: 700px) { .report-card { grid-template-columns: 1fr; gap: 14px; } }
.report-score {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  background: #0e0e1a;
  padding: 14px 6px;
}
.score-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.report-score.good .score-num { color: var(--wire); }
.report-score.mid  .score-num { color: var(--accent-hi); }
.report-score.low  .score-num { color: var(--warn); }
.report-body h3 { margin: 4px 0 8px; font-size: 1rem; }
.report-body p { font-size: .87rem; margin-bottom: 12px; }

/* ---------- Nachrichten-Verlauf ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 26px; }
.msg {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  max-width: 78%;
  box-shadow: var(--shadow);
}
.msg.from-kunde { align-self: flex-end; border-color: var(--border-hi); background: linear-gradient(150deg, #171029, var(--panel)); }
.msg.from-rkx { align-self: flex-start; }
.msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.msg-head strong { font-size: .84rem; }
.msg p { margin: 0; font-size: .89rem; color: var(--text-2); white-space: pre-wrap; }
@media (max-width: 700px) { .msg { max-width: 100%; } }

/* Kanban-Karten im Portal sind reine Anzeige */
.kanban-card { cursor: default; }
.kanban-card:hover { transform: none; }
.kanban-card .block { margin-top: 4px; }

/* ---------- Druckansicht Rechnung ---------- */
.print-body { background: var(--bg); padding: 40px 20px; }
.print-sheet {
  max-width: 800px; margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 48px;
  box-shadow: var(--shadow-lg);
}
.print-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-bottom: 22px; border-bottom: 1px solid var(--border-hi); margin-bottom: 28px;
}
.print-head .brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.print-head .brand span {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); display: block;
}
.print-inv-no { text-align: right; }
.print-inv-no strong { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.print-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 30px; }
.print-parties p { font-size: .88rem; line-height: 1.6; margin: 6px 0; }
.print-foot { margin-top: 22px; line-height: 1.6; }
.print-btn { margin-top: 24px; }
@media (max-width: 700px) { .print-parties { grid-template-columns: 1fr; gap: 18px; } .print-sheet { padding: 26px 22px; } }

@media print {
  .print-body { background: #fff; padding: 0; }
  .print-sheet { border: none; box-shadow: none; background: #fff; color: #111; max-width: none; }
  .print-btn { display: none; }
  .print-sheet .data-table { background: #fff; }
  .print-sheet .data-table th { background: #f3f0fa; color: #4d3384; }
  .print-sheet .data-table td, .print-sheet .invoice-items tfoot td { color: #111; }
  .print-sheet .muted, .print-sheet .kv-row > span:first-child { color: #555; }
  .print-sheet .invoice-items tfoot tr.total-row td { color: #4d3384; }
}

/* ============================================================
   MITARBEITERBEREICH
   Gleiche Sprache wie der Kundenbereich, nur mit Cyan als
   Leitfarbe in der Seitenleiste — damit man auf einen Blick
   sieht, auf welcher Seite des Tisches man gerade sitzt.
   ============================================================ */
.is-admin .sidebar { background: linear-gradient(180deg, #0d1c22 0%, #08131a 100%); border-right-color: rgba(77,225,232,.18); }
.is-admin .sidebar .brand span { color: var(--wire); }
.is-admin .sidebar nav a.active { background: rgba(77,225,232,.1); color: var(--wire); }
.is-admin .sidebar nav a.active::before { background: var(--wire); box-shadow: 0 0 10px rgba(77,225,232,.7); }
.is-admin .sidebar nav a:hover { background: rgba(77,225,232,.07); }
.is-admin .nav-badge { background: var(--wire); }
.is-admin .user-avatar { background: rgba(77,225,232,.12); border-color: rgba(77,225,232,.35); color: var(--wire); }

/* Ungelesene Anfragen */
.doc-item.unread { border-left: 3px solid var(--wire); background: rgba(77,225,232,.04); }
.new-mark {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em;
  background: var(--wire); color: #0a0a13; padding: 2px 7px; border-radius: 100px;
}

/* ---------- Rechnungsformular ---------- */
.invoice-form { margin-top: 8px; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin-bottom: 26px;
}
.form-grid label, .invoice-form label.full {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: .1em;
}
.form-grid label input, .form-grid label select,
.invoice-form label.full input { font-weight: 400; text-transform: none; letter-spacing: 0; }
.invoice-form label.full { margin: 20px 0; max-width: 520px; }
.invoice-form #itemsTable input { width: 100%; padding: 8px 10px; font-size: .84rem; }
.invoice-form #addRow { margin-top: 12px; }
.invoice-form .row-del {
  padding: 6px 10px; line-height: 1; color: var(--muted);
  background: transparent; box-shadow: none; border-color: var(--border);
}
.invoice-form .row-del:hover { color: var(--danger); border-color: rgba(255,122,122,.4); background: rgba(255,122,122,.08); }

.invoice-sum {
  margin: 24px 0 0 auto;
  max-width: 320px;
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.invoice-sum .kv-row:last-child { border-top: 1px solid var(--border-hi); border-bottom: none; margin-top: 6px; padding-top: 10px; }
.invoice-sum .kv-row:last-child > span:last-child {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--accent-hi);
}
.invoice-sum .kv-row > span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Chat: eigene vs. fremde Nachrichten im Admin ---------- */
.msg.from-rkx-own {
  align-self: flex-end;
  border-color: rgba(77,225,232,.3);
  background: linear-gradient(150deg, #0f2429, var(--panel));
}
.msg.from-kunde-other { align-self: flex-start; }

/* Verlaufseinträge nach Art */
.timeline-item.meilenstein { border-left-color: var(--wire); }
.timeline-item.freigabe { border-left-color: var(--accent-hi); }
.timeline-item span { display: block; margin-top: 3px; }

/* Kurze Hinweiscodes im Fließtext */
.notice code {
  background: #0e0e1a; border: 1px solid var(--border); padding: 1px 6px;
  border-radius: 4px; font-size: .84em;
}

/* ============================================================
   BENACHRICHTIGUNGEN im Kundenbereich
   Serverseitig gerendert und dadurch sofort sichtbar; die
   Einblendung sitzt über dem Inhalt statt ihn zu verdecken.
   ============================================================ */
.notif-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.notif {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 14px;
  align-items: center;
  background: linear-gradient(150deg, #171029, var(--panel));
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 20px 44px -26px rgba(160,107,255,.45), inset 0 1px 0 rgba(255,255,255,.04);
  animation: notifIn .35s ease;
}
@keyframes notifIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notif.rechnung { border-color: var(--border-hi); }
.notif.anfrage { border-color: rgba(77,225,232,.35); background: linear-gradient(150deg, #0f2429, var(--panel)); }
.notif-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  background: var(--accent-dim); border: 1px solid var(--border-hi); color: var(--accent-hi);
}
.notif.anfrage .notif-icon { background: rgba(77,225,232,.12); border-color: rgba(77,225,232,.35); color: var(--wire); }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-text strong { font-size: .93rem; }
.notif-body { font-size: .84rem; color: var(--text-2); }
.notif-actions { display: flex; align-items: center; gap: 8px; }
.notif-actions form { margin: 0; }
.notif-actions .btn-ghost { background: transparent; box-shadow: none; }
.notif-close {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  width: 30px; height: 30px; padding: 0; border-radius: 8px; box-shadow: none;
  font-size: 1rem; line-height: 1;
}
.notif-close:hover { color: var(--text); border-color: var(--border-hi); background: rgba(160,107,255,.08); transform: none; }
.linkish {
  background: none; border: none; color: var(--accent-hi); padding: 0;
  font-family: inherit; font-size: inherit; text-decoration: underline; box-shadow: none;
  cursor: pointer;
}
.linkish:hover { background: none; transform: none; box-shadow: none; color: var(--accent); }
@media (max-width: 700px) {
  .notif { grid-template-columns: 34px 1fr; }
  .notif-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ============================================================
   RECHNUNGSVORLAGEN
   ============================================================ */
.tpl-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: #0e0e1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.tpl-label {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-right: 4px;
}
.tpl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border-hi); color: var(--text-2);
  font-family: var(--font-body); font-size: .8rem; font-weight: 500; letter-spacing: 0;
  padding: 7px 13px; border-radius: 100px; box-shadow: none;
}
.tpl-chip:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--text); transform: translateY(-1px); box-shadow: none; }
.tpl-unit {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .08em;
  color: var(--wire); border: 1px solid rgba(77,225,232,.3); border-radius: 100px; padding: 1px 6px;
}

/* ============================================================
   ABRECHNUNGSLAUF — Vorschaukarten
   ============================================================ */
.run-card {
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.run-card-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.run-card-head strong { font-size: .98rem; }
.run-card-sum {
  text-align: right; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--accent-hi); font-variant-numeric: tabular-nums;
}
.run-card-sum .muted { font-family: var(--font-mono); font-weight: 400; font-size: .7rem; color: var(--muted); }
.run-card .data-table { border: none; box-shadow: none; background: transparent; margin: 0; }
.run-card .data-table td { border-bottom: 1px solid var(--border); padding: 8px 0; font-size: .86rem; }
.run-card .data-table tr:last-child td { border-bottom: none; }

/* ============================================================
   LERNBEREICH
   ============================================================ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin: 14px 0 30px;
}
.course-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel);
  background-image: linear-gradient(168deg, rgba(255,255,255,.028), transparent 42%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
}
.course-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hi);
  box-shadow: 0 26px 52px -24px rgba(0,0,0,.75), 0 0 26px -8px rgba(160,107,255,.28);
  color: var(--text);
}
.course-card::after {
  content: ""; position: absolute; bottom: 7px; right: 7px;
  width: 8px; height: 8px; border: solid var(--border-hi); border-width: 0 1px 1px 0; opacity: .8;
}
.course-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.course-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--accent-dim); border: 1px solid var(--border-hi);
  color: var(--accent-hi); font-size: 1rem;
}
.course-card h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.course-card p { color: var(--text-2); font-size: .86rem; margin: 0; flex: 1; }

.course-progress { margin-top: 10px; }
.course-progress-label {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase;
}
.course-meta {
  display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 12px;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Lektionsliste im Kurs ---------- */
.lesson-index { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.lesson-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  transition: all .15s ease;
}
.lesson-row:hover { border-color: var(--border-hi); background: var(--panel-2); color: var(--text); }
.lesson-row.is-done { border-left: 3px solid var(--wire); }
.lesson-num {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  font-family: var(--font-mono); font-size: .74rem; color: var(--muted);
}
.lesson-row.is-done .lesson-num { color: var(--wire); border-color: rgba(77,225,232,.4); background: var(--ok-dim); }
.lesson-main { min-width: 0; }
.lesson-main strong { font-size: .93rem; font-weight: 600; }
.lesson-meta {
  text-align: right; white-space: nowrap; line-height: 1.5;
  font-family: var(--font-mono); font-size: .7rem; color: var(--muted);
}
.has-video { color: var(--accent-hi); margin-left: 6px; }
@media (max-width: 640px) {
  .lesson-row { grid-template-columns: 34px 1fr; }
  .lesson-meta { grid-column: 2; text-align: left; }
}

/* ---------- Lektionsseite ---------- */
.lesson-head { margin-bottom: 20px; }
.lesson-step {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--wire);
}
.lesson-head h1 { margin: 8px 0 4px; }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #07070e;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: 0 24px 56px -30px rgba(160,107,255,.45);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-empty {
  display: flex; align-items: center; gap: 18px;
  background: #0e0e1a;
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 26px;
}
.video-empty-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  background: var(--accent-dim);
  color: var(--accent-hi); font-size: 1.1rem;
}
.video-empty strong { display: block; font-size: .95rem; }

/* Lektionstext — bewusst schmalere Spalte für die Lesbarkeit */
.lesson-body { max-width: 68ch; }
.lesson-body h3 {
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 700;
  margin: 32px 0 12px; letter-spacing: -.01em;
}
.lesson-body h3:first-child { margin-top: 0; }
.lesson-body p { font-size: .95rem; line-height: 1.75; color: var(--text-2); margin: 0 0 14px; }
.lesson-body strong { color: var(--text); font-weight: 600; }
.lesson-body em { color: var(--accent-hi); font-style: normal; }
.lesson-list { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.lesson-list li { font-size: .95rem; line-height: 1.7; color: var(--text-2); }
ul.lesson-list { list-style: none; padding-left: 0; }
ul.lesson-list li { position: relative; padding-left: 20px; }
ul.lesson-list li::before {
  content: "◆"; position: absolute; left: 0; top: .1em;
  color: var(--accent); font-size: .55rem;
}
ol.lesson-list { list-style: decimal; }
ol.lesson-list li::marker { color: var(--accent-hi); font-family: var(--font-mono); font-size: .85em; }
.lesson-hint {
  background: linear-gradient(150deg, #171029, var(--panel));
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-2);
}
.lesson-hint strong { color: var(--text); }

.lesson-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border);
}
.lesson-foot form { margin: 0; }
.lesson-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.lesson-nav .btn-ghost { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* Texteditor im Mitarbeiterbereich */
.lesson-editor {
  width: 100%;
  font-family: var(--font-mono);
  font-size: .84rem;
  line-height: 1.7;
  min-height: 420px;
}

/* ============================================================
   RKX-Design v2 — gleiche Optik wie die Website (Oktober 2026)
   Lila bleibt, wird markanter: tiefere Flächen, weiche Verläufe,
   Pillen-Buttons, ruhige Glows, Leiterbahn-Ecke oben links.
   Identisch in Invesco und im Kundenbereich. Nur Bildschirm —
   die Druckansichten bleiben unberührt.
   ============================================================ */
@media screen {
  :root {
    --bg:          #08070f;
    --panel:       #14122a;
    --panel-2:     #1b1838;
    --panel-3:     #252148;
    --border:      rgba(169,107,255,.2);
    --border-hi:   rgba(169,107,255,.42);
    --text:        #f6f3ff;
    --text-2:      #bdb7d6;
    --muted:       #8a84a8;
    --accent:      #a96bff;
    --accent-hi:   #d3b8ff;
    --accent-deep: #5a3aa0;
    --accent-dim:  rgba(169,107,255,.14);
    --radius:      18px;
    --radius-sm:   12px;
    --surface:     linear-gradient(165deg, rgba(30,25,66,.88), rgba(18,16,40,.92));
    --shadow:      0 18px 44px -26px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.035);
    --shadow-lg:   0 34px 80px -40px rgba(169,107,255,.6);
  }

  body {
    background:
      radial-gradient(900px 620px at 94% -8%, rgba(169,107,255,.15), transparent 62%),
      radial-gradient(760px 560px at 18% 112%, rgba(77,225,232,.05), transparent 62%),
      var(--bg);
    background-attachment: fixed;
  }
  h1 { font-weight: 800; letter-spacing: -.025em; }
  h2 { letter-spacing: -.015em; }
  a:hover { color: #fff; }

  /* ---------- Leiterbahn-Ecke oben links im Inhalt ---------- */
  .content {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='300'%3E%3Cdefs%3E%3ClinearGradient id='f' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='420' y2='260'%3E%3Cstop offset='0' stop-color='%23a96bff' stop-opacity='.38'/%3E%3Cstop offset='1' stop-color='%23a96bff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23f)' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 40 H90 L110 60 V120 L126 136 H260'/%3E%3Cpath d='M40 0 V36 L56 52 H170 L186 68 V160'/%3E%3Cpath d='M0 150 H48 L64 166 V230'/%3E%3Cpath d='M210 0 V20 L226 36 H360'/%3E%3C/g%3E%3Cg fill='url(%23f)'%3E%3Ccircle cx='110' cy='60' r='3'/%3E%3Ccircle cx='126' cy='136' r='3'/%3E%3Ccircle cx='56' cy='52' r='3'/%3E%3Ccircle cx='186' cy='68' r='3'/%3E%3Ccircle cx='64' cy='166' r='3'/%3E%3Ccircle cx='226' cy='36' r='3'/%3E%3C/g%3E%3Ccircle cx='170' cy='52' r='3' fill='%234de1e8' opacity='.55'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0 0;
  }

  /* ---------- Seitenleiste ---------- */
  .sidebar {
    background: linear-gradient(180deg, rgba(27,22,60,.95) 0%, rgba(9,8,18,.98) 100%);
    border-right-color: var(--border);
  }
  .sidebar nav a { border-radius: 12px; }
  .sidebar nav a:hover { background: rgba(169,107,255,.1); }
  .sidebar nav a.active {
    background: linear-gradient(135deg, rgba(169,107,255,.28), rgba(169,107,255,.08));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(169,107,255,.32), 0 10px 24px -14px rgba(169,107,255,.85);
  }

  /* ---------- Flächen: weiche Verläufe statt flacher Kästen ---------- */
  .stat, .card-link, .disclosure, .notice, .info-box, .new-deal,
  .profile-kpis > div, .profile-grid > div, .research-facts > div,
  .tax-card, .axis-card, .kanban-col, .kanban-card, .note-item, .timeline-item,
  .mandate-card, .mandate-row, .method-card, .doc-item, .report-card, .run-card,
  .course-card, .lesson-row, .todo-item, .msg, .invoice-meta, .invoice-sum, .notif {
    background: var(--surface);
    border-color: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .kanban-card, .note-item, .timeline-item, .doc-item, .lesson-row, .todo-item, .msg, .notif { border-radius: 14px; }
  .stat:hover, .card-link:hover, .mandate-card:hover, .mandate-row:hover, .tax-card:hover,
  .kanban-card:hover, .doc-item:not(.no-link):hover, .lesson-row:hover, .todo-item:hover, .report-card:hover, .course-card:hover {
    background: linear-gradient(165deg, rgba(40,31,86,.92), rgba(20,17,46,.94));
    border-color: var(--border-hi);
    box-shadow: 0 26px 56px -28px rgba(169,107,255,.6), inset 0 1px 0 rgba(255,255,255,.05);
  }
  .notif.anfrage { background: linear-gradient(150deg, rgba(15,40,46,.92), rgba(18,16,40,.92)); }

  /* Kennzahlen wie auf der Website: weiße, kräftige Zahlen, keine Eckmarken */
  .stat::before { display: none; }
  .stat-num { color: #fff; }
  .stat.accent { border-color: var(--border-hi); background: linear-gradient(165deg, rgba(48,33,104,.92), rgba(20,17,46,.94)); }
  .stat.accent .stat-num { color: var(--accent-hi); }
  .mandate-card::after { display: none; }

  /* ---------- Buttons: Pillenform, Verlauf ---------- */
  button {
    border-radius: 999px;
    background: linear-gradient(180deg, #b57dff, #9a55ff);
    border-color: transparent;
    color: #0b0816;
    font-weight: 600;
    padding: 11px 20px;
    box-shadow: 0 10px 28px -12px rgba(169,107,255,.85), inset 0 1px 0 rgba(255,255,255,.3);
  }
  button:hover {
    background: linear-gradient(180deg, #c597ff, #a764ff);
    border-color: transparent;
    box-shadow: 0 14px 34px -12px rgba(169,107,255,1), inset 0 1px 0 rgba(255,255,255,.4);
  }
  .btn-ghost, .pill-link, .tab, .stage-btn, .tpl-chip, .co-investor-chip {
    border-radius: 999px;
  }
  .btn-ghost { border-color: var(--border-hi); background: rgba(169,107,255,.06); box-shadow: none; }
  .btn-ghost:hover { border-color: var(--accent-hi); background: rgba(169,107,255,.14); color: #fff; }
  .logout-form button, .method-card .btn-ghost, .notif-actions .btn-ghost, .lesson-nav .btn-ghost {
    background: transparent; color: var(--text-2); box-shadow: none; border: 1px solid var(--border-hi);
  }
  .logout-form button:hover { color: #fff; background: rgba(169,107,255,.12); }
  .tab.active, .stage-btn.active {
    background: linear-gradient(135deg, rgba(169,107,255,.3), rgba(169,107,255,.1));
    color: #fff; border-color: var(--border-hi);
  }

  /* ---------- Formulare ---------- */
  input[type=text], input[type=password], input[type=date], input[type=email], input[type=number], select, textarea {
    border-radius: 12px;
    background: rgba(13,12,28,.9);
    border-color: var(--border);
  }
  input[type=text]:focus, input[type=password]:focus, input[type=date]:focus, input[type=email]:focus,
  input[type=number]:focus, select:focus, textarea:focus {
    background: rgba(20,18,42,.95);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(169,107,255,.18);
  }

  /* ---------- Tabellen ---------- */
  .data-table { background: var(--surface); border-color: var(--border); border-radius: var(--radius); }
  .data-table th { background: rgba(169,107,255,.08); }
  .data-table tbody tr:hover { background: rgba(169,107,255,.09); }

  /* ---------- Pillen, Badges ---------- */
  .badge, .pill { border-radius: 999px; }

  /* ---------- Anmeldung ---------- */
  .login-body {
    background:
      radial-gradient(ellipse 60% 50% at 50% 100%, rgba(190,150,255,.2), transparent 70%),
      radial-gradient(ellipse 70% 55% at 50% 0%, rgba(169,107,255,.14), transparent 70%),
      var(--bg);
  }
  .login-body::before { opacity: .26; }
  .login-card {
    background: radial-gradient(420px 220px at 80% 0%, rgba(169,107,255,.22), transparent 70%), var(--surface);
    border-radius: 24px;
    border-color: var(--border-hi);
    box-shadow: 0 40px 90px -40px rgba(169,107,255,.75), inset 0 1px 0 rgba(255,255,255,.05);
  }
  .login-card::before, .login-card::after { display: none; }
}

/* Hinweis in der Rechnungs-Druckansicht: Pflichtangaben fehlen (nur Bildschirm, nur Mitarbeiter) */
.print-warn { margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,171,107,.45); background: rgba(255,171,107,.1); color: var(--warn); font-size: .86rem; }
.print-sender { font-size: .74rem; }
@media print { .print-warn { display: none; } }
