/* ============================================================
   BD-Tool Redesign — Token- & Komponentensystem
   3 Richtungen (Klassik / Modern / Signature) × Hell/Dunkel
   Markenfarbe Noerr: #5642E8
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---------- DEFAULT TOKENS (= Modern / Hell) ---------- */
:root {
  --font-display: 'Hanken Grotesk', system-ui, sans-serif;
  --font-sans: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg: #f4f5f8;
  --bg-2: #eceef3;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f5;
  --border: #e4e7ee;
  --border-strong: #d3d8e3;

  --text: #14161d;
  --muted: #5b6172;
  --faint: #9aa0b1;

  --brand: #5642e8;
  --brand-2: #7a6cf0;
  --brand-ink: #4334c0;
  --brand-tint: #efedfd;
  --brand-tint-2: #e4e0fb;
  --on-brand: #ffffff;
  --ring: rgba(86,66,232,.28);

  --urgent: #e0463b;       --urgent-tint: #fdecea;
  --danger: #dc3545;       --danger-tint: #fdecec;
  --success: #169163;      --success-tint: #e6f5ee;
  --warn: #c0820f;         --warn-tint: #fbf2dd;

  --radius-sm: 8px;
  --radius: 13px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(20,22,29,.04), 0 4px 14px rgba(20,22,29,.05);
  --shadow-lg: 0 8px 30px rgba(20,22,29,.10);
  --shadow-brand: 0 8px 26px rgba(86,66,232,.18);

  --sidebar-bg: #ffffff;
  --sidebar-grad: #ffffff;
  --sidebar-text: #2a2e3a;
  --sidebar-muted: #7b8194;
  --sidebar-active-bg: var(--brand);
  --sidebar-active-text: #ffffff;
  --sidebar-border: #e8eaf0;
  --sidebar-hover: #f3f4f8;
  --sidebar-w: 266px;

  /* Dichte */
  --app-pad: 30px;
  --gap: 16px;
  --card-pad: 15px;
  --col-gap: 16px;
  --fs-base: 14px;
}

/* density variants */
[data-density="kompakt"] { --app-pad: 22px; --gap: 11px; --card-pad: 11px; --col-gap: 12px; --fs-base: 13px; }
[data-density="weit"]    { --app-pad: 40px; --gap: 22px; --card-pad: 19px; --col-gap: 22px; --fs-base: 15px; }

