/* ============================================================
   Business Navigator – Haupt-Stylesheet
   Umsetzt CI & Kommunikations-Guideline v1.0 (April 2026)
   ============================================================ */

/* --- Mobile-Input-Zoom-Fix (iOS Safari) ---------------------
   Safari zoomt automatisch in jedes Input-Feld dessen Schrift
   < 16px gross ist. Deshalb erzwingen wir weltweit min. 16px
   fuer alle Form-Elemente auf Touch-Viewports. Auf Desktop
   (>= 901px) darf die CSS-Komponente kleinere Schrift nutzen.
   WICHTIG: Diese Regel gilt fuer JEDE neue Seite/Modal/Widget.
   -------------------------------------------------------------*/
@media (max-width: 900px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
    select, textarea, button {
        font-size: 16px !important;
        line-height: 1.4;
    }
}

/* --- CSS-Variablen (CI §9) ---------------------------------- */
:root {
    /* Primaerfarben */
    --navy:        #1a2744;
    --navy-hover:  #243358;
    --gold:        #c9a84c;
    --gold-lt:     #e8c96a;
    --gold-pale:   #f7f0df;
    --gold-text:   #7a5c10;

    /* Flaechen */
    --bg:          #f5f4f0;
    --surface:     #ffffff;
    --bg-card:     #ffffff;
    --border:      #e0ded8;
    --bg-muted:    #f0f0f0;

    /* Text */
    --text:        #1a1a1a;
    --text-mid:    #444;
    --text-muted:  #888;

    /* Status */
    --success:     #2d7a4f;
    --success-bg:  #edf7f1;
    --warn:        #b45309;
    --warn-bg:     #fff8ec;
    --error:       #b42318;
    --error-bg:    #fdeeee;
    --error-border:#f5c2c2;

    /* Typo (CI §10) */
    --font-serif:  'Cormorant Garamond', 'Cormorant', Garamond, Georgia, serif;
    --font-sans:   'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono:   'DM Mono', Menlo, Consolas, monospace;

    /* Radien (CI §12) */
    --radius-sm:   5px;
    --radius:      10px;
    --radius-lg:   12px;

    /* Schatten (CI §12) */
    --shadow:      0 6px 20px rgba(26, 39, 68, .08);
    --shadow-lg:   0 18px 40px -16px rgba(26, 39, 68, .18);

    /* Layout */
    --container:   1320px;
    --container-padding: 22px;
    --header-h:    60px;
    --sidebar-w:   272px;
}

[data-theme="dark"] {
    --bg:         #0f1117;
    --surface:    #1a1d27;
    --bg-card:    #1a1d27;
    --border:     #2a2d3a;
    --bg-muted:   #252a38;
    --text:       #f0eee8;
    --text-mid:   #b0aead;
    --text-muted: #666;
    --gold-pale:  #2a2510;
    --success-bg: #0d2318;
    --warn-bg:    #2a1a00;
    --shadow:     0 6px 20px rgba(0, 0, 0, .3);
    --shadow-lg:  0 18px 40px -16px rgba(0, 0, 0, .5);
}

/* --- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* --- Basis ---------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-mid);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* Hauptinhalt dehnt sich bis der Footer am unteren Rand klebt */
body > .impersonation-bar { flex: 0 0 auto; }
body > .site-header       { flex: 0 0 auto; }
body > .public-main,
body > .cockpit-shell     { flex: 1 0 auto; }
body > .site-footer,
body > .cockpit-footer    { flex: 0 0 auto; }

/* --- Typo (CI §10) ------------------------------------------- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    color: var(--navy);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -.005em;
    margin: 0 0 .6em 0;
}
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 17px; font-weight: 600; }
h1 em, h2 em { color: var(--gold); font-style: italic; font-weight: 300; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: var(--gold-lt); }

p { margin: 0 0 1em 0; }
.lead { font-size: 16px; color: var(--text-mid); max-width: 76ch; margin-bottom: 32px; }
.sec-title {
    font-size: 11px; font-weight: 500; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .09em;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

a.tlink { color: var(--navy); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
a.tlink:hover { color: var(--gold); border-bottom-color: var(--gold); }
[data-theme="dark"] a.tlink { color: var(--gold-lt); }
[data-theme="dark"] a.tlink:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* --- Container / Sektionen ----------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--container-padding); }
.section       { padding: clamp(48px, 8vw, 88px) 0; }
.section-narrow{ padding: clamp(32px, 6vw, 64px) 0; }

/* --- Skip-Link (CI §7) --------------------------------------- */
.skip-link {
    position: absolute; top: -40px; left: 8px;
    background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px;
    font-size: 13px; z-index: 100;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Tastatur-Tasten (kbd) ----------------------------------- */
kbd {
    display: inline-block; font-family: var(--font-mono); font-size: .85em;
    padding: 1px 6px; border: 1px solid var(--border);
    border-bottom-width: 2px; border-radius: 4px;
    background: var(--bg-muted); color: var(--text);
    line-height: 1.4; vertical-align: baseline;
}

/* --- Sichtbarer Fokus (WCAG 2.4.7) --------------------------- */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- Header (CI §13) ----------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: var(--navy);
    border-bottom: 1px solid rgba(201, 168, 76, .18);
    display: flex; align-items: center;
}
.site-header .container,
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 20px;
}
.site-header--cockpit { padding: 0 22px; }
.site-header--cockpit .site-header__inner { max-width: none; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark {
    width: 32px; height: 32px; border-radius: 5px;
    background: var(--gold); color: var(--navy);
    font-family: var(--font-serif); font-size: 15px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}
.logo__text    { color: #fff; font-weight: 500; font-size: 15px; }
.logo__sub     { color: rgba(255,255,255,.4); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; display: block; }

.header-nav { display: flex; align-items: center; gap: 18px; }
.header-nav a {
    color: rgba(255,255,255,.7); font-size: 13px;
    padding: 6px 0;
    transition: color .2s;
}
.header-nav a:hover,
.header-nav a.is-active { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-btn {
    background: rgba(255,255,255,.08); color: #fff;
    padding: 8px 14px; border-radius: 6px; font-size: 13px;
    border: none; transition: background .2s;
}
.header-btn:hover { background: rgba(255,255,255,.15); }
.header-btn--gold { background: var(--gold); color: var(--navy); }
.header-btn--gold:hover { background: var(--gold-lt); }

.header-user { color: rgba(255,255,255,.85); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.header-user::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }

.theme-toggle { background: transparent; border: none; color: rgba(255,255,255,.65); padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.theme-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Header Icon Button (Theme + Bell etc.) */
.header-icon-btn {
    background: rgba(255,255,255,.08); border: none; color: rgba(255,255,255,.7);
    width: 36px; height: 36px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s, color .2s; position: relative;
}
.header-icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* --- Hamburger Button (mobile-only) ----------------------------- */
.header-hamburger {
    display: none; /* sichtbar nur per Media-Query */
    background: none; border: none; padding: 8px;
    cursor: pointer; flex-direction: column; gap: 4px;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
}
.hamburger-line {
    display: block; width: 22px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform .25s, opacity .2s;
}
.header-hamburger.is-active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header-hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.header-hamburger.is-active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Mobile Drawer (rechts rein) -------------------------------- */
.mobile-drawer {
    position: fixed; inset: 0; z-index: 100;
}
.mobile-drawer__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    animation: bn-fade-in .2s ease-out;
}
.mobile-drawer__panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 300px; max-width: 85vw;
    background: var(--surface);
    box-shadow: -4px 0 24px rgba(0,0,0,.2);
    display: flex; flex-direction: column;
    animation: bn-slide-right .25s ease-out;
    overflow-y: auto;
}
.mobile-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--navy); color: #fff;
}
.mobile-drawer__title { font-size: 15px; font-weight: 500; }
.mobile-drawer__close {
    background: none; border: none; color: rgba(255,255,255,.7);
    font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.mobile-drawer__close:hover { color: #fff; }
.mobile-drawer__nav {
    list-style: none; margin: 0; padding: 12px 0;
    flex: 1;
}
.mobile-drawer__nav li a {
    display: block; padding: 12px 20px;
    font-size: 15px; color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.mobile-drawer__nav li a:hover,
.mobile-drawer__nav li a.is-active { background: var(--gold-pale); color: var(--navy); }
.mobile-drawer__gold {
    background: var(--gold) !important; color: var(--navy) !important;
    font-weight: 500;
}
.mobile-drawer__footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}
.mobile-drawer__row {
    padding: 8px 0;
}
.mobile-drawer__theme {
    background: none; border: none; color: var(--text-mid);
    font-size: 14px; cursor: pointer; padding: 6px 0;
    display: flex; align-items: center; gap: 8px;
}
.mobile-drawer__theme:hover { color: var(--text); }
/* Lang-Switcher im Drawer: volle Breite, Dropdown im Flow (kein Absolute!) */
.mobile-drawer__lang { width: 100%; }
.mobile-drawer__lang .bn-lang-switcher {
    position: static;
    margin: 0;
    width: 100%;
}
.mobile-drawer__lang .bn-lang-switcher > summary {
    width: 100%;
    justify-content: space-between;
    color: var(--text);
    font-size: 14px;
    background: transparent;
    border: 1px solid var(--border);
    padding: 10px 12px;
}
.mobile-drawer__lang .bn-lang-switcher > summary:hover { background: var(--gold-pale); }
.mobile-drawer__lang .bn-lang-switcher[open] > summary {
    background: var(--gold-pale); color: var(--navy);
    border-color: var(--gold);
}
.mobile-drawer__lang .bn-lang-switcher ul {
    position: static;
    right: auto;
    top: auto;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
    padding: 4px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
    z-index: auto;
}
.mobile-drawer__lang .bn-lang-switcher ul a {
    color: var(--text);
    padding: 10px 12px;
}
.mobile-drawer__lang .bn-lang-switcher ul a:hover {
    background: var(--gold-pale);
    color: var(--navy);
}

@keyframes bn-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bn-slide-right { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* --- Public Header: responsive --------------------------------- */
@media (max-width: 768px) {
    .header-nav--desktop { display: none; }
    .header-actions--desktop { display: none; }
    .header-hamburger { display: flex; }
    .logo__sub { display: none; }
}
@media (min-width: 769px) {
    .header-hamburger { display: none; }
    .mobile-drawer { display: none !important; }
}

/* --- Cockpit/Admin: mobile sidebar von rechts ------------------- */
@media (max-width: 900px) {
    .cockpit-header-actions--desktop .header-profile-name { display: none; }
}

/* Impersonation-Banner */
.impersonation-bar {
    background: var(--warn); color: #fff;
    padding: 8px 22px; font-size: 13px; text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 14px;
}
.impersonation-bar a { color: #fff; text-decoration: underline; font-weight: 500; }

/* --- Footer (CI §14) ----------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 40px 0; margin-top: 60px; font-size: 13px; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; }
.footer-col h4 { color: #fff; font-family: var(--font-sans); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-copy { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: 12px; }

/* Footer Disclaimer (nicht-deutsche Sprachen) */
.footer-disclaimer {
    margin-top: 20px; padding: 16px 20px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; color: rgba(255,255,255,.7);
    font-size: 12px; line-height: 1.6;
}
.footer-disclaimer strong {
    display: block; margin-bottom: 6px;
    color: var(--gold); font-size: 13px; letter-spacing: .02em;
}
.footer-disclaimer p { margin: 6px 0; }
.footer-disclaimer a { color: var(--gold); text-decoration: underline; }
.footer-disclaimer a:hover { color: var(--gold-lt); }

/* Kompakte Variante für Cockpit-Footer */
.footer-disclaimer--compact {
    margin-top: 12px; padding: 10px 14px;
    background: var(--bg-muted); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 11px; line-height: 1.5;
}
.footer-disclaimer--compact strong {
    color: var(--text); font-size: 12px; display: inline; margin-right: 6px;
}

/* --- Buttons (CI §24) ---------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 22px; border-radius: 7px;
    font-size: 14px; font-weight: 500; font-family: inherit;
    border: 1px solid transparent; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
    text-decoration: none;
}
.btn-gold,
.btn-primary,
.btn--primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover,
.btn-primary:hover,
.btn--primary:hover { background: var(--gold-lt); border-color: var(--gold-lt); }
[data-theme="dark"] .btn-gold,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn--primary { color: #1a2744; }

.btn-navy,
.btn-secondary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover,
.btn-secondary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
[data-theme="dark"] .btn-secondary { background: var(--gold-pale); color: var(--gold-lt); border-color: var(--border); }
[data-theme="dark"] .btn-secondary:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.btn-ghost,
.btn--ghost { background: transparent; color: var(--text-mid); border-color: var(--border); }
.btn-ghost:hover,
.btn--ghost:hover { border-color: var(--gold); color: var(--navy); }
[data-theme="dark"] .btn-ghost:hover,
[data-theme="dark"] .btn--ghost:hover { color: var(--gold-lt); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-outline { color: var(--gold-lt); border-color: var(--gold); }
[data-theme="dark"] .btn-outline:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.btn-sm,
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 6px; }
.btn--xs { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }

/* --- Cards --------------------------------------------------- */
.mcard {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    border-left: 3px solid var(--border);
    transition: border-color .15s, transform .15s, box-shadow .15s;
    display: block;
}
.mcard:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.mcard--gold  { border-left-color: var(--gold); }
.mcard--owned { border-left-color: var(--success); }
.mcard__title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--navy); margin: 0 0 6px; }
[data-theme="dark"] .mcard__title { color: var(--gold-lt); }
.mcard__text  { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.mcard__badge {
    display: inline-block; font-size: 11px; padding: 2px 7px;
    border-radius: 4px; background: var(--gold-pale); color: var(--gold-text);
    margin-bottom: 9px;
}
.mcard__badge--success { background: var(--success-bg); color: var(--success); }
.mcard__badge--admin   { background: var(--gold-pale); color: var(--gold-text); border: 1px solid rgba(201, 168, 76, .35); }

/* --- Alerts (CI §24) ----------------------------------------- */
.alert { padding: 12px 16px; border-radius: 7px; font-size: 14px; border: 1px solid transparent; margin-bottom: 16px; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(45, 122, 79, .2); }
.alert-error   { background: var(--error-bg);   color: var(--error);   border-color: var(--error-border); }
.alert-info    { background: var(--bg-muted);   color: var(--text-mid); border-color: var(--border); }

/* --- Formulare (CI §25) -------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-mid); margin-bottom: 4px; }
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid var(--border); border-radius: 7px;
    padding: 10px 12px; font-size: 14px; font-family: inherit;
    background: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, .18);
}
.field small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1; }
@media (max-width: 600px) {
    .field-row { flex-direction: column; gap: 0; }
}

/* Focus-Indikator global (CI §7) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* --- Public Layout (Boxed) ----------------------------------- */
.public-hero { background: var(--surface); padding: 60px 0; border-bottom: 1px solid var(--border); }
.public-main { background: var(--bg); padding: 48px 0; }

/* --- Cockpit-Layout (volle Breite) --------------------------- */
.cockpit-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
}
.cockpit-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    overflow-y: auto;
    position: sticky;
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
    /* magnetisch: Service-Block (Hilfe & FAQ) unten gepinnt */
    display: flex;
    flex-direction: column;
    /* CI-konformer Scrollbar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
/* CI-konformer Scrollbar (Chromium/WebKit) — schmal, dezent, Gold beim Hover */
.cockpit-sidebar::-webkit-scrollbar {
    width: 6px;
}
.cockpit-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.cockpit-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
.cockpit-sidebar:hover {
    scrollbar-color: var(--gold) transparent;
}
.cockpit-sidebar:hover::-webkit-scrollbar-thumb {
    background: var(--gold);
}
.cockpit-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gold-lt);
}
.sidebar-top    { flex: 0 0 auto; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.cockpit-main {
    padding: 32px clamp(22px, 4vw, 40px);
    background: var(--bg);
    min-width: 0; /* erlaubt Kindern (z.B. Pipeline-Board) eigenes overflow-x statt Body-Scroll */
}

/* Sidebar-Profilkarte */
.sidebar-profile { padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.sidebar-profile__row { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--navy); color: var(--gold);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-size: 16px; font-weight: 600;
    object-fit: cover;
}
.avatar-lg { width: 64px; height: 64px; font-size: 24px; border-radius: 10px; }
.sidebar-profile__name { font-size: 14px; color: var(--text); font-weight: 500; }
.sidebar-profile__role { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }

/* Sidebar-Suche */
.sidebar-search { margin-bottom: 18px; }
.sidebar-search input {
    width: 100%; border: 1px solid var(--border); border-radius: 7px;
    padding: 8px 12px; font-size: 13px; background: var(--bg-muted);
}

/* Sidebar-Navigation */
.side-nav { list-style: none; padding: 0; margin: 0 0 18px; }
.side-nav__sec { font-size: 10px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .09em; padding: 10px 12px 6px; }
.side-nav__sec--toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-mid); text-transform: none; letter-spacing: 0; padding: 8px 12px; border-radius: 6px; transition: background .15s, color .15s; margin-top: 10px; }
.side-nav__sec--toggle:hover { background: var(--bg-muted); color: var(--navy); }
[data-theme="dark"] .side-nav__sec--toggle:hover { color: var(--gold-lt); }
.side-nav__sec--toggle .side-nav__sec-chev { font-size: 10px; opacity: .6; transition: transform .2s; }
.side-nav__group.is-collapsed .side-nav__sec--toggle .side-nav__sec-chev { transform: rotate(-90deg); }
.side-nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 13px; color: var(--text-mid);
    padding: 8px 12px; border-radius: 6px;
    transition: background .15s, color .15s;
}
.side-nav a:hover { background: var(--bg-muted); color: var(--navy); }
[data-theme="dark"] .side-nav a:hover { color: var(--gold-lt); }
.side-nav a.is-active { background: var(--gold); color: var(--navy); font-weight: 500; }
.side-nav__badge {
    background: var(--gold-pale); color: var(--gold-text);
    font-size: 10px; padding: 1px 6px; border-radius: 10px;
}

/* --- Dashboard-Widgets (CI §27) ------------------------------ */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 8px;
}
@media (max-width: 600px) {
    .widget-grid { gap: 14px; }
}

.widget {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px;
    transition: border-color .15s, box-shadow .15s, opacity .15s;
    position: relative;
}
.widget:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.widget.dragging { opacity: .5; }
.widget.drop-target { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.widget__head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; gap: 8px;
}
.widget__title { font-size: 14px; font-weight: 600; color: var(--text); font-family: var(--font-sans); }
/* Drag-Griff standardmäßig versteckt – Bearbeiten-Modus folgt später */
.widget__drag {
    display: none;
    cursor: grab; color: var(--text-muted); font-size: 16px; user-select: none;
    padding: 4px; line-height: 1; border-radius: 4px;
}
.widget-grid.is-editing .widget__drag { display: inline-flex; }
.widget__drag:hover { background: var(--bg-muted); color: var(--navy); }
[data-theme="dark"] .widget__drag:hover { color: var(--gold-lt); }
.widget__drag:active { cursor: grabbing; }
.widget__body { font-size: 14px; color: var(--text-mid); }
.widget__cta {
    display: inline-block; margin-top: 12px; font-size: 13px;
    color: var(--navy); font-weight: 500; border-bottom: 1px solid transparent;
}
.widget__cta:hover { color: var(--gold); border-bottom-color: var(--gold); }
[data-theme="dark"] .widget__cta { color: var(--gold-lt); }
[data-theme="dark"] .widget__cta:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* --- Glocke (Benachrichtigungen) ----------------------------- */
.bell-wrap { position: relative; }
.bell-btn {
    background: transparent; color: rgba(255,255,255,.75);
    border: none; padding: 6px 8px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative; cursor: pointer; transition: color .2s, background .2s;
}
.bell-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.bell-badge {
    position: absolute; top: 0; right: 0;
    background: var(--gold); color: var(--navy);
    font-size: 10px; font-weight: 600;
    min-width: 16px; height: 16px; border-radius: 10px;
    padding: 0 4px; display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.bell-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 340px; max-width: calc(100vw - 30px);
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 60; overflow: hidden;
}
.bell-panel__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.bell-panel__mark { font-size: 12px; color: var(--text-muted); }
.bell-panel__mark:hover { color: var(--gold); }
.bell-panel__list { max-height: 380px; overflow-y: auto; }
.bell-item {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    font-size: 13px; display: block; color: inherit; transition: background .15s;
}
.bell-item:hover { background: var(--bg-muted); }
.bell-item:last-child { border-bottom: none; }
.bell-item--unread { background: var(--gold-pale); }
.bell-item__title { font-weight: 500; color: var(--text); margin-bottom: 2px; }
.bell-item__body { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.bell-item__time { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.bell-panel__foot {
    padding: 10px 14px; font-size: 12px; text-align: center;
    border-top: 1px solid var(--border);
}
.bell-panel__foot a { color: var(--navy); }
.bell-panel__foot a:hover { color: var(--gold); }
[data-theme="dark"] .bell-panel__foot a { color: var(--gold-lt); }
[data-theme="dark"] .bell-panel__foot a:hover { color: var(--gold); }

/* --- Tab-Navigation (Profil) --------------------------------- */
.tabs-nav {
    display: flex; gap: 2px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tabs-nav a {
    padding: 10px 16px; font-size: 13px; color: var(--text-mid);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.tabs-nav a:hover { color: var(--navy); }
.tabs-nav a.is-active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 500; }
[data-theme="dark"] .tabs-nav a:hover { color: var(--gold-lt); }
[data-theme="dark"] .tabs-nav a.is-active { color: var(--gold-lt); }

/* --- Code-Box (für 2FA-Setup, Backup-Codes) ------------------ */
.code-box {
    font-family: var(--font-mono);
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: 6px; padding: 10px 14px; font-size: 14px;
    word-break: break-all;
}
.backup-codes {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px; margin: 14px 0;
}
.backup-codes code { font-family: var(--font-mono); background: var(--bg-muted); padding: 8px 12px; border-radius: 4px; text-align: center; }

.qr-box {
    background: #ffffff; padding: 14px; border: 1px solid var(--border);
    border-radius: 8px; line-height: 0;
    box-shadow: var(--shadow);
}
.qr-box svg { width: 260px; height: 260px; display: block; image-rendering: pixelated; }

/* --- Benachrichtigungs-History ------------------------------ */
.notify-list { display: flex; flex-direction: column; gap: 10px; }
.notify-item {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    transition: border-color .15s, box-shadow .15s;
}
.notify-item:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.notify-item--unread { border-left: 3px solid var(--gold); background: var(--gold-pale); }
[data-theme="dark"] .notify-item--unread { background: var(--gold-pale); }
.notify-item__icon { font-size: 20px; line-height: 1; padding-top: 2px; flex-shrink: 0; }
.notify-item__body { flex: 1; min-width: 0; }
.notify-item__head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    flex-wrap: wrap; margin-bottom: 4px;
}
.notify-item__title { font-weight: 500; color: var(--text); font-size: 14px; }
.notify-item__time { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.notify-item__text { color: var(--text-mid); font-size: 13px; line-height: 1.55; margin: 4px 0 8px; }
.notify-item__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.notify-item__btn {
    background: transparent; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 12px; padding: 2px 0;
    text-decoration: underline; text-underline-offset: 2px;
}
.notify-item__btn:hover { color: var(--navy); }
[data-theme="dark"] .notify-item__btn:hover { color: var(--gold-lt); }
.notify-item__btn--danger { color: var(--text-muted); }
.notify-item__btn--danger:hover { color: var(--error); }

/* --- Progressbar Profilvollstaendigkeit ---------------------- */
.progress-wrap { margin: 6px 0 10px; }
.progress {
    width: 100%; height: 8px; background: var(--bg-muted); border-radius: 999px; overflow: hidden;
}
.progress__bar { height: 100%; background: var(--gold); transition: width .4s; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

/* --- Placeholder-Note (CI §26) ------------------------------- */
.note-placeholder {
    background: var(--bg-muted); border-left: 3px solid var(--gold);
    padding: 16px; font-size: 13px; color: var(--text-muted);
    border-radius: 6px;
}

/* --- Grids --------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (min-width: 1100px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid { gap: 24px; }
}

/* --- Tabellen (Admin) ---------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--bg-muted); font-weight: 500; color: var(--text-mid); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--bg-muted); }

.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--bg-muted); color: var(--text-muted); }
.pill-admin   { background: var(--gold-pale); color: var(--gold-text); }
.pill-user    { background: var(--bg-muted); color: var(--text-mid); }
.pill-active  { background: var(--success-bg); color: var(--success); }
.pill-locked  { background: var(--error-bg); color: var(--error); }

/* --- Mobile-Sidebar (Cockpit + Admin) — von rechts ----------- */
.sidebar-toggle { display: none; }
.cockpit-sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 39;
}
/* Extras-Bereich in Cockpit/Admin-Sidebar (nur auf Mobile sichtbar) */
.sidebar-extras { display: none; }

@media (max-width: 900px) {
    .cockpit-shell { grid-template-columns: 1fr; }
    .cockpit-sidebar {
        position: fixed !important;
        top: var(--header-h) !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        max-height: none;
        transform: translateX(calc(100% + 10px));
        transition: transform .25s ease;
        z-index: 40; box-shadow: -4px 0 24px rgba(0,0,0,.15);
        overflow-y: auto;
    }
    .cockpit-sidebar.is-open { transform: translateX(0) !important; }
    .cockpit-sidebar.is-open + .cockpit-sidebar-backdrop,
    .cockpit-sidebar-backdrop.is-visible {
        display: block;
    }
    /* Cockpit-Hamburger: gleich wie Public-Hamburger (3 Linien, X-Animation) */
    .sidebar-toggle.header-hamburger {
        display: flex;
        width: 32px; height: 32px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        background: transparent;
        border: none;
        padding: 4px;
        cursor: pointer;
    }
    .sidebar-toggle.header-hamburger .hamburger-line {
        display: block;
        width: 22px; height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform .2s, opacity .2s;
    }
    .sidebar-toggle.header-hamburger.is-active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .sidebar-toggle.header-hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; }
    .sidebar-toggle.header-hamburger.is-active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* Cockpit Header: Header-Actions auf Mobile komplett verstecken - alles in die Sidebar */
    .site-header--cockpit .header-actions { display: none; }
    .header-profile-name { display: none; }

    /* Horizontale Overflows in Tabellen entschaerfen */
    .cockpit-main { overflow-x: hidden; }
    .card table, table.users-table, .admin-table { display: block; overflow-x: auto; }

    /* Sidebar-Extras (Theme, Profil, Benachrichtigungen, Logout) - mobile-only */
    .sidebar-extras {
        display: block;
        padding: 16px 0 8px;
        margin-top: 16px;
        border-top: 1px solid var(--border);
    }
    .sidebar-extras__sec {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--text-muted);
        margin-bottom: 8px;
    }
    .sidebar-extras ul { list-style: none; padding: 0; margin: 0; }
    .sidebar-extras li a,
    .sidebar-extras li button {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 14px;
        color: var(--text);
        font-size: 14px;
        text-decoration: none;
        background: none; border: none;
        width: 100%; text-align: left;
        cursor: pointer;
        border-radius: 6px;
    }
    .sidebar-extras li a:hover,
    .sidebar-extras li button:hover {
        background: var(--gold-pale);
        color: var(--navy);
    }
    .sidebar-extras__badge {
        margin-left: auto;
        background: var(--gold);
        color: var(--navy);
        font-size: 11px; font-weight: 600;
        padding: 1px 7px; border-radius: 10px;
    }
}
@media (max-width: 480px) {
    .cockpit-sidebar { max-width: 90vw !important; }
    .logo__text { font-size: 13px; }
}

/* --- Utility-Klassen ----------------------------------------- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* --- Login/Auth-Boxen ---------------------------------------- */
/* Positioniert die Auth-Karte vom oberen Rand aus (nicht vertikal zentriert),
   damit sie auf großen Bildschirmen nicht „unten schwebt" und mobil direkt unter
   dem Header sitzt. Horizontal weiterhin mittig. */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; }