/* accent hue tweak (keeps brand violet by default) */
[data-accent="indigo"] { --brand:#4f46e5; --brand-2:#7c74f2; --brand-ink:#4036c0; --brand-tint:#ecebfb; --brand-tint-2:#dedcfa; --ring:rgba(79,70,229,.28); --shadow-brand:0 8px 26px rgba(79,70,229,.18); }
[data-accent="plum"]   { --brand:#7c3aed; --brand-2:#9b6bf5; --brand-ink:#6726cf; --brand-tint:#f1eafe; --brand-tint-2:#e7dbfd; --ring:rgba(124,58,237,.28); --shadow-brand:0 8px 26px rgba(124,58,237,.2); }
[data-accent="navy"]   { --brand:#2447d6; --brand-2:#5a73e8; --brand-ink:#1e3aad; --brand-tint:#e8ecfb; --brand-tint-2:#d7defa; --ring:rgba(36,71,214,.28); --shadow-brand:0 8px 26px rgba(36,71,214,.18); }

/* =====================================================================
   MODERN / DUNKEL
   ===================================================================== */
[data-dir="modern"][data-theme="dark"] {
  --bg: #0c0d12;
  --bg-2: #0a0b0f;
  --surface: #15171f;
  --surface-2: #1b1e28;
  --surface-3: #232733;
  --border: #262a36;
  --border-strong: #333847;
  --text: #eef0f6;
  --muted: #9aa1b4;
  --faint: #6a7186;
  --brand: #8b7cff;
  --brand-2: #a99dff;
  --brand-ink: #b9aefff2;
  --brand-tint: #1c1b3a;
  --brand-tint-2: #232153;
  --on-brand: #ffffff;
  --ring: rgba(139,124,255,.4);
  --urgent: #ff6a5e; --urgent-tint: #2a1614;
  --danger: #ff5a67; --danger-tint: #2a1417;
  --success: #34d399; --success-tint: #0e2620;
  --warn: #e8b14b; --warn-tint: #2a2110;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.55);
  --shadow-brand: 0 10px 30px rgba(139,124,255,.25);
  --sidebar-bg: #101219;
  --sidebar-grad: #101219;
  --sidebar-text: #d7dbe8;
  --sidebar-muted: #79809a;
  --sidebar-active-bg: var(--brand);
  --sidebar-active-text: #14111f;
  --sidebar-border: #1f2330;
  --sidebar-hover: #191c26;
}

/* =====================================================================
   KLASSIK — editorial, serifenbetont, sehr ruhig
   ===================================================================== */
[data-dir="klassik"] {
  --font-display: 'Newsreader', Georgia, serif;
  --font-sans: 'Hanken Grotesk', system-ui, sans-serif;
  --radius-sm: 4px; --radius: 6px; --radius-lg: 8px;
  --bg: #f6f5f1;
  --bg-2: #efede6;
  --surface: #fffefb;
  --surface-2: #f7f6f1;
  --surface-3: #efede5;
  --border: #e5e2d8;
  --border-strong: #d6d2c4;
  --text: #1f1d1a;
  --muted: #6a665c;
  --faint: #9a958a;
  --brand: #4a39c9;
  --brand-2: #6b5ce0;
  --brand-ink: #3a2ca0;
  --brand-tint: #edebf9;
  --brand-tint-2: #e1ddf6;
  --ring: rgba(74,57,201,.25);
  --urgent: #a8302a; --urgent-tint: #f6e7e5;
  --danger: #a8302a; --danger-tint: #f6e7e5;
  --success: #2c6b46; --success-tint: #e7f0ea;
  --warn: #9a6c12; --warn-tint: #f4ecd9;
  --shadow: 0 1px 0 rgba(31,29,26,.04);
  --shadow-lg: 0 10px 30px rgba(31,29,26,.10);
  --shadow-brand: 0 8px 24px rgba(74,57,201,.14);
  --sidebar-bg: #211f1b;
  --sidebar-grad: #211f1b;
  --sidebar-text: #e9e6dd;
  --sidebar-muted: #a39d8f;
  --sidebar-active-bg: #322f28;
  --sidebar-active-text: #ffffff;
  --sidebar-border: #34302a;
  --sidebar-hover: #2a2722;
}
[data-dir="klassik"][data-theme="dark"] {
  --bg: #15140f;
  --bg-2: #100f0b;
  --surface: #1d1b16;
  --surface-2: #232019;
  --surface-3: #2b2820;
  --border: #2f2c23;
  --border-strong: #3d3930;
  --text: #f0ece1;
  --muted: #a9a392;
  --faint: #756f60;
  --brand: #a99cff;
  --brand-2: #c2b8ff;
  --brand-ink: #c8bfff;
  --brand-tint: #211d3a;
  --brand-tint-2: #2a2548;
  --ring: rgba(169,156,255,.35);
  --urgent: #e98b84; --urgent-tint: #2c1715;
  --danger: #e98b84; --danger-tint: #2c1715;
  --success: #79c79c; --success-tint: #12241a;
  --warn: #d8b46a; --warn-tint: #271f10;
  --shadow: 0 1px 0 rgba(0,0,0,.4);
  --shadow-lg: 0 12px 34px rgba(0,0,0,.6);
  --sidebar-bg: #100f0b;
  --sidebar-grad: #100f0b;
  --sidebar-text: #e9e6dd;
  --sidebar-muted: #8d8779;
  --sidebar-active-bg: #2a2720;
  --sidebar-active-text: #fff;
  --sidebar-border: #211f18;
  --sidebar-hover: #1b1914;
}

/* =====================================================================
   SIGNATURE — kühn, violett-getrieben, Tiefe & Glow
   ===================================================================== */
[data-dir="signature"] {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Hanken Grotesk', system-ui, sans-serif;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 22px;
  --bg: #f3f1fb;
  --bg-2: #e9e5f9;
  --surface: #ffffff;
  --surface-2: #f6f4fe;
  --surface-3: #efeafd;
  --border: #e7e2f7;
  --border-strong: #d8d0f0;
  --text: #1a1530;
  --muted: #645d82;
  --faint: #9b93b8;
  --brand: #5642e8;
  --brand-2: #8a78ff;
  --brand-ink: #4030c4;
  --brand-tint: #ece8fe;
  --brand-tint-2: #ddd6fc;
  --on-brand: #ffffff;
  --ring: rgba(86,66,232,.32);
  --urgent: #f0445f; --urgent-tint: #fdeaee;
  --danger: #ec4163; --danger-tint: #fdeaef;
  --success: #15a06b; --success-tint: #e4f5ee;
  --warn: #c9870f; --warn-tint: #fbf1da;
  --shadow: 0 2px 8px rgba(86,66,232,.07), 0 10px 30px rgba(40,30,90,.07);
  --shadow-lg: 0 20px 50px rgba(60,40,150,.18);
  --shadow-brand: 0 14px 40px rgba(86,66,232,.32);
  --sidebar-bg: #1a1037;
  --sidebar-grad: linear-gradient(180deg, #2a1a63 0%, #1a1037 55%, #160c30 100%);
  --sidebar-text: #e9e4ff;
  --sidebar-muted: #9a8fce;
  --sidebar-active-bg: linear-gradient(120deg, #6a51ff, #8a78ff);
  --sidebar-active-text: #ffffff;
  --sidebar-border: rgba(255,255,255,.08);
  --sidebar-hover: rgba(255,255,255,.06);
}
[data-dir="signature"][data-theme="dark"] {
  --bg: #0a0718;
  --bg-2: #070512;
  --surface: #140f2b;
  --surface-2: #1b1438;
  --surface-3: #241a4a;
  --border: #261c4d;
  --border-strong: #352866;
  --text: #f1edff;
  --muted: #a99fd2;
  --faint: #6f6699;
  --brand: #8a78ff;
  --brand-2: #ab9cff;
  --brand-ink: #c4baff;
  --brand-tint: #1f1647;
  --brand-tint-2: #281c59;
  --on-brand: #0c0820;
  --ring: rgba(138,120,255,.45);
  --urgent: #ff5e78; --urgent-tint: #2c1320;
  --danger: #ff5070; --danger-tint: #2c1320;
  --success: #2fd396; --success-tint: #0c2820;
  --warn: #f0b94f; --warn-tint: #2a2010;
  --shadow: 0 2px 10px rgba(0,0,0,.5), 0 12px 40px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  --shadow-brand: 0 16px 48px rgba(138,120,255,.4);
  --sidebar-bg: #0c0820;
  --sidebar-grad: linear-gradient(180deg, #1c1247 0%, #0c0820 60%);
  --sidebar-text: #e9e4ff;
  --sidebar-muted: #8d82bb;
  --sidebar-active-bg: linear-gradient(120deg, #6a51ff, #9a86ff);
  --sidebar-active-text: #fff;
  --sidebar-border: rgba(255,255,255,.07);
  --sidebar-hover: rgba(255,255,255,.05);
}

/* =====================================================================
   MODERN / HELL — Flächenton-Varianten ("zu weiß" beheben)
   ===================================================================== */
[data-dir="modern"][data-theme="light"][data-surface="warm"] {
  --bg: #f1eee6; --bg-2: #e8e3d8;
  --surface: #fffdf8; --surface-2: #f7f2e9; --surface-3: #efe9dd;
  --border: #e9e2d3; --border-strong: #d9d0bd;
  --text: #1d1a13; --muted: #6c6555; --faint: #a39a86;
  --sidebar-bg: #fffdf8; --sidebar-grad: #fffdf8; --sidebar-border: #ece5d7; --sidebar-hover: #f5f0e6; --sidebar-text: #2c2920; --sidebar-muted: #847c6b;
  --shadow: 0 1px 2px rgba(60,50,30,.05), 0 4px 14px rgba(60,50,30,.06);
  --shadow-lg: 0 10px 30px rgba(60,50,30,.11);
}
[data-dir="modern"][data-theme="light"][data-surface="slate"] {
  --bg: #e6e9f1; --bg-2: #dce0ec;
  --surface: #ffffff; --surface-2: #f3f5fb; --surface-3: #e8ecf6;
  --border: #dbe0eb; --border-strong: #c6cddc;
  --text: #121622; --muted: #586073; --faint: #939aad;
  --sidebar-bg: #ffffff; --sidebar-grad: #ffffff; --sidebar-border: #e2e6f0; --sidebar-hover: #f0f3f9;
  --shadow: 0 1px 2px rgba(20,30,60,.05), 0 6px 18px rgba(20,30,60,.08);
  --shadow-lg: 0 14px 36px rgba(20,30,60,.13);
}
[data-dir="modern"][data-theme="light"][data-surface="mist"] {
  --bg: #eceaf6; --bg-2: #e3def1;
  --surface: #ffffff; --surface-2: #f6f4fc; --surface-3: #ede9f7;
  --border: #e5e0f1; --border-strong: #d3cce7;
  --text: #16131f; --muted: #605971; --faint: #9890af;
  --sidebar-bg: #ffffff; --sidebar-grad: #ffffff; --sidebar-border: #e7e2f3; --sidebar-hover: #f2eff9;
  --shadow: 0 1px 2px rgba(40,30,90,.05), 0 6px 18px rgba(40,30,90,.07);
}

/* =====================================================================
   SIGNATURE — Paletten-Varianten
   ===================================================================== */
/* Mitternacht — bläuliches Indigo */
[data-dir="signature"][data-theme="light"][data-sig="midnight"] {
  --brand: #4836d8; --brand-2: #6e5cf0; --brand-ink: #3526b0; --brand-tint: #e9e7fb; --brand-tint-2: #dbd7f8; --ring: rgba(72,54,216,.3); --shadow-brand: 0 14px 40px rgba(72,54,216,.3);
  --bg: #edeffa; --bg-2: #e1e6f5; --surface: #ffffff; --surface-2: #f3f5fd; --surface-3: #e9edf9;
  --border: #e0e4f4; --border-strong: #ccd3ec; --text: #111430; --muted: #595f80; --faint: #969ec0;
  --sidebar-grad: linear-gradient(180deg, #1f2456 0%, #141838 55%, #0e1130 100%);
  --sidebar-active-bg: linear-gradient(120deg, #5a5bf0, #7b78ff); --sidebar-muted: #8f93cb;
}
[data-dir="signature"][data-theme="dark"][data-sig="midnight"] {
  --brand: #7d7cff; --brand-2: #9c9bff; --brand-ink: #bcbcff; --brand-tint: #181a45; --brand-tint-2: #202356; --ring: rgba(125,124,255,.45); --shadow-brand: 0 16px 48px rgba(125,124,255,.4);
  --bg: #070819; --bg-2: #04050f; --surface: #101230; --surface-2: #15183c; --surface-3: #1d2150;
  --border: #1f2350; --border-strong: #2d3370; --text: #edefff; --muted: #99a0cc; --faint: #6a6f9c;
  --sidebar-bg: #0a0c22; --sidebar-grad: linear-gradient(180deg, #161a44 0%, #0a0c22 60%);
  --sidebar-active-bg: linear-gradient(120deg, #5a5bf0, #8a88ff); --sidebar-muted: #828ac0;
}
/* Pflaume — wärmer, magenta-getönt */
[data-dir="signature"][data-theme="light"][data-sig="plum"] {
  --brand: #8a35d6; --brand-2: #a85cea; --brand-ink: #6f24b4; --brand-tint: #f3e8fb; --brand-tint-2: #e8d6f7; --ring: rgba(138,53,214,.3); --shadow-brand: 0 14px 40px rgba(138,53,214,.3);
  --bg: #f5eefa; --bg-2: #eee0f6; --surface: #ffffff; --surface-2: #faf4fd; --surface-3: #f2e8fa;
  --border: #eee0f6; --border-strong: #dfc9ed; --text: #1f1330; --muted: #695578; --faint: #ab95bc;
  --sidebar-grad: linear-gradient(180deg, #3a1463 0%, #260c44 55%, #1d0938 100%);
  --sidebar-active-bg: linear-gradient(120deg, #9a45e0, #c06bf0); --sidebar-muted: #a888c4;
}
[data-dir="signature"][data-theme="dark"][data-sig="plum"] {
  --brand: #b06cff; --brand-2: #c79bff; --brand-ink: #d4baff; --brand-tint: #26123f; --brand-tint-2: #2f1850; --ring: rgba(176,108,255,.45); --shadow-brand: 0 16px 48px rgba(176,108,255,.4);
  --bg: #0f0718; --bg-2: #09040f; --surface: #1a0f2b; --surface-2: #221438; --surface-3: #2c1a4a;
  --border: #2a1a45; --border-strong: #3b2660; --text: #f4edff; --muted: #b09cce; --faint: #786692;
  --sidebar-bg: #160726; --sidebar-grad: linear-gradient(180deg, #2a1145 0%, #160726 60%);
  --sidebar-active-bg: linear-gradient(120deg, #a050e8, #c47bf0); --sidebar-muted: #9a82b8;
}
/* Noir — zurückhaltend, Violett nur als Akzent */
[data-dir="signature"][data-theme="light"][data-sig="noir"] {
  --bg: #f0f0f3; --bg-2: #e7e7eb; --surface: #ffffff; --surface-2: #f6f6f9; --surface-3: #ededf0;
  --border: #e5e5ea; --border-strong: #d3d3da; --text: #16151c; --muted: #5d5c68; --faint: #9a99a6;
  --sidebar-bg: #1a1923; --sidebar-grad: linear-gradient(180deg, #211f2b 0%, #15141d 100%);
  --sidebar-text: #e8e7ee; --sidebar-muted: #9b9aaa; --sidebar-border: rgba(255,255,255,.07);
  --sidebar-active-bg: linear-gradient(120deg, #6a51ff, #8a78ff); --sidebar-hover: rgba(255,255,255,.05);
}
[data-dir="signature"][data-theme="dark"][data-sig="noir"] {
  --bg: #0b0b0e; --bg-2: #070709; --surface: #16161b; --surface-2: #1c1c22; --surface-3: #24242c;
  --border: #26262e; --border-strong: #34343e; --text: #f0f0f4; --muted: #a0a0ac; --faint: #6c6c78;
  --sidebar-bg: #0c0c10; --sidebar-grad: linear-gradient(180deg, #15151b 0%, #0c0c10 100%);
  --brand: #8a78ff; --brand-2: #a99cff; --brand-ink: #c4baff; --brand-tint: #1c1830; --brand-tint-2: #241f40; --sidebar-muted: #8b8a98;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { min-height: 100vh; }
.root-scope { color: var(--text); background: var(--bg); min-height: 100vh; transition: background-color .45s ease, color .3s ease; }
.bd-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  transition: background-color .45s ease, color .3s ease;
}
.surface-anim, .bd-app, .sidebar, .col, .s-card, .p-card, .n-item, .kpi, .topbar, .tab, .seg {
  transition: background-color .4s ease, color .3s ease, border-color .35s ease, box-shadow .35s ease, transform .25s ease;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--sidebar-grad);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
}
.sidebar::after { /* signature glow */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
[data-dir="signature"] .sidebar::after {
  opacity: 1;
  background: radial-gradient(420px 220px at 30% 8%, rgba(138,120,255,.35), transparent 70%);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 10px 16px; margin-bottom: 6px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  box-shadow: var(--shadow-brand);
}
.brand-mark svg { width: 19px; height: 19px; }
[data-dir="klassik"] .brand-mark { border-radius: 4px; background: var(--brand); }
[data-dir="signature"] .brand-mark { background: linear-gradient(135deg, #7a64ff, #5642e8); border-radius: 11px; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--sidebar-text); }
[data-dir="klassik"] .brand-word { font-weight: 600; letter-spacing: .01em; }
.brand-word b { color: var(--brand-2); font-weight: 800; }
[data-dir="klassik"] .brand-word b { color: #c8bfff; }

.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--sidebar-muted); padding: 14px 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--sidebar-text); cursor: pointer;
  font-weight: 500; font-size: 13.5px; position: relative;
  border: 1px solid transparent;
}
[data-dir="klassik"] .nav-item { border-radius: 5px; }
.nav-item .nav-ico { width: 18px; height: 18px; flex: none; opacity: .82; }
.nav-item > span:not(.nav-badge) { line-height: 1.2; min-width: 0; }
.nav-item:hover { background: var(--sidebar-hover); }
a.nav-item { text-decoration: none; color: var(--sidebar-text); }
a.brand { text-decoration: none; color: inherit; }
a.brand:hover .brand-word { opacity: .85; }
.nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); box-shadow: var(--shadow-brand); }
[data-dir="modern"] .nav-item.active, [data-dir="signature"] .nav-item.active { font-weight: 600; }
.nav-item.active .nav-ico { opacity: 1; }
.nav-badge {
  margin-left: auto; align-self: center; flex: none; font-family: var(--font-mono); font-size: 11px;
  background: var(--sidebar-hover); color: var(--sidebar-text);
  padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,.22); color: var(--sidebar-active-text); }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sidebar-border); }
.side-user { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.side-user:hover { background: var(--sidebar-hover); }
.side-theme { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; cursor: pointer; color: var(--sidebar-text); font-weight: 500; font-size: 13.5px; margin-bottom: 4px; }
[data-dir="klassik"] .side-theme { border-radius: 5px; }
.side-theme:hover { background: var(--sidebar-hover); }
.side-theme .nav-ico { width: 18px; height: 18px; flex: none; opacity: .82; }
.side-theme > span:not(.side-switch) { flex: 1; min-width: 0; }
.side-switch { width: 38px; height: 22px; flex: none; border-radius: 20px; background: var(--sidebar-hover); border: 1px solid var(--sidebar-border); position: relative; transition: background .2s; }
.side-switch > i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--sidebar-muted); transition: all .22s cubic-bezier(.2,.8,.2,1); }
.side-switch.on { background: var(--brand); border-color: var(--brand); }
.side-switch.on > i { left: 18px; background: #fff; }
[data-collapsed="1"] .side-theme { justify-content: center; padding: 11px 0; }
[data-collapsed="1"] .side-theme > span { display: none; }
.side-user .av { width: 32px; height: 32px; flex: none; }
.side-user .su-name { font-weight: 600; font-size: 13px; }
.side-user .su-role { font-size: 11px; color: var(--sidebar-muted); }

/* ============================================================
   MAIN / TOPBAR
   ============================================================ */
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--app-pad); position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.tb-search {
  display: flex; align-items: center; gap: 9px; flex: 1; max-width: 460px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 8px 13px; color: var(--faint); font-size: 13px;
}
[data-dir="klassik"] .tb-search { border-radius: 5px; }
.tb-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.tb-search input { border: none; background: none; outline: none; flex: 1; color: var(--text); font-family: inherit; font-size: 13px; }
.tb-kbd { font-family: var(--font-mono); font-size: 10.5px; border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 5px; color: var(--faint); }
/* Globale Header-Suche (Dropdown) */
.gs-dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 250; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; padding: 6px; }
.gs-group-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 9px 10px 4px; }
.gs-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: inherit; text-decoration: none; }
.gs-opt:hover, .gs-opt.gs-active { background: var(--surface-2); }
.gs-opt .gs-ico { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); }
.gs-opt .gs-ico svg { width: 15px; height: 15px; }
.gs-opt .gs-t { font-size: 13px; font-weight: 600; line-height: 1.3; min-width: 0; }
.gs-opt .gs-sub { font-size: 11.5px; color: var(--faint); }
.gs-empty { padding: 18px; text-align: center; color: var(--faint); font-size: 13px; }
.gs-mono { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.tb-spacer { flex: 1; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: 13px; font-family: inherit;
}
[data-dir="klassik"] .tb-btn { border-radius: 5px; }
.tb-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tb-btn.primary { background: var(--brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-brand); }
.tb-btn.primary:hover { filter: brightness(1.06); }
.tb-icon { width: 17px; height: 17px; }
.tb-bell { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.tb-bell .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--urgent); box-shadow: 0 0 0 2px var(--surface); }

.av { border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--font-mono); color: #fff; font-size: 12px; flex: none; }

.scroll-area { flex: 1; min-height: 0; overflow-y: auto; padding: var(--app-pad); padding-top: 22px; }

/* page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.ph-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--brand); text-transform: uppercase; margin-bottom: 8px; display:flex; align-items:center; gap:8px; }
[data-dir="klassik"] .ph-eyebrow { letter-spacing: .12em; }
.ph-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
[data-dir="klassik"] .ph-title { font-weight: 500; letter-spacing: 0; font-size: 34px; }
[data-dir="signature"] .ph-title { font-size: 33px; font-weight: 700; }
.ph-sub { color: var(--muted); font-size: 14px; margin-top: 9px; max-width: 560px; }
.ph-date { text-align: right; color: var(--muted); font-size: 12.5px; }
.ph-date b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }

/* ============================================================
   KPI ROW
   ============================================================ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 17px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.kpi:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
[data-dir="signature"] .kpi { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-delta { font-size: 11.5px; font-weight: 700; font-family: var(--font-mono); padding: 2px 7px; border-radius: 20px; display:inline-flex; align-items:center; gap:3px; white-space: nowrap; }
.kpi-delta.up { color: var(--success); background: var(--success-tint); }
.kpi-delta.down { color: var(--danger); background: var(--danger-tint); }
.kpi-val { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin-top: 10px; line-height: 1; }
[data-dir="klassik"] .kpi-val { font-weight: 500; }
.kpi-hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.kpi-spark { position: absolute; right: 14px; bottom: 12px; width: 88px; height: 34px; opacity: .9; }

/* ============================================================
   BOARD COLUMNS
   ============================================================ */
.work { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,1.04fr) minmax(0,.92fr); gap: var(--col-gap); align-items: start; }
.col {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; box-shadow: var(--shadow);
  max-height: calc(100vh - 250px); overflow: hidden;
}
[data-dir="signature"] .col { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.col-head {
  display: flex; align-items: center; gap: 9px; padding: 13px 15px;
  border-bottom: 1px solid var(--border); flex: none; flex-wrap: nowrap;
}
.col-accent { width: 4px; height: 17px; border-radius: 4px; background: var(--brand); }
.col-accent.green { background: var(--success); }
.col-accent.slate { background: var(--faint); }
.col-title { font-weight: 700; font-size: 14.5px; font-family: var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
[data-dir="klassik"] .col-title { font-weight: 600; font-family: var(--font-sans); }
.col-count {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  background: var(--brand-tint); color: var(--brand-ink);
  padding: 1px 8px; border-radius: 20px;
}
.col-count.green { background: var(--success-tint); color: var(--success); }
.col-count.slate { background: var(--surface-3); color: var(--muted); }
.col-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; color: var(--muted);
}
[data-dir="klassik"] .icon-btn { border-radius: 4px; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.icon-btn svg { width: 15px; height: 15px; }
.col-body { overflow-y: auto; padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--gap); }

/* scrollbars */
.col-body::-webkit-scrollbar, .scroll-area::-webkit-scrollbar, .tab-body::-webkit-scrollbar { width: 9px; }
.col-body::-webkit-scrollbar-thumb, .scroll-area::-webkit-scrollbar-thumb, .tab-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }

/* ============================================================
   SUGGESTION CARD
   ============================================================ */
.s-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: var(--card-pad); position: relative; cursor: default;
  border-left: 3px solid var(--border-strong);
}
.s-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); transform: translateY(-1px); }
.s-card.urgent { border-left-color: var(--urgent); }
.s-card.high { border-left-color: var(--brand); }
.s-card.pinned { background: linear-gradient(180deg, var(--brand-tint), var(--surface) 60%); }
[data-dir="signature"] .s-card { border-radius: var(--radius); }
.s-row { display: flex; gap: 11px; }
.s-main { flex: 1; min-width: 0; }
.s-title { font-weight: 600; font-size: 14px; line-height: 1.32; letter-spacing: -.005em; margin: 0 0 9px; text-wrap: pretty; color: var(--text); }
[data-dir="klassik"] .s-title { font-family: var(--font-display); font-weight: 500; font-size: 15.5px; }
.s-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.s-client { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mono-chip { width: 20px; height: 20px; border-radius: 5px; font-size: 9.5px; font-weight: 700; font-family: var(--font-mono); display: grid; place-items: center; color: #fff; flex: none; letter-spacing: -.02em; }
.s-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  border: 1px solid currentColor; background: transparent; white-space: nowrap;
}
[data-dir="klassik"] .tag { border-radius: 3px; }
.tag.solid { border-color: transparent; color: #fff; }
.badge {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; letter-spacing: .01em;
}
[data-dir="klassik"] .badge { border-radius: 3px; text-transform: uppercase; letter-spacing: .04em; font-size: 9.5px; }
.badge.own { background: var(--brand-tint); color: var(--brand-ink); }
.badge.urgent { background: var(--urgent-tint); color: var(--urgent); }
.badge.assigned { background: var(--surface-3); color: var(--muted); }
.badge.signal { background: var(--warn-tint); color: var(--warn); }
.s-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.act {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
[data-dir="klassik"] .act { border-radius: 4px; }
.act svg { width: 16px; height: 16px; }
.act:hover { transform: scale(1.06); }
.act.pin:hover, .act.pin.on { color: var(--warn); border-color: var(--warn); background: var(--warn-tint); }
.act.adopt:hover { color: var(--success); border-color: var(--success); background: var(--success-tint); }
.act.dismiss:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-tint); }
.s-foot { display: flex; align-items: center; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border); }
.score { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.score-bar { width: 52px; height: 5px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.score-bar > i { display: block; height: 100%; border-radius: 20px; }
.score-num { font-family: var(--font-mono); font-weight: 600; }
.s-when { margin-left: auto; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }

/* progress card */
.p-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: var(--card-pad); border-left: 3px solid var(--success); }
.p-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.p-title { font-weight: 600; font-size: 13.5px; line-height: 1.32; margin: 0 0 10px; text-wrap: pretty; }
[data-dir="klassik"] .p-title { font-family: var(--font-display); font-weight: 500; font-size: 15px; }
.p-bar { height: 6px; border-radius: 20px; background: var(--surface-3); overflow: hidden; margin: 10px 0 7px; }
.p-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 60%, var(--brand))); border-radius: 20px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.p-foot { display: flex; align-items: center; gap: 9px; }
.p-steps { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); font-weight: 500; }
.p-owner { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }

/* ============================================================
   SIGNALE RAIL (tabs)
   ============================================================ */
.tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex: none; background: var(--surface-2); }
[data-dir="signature"] .tabs { background: transparent; }
.tab {
  flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; cursor: pointer;
  font-weight: 600; font-size: 12.5px; color: var(--muted); border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
[data-dir="klassik"] .tab { border-radius: 4px; }
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab.active { background: var(--surface); color: var(--brand); border-color: var(--border); box-shadow: var(--shadow); }
.tab .t-badge { font-family: var(--font-mono); font-size: 10px; background: var(--brand-tint); color: var(--brand-ink); padding: 0 6px; border-radius: 20px; font-weight: 700; }
.tab-body { overflow-y: auto; padding: 6px; }

.n-item { padding: 12px 11px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; }
.n-item + .n-item { border-top: 1px solid var(--border); border-radius: 0; }
.n-item:hover { background: var(--surface-2); border-color: var(--border); border-radius: var(--radius-sm); }
.n-head { display: flex; gap: 9px; align-items: flex-start; }
.n-title { font-weight: 600; font-size: 13px; line-height: 1.34; margin: 0; flex: 1; text-wrap: pretty; }
[data-dir="klassik"] .n-title { font-family: var(--font-display); font-weight: 500; font-size: 14.5px; }
.n-spark-btn { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--brand); cursor: pointer; }
[data-dir="klassik"] .n-spark-btn { border-radius: 4px; }
.n-spark-btn:hover { background: var(--brand); color: var(--on-brand); transform: scale(1.06); }
.n-meta { display: flex; align-items: center; gap: 4px 7px; flex-wrap: wrap; margin-top: 7px; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.n-meta > * { white-space: nowrap; }
.n-meta .dot-sep { opacity: .5; }
.n-client { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 500; font-family: var(--font-sans); white-space: nowrap; }
.sc-badge { font-family: var(--font-mono); font-weight: 700; font-size: 10px; padding: 1px 6px; border-radius: 6px; }
[data-dir="klassik"] .sc-badge { border-radius: 3px; }
.sc-badge.high { background: var(--danger-tint); color: var(--danger); }
.sc-badge.mid { background: var(--warn-tint); color: var(--warn); }
.sc-badge.low { background: var(--surface-3); color: var(--muted); }
.rel-badge { background: var(--brand-tint); color: var(--brand-ink); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.n-excerpt { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 7px; font-family: var(--font-sans); }
.n-ai { margin-top: 9px; font-size: 11.5px; line-height: 1.45; background: var(--brand-tint); color: var(--text); border-radius: var(--radius-sm); padding: 9px 11px; border-left: 3px solid var(--brand); display: none; font-family: var(--font-sans); }
.n-item.open .n-ai { display: block; animation: slidein .3s ease; }
.n-ai b { color: var(--brand-ink); }

/* topics */
.topic-grp { padding: 11px; }
.topic-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.topic-name { font-weight: 700; font-size: 13px; font-family: var(--font-display); }
[data-dir="klassik"] .topic-name { font-family: var(--font-sans); }
.topic-count { font-family: var(--font-mono); font-size: 10px; color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 20px; font-weight: 600; }
.topic-all { margin-left: auto; font-size: 11.5px; color: var(--brand); font-weight: 600; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.topic-item { display: flex; gap: 9px; padding: 8px 4px; border-top: 1px solid var(--border); align-items: flex-start; cursor: pointer; }
.topic-item:hover { background: var(--surface-2); }
.ti-ico { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; }
.ti-ico.news { background: var(--brand-tint); color: var(--brand-ink); }
.ti-ico.bund { background: var(--danger-tint); color: var(--danger); }
.ti-ico.law { background: var(--warn-tint); color: var(--warn); }
.ti-ico svg { width: 13px; height: 13px; }
.ti-title { font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.ti-meta { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-size: 10px; padding: 1px 7px; border-radius: 20px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); font-family: var(--font-sans); font-weight: 500; }

/* reports */
.rep-item { display: flex; align-items: center; gap: 11px; padding: 12px 11px; border-top: 1px solid var(--border); }
.rep-item:first-child { border-top: none; }
.rep-main { flex: 1; min-width: 0; }
.rep-client { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.rep-note { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.rep-fig { text-align: right; }
.rep-rev { font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.rep-trend { font-size: 11px; font-family: var(--font-mono); font-weight: 600; margin-top: 2px; }
.rep-trend.up { color: var(--success); }
.rep-trend.down { color: var(--danger); }
.rep-period { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }

/* ============================================================
   CONTROL RAIL (Meta — Vergleichssteuerung)
   ============================================================ */
.ctl-rail {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 200;
  display: flex; align-items: center; gap: 6px; padding: 7px;
  background: rgba(16,16,22,.86); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4); color: #fff;
}
.ctl-group { display: flex; align-items: center; gap: 3px; padding: 3px; background: rgba(255,255,255,.07); border-radius: 11px; }
.ctl-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.5); padding: 0 8px 0 6px; font-weight: 600; }
.ctl-btn {
  border: none; background: transparent; color: rgba(255,255,255,.66); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 7px;
}
.ctl-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.ctl-btn.active { background: #fff; color: #14111f; }
.ctl-btn .sw { width: 11px; height: 11px; border-radius: 50%; }
.ctl-sep { width: 1px; height: 26px; background: rgba(255,255,255,.12); margin: 0 3px; }
.ctl-icon-btn { border: none; background: rgba(255,255,255,.07); color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.ctl-icon-btn:hover { background: rgba(255,255,255,.16); }
.ctl-icon-btn svg { width: 17px; height: 17px; }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 18px; bottom: 70px; z-index: 210; width: 280px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 4px; overflow: hidden;
  transform-origin: bottom right;
}
.tw-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; }
.tw-title { font-weight: 700; font-size: 13px; font-family: var(--font-display); }
.tw-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; }
.tw-row .tw-l { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; display: flex; justify-content: space-between; }
.tw-l b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.seg { display: flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.seg button { flex: 1; border: none; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 11.5px; padding: 6px 4px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--brand); color: var(--on-brand); }
.tw-swatches { display: flex; gap: 8px; }
.tw-sw { width: 30px; height: 30px; border-radius: 9px; cursor: pointer; border: 2px solid transparent; background-size: cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.tw-sw.tone { box-shadow: inset 0 0 0 1px var(--border-strong); }
.tw-sw.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.tw-toggle { display: flex; align-items: center; justify-content: space-between; }
.switch { width: 40px; height: 23px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border); position: relative; cursor: pointer; flex: none; }
.switch > i { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--faint); transition: all .2s; }
.switch.on { background: var(--brand); border-color: var(--brand); }
.switch.on > i { left: 19px; background: #fff; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes popin { 0% { opacity: 0; transform: translateY(8px) scale(.98); } 100% { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: var(--brand-tint); box-shadow: 0 0 0 3px var(--ring); } 100% { background: var(--surface); box-shadow: var(--shadow); } }
@keyframes flashGreen { 0% { background: var(--success-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 30%, transparent); } 100% { background: var(--surface); box-shadow: var(--shadow); } }
.card-enter { animation: popin .42s cubic-bezier(.2,.85,.25,1) both; }
.flash-in { animation: flashGreen 1.3s ease both; }
.flash-brand { animation: flash 1.3s ease both; }
.leaving { animation: leaveCollapse .42s cubic-bezier(.4,0,.6,1) forwards; overflow: hidden; }
@keyframes leaveCollapse { 0% { opacity: 1; } 40% { opacity: 0; transform: translateX(14px); } 100% { opacity: 0; max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; transform: translateX(40px); } }
.count-pulse { animation: countPulse .5s ease; }
@keyframes countPulse { 0%,100% { transform: scale(1); } 45% { transform: scale(1.35); } }

/* flying spark */
.spark-fly { position: fixed; z-index: 400; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; pointer-events: none; box-shadow: var(--shadow-brand); }
.spark-fly svg { width: 12px; height: 12px; }

[data-reduce="1"] *, [data-reduce="1"] *::before { animation-duration: .001ms !important; transition-duration: .001ms !important; }

/* responsive */
@media (max-width: 1180px) {
  .work { grid-template-columns: 1fr 1fr; }
  .work2 { grid-template-columns: 1fr 1fr; }
  .work2 .news-col { grid-column: 1 / -1; max-height: none; }
  .work .col.rail { grid-column: 1 / -1; max-height: none; }
  .kpi-row { grid-template-columns: repeat(2,1fr); }
  .kpi-strip { flex-wrap: wrap; }
  .kpi-cell { flex: 1 0 45%; }
}
@media (max-width: 920px) {
  .bd-app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .work { grid-template-columns: 1fr; }
  .work2 { grid-template-columns: 1fr; }
}

/* ============================================================
   v2 LAYOUT — Sidebar einklappbar
   ============================================================ */
[data-collapsed="1"] { --sidebar-w: 76px; }
[data-collapsed="1"] .sidebar { padding: 20px 12px; }
[data-collapsed="1"] .brand { justify-content: center; padding: 6px 0 16px; }
[data-collapsed="1"] .brand-word,
[data-collapsed="1"] .nav-item > span:not(.nav-badge),
[data-collapsed="1"] .nav-section,
[data-collapsed="1"] .side-user > div,
[data-collapsed="1"] .nav-badge { display: none; }
[data-collapsed="1"] .nav-item { justify-content: center; padding: 11px 0; }
[data-collapsed="1"] .nav-item.active::after {
  content: ""; position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px; background: var(--brand);
}
[data-collapsed="1"] .side-user { justify-content: center; padding: 8px 0; }
[data-collapsed="1"] .nav-item .nav-badge.dot-only {
  display: block; position: absolute; top: 6px; right: 12px;
  width: 7px; height: 7px; min-width: 0; padding: 0; border-radius: 50%;
  background: var(--brand); color: transparent; font-size: 0;
}
.sidebar { transition: padding .3s ease; }
.bd-app { transition: grid-template-columns .32s cubic-bezier(.4,0,.2,1), background-color .45s ease; }
.tb-collapse {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  color: var(--muted); cursor: pointer;
}
[data-dir="klassik"] .tb-collapse { border-radius: 5px; }
.tb-collapse:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.tb-collapse svg { width: 18px; height: 18px; }

/* ============================================================
   v2 LAYOUT — kompakte KPI-Leiste
   ============================================================ */
.kpi-strip {
  display: flex; align-items: stretch; margin-bottom: var(--gap);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
[data-dir="signature"] .kpi-strip { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.kpi-cell {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px;
  padding: 11px 18px; border-left: 1px solid var(--border); position: relative;
}
.kpi-cell:first-child { border-left: none; }
.kpi-cell:hover { background: var(--surface-2); }
.kc-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); }
.kc-ico.urgent { background: var(--urgent-tint); color: var(--urgent); }
[data-dir="klassik"] .kc-ico { border-radius: 5px; }
.kc-ico svg { width: 17px; height: 17px; }
.kc-main { min-width: 0; flex: 1; }
.kc-l { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-figs { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.kc-val { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
[data-dir="klassik"] .kc-val { font-weight: 500; }
.kc-delta { font-size: 11px; font-weight: 700; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.kc-delta.up { color: var(--success); }
.kc-delta.down { color: var(--danger); }
.kc-spark { width: 56px; height: 26px; flex: none; align-self: center; opacity: .9; }

/* ============================================================
   v2 LAYOUT — Nachrichten prominent + Featured
   ============================================================ */
.work2 {
  display: grid; gap: var(--col-gap); align-items: start;
  grid-template-columns: minmax(0,1.32fr) minmax(0,1.04fr) minmax(0,.92fr);
}
.col.news-col { max-height: calc(100vh - 218px); }
.news-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border-bottom: 1px solid var(--border); flex: none;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); position: relative; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.news-head .col-title { font-size: 15px; }
.news-subtabs { margin-left: auto; display: flex; gap: 4px; }
.subtab {
  font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 5px 11px; border-radius: 8px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 5px;
}
[data-dir="klassik"] .subtab { border-radius: 4px; }
.subtab:hover { background: var(--surface-2); color: var(--text); }
.subtab.active { background: var(--brand-tint); color: var(--brand-ink); }
.subtab .t-badge { font-family: var(--font-mono); font-size: 10px; background: var(--brand); color: var(--on-brand); padding: 0 5px; border-radius: 20px; }

/* featured news (erste Story groß) */
.n-feat {
  margin: 11px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-tint), var(--surface) 75%);
  border: 1px solid var(--border-strong); cursor: pointer; position: relative; overflow: hidden;
}
.n-feat:hover { box-shadow: var(--shadow-lg); }
.n-feat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.nf-kicker { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 9px; }
.nf-kicker .sc-badge { letter-spacing: 0; }
.nf-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.22; letter-spacing: -.02em; margin: 0 0 9px; text-wrap: pretty; }
[data-dir="klassik"] .nf-title { font-weight: 500; }
.nf-excerpt { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 11px; }
.nf-foot { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.nf-spark { margin-left: auto; }
.nf-cta {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-sans);
  background: var(--brand); color: var(--on-brand); border: none; cursor: pointer;
  font-weight: 600; font-size: 12px; padding: 7px 13px; border-radius: 9px; box-shadow: var(--shadow-brand);
}
[data-dir="klassik"] .nf-cta { border-radius: 5px; }
.nf-cta:hover { filter: brightness(1.06); }
.nf-cta svg { width: 14px; height: 14px; }
.nav-badge.dot-only { display: none; }
.news-col .col-body { display: block; }
.n-feat, .news-list-head { flex: none; }
.news-list-head { padding: 4px 15px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* ============================================================
   v3 LAYOUT — 1/3 Vorschläge | 2/3 Nachrichten, darunter In Bearbeitung
   ============================================================ */
.scroll-area { container-type: inline-size; container-name: dash; }
.split-2 {
  display: grid; align-items: start; gap: var(--col-gap); margin-bottom: var(--gap);
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
}
.split-2 .col { max-height: calc(100vh - 232px); }
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr));
  gap: 10px 14px; padding: 6px 12px 12px;
}
.news-grid .n-item { border: 1px solid var(--border); border-radius: var(--radius-sm); align-self: start; }
.news-grid .n-item + .n-item { border-top: 1px solid var(--border); border-radius: var(--radius-sm); }
.news-grid .n-item:hover { background: var(--surface-2); }