@media (min-width: 900px) {
    /* Auf großen Screens etwas tieferen Abstand nach oben lassen, aber nicht volle Höhe */
    .auth-wrap { padding-top: 8vh; padding-bottom: 48px; }
}
@media (max-width: 760px) {
    .auth-wrap { padding: 14px 12px 24px; }
}
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .muted { margin-bottom: 24px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--navy); border-bottom: 1px solid transparent; }
.auth-footer a:hover { color: var(--gold); border-bottom-color: var(--gold); }
[data-theme="dark"] .auth-footer a { color: var(--gold-lt); }
[data-theme="dark"] .auth-footer a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* --- Cookie-Consent-Banner (Phase D) ------------------------- */
.bn-cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: var(--navy);
    color: #fff;
    padding: 16px 20px;
    box-shadow: 0 -6px 24px rgba(0,0,0,.18);
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    justify-content: space-between;
    font-size: 14px;
    line-height: 1.45;
}
.bn-cookie-banner.is-hidden { display: none; }
.bn-cookie-banner__text  { flex: 1 1 420px; }
.bn-cookie-banner__text a { color: var(--gold-lt); text-decoration: underline; }
.bn-cookie-banner__btns  { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bn-cookie-banner__btns .btn {
    min-width: 130px;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
}
.bn-cookie-banner__btns .btn-accept { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.bn-cookie-banner__btns .btn-accept:hover { background: var(--gold-lt); }
.bn-cookie-banner__btns .btn-reject { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.bn-cookie-banner__btns .btn-reject:hover { border-color: #fff; }

@media (max-width: 640px) {
    .bn-cookie-banner { padding: 14px 16px; }
    .bn-cookie-banner__btns { width: 100%; }
    .bn-cookie-banner__btns .btn { flex: 1 1 auto; }
}

/* --- Legal-Seiten (AGB/DSE/AVV/Widerruf) --------------------- */
.legal-page h2 { margin-top: 32px; font-size: 20px; color: var(--navy); }
.legal-page h3 { margin-top: 20px; font-size: 16px; color: var(--navy); }
.legal-page p  { line-height: 1.6; margin: 10px 0; }
.legal-page ul,
.legal-page ol { margin: 10px 0 10px 22px; line-height: 1.7; }
.legal-page code { background: var(--bg-muted); padding: 1px 6px; border-radius: 3px; font-size: 13px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 13px; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.legal-table thead th { background: var(--bg-muted); font-weight: 600; color: var(--navy); }
.legal-box { background: var(--bg-muted); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 6px; margin: 16px 0; font-size: 14px; }
[data-theme="dark"] .legal-page h2,
[data-theme="dark"] .legal-page h3,
[data-theme="dark"] .legal-table thead th { color: var(--gold-lt); }

/* --- Danger-Zone (Konto loeschen, Phase E) ------------------- */
.danger-zone {
    margin-top: 36px;
    border: 1px solid #dc2626;
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    background: #fff5f5;
}
.danger-zone h3 { color: #b91c1c; margin: 0 0 8px; font-size: 16px; }
.danger-zone p  { color: #7f1d1d; font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.btn-danger {
    background: #dc2626; color: #fff; border: 1px solid #dc2626;
    padding: 10px 18px; border-radius: 7px; font-weight: 500; font-size: 14px; cursor: pointer;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-danger[disabled], .btn-danger.is-disabled { opacity: .5; cursor: not-allowed; }
.delete-confirm-list {
    background: #fff; border: 1px solid #fecaca; border-radius: 6px;
    padding: 14px 16px; margin: 14px 0; color: #7f1d1d; font-size: 13px;
}
.delete-confirm-list li { margin: 4px 0; }
[data-theme="dark"] .danger-zone { background: #2a1212; border-color: #ef4444; }
[data-theme="dark"] .danger-zone h3 { color: #fca5a5; }
[data-theme="dark"] .danger-zone p  { color: #f1a3a3; }
[data-theme="dark"] .delete-confirm-list { background: #1f1515; border-color: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .ds-event-pill.is-reject { background: #2a1212; color: #fca5a5; border-color: #7f1d1d; }

/* --- Datenschutz-Panel im Admin ------------------------------ */
.ds-event-pill {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-muted);
}
.ds-event-pill.is-accept { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.ds-event-pill.is-reject { background: #fff5f5; color: #b91c1c; border-color: #fecaca; }

/* --- Header: einheitliche Button-Boxen (Theme / Glocke / Profil) --- */
.header-icon-btn {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.12);
    width: 36px; height: 36px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.header-icon-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.25);
    color: #fff;
}
.header-icon-btn .bell-badge {
    top: -4px; right: -4px;
}

.header-profile-btn {
    display: inline-flex; align-items: center; gap: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    transition: background .2s, border-color .2s;
    cursor: pointer;
}
.header-profile-btn:hover,
.header-profile-btn.is-active {
    background: rgba(201, 168, 76, .18);
    border-color: var(--gold);
}
.header-profile-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--gold); color: var(--navy);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 12px;
    font-family: var(--font-serif);
}
.header-profile-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Alte Theme-Toggle-Klasse im Fallback weiterhin behalten */
.theme-toggle { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }

/* --- Cockpit-Footer (schlanke Variante, nur Rechtslinks) ----- */
.cockpit-footer {
    background: var(--navy);
    color: rgba(255,255,255,.65);
    padding: 14px 22px;
    font-size: 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px 18px;
    border-top: 1px solid rgba(201, 168, 76, .18);
}
.cockpit-footer__links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cockpit-footer__links a { color: rgba(255,255,255,.70); transition: color .2s; }
.cockpit-footer__links a:hover { color: var(--gold); }
.cockpit-footer__status { display: flex; justify-content: center; }
.cockpit-footer__status .bn-status-badge { font-size: 10.5px; }
.cockpit-footer__status .bn-status-badge__dot { width: 7px; height: 7px; }
.cockpit-footer__copy { color: rgba(255,255,255,.45); text-align: right; }
.cockpit-footer__copy a { color: rgba(255,255,255,.55); transition: color .2s; }
.cockpit-footer__copy a:hover { color: var(--gold); }
@media (max-width: 768px) {
    .cockpit-footer {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cockpit-footer__status { justify-content: flex-start; }
    .cockpit-footer__copy { text-align: left; }
}

/* --- Message-Modal (Admin: Nachrichten-Vorschau) -------------
   HINWEIS: Hier wurde frueher .bn-modal genutzt — kollidierte mit dem
   neueren generischen Overlay-System (.bn-modal, ab Z. 1939). Deshalb
   umbenannt in .bn-msg-modal. Nur page_admin_notify.php nutzt das. */
.bn-msg-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 39, 68, .55);
    z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.bn-msg-modal-overlay.is-hidden { display: none; }
.bn-msg-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    padding: 28px;
    position: relative;
}
.bn-msg-modal h3 { margin: 0 0 10px; color: var(--navy); font-size: 20px; }
[data-theme="dark"] .bn-msg-modal h3 { color: var(--gold-lt); }
.bn-msg-modal .bn-msg-modal-meta { color: var(--text-muted); font-size: 12px; margin-bottom: 14px; }
.bn-msg-modal .bn-msg-modal-body { color: var(--text); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.bn-msg-modal-close {
    position: absolute; top: 10px; right: 10px;
    background: transparent; border: none;
    width: 32px; height: 32px; border-radius: 6px;
    font-size: 20px; line-height: 1; color: var(--text-muted); cursor: pointer;
}
.bn-msg-modal-close:hover { background: var(--bg-muted); color: var(--text); }

/* --- Admin-Notify: klickbare Recent-Row + Checkbox-Karte ----- */
.notify-row-clickable { cursor: pointer; transition: background .2s; }
.notify-row-clickable:hover { background: var(--gold-pale); }

.consent-card {
    background: var(--bg-muted);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 6px 0 4px;
}
.consent-card label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--text); }
.consent-card input[type=checkbox] { margin-top: 3px; }
.consent-card small { display: block; color: var(--text-muted); margin-top: 6px; font-size: 12px; }

/* [hidden] muss immer display:none ergeben – unabhaengig von .field/.mcard etc. */
[hidden] { display: none !important; }

/* --- Consent-Checkbox-Gruppe (Registrierung) ----------------- */
.consent-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 16px 0 20px;
    background: var(--bg-muted);
}
.consent-group legend {
    padding: 0 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.consent-check {
    display: grid;
    grid-template-columns: 20px 1fr;
    column-gap: 10px;
    align-items: start;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    cursor: pointer;
}
.consent-check + .consent-check { border-top: 1px solid var(--border); }
.consent-check input[type=checkbox] {
    width: 16px; height: 16px;
    margin: 2px 0 0 0;
    accent-color: var(--gold);
    flex-shrink: 0;
}
.consent-check span { min-width: 0; }

/* --- Profil-Spalten (Firma-Tab: 2 Spalten auf Desktop) --- */
.profile-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.profile-columns .mcard { margin: 0; height: 100%; }
@media (max-width: 860px) {
    .profile-columns { grid-template-columns: 1fr; }
}

/* --- Abrechnung: Layout + Summary-Box ----------------------- */
.billing-summary {
    background: var(--gold-pale);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 14px 0;
    font-size: 13px;
    color: var(--gold-text);
}
.billing-summary strong { color: var(--text); }
.vat-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 500;
    border: 1px solid var(--border); background: var(--bg-muted);
}
.vat-status.is-valid { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.vat-status.is-invalid { background: #fff5f5; color: #b91c1c; border-color: #fecaca; }
.vat-status.is-checking { background: var(--gold-pale); color: var(--gold-text); border-color: var(--gold); }

/* === Language Switcher (Header) ============================================ */
.bn-lang-switcher {
    position: relative;
    margin-right: 12px;
    user-select: none;
}
.bn-lang-switcher > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 7px;
    color: #fff;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.05);
}
.bn-lang-switcher > summary::-webkit-details-marker { display: none; }
.bn-lang-switcher > summary:hover { background: rgba(255,255,255,.12); }
.bn-lang-switcher[open] > summary { background: rgba(255,255,255,.15); }
.bn-lang-switcher ul {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 180px;
    list-style: none;
    padding: 6px;
    margin: 0;
    background: #fff;
    color: var(--navy, #1a2744);
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 60;
}
.bn-lang-switcher ul li { margin: 0; }
.bn-lang-switcher ul a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}
.bn-lang-switcher ul a:hover { background: rgba(201,168,76,.15); }

/* Language Detection Popup */
.bn-lang-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9990;
    max-width: 360px;
    animation: bn-popup-slide 0.3s ease-out;
}
.bn-lang-popup__body {
    background: var(--navy, #1a2744);
    color: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.bn-lang-popup__text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}
.bn-lang-popup__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bn-lang-popup__actions .btn-ghost {
    color: #fff;
    border-color: rgba(255,255,255,.3);
}
.bn-lang-popup__actions .btn-ghost:hover {
    border-color: rgba(255,255,255,.6);
}
@keyframes bn-popup-slide {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* --- Header-Login-Dropdown (nur Desktop) ----------------------- */
.header-login-dd { position: relative; display: inline-block; }
.header-login-dd__panel {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    padding: 18px; width: 320px; z-index: 1000;
}
.header-login-dd__panel .field { margin-bottom: 10px; }
.header-login-dd__panel .field label { font-size: 12.5px; color: var(--text-muted); }
.header-login-dd__panel .field input { width: 100%; }
.header-login-dd__foot { display:flex; justify-content:space-between; gap:8px; margin-top:10px; font-size:12.5px; }
.header-login-dd__foot a { color: var(--navy); }
[data-theme="dark"] .header-login-dd__foot a { color: var(--gold-lt); }
@media (max-width: 900px) {
    /* Mobile: kein Dropdown — Button führt direkt zur Login-Seite */
    .header-login-dd__panel { display: none !important; }
}

/* --- Footer-Disclaimer (kompakte Inline-Variante für nicht-DE Sprachen) --- */
.footer-disclaimer-inline {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.55);
    font-size: 12px; line-height: 1.55;
}
.footer-disclaimer-inline__link {
    color: var(--gold); margin-left: 4px; white-space: nowrap;
    text-decoration: underline;
}
.footer-disclaimer-inline__link:hover { color: var(--gold-lt); }

/* --- Footer-KI-Hinweis (alle Sprachen) --- */
.footer-ai-notice {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.45);
    font-size: 11px; line-height: 1.55;
}

/* --- Avatar & Logo (Bildverarbeitungs-Modul) ------------------ */
.bn-avatar { display:inline-flex; align-items:center; justify-content:center;
    overflow:hidden; font-family: var(--font-sans); font-weight:600;
    flex-shrink:0; vertical-align:middle; }
.bn-avatar picture { width:100%; height:100%; display:flex; }
.bn-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.bn-avatar-circle { border-radius:50%; }
.bn-avatar-rounded { border-radius:8px; }
.bn-avatar-initials { letter-spacing:0; }
.bn-logo { max-width: 240px; }

/* ==========================================================
   MOBILE-Verbesserungen für Admin + Cockpit (2026-04-17)
   Regel: alles muss unter 900 / 600 / 380 px bedienbar sein.
   ========================================================== */

/* Alle .data-Tabellen scrollen horizontal, kompakteres Padding */
@media (max-width: 900px) {
    table.data,
    table.bn-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    table.data th, table.data td,
    table.bn-table th, table.bn-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* KPI-Grids/Cards auf Mobile tight */
    .mcard { padding: 14px; }
    .mcard__title { font-size: 22px; }
    .grid { gap: 12px; }

    /* Main-Content Padding reduzieren */
    .cockpit-main { padding: 20px 14px; }

    /* Flex-Row mit vielen Aktionen: umbrechen lassen */
    .flex-between { flex-wrap: wrap; gap: 10px; }
    .flex.gap-2   { flex-wrap: wrap; }

    /* Inline-Admin-Formulare (set_role/status/impersonate etc) */
    .mcard form { flex-wrap: wrap; }
    .mcard form button { margin-top: 6px; }

    /* Headings kompakter */
    h1 { font-size: clamp(24px, 6vw, 32px); }

    /* Admin: Action-Button-Leiste umbrechen */
    .bn-admin-actions,
    .bn-inline-actions { flex-wrap: wrap; gap: 6px; }
}

/* Ganz kleine Screens: data-Tabellen zu Karten-Layout umbauen */
@media (max-width: 600px) {
    /* Tabellen auf Mobile: lieber horizontal scrollen als Wörter zerhacken.
       Zellen dürfen nur an Wortgrenzen umbrechen, nicht mitten in "INREMA GmbH". */
    table.data, table.bn-table { min-width: 560px; }
    table.data td, table.data th,
    table.bn-table td, table.bn-table th {
        white-space: normal; overflow-wrap: break-word; word-break: normal;
    }
    /* Nur code-Blöcke dürfen an jeder Stelle umbrechen (SHA-Hashes etc.) */
    table.data td code, table.bn-table td code { word-break: break-all; }

    /* Filter/Suche-Leisten: immer unter-/voreinander */
    .admin-filter-bar,
    .bn-toolbar { flex-direction: column; align-items: stretch; }
    .admin-filter-bar input, .admin-filter-bar select,
    .bn-toolbar input, .bn-toolbar select { width: 100%; }

    /* Button-Gruppen im Tabellen-Zellen stapeln */
    table.data td form, table.bn-table td form { display: block; }
    table.data td form + form, table.bn-table td form + form { margin-top: 4px; }

    /* Inline-Profile-Nav-Tabs bekommen Scroll */
    .tabs-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 4px;
    }
    .tabs-nav a { white-space: nowrap; flex-shrink: 0; }

    /* Auth-Karte: Register-Cols untereinander (bereits geregelt, nochmal absichern) */
    .register-cols { grid-template-columns: 1fr !important; }

    /* Files-Grid in Admin/Cockpit: enger */
    .files-grid { grid-template-columns: 1fr !important; gap: 12px; }

    /* Admin-Detail-Audit-Tabelle: bessere Details-Zelle */
    table.data td[style*="max-width"] { max-width: none !important; }
}

/* Mobile <480px: Sidebar-Breite + kleinere Typo. Sidebar bleibt rechts-seitig Off-Canvas;
   KEIN width:100% mehr (kollidierte mit is-open-transform); max-width wird bereits in
   der 480er-Regel oberhalb gesetzt (90vw). */
@media (max-width: 480px) {
    h1 { font-size: 22px; }
    .sec-title { font-size: 10px; }
    .mcard { padding: 12px; }
    .mcard__title { font-size: 20px; }
}

/* Mobile-Fixes für schlechte Spalten-Umbrüche in Admin-Tabellen (Nachtrag) */
@media (max-width: 600px) {
    /* Header NIE umbrechen — lieber scrollen */
    table.data th, table.bn-table th { white-space: nowrap; }
    /* Pills (user/admin/active/...) nie in der Mitte umbrechen */
    .pill { white-space: nowrap; display: inline-block; }
    /* Datum-Zellen: nicht auf Zeichen-Ebene zerhacken */
    table.data td[style*="white-space"],
    table.data td.nowrap { white-space: nowrap !important; }
}

/* Mobile: Hamburger gehört nach rechts, Logo links */
@media (max-width: 900px) {
    .site-header--cockpit .site-header__inner > div:first-child {
        flex: 1;
        justify-content: space-between;
    }
    .site-header--cockpit .sidebar-toggle.header-hamburger {
        order: 2;
        margin-left: auto;
    }
}

/* ============================================================
   BN Sentinel — Statusseite + Admin-Panel (mobilfähig)
   ============================================================ */
.bn-status { max-width: 960px; margin: 24px auto; padding: 0 14px; }
.bn-status-hero {
    margin: 18px 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--gray-lt, #f5f4f0);
    border-left: 4px solid var(--gold, #c9a84c);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.bn-status-hero strong { font-size: 18px; color: var(--navy, #1a2744); }
.bn-status-hero .small { width: 100%; }
.bn-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.bn-status-pill--ok   { background: #d7f5e2; color: #176a37; }
.bn-status-pill--warn { background: #fff3c4; color: #8a5a00; }
.bn-status-pill--err  { background: #fde0e0; color: #8a1919; }
[data-theme="dark"] .bn-status-pill--ok   { background: #1a3b26; color: #a6e5c0; }
[data-theme="dark"] .bn-status-pill--warn { background: #3b2f0a; color: #ffd97a; }
[data-theme="dark"] .bn-status-pill--err  { background: #3c1616; color: #ffb1b1; }
.bn-status-notice {
    margin: 14px 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff3c4;
    color: #5a3a00;
    border-left: 3px solid #c9a84c;
}
[data-theme="dark"] .bn-status-notice {
    background: #3b2f0a;
    color: #ffd97a;
}
.bn-sentinel-events td pre {
    background: var(--gray-lt, #f5f4f0);
    padding: 8px;
    border-radius: 6px;
    max-height: 240px;
    overflow: auto;
}
.bn-inline-det[open] summary { margin-bottom: 4px; }
.bn-inline-form .input { padding: 5px 8px; font-size: 13px; }

/* Mobile */
@media (max-width: 640px) {
    .bn-status-hero { padding: 14px; }
    .bn-sentinel-services, .bn-sentinel-events { font-size: 13px; }
    .filter-row .input, .filter-row .btn { width: 100%; }
}

/* BN Sentinel — KPI-Karten: immer in einer Reihe, auch auf Mobile */
.bn-sentinel-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 14px 0 22px;
}
.bn-sentinel-kpis .mcard { min-width: 0; }
.bn-sentinel-kpis .mcard__label {
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
}
.bn-sentinel-kpis .mcard__value {
    font-size: 22px;
    font-weight: 600;
}
@media (max-width: 520px) {
    .bn-sentinel-kpis { gap: 6px; }
    .bn-sentinel-kpis .mcard { padding: 8px 6px; text-align: center; }
    .bn-sentinel-kpis .mcard__label { font-size: 11px; }
    .bn-sentinel-kpis .mcard__value { font-size: 18px; }
}

/* ============================================================
   BN Sentinel — Ampel-Badge (Footer) + Ampel-Karte (FAQ/Status)
   ============================================================ */
.bn-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    vertical-align: middle;
    transition: opacity .15s;
}
.bn-status-badge:hover { opacity: .75; }
.bn-status-badge__dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}
.bn-status-badge--ok    { background: #d7f5e2; color: #176a37; }
.bn-status-badge--ok .bn-status-badge__dot    { background: #24a34c; }
.bn-status-badge--warn  { background: #fff3c4; color: #8a5a00; }
.bn-status-badge--warn .bn-status-badge__dot  { background: #e0a000; }
.bn-status-badge--err   { background: #fde0e0; color: #8a1919; }
.bn-status-badge--err .bn-status-badge__dot   { background: #c72020; animation: bn-pulse 1.6s infinite; }
@keyframes bn-pulse { 50% { opacity: .35; } }
[data-theme="dark"] .bn-status-badge--ok   { background: #1a3b26; color: #a6e5c0; }
[data-theme="dark"] .bn-status-badge--warn { background: #3b2f0a; color: #ffd97a; }
[data-theme="dark"] .bn-status-badge--err  { background: #3c1616; color: #ffb1b1; }
.footer-status-sep { margin: 0 8px; opacity: .5; }

/* Ampel-Karte (FAQ / Hilfe) */
.bn-status-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid var(--gold, #c9a84c);
    background: var(--gray-lt, #f5f4f0);
    margin: 12px 0;
}
.bn-status-card--ok   { border-left-color: #24a34c; }
.bn-status-card--warn { border-left-color: #e0a000; }
.bn-status-card--err  { border-left-color: #c72020; }
.bn-status-card__dot { font-size: 34px; line-height: 1; }
.bn-status-card__label { font-weight: 600; font-size: 16px; color: var(--navy, #1a2744); }
[data-theme="dark"] .bn-status-card__label { color: var(--gold-lt, #e5cf92); }
.bn-status-card__msg { font-size: 14px; line-height: 1.45; margin-top: 3px; }
.bn-status-card__link { display: inline-block; margin-top: 6px; font-size: 13px; text-decoration: underline; }

/* Ampel-Hero auf /status */
.bn-status-lamp {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px;
    border-radius: 16px;
    margin: 20px 0;
    background: var(--gray-lt, #f5f4f0);
    border-left: 6px solid var(--gold, #c9a84c);
}
.bn-status-lamp--ok   { border-left-color: #24a34c; }
.bn-status-lamp--warn { border-left-color: #e0a000; }
.bn-status-lamp--err  { border-left-color: #c72020; }
.bn-status-lamp__dot { font-size: 54px; line-height: 1; }
.bn-status-lamp__label { font-size: 22px; font-weight: 600; color: var(--navy, #1a2744); }
[data-theme="dark"] .bn-status-lamp__label { color: var(--gold-lt, #e5cf92); }
.bn-status-lamp__msg { margin-top: 6px; font-size: 15px; line-height: 1.5; }

@media (max-width: 540px) {
    .bn-status-lamp { flex-direction: column; text-align: center; padding: 20px; gap: 10px; }
    .bn-status-card { flex-direction: column; text-align: center; }
}

/* Admin-Sidebar: Icons + gruppierte Navigation */
.side-nav a { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.side-nav__icon {
    display: inline-flex;
    width: 22px; height: 22px;
    font-size: 16px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.side-nav a.is-disabled,
.side-nav__item.is-disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
}
.side-nav__badge--soon {
    background: var(--bg-muted) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border);
}

/* CRM Settings-Seite */
.crm-settings-section {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 20px 22px; margin-bottom: 18px;
}
.crm-settings-section h2 { margin: 0 0 4px; font-size: 1.05rem; }
.crm-settings-section.is-upcoming { opacity: .85; }
.crm-settings-hint { color: var(--text-muted); font-size: 13px; margin: 0 0 16px; }
.crm-toggle-list { display: flex; flex-direction: column; gap: 10px; }
.crm-toggle {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; background: var(--bg); transition: border-color .15s;
}
.crm-toggle:hover { border-color: var(--gold); }
.crm-toggle input[type="checkbox"] { margin-top: 2px; }
.crm-toggle > span { display: flex; flex-direction: column; gap: 2px; }
.crm-toggle small { color: var(--text-muted); font-size: 12px; }
.crm-toggle-sub { margin: -4px 0 4px 36px; max-width: 180px; }
.crm-toggle-sub label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: block; }
/* Toggle mit Inline-Feld rechts (z.B. Geburtstag + Vorlauf-Tage) */
.crm-toggle--with-sub { flex-wrap: wrap; }
.crm-toggle--with-sub .crm-toggle-main { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.crm-toggle-inline-field {
    display: flex; align-items: center; gap: 8px;
    padding-left: 16px; margin-left: auto;
    border-left: 1px solid var(--border);
}
.crm-toggle-inline-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.crm-toggle-inline-field input[type="number"] { width: 80px; }
@media (max-width: 600px) {
    .crm-toggle-inline-field {
        width: 100%; margin-left: 36px;
        padding-left: 0; border-left: 0;
        border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 6px;
    }
}
.crm-settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.crm-badge-soon {
    font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 99px;
    background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border);
    text-transform: uppercase; letter-spacing: .5px; margin-left: 8px; vertical-align: middle;
}
.crm-upcoming-card {
    background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; padding: 14px 18px;
}
/* Telegram-Panel */
.crm-tg-panel {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 16px 18px; border-radius: 10px;
    background: var(--bg); border: 1px solid var(--border);
}
.crm-tg-panel.is-connected { background: #eef9f1; border-color: #b6dfc1; }
[data-theme="dark"] .crm-tg-panel.is-connected { background: #1d3528; border-color: #2d5a3c; }
.crm-tg-panel__info { flex: 1 1 260px; }
.crm-tg-panel__info strong { display: block; margin-bottom: 4px; }
.crm-tg-panel__info p { margin: 0; }
.crm-tg-panel__actions { flex: 0 0 auto; }
.crm-tg-since { color: var(--text-muted); font-size: 12px; }

/* Telegram-Link-Box (Kontakt-Einladung) */
.crm-tg-link-box {
    margin-top: 12px; padding: 14px 16px;
    background: var(--bg-muted); border: 1px dashed var(--border); border-radius: 10px;
}
.crm-tg-link-box label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.crm-tg-link-row { display: flex; gap: 8px; align-items: stretch; }
.crm-tg-link-row input { flex: 1; padding: 8px 10px; font-size: 13px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); font-family: monospace; }
@media (max-width: 500px) { .crm-tg-link-row { flex-direction: column; } .crm-tg-link-row .btn { width: 100%; } }
.crm-upcoming-card ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 13px; }

/* Activity-Modal: Contact-Picker */
.crm-act-contact-picker { margin-bottom: 12px; }
.crm-act-contact-chip { margin-top: 6px; }
.crm-act-contact-chip .crm-tag-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gold-pale); color: var(--gold-text); border-radius: 99px;
    padding: 4px 10px; font-size: 13px;
}
.crm-act-contact-chip button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 16px; line-height: 1; padding: 0 2px; }

/* Cmd+K Overlay */
.cmd-k-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 12vh;
}
.cmd-k-overlay.is-hidden { display: none; }
.cmd-k-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.cmd-k-box {
    position: relative; z-index: 1; width: 100%; max-width: 640px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.3);
    display: flex; flex-direction: column; max-height: 70vh;
}
.cmd-k-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cmd-k-input { flex: 1; border: 0 !important; background: transparent !important; outline: none; font-size: 16px; padding: 6px 2px !important; }
.cmd-k-input:focus { box-shadow: none !important; }
.cmd-k-kbd {
    font-size: 11px; padding: 3px 7px; border-radius: 6px;
    background: var(--bg-muted); border: 1px solid var(--border); color: var(--text-muted);
}
.cmd-k-results { flex: 1; overflow-y: auto; padding: 8px 0; }
.cmd-k-section-label { padding: 10px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.cmd-k-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 18px;
    text-decoration: none; color: var(--text); transition: background .1s;
}
.cmd-k-item:hover { background: var(--bg-muted); }
.cmd-k-icon { font-size: 18px; }
.cmd-k-label { display: flex; flex-direction: column; }
.cmd-k-label small { color: var(--text-muted); font-size: 12px; }
.cmd-k-empty { padding: 28px 18px; color: var(--text-muted); text-align: center; font-size: 14px; }
.cmd-k-foot { padding: 10px 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); text-align: center; }

/* Merge-Table */
.crm-merge-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); margin-top: 10px; }
.crm-merge-table th, .crm-merge-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
.crm-merge-table thead th { background: var(--bg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.crm-merge-opt { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.crm-merge-opt input[type="radio"] { margin-top: 3px; }
.crm-merge-keep { background: var(--gold-pale); border: 1px solid var(--gold); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.crm-merge-keep label { font-weight: 600; display: block; margin-bottom: 8px; }
.crm-merge-keep-opts { display: flex; gap: 16px; flex-wrap: wrap; }
.crm-merge-keep-opts label { font-weight: normal; display: inline-flex; align-items: center; gap: 6px; }

/* Widget collapse */
.crm-widget .widget__head { user-select: none; }
.crm-widget.is-collapsed .widget__body { display: none; }
.crm-widget.is-collapsed { min-height: 0; }

/* Wide Modal + Collapsible Sections */
.crm-modal__box--wide { max-width: 760px; }
.crm-more-toggle { margin: 12px 0 0; display: inline-flex; align-items: center; gap: 6px; }
.crm-more-toggle__icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center;
    background: var(--gold-pale); color: var(--gold-text); border-radius: 4px; font-weight: 700; }
.crm-modal-extra { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.crm-modal-section { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden; }
.crm-modal-section > summary {
    cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px;
    list-style: none; user-select: none;
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-muted);
}
.crm-modal-section > summary::before {
    content: '›'; display: inline-block; transform: rotate(0deg); transition: transform .15s;
    font-size: 18px; color: var(--text-muted);
}
.crm-modal-section[open] > summary::before { transform: rotate(90deg); }
.crm-modal-section > summary::-webkit-details-marker { display: none; }
.crm-modal-section > .crm-form-grid { padding: 14px 16px 16px; }
.form-hint { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.side-nav__badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--gold-lt, #e5cf92);
    color: var(--navy, #1a2744);
    letter-spacing: .5px;
    text-transform: uppercase;
}
[data-theme="dark"] .side-nav__badge { background: #3b2f0a; color: #ffd97a; }
.side-nav__sec {
    margin-top: 14px !important;
    margin-bottom: 4px !important;
    font-size: 10.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .65;
}

/* Badge im Public-Footer (dunkler Navy-BG): Spezifität über .site-footer a erhöhen */
.site-footer a.bn-status-badge.bn-status-badge--ok,
.cockpit-footer a.bn-status-badge.bn-status-badge--ok,
.site-footer a.bn-status-badge.bn-status-badge--ok:hover,
.cockpit-footer a.bn-status-badge.bn-status-badge--ok:hover {
    background: #d7f5e2; color: #176a37;
}
.site-footer a.bn-status-badge.bn-status-badge--warn,
.cockpit-footer a.bn-status-badge.bn-status-badge--warn,
.site-footer a.bn-status-badge.bn-status-badge--warn:hover,
.cockpit-footer a.bn-status-badge.bn-status-badge--warn:hover {
    background: #fff3c4; color: #8a5a00;
}
.site-footer a.bn-status-badge.bn-status-badge--err,
.cockpit-footer a.bn-status-badge.bn-status-badge--err,
.site-footer a.bn-status-badge.bn-status-badge--err:hover,
.cockpit-footer a.bn-status-badge.bn-status-badge--err:hover {
    background: #fde0e0; color: #8a1919;
}
.site-footer a.bn-status-badge:hover,
.cockpit-footer a.bn-status-badge:hover {
    opacity: .85;
}

/* ============================================================
   BN Image Editor — Modal für Zuschnitt / Drehen (Cropper.js)
   ============================================================ */
.bn-img-ed { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.bn-img-ed[hidden] { display: none !important; }
.bn-img-ed__backdrop { position: absolute; inset: 0; background: rgba(15,20,38,.78); backdrop-filter: blur(2px); }
.bn-img-ed__dialog {
    position: relative;
    width: min(720px, 95vw);
    max-height: 92vh;
    background: var(--bg, #fff);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    overflow: hidden;
}
[data-theme="dark"] .bn-img-ed__dialog { background: var(--navy, #1a2744); color: var(--text, #e9eaf0); }
.bn-img-ed__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.bn-img-ed__head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.bn-img-ed__close {
    background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer;
    color: inherit; opacity: .6; padding: 4px 8px;
}
.bn-img-ed__close:hover { opacity: 1; }
.bn-img-ed__stage {
    background: #1f1f1f;
    padding: 8px;
    min-height: 320px;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bn-img-ed__stage img { max-width: 100%; display: block; }
.bn-img-ed__tools {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 10px 12px;
    justify-content: center;
    background: var(--bg-muted, #f5f4f0);
    border-top: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.06);
}
[data-theme="dark"] .bn-img-ed__tools { background: rgba(255,255,255,.04); }
.bn-img-ed__tools .btn { padding: 4px 10px; font-size: 13px; min-width: 40px; }
.bn-img-ed__foot {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.bn-img-ed__hint { flex: 1; min-width: 180px; }
.bn-img-ed__actions { display: flex; gap: 8px; }

/* Circle-Preview (Avatar) */
.bn-img-ed--circle .cropper-view-box,
.bn-img-ed--circle .cropper-face { border-radius: 50%; }

/* Mobile */
@media (max-width: 560px) {
    .bn-img-ed__dialog { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
    .bn-img-ed__stage { max-height: none; flex: 1; }
    .bn-img-ed__tools .btn { min-width: 36px; padding: 4px 8px; }
    .bn-img-ed__foot { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
    .bn-img-ed__actions { justify-content: space-between; }
}

/* Klickbares Overlay auf bestehenden Avatar/Logo-Anzeigen */
.bn-img-editable {
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.bn-img-editable::after {
    content: attr(data-edit-label);
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    color: #fff;
    background: rgba(15,20,38,.55);
    opacity: 0;
    border-radius: inherit;
    transition: opacity .15s;
    pointer-events: none;
}
.bn-img-editable:hover::after,
.bn-img-editable:focus-visible::after { opacity: 1; }

/* ============================================================
   BN Modal — generisches Overlay (z.B. Team-Verwaltung)
   ============================================================ */
.bn-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    animation: bn-modal-in .18s ease-out;
}
.bn-modal[hidden] { display: none !important; }
@keyframes bn-modal-in { from { opacity: 0; } to { opacity: 1; } }
.bn-modal__backdrop { position: absolute; inset: 0; background: rgba(15,20,38,.72); backdrop-filter: blur(2px); }
.bn-modal__dialog {
    position: relative;
    width: min(560px, 95vw);
    max-height: 92vh;
    background: var(--bg, #fff);
    color: var(--text, #1a1a1a);
    border-radius: 14px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    overflow: hidden;
    animation: bn-modal-pop .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes bn-modal-pop { from { transform: scale(.96) translateY(6px); opacity: .6; } to { transform: none; opacity: 1; } }
[data-theme="dark"] .bn-modal__dialog { background: var(--navy, #1a2744); color: var(--text, #e9eaf0); }
.bn-modal__head {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .bn-modal__head { border-bottom-color: rgba(255,255,255,.08); }
.bn-modal__head-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.bn-modal__head h3 { margin: 0; color: var(--navy, #1a2744); }
[data-theme="dark"] .bn-modal__head h3 { color: var(--gold-lt, #e5cf92); }
.bn-modal__close {
    background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer;
    color: inherit; opacity: .55; padding: 2px 8px; border-radius: 6px;
}
.bn-modal__close:hover { opacity: 1; background: rgba(0,0,0,.05); }
[data-theme="dark"] .bn-modal__close:hover { background: rgba(255,255,255,.08); }

.bn-modal__body { padding: 18px; overflow-y: auto; flex: 1; }
.bn-modal__section {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-muted, #f8f7f2);
    margin-bottom: 14px;
}
[data-theme="dark"] .bn-modal__section { background: rgba(255,255,255,.04); }
.bn-modal__section:last-child { margin-bottom: 0; }
.bn-modal__sec-title {
    font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--navy, #1a2744); margin-bottom: 4px;
}
[data-theme="dark"] .bn-modal__sec-title { color: var(--gold-lt, #e5cf92); }
.bn-modal__danger {
    background: rgba(200,30,30,.06);
    border: 1px solid rgba(200,30,30,.18);
}
[data-theme="dark"] .bn-modal__danger { background: rgba(220,60,60,.10); border-color: rgba(220,60,60,.25); }
.bn-modal__danger .bn-modal__sec-title { color: #b42318; }
[data-theme="dark"] .bn-modal__danger .bn-modal__sec-title { color: #ffa59a; }
.bn-modal__foot {
    padding: 12px 18px;
    border-top: 1px solid rgba(0,0,0,.08);
    display: flex; justify-content: flex-end; gap: 8px;
}
[data-theme="dark"] .bn-modal__foot { border-top-color: rgba(255,255,255,.08); }

/* Mobile Vollbild */
@media (max-width: 560px) {
    .bn-modal__dialog { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* Label + Select innerhalb von Modal */
.bn-modal .bn-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.bn-modal .bn-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 6px;
    background: var(--bg, #fff);
    color: inherit;
    font-size: 14px;
}
[data-theme="dark"] .bn-modal .bn-select { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); }

/* Toggle-Switch für Module-Zugriffe */
.bn-toggle-list { display: grid; grid-template-columns: 1fr; gap: 6px; }
.bn-toggle {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    font-size: 14px;
}
.bn-toggle:hover { background: rgba(0,0,0,.04); }
[data-theme="dark"] .bn-toggle:hover { background: rgba(255,255,255,.04); }
.bn-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.bn-toggle__switch {
    position: relative;
    width: 38px; height: 22px;
    background: rgba(0,0,0,.2);
    border-radius: 999px;
    transition: background .15s;
    flex-shrink: 0;
}
.bn-toggle__switch::before {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .18s ease-out;
    box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.bn-toggle input:checked + .bn-toggle__switch { background: var(--gold, #c9a84c); }
.bn-toggle input:checked + .bn-toggle__switch::before { transform: translateX(16px); }
.bn-toggle input:focus-visible + .bn-toggle__switch { outline: 2px solid var(--gold, #c9a84c); outline-offset: 2px; }
.bn-toggle__label { flex: 1; }

/* =========================================================================
   BN Assist Chat-Widget (P3)
   ========================================================================= */
.bn-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9500;
    font-family: inherit;
}
.bn-chat__bubble {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--gold, #c9a84c);
    color: var(--navy, #1a2744);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s;
}
.bn-chat__bubble:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.bn-chat__bubble:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bn-chat.is-open .bn-chat__bubble { display: none; }

.bn-chat__panel {
    position: fixed;
    right: 18px; bottom: 18px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: min(560px, calc(100vh - 80px));
    background: #fff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    display: flex; flex-direction: column;
    overflow: hidden;
    z-index: 9600;
}
[data-theme="dark"] .bn-chat__panel { background: #1f2537; color: #e9eaec; }
.bn-chat__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px;
    background: var(--navy, #1a2744);
    color: #fff;
}
.bn-chat__head { gap: 6px; }
.bn-chat__head > strong { flex: 1; }
.bn-chat__close, .bn-chat__clear {
    background: transparent; border: none; color: #fff;
    line-height: 1; cursor: pointer; padding: 4px 7px; border-radius: 4px;
}
.bn-chat__close { font-size: 22px; }
.bn-chat__clear { font-size: 16px; opacity: .75; }
.bn-chat__close:hover, .bn-chat__clear:hover { background: rgba(255,255,255,.1); opacity: 1; }

.bn-chat__privacy {
    font-size: 10px; color: var(--muted, #888);
    margin: 0; padding: 4px 12px 6px;
    border-top: 1px solid var(--border, #e5e7eb);
    line-height: 1.4;
}

.bn-chat__log {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
    background: #f7f6f2;
}
[data-theme="dark"] .bn-chat__log { background: #161b2a; }

.bn-chat__msg { max-width: 85%; }
.bn-chat__msg--user { align-self: flex-end; }
.bn-chat__msg--ai   { align-self: flex-start; }
.bn-chat__bubble-msg {
    padding: 8px 12px; border-radius: 12px;
    font-size: 14px; line-height: 1.45;
    word-wrap: break-word;
}
.bn-chat__msg--user .bn-chat__bubble-msg {
    background: var(--gold, #c9a84c); color: #1a2744;
    border-bottom-right-radius: 4px;
}
.bn-chat__msg--ai .bn-chat__bubble-msg {
    background: #fff; color: #1a1a1a;
    border: 1px solid rgba(0,0,0,.08);
    border-bottom-left-radius: 4px;
}
[data-theme="dark"] .bn-chat__msg--ai .bn-chat__bubble-msg {
    background: #2a3149; color: #e9eaec; border-color: rgba(255,255,255,.08);
}
.bn-chat__bubble-msg p { margin: 0 0 .5em; }
.bn-chat__bubble-msg p:last-child { margin-bottom: 0; }
.bn-chat__bubble-msg a { color: #1a4a8a; text-decoration: underline; }
[data-theme="dark"] .bn-chat__bubble-msg a { color: #7db0ff; }
.bn-chat__bubble-msg code { background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 3px; font-size: 12.5px; }

.bn-chat__feedback { margin-top: 4px; display: flex; gap: 4px; }
.bn-chat__feedback button {
    background: transparent; border: none;
    font-size: 16px; cursor: pointer;
    padding: 2px 6px; border-radius: 4px; opacity: .6;
}
.bn-chat__feedback button:hover { opacity: 1; background: rgba(0,0,0,.05); }
.bn-chat__feedback button.is-active { opacity: 1; background: rgba(201,168,76,.3); }

.bn-chat__action {
    margin-top: 6px; padding: 10px;
    background: rgba(201,168,76,.12);
    border: 1px solid rgba(201,168,76,.35);
    border-radius: 8px;
    font-size: 13px;
}
.bn-chat__action strong { display: block; margin-bottom: 4px; }
.bn-chat__action p { margin: 0 0 8px; }
.bn-chat__action-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.bn-chat__escalate-btn {
    margin-top: 8px;
    background: var(--navy, #1a2744); color: #fff;
    border: none; padding: 6px 12px;
    border-radius: 6px; cursor: pointer;
    font-size: 13px;
}
.bn-chat__escalate-btn:hover { background: #23335a; }

.bn-chat__form {
    display: flex; gap: 6px;
    padding: 10px; border-top: 1px solid rgba(0,0,0,.08);
    background: #fff;
}
[data-theme="dark"] .bn-chat__form { background: #1f2537; border-color: rgba(255,255,255,.08); }
.bn-chat__input {
    flex: 1;
    resize: none;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-size: 16px;
    background: #fff;
    color: inherit;
}
[data-theme="dark"] .bn-chat__input { background: #161b2a; border-color: rgba(255,255,255,.15); color: #e9eaec; }
.bn-chat__input:focus { outline: 2px solid var(--gold, #c9a84c); outline-offset: 1px; }
.bn-chat__send {
    background: var(--gold, #c9a84c); color: #1a2744;
    border: none; border-radius: 8px;
    padding: 0 14px; font-weight: 500;
    cursor: pointer;
}
.bn-chat__send:hover { background: #d4b557; }

.bn-chat__escalate-wrap { padding: 0 10px 10px; }
.bn-chat__escalate-wrap form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.bn-chat__escalate-wrap input,
.bn-chat__escalate-wrap textarea {
    border: 1px solid rgba(0,0,0,.15); border-radius: 6px; padding: 7px 9px;
    font: inherit; font-size: 13px;
    background: #fff; color: inherit;
}
[data-theme="dark"] .bn-chat__escalate-wrap input,
[data-theme="dark"] .bn-chat__escalate-wrap textarea {
    background: #161b2a; border-color: rgba(255,255,255,.15); color: #e9eaec;
}
.bn-chat__escalate-wrap textarea { min-height: 60px; resize: vertical; }
.bn-chat__escalate-sent { color: #2d7a4f; font-size: 13px; text-align: center; margin: 8px 0; }
.bn-chat__error { color: #b42318; font-size: 13px; margin-top: 4px; }

@media (max-width: 480px) {
    .bn-chat__panel {
        top: 0; right: 0; bottom: 0; left: 0;
        width: 100%; max-width: none;
        height: 100%;
        border-radius: 0;
    }
}

/* ============================================================
   BN Redaktion — Blog-Engine
   ============================================================ */
.ed-hero { padding: 2.5rem 0 1.5rem; }
.ed-hero__eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 12px; opacity: .7; margin: 0 0 .75rem; }
.ed-hero__card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.ed-hero__media img, .ed-hero__media picture { width: 100%; height: auto; border-radius: 12px; display: block; }
.ed-hero__title { font-family: 'Cormorant Garamond', 'Georgia', serif; font-weight: 500; font-size: clamp(1.8rem, 3vw + 1rem, 3rem); line-height: 1.1; margin: .5rem 0 .75rem; }
.ed-hero__title a { color: inherit; text-decoration: none; }
.ed-hero__teaser { font-size: 1.1rem; line-height: 1.55; opacity: .88; margin: 0 0 1rem; }
.ed-section-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.8rem; margin: 1rem 0 1.5rem; }
.ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.ed-card { background: var(--card-bg, #fff); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.ed-card__media img, .ed-card__media picture { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ed-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.ed-card__title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.35rem; line-height: 1.2; margin: 0; }
.ed-card__title a { color: inherit; text-decoration: none; }
.ed-card__title a:hover { text-decoration: underline; }
.ed-card__teaser { font-size: .95rem; line-height: 1.5; opacity: .8; margin: 0; }
.ed-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(201, 168, 76, .15); color: var(--gold, #c9a84c); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; font-weight: 600; }
.ed-meta { font-size: 13px; opacity: .65; margin: .25rem 0 0; }
.ed-meta time { font-variant-numeric: tabular-nums; }

.ed-article { padding: 2rem 0 3rem; }
.ed-article__header { max-width: 820px; margin: 0 auto; padding-bottom: 1.5rem; text-align: left; }
.ed-article__title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: clamp(2rem, 3vw + 1rem, 3.2rem); line-height: 1.1; margin: .75rem 0 1rem; }
.ed-article__lead { font-size: 1.25rem; line-height: 1.5; opacity: .9; font-style: italic; margin: 0 0 1rem; }
.ed-article__hero { margin: 1rem auto 2rem; max-width: 1200px; }
.ed-article__hero img, .ed-article__hero picture { width: 100%; height: auto; display: block; border-radius: 8px; }
.ed-article__body { max-width: 680px; margin: 0 auto; font-size: 18px; line-height: 1.7; }
.ed-article__body h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 2rem; margin: 2.5rem 0 1rem; line-height: 1.15; }
.ed-article__body h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.5rem; margin: 2rem 0 .8rem; }
.ed-article__body p { margin: 0 0 1.1rem; }
.ed-article__body a:not(.btn) { color: var(--gold, #c9a84c); text-decoration: underline; text-underline-offset: 3px; }
.ed-article__body a.btn { text-decoration: none; }
.ed-article__body a.btn-gold { color: var(--navy); }
.ed-article__body a.btn-gold:hover { color: var(--navy); background: var(--gold-lt); }
.ed-article__body a.btn-ghost { color: var(--navy); border: 1px solid var(--border); background: transparent; }
[data-theme="dark"] .ed-article__body a.btn-ghost { color: var(--gold-lt); }
.ed-article__body a.btn-ghost:hover { background: var(--bg-muted); color: var(--navy); }
.ed-article__body blockquote { border-left: 3px solid var(--gold, #c9a84c); margin: 1.5rem 0; padding: .5rem 0 .5rem 1.2rem; font-style: italic; opacity: .92; }
.ed-article__body ul, .ed-article__body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.ed-article__body li { margin: .3rem 0; }
.ed-article__body img, .ed-article__body picture { max-width: 100%; height: auto; border-radius: 6px; }
.ed-article__body figure { margin: 1.5rem 0; }
.ed-article__body figcaption { font-size: 13px; opacity: .65; margin-top: .5rem; text-align: center; }
.ed-article__body pre { background: rgba(0,0,0,.04); padding: 1rem 1.2rem; border-radius: 6px; overflow-x: auto; font-family: 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 14px; }
.ed-article__body code { background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 3px; font-family: 'JetBrains Mono', Menlo, Consolas, monospace; font-size: .9em; }
.ed-article__body pre code { background: transparent; padding: 0; }
.ed-article__body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.ed-article__body th, .ed-article__body td { border: 1px solid rgba(0,0,0,.1); padding: 8px 12px; text-align: left; }

.ed-article__tags { max-width: 680px; margin: 2rem auto 0; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: 14px; }
.ed-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; font-size: 13px; }
.ed-chip:hover { background: rgba(0,0,0,.1); }
.ed-breadcrumb { font-size: 13px; opacity: .7; margin-bottom: .5rem; display: flex; gap: 6px; flex-wrap: wrap; }
.ed-breadcrumb a { color: inherit; text-decoration: none; }

@media (max-width: 900px) {
    .ed-hero__card { grid-template-columns: 1fr; }
    .ed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .ed-grid { grid-template-columns: 1fr; }
    .ed-article__body { font-size: 17px; }
}

/* ============================================================
   BN Redaktion — Admin (CI-konform)
   ============================================================ */

/* Toolbar über dem Edit-Formular */
.ed-edit-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 18px; }

/* Panel-Layout: linke Spalte = Inhalt, rechte Spalte = Sidebar */
.ed-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ed-edit-sidebar { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) {
    .ed-edit-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* Admin-Panel (Basis ist .mcard; Head + Form-Wrapper) */
.ed-admin-panel { padding: 20px 22px; }
.ed-admin-panel__head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px; margin: 0 0 14px;
}
.ed-admin-panel__title {
    font-family: var(--font-serif); font-weight: 600;
    color: var(--navy); font-size: 17px; margin: 0;
}
[data-theme="dark"] .ed-admin-panel__title { color: var(--gold-lt); }
.ed-admin-panel__sub { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.ed-admin-panel__summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
    font-family: var(--font-serif); font-weight: 600; font-size: 15px; color: var(--navy);
}
[data-theme="dark"] .ed-admin-panel__summary { color: var(--gold-lt); }
.ed-admin-panel__summary::before { content: "▸"; font-size: 11px; color: var(--gold); transition: transform .2s; }
details[open] > .ed-admin-panel__summary::before { transform: rotate(90deg); }

/* Admin-Form (lockerer Spacing-Rhythmus über .field) */
.ed-admin-form .field { margin-bottom: 14px; }
.ed-admin-form .field-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-mid); }
.ed-admin-form .form-actions {
    margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.ed-admin-form textarea.ed-html-editor {
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 13px; line-height: 1.55;
    background: var(--bg-muted);
    min-height: 320px;
}

/* Filter-Bar mit Feld-Labels im CI-Stil */
.ed-filter-bar {
    display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end;
    padding: 16px 18px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); margin: 0 0 20px;
}
.ed-filter-bar .field label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.ed-filter-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }

/* Sprach-Chip (wiederverwendbar) */
.ed-lang-chip {
    display: inline-block; min-width: 26px; text-align: center;
    padding: 2px 8px; border-radius: 4px;
    background: var(--gold-pale); color: var(--gold-text);
    border: 1px solid rgba(201, 168, 76, .35);
    font-size: 11px; font-weight: 600; letter-spacing: .04em;
    font-family: var(--font-sans);
}

/* Sprach-Tabs (CI-Akzent: Unterstrich in Gold) */
.ed-lang-tabs {
    display: flex; gap: 2px; margin: 6px 0 18px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.ed-lang-tab {
    appearance: none; background: transparent; border: 0;
    padding: 10px 16px 10px; cursor: pointer;
    font: inherit; color: var(--text-muted);
    border-bottom: 2px solid transparent;
    display: inline-flex; align-items: center; gap: 8px;
    transition: color .2s, border-color .2s;
}
.ed-lang-tab:hover { color: var(--navy); }
[data-theme="dark"] .ed-lang-tab:hover { color: var(--gold-lt); }
.ed-lang-tab.is-active {
    color: var(--navy); border-bottom-color: var(--gold); font-weight: 500;
}
[data-theme="dark"] .ed-lang-tab.is-active { color: var(--gold-lt); }
.ed-lang-tab__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); display: inline-block;
}
.ed-lang-tab.is-draft .ed-lang-tab__dot { background: var(--gold); }
.ed-lang-tab__missing { color: var(--text-muted); font-size: 18px; line-height: 0; }

.ed-lang-panel { display: none; }
.ed-lang-panel.is-active { display: block; }

/* Status-Pillen für Beitragsstatus (eigene Farben) */
.pill-ed-draft     { background: var(--bg-muted);   color: var(--text-mid); }
.pill-ed-scheduled { background: var(--gold-pale);  color: var(--gold-text); }
.pill-ed-published { background: var(--success-bg); color: var(--success); }
.pill-ed-archived  { background: var(--error-bg);   color: var(--error);   opacity: .8; }

/* Token-Anzeige */
.ed-token-row {
    display: flex; gap: 8px; align-items: center; margin: 0 0 18px;
    flex-wrap: wrap;
}
.ed-token {
    flex: 1; min-width: 0;
    background: var(--navy); color: #fff;
    padding: 10px 14px; border-radius: 7px;
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 13px; letter-spacing: .02em;
    overflow-x: auto; white-space: nowrap;
}
[data-theme="dark"] .ed-token { background: #0b1222; }
.ed-endpoint {
    display: inline-block;
    background: var(--bg-muted); padding: 6px 10px; border-radius: 5px;
    font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 12px; color: var(--text);
}

/* 2er-Grid für kompakte Settings */
.ed-admin-grid {
    display: grid; gap: 18px;
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
    .ed-admin-grid { grid-template-columns: 1.15fr 1fr; }
}

/* Thumbnail-Rahmen im Sidebar-Panel */
.ed-thumb { margin: 0 0 10px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
.ed-thumb img, .ed-thumb picture { display: block; width: 100%; height: auto; }

/* Pagination */
.ed-pagination { display: flex; gap: 6px; margin: 22px 0; flex-wrap: wrap; }

/* Mobile-Feinarbeit */
@media (max-width: 640px) {
    .ed-filter-bar { padding: 12px; gap: 10px; }
    .ed-filter-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    .ed-admin-panel { padding: 16px; }
    .ed-lang-tab { padding: 9px 10px; }
}

/* ============================================================
   BN Redaktion — Public (News-Portal-Stil)
   ============================================================ */
.public-main--fullwidth { padding: 0; }
.public-main--fullwidth .container { max-width: 1240px; padding-left: 20px; padding-right: 20px; margin: 0 auto; }

.ed-masthead {
    background: linear-gradient(180deg, var(--navy) 0%, #141f36 100%);
    color: #fff; padding: 28px 0 22px;
    border-bottom: 4px solid var(--gold); margin-bottom: 36px;
}
.ed-masthead__inner { text-align: center; }
.ed-masthead__top {
    display: flex; justify-content: center; gap: 8px; align-items: center;
    font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(255, 255, 255, .7); margin: 0 0 8px;
    font-family: var(--font-sans);
}
.ed-masthead__dot { color: var(--gold); font-weight: 700; }
.ed-masthead__title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(2.4rem, 4vw + 1rem, 4.5rem);
    line-height: 1; letter-spacing: -.01em;
    margin: 0 0 10px; color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}
.ed-masthead__lead {
    font-size: 15px; color: rgba(255, 255, 255, .8);
    max-width: 680px; margin: 0 auto 18px; line-height: 1.55;
    font-family: var(--font-sans);
}
.ed-ressorts {
    display: flex; justify-content: center; gap: 2px; flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 14px;
    font-family: var(--font-sans);
}
.ed-ressorts__link {
    color: #fff; text-decoration: none; opacity: .82;
    font-size: 13px; letter-spacing: .02em;
    padding: 6px 16px; border-right: 1px solid rgba(255, 255, 255, .15);
    transition: color .15s, opacity .15s;
}
.ed-ressorts__link:last-child { border-right: 0; }
.ed-ressorts__link:hover { color: var(--gold); opacity: 1; }

.ed-ressort-badge {
    display: inline-block; font-family: var(--font-sans);
    text-transform: uppercase; letter-spacing: .12em;
    font-size: 11px; font-weight: 700; color: var(--gold);
    padding: 0 0 2px; text-decoration: none;
    border-bottom: 1px solid var(--gold); margin: 0 0 10px;
}
.ed-ressort-badge:hover { color: var(--navy); border-bottom-color: var(--navy); }
[data-theme="dark"] .ed-ressort-badge:hover { color: #fff; border-bottom-color: #fff; }

.ed-byline {
    font-family: var(--font-sans); font-size: 13px; color: var(--text-muted);
    margin: 8px 0 0; font-variant-numeric: tabular-nums;
}
.ed-byline__sep { opacity: .5; margin: 0 2px; }

.ed-section-head { display: flex; align-items: center; gap: 14px; margin: 44px 0 24px; }
.ed-section-head__title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(1.4rem, 1vw + 1rem, 1.8rem);
    margin: 0; color: var(--navy); white-space: nowrap;
}
[data-theme="dark"] .ed-section-head__title { color: var(--gold-lt); }
.ed-section-head__rule { flex: 1; height: 1px; background: var(--gold); opacity: .5; }

.ed-lead { padding: 0 0 36px; }
.ed-lead__article {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 36px; align-items: center;
}
.ed-lead__media { display: block; overflow: hidden; border-radius: 4px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .25); }
.ed-lead__media img, .ed-lead__media picture {
    width: 100%; height: auto; display: block;
    aspect-ratio: 16/10; object-fit: cover;
    transition: transform .5s ease;
}
.ed-lead__media:hover img { transform: scale(1.02); }
.ed-lead__title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(1.8rem, 2.5vw + 1rem, 3.2rem);
    line-height: 1.08; letter-spacing: -.01em; margin: 0 0 16px;
}
.ed-lead__title a { color: var(--navy); text-decoration: none; }
.ed-lead__title a:hover { color: var(--gold); }
[data-theme="dark"] .ed-lead__title a { color: var(--gold-lt); }
.ed-lead__teaser {
    font-size: 1.05rem; line-height: 1.6; color: var(--text-mid); margin: 0 0 12px;
    font-family: var(--font-serif); font-weight: 300;
}

.ed-second { padding: 36px 0 36px; border-top: 1px solid var(--border); }
.ed-second__grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
.ed-second__card { display: flex; flex-direction: column; gap: 12px; }
.ed-second__media { display: block; overflow: hidden; border-radius: 4px; aspect-ratio: 3/2; }
.ed-second__media img, .ed-second__media picture {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .5s ease;
}
.ed-second__media:hover img { transform: scale(1.03); }
.ed-second__title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(1.3rem, 1vw + 1rem, 1.85rem); line-height: 1.15; margin: 0;
}
.ed-second__title a { color: var(--navy); text-decoration: none; }
.ed-second__title a:hover { color: var(--gold); }
[data-theme="dark"] .ed-second__title a { color: var(--gold-lt); }
.ed-second__teaser {
    font-family: var(--font-serif); font-weight: 300;
    font-size: 1rem; line-height: 1.55; color: var(--text-mid); margin: 4px 0 0;
}

.ed-focus { padding: 0 0 24px; }
.ed-focus__grid { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-focus__card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 6px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ed-focus__card:hover {
    border-color: var(--gold);
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .2);
    transform: translateY(-2px);
}
.ed-focus__media { display: block; aspect-ratio: 16/9; overflow: hidden; }
.ed-focus__media img, .ed-focus__media picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-focus__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ed-focus__title { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0; }
.ed-focus__title a { color: var(--navy); text-decoration: none; }
.ed-focus__title a:hover { color: var(--gold); }
[data-theme="dark"] .ed-focus__title a { color: var(--gold-lt); }
.ed-focus__teaser { font-size: .95rem; line-height: 1.55; color: var(--text-mid); margin: 0; font-family: var(--font-sans); }

.ed-more { padding: 0 0 60px; }
.ed-list { display: flex; flex-direction: column; }
.ed-list__row {
    display: grid; grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px; padding: 22px 0; border-top: 1px solid var(--border);
}
.ed-list__row:first-child { border-top: 0; padding-top: 0; }
.ed-list__media { display: block; overflow: hidden; border-radius: 4px; aspect-ratio: 16/10; }
.ed-list__media img, .ed-list__media picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-list__body { display: flex; flex-direction: column; gap: 6px; }
.ed-list__title { font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; margin: 0; }
.ed-list__title a { color: var(--navy); text-decoration: none; }
.ed-list__title a:hover { color: var(--gold); }
[data-theme="dark"] .ed-list__title a { color: var(--gold-lt); }
.ed-list__teaser { font-size: .98rem; line-height: 1.55; color: var(--text-mid); margin: 0; font-family: var(--font-serif); font-weight: 300; }

[data-theme="dark"] .ed-focus__card { background: var(--surface); }
[data-theme="dark"] .ed-lead__teaser,
[data-theme="dark"] .ed-second__teaser,
[data-theme="dark"] .ed-list__teaser { color: var(--text-mid); } /* BUG-014: #666 → text-mid für Dark-Mode-Lesbarkeit */

@media (max-width: 960px) {
    .ed-lead__article { grid-template-columns: 1fr; gap: 20px; }
    .ed-second__grid { grid-template-columns: 1fr; gap: 30px; }
    .ed-focus__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 640px) {
    .ed-masthead { padding: 22px 0 18px; margin-bottom: 24px; }
    .ed-masthead__title { font-size: 2.2rem; }
    .ed-masthead__lead { font-size: 14px; padding: 0 16px; }
    .ed-ressorts__link { padding: 5px 10px; font-size: 12px; }
    .ed-focus__grid { grid-template-columns: 1fr; }
    .ed-list__row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
    .ed-list__title { font-size: 1.2rem; }
    .ed-section-head { margin: 30px 0 18px; }
}

.ed-cockpit-head { margin: 0 0 24px; padding-bottom: 18px; border-bottom: 3px solid var(--gold); }
.ed-cockpit-head__eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 6px; }
.ed-cockpit-head__title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); line-height: 1.1; color: var(--navy); margin: 0 0 6px; }
[data-theme="dark"] .ed-cockpit-head__title { color: var(--gold-lt); }
.ed-cockpit-head__lead { font-size: 14px; color: var(--text-muted); margin: 0; max-width: 640px; }
.ed-cockpit-lead { margin-bottom: 36px; }
.ed-cockpit-rest .ed-focus__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 1200px) { .ed-cockpit-rest .ed-focus__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ed-cockpit-rest .ed-focus__grid { grid-template-columns: 1fr; } }
.ed-cockpit-back { margin: 0 0 14px; font-size: 13px; }
.ed-cockpit-back a { color: var(--text-muted); text-decoration: none; }
.ed-cockpit-back a:hover { color: var(--gold); }

/* Author-Box unter einem Artikel */
.ed-article__author {
    display: grid; grid-template-columns: 100px minmax(0, 1fr);
    gap: 24px; align-items: start;
    max-width: 820px; width: 100%;
    margin: 40px auto 0;
    padding: 28px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface);
    box-sizing: border-box;
    overflow-wrap: break-word;
}
.ed-article__author--no-avatar { grid-template-columns: minmax(0, 1fr); }
.ed-article__author-body { min-width: 0; }
.ed-article__author-avatar { margin: 0; border-radius: 50%; overflow: hidden; width: 100px; height: 100px; }
.ed-article__author-avatar img, .ed-article__author-avatar picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-article__author-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 4px; }
.ed-article__author-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; margin: 0 0 4px; }
.ed-article__author-name a { color: var(--navy); text-decoration: none; }
.ed-article__author-name a:hover { color: var(--gold); }
[data-theme="dark"] .ed-article__author-name a { color: var(--gold-lt); }
.ed-article__author-role { font-size: 13px; margin: 0 0 8px; }
.ed-article__author-bio { font-family: var(--font-serif); font-weight: 300; margin: 0; line-height: 1.55; }
@media (max-width: 600px) {
    .ed-article__author { grid-template-columns: 1fr; padding: 20px; }
    .ed-article__author-avatar { width: 80px; height: 80px; }
}

/* Autoren-Seite */
.ed-author-bio {
    display: grid; grid-template-columns: 160px minmax(0, 1fr);
    gap: 32px; align-items: start;
    max-width: 820px; margin: 28px auto 0;
    padding-bottom: 28px; border-bottom: 1px solid var(--border);
}
.ed-author-bio__avatar { margin: 0; border-radius: 50%; overflow: hidden; width: 160px; height: 160px; }
.ed-author-bio__avatar img, .ed-author-bio__avatar picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-author-bio__text { font-family: var(--font-serif); font-weight: 300; font-size: 1.05rem; line-height: 1.6; }
.ed-author-bio__knows { margin: 14px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.ed-author-bio__social { list-style: none; padding: 0; margin: 14px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.ed-author-bio__social a {
    display: inline-block; padding: 6px 12px; border-radius: 999px;
    background: rgba(0, 0, 0, .05); color: inherit; text-decoration: none; font-size: 13px;
    font-family: var(--font-sans);
}
[data-theme="dark"] .ed-author-bio__social a { background: rgba(255, 255, 255, .08); }
.ed-author-bio__social a:hover { background: var(--gold-pale); color: var(--gold-text); }
@media (max-width: 600px) {
    .ed-author-bio { grid-template-columns: 1fr; gap: 20px; }
    .ed-author-bio__avatar { width: 120px; height: 120px; }
}

/* Preview-Banner */
.ed-preview-banner {
    background: var(--gold-pale); color: var(--gold-text);
    border-bottom: 2px solid var(--gold);
    padding: 10px 20px; text-align: center; font-size: 13px;
    font-family: var(--font-sans);
}

/* Share-Leiste */
.ed-share {
    max-width: 820px; margin: 32px auto 0;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    padding: 18px 0; border-top: 1px solid var(--border);
}
.ed-share__label {
    font-family: var(--font-sans); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-muted); margin-right: 6px;
}
.ed-share__btn {
    appearance: none; background: transparent;
    border: 1px solid var(--border); border-radius: 999px;
    padding: 7px 14px; font-size: 13px; color: var(--text);
    font-family: var(--font-sans); text-decoration: none;
    cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.ed-share__btn:hover { border-color: var(--gold); color: var(--gold); }
.ed-share__btn--linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
.ed-share__btn--x:hover        { border-color: #000;    color: #000; }
[data-theme="dark"] .ed-share__btn--x:hover { border-color: #fff; color: #fff; }
.ed-share__btn--whatsapp:hover { border-color: #25d366; color: #25d366; }

/* FAQ */
.ed-faq {
    max-width: 680px; margin: 40px auto 0;
    padding-top: 24px; border-top: 1px solid var(--border);
}
.ed-faq h2 {
    font-family: var(--font-serif); font-weight: 600;
    font-size: 1.7rem; margin: 0 0 18px;
}
.ed-faq__item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.ed-faq__item summary {
    cursor: pointer; list-style: none; position: relative;
    font-family: var(--font-serif); font-weight: 600;
    font-size: 1.15rem; line-height: 1.35;
    padding-right: 32px; color: var(--navy);
}
[data-theme="dark"] .ed-faq__item summary { color: var(--gold-lt); }
.ed-faq__item summary::after {
    content: "+"; position: absolute; right: 4px; top: 0;
    font-size: 1.3rem; color: var(--gold); font-weight: 400;
    transition: transform .2s;
}
.ed-faq__item[open] summary::after { transform: rotate(45deg); }
.ed-faq__answer {
    margin-top: 10px; font-family: var(--font-serif); font-weight: 300;
    line-height: 1.6; font-size: 1rem;
}

/* HowTo */
.ed-howto {
    max-width: 680px; margin: 40px auto 0;
    padding: 24px; border: 1px solid var(--border); border-left: 3px solid var(--gold);
    border-radius: 6px; background: var(--surface);
}
.ed-howto h2 {
    font-family: var(--font-serif); font-weight: 600;
    font-size: 1.6rem; margin: 0 0 8px;
}
.ed-howto__desc { color: var(--text-mid); margin: 0 0 20px; }
.ed-howto__steps { list-style: none; padding: 0; margin: 0; counter-reset: howto; }
.ed-howto__steps li {
    margin: 0 0 18px; padding-left: 56px; position: relative;
}
.ed-howto__step-num {
    position: absolute; left: 0; top: 0;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gold); color: var(--navy);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem;
}
.ed-howto__step-title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: 1.15rem; margin: 4px 0 6px; line-height: 1.3;
}
.ed-howto__step-title .ed-howto__step-num { margin-right: 0; }
.ed-howto__step-text { margin: 0; font-size: 1rem; line-height: 1.55; }

/* Inhaltsverzeichnis (TOC) */
.ed-toc { max-width: 820px; margin: 28px auto 32px; }
.ed-toc__wrap {
    border: 1px solid var(--border); border-left: 3px solid var(--gold);
    border-radius: 6px; padding: 14px 20px 16px; background: var(--surface);
}
.ed-toc__title {
    cursor: pointer; list-style: none;
    font-family: var(--font-sans); font-weight: 600; font-size: 12px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
    display: flex; align-items: center; gap: 8px;
}
.ed-toc__title::before { content: "▾"; font-size: 10px; transition: transform .2s; }
details:not([open]) > .ed-toc__title::before { transform: rotate(-90deg); }
.ed-toc__list {
    margin: 12px 0 0; padding-left: 0; list-style: none;
    font-family: var(--font-sans); font-size: 14px; line-height: 1.55;
    column-count: 2; column-gap: 24px;
}
.ed-toc__item { break-inside: avoid; margin: 2px 0; }
.ed-toc__item--h3 { padding-left: 16px; color: var(--text-muted); font-size: 13px; }
.ed-toc__item a { color: var(--text); text-decoration: none; }
.ed-toc__item a:hover { color: var(--gold); }
.ed-article__body h2, .ed-article__body h3 { scroll-margin-top: 80px; }
@media (max-width: 700px) { .ed-toc__list { column-count: 1; } }

/* Slug-Live-Check */
.ed-slug-row { display: flex; gap: 8px; align-items: center; }
.ed-slug-row input { flex: 1; }
.ed-slug-status {
    font-family: var(--font-sans); font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 4px; min-width: 28px; text-align: center;
    background: var(--bg-muted); color: var(--text-muted);
    transition: background .15s, color .15s;
}
.ed-slug-status.is-ok { background: var(--success-bg); color: var(--success); }
.ed-slug-status.is-bad { background: var(--error-bg); color: var(--error); }

/* Bulk-Aktions-Leiste */
.ed-bulk-bar {
    position: sticky; bottom: 0; z-index: 10;
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin: 14px 0 4px; padding: 10px 14px;
    background: var(--navy); color: #fff; border-radius: 8px;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .3);
}
.ed-bulk-bar__count { font-weight: 600; }
.ed-bulk-bar__select {
    background: #fff; color: var(--navy); border: 0; border-radius: 5px;
    padding: 6px 10px; font-size: 14px;
}

/* CTA-Buttons im Artikel-Body */
.ed-article__body .ed-cta-inline {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    margin: 20px 0 32px;
}
.ed-article__body .ed-cta-inline .btn {
    font-family: var(--font-sans); font-size: 14px;
    padding: 10px 20px; font-weight: 500;
}
.ed-article__body .ed-cta-box {
    display: block;
    background: linear-gradient(180deg, rgba(201, 168, 76, .08), rgba(201, 168, 76, .03));
    border: 1px solid rgba(201, 168, 76, .4); border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 24px 28px; margin: 32px 0;
    font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
    text-align: left;
}
.ed-article__body .ed-cta-box strong {
    font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem;
    color: var(--navy); display: block; margin-bottom: 8px;
}
[data-theme="dark"] .ed-article__body .ed-cta-box strong { color: var(--gold-lt); }
.ed-article__body .ed-cta-box .btn {
    margin: 12px 8px 0 0; font-family: var(--font-sans);
    font-size: 14px; padding: 10px 20px; font-weight: 500;
}

/* ==========================================================================
   BN CONTACTS — CRM
   ========================================================================== */

/* Page Head */
.crm-page-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.crm-page-head h1 { margin: 0; flex: 1; min-width: 0; }
.crm-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Activate Box */
.crm-activate-wrap {
    display: flex; justify-content: center; padding: 48px 16px;
}
.crm-activate-box {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 48px 40px; max-width: 560px; width: 100%; text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.crm-activate-icon { font-size: 48px; margin-bottom: 16px; }
.crm-activate-box h1 { font-size: 1.7rem; margin-bottom: 10px; }
.crm-activate-lead { color: var(--text-mid); margin-bottom: 24px; font-size: 15px; }
.crm-activate-benefits {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 28px; text-align: left;
}
.crm-activate-benefit {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 14px; color: var(--text-mid);
}
.crm-activate-benefit span { color: var(--success); font-weight: 700; flex-shrink: 0; }
.crm-activate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; margin-bottom: 20px; }
.crm-activate-dsgvo { text-align: left; margin-bottom: 24px; font-size: 13px; color: var(--text-mid); }

/* KPI Bar */
.crm-kpi-bar {
    display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.crm-kpi {
    flex: 1; min-width: 100px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 20px; text-decoration: none;
    display: flex; flex-direction: column; gap: 4px;
    transition: border-color .15s, transform .1s;
}
.crm-kpi:hover { border-color: var(--gold); transform: translateY(-2px); }
.crm-kpi__val { font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1; }
.crm-kpi__label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
[data-theme="dark"] .crm-kpi__val { color: var(--gold-lt); }

/* Formular-Basis für alle CRM-Inputs/Selects/Textareas */
.crm-modal .form-control,
.crm-quicksearch input,
.crm-filter-bar .form-control,
.crm-filter-bar input[type="date"],
.crm-filter-bar select,
.crm-modal input[type="text"],
.crm-modal input[type="email"],
.crm-modal input[type="tel"],
.crm-modal input[type="url"],
.crm-modal input[type="number"],
.crm-modal input[type="date"],
.crm-modal select,
.crm-modal textarea {
    box-sizing: border-box;
    padding: 10px 14px; font: inherit; font-size: 14px; color: var(--text);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.crm-modal .form-control,
.crm-modal input,
.crm-modal select,
.crm-modal textarea { width: 100%; }
.crm-quicksearch input { width: 100%; }
.crm-modal .form-control:focus,
.crm-quicksearch input:focus,
.crm-filter-bar .form-control:focus,
.crm-filter-bar input[type="date"]:focus,
.crm-filter-bar select:focus,
.crm-modal input:focus, .crm-modal select:focus, .crm-modal textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198,164,82,.18);
}
.crm-modal .form-group { margin-bottom: 0; }
.crm-modal .form-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); margin-bottom: 6px; letter-spacing: .02em;
}

/* Quick Add Bar */
.crm-quickadd { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.crm-quickadd .btn { white-space: nowrap; }
.crm-quicksearch { position: relative; flex: 1; min-width: 220px; }
.crm-quicksearch input {
    padding-left: 38px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat; background-position: 12px center;
}
.crm-quicksearch__results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto;
}
.crm-qs-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; font-size: 14px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); transition: background .1s;
}
.crm-qs-item:last-child { border-bottom: 0; }
.crm-qs-item:hover { background: var(--bg-muted); }
.crm-qs-type { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* Widget Grid */
.crm-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-top: 4px;
}
.crm-widget { min-height: 140px; }
.crm-widget__empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; margin: 0; }

/* Task List (widget) */
.crm-task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.crm-task-item {
    display: flex; align-items: flex-start; gap: 8px; padding: 6px 0;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.crm-task-item:last-child { border-bottom: 0; }
.crm-task-item.is-overdue .crm-task-title { color: var(--error); }
.crm-task-item.is-done { opacity: .55; }
.crm-task-item.is-done .crm-task-title { text-decoration: line-through; }
.crm-task-check {
    background: none; border: 1.5px solid var(--border); border-radius: 4px;
    width: 20px; height: 20px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    transition: border-color .15s;
}
.crm-task-check:hover, .crm-task-check.is-checked { border-color: var(--gold); }
.crm-task-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.crm-task-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-task-who { font-size: 11px; color: var(--text-muted); }
.crm-task-body { font-size: 12px; color: var(--text-mid); }
.crm-task-due { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.crm-task-item.is-overdue .crm-task-due { color: var(--error); font-weight: 600; }

/* Task List Full (detail page) */
.crm-task-list--full .crm-task-item {
    padding: 10px 12px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px;
}

/* Pipeline Snap (widget) */
.crm-pipeline-snap { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.crm-pipeline-snap__col { flex-shrink: 0; min-width: 72px; text-align: center; }
.crm-pipeline-snap__name {
    font-size: 11px; color: var(--text-muted); border-top: 3px solid var(--border);
    padding-top: 6px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crm-pipeline-snap__count {
    font-size: 1.3rem; font-weight: 700; color: var(--navy);
}
.crm-pipeline-snap__count.has-stagnant { color: var(--error); }
[data-theme="dark"] .crm-pipeline-snap__count { color: var(--gold-lt); }

/* Stale + Birthday + Recent widget lists */
.crm-stale-list, .crm-bday-list, .crm-recent-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0;
}
.crm-stale-list li, .crm-bday-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.crm-stale-list li:last-child, .crm-bday-list li:last-child { border-bottom: 0; }
.crm-stale-name { color: var(--navy); text-decoration: none; font-weight: 500; }
.crm-stale-name:hover { color: var(--gold); }
[data-theme="dark"] .crm-stale-name { color: var(--gold-lt); }
.crm-stale-days, .crm-bday-date { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.crm-recent-item {
    display: flex; align-items: flex-start; gap: 8px; padding: 7px 0;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.crm-recent-item:last-child { border-bottom: 0; }
.crm-recent-icon { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.crm-recent-body { flex: 1; min-width: 0; }
.crm-recent-body a { color: var(--navy); text-decoration: none; font-weight: 500; }
.crm-recent-body a:hover { color: var(--gold); }
[data-theme="dark"] .crm-recent-body a { color: var(--gold-lt); }
.crm-recent-title { display: block; font-size: 12px; color: var(--text-mid); }
.crm-recent-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

/* Quick Widget */
.crm-quick-body { display: flex; flex-direction: column; gap: 8px; }
.crm-quick-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px; text-decoration: none;
    color: var(--text); background: var(--bg-muted); font-size: 14px;
    transition: background .15s, color .15s;
}
.crm-quick-btn:hover { background: var(--gold-pale); color: var(--gold-text); }
[data-theme="dark"] .crm-quick-btn:hover { background: var(--gold-pale); color: var(--gold-lt); }
.crm-quick-icon { font-size: 18px; flex-shrink: 0; }

/* Filter Bar */
.crm-filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: 16px;
}
.crm-filter-search { flex: 1; min-width: 200px; }
.crm-filter-select { min-width: 130px; }
.crm-result-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

/* CRM Table — subtiler Zeilenhover + ausgeprägte Klickbarkeit auf einzelnen Elementen */
.crm-table { width: 100%; }
.crm-row { cursor: pointer; transition: background .15s; }
.crm-row:hover td { background: var(--bg-muted); }
.crm-task-row { cursor: pointer; }
.crm-task-row.is-done { opacity: .65; }
.crm-task-row.is-done td { background: var(--bg-muted); }
.crm-task-row:hover td { background: var(--bg-muted); }

/* Alles was wirklich klickbar ist: auffälliger Hover — Text wächst leicht, Farbe wechselt zu Gold */
.crm-name-link,
.crm-task-title,
.crm-action-btn,
.crm-task-row .crm-task-title,
.crm-row a,
.crm-task-row a {
    transition: color .15s, transform .15s;
    transform-origin: left center;
    display: inline-flex; align-items: center;
}
.crm-name-link:hover,
.crm-row a:hover,
.crm-task-row a:hover,
.crm-task-row:hover .crm-task-title {
    color: var(--gold-text);
    transform: scale(1.03);
    text-decoration: none;
}
.crm-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px;
    background: transparent; border: 1px solid transparent;
    color: var(--text-muted); text-decoration: none; font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.crm-action-btn:hover {
    background: var(--gold-pale);
    border-color: var(--gold);
    color: var(--gold-text);
    transform: scale(1.1);
}

/* Task-Titel als klickbarer Text-Button (Edit-Trigger) */
.crm-task-title-btn {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
    color: var(--text); text-align: left; display: inline-flex; align-items: center;
    transition: color .15s, transform .15s;
    transform-origin: left center;
}
.crm-task-title-btn:hover {
    color: var(--gold-text);
    transform: scale(1.04);
}
.crm-task-title-btn.is-done { text-decoration: line-through; color: var(--text-muted); }

/* bnConfirmDelete — Destruktive Aktion mit PIN (global, alle Module) */
.bn-confirm-overlay--destructive .bn-confirm-box--destructive {
    max-width: 480px;
    text-align: center;
}
.bn-confirm-icon { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.bn-confirm-related {
    margin: 14px 0;
    padding: 12px 14px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
}
.bn-confirm-related strong { display: block; margin-bottom: 8px; font-size: 14px; }
.bn-confirm-related-opts { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bn-confirm-related-opts label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.bn-confirm-pin { margin: 14px 0 16px; }
.bn-confirm-pin label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; letter-spacing: .02em; }
.bn-confirm-pin-display {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 28px; letter-spacing: 10px; font-weight: 700;
    color: var(--navy);
    background: var(--gold-pale); border: 1px dashed var(--gold);
    padding: 10px 14px; border-radius: 10px;
    display: inline-block; margin: 0 auto 8px;
    user-select: none;
}
[data-confirm-pin-input] {
    display: block; width: 120px; margin: 0 auto;
    padding: 10px 12px; font-size: 20px; text-align: center; letter-spacing: 6px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
[data-confirm-pin-input]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,164,82,.2); }
.bn-confirm-pin-hint { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.btn-danger {
    background: #c13b3b; color: #fff; border: 1px solid #a42e2e;
    padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.btn-danger:disabled { opacity: .4; cursor: not-allowed; background: #888; border-color: #666; }
.btn-danger.is-armed { background: #dc2626; border-color: #a42e2e; }
.btn-danger:hover:not(:disabled) { background: #a42e2e; }

/* bnConfirm — zentrierter Overlay-Dialog */
.bn-confirm-overlay {
    position: fixed; inset: 0; z-index: 10001;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.bn-confirm-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
}
.bn-confirm-box {
    position: relative; z-index: 1;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%; max-width: 420px;
    padding: 22px 22px 18px;
    animation: bnConfirmIn .15s ease-out;
}
@keyframes bnConfirmIn {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bn-confirm-box h3 { margin: 0 0 6px; font-size: 1.05rem; }
.bn-confirm-box p  { margin: 0 0 16px; color: var(--text-muted); line-height: 1.5; font-size: 14px; }
.bn-confirm-actions {
    display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
@media (max-width: 500px) {
    .bn-confirm-actions { flex-direction: column-reverse; }
    .bn-confirm-actions .btn { width: 100%; }
}

/* Pipeline — Anlage-Modal Intro */
.crm-pipeline-intro {
    padding: 12px 14px; margin-bottom: 16px;
    background: var(--gold-pale); border: 1px solid var(--gold);
    border-radius: 10px; color: var(--gold-text);
    font-size: 13px; line-height: 1.5;
}

/* Pipeline — Templates-Picker */
.crm-pipeline-templates { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .crm-pipeline-templates { grid-template-columns: 1fr 1fr; } }
/* Mobile-Optimierung: Kacheln bündig, Stage-Preview wrappt sauber */
.crm-tpl-card { padding: 12px 14px; }
.crm-tpl-card__stages { word-break: break-word; }
.crm-tpl-card__stage { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 500px) {
    .crm-tpl-card__head { font-size: 15px; }
    .crm-tpl-card__stages { font-size: 10.5px; }
}
.crm-tpl-card {
    display: block; cursor: pointer; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-card); transition: border-color .15s, box-shadow .15s;
}
.crm-tpl-card:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,164,82,.18); }
.crm-tpl-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.crm-tpl-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.crm-tpl-card__icon { font-size: 18px; }
.crm-tpl-card__stages { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.crm-tpl-card__stage { display: inline-block; padding: 2px 8px; border-radius: 99px; border: 1px solid; margin: 2px 0; }

/* Pipeline — Badge-Sektion im Kontakt-Detail */
.crm-pipeline-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    margin: 6px 0; background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: 8px; text-decoration: none; color: var(--text);
    transition: border-color .15s, transform .15s;
}
.crm-pipeline-link:hover { border-color: var(--gold); transform: translateX(2px); }
.crm-pipeline-link__name { font-weight: 500; }
.crm-pipeline-link__stage { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px solid; font-size: 12px; margin-left: auto; }
.crm-stage-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.crm-stage-badge--won { background: #d1fadf; color: #027a48; }
.crm-stage-badge--lost { background: #fee4e2; color: #b42318; }

/* Pipeline-Badge in Activity-Timeline */
.crm-pipeline-activity-badge {
    display: inline-block; margin-top: 4px; padding: 3px 10px;
    background: var(--gold-pale); color: var(--gold-text); border: 1px solid var(--gold);
    border-radius: 99px; font-size: 12px; text-decoration: none;
    transition: background .15s;
}
.crm-pipeline-activity-badge:hover { background: var(--gold); color: var(--navy); }
.crm-pipeline-activity-badge--orphan { background: var(--bg-muted); color: var(--text-muted); border-color: var(--border); cursor: default; }

/* ============================================================
   Karten-Modal — Feed für Notizen und Aufgaben (CI-konform)
   ============================================================ */
/* Count-Chip neben der Sektions-Überschrift */
.crm-card-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 8px;
    background: var(--navy); color: #fff; border-radius: 99px;
    font-size: 11px; font-weight: 600; margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

/* Feed — Liste der Notizen / Aufgaben (schmaler Scroll, sauberer Abstand) */
.crm-card-feed {
    max-height: 260px; overflow-y: auto;
    padding: 4px 0 12px;
    display: flex; flex-direction: column; gap: 10px;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.crm-card-feed::-webkit-scrollbar { width: 6px; }
.crm-card-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.crm-card-feed-item {
    position: relative;
    padding: 12px 14px 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.crm-card-feed-item::before {
    content: ''; position: absolute;
    left: 0; top: 10px; bottom: 10px; width: 3px;
    background: var(--gold); border-radius: 0 3px 3px 0;
}
.crm-card-feed-item:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.crm-card-feed-item.is-done { opacity: .6; }
.crm-card-feed-item.is-done::before { background: #10b981; }
.crm-card-feed-item.is-done .crm-card-feed-body { text-decoration: line-through; color: var(--text-muted); }
.crm-card-feed-item.is-overdue::before { background: #ef4444; }

.crm-card-feed-body {
    font-size: 14px; line-height: 1.5; color: var(--text);
    word-wrap: break-word;
}
.crm-card-feed-meta {
    font-size: 11px; color: var(--text-muted);
    margin-top: 6px; display: flex; align-items: center; gap: 8px;
}
.crm-card-feed-author { font-weight: 600; }
.crm-card-feed-due {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 99px;
    background: var(--gold-pale); color: var(--gold-text);
    font-weight: 600; font-size: 11px;
}

/* Leerer Zustand */
.crm-card-feed-empty {
    text-align: center; padding: 20px 12px;
    color: var(--text-muted); font-size: 13px; font-style: italic;
    background: var(--bg-muted); border: 1px dashed var(--border); border-radius: 8px;
}

/* Quick-Entry (neue Notiz / Aufgabe hinzufügen) */
.crm-card-new-entry {
    margin-top: 12px; padding: 12px;
    background: var(--bg-muted); border: 1px solid var(--border); border-radius: 10px;
    display: grid; gap: 10px;
}
.crm-card-new-entry textarea,
.crm-card-new-entry input[type="text"],
.crm-card-new-entry input[type="datetime-local"] {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; font-size: 14px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-card); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.crm-card-new-entry textarea:focus,
.crm-card-new-entry input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.crm-card-new-entry textarea { resize: vertical; min-height: 68px; }
.crm-card-new-entry-row {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.crm-card-new-entry-row input { flex: 1 1 180px; }
.crm-card-new-entry .btn { justify-self: end; }
@media (max-width: 500px) {
    .crm-card-new-entry .btn { width: 100%; justify-self: stretch; }
}

/* Sektions-Header mit Summary im Karten-Modal */
.crm-modal-section summary {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; cursor: pointer;
    font-weight: 600; color: var(--navy);
}

/* Activity-Participants — Pills in Timeline */
.crm-timeline-participants {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin: 6px 0 4px;
}
.crm-participant-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; border-radius: 99px;
    background: var(--bg-muted); color: var(--text);
    font-size: 12px; font-weight: 500;
    border: 1px solid var(--border);
}

/* Info-Tooltip (wiederverwendbar) — zeigt Hilfetext bei Hover/Klick */
.bn-info-tip {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; margin-left: 6px;
    background: var(--bg-muted); color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 50%;
    font-size: 11px; font-weight: 700; font-family: inherit;
    cursor: help; vertical-align: middle;
    transition: background .15s, color .15s, transform .15s;
    padding: 0;
}
.bn-info-tip:hover, .bn-info-tip.is-open {
    background: var(--gold-pale); color: var(--gold-text);
    border-color: var(--gold); transform: scale(1.1);
}
/* Die Original-Bubble im DOM bleibt versteckt (Accessibility: Screen-Reader kann sie lesen) */
.bn-info-tip__bubble {
    position: absolute; left: -9999px; top: -9999px;
    width: 1px; height: 1px; overflow: hidden;
}
/* Der Portal-Container (Body-Level, über allem) zeigt den tatsächlichen Tooltip */
.bn-info-tip-portal {
    position: fixed;
    width: 280px; max-width: min(320px, calc(100vw - 40px));
    padding: 12px 14px;
    background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    font-size: 13px; font-weight: 400; line-height: 1.5;
    text-align: left; white-space: normal;
    z-index: 10000;
    display: none;
    pointer-events: none;
}
.bn-info-tip-portal.is-visible { display: block; }

/* Kundennummer-Badges (zweites Identifikationsmerkmal) */
.crm-kd-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 99px;
    background: var(--gold-pale); color: var(--gold-text);
    font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.crm-kd-inline {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
    font-weight: 400;
}
.crm-name-link {
    display: flex; align-items: center; gap: 8px;
    color: var(--navy); text-decoration: none; font-weight: 500;
}
.crm-name-link:hover { color: var(--gold); }
[data-theme="dark"] .crm-name-link { color: var(--gold-lt); }
.crm-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Avatars */
.crm-avatar-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase;
}
.crm-avatar-sm--private  { background: var(--navy); }
.crm-avatar-sm--business { background: var(--gold-text); }
.crm-avatar { /* Large version */
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    font-size: 24px; font-weight: 700; color: #fff;
}
.crm-avatar--private  { background: var(--navy); }
.crm-avatar--business { background: var(--gold-text); }
.crm-avatar--company  {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy) 0%, #2a3f6e 100%);
}

/* Tags */
.crm-tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.crm-tag {
    display: inline-block; padding: 2px 8px; border-radius: 99px;
    background: var(--gold-pale); color: var(--gold-text);
    font-size: 11px; font-weight: 500; white-space: nowrap;
    border: 1px solid rgba(201,168,76,.3);
}
[data-theme="dark"] .crm-tag { background: rgba(201,168,76,.12); color: var(--gold-lt); }

/* Status Badges */
.crm-status {
    display: inline-block; padding: 3px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .04em;
}
.crm-status--prospect  { background: #e8f0fd; color: #2a5fc8; }
.crm-status--active    { background: var(--success-bg); color: var(--success); }
.crm-status--inactive  { background: var(--bg-muted); color: var(--text-muted); }
[data-theme="dark"] .crm-status--prospect { background: rgba(42,95,200,.2); color: #8ab4f8; }

/* Type Badge */
.crm-type-badge {
    display: inline-block; padding: 3px 10px; border-radius: 99px;
    background: var(--bg-muted); color: var(--text-mid);
    font-size: 11px; font-weight: 500;
}
.crm-bnid {
    display: inline-block; font-size: 11px; color: var(--text-muted);
    font-family: var(--font-mono, monospace); letter-spacing: .06em;
}

/* Row Actions */
.crm-col-actions { width: 100px; text-align: right; padding-right: 8px !important; }
.crm-row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.crm-row:hover .crm-row-actions { opacity: 1; }
.crm-action-btn {
    background: none; border: 1px solid var(--border); border-radius: 6px;
    padding: 4px 9px; cursor: pointer; font-size: 13px;
    color: var(--text-mid); transition: border-color .15s, color .15s;
    text-decoration: none; display: inline-flex; align-items: center;
}
.crm-action-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Breadcrumb */
.crm-breadcrumb {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.crm-breadcrumb a { color: var(--text-mid); text-decoration: none; }
.crm-breadcrumb a:hover { color: var(--gold); }
[data-theme="dark"] .crm-breadcrumb a { color: var(--text-muted); }
[data-theme="dark"] .crm-breadcrumb a:hover { color: var(--gold-lt); }

/* Detail Header — Visitenkarte + Schnellzugriff */
.crm-detail-top {
    display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px;
    align-items: stretch;
}

/* --- Visitenkarte --- */
.crm-vcard {
    position: relative; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 14px;
    box-shadow: 0 1px 2px rgba(10,25,50,.04);
}
.crm-vcard__ribbon {
    position: absolute; inset: 0 0 auto 0; height: 6px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
}
.crm-vcard__head { display: flex; gap: 18px; align-items: center; }
.crm-vcard__avatar {
    flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--navy-lt, #264070));
    box-shadow: 0 2px 6px rgba(10,25,50,.18);
    border: 3px solid var(--bg-card);
}
.crm-vcard__avatar--customer   { background: linear-gradient(135deg, #1a4f8a, #2d6fb5); }
.crm-vcard__avatar--prospect   { background: linear-gradient(135deg, #8a6d1a, #c6a043); }
.crm-vcard__avatar--supplier   { background: linear-gradient(135deg, #3a5f3a, #5a8c5a); }
.crm-vcard__ident { min-width: 0; flex: 1; }
.crm-vcard__name {
    font-size: 1.45rem; font-weight: 700; margin: 0 0 4px;
    color: var(--navy); line-height: 1.2;
}
[data-theme="dark"] .crm-vcard__name { color: var(--gold-lt); }
.crm-vcard__role {
    margin: 0 0 8px; font-size: 13.5px; color: var(--text-mid);
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.crm-vcard__sep { color: var(--text-muted); }
.crm-vcard__company {
    color: var(--gold-text); text-decoration: none; font-weight: 500;
}
.crm-vcard__company:hover { color: var(--gold); }
.crm-vcard__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-vcard__divider {
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.crm-vcard__grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 22px; margin: 0;
}
.crm-vcard__item { margin: 0; min-width: 0; }
.crm-vcard__item--wide { grid-column: 1 / -1; }
.crm-vcard__item dt {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); margin-bottom: 2px; font-weight: 600;
}
.crm-vcard__item dd {
    margin: 0; font-size: 14px; color: var(--text-mid); word-break: break-word;
}
.crm-vcard__item dd a { color: var(--navy); text-decoration: none; }
.crm-vcard__item dd a:hover { color: var(--gold); }
[data-theme="dark"] .crm-vcard__item dd a { color: var(--gold-lt); }
.crm-vcard__tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Schnellzugriff-Box --- */
.crm-quickpanel {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 14px;
    box-shadow: 0 1px 2px rgba(10,25,50,.04);
}
.crm-quickpanel__head h2 {
    font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--navy); margin: 0 0 2px; font-weight: 700;
}
[data-theme="dark"] .crm-quickpanel__head h2 { color: var(--gold-lt); }
.crm-quickpanel__head p { font-size: 12px; color: var(--text-muted); margin: 0; }
.crm-quickpanel__tiles {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.crm-qtile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 14px 6px;
    background: var(--bg-soft, #f7f6f1); border: 1px solid var(--border); border-radius: 10px;
    color: var(--navy); font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
}
.crm-qtile:hover {
    background: var(--gold-pale, #f7f0df); border-color: var(--gold);
    transform: translateY(-1px); box-shadow: 0 3px 8px rgba(201,161,77,.18);
}
.crm-qtile__icon { font-size: 22px; line-height: 1; }
.crm-qtile__label { font-size: 12.5px; }
[data-theme="dark"] .crm-qtile { background: rgba(255,255,255,.04); color: var(--gold-lt); }

.crm-qrow {
    width: 100%; padding: 10px 12px;
    background: var(--gold); border: 1px solid var(--gold); border-radius: 10px;
    color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: filter .15s ease;
}
.crm-qrow:hover:not(:disabled) { filter: brightness(1.05); }
.crm-qrow:disabled { opacity: .5; cursor: not-allowed; }

.crm-quickpanel__foot {
    display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border);
}
.crm-qfoot {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 10px; font-size: 13px; color: var(--text-mid);
    background: transparent; border: 1px solid var(--border); border-radius: 8px;
    text-decoration: none; cursor: pointer; transition: all .15s ease;
}
.crm-qfoot:hover { background: var(--bg-soft, #f7f6f1); color: var(--navy); }
.crm-qfoot--danger:hover { background: rgba(200,50,50,.08); color: #c23232; border-color: #e5b3b3; }

/* Mobile: stacken */
@media (max-width: 900px) {
    .crm-detail-top { grid-template-columns: 1fr; }
    .crm-vcard__head { flex-direction: row; align-items: flex-start; }
    .crm-vcard__avatar { width: 60px; height: 60px; font-size: 24px; }
    .crm-vcard__grid { grid-template-columns: 1fr; gap: 10px; }
}

/* --- Task-Tags + Projekt-Chip (Tasks-Liste) --- */
.crm-task-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.crm-tag.crm-tag--sm {
    font-size: 11px; padding: 2px 7px;
}
.crm-project-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 500;
    background: rgba(10,25,50,.08); color: var(--navy);
    border: 1px solid rgba(10,25,50,.12);
}
.crm-project-chip--gold  { background: rgba(201,161,77,.12); color: #8a6d1a; border-color: rgba(201,161,77,.3); }
.crm-project-chip--green { background: rgba(90,140,90,.12); color: #3a5f3a; border-color: rgba(90,140,90,.3); }
.crm-project-chip--red   { background: rgba(194,50,50,.10); color: #9a2a2a; border-color: rgba(194,50,50,.3); }
.crm-project-chip--blue  { background: rgba(45,111,181,.12); color: #1a4f8a; border-color: rgba(45,111,181,.3); }
[data-theme="dark"] .crm-project-chip { background: rgba(255,255,255,.06); color: var(--gold-lt); border-color: rgba(255,255,255,.1); }

/* --- Task-Done-Popover --- */
.bn-task-done-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.bn-task-done-modal .crm-modal__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.bn-task-done-box { max-width: 520px; }
.bn-task-done-toggle {
    display: flex; gap: 12px; flex-wrap: wrap;
    background: var(--bg-soft, #f7f6f1); padding: 12px 14px; border-radius: 10px;
    margin-bottom: 14px;
}
.bn-task-done-toggle label {
    display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer;
    color: var(--text-mid); font-weight: 500;
}
.bn-task-done-toggle input[type="radio"] { accent-color: var(--gold); width: 16px; height: 16px; }
.bn-task-done-fields { display: flex; flex-direction: column; gap: 8px; }
.bn-task-done-fields .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) {
    .bn-task-done-fields .grid-2 { grid-template-columns: 1fr 1fr; }
}
[data-theme="dark"] .bn-task-done-toggle { background: rgba(255,255,255,.04); }

/* Quick-Create Projekt (inline Box unter dem Dropdown) */
.bn-quick-project {
    background: var(--gold-pale, #f7f0df); border: 1px dashed var(--gold);
    border-radius: 10px; padding: 10px 12px;
}
[data-theme="dark"] .bn-quick-project { background: rgba(201,161,77,.08); border-color: rgba(201,161,77,.4); }

/* ============================================================
   INBOX / BENACHRICHTIGUNGEN
   ============================================================ */
.bn-inbox-empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
}
.bn-inbox-empty__icon { font-size: 48px; margin-bottom: 16px; }
.bn-inbox-empty h3 { color: var(--navy); margin: 0 0 8px; font-size: 1.2rem; }
[data-theme="dark"] .bn-inbox-empty h3 { color: var(--gold-lt); }
.bn-inbox-empty p { margin: 0 0 24px; font-size: 14px; }

.bn-inbox-list { list-style: none; padding: 0; margin: 16px 0; }
.bn-inbox-item {
    display: flex; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
    background: var(--bg-soft, #f7f6f1); transition: box-shadow .15s ease;
}
.bn-inbox-item:hover { box-shadow: 0 2px 8px rgba(10,25,50,.06); }
.bn-inbox-item.is-unread {
    background: var(--bg-card, #fff); border-left: 3px solid var(--gold);
}
[data-theme="dark"] .bn-inbox-item { background: rgba(255,255,255,.03); }
[data-theme="dark"] .bn-inbox-item.is-unread { background: rgba(255,255,255,.06); }

.bn-inbox-item__icon { font-size: 22px; flex-shrink: 0; line-height: 1.3; }
.bn-inbox-item__main { flex: 1; min-width: 0; }
.bn-inbox-item__head {
    display: flex; justify-content: space-between; gap: 12px;
    align-items: baseline; flex-wrap: wrap;
}
.bn-inbox-item__title { color: var(--navy); font-size: 14.5px; font-weight: 600; }
[data-theme="dark"] .bn-inbox-item__title { color: var(--gold-lt); }
.bn-inbox-item__title a { color: inherit; text-decoration: none; }
.bn-inbox-item__title a:hover { color: var(--gold); }
.bn-inbox-item__time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.bn-inbox-item__body { color: var(--text-mid); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.bn-inbox-item__meta { margin-top: 4px; }
.bn-inbox-item__actions {
    display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}

/* Chat-Thread */
.bn-chat-thread {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 20px; margin: 16px 0;
}
.bn-chat-bubble {
    display: inline-block; max-width: 80%; padding: 10px 14px; border-radius: 10px;
    text-align: left; line-height: 1.45;
}
.bn-chat-bubble--user   { background: var(--gold-pale, #f7f0df); color: var(--text-mid); }
.bn-chat-bubble--ai     { background: var(--bg-soft, #f5f3ec);   color: var(--text-mid); }
.bn-chat-bubble--admin  { background: var(--navy);               color: #fff; }
.bn-chat-bubble--system { background: var(--bg-soft);            color: var(--text-muted); font-style: italic; }
[data-theme="dark"] .bn-chat-bubble--ai   { background: rgba(255,255,255,.05); }
[data-theme="dark"] .bn-chat-bubble--user { background: rgba(201,161,77,.18); }
.bn-chat-row { margin-bottom: 14px; }
.bn-chat-row--right { text-align: right; }
.bn-chat-row--left  { text-align: left; }
.bn-chat-meta {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    opacity: .7; margin-bottom: 4px;
}

.bn-chat-reply { margin-top: 16px; }
.bn-chat-reply textarea { width: 100%; min-height: 100px; resize: vertical; }

.crm-type-badge--danger {
    background: rgba(200,50,50,.1) !important;
    border-color: #c83232 !important;
    color: #c83232 !important;
}
[data-theme="dark"] .crm-type-badge--danger {
    background: rgba(200,50,50,.18) !important;
    color: #f1a6a6 !important;
}

.crm-qrow--danger {
    background: #c23232 !important; border-color: #c23232 !important;
}
.crm-qrow--danger:hover:not(:disabled) { filter: brightness(1.1); }

.d-inline { display: inline; }

/* Mobile */
@media (max-width: 600px) {
    .bn-inbox-item { flex-direction: column; gap: 10px; }
    .bn-inbox-item__actions { width: 100%; justify-content: flex-end; }
    .bn-chat-bubble { max-width: 92%; }
}

/* Tabs */
.crm-tabs { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold); color: #fff;
    width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700;
    margin-left: 4px; vertical-align: middle;
}

/* Detail Body & Grid */
.crm-detail-body { min-height: 200px; }
.crm-detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.crm-fields-col, .crm-timeline-col { min-width: 0; }
.crm-field-section {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px 20px; margin-bottom: 14px;
}
.crm-field-section h3 {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); margin: 0 0 12px; font-weight: 600;
}
.crm-field {
    display: flex; gap: 8px; align-items: baseline; padding: 5px 0;
    border-bottom: 1px solid var(--border); font-size: 14px;
}
.crm-field:last-child { border-bottom: 0; }
.crm-field label {
    font-size: 12px; color: var(--text-muted); flex: 0 0 130px; flex-shrink: 0;
}
.crm-field a { color: var(--navy); text-decoration: none; }
.crm-field a:hover { color: var(--gold); }
[data-theme="dark"] .crm-field a { color: var(--gold-lt); }
.crm-notes { font-size: 14px; line-height: 1.6; color: var(--text-mid); white-space: pre-wrap; }

/* Telegram Section */
.crm-tg-connected { color: var(--success); font-size: 13px; }
.crm-tg-hint { color: var(--text-muted); font-size: 13px; margin: 0; }

/* Next Action Box */
.crm-next-action {
    background: linear-gradient(135deg, var(--gold-pale), rgba(247,240,223,.4));
    border: 1px solid rgba(201,168,76,.35); border-left: 4px solid var(--gold);
    border-radius: 10px; padding: 14px 18px; margin-bottom: 16px;
}
.crm-next-action__label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-text); font-weight: 600; margin-bottom: 4px; }
.crm-next-action__title { font-weight: 600; font-size: 15px; }
.crm-next-action__due { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.crm-next-action__due.is-overdue { color: var(--error); font-weight: 600; }
[data-theme="dark"] .crm-next-action { background: rgba(201,168,76,.06); }

/* Mini Timeline */
.crm-mini-timeline {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px 20px;
}
.crm-mini-timeline h3 {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); margin: 0 0 12px; font-weight: 600;
}
.crm-see-all {
    display: block; text-align: center; margin-top: 10px;
    font-size: 13px; color: var(--text-muted); text-decoration: none;
}
.crm-see-all:hover { color: var(--gold); }

/* Full Timeline */
.crm-timeline {
    display: flex; flex-direction: column; gap: 0;
    padding-left: 20px; border-left: 2px solid var(--border); margin-top: 4px;
}
.crm-timeline-item {
    position: relative; padding: 0 0 18px 24px;
}
.crm-timeline-dot {
    position: absolute; left: -28px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg-card); border: 2px solid var(--gold);
}
.crm-timeline-item.is-system .crm-timeline-dot { border-color: var(--border); }
.crm-timeline-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 9px;
    padding: 12px 16px;
}
.crm-timeline-item--note .crm-timeline-card { border-left: 3px solid var(--gold); }
.crm-timeline-item--call_in .crm-timeline-card,
.crm-timeline-item--call_out .crm-timeline-card { border-left: 3px solid #22c55e; }
.crm-timeline-item--email_in .crm-timeline-card,
.crm-timeline-item--email_out .crm-timeline-card { border-left: 3px solid #6366f1; }
.crm-timeline-item--appointment .crm-timeline-card { border-left: 3px solid #f59e0b; }
.crm-timeline-item.is-system .crm-timeline-card {
    background: transparent; border: 1px dashed var(--border);
}
.crm-timeline-card-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.crm-timeline-type {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
}
.crm-timeline-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.crm-timeline-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.crm-timeline-text { font-size: 14px; color: var(--text-mid); line-height: 1.55; }
.crm-timeline-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.crm-tl-delete {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 4px;
    transition: color .15s; flex-shrink: 0; margin-left: auto;
}
.crm-tl-delete:hover { color: var(--error); }

/* Mini Timeline Item */
.crm-timeline-icon { font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.crm-timeline-body { flex: 1; min-width: 0; }
.crm-timeline-item--mini {
    display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border);
}
.crm-timeline-item--mini:last-child { border-bottom: 0; }

/* Activity Toolbar */
.crm-activity-toolbar { display: flex; gap: 8px; margin-bottom: 14px; }

/* Coming Soon */
.crm-coming-soon {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted); font-size: 15px;
}

/* ============================================================
   Pipeline Board — Trello-inspiriert, BN-CI (Navy/Gold/Beige)
   ============================================================ */

/* Chip-Tabs statt Dropdown für Pipeline-Auswahl */
.crm-pipeline-tabs {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
    margin-bottom: 16px; padding: 4px; background: var(--bg-muted);
    border: 1px solid var(--border); border-radius: 12px;
}
.crm-pipeline-tab {
    padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
    color: var(--text-muted); background: transparent; border: 1px solid transparent;
    text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    display: inline-flex; align-items: center; gap: 8px;
}
.crm-pipeline-tab:hover { background: var(--bg-card); color: var(--text); }
.crm-pipeline-tab.is-active {
    background: var(--navy); color: #fff; border-color: var(--navy);
    box-shadow: 0 2px 8px rgba(26,39,68,.15);
}
.crm-pipeline-tab__icon { font-size: 14px; }
.crm-pipeline-tab--add {
    background: var(--gold-pale); color: var(--gold-text);
    border-color: var(--gold); font-weight: 600;
}
.crm-pipeline-tab--add:hover { background: var(--gold); color: var(--navy); }

/* Board-Wrapper mit horizontalem Scroll — Kanban scrollt IN der Box, nicht die ganze Seite */
.crm-pipeline-wrap {
    max-width: 100%;
    overflow-x: auto; overflow-y: hidden;
    padding: 4px 4px 24px;
    margin: 0 -4px;
    scrollbar-width: auto;
    scrollbar-color: var(--gold) var(--bg-muted);
    overscroll-behavior-x: contain;
}
.crm-pipeline-wrap::-webkit-scrollbar { height: 14px; }
.crm-pipeline-wrap::-webkit-scrollbar-track {
    background: var(--bg-muted);
    border-radius: 10px;
    margin: 0 4px;
}
.crm-pipeline-wrap::-webkit-scrollbar-thumb {
    background: var(--gold);
    border: 3px solid var(--bg-muted);
    border-radius: 10px;
    min-width: 48px;
}
.crm-pipeline-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--navy);
}
.crm-pipeline-board {
    display: flex; gap: 14px; min-width: 100%;
    align-items: flex-start; padding: 4px;
}

/* Spalte (Stage) — Trello-Style: abgerundet, weicher Background */
.crm-pipeline-col {
    flex: 0 0 280px; width: 280px;
    background: var(--bg-muted);
    border-radius: 14px;
    display: flex; flex-direction: column;
    max-height: calc(100vh - 280px);
    min-height: 200px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
/* Farbiger Top-Rand je Stage */
.crm-pipeline-col__head {
    padding: 14px 16px 10px;
    border-top: 4px solid var(--navy);
    border-radius: 14px 14px 0 0;
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card);
}
.crm-pipeline-col__name {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--navy); flex: 1;
}
.crm-pipeline-col__meta {
    display: inline-flex; align-items: center; gap: 6px;
}
.crm-pipeline-col__count {
    background: var(--bg-muted); color: var(--text-muted);
    border-radius: 99px; font-size: 11px; padding: 2px 9px;
    font-weight: 600; font-variant-numeric: tabular-nums;
}
.crm-pipeline-col__value {
    font-size: 11px; color: var(--gold-text); font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Kartencontainer — scrollbar innerhalb der Spalte */
.crm-pipeline-col__cards {
    flex: 1 1 auto;
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px 10px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.crm-pipeline-col__cards::-webkit-scrollbar { width: 6px; }
.crm-pipeline-col__cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.crm-pipeline-col__cards.drag-over { background: rgba(201,168,76,.1); border-radius: 8px; }

/* „+ Karte hinzufügen"-Button am Fuß jeder Spalte */
.crm-pipeline-col__add {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 4px 10px 10px; padding: 10px 12px;
    background: transparent; border: 1px dashed var(--border); border-radius: 8px;
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.crm-pipeline-col__add:hover {
    background: var(--gold-pale); border-color: var(--gold);
    color: var(--gold-text); border-style: solid;
}

/* Karte — weiß, sauber, klickbar */
.crm-pipeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow .15s, transform .15s, border-color .15s;
    user-select: none;
}
.crm-pipeline-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    transform: translateY(-1px);
    border-color: var(--gold);
}
.crm-pipeline-card.is-dragging {
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
    opacity: .85; cursor: grabbing;
}
.crm-pipeline-card.is-stagnant { border-left: 3px solid #ef4444; }

.crm-pipeline-card__body { display: flex; flex-direction: column; gap: 4px; }
.crm-pipeline-card__name {
    font-size: 14px; font-weight: 600; color: var(--navy);
    text-decoration: none; line-height: 1.3;
}
.crm-pipeline-card__name:hover { color: var(--gold-text); }
.crm-pipeline-card__deal {
    font-size: 13px; color: var(--text); line-height: 1.4;
    margin-top: 2px;
}
.crm-pipeline-card__value {
    font-size: 12px; font-weight: 700; color: var(--gold-text);
    font-variant-numeric: tabular-nums; margin-top: 4px;
}
.crm-pipeline-card .crm-tag-row { margin-top: 6px; }
.crm-pipeline-card .crm-tag {
    font-size: 10px; padding: 1px 7px;
}

.crm-pipeline-card__foot {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
    font-size: 11px; color: var(--text-muted);
}
.crm-pipeline-card__stagnant { color: #c13b3b; font-weight: 600; }
.crm-pipeline-card__task { color: var(--gold-text); font-weight: 600; }
/* Move-Shortcut-Buttons ausgeblendet — Drag&Drop reicht, Modal erledigt den Rest */
.crm-pipeline-card__move { display: none; }

/* Empty-Spalten-Hinweis */
.crm-pipeline-col__empty {
    padding: 20px 14px; text-align: center;
    color: var(--text-muted); font-size: 12px; font-style: italic;
}

/* Empty-State wenn keine Pipeline da */
.crm-empty-state {
    padding: 60px 20px; text-align: center;
    background: var(--bg-card); border: 1px dashed var(--border);
    border-radius: 14px;
}
.crm-empty-icon { font-size: 48px; margin-bottom: 14px; line-height: 1; }
.crm-empty-state h2 { font-size: 1.3rem; margin: 0 0 8px; }
.crm-empty-state p { color: var(--text-muted); margin: 0 0 20px; font-size: 14px; max-width: 520px; margin: 0 auto 20px; }

/* FAB: Neue Karte (Mobile) */
.crm-pipeline-fab {
    position: fixed; bottom: 24px; right: 24px;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--gold); color: var(--navy);
    border: 0; font-size: 26px; font-weight: 300;
    box-shadow: 0 6px 18px rgba(201,168,76,.4);
    cursor: pointer; z-index: 500;
    transition: transform .15s, box-shadow .15s;
    display: none; /* Default aus; aktivierbar per Media-Query */
}
.crm-pipeline-fab:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(201,168,76,.5); }
@media (max-width: 900px) {
    .crm-pipeline-fab { display: flex; align-items: center; justify-content: center; }
}

/* Mobile — Spalten schmaler + horizontaler Swipe statt Stack */
@media (max-width: 700px) {
    .crm-pipeline-col { flex: 0 0 85vw; max-width: 85vw; }
}

/* Modal */
.crm-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px;
}
.crm-modal.is-hidden { display: none; }
.crm-modal__backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
}
.crm-modal__box {
    position: relative; z-index: 1; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 14px;
    width: 100%; max-width: 580px; max-height: calc(100vh - 80px);
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.crm-modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 0; position: sticky; top: 0;
    background: var(--bg-card); z-index: 1;
}
.crm-modal__head h2 { font-size: 1.2rem; margin: 0; }
.crm-modal__close {
    background: none; border: none; font-size: 20px; cursor: pointer;
    color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
    transition: color .15s;
}
.crm-modal__close:hover { color: var(--text); }
.crm-modal__body { padding: 20px 24px; }
.crm-modal__foot {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 24px; border-top: 1px solid var(--border);
    background: var(--bg-card); position: sticky; bottom: 0;
}
.crm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.crm-form-grid .form-group.full { grid-column: 1 / -1; }
.crm-tag-input-wrap { position: relative; }
.crm-tag-suggestions {
    position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 10;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1); max-height: 160px; overflow-y: auto;
}
.crm-tag-suggestion { padding: 7px 12px; font-size: 13px; cursor: pointer; }
.crm-tag-suggestion:hover { background: var(--bg-muted); }
.crm-tags-selected { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.crm-tag-pill {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--gold-pale); color: var(--gold-text); border: 1px solid rgba(201,168,76,.3);
    border-radius: 99px; padding: 2px 8px 2px 10px; font-size: 12px;
}
.crm-tag-pill button { background: none; border: none; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 0; }

/* Activity Modal Types — Abstand an Modal-Form-Group-Rhythmus anpassen */
.crm-act-type-tabs { display: flex; gap: 4px; margin-top: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.crm-direction-toggle {
    display: inline-flex; gap: 0; margin-top: 4px;
    border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    background: var(--bg-card);
}
.crm-direction-btn {
    padding: 8px 18px; border: 0; background: transparent;
    cursor: pointer; font-size: 14px; color: var(--text-muted);
    transition: background .15s, color .15s;
}
.crm-direction-btn:first-child { border-right: 1px solid var(--border); }
.crm-direction-btn.is-active { background: var(--gold); color: var(--navy); font-weight: 600; }
.crm-direction-btn:hover:not(.is-active) { background: var(--bg-muted); color: var(--text); }
/* Timeline Edit-Icon */
.crm-tl-edit {
    background: none; border: 0; cursor: pointer; font-size: 14px;
    opacity: .5; transition: opacity .15s, transform .15s;
    padding: 2px 6px; margin-left: 4px;
}
.crm-tl-edit:hover { opacity: 1; transform: scale(1.2); }
[data-activity-edit] { cursor: pointer; }
.crm-modal .form-group + .crm-act-type-tabs { margin-top: 16px; }
.crm-modal .form-group { margin-top: 16px; }
.crm-modal .form-group:first-child { margin-top: 0; }
.crm-act-type-btn {
    padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border);
    background: none; cursor: pointer; font-size: 13px; color: var(--text-mid);
    transition: all .15s;
}
.crm-act-type-btn.is-active, .crm-act-type-btn:hover {
    background: var(--navy); color: #fff; border-color: var(--navy);
}
[data-theme="dark"] .crm-act-type-btn.is-active { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* Import */
.crm-import-step { display: none; }
.crm-import-step.is-active { display: block; }
.crm-col-map-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.crm-col-map-table th, .crm-col-map-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.crm-col-map-table th { background: var(--bg-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.crm-import-preview { font-size: 13px; overflow-x: auto; }
.crm-import-preview table { border-collapse: collapse; }
.crm-import-preview td, .crm-import-preview th { padding: 5px 10px; border: 1px solid var(--border); white-space: nowrap; }
.crm-import-preview th { background: var(--bg-muted); }
.crm-import-format-hint {
    background: var(--bg-muted); border-radius: 8px; padding: 14px 18px;
    font-size: 13px; color: var(--text-mid); margin-bottom: 20px;
}
.crm-import-format-hint code { font-family: monospace; color: var(--navy); }
[data-theme="dark"] .crm-import-format-hint code { color: var(--gold-lt); }

/* Responsive */
@media (max-width: 900px) {
    .crm-detail-grid { grid-template-columns: 1fr; }
    .crm-detail-header { flex-wrap: wrap; }
    .crm-detail-quickactions { flex-direction: row; align-items: flex-start; width: 100%; }
    .crm-form-grid { grid-template-columns: 1fr; }
    .crm-activate-fields { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .crm-page-head { flex-direction: column; align-items: flex-start; }
    .crm-filter-bar { flex-direction: column; align-items: stretch; }
    .crm-filter-search, .crm-filter-select { width: 100%; }
    .crm-pipeline-col { flex: 0 0 200px; }
    .crm-modal { padding: 0; align-items: flex-end; }
    .crm-modal__box { border-radius: 14px 14px 0 0; max-height: 90vh; }
    .crm-kpi-bar { gap: 8px; }
    .crm-kpi { min-width: 80px; padding: 10px 14px; }
    .crm-kpi__val { font-size: 1.5rem; }
    .crm-widget-grid { grid-template-columns: 1fr; }
    .crm-activate-box { padding: 32px 20px; }
}

/* ============================================================
   TARIFE / PLANS PAGE
   ============================================================ */

/* --- Period Toggle --- */
.plans-period-wrap { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 0 auto 2rem; }
.plans-period-toggle { display: flex; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.plans-period-btn { padding: 7px 20px; border-radius: 6px; border: none; background: transparent; cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); transition: background 0.18s, color 0.18s; white-space: nowrap; }
.plans-period-btn.is-active { background: var(--navy); color: #fff; }
.plans-period-save { background: var(--gold); color: var(--navy); font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }

/* --- Plans Grid --- */
.plans-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 860px; margin: 0 auto 2.5rem; }

/* --- Plan Card --- */
.plan-card { border: 1px solid var(--border); border-radius: 14px; padding: 2rem; background: var(--bg-card); display: flex; flex-direction: column; position: relative; }
.plan-card--pro { border-color: var(--gold); border-width: 2px; }
.plan-card--free { background: var(--bg-app); }
.plan-card__recommended { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 14px; border-radius: 20px; white-space: nowrap; }
.plan-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 0.9rem; }
.plan-badge--free { background: var(--border); color: var(--text-muted); }
.plan-badge--pro  { background: rgba(194,155,55,0.18); color: var(--gold); }
.plan-name { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.25rem; }
.plan-tagline { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1.25rem; line-height: 1.4; }
.plan-price { margin-bottom: 1.5rem; }
.plan-price__main { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.plan-price__period { display: block; font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.plan-price__netto  { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan-features li { padding: 6px 0; font-size: 0.875rem; display: flex; align-items: flex-start; gap: 8px; border-bottom: 1px solid var(--border); line-height: 1.4; }
.plan-features li:last-child { border-bottom: none; }
.plan-features .pf-check { color: #22c55e; flex-shrink: 0; font-weight: 700; margin-top: 1px; }
.plan-features .pf-dim   { color: var(--text-muted); }
.plan-features .pf-sec   { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding-top: 10px; border-bottom: none !important; }
.plan-features .pf-sec--sub { padding-top: 14px; color: var(--gold); }
.bn-plan__list--sectioned { padding-left: 0; list-style: none; }
.bn-plan__list--sectioned .bn-plan__module { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); margin-top: 14px; padding: 0; border: none; }
.bn-plan__list--sectioned .bn-plan__module:first-child { margin-top: 4px; }
.plan-features .pf-star  { color: var(--gold); flex-shrink: 0; font-weight: 700; margin-top: 1px; }
.plan-cta .btn { width: 100%; text-align: center; display: block; }

/* --- Current Subscription Card --- */
.plan-current-card { border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.5rem; background: var(--bg-card); margin-bottom: 2rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-current-card.is-warning { border-color: #f59e0b; background: rgba(245,158,11,0.05); }
.plan-current-card.is-ending  { border-color: #e55a00; background: rgba(229,90,0,0.04); }
.plan-current-body h3 { margin: 0 0 4px; font-size: 1rem; }
.plan-current-body p  { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.plan-current-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; align-items: flex-start; }
.sub-status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 20px; }
.sub-status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.sub-status-pill--active   { background: rgba(34,197,94,0.12); color: #15803d; }
.sub-status-pill--active::before { background: #22c55e; }
.sub-status-pill--trialing { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.sub-status-pill--trialing::before { background: #3b82f6; }
.sub-status-pill--past-due { background: rgba(245,158,11,0.12); color: #92400e; }
.sub-status-pill--past-due::before { background: #f59e0b; }
.sub-status-pill--canceled  { background: rgba(225,29,72,0.12); color: #9f1239; }
.sub-status-pill--canceled::before { background: #e11d48; }

/* --- Add-ons Section --- */
.plans-addons { max-width: 860px; margin: 0 auto 2.5rem; }
.plans-addons__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1.1rem; flex-wrap: wrap; }
.plans-addons__head h2 { margin: 0; font-size: 1.2rem; }
.plans-addons__sub { font-size: 0.85rem; color: var(--text-muted); }
.addon-row { border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; background: var(--bg-card); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.25rem; margin-bottom: 0.75rem; }
.addon-info h3 { margin: 0 0 3px; font-size: 1rem; }
.addon-info p  { margin: 0; font-size: 0.82rem; color: var(--text-muted); }
.addon-pricing { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.addon-price { text-align: right; }
.addon-price__val  { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.addon-price__lbl  { display: block; font-size: 0.7rem; color: var(--text-muted); }
.addon-price__pro  { color: var(--navy); }
.addon-divider { width: 1px; height: 36px; background: var(--border); }
.plans-addons__note { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }

/* --- FAQ / Transparency --- */
.plans-faq { max-width: 860px; margin: 0 auto 2rem; }
.plans-faq h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.plans-faq details { border-bottom: 1px solid var(--border); }
.plans-faq summary { padding: 0.9rem 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; gap: 1rem; }
.plans-faq summary::-webkit-details-marker { display: none; }
.plans-faq summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; color: var(--text-muted); flex-shrink: 0; }
.plans-faq details[open] summary::after { content: '-'; }
.plans-faq .faq-body { padding: 0 0 0.9rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

/* --- Admin Test Zone --- */
.plans-admin-test { border: 2px dashed var(--border); border-radius: 10px; padding: 1rem 1.25rem 1.25rem; margin-top: 3rem; opacity: 0.85; }
.plans-admin-test__head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 0.75rem; display: flex; align-items: center; gap: 8px; }
.test-plans-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.test-plan-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; background: var(--bg-card); min-width: 190px; }
.test-plan-card h4 { margin: 0 0 2px; font-size: 0.85rem; }
.test-plan-card p  { margin: 0 0 8px; font-size: 0.78rem; color: var(--text-muted); }

/* --- Mobile --- */
@media (max-width: 720px) {
    .plans-main-grid { grid-template-columns: 1fr; }
    .plan-card--pro { margin-top: 1rem; }
}
@media (max-width: 600px) {
    .plan-current-card { flex-direction: column; }
    .plan-current-actions { width: 100%; }
    .addon-row { grid-template-columns: 1fr; }
    .addon-pricing { justify-content: flex-start; }
}

/* ==========================================================================
   CRM Pipeline V1.1 — Stages-Verwaltung, Filter, Popovers
   ========================================================================== */
.crm-page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.crm-board-filter { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-card); }
.crm-board-filter__btn { background: transparent; border: 0; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.crm-board-filter__btn:hover { background: var(--bg-muted); color: var(--navy); }
.crm-board-filter__btn.is-active { background: var(--navy); color: #fff; }

.crm-pipeline-col.is-hidden-by-filter { display: none !important; }

.crm-pipeline-col__menu-btn {
    background: transparent; border: 0; padding: 2px 8px; border-radius: 6px;
    font-size: 18px; line-height: 1; color: var(--text-muted); cursor: pointer;
    font-weight: 700;
}
.crm-pipeline-col__menu-btn:hover { background: var(--bg-muted); color: var(--navy); }

.crm-pipeline-tab__menu {
    background: transparent; border: 0; padding: 0 6px; margin-left: 4px;
    font-size: 16px; line-height: 1; color: inherit; cursor: pointer; border-radius: 6px;
    font-weight: 700;
}
.crm-pipeline-tab__menu:hover { background: rgba(0,0,0,.08); }

.crm-stage-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; margin-left: 4px; vertical-align: middle; }
.crm-stage-badge--won  { background: #d1fae5; color: #065f46; }
.crm-stage-badge--lost { background: #fee2e2; color: #991b1b; }

.crm-pipeline-col--won  { opacity: .92; }
.crm-pipeline-col--won  .crm-pipeline-col__head { background: linear-gradient(180deg, #ecfdf5, var(--bg-card)); }
.crm-pipeline-col--lost { opacity: .88; }
.crm-pipeline-col--lost .crm-pipeline-col__head { background: linear-gradient(180deg, #fef2f2, var(--bg-card)); }

/* + Stufe hinzufügen – Ghost-Spalte */
.crm-pipeline-col--add-stage {
    background: transparent !important;
    box-shadow: none !important;
    min-height: 160px;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 14px;
}
.crm-pipeline-col__add-stage {
    width: 100%;
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 20px 14px;
    color: var(--text-muted);
    font-weight: 600; font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}
.crm-pipeline-col__add-stage:hover { border-color: var(--gold); color: var(--gold-text); background: var(--gold-pale); }

/* Popover-Menü (Stage + Pipeline) */
.crm-popover-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: flex; flex-direction: column; gap: 2px;
}
.crm-popover-menu button {
    background: transparent; border: 0; padding: 9px 12px; text-align: left;
    border-radius: 7px; font-size: 14px; color: var(--text); cursor: pointer;
}
.crm-popover-menu button:hover { background: var(--bg-muted); color: var(--navy); }
.crm-popover-menu button.is-danger { color: #b91c1c; }
.crm-popover-menu button.is-danger:hover { background: #fee2e2; color: #991b1b; }
.crm-popover-menu__sep { height: 1px; background: var(--border); margin: 4px 2px; }

/* Stage-Edit-Modal */
.crm-stage-color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-stage-color-row input[type="color"] { width: 44px; height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0; cursor: pointer; }
.crm-stage-color-presets { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.crm-stage-color-preset { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.crm-stage-color-preset:hover { transform: scale(1.15); }

.form-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Pipeline V1.1 Modal-Body als eigenständige Box */
#crm-stage-modal .crm-modal__body,
#crm-pipeline-rename-modal .crm-modal__body {
    position: relative; z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%; max-width: 520px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 24px 24px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
#crm-stage-modal .crm-modal__close,
#crm-pipeline-rename-modal .crm-modal__close {
    position: absolute; top: 10px; right: 12px;
}
.crm-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.crm-modal__error { color: #b91c1c; background: #fee2e2; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-top: 10px; }
.crm-modal__error[hidden] { display: none; }
#crm-stage-modal .form-row,
#crm-pipeline-rename-modal .form-row { margin-bottom: 14px; }
#crm-stage-modal label,
#crm-pipeline-rename-modal label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--navy); }

/* =========================================================================
   BN Help Center (hc-*)
   ========================================================================= */
.hc-hero { background: var(--navy, #1a2744); color: #fff; padding: 56px 24px 48px; text-align: center; }
.hc-hero__inner { max-width: 800px; margin: 0 auto; }
.hc-hero__title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; margin: 0 0 12px; line-height: 1.2; }
.hc-hero__lead { font-size: 1.05rem; color: rgba(255,255,255,.75); margin: 0 0 28px; }
.hc-search-form { width: 100%; }
.hc-search-wrap { display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 4px 4px 4px 14px; gap: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.hc-search-ico { width: 18px; height: 18px; color: #999; flex-shrink: 0; }
.hc-search-input { flex: 1; border: none; outline: none; font-size: 1rem; background: transparent; color: #1a1a1a; padding: 10px 0; min-width: 0; }
.hc-search-input::placeholder { color: #aaa; }
.hc-search-btn { background: var(--gold, #c9a84c); color: var(--navy, #1a2744); border: none; border-radius: 7px; padding: 10px 20px; font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s; }
.hc-search-btn:hover { background: #b8943f; }
.hc-quicklinks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: .85rem; color: rgba(255,255,255,.6); }
.hc-ql { background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 4px 14px; font-size: .83rem; cursor: pointer; transition: background .15s, color .15s; }
.hc-ql:hover { background: rgba(255,255,255,.22); color: #fff; }
.hc-status-strip { background: #f5f5f3; border-bottom: 1px solid #e5e4dd; padding: 10px 24px; }
.hc-status-strip__inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 10px; font-size: .82rem; color: #666; }
.hc-status-strip__label { font-weight: 600; color: #444; }
.hc-status-strip__link { margin-left: auto; color: var(--navy); font-size: .8rem; text-decoration: none; }
.hc-status-strip__link:hover { color: var(--gold); }
.hc-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 0; }
.hc-section-heading { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 0 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold, #c9a84c); display: inline-block; }
[data-theme="dark"] .hc-section-heading { color: #e9eaec; }
.hc-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hc-module-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px 16px; background: #fff; border: 1px solid #e5e4dd; border-radius: 12px; cursor: pointer; text-align: left; transition: box-shadow .15s, border-color .15s, transform .12s; position: relative; width: 100%; }
.hc-module-card:hover:not(.hc-module-card--soon) { box-shadow: 0 4px 18px rgba(0,0,0,.1); border-color: var(--gold, #c9a84c); transform: translateY(-2px); }
.hc-module-card--soon { cursor: default; opacity: .6; }
[data-theme="dark"] .hc-module-card { background: #252d42; border-color: #2e3a52; }
[data-theme="dark"] .hc-module-card:hover:not(.hc-module-card--soon) { border-color: var(--gold); box-shadow: 0 4px 18px rgba(0,0,0,.3); }
.hc-module-card__icon { width: 44px; height: 44px; background: rgba(201,168,76,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold, #c9a84c); }
.hc-module-card__icon svg { width: 22px; height: 22px; }
.hc-module-card__body { flex: 1; min-width: 0; }
.hc-module-card__title { display: block; font-size: .95rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
[data-theme="dark"] .hc-module-card__title { color: #e9eaec; }
.hc-module-card__desc { display: block; font-size: .8rem; color: #777; line-height: 1.4; }
[data-theme="dark"] .hc-module-card__desc { color: #9aa0b0; }
.hc-module-card__arrow { width: 16px; height: 16px; color: #bbb; flex-shrink: 0; margin-top: 4px; }
.hc-module-card:hover .hc-module-card__arrow { color: var(--gold); }
.hc-soon-badge { position: absolute; top: 10px; right: 10px; background: #f0f0f0; color: #888; font-size: .7rem; border-radius: 20px; padding: 2px 8px; font-weight: 500; }
.hc-featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hc-featured__item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid #e5e4dd; border-radius: 8px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; width: 100%; }
.hc-featured__item:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
[data-theme="dark"] .hc-featured__item { background: #252d42; border-color: #2e3a52; }
.hc-featured__kind { font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.hc-kind--help    { background: #e0f0ff; color: #155fa0; }
.hc-kind--faq     { background: #f0f7e6; color: #3a7a1e; }
.hc-kind--error   { background: #fff0e6; color: #a04010; }
.hc-kind--pricing { background: #f5e6ff; color: #6a2fa0; }
.hc-kind--action  { background: #fff8e0; color: #8a6a00; }
.hc-kind--sales   { background: #e6f5ff; color: #0a5fa0; }
.hc-featured__title { flex: 1; font-size: .88rem; color: var(--navy); font-weight: 500; }
[data-theme="dark"] .hc-featured__title { color: #e9eaec; }
.hc-featured__arrow { width: 14px; height: 14px; color: #bbb; flex-shrink: 0; }
.hc-featured__item:hover .hc-featured__arrow { color: var(--gold); }
.hc-panel { margin-bottom: 16px; }
.hc-panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e4dd; }
.hc-panel__back { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); border: none; cursor: pointer; color: #fff; font-size: .875rem; font-weight: 600; padding: 8px 16px 8px 10px; border-radius: 8px; transition: background .15s, transform .1s; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.hc-panel__back:hover { background: #1a2f5e; transform: translateX(-2px); }
.hc-panel__back:active { transform: translateX(0); }
.hc-panel__back svg { width: 18px; height: 18px; flex-shrink: 0; }
[data-theme="dark"] .hc-panel__back { background: rgba(255,255,255,.12); color: #e9eaec; }
[data-theme="dark"] .hc-panel__back:hover { background: rgba(255,255,255,.2); }
.hc-panel__title { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin: 0; }
[data-theme="dark"] .hc-panel__title { color: #e9eaec; }
.hc-results-list { display: flex; flex-direction: column; gap: 6px; }
.hc-result-item { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #fff; border: 1px solid #e5e4dd; border-radius: 8px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; width: 100%; }
.hc-result-item:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,.07); }
[data-theme="dark"] .hc-result-item { background: #252d42; border-color: #2e3a52; }
.hc-result-item__title { flex: 1; font-size: .9rem; font-weight: 500; color: var(--navy); }
[data-theme="dark"] .hc-result-item__title { color: #e9eaec; }
.hc-no-results { color: #888; font-size: .9rem; padding: 20px 0; }
.hc-loading { display: flex; gap: 6px; padding: 24px 0; justify-content: center; }
.hc-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: hc-bounce .8s infinite ease-in-out; }
.hc-loading span:nth-child(2) { animation-delay: .15s; }
.hc-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes hc-bounce { 0%,80%,100%{transform:scale(.7);opacity:.5} 40%{transform:scale(1);opacity:1} }
/* --- Artikel-Detail -------------------------------------------------------- */
.hc-article { padding: 0 0 20px; }
.hc-article__title {
    font-size: 1.25rem; font-weight: 700; color: var(--navy);
    margin: 12px 0 20px; line-height: 1.3;
    padding-bottom: 14px; border-bottom: 2px solid var(--gold);
    display: inline-block; width: 100%;
}
[data-theme="dark"] .hc-article__title { color: #e9eaec; }

/* Screenshot-Vorschau — kompakt, zentriert, wie eine Produktdemo */
.hc-article__img-wrap {
    display: block; margin: 20px auto;
    max-width: 520px;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
    border: 1px solid #ddd; line-height: 0;
    position: relative;
}
.hc-article__img-wrap::before {
    content: "So sieht es aus";
    display: block; line-height: 1;
    font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: var(--navy);
    padding: 5px 10px; position: absolute; top: 0; left: 0;
    border-bottom-right-radius: 6px; z-index: 1;
}
[data-theme="dark"] .hc-article__img-wrap { border-color: #2e3a52; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.hc-article__img { width: 100%; height: auto; display: block; }

/* Artikel-Body Typographie */
.hc-article__body { font-size: .92rem; line-height: 1.7; color: #3a3a3a; }
[data-theme="dark"] .hc-article__body { color: #c8cad0; }
.hc-article__body h4 {
    font-size: .97rem; font-weight: 700; color: var(--navy);
    margin: 22px 0 8px; padding-left: 10px;
    border-left: 3px solid var(--gold);
}
[data-theme="dark"] .hc-article__body h4 { color: #e4e8f0; }
.hc-article__body p { margin: 0 0 10px; }
.hc-article__body ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.hc-article__body ul li {
    padding: 4px 0 4px 20px; position: relative; color: #3a3a3a;
}
[data-theme="dark"] .hc-article__body ul li { color: #c8cad0; }
.hc-article__body ul li::before {
    content: "▸"; color: var(--gold); position: absolute; left: 0; top: 4px;
    font-size: .8rem;
}
.hc-article__body ol { margin: 0 0 12px; padding-left: 0; list-style: none; counter-reset: hc-ol; }
.hc-article__body ol li {
    padding: 5px 0 5px 28px; position: relative;
    counter-increment: hc-ol;
}
.hc-article__body ol li::before {
    content: counter(hc-ol);
    position: absolute; left: 0; top: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--navy); color: var(--gold);
    font-size: .72rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
[data-theme="dark"] .hc-article__body ol li::before { background: #2e3a58; }
.hc-article__body hr {
    border: none; border-top: 1px solid #e8e7e0;
    margin: 20px 0;
}
[data-theme="dark"] .hc-article__body hr { border-color: #2e3a52; }
.hc-article__body strong { color: var(--navy); font-weight: 700; }
[data-theme="dark"] .hc-article__body strong { color: #e4e8f0; }
.hc-article__body code {
    background: #f0f2f5; padding: 1px 6px; border-radius: 4px;
    font-size: .84em; color: #c0392b;
}
[data-theme="dark"] .hc-article__body code { background: #1e2638; color: #e8a87c; }
.hc-article__body a { color: var(--navy); font-weight: 500; text-decoration: underline; }
[data-theme="dark"] .hc-article__body a { color: var(--gold); }
.hc-article__body table { width: 100%; border-collapse: collapse; font-size: .87rem; margin: 12px 0 16px; }
.hc-article__body th { background: var(--navy); color: #fff; padding: 8px 12px; text-align: left; font-weight: 600; }
.hc-article__body td { padding: 7px 12px; border-bottom: 1px solid #e8e7e0; }
.hc-article__body tr:last-child td { border-bottom: none; }
[data-theme="dark"] .hc-article__body td { border-color: #2e3a52; color: #c8cad0; }

/* Fußzeile */
.hc-article__foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e4dd; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
[data-theme="dark"] .hc-article__foot { border-color: #2e3a52; }
.hc-article__back-link { background: none; border: none; cursor: pointer; color: #666; font-size: .84rem; font-weight: 500; padding: 0; display: flex; align-items: center; gap: 5px; }
.hc-article__back-link:hover { color: var(--navy); }
[data-theme="dark"] .hc-article__back-link { color: #9aa0b0; }

/* Result-Liste — Schritt-Nummer bei Erste-Schritte-Sequenz */
.hc-result-item__step {
    min-width: 22px; height: 22px; border-radius: 50%;
    background: var(--navy); color: var(--gold);
    font-size: .72rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .hc-result-item__step { background: #2e3a58; }
.hc-legal { margin-top: 48px; }
.hc-accordion { display: flex; flex-direction: column; gap: 6px; }
.hc-accordion__item { border: 1px solid #e5e4dd; border-radius: 8px; background: #fff; overflow: hidden; }
[data-theme="dark"] .hc-accordion__item { background: #252d42; border-color: #2e3a52; }
.hc-accordion__summary { cursor: pointer; font-weight: 500; font-size: .9rem; padding: 14px 16px; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--navy); }
[data-theme="dark"] .hc-accordion__summary { color: #e9eaec; }
.hc-accordion__summary::-webkit-details-marker { display: none; }
.hc-accordion__summary::before { content: "▸"; color: var(--gold); transition: transform .15s; flex-shrink: 0; }
.hc-accordion__item[open] .hc-accordion__summary::before { transform: rotate(90deg); }
.hc-accordion__body { padding: 14px 16px 16px; font-size: .88rem; line-height: 1.6; border-top: 1px solid #eee; }
.hc-cta { margin: 48px -24px 0; background: linear-gradient(135deg, var(--navy,#1a2744) 0%, #243460 100%); padding: 48px 24px; text-align: center; color: #fff; }
.hc-cta__inner { max-width: 560px; margin: 0 auto; }
.hc-cta__heading { font-size: 1.4rem; font-weight: 700; margin: 0 0 10px; }
.hc-cta__lead { color: rgba(255,255,255,.75); margin: 0 0 24px; font-size: .97rem; }
.hc-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hc-cta .btn--outline-light { background: transparent; border: 2px solid rgba(255,255,255,.4); color: #fff; padding: 10px 22px; border-radius: 8px; font-size: .9rem; font-weight: 600; text-decoration: none; display: inline-block; transition: border-color .15s, background .15s; }
.hc-cta .btn--outline-light:hover { border-color: var(--gold); background: rgba(201,168,76,.15); }
/* --- Artikel-Feedback --------------------------------------------------- */
.hc-feedback {
    margin-top: 24px; padding: 18px 20px;
    background: #f8f8f6; border-radius: 10px;
    border: 1px solid #e5e4dd;
    display: flex; flex-direction: column; gap: 12px;
}
[data-theme="dark"] .hc-feedback { background: #1e2638; border-color: #2e3a52; }
.hc-feedback__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hc-feedback__q,
.hc-feedback__question { font-size: .88rem; font-weight: 600; color: var(--navy); }
[data-theme="dark"] .hc-feedback__q,
[data-theme="dark"] .hc-feedback__question { color: #e9eaec; }
.hc-feedback__btns { display: flex; gap: 10px; }
.hc-feedback__btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 20px;
    border: 2px solid #ddd; background: #fff;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    color: #555;
}
[data-theme="dark"] .hc-feedback__btn { background: #252d42; border-color: #3a4a62; color: #c0c8d8; }
.hc-feedback__btn:hover { border-color: var(--gold); color: var(--navy); }
.hc-feedback__btn--up.is-active   { border-color: #24a34c; background: #d7f5e2; color: #176a37; }
.hc-feedback__btn--down.is-active { border-color: #e05050; background: #fde0e0; color: #8a1919; }
.hc-feedback__thanks { font-size: .85rem; color: #555; display: none; }
.hc-feedback__thanks.is-visible { display: block; }
[data-theme="dark"] .hc-feedback__thanks { color: #9aa0b0; }
.hc-feedback__chat {
    display: none; margin-top: 4px;
    padding-top: 12px; border-top: 1px solid #e5e4dd;
    gap: 10px; align-items: center;
}
.hc-feedback__chat.is-visible { display: flex; }
.hc-feedback__chat-text,
.hc-feedback__needs-help { font-size: .85rem; color: #555; flex: 1; }
[data-theme="dark"] .hc-feedback__chat-text,
[data-theme="dark"] .hc-feedback__needs-help { color: #9aa0b0; }
.hc-feedback__chat-btn {
    display: flex; align-items: center; gap: 6px;
    background: var(--gold); color: var(--navy);
    border: none; border-radius: 20px;
    padding: 7px 16px; font-size: .83rem; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    transition: background .15s;
}
.hc-feedback__chat-btn:hover { background: #b8943f; }
.hc-feedback__chat-btn svg { width: 14px; height: 14px; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) { .hc-featured { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .hc-modules { grid-template-columns: repeat(2,1fr); } .hc-featured { grid-template-columns: 1fr; } .hc-hero { padding: 40px 16px 32px; } }
@media (max-width: 480px) { .hc-modules { grid-template-columns: 1fr; } .hc-module-card { padding: 14px 12px; } .hc-search-btn { padding: 10px 14px; font-size: .82rem; } .hc-cta { margin: 40px -16px 0; padding: 36px 16px; } }


/* Sortable column links (tasks, time entries) */
.crm-sort-link { color: inherit; text-decoration: none; display: inline-block; }
.crm-sort-link:hover { color: var(--gold-text); text-decoration: underline; }
th .crm-sort-link { font-weight: inherit; }



/* Sidebar Sub-Navigation (z.B. unter BN Time) */
.side-nav__sub { list-style: none; margin: 4px 0 6px 24px; padding: 0; border-left: 2px solid var(--border); }
.side-nav__sub li { margin: 0; }
.side-nav__sub a { display: block; padding: 5px 10px; font-size: 13px; color: var(--text-mid); text-decoration: none; border-radius: 4px; transition: color .15s, background .15s; }
.side-nav__sub a:hover { color: var(--gold-text); background: var(--bg-muted); }
.side-nav__sub a.is-active { color: var(--gold-text); font-weight: 600; background: var(--bg-muted); }


/* BN Time: Content-Bereiche als Cards (weißer Hintergrund, Border, CI-Muster) */
.time-page .bn-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}
.time-page .bn-table-wrap + .bn-table-wrap { margin-top: 16px; }
.time-page .time-filters {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.time-page .time-filters input,
.time-page .time-filters select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    min-height: 34px;
}
.time-page .time-project-actions,
.time-page .time-export-actions {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.time-page .time-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.time-page .time-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.time-page .time-stat__value { font-size: 24px; font-weight: 700; color: var(--navy); font-family: var(--font-serif); }
[data-theme="dark"] .time-page .time-stat__value { color: var(--gold-lt); }
.time-page .time-stat__label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.time-page table.bn-table { margin: 0; }

/* Mobile: Filters stapeln */
@media (max-width: 600px) {
    .time-page .time-filters { flex-direction: column; align-items: stretch; }
    .time-page .time-filters input,
    .time-page .time-filters select,
    .time-page .time-filters button,
    .time-page .time-filters .btn { width: 100%; }
}

/* BN Time: Tab-Navigation deutlich sichtbar (CI: Navy + Gold-Akzent) */
.time-page .bn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}
.time-page .bn-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.time-page .bn-tabs a:hover {
    background: var(--bg-muted);
    color: var(--navy);
    border-color: var(--border);
}
.time-page .bn-tabs a.is-active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    box-shadow: 0 2px 6px rgba(26,39,68,.15);
}
.time-page .bn-tabs a.is-active::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold);
    margin-right: 2px;
}
[data-theme="dark"] .time-page .bn-tabs a.is-active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
[data-theme="dark"] .time-page .bn-tabs a.is-active::before { background: var(--navy); }
@media (max-width: 600px) {
    .time-page .bn-tabs { padding: 4px; gap: 2px; }
    .time-page .bn-tabs a { padding: 8px 12px; font-size: 13px; flex: 1 1 auto; justify-content: center; }
}

/* BN Time: Abrechnungs-Vormerkung (Daumen-Toggle) */
.bn-bill-thumb {
    border: 1.5px solid var(--border);
    background: var(--surface);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, transform .15s;
}
.bn-bill-thumb:hover { transform: scale(1.08); }
.bn-bill-thumb.is-up {
    background: rgba(90,140,90,.15);
    border-color: var(--success);
    color: var(--success);
}
.bn-bill-thumb.is-down {
    background: rgba(194,50,50,.08);
    border-color: #c23232;
    color: #c23232;
    opacity: .85;
}
.bn-bill-row.is-excluded td {
    opacity: .45;
    text-decoration: line-through;
}
.bn-bill-row.is-excluded td:first-child,
.bn-bill-row.is-excluded td:last-child {
    opacity: 1;
    text-decoration: none;
}
.bn-bill-row.is-selected td {
    background: rgba(90,140,90,.04);
}
.btn.is-disabled, .btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Onboarding: gesperrte Sidebar-Links (Admin-User nicht betroffen) */
.side-nav a.is-locked { opacity: .55; }
.side-nav a.is-locked:hover { opacity: .8; }
.side-nav__lock { font-size: 11px; margin-left: 4px; opacity: .7; }

/* Onboarding-Wizard: MCard-Fallback falls schon styled */
.page-onboarding .mcard { background: var(--surface); }
.page-onboarding .form-group { margin-bottom: 14px; }
.page-onboarding .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-mid); }
.page-onboarding .form-control { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 14px; }
.page-onboarding .form-control:focus { border-color: var(--gold); outline: 0; }

/* Onboarding-Wizard: Abschnitte + Grids + Consent (CI-harmonisch, mobile-first) */
.onb-wrap .onb-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.onb-wrap .onb-section:first-of-type { margin-top: 16px; border-top: 0; padding-top: 0; }
.onb-section__hd {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
}
[data-theme="dark"] .onb-section__hd { color: var(--gold-lt); }

/* Grids */
.onb-grid { display: grid; gap: 12px; }
.onb-grid--2 { grid-template-columns: 1fr 1fr; }
.onb-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
/* Spezialraster für PLZ/Ort/Land — PLZ klein */
.onb-grid--3col { grid-template-columns: 140px 1fr 200px; }

/* Form-Controls einheitlich */
.onb-wrap .form-group { margin-bottom: 14px; }
.onb-wrap .form-group:last-child { margin-bottom: 0; }
.onb-wrap .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
}
.onb-wrap .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    min-height: 42px;
    transition: border-color .15s, box-shadow .15s;
}
.onb-wrap .form-control:focus {
    border-color: var(--gold);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(201,168,76,.2);
}
.onb-wrap select.form-control { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* DSGVO-Consent-Box */
.onb-consent {
    margin-top: 24px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(201,168,76,.08), rgba(201,168,76,.02));
    border: 1px solid rgba(201,168,76,.3);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
}
.onb-consent__label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 0; }
.onb-consent__cb { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--navy); cursor: pointer; }
.onb-consent__text { font-size: 13px; line-height: 1.55; flex: 1; }
.onb-consent__text strong { display: block; font-size: 14px; color: var(--navy); margin-bottom: 4px; font-family: var(--font-serif); }
[data-theme="dark"] .onb-consent__text strong { color: var(--gold-lt); }
.onb-consent__links { display: inline-flex; gap: 14px; margin-top: 8px; font-size: 12px; }
.onb-consent__links a { color: var(--text-muted); text-decoration: none; }
.onb-consent__links a:hover { color: var(--gold); text-decoration: underline; }

/* Logo-Preview */
.onb-logo-preview {
    display: inline-block;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fff;
}
.onb-logo-preview img { max-width: 240px; max-height: 80px; display: block; }
.onb-file { padding: 8px 10px; cursor: pointer; }
.onb-hint { font-size: 12px; color: var(--text-muted); margin: 6px 0 10px; line-height: 1.5; }

/* Zusammenfassung (Step 5) */
.onb-summary { list-style: none; padding: 0; margin: 18px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.onb-summary__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.onb-summary__item:last-child { border-bottom: 0; }
.onb-summary__icon {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
    background: var(--bg-muted); color: var(--text-muted);
}
.onb-summary__item.is-ok  .onb-summary__icon { background: rgba(90,140,90,.18); color: var(--success); }
.onb-summary__item.is-req .onb-summary__icon { background: rgba(194,50,50,.15); color: #c23232; }
.onb-summary__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.onb-summary__body strong { font-size: 14px; color: var(--text); }
.onb-summary__hint { font-size: 12px; color: var(--text-muted); }
.onb-summary__hint.is-err { color: #c23232; font-weight: 600; }

/* Mobile — alles stackt */
@media (max-width: 600px) {
    .onb-grid--2,
    .onb-grid--3,
    .onb-grid--3col { grid-template-columns: 1fr; }
    .onb-wrap .mcard { padding: 18px 16px; }
    .onb-wrap .mcard__title { font-size: 18px; }
    .onb-consent { padding: 14px; }
    .onb-summary__item { flex-wrap: wrap; }
    .onb-summary__item .btn { width: 100%; margin-top: 8px; }
}

/* ============================================================
   Einstellungen-Hub — linke Seitenleiste + rechter Content
   ============================================================ */
.settings-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}
.settings-side {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    position: sticky;
    top: calc(var(--header-h) + 18px);
    max-height: calc(100vh - var(--header-h) - 36px);
    overflow-y: auto;
}
.settings-side__list { list-style: none; margin: 0; padding: 0; }
.settings-side__item { margin: 0; }
.settings-side__link {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 14px;
    transition: background .12s, color .12s;
}
.settings-side__link:hover {
    background: var(--bg-muted);
    color: var(--text);
}
.settings-side__link.is-active {
    background: var(--gold-pale);
    color: var(--navy);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}
[data-theme="dark"] .settings-side__link.is-active {
    background: rgba(206,166,75,.12);
    color: var(--gold-lt);
}
.settings-side__icon { font-size: 16px; flex-shrink: 0; }
.settings-side__label { flex: 1; }
.settings-side__sub {
    list-style: none; margin: 4px 0 8px 0;
    padding: 0 0 0 28px;
    border-left: 1px solid var(--border);
    margin-left: 22px;
}
.settings-side__sublink {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    margin: 2px 0;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: background .12s, color .12s;
}
.settings-side__sublink:hover {
    background: var(--bg-muted);
    color: var(--text);
}
.settings-side__sublink.is-active {
    background: var(--gold-pale);
    color: var(--navy);
    font-weight: 500;
}
[data-theme="dark"] .settings-side__sublink.is-active {
    background: rgba(206,166,75,.12);
    color: var(--gold-lt);
}
.settings-content {
    min-width: 0; /* erlaubt Tabellen, Bildern etc. eigenes overflow */
}

/* Mobile: Sidebar wird zur horizontalen Scrollbar oben */
@media (max-width: 860px) {
    .settings-shell {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .settings-side {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding: 6px;
    }
    .settings-side__list {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .settings-side__item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    .settings-side__link { white-space: nowrap; }
    /* Sub-Liste auf Mobile horizontal unter dem aktiven Tab */
    .settings-side__sub {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        margin: 6px 0 0;
        padding: 0;
        border-left: 0;
    }
    .settings-side__sublink { white-space: nowrap; }
}

/* Settings-Hub: Breadcrumb-Header (statt riesiger H1) */
.settings-breadcrumb {
    font-size: 14px;
    color: var(--text-mid);
    padding: 4px 0;
}
.settings-breadcrumb__path {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    font-weight: 400;
}
.settings-breadcrumb__path strong {
    color: var(--navy);
    font-weight: 600;
}
[data-theme="dark"] .settings-breadcrumb__path strong { color: var(--gold-lt); }
.settings-breadcrumb__sep {
    color: var(--text-muted);
    font-weight: 300;
}