/* In Bearbeitung — volle Breite, Karten im Raster */
.progress-wide { max-height: none; }
.progress-wide .col-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: var(--gap); max-height: none; overflow: visible; align-content: start;
}
.progress-wide .p-card { align-self: start; }

/* Stapeln erst, wenn der Inhaltsbereich wirklich sehr schmal wird (nicht das Fenster) */
@container dash (max-width: 600px) {
  .split-2 { grid-template-columns: 1fr; }
  .split-2 .col { max-height: none; }
}
/* schmale 1/3-Spalte: Vorschlagskarten etwas verdichten, damit sie lesbar bleiben */
@container dash (max-width: 920px) {
  .s-card { padding: 12px; }
  .s-title { font-size: 13.5px; }
  .s-actions .act { width: 30px; height: 30px; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 700px) {
    .split-2 { grid-template-columns: 1fr; }
    .split-2 .col { max-height: none; }
  }
}

/* ============================================================
   MANDANTEN NEWS UPDATE — Unterseite
   ============================================================ */
.news-page { max-width: 1180px; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.news-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.nh-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
[data-dir="klassik"] .nh-ico { border-radius: 5px; }
.nh-ico svg { width: 21px; height: 21px; }

/* Kontextzeile (ersetzt Info-Banner) */
.ctx-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; }
.ctx-item { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ctx-item b { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
[data-dir="klassik"] .ctx-item b { font-weight: 500; }
.ctx-item.alert b { color: var(--urgent); }
.ctx-sep { width: 1px; height: 24px; background: var(--border); }
.ctx-spacer { flex: 1; }
.ctx-note { font-size: 12px; color: var(--faint); }
.ctx-note a { color: var(--brand); font-weight: 600; text-decoration: none; }
.ctx-note a:hover { text-decoration: underline; }

/* Filter-Toolbar */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; margin-bottom: 12px; }
.fb-search { flex: 1 1 220px; min-width: 180px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--faint); }
[data-dir="klassik"] .fb-search { border-radius: 5px; }
.fb-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.fb-search svg { width: 16px; height: 16px; }
.fb-search input { border: none; background: none; outline: none; flex: 1; color: var(--text); font-family: inherit; font-size: 13px; }
.fb-select { position: relative; }
select.fb, input.fb {
  appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 30px 8px 12px; cursor: pointer; height: 38px;
}
input.fb { font-weight: 500; padding-right: 12px; }
[data-theme="dark"] input.fb { color-scheme: dark; }
[data-dir="klassik"] select.fb, [data-dir="klassik"] input.fb { border-radius: 5px; }
select.fb:hover, input.fb:hover { border-color: var(--border-strong); }
select.fb:focus, input.fb:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.fb-select::after { content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: 10px; }
.fb-reset { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 10px; padding: 8px 13px; font-family: inherit; font-weight: 600; font-size: 12.5px; height: 38px; }
[data-dir="klassik"] .fb-reset { border-radius: 5px; }
.fb-reset:hover { color: var(--text); border-color: var(--border-strong); }
.fb-reset svg { width: 14px; height: 14px; }

/* Schnellfilter-Chips + Gruppierung */
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.fchip { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 13px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
[data-dir="klassik"] .fchip { border-radius: 4px; }
.fchip:hover { border-color: var(--border-strong); color: var(--text); }
.fchip.on { background: var(--brand-tint); color: var(--brand-ink); border-color: transparent; }
.fchip .fc-count { font-family: var(--font-mono); font-size: 11px; opacity: .65; }
.fchip svg { width: 14px; height: 14px; }
.chips-row .group-seg { margin-left: auto; }
.group-seg { display: inline-flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
[data-dir="klassik"] .group-seg { border-radius: 4px; }
.group-seg button { border: none; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 12px; padding: 5px 11px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.group-seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.group-seg svg { width: 13px; height: 13px; }

/* Mandanten-Gruppe — als Container-Panel, Artikel liegen darin */
.cgroup { margin-bottom: 22px; animation: popin .4s ease both; background: var(--surface-2);
  border: 1px solid var(--border); border-left: 4px solid var(--faint); border-radius: var(--radius-lg); overflow: hidden; }
.cgroup.pinned { border-left-color: var(--brand); box-shadow: var(--shadow); }
.cgroup-head { display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  background: transparent; border: 0; border-bottom: 1px solid var(--border); box-shadow: none; border-radius: 0; margin: 0; }
.cgroup.pinned .cgroup-head { background: linear-gradient(100deg, var(--brand-tint), transparent 60%); }
.cgroup-head .mono-chip { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
[data-dir="klassik"] .cgroup-head .mono-chip { border-radius: 5px; }
.cg-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.cg-eyebrow svg { width: 11px; height: 11px; }
.cgroup.pinned .cg-eyebrow { color: var(--brand); }
.cg-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
[data-dir="klassik"] .cg-name { font-weight: 600; font-family: var(--font-sans); }
.cgroup > .acard { margin: 0 12px 11px; background: var(--surface); }
.cgroup > .acard:first-of-type { margin-top: 18px; }
[data-theme="dark"] .cgroup > .acard { background: var(--surface-3); }
.cg-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cg-agg { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.cg-stat { text-align: right; }
.cg-stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.cg-stat .l { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.cg-pin { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); border-radius: 9px; padding: 7px 12px; font-family: inherit; font-weight: 600; font-size: 12px; white-space: nowrap; flex: none; }
[data-dir="klassik"] .cg-pin { border-radius: 4px; }
.cg-pin:hover { color: var(--warn); border-color: var(--warn); background: var(--warn-tint); }
.cgroup.pinned .cg-pin { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.cg-pin svg { width: 14px; height: 14px; }

/* Artikelkarte */
.acard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--card-pad); margin-bottom: 11px; display: flex; gap: 15px; }
.acard:hover { box-shadow: var(--shadow-lg); }
.a-score { flex: none; width: 48px; height: 48px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
[data-dir="klassik"] .a-score { border-radius: 6px; }
.a-score.high { background: var(--danger-tint); color: var(--danger); }
.a-score.mid { background: var(--warn-tint); color: var(--warn); }
.a-score.low { background: var(--surface-3); color: var(--muted); }
.a-score .num { font-family: var(--font-mono); font-weight: 700; font-size: 17px; line-height: 1; }
.a-score .lbl { font-size: 9px; opacity: .8; font-family: var(--font-mono); margin-top: 1px; }
.a-main { flex: 1; min-width: 0; }
.a-title { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; line-height: 1.3; letter-spacing: -.01em; margin: 1px 0 8px; text-wrap: pretty; }
[data-dir="klassik"] .a-title { font-weight: 500; font-size: 16.5px; }
.a-meta { display: flex; align-items: center; gap: 5px 9px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); margin-bottom: 10px; }
.a-meta > * { white-space: nowrap; flex: none; }
.a-meta .dot { opacity: .5; }
.a-meta .outlet { color: var(--brand); font-family: var(--font-sans); font-weight: 600; }
.pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: .02em; font-family: var(--font-sans); }
[data-dir="klassik"] .pill { border-radius: 3px; text-transform: uppercase; }
.pill.high { background: var(--danger-tint); color: var(--danger); }
.pill.medium { background: var(--warn-tint); color: var(--warn); }
.pill.low { background: var(--surface-3); color: var(--muted); }
.pill.cluster-pill { background: var(--brand-tint); color: var(--brand-ink); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; flex: none; }
.pill.cluster-pill svg { width: 11px; height: 11px; }
.a-summary { font-size: 13px; line-height: 1.5; color: var(--text); margin-bottom: 10px; text-wrap: pretty; }
.a-ai { font-size: 12px; line-height: 1.5; background: var(--brand-tint); color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 13px; border-left: 3px solid var(--brand); margin-bottom: 11px; display: none; }
.a-ai.show { display: block; animation: slidein .3s ease; }
.a-ai b { color: var(--brand-ink); }
.a-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-soft { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 9px; padding: 7px 12px; white-space: nowrap; flex: none; }
[data-dir="klassik"] .btn-soft { border-radius: 4px; }
.btn-soft:hover { color: var(--text); border-color: var(--border-strong); }
.btn-soft.on { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.btn-soft .lbl, .btn-primary-sm .lbl { white-space: nowrap; }
.rel-card .btn-soft { flex: none; }
.btn-soft svg { width: 14px; height: 14px; }
.btn-primary-sm { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12px;
  border: none; background: var(--brand); color: var(--on-brand); border-radius: 9px; padding: 8px 13px; box-shadow: var(--shadow-brand); white-space: nowrap; flex: none; }
[data-dir="klassik"] .btn-primary-sm { border-radius: 4px; }
.btn-primary-sm:hover { filter: brightness(1.06); }
.btn-primary-sm svg { width: 14px; height: 14px; }

/* Verwandte-Artikel-Thread */
.cluster { margin: 4px 0 4px 24px; padding-left: 18px; border-left: 2px solid var(--border-strong);
  display: flex; flex-direction: column; gap: 9px; }
.cluster-title { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.rel-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; position: relative; }
.rel-card::before { content: ""; position: absolute; left: -19px; top: 20px; width: 13px; height: 2px; background: var(--border-strong); }
.rel-card:hover { border-color: var(--border-strong); }
.rel-top { display: flex; align-items: flex-start; gap: 10px; }
.rel-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; flex: 1; text-wrap: pretty; }
[data-dir="klassik"] .rel-title { font-family: var(--font-display); font-weight: 500; }
.rel-sc { flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; }
[data-dir="klassik"] .rel-sc { border-radius: 3px; }
.rel-sc.high { background: var(--danger-tint); color: var(--danger); }
.rel-sc.mid { background: var(--warn-tint); color: var(--warn); }
.rel-sc.low { background: var(--surface-3); color: var(--muted); }
.rel-meta { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); margin-top: 5px; }
.rel-summary { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 7px; }
.rel-ai { font-size: 11.5px; line-height: 1.45; background: var(--surface-3); border-radius: var(--radius-sm); padding: 8px 11px; margin-top: 8px; color: var(--muted); border-left: 2px solid var(--brand-2); }
.rel-ai b { color: var(--brand-ink); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--faint); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .5; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 220;
  display: inline-flex; align-items: center; gap: 9px; background: var(--success); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 13px;
  box-shadow: 0 12px 34px rgba(0,0,0,.28); animation: toastIn .35s cubic-bezier(.2,.85,.25,1) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media (max-width: 640px) {
  .acard { flex-direction: column; gap: 10px; }
  .a-score { flex-direction: row; width: auto; height: auto; padding: 4px 10px; gap: 5px; align-self: flex-start; }
  .cg-agg { display: none; }
}

/* ============================================================
   BD-VORSCHLÄGE — Triage-Arbeitsplatz (Master-Detail)
   ============================================================ */
.bdv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.bdv-head > div:first-child { min-width: 0; }
.bdv-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.bdv-head .tb-btn { flex: none; }

/* KPI-Strip Wiederverwendung schon vorhanden (.kpi-strip) */
.kpi-cell.done .kc-ico { background: var(--success-tint); color: var(--success); }
.kpi-cell.warn .kc-ico { background: var(--warn-tint); color: var(--warn); }

/* Triage Layout */
.triage { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr); gap: var(--col-gap); align-items: start; }
.triage-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 210px); overflow: hidden; position: sticky; top: 90px; }
.tl-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--border); flex: none; }
.tl-head .col-title { font-size: 14.5px; }
.tl-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.tl-body { overflow-y: auto; flex: 1; }
.tl-group-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 12px; letter-spacing: .01em; backdrop-filter: blur(6px); }
[data-dir="signature"] .tl-group-head { background: color-mix(in srgb, var(--surface-2) 88%, transparent); }
.tl-group-head .mono-chip { width: 19px; height: 19px; font-size: 9px; }
.tl-group-head .gname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); }
[data-dir="klassik"] .tl-group-head .gname { font-family: var(--font-sans); }
.tl-group-head .gcount { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-3); color: var(--muted); padding: 1px 7px; border-radius: 20px; font-weight: 600; }

.tl-row { display: flex; gap: 10px; padding: 11px 14px 11px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; border-left: 3px solid transparent; position: relative; }
.tl-row:hover { background: var(--surface-2); }
.tl-row.active { background: var(--brand-tint); border-left-color: var(--brand); }
.tl-row.prio-hoch { border-left-color: var(--urgent); }
.tl-row.prio-mittel { border-left-color: var(--warn); }
.tl-row.prio-niedrig { border-left-color: var(--faint); }
.tl-row.active.prio-hoch, .tl-row.active.prio-mittel, .tl-row.active.prio-niedrig { border-left-color: var(--brand); }
.tl-row.taken { opacity: .55; }
.tlr-main { flex: 1; min-width: 0; }
.tlr-title { font-size: 13px; font-weight: 600; line-height: 1.32; letter-spacing: -.005em; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-dir="klassik"] .tlr-title { font-family: var(--font-display); font-weight: 500; font-size: 14px; }
.tlr-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.src-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; font-family: var(--font-mono);
  color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
[data-dir="klassik"] .src-chip { border-radius: 3px; }
.src-chip svg { width: 11px; height: 11px; }
.src-chip.jahresabschluss { color: var(--brand-ink); background: var(--brand-tint); }
.src-chip.nachricht { color: var(--warn); background: var(--warn-tint); }
.src-chip.topic { color: var(--success); background: var(--success-tint); }
.tlr-date { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.tlr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.dot-prio { width: 8px; height: 8px; border-radius: 50%; }
.dot-prio.hoch { background: var(--urgent); }
.dot-prio.mittel { background: var(--warn); }
.dot-prio.niedrig { background: var(--faint); }
.st-chip { font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; white-space: nowrap; letter-spacing: .02em; }
.st-chip.offen { background: var(--brand-tint); color: var(--brand-ink); }
.st-chip.bearbeitung { background: var(--success-tint); color: var(--success); }
.st-chip.erledigt { background: var(--surface-3); color: var(--muted); }
.tlr-score { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; }

/* Detail-Pane */
.triage-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); position: sticky; top: 90px; max-height: calc(100vh - 210px); overflow-y: auto; }
[data-dir="signature"] .triage-detail { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.td-top { padding: 22px 26px 0; }
.td-eyebrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.td-client { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.td-client .mono-chip { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.td-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.18; letter-spacing: -.02em; margin: 0 0 16px; text-wrap: pretty; }
[data-dir="klassik"] .td-title { font-weight: 500; font-size: 27px; }
.td-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.prio-badge { font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
[data-dir="klassik"] .prio-badge { border-radius: 3px; text-transform: uppercase; letter-spacing: .04em; }
.prio-badge.hoch { background: var(--urgent-tint); color: var(--urgent); }
.prio-badge.mittel { background: var(--warn-tint); color: var(--warn); }
.prio-badge.niedrig { background: var(--surface-3); color: var(--muted); }
.td-score { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.td-score .ring { width: 44px; height: 44px; flex: none; }
.td-score .sc-l { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
.td-score .sc-v { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }

.td-divider { height: 1px; background: var(--border); margin: 0 26px; }
.td-section { padding: 18px 26px; }
.td-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.td-label svg { width: 13px; height: 13px; color: var(--brand); }
.td-text { font-size: 14px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.td-beratung { background: var(--brand-tint); border-left: 3px solid var(--brand); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.td-source-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.td-source-box .sb-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-bottom: 7px; font-size: 12.5px; }
.td-source-box .sb-head svg { width: 14px; height: 14px; color: var(--brand); }
.td-areas { display: flex; gap: 7px; flex-wrap: wrap; }

/* sticky action footer in detail */
.td-actions { position: sticky; bottom: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 15px 26px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); margin-top: 4px; }
.td-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px 16px; white-space: nowrap; }
[data-dir="klassik"] .td-btn { border-radius: 5px; }
.td-btn:hover { border-color: var(--border-strong); }
.td-btn svg { width: 16px; height: 16px; }
.td-btn.primary { background: var(--brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-brand); }
.td-btn.primary:hover { filter: brightness(1.06); }
.td-btn.success { background: var(--success); color: #fff; border-color: transparent; }
.td-btn.ghost { background: transparent; color: var(--muted); }
.td-btn.ghost:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-tint); }
.td-btn.icon-only { padding: 10px; }
.td-spacer { flex: 1; }

.td-empty { display: grid; place-items: center; height: calc(100vh - 210px); text-align: center; color: var(--faint); padding: 40px; }
.td-empty svg { width: 46px; height: 46px; margin-bottom: 14px; opacity: .5; }

@container dash (max-width: 720px) {
  .triage { grid-template-columns: 1fr; }
  .triage-list { max-height: 420px; position: static; }
  .triage-detail { position: static; max-height: none; }
  .td-empty { display: none; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 1000px) {
    .triage { grid-template-columns: 1fr; }
    .triage-list { max-height: 420px; position: static; }
    .triage-detail { position: static; max-height: none; }
    .td-empty { display: none; }
  }
}

/* ============================================================
   BD-MASSNAHMEN — Übersicht-Grid
   ============================================================ */
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--gap); }
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 17px 18px; cursor: pointer; display: flex; flex-direction: column;
  border-top: 3px solid var(--border-strong); animation: popin .35s ease both; }
[data-dir="signature"] .m-card { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.m-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.m-card.prio-hoch { border-top-color: var(--urgent); }
.m-card.prio-mittel { border-top-color: var(--warn); }
.m-card.prio-niedrig { border-top-color: var(--success); }
.m-card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.m-prio { margin-left: auto; flex: none; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
[data-dir="klassik"] .m-prio { border-radius: 3px; }
.m-prio.hoch { background: var(--urgent-tint); color: var(--urgent); }
.m-prio.mittel { background: var(--warn-tint); color: var(--warn); }
.m-prio.niedrig { background: var(--success-tint); color: var(--success); }
.m-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.32; letter-spacing: -.01em; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[data-dir="klassik"] .m-title { font-weight: 500; font-size: 16px; }
.m-client { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.m-role { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--surface-3); color: var(--muted); width: fit-content; margin-bottom: 14px; }
[data-dir="klassik"] .m-role { border-radius: 3px; }
.m-role.owner { background: var(--brand-tint); color: var(--brand-ink); }
.m-prog-row { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 8px; gap: 8px; }
.m-prog-row > span { white-space: nowrap; }
.m-prog-row .pct { font-weight: 700; }
/* Status-Verteilungsbalken */
.m-dist { display: flex; height: 7px; border-radius: 20px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.m-dist > i { display: block; height: 100%; }
.m-dist .seg-offen { background: var(--brand); }
.m-dist .seg-arbeit { background: var(--brand-2); }
.m-dist .seg-review { background: var(--warn); }
.m-dist .seg-erledigt { background: var(--success); }
.m-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.m-legend span { display: inline-flex; align-items: center; gap: 5px; }
.m-legend i { width: 8px; height: 8px; border-radius: 2px; }
.m-foot { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--border); }
.av-stack { display: flex; }
.av-stack .av { border: 2px solid var(--surface); margin-left: -7px; }
.av-stack .av:first-child { margin-left: 0; }
.m-open { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--brand); }
.m-open svg { width: 14px; height: 14px; }

/* ============================================================
   BD-MASSNAHMEN — Detail: prominentes Kanban-Board
   ============================================================ */
.m-detail-head { margin-bottom: 16px; }
.m-back { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px;
  color: var(--muted); border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 7px 13px; margin-bottom: 14px; }
[data-dir="klassik"] .m-back { border-radius: 5px; }
.m-back:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.m-back svg { width: 15px; height: 15px; }
.m-dh-row { display: flex; align-items: flex-start; gap: 18px; }
.m-dh-main { flex: 1; min-width: 0; }
.m-dh-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; text-wrap: pretty; }
[data-dir="klassik"] .m-dh-title { font-weight: 500; font-size: 28px; }
.m-dh-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.m-dh-meta .m-prio { margin: 0; }
.m-dh-sub { font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.m-dh-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.m-overall { display: flex; align-items: center; gap: 12px; margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 16px; box-shadow: var(--shadow); }
.m-overall .ov-bar { flex: 1; height: 8px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.m-overall .ov-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--success)); border-radius: 20px; transition: width .6s ease; }
.m-overall .ov-txt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.m-overall .ov-pct { font-family: var(--font-display); font-size: 20px; font-weight: 700; }

.m-board-wrap { display: grid; grid-template-columns: 1fr 312px; gap: var(--col-gap); align-items: start; margin-top: 16px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 290px); overflow: hidden; }
.kcol-head { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--border-strong); border-radius: var(--radius-lg) var(--radius-lg) 0 0; flex: none; }
.kcol[data-col="offen"] .kcol-head { border-top-color: var(--brand); }
.kcol[data-col="arbeit"] .kcol-head { border-top-color: var(--brand-2); }
.kcol[data-col="review"] .kcol-head { border-top-color: var(--warn); }
.kcol[data-col="erledigt"] .kcol-head { border-top-color: var(--success); }
.kcol-title { font-weight: 700; font-size: 13px; font-family: var(--font-display); letter-spacing: -.01em; }
[data-dir="klassik"] .kcol-title { font-family: var(--font-sans); font-weight: 600; }
.kcol-count { font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--muted); padding: 1px 8px; border-radius: 20px; }
.kcol-add { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; cursor: pointer; color: var(--muted); border: 1px solid transparent; }
.kcol-add:hover { color: var(--brand); background: var(--brand-tint); }
.kcol-add svg { width: 16px; height: 16px; }
.kcol-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 9px; }
.kcol.drop-on { outline: 2px dashed var(--brand); outline-offset: -4px; }
.kcol.drop-on .kcol-body { background: var(--brand-tint); }
.kcol-empty { flex: 1; display: grid; place-items: center; color: var(--faint); font-size: 12px; text-align: center; padding: 20px; border: 1.5px dashed var(--border); border-radius: var(--radius); margin: 4px; }

.ktask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 11px 12px; cursor: grab; border-left: 3px solid var(--border-strong); }
.ktask:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.ktask:active { cursor: grabbing; }
.ktask.dragging { opacity: .4; }
.ktask.added { animation: popin .4s ease both; }
.kt-title { font-weight: 600; font-size: 13px; line-height: 1.35; text-wrap: pretty; }
[data-dir="klassik"] .kt-title { font-family: var(--font-display); font-weight: 500; font-size: 14px; }
.kt-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kt-due { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 4px; }
.kt-due svg { width: 12px; height: 12px; }
.kt-due.soon { color: var(--warn); }
.kt-spacer { flex: 1; }

/* Rechte Tab-Leiste */
.m-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  position: sticky; top: 90px; max-height: calc(100vh - 290px); display: flex; flex-direction: column; overflow: hidden; }
[data-dir="signature"] .m-side { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.m-side-tabs { display: flex; gap: 3px; padding: 8px; border-bottom: 1px solid var(--border); flex: none; }
.m-side-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 11.5px; color: var(--muted); border: none; background: transparent; border-radius: 8px; padding: 7px 4px; }
[data-dir="klassik"] .m-side-tab { border-radius: 4px; }
.m-side-tab svg { width: 14px; height: 14px; }
.m-side-tab.on { background: var(--brand-tint); color: var(--brand-ink); }
.m-side-tab .badge-n { font-family: var(--font-mono); font-size: 10px; }
.m-side-body { overflow-y: auto; padding: 14px; flex: 1; }

/* Team */
.tm-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.tm-row:last-child { border-bottom: none; }
.tm-name { font-weight: 600; font-size: 13px; }
.tm-role { font-size: 11px; color: var(--muted); }
.tm-role.owner { color: var(--brand); font-weight: 600; }
.tm-add { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.tm-add:hover { color: var(--brand); border-color: var(--brand); }
.tm-add svg { width: 15px; height: 15px; }

/* Dateien */
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.file-ico { width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--warn-tint); color: var(--warn); display: grid; place-items: center; }
.file-ico svg { width: 16px; height: 16px; }
.file-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.file-meta { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); margin-top: 2px; }
.file-up { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; text-align: center; color: var(--faint); font-size: 12px; cursor: pointer; }
.file-up:hover { border-color: var(--brand); color: var(--brand); }

/* Aktivität */
.act-item { display: flex; gap: 10px; padding: 9px 0; font-size: 12px; line-height: 1.45; color: var(--muted); border-bottom: 1px solid var(--border); }
.act-item:last-child { border-bottom: none; }
.act-item b { color: var(--text); }
.act-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 5px; }
.act-when { color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; }
.comment-box { display: flex; gap: 8px; margin-top: 12px; }
.comment-box input { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 9px 12px; font-family: inherit; font-size: 12.5px; color: var(--text); outline: none; }
.comment-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.comment-send { width: 38px; flex: none; border: none; background: var(--brand); color: var(--on-brand); border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.comment-send svg { width: 16px; height: 16px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,10,20,.5); backdrop-filter: blur(3px); z-index: 300; display: grid; place-items: center; padding: 20px; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* WICHTIG: Auf .modal-backdrop scopen — sonst kollidieren diese Regeln mit den
   echten Bootstrap-Modals (.modal/.modal-body/.modal-title) und brechen deren
   Zentrierung/Skalierung. Die Design-eigenen Modals liegen immer in .modal-backdrop. */
.modal-backdrop > .modal { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; animation: popin .3s cubic-bezier(.2,.85,.25,1) both; }
.modal-backdrop .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-backdrop .modal-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
[data-dir="klassik"] .modal-backdrop .modal-title { font-weight: 600; }
.modal-backdrop .modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 15px; }
.fld-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
.fld { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 9px 12px;
  font-family: inherit; font-size: 13.5px; color: var(--text); outline: none; }
[data-dir="klassik"] .fld { border-radius: 5px; }
.fld:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
textarea.fld { resize: vertical; min-height: 72px; line-height: 1.5; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-backdrop .modal-foot { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.modal-backdrop .modal-foot .spacer { flex: 1; }

@media (max-width: 1080px) {
  .m-board-wrap { grid-template-columns: 1fr; }
  .m-side { position: static; max-height: none; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .kcol { max-height: 480px; }
}
@media (max-width: 680px) {
  .board { grid-template-columns: 1fr; }
}

/* ============================================================
   BD-MASSNAHMEN — Ansprechpartner beim Mandanten
   ============================================================ */
.contacts { margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
[data-dir="signature"] .contacts { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.ct-head { display: flex; align-items: center; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ct-head .ct-ico { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; }
[data-dir="klassik"] .ct-head .ct-ico { border-radius: 4px; }
.ct-head .ct-ico svg { width: 17px; height: 17px; }
.ct-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
[data-dir="klassik"] .ct-title { font-weight: 600; font-family: var(--font-sans); }
.ct-actions { margin-left: auto; display: flex; gap: 9px; }
.ct-body { padding: 16px 20px; }

.ct-research { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.ct-research .sp { width: 20px; height: 20px; border: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }

.cand-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cand-head { padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13.5px; }
.cand-head span { font-weight: 400; color: var(--muted); }
.cand-row { display: flex; align-items: flex-start; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.cand-row:last-child { border-bottom: none; }
.cand-row:hover { background: var(--surface-2); }
.cand-check { width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; cursor: pointer; margin-top: 2px; }
[data-dir="klassik"] .cand-check { border-radius: 3px; }
.cand-check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cand-check svg { width: 13px; height: 13px; opacity: 0; }
.cand-check.on svg { opacity: 1; }
.cand-name { font-weight: 600; font-size: 13.5px; flex: none; width: 150px; }
.cand-pos { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cand-areas { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.cand-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.beleg-link { font-size: 12.5px; color: var(--brand); font-weight: 600; cursor: pointer; }
.beleg-link:hover { text-decoration: underline; }
.conf { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
[data-dir="klassik"] .conf { border-radius: 3px; }
.conf.high { background: var(--success-tint); color: var(--success); }
.conf.medium { background: var(--warn-tint); color: var(--warn); }
.li-link { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; color: var(--brand); cursor: pointer; }
.li-link svg { width: 17px; height: 17px; }
.li-link .li-sub { font-size: 9.5px; }
.cand-foot { display: flex; gap: 10px; padding: 14px 16px; background: var(--surface-2); border-top: 1px solid var(--border); }

.contact-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) 64px 64px 60px 76px; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.contact-row.htr { padding: 0 4px 10px; border-bottom: 2px solid var(--border-strong); }
.contact-row.htr > div { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.contact-name { font-weight: 600; font-size: 13.5px; }
.contact-areas { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.4; }
.contact-pos { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.contact-val { font-size: 12.5px; }
.contact-val.empty { color: var(--faint); }
.contact-val a, .contact-val .li-link { color: var(--brand); }
.ct-actions-cell { display: flex; gap: 7px; justify-content: flex-end; }
.ct-icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
[data-dir="klassik"] .ct-icon-btn { border-radius: 4px; }
.ct-icon-btn svg { width: 15px; height: 15px; }
.ct-icon-btn.edit { color: var(--brand); }
.ct-icon-btn.edit:hover { background: var(--brand-tint); border-color: var(--brand); }
.ct-icon-btn.del { color: var(--danger); }
.ct-icon-btn.del:hover { background: var(--danger-tint); border-color: var(--danger); }
.ct-empty { text-align: center; padding: 30px 20px; color: var(--faint); font-size: 13px; }
.ct-empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 10px; }
.ct-saved-count { color: var(--success); font-weight: 600; font-size: 13px; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 7px; }
.ct-saved-count svg { width: 15px; height: 15px; }

@media (max-width: 920px) {
  .contact-row { grid-template-columns: 1fr auto; gap: 8px; }
  .contact-row .contact-pos, .contact-row.htr > div:nth-child(n+3), .contact-row > .contact-val { display: none; }
  .cand-name { width: auto; }
  .cand-row { flex-wrap: wrap; }
}

/* ============================================================
   TOPICS — Monitoring-Radar
   ============================================================ */
.tp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.tp-head > div:first-child { min-width: 0; }
.tp-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

/* Monitor-Karten */
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--gap); }
.mon-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 18px 19px; cursor: pointer; display: flex; flex-direction: column; position: relative; overflow: hidden; animation: popin .35s ease both; }
[data-dir="signature"] .mon-card { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.mon-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.mon-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.mon-radar { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; }
[data-dir="klassik"] .mon-radar { border-radius: 5px; }
.mon-radar svg { width: 17px; height: 17px; }
.mon-name { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.2; }
[data-dir="klassik"] .mon-name { font-weight: 600; font-family: var(--font-sans); }
.mon-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--success); flex: none; }
.mon-status .live-dot { width: 7px; height: 7px; }
.mon-fach { display: inline-flex; width: fit-content; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--surface-3); color: var(--muted); margin: 8px 0 14px; }
[data-dir="klassik"] .mon-fach { border-radius: 3px; }

.mon-stats { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.mon-relevant { display: flex; flex-direction: column; }
.mon-relevant .v { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--brand); }
[data-dir="klassik"] .mon-relevant .v { font-weight: 500; }
.mon-relevant .l { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.mon-spark-wrap { flex: 1; height: 42px; position: relative; min-width: 0; }
.mon-spark-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mon-precision { text-align: right; flex: none; }
.mon-precision .v { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.mon-precision .l { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }

.mon-prec-bar { height: 6px; border-radius: 20px; background: var(--danger-tint); overflow: hidden; margin-bottom: 12px; }
.mon-prec-bar > i { display: block; height: 100%; background: var(--success); border-radius: 20px; }
.mon-kw { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.kwchip { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
[data-dir="klassik"] .kwchip { border-radius: 3px; }
.kwchip.main { background: var(--brand-tint); color: var(--brand-ink); border-color: transparent; font-weight: 600; }
.kwchip.more { background: transparent; border: none; color: var(--faint); }
.mon-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.mon-neu { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-sans); font-weight: 700; font-size: 11px; color: var(--brand-ink); background: var(--brand-tint); padding: 2px 9px; border-radius: 20px; }
[data-dir="klassik"] .mon-neu { border-radius: 3px; }
.mon-open { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-sans); font-weight: 600; color: var(--brand); }
.mon-open svg { width: 14px; height: 14px; }
/* Neues-Topic-Karte */
.mon-new { border: 1.5px dashed var(--border-strong); background: transparent; box-shadow: none; align-items: center; justify-content: center; text-align: center; color: var(--muted); min-height: 240px; gap: 10px; }
.mon-new:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); transform: none; }
.mon-new .plus-circ { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.mon-new .plus-circ svg { width: 22px; height: 22px; }

/* ---------- Detail ---------- */
.tp-detail-head { margin-bottom: 18px; }
.tp-dh-row { display: flex; align-items: flex-start; gap: 18px; }
.tp-dh-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 12px; }
[data-dir="klassik"] .tp-dh-title { font-weight: 500; }
.tp-dh-actions { margin-left: auto; display: flex; gap: 9px; flex: none; }
.tp-kw-all { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

.tp-overview { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--col-gap); margin-bottom: var(--gap); align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; }
[data-dir="signature"] .panel { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.panel-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel-title svg { width: 14px; height: 14px; color: var(--brand); }
.panel-title .pt-spark { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: flex; align-items: center; gap: 14px; }
.fn-bar { height: 44px; border-radius: var(--radius); display: flex; align-items: center; padding: 0 16px; color: #fff; font-weight: 700; position: relative; transition: width .7s cubic-bezier(.2,.8,.2,1); }
[data-dir="klassik"] .fn-bar { border-radius: 4px; }
.fn-bar.total { background: linear-gradient(90deg, var(--faint), var(--border-strong)); color: var(--text); }
.fn-bar.rel { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.fn-bar.irr { background: var(--surface-3); color: var(--muted); }
.fn-bar .fn-v { font-family: var(--font-mono); font-size: 17px; }
.fn-bar .fn-l { font-size: 12px; font-weight: 600; margin-left: 9px; opacity: .9; }
.fn-meta { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); flex: none; width: 64px; text-align: right; }
.fn-precision { margin-top: 16px; display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.fn-ring { width: 60px; height: 60px; flex: none; }
.fn-prec-txt .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.fn-prec-txt .l { font-size: 12px; color: var(--muted); }

/* Keyword-Performance */
.kwp-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.kwp-name { width: 44%; flex: none; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kwp-name .star { color: var(--warn); }
.kwp-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kwp-track { flex: 1; height: 18px; border-radius: 6px; background: var(--surface-3); overflow: hidden; position: relative; display: flex; }
[data-dir="klassik"] .kwp-track { border-radius: 3px; }
.kwp-track .rel { height: 100%; background: var(--success); }
.kwp-track .noise { height: 100%; background: var(--danger); opacity: .35; }
.kwp-val { flex: none; width: 86px; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.kwp-val b { color: var(--success); }
.kwp-legend { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.kwp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kwp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.kwp-note { font-size: 11.5px; color: var(--faint); margin-top: 10px; line-height: 1.5; }

/* Findings */
.tp-filterbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.seg-toggle { display: inline-flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
[data-dir="klassik"] .seg-toggle { border-radius: 5px; }
.seg-toggle button { border: none; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 7px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-toggle button.on { background: var(--brand); color: var(--on-brand); }
.seg-toggle button.on.rel { background: var(--success); }

.find { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.find.irr { border-left-color: var(--danger); opacity: .92; }
.find-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.src-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
[data-dir="klassik"] .src-tag { border-radius: 3px; }
.src-tag.nachricht { background: var(--brand-tint); color: var(--brand-ink); }
.src-tag.bundestag { background: var(--danger-tint); color: var(--danger); }
.src-tag.law { background: var(--warn-tint); color: var(--warn); }
.src-tag svg { width: 11px; height: 11px; }
.rel-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
[data-dir="klassik"] .rel-tag { border-radius: 3px; }
.rel-tag.yes { background: var(--success-tint); color: var(--success); }
.rel-tag.no { background: var(--danger-tint); color: var(--danger); }
.rel-tag svg { width: 12px; height: 12px; }
.find-date { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.find-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 6px; text-wrap: pretty; color: var(--brand-ink); cursor: pointer; }
[data-dir="klassik"] .find-title { font-weight: 500; font-size: 17px; }
.find-title:hover { text-decoration: underline; }
.find-outlet { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 11px; }
.find-outlet svg { width: 13px; height: 13px; }
.find-kw-label { font-size: 11.5px; color: var(--faint); margin-bottom: 7px; }
.find-kw { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.find-kw .kwchip { background: var(--surface-3); }
.excerpt { font-size: 12.5px; line-height: 1.55; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 8px; text-wrap: pretty; }
.excerpt mark { background: rgba(201,135,15,.22); color: var(--text); padding: 0 2px; border-radius: 3px; font-weight: 600; }
[data-theme="dark"] .excerpt mark { background: rgba(232,177,75,.22); }
.find-ai { display: flex; gap: 9px; font-size: 12px; line-height: 1.5; color: var(--muted); font-style: italic; margin-top: 10px; padding: 10px 13px; background: var(--brand-tint); border-radius: var(--radius-sm); border-left: 3px solid var(--brand); font-style: normal; }
.find-ai svg { width: 15px; height: 15px; flex: none; color: var(--brand); margin-top: 1px; }
.find.irr .find-ai { background: var(--surface-2); border-left-color: var(--faint); }
.find-fb { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.find-fb .lbl { font-size: 11.5px; color: var(--faint); }
.fb-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 8px; padding: 6px 11px; }
[data-dir="klassik"] .fb-btn { border-radius: 4px; }
.fb-btn:hover { border-color: var(--border-strong); color: var(--text); }
.fb-btn.yes.on { background: var(--success-tint); color: var(--success); border-color: var(--success); }
.fb-btn.no.on { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.fb-btn svg { width: 14px; height: 14px; }
.find-changed { margin-left: auto; font-size: 11px; color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.find-changed svg { width: 13px; height: 13px; }

/* ---------- Assistent (Wizard) ---------- */
.wizard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
[data-dir="signature"] .wizard { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.wz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.wz-step { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 13px; color: var(--muted); }
[data-dir="klassik"] .wz-step { border-radius: 4px; }
.wz-step.active { background: var(--brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-brand); }
.wz-step.done { background: var(--success); color: #fff; border-color: transparent; }
.wz-step .wz-num { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; background: rgba(255,255,255,.25); }
.wz-step:not(.active):not(.done) .wz-num { background: var(--surface-3); }
.wz-step svg { width: 16px; height: 16px; }
.wz-h { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 0 0 18px; }
[data-dir="klassik"] .wz-h { font-weight: 500; }
.wz-label { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; display: block; }
.wz-label .opt { font-weight: 400; color: var(--faint); }
.wz-hint { font-size: 12px; color: var(--faint); margin-top: 8px; line-height: 1.5; display: flex; gap: 7px; }
.wz-hint svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.kw-input-row { display: flex; gap: 8px; }
.kw-add { width: 42px; flex: none; border: 1px solid var(--brand); background: var(--brand-tint); color: var(--brand-ink); border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
[data-dir="klassik"] .kw-add { border-radius: 5px; }
.kw-add svg { width: 18px; height: 18px; }
.fach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; margin-top: 8px; }
.fach-check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; color: var(--text); }
.fach-box { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
[data-dir="klassik"] .fach-box { border-radius: 3px; }
.fach-check.on .fach-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.fach-box svg { width: 12px; height: 12px; opacity: 0; }
.fach-check.on .fach-box svg { opacity: 1; }
.wz-pills { display: flex; gap: 9px; flex-wrap: wrap; margin: 4px 0 16px; }
.wz-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 22px; font-weight: 600; font-size: 13px; background: var(--brand); color: var(--on-brand); cursor: pointer; border: 1px solid transparent; }
[data-dir="klassik"] .wz-pill { border-radius: 4px; }
.wz-pill.main { background: var(--brand-ink); }
.wz-pill.off { background: var(--surface-2); color: var(--muted); border-color: var(--border); text-decoration: line-through; }
.wz-pill .ki { font-size: 9px; opacity: .7; font-family: var(--font-mono); }
.wz-pill .tg { font-family: var(--font-mono); font-weight: 700; }
.wz-flags { background: var(--warn-tint); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.wz-flags-h { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13.5px; color: var(--warn); margin-bottom: 12px; }
.wz-flags-h svg { width: 17px; height: 17px; }
.wz-flag { font-size: 13px; line-height: 1.55; color: var(--text); margin-bottom: 10px; padding-left: 18px; position: relative; }
.wz-flag::before { content: ""; position: absolute; left: 4px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.wz-flag b { font-weight: 700; }
.wz-flag .sg { font-style: italic; color: var(--muted); }
.wz-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.wz-spinner { width: 54px; height: 54px; border: 4px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wz-running { text-align: center; padding: 40px 20px; }
.wz-running .rh { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.wz-running .rs { color: var(--muted); font-size: 13.5px; }

@media (max-width: 1080px) {
  .tp-overview { grid-template-columns: 1fr; }
  .fach-grid { grid-template-columns: repeat(2, 1fr); }
  .wz-steps { grid-template-columns: repeat(2, 1fr); }
}

/* Entrance-Animationen für Print/PDF & Reduced-Motion abschalten (sichtbarer Endzustand) */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .mon-card, .m-card, .cgroup, .card-enter, .panel, .wizard, .find { animation: none !important; opacity: 1 !important; }
}

/* ============================================================
   MANDANTEN PROFILE — Dossier
   ============================================================ */
.pf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.pf-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

/* Selector */
.pf-selector { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
[data-dir="signature"] .pf-selector { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.pf-sel-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 9px; }
.pf-search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 15px; color: var(--faint); position: relative; }
[data-dir="klassik"] .pf-search { border-radius: 5px; }
.pf-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.pf-search svg { width: 18px; height: 18px; }
.pf-search input { border: none; background: none; outline: none; flex: 1; color: var(--text); font-family: inherit; font-size: 14px; }
.pf-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; max-height: 320px; overflow-y: auto; }
.pf-opt { display: flex; align-items: center; gap: 11px; padding: 11px 15px; cursor: pointer; border-bottom: 1px solid var(--border); }
.pf-opt:last-child { border-bottom: none; }
.pf-opt:hover { background: var(--surface-2); }
.pf-opt .o-name { font-weight: 600; font-size: 13.5px; }
.pf-opt .o-sub { font-size: 11.5px; color: var(--faint); }
.pf-meta-row { display: flex; align-items: center; gap: 12px; margin-top: 13px; flex-wrap: wrap; }
.pf-count { font-size: 12.5px; color: var(--faint); }
.pf-recent { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-recent .lbl { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.recent-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-weight: 600; font-size: 12.5px; }
[data-dir="klassik"] .recent-chip { border-radius: 4px; }
.recent-chip:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-ink); }

/* Hero */
.pf-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius-lg); margin-bottom: 16px;
  background: linear-gradient(120deg, var(--brand-tint), var(--surface) 70%); border: 1px solid var(--border); position: relative; overflow: hidden; }
.pf-logo { width: 60px; height: 60px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 18px; box-shadow: var(--shadow); }
[data-dir="klassik"] .pf-logo { border-radius: 6px; }
.pf-hmain { flex: 1; min-width: 0; }
.pf-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
[data-dir="klassik"] .pf-name { font-weight: 500; }
.pf-sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.pf-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.pf-tag { font-size: 11.5px; font-weight: 600; padding: 3px 11px; border-radius: 20px; background: var(--brand); color: var(--on-brand); }
[data-dir="klassik"] .pf-tag { border-radius: 3px; }
.pf-tag.alt { background: var(--surface-3); color: var(--muted); }
.pf-hmeta { text-align: right; flex: none; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); line-height: 1.7; }
.pf-hmeta .row { display: inline-flex; align-items: center; gap: 6px; }
.pf-hmeta svg { width: 13px; height: 13px; }
.pf-hactions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }

/* Dossier-Layout: Sprung-Nav + Inhalt */
.dossier { display: grid; grid-template-columns: 188px 1fr; gap: var(--col-gap); align-items: start; }
.pf-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
[data-dir="signature"] .pf-nav { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.pf-nav button { display: flex; align-items: center; gap: 9px; border: none; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 9px 11px; border-radius: 9px; cursor: pointer; text-align: left; }
[data-dir="klassik"] .pf-nav button { border-radius: 4px; }
.pf-nav button:hover { background: var(--surface-2); color: var(--text); }
.pf-nav button.on { background: var(--brand-tint); color: var(--brand-ink); }
.pf-nav button svg { width: 15px; height: 15px; flex: none; }
.pf-nav .nv-count { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; opacity: .7; }

.pf-content { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pf-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px 22px; scroll-margin-top: 80px; }
[data-dir="signature"] .pf-section { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.pf-sec-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; }
[data-dir="klassik"] .pf-sec-h { font-weight: 600; font-family: var(--font-sans); }
.pf-sec-h .si { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; }
[data-dir="klassik"] .pf-sec-h .si { border-radius: 4px; }
.pf-sec-h .si svg { width: 16px; height: 16px; }

/* Fact-Grid */
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.fact { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; }
.fact .fl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.fact .fl svg { width: 12px; height: 12px; }
.fact { min-width: 0; }
.fact .fv { font-size: 14px; font-weight: 600; line-height: 1.35; text-wrap: pretty; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.fact.big .fv { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
[data-dir="klassik"] .fact.big .fv { font-weight: 500; }
.fact .fv .src { font-size: 11px; color: var(--brand); font-weight: 600; cursor: pointer; margin-left: 5px; vertical-align: super; }

/* Geschäftsmodell + Segment-Balken */
.biz-block { margin-bottom: 16px; }
.biz-block:last-child { margin-bottom: 0; }
.biz-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); margin-bottom: 7px; }
.biz-text { font-size: 13.5px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.src-cite { font-size: 10.5px; color: var(--brand); font-weight: 600; cursor: pointer; vertical-align: super; margin-left: 3px; }
/* Segmentumsätze: 2-Spalten-Liste (Name schmal, Notiz breit) */
.seg-table2 { margin-top: 6px; }
.seg-row2 { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 6px 16px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.seg-row2:last-child { border-bottom: none; }
.seg-name2 { font-size: 13px; font-weight: 600; min-width: 0; }
.seg-note2 { font-size: 13px; line-height: 1.4; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }

/* Führung & Eigentümer */
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; }
.lead-card .role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 4px; }
.lead-card .pn { font-size: 13.5px; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.owners { display: flex; flex-direction: column; gap: 9px; }
.owner-row { display: flex; align-items: center; gap: 11px; }
.owner-name { width: 200px; flex: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-track { flex: 1; height: 16px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
[data-dir="klassik"] .owner-track { border-radius: 3px; }
.owner-track > i { display: block; height: 100%; border-radius: 6px; }
.owner-pct { width: 56px; flex: none; text-align: right; font-family: var(--font-mono); font-size: 12px; font-weight: 600; }

/* News-Feed im Dossier */
.pf-news-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.pf-news-item:last-child { border-bottom: none; }
.pf-news-top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; flex-wrap: wrap; }
.pf-news-title { font-weight: 600; font-size: 14px; line-height: 1.35; flex: 1; min-width: 200px; text-wrap: pretty; }
[data-dir="klassik"] .pf-news-title { font-family: var(--font-display); font-weight: 500; font-size: 15px; }
.pf-news-meta { font-size: 11px; color: var(--faint); font-family: var(--font-mono); margin-bottom: 6px; }
.pf-news-ex { font-size: 12.5px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.pf-news-rel { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 11px; color: var(--brand); font-weight: 600; cursor: pointer; }
.pf-news-rel svg { width: 12px; height: 12px; }

/* BD-Bezug */
.bd-link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bd-link-grid.two { grid-template-columns: 1fr 1fr; }
.bd-item-m span { white-space: nowrap; }
.bd-link-col .blc-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.bd-link-col .blc-h .n { margin-left: auto; font-family: var(--font-mono); background: var(--brand-tint); color: var(--brand-ink); padding: 0 8px; border-radius: 20px; font-size: 11px; }
.bd-link-col .blc-h svg { width: 14px; height: 14px; color: var(--brand); }
.bd-item { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 9px; cursor: pointer; }
.bd-item:hover { box-shadow: var(--shadow); }
.bd-item.hoch { border-left-color: var(--urgent); }
.bd-item-t { font-size: 12.5px; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.bd-item-m { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 10.5px; font-family: var(--font-mono); color: var(--faint); }
.bd-empty { font-size: 12.5px; color: var(--faint); padding: 14px; text-align: center; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); }
.bd-contacts-cta { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px; }
.bd-contacts-cta .bcn { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.bd-contacts-cta .lbl { font-size: 12px; color: var(--muted); }

/* leere Auswahl */
.pf-empty { text-align: center; padding: 80px 20px; color: var(--faint); }
.pf-empty svg { width: 54px; height: 54px; opacity: .4; margin-bottom: 16px; }
.pf-empty .h { font-size: 15px; font-weight: 600; color: var(--muted); }

@media (max-width: 1080px) {
  .dossier { grid-template-columns: 1fr; }
  .pf-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .lead-grid, .bd-link-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   JAHRESABSCHLÜSSE
   ============================================================ */
.ja-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.ja-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

/* Start-Panel */
.ja-start { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
[data-dir="signature"] .ja-start { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.ja-start-head { display: flex; align-items: center; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
[data-dir="signature"] .ja-start-head { background: transparent; }
.ja-start-head .si { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: var(--shadow-brand); }
[data-dir="klassik"] .ja-start-head .si { border-radius: 4px; }
.ja-start-head .si svg { width: 16px; height: 16px; }
.ja-start-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
[data-dir="klassik"] .ja-start-title { font-weight: 600; font-family: var(--font-sans); }
.ja-imports { margin-left: auto; display: flex; gap: 8px; }
.ja-imp-btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 9px; padding: 7px 12px; }
[data-dir="klassik"] .ja-imp-btn { border-radius: 4px; }
.ja-imp-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.ja-imp-btn svg { width: 14px; height: 14px; }

.ja-start-body { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ja-field-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.ja-field-label .hint { font-weight: 400; color: var(--faint); }
textarea.ja-names { width: 100%; min-height: 132px; resize: vertical; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.7; color: var(--text); outline: none; }
[data-dir="klassik"] textarea.ja-names { border-radius: 5px; }
textarea.ja-names:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.ja-clientlist { border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); max-height: 132px; overflow-y: auto; }
[data-dir="klassik"] .ja-clientlist { border-radius: 5px; }
.ja-cl-item { display: flex; align-items: center; gap: 10px; padding: 8px 13px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border); }
.ja-cl-item:last-child { border-bottom: none; }
.ja-cl-item:hover { background: var(--surface-3); }
.ja-cl-box { width: 17px; height: 17px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
[data-dir="klassik"] .ja-cl-box { border-radius: 3px; }
.ja-cl-item.on .ja-cl-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.ja-cl-box svg { width: 11px; height: 11px; opacity: 0; }
.ja-cl-item.on .ja-cl-box svg { opacity: 1; }
.ja-start-foot { display: flex; align-items: center; gap: 11px; padding: 0 20px 18px; }
.ja-start-foot .cnt { font-size: 12.5px; color: var(--faint); margin-left: auto; }

/* Laufende Downloads — animiert */
.ja-flow { background: var(--surface); border: 1px solid var(--brand); border-radius: var(--radius-lg); box-shadow: var(--shadow-brand); margin-bottom: 16px; overflow: hidden; animation: popin .35s ease both; }
.ja-flow-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; font-weight: 700; font-size: 14px; color: var(--brand-ink); background: var(--brand-tint); }
.ja-flow-head .stage-ico { width: 22px; height: 22px; display: grid; place-items: center; }
.ja-flow-head .stage-ico svg { width: 17px; height: 17px; }
.ja-flow-head .ja-x { margin-left: auto; cursor: pointer; color: var(--muted); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); }
.ja-flow-head .ja-x:hover { color: var(--danger); border-color: var(--danger); }
.ja-flow-head .ja-x svg { width: 14px; height: 14px; }
.ja-flow-body { padding: 16px 18px; }

.spinner-sm { width: 18px; height: 18px; border: 3px solid color-mix(in srgb, var(--brand) 28%, transparent); border-top-color: var(--brand); border-radius: 50%; animation: spin .9s linear infinite; }
/* Scan-Shimmer */
.scan-bar { height: 10px; border-radius: 20px; background: var(--surface-3); overflow: hidden; position: relative; }
.scan-bar::after { content: ""; position: absolute; inset: 0; border-radius: 20px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 55%, transparent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; animation: scanMove 1.1s linear infinite; }
@keyframes scanMove { 0% { background-position: -40% 0; } 100% { background-position: 140% 0; } }
.ja-stage-label { font-size: 13px; color: var(--muted); margin-bottom: 11px; display: flex; align-items: center; gap: 9px; }
.ja-stage-label b { color: var(--text); }
/* Fortschritt */
.prog-track { height: 12px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .25s linear; position: relative; }
.prog-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); background-size: 30% 100%; background-repeat: no-repeat; animation: scanMove 1s linear infinite; }
.prog-pct { text-align: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--on-brand); line-height: 12px; }
.ja-flow.done { border-color: var(--success); box-shadow: 0 8px 26px color-mix(in srgb, var(--success) 22%, transparent); }
.ja-flow.done .ja-flow-head { background: var(--success-tint); color: var(--success); }
.ja-flow-log { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 11px 13px; line-height: 1.7; }
.ja-flow-log .ok { color: var(--success); }

/* Unternehmens-Auswahl */
.ja-pick { }
.ja-pick-head { font-weight: 700; font-size: 13.5px; margin-bottom: 12px; }
.ja-pick-head b { color: var(--brand); }
.ja-pick-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.ja-pick-tool { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; }
[data-dir="klassik"] .ja-pick-tool { border-radius: 4px; }
.ja-pick-tool:hover { color: var(--text); border-color: var(--border-strong); }
.ja-cand { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; background: var(--surface); animation: popin .3s ease both; }
.ja-cand:hover { border-color: var(--border-strong); }
.ja-cand.on { border-color: var(--warn); background: var(--warn-tint); }
.ja-cand.best { box-shadow: inset 0 0 0 1px var(--warn); }
.ja-cand-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
.ja-cand-year { font-family: var(--font-mono); font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--muted); padding: 2px 9px; border-radius: 20px; flex: none; }
.ja-cand-typ { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; flex: none; background: var(--brand-tint); color: var(--brand-ink); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ja-cand.best .ja-cand-typ { background: var(--warn); color: #fff; }
[data-dir="klassik"] .ja-cand-year, [data-dir="klassik"] .ja-cand-typ { border-radius: 3px; }
.ja-pick-confirm { width: 100%; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14px; border: none; background: var(--brand); color: var(--on-brand); border-radius: var(--radius); padding: 13px; box-shadow: var(--shadow-brand); }
[data-dir="klassik"] .ja-pick-confirm { border-radius: 5px; }
.ja-pick-confirm:hover { filter: brightness(1.06); }
.ja-pick-confirm svg { width: 17px; height: 17px; }

/* Tabelle */
.ja-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
[data-dir="signature"] .ja-table { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.ja-table-head { display: flex; align-items: center; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.ja-table-head .si { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--success-tint); color: var(--success); display: grid; place-items: center; }
[data-dir="klassik"] .ja-table-head .si { border-radius: 4px; }
.ja-table-head .si svg { width: 16px; height: 16px; }
.ja-table-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
[data-dir="klassik"] .ja-table-title { font-weight: 600; font-family: var(--font-sans); }
.ja-table-count { margin-left: auto; font-size: 12.5px; color: var(--faint); font-family: var(--font-mono); }
.ja-row { display: grid; grid-template-columns: minmax(0,2.4fr) 60px minmax(0,1.2fr) minmax(0,1.4fr) minmax(0,1.3fr) 64px 96px 150px; gap: 12px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.ja-row.htr { padding: 11px 20px; border-bottom: 2px solid var(--border-strong); }
.ja-row.htr > div { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.ja-row:hover:not(.htr) { background: var(--surface-2); }
.ja-row.new { animation: flashGreen 1.4s ease both; }
.jc-company { font-weight: 600; font-size: 13.5px; line-height: 1.35; cursor: pointer; display: flex; align-items: center; gap: 7px; text-wrap: pretty; }
.jc-company svg { width: 15px; height: 15px; flex: none; color: var(--muted); transition: transform .2s; }
.jc-company.open svg { transform: rotate(90deg); }
.jc-year { font-family: var(--font-mono); font-size: 13px; }
.jc-typ { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--surface-3); color: var(--muted); width: fit-content; white-space: nowrap; }
[data-dir="klassik"] .jc-typ { border-radius: 3px; }
.jc-mandant select { width: 100%; appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 24px 6px 10px; cursor: pointer; }
[data-dir="klassik"] .jc-mandant select { border-radius: 4px; }
.jc-mandant { position: relative; }
.jc-mandant::after { content: "▾"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: 9px; }
.jc-analyse { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.ana-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
[data-dir="klassik"] .ana-badge { border-radius: 3px; }
.ana-badge svg { width: 11px; height: 11px; }
.ana-badge.analysiert { background: var(--success-tint); color: var(--success); }
.ana-badge.pensionen { background: var(--warn-tint); color: var(--warn); }
.ana-badge.fremdpersonal { background: #d9f0fb; color: #1186b8; }
[data-theme="dark"] .ana-badge.fremdpersonal { background: #0d3547; color: #4cc4ee; }
.ana-badge.bdchancen { background: var(--success); color: #fff; }
.ana-badge.extrahiere { background: var(--brand-tint); color: var(--brand-ink); }
.ana-badge.extrahiere svg { animation: spin 1s linear infinite; }
.jc-size { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.jc-date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.jc-actions { display: flex; gap: 5px; }
.ja-act { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: #fff; }
[data-dir="klassik"] .ja-act { border-radius: 4px; }
.ja-act:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ja-act svg { width: 15px; height: 15px; }
.ja-act.view { background: #2f74e0; }
.ja-act.dl { background: var(--success); }
.ja-act.ai { background: #16b8c4; }
.ja-act.pdf { background: #e0a92f; }
.ja-act.del { background: var(--danger); }

/* Analyse-Detail (aufgeklappt) */
.ja-detail { padding: 4px 20px 20px; }
.ja-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ja-dcard { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ja-dcard-h { display: flex; align-items: center; gap: 8px; padding: 12px 15px; font-weight: 700; font-size: 13.5px; }
.ja-dcard-h svg { width: 16px; height: 16px; }
.ja-dcard.pens .ja-dcard-h { background: var(--warn-tint); color: var(--warn); }
.ja-dcard.fremd .ja-dcard-h { background: #d9f0fb; color: #1186b8; }
[data-theme="dark"] .ja-dcard.fremd .ja-dcard-h { background: #0d3547; color: #4cc4ee; }
.ja-dcard.chancen .ja-dcard-h { background: var(--success-tint); color: var(--success); }
.ja-dcard-b { padding: 14px 15px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.ja-dcard.pens { border-left: 3px solid var(--warn); }
.ja-dcard.fremd { border-left: 3px solid #1186b8; }
.ja-dcard.chancen { border-left: 3px solid var(--success); }
.det-status { display: inline-flex; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-bottom: 11px; }
[data-dir="klassik"] .det-status { border-radius: 3px; }
.det-status.yes { background: var(--warn-tint); color: var(--warn); }
.det-status.no { background: var(--surface-3); color: var(--muted); }
.det-kv { color: var(--text); margin-bottom: 4px; }
.det-kv b { color: var(--text); }
.det-text { margin-top: 9px; }
.chance-block { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chance-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.chance-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chance-area { font-weight: 700; font-size: 12.5px; color: var(--text); }
.chance-prio { margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
[data-dir="klassik"] .chance-prio { border-radius: 3px; }
.chance-prio.Hoch { background: var(--danger-tint); color: var(--danger); }
.chance-prio.Mittel { background: var(--warn-tint); color: var(--warn); }
.chance-text { color: var(--text); font-size: 12px; line-height: 1.55; }
.chance-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chance-tag { font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--success-tint); color: var(--success); }
[data-dir="klassik"] .chance-tag { border-radius: 3px; }

@media (max-width: 1080px) {
  .ja-start-body { grid-template-columns: 1fr; }
  .ja-detail-grid { grid-template-columns: 1fr; }
  .ja-row { grid-template-columns: minmax(0,2fr) minmax(0,1.3fr) 150px; }
  .ja-row > .jc-year, .ja-row > .jc-typ, .ja-row > .jc-size, .ja-row > .jc-date, .ja-row.htr > div:nth-child(2), .ja-row.htr > div:nth-child(3), .ja-row.htr > div:nth-child(6), .ja-row.htr > div:nth-child(7) { display: none; }
}

/* ============================================================
   EINSTELLUNGEN
   ============================================================ */
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.set-head .ph-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.set-wrap { display: grid; grid-template-columns: 234px 1fr; gap: var(--col-gap); align-items: start; padding-bottom: 90px; }

/* Kategorie-Nav */
.set-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 8px; }
[data-dir="signature"] .set-nav { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.set-nav button { display: flex; align-items: center; gap: 11px; border: none; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 13.5px; padding: 11px 13px; border-radius: 10px; cursor: pointer; text-align: left; }
[data-dir="klassik"] .set-nav button { border-radius: 5px; }
.set-nav button:hover { background: var(--surface-2); color: var(--text); }
.set-nav button.on { background: var(--brand-tint); color: var(--brand-ink); }
.set-nav button .ico { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.set-nav button .ico svg { width: 17px; height: 17px; }
.set-nav .nv-sub { font-size: 11px; font-weight: 500; color: var(--faint); margin-top: 1px; }
.set-nav button.on .nv-sub { color: var(--brand-ink); opacity: .7; }
.set-nav button > div { display: flex; flex-direction: column; min-width: 0; }
.set-nav button > div > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panel */
.set-panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; animation: popin .3s ease both; }
[data-dir="signature"] .set-panel { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.set-panel-head { padding: 20px 24px 6px; }
.set-panel-h { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
[data-dir="klassik"] .set-panel-h { font-weight: 500; }
.set-panel-h .si { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; }
[data-dir="klassik"] .set-panel-h .si { border-radius: 5px; }
.set-panel-h .si svg { width: 17px; height: 17px; }
.set-panel-sub { font-size: 13px; color: var(--muted); margin: 8px 0 0 43px; }
.set-body { padding: 18px 24px 24px; }
.set-section { padding: 18px 0; border-top: 1px solid var(--border); }
.set-section:first-child { border-top: none; padding-top: 6px; }
.set-flabel { font-size: 13px; font-weight: 700; margin-bottom: 9px; display: block; }
.set-flabel .req { color: var(--faint); font-weight: 400; }
.set-fhint { font-size: 12px; color: var(--faint); margin-top: 9px; line-height: 1.5; }

/* Profil */
.set-avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.set-avatar { width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 26px; box-shadow: var(--shadow); }
.set-avatar-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.set-file { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 9px 14px; }
[data-dir="klassik"] .set-file { border-radius: 5px; }
.set-file:hover { border-color: var(--border-strong); }
.set-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Toggle-Zeile */
.set-toggle-row { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.set-toggle-row .tt { flex: 1; min-width: 0; }
.set-toggle-row .tt b { font-size: 14px; font-weight: 600; display: block; }
.set-toggle-row .tt span { font-size: 12.5px; color: var(--muted); }

/* Range */
input[type="range"].set-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 20px; background: var(--surface-3); outline: none; cursor: pointer; }
input[type="range"].set-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); box-shadow: var(--shadow-brand); cursor: pointer; border: 3px solid var(--surface); }
input[type="range"].set-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); box-shadow: var(--shadow-brand); cursor: pointer; border: 3px solid var(--surface); }
.set-range-val { font-family: var(--font-mono); font-weight: 700; color: var(--brand); }
.set-range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-family: var(--font-mono); margin-top: 7px; }

/* Urgency-Pills */
.set-pills { display: flex; gap: 9px; flex-wrap: wrap; }
.set-pill { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; padding: 7px 13px 7px 9px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
[data-dir="klassik"] .set-pill { border-radius: 4px; }
.set-pill .pb { width: 17px; height: 17px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
.set-pill.on .pb { background: var(--brand); border-color: var(--brand); color: #fff; }
.set-pill .pb svg { width: 11px; height: 11px; opacity: 0; }
.set-pill.on .pb svg { opacity: 1; }
.set-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
.set-pill.on { color: var(--text); }

/* Fachbereiche-Grid */
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 18px; }
.fb-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 4px 0; }
.fb-check .pb { width: 19px; height: 19px; flex: none; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
[data-dir="klassik"] .fb-check .pb { border-radius: 3px; }
.fb-check.on .pb { background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-check .pb svg { width: 12px; height: 12px; opacity: 0; }
.fb-check.on .pb svg { opacity: 1; }
.fb-check .fbn { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.fb-check .fbn span { font-weight: 400; color: var(--muted); }
.set-mini-tools { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.set-mini-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 9px; padding: 7px 13px; }
[data-dir="klassik"] .set-mini-btn { border-radius: 4px; }
.set-mini-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.set-mini-btn svg { width: 14px; height: 14px; }

/* Mandanten-Auswahl */
.set-mlist { border: 1px solid var(--border); border-radius: var(--radius); max-height: 360px; overflow-y: auto; margin-top: 12px; }
.set-mitem { display: flex; align-items: center; gap: 11px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.set-mitem:last-child { border-bottom: none; }
.set-mitem:hover { background: var(--surface-2); }
.set-mitem .pb { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
[data-dir="klassik"] .set-mitem .pb { border-radius: 3px; }
.set-mitem.on .pb { background: var(--brand); border-color: var(--brand); color: #fff; }
.set-mitem .pb svg { width: 11px; height: 11px; opacity: 0; }
.set-mitem.on .pb svg { opacity: 1; }
.set-mcount { font-size: 12.5px; color: var(--faint); margin-top: 10px; }
.set-mcount b { color: var(--brand); font-family: var(--font-mono); }

/* Save-Bar */
.set-savebar { position: fixed; left: calc(var(--sidebar-w) + var(--app-pad)); right: var(--app-pad); bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); transition: left .32s cubic-bezier(.4,0,.2,1); }
.set-savebar .sb-txt { font-size: 13px; color: var(--muted); }
.set-savebar .sb-txt b { color: var(--text); }
.set-savebar .sb-sp { flex: 1; }
.set-savebar.saved { border-color: var(--success); }
.set-savebar.saved .sb-txt b { color: var(--success); }
@media (max-width: 920px) { .set-savebar { left: var(--app-pad); } }

@media (max-width: 1080px) {
  .set-wrap { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .set-nav button { flex: 1 1 auto; }
  .set-nav .nv-sub { display: none; }
  .fb-grid, .set-grid2 { grid-template-columns: 1fr; }
}
