@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

/* Native <dialog>: zentrieren (der margin:0-Reset oben killt sonst die UA-Zentrierung
   und der Dialog klebt oben links). showModal() + diese Regel = mittig auf dem Screen. */
dialog {
  margin: auto;
  position: fixed;
  inset: 0;
  max-height: calc(100dvh - 2rem);
}
dialog::backdrop {
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

:root {
  --navy:       #142137;
  --navy-mid:   #0d1525;
  --navy-light: #1a2d47;
  --gold:       #f9b233;
  --gold-dim:   rgba(249,178,51,0.12);
  --gold-glow:  rgba(249,178,51,0.22);

  --bg:         #090e1a;
  --surface:    rgba(255,255,255,0.04);
  --surface-2:  rgba(255,255,255,0.07);
  --surface-solid:   #0f172a;
  --surface-solid-2: #0d1525;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.13);

  --text:       #ffffff;
  --muted:      #f1f5f9;
  --muted-2:    #e2e8f0;

  --green:      #4ade80;
  --green-dim:  rgba(74,222,128,0.12);
  --red:        #f87171;
  --red-dim:    rgba(248,113,113,0.12);

  --sidebar-w:  240px;
  --topbar-h:   84px;
  --radius:     12px;
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Override (nur Backend) */
[data-theme="light"] {
  --navy:       #f8fafc;
  --navy-mid:   #f1f5f9;
  --navy-light: #e2e8f0;
  --gold-dim:   rgba(249,178,51,0.14);
  --gold-glow:  rgba(249,178,51,0.25);

  --bg:         #f8fafc;
  --surface:    #ffffff;
  --surface-2:  #f1f5f9;
  --surface-solid:   #ffffff;
  --surface-solid-2: #f1f5f9;
  --border:     rgba(20,33,55,0.08);
  --border-2:   rgba(20,33,55,0.14);

  --text:       #142137;
  --muted:      #64748b;
  --muted-2:    #475569;

  --green-dim:  rgba(34,197,94,0.12);
  --red-dim:    rgba(220,38,38,0.10);
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .sidebar { background: #ffffff; border-right-color: var(--border); }
[data-theme="light"] .topbar  { background: rgba(255,255,255,.85); }
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #fff;
  color: var(--text);
  border-color: var(--border-2);
}
[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
[data-theme="light"] .form-select option { background: #fff; color: var(--text); }
[data-theme="light"] .nav-item.active { background: rgba(249,178,51,.14); color: #b45309; }
[data-theme="light"] .nav-item.active svg { color: #b45309; }
[data-theme="light"] .toggle-row {
  background: #fff;
  border-color: var(--border);
}
[data-theme="light"] .modal-dialog {
  background: #fff;
  border-color: var(--border);
}
[data-theme="light"] .info-icon,
[data-theme="light"] .module-icon.available,
[data-theme="light"] .quick-action-icon { background: var(--gold-dim); }
[data-theme="light"] .data-table th { background: #f1f5f9; color: var(--text); }
[data-theme="light"] .data-table tr:hover td { background: #f8fafc; }
[data-theme="light"] .embed-snippet { background: #1e293b; }

/* Logo automatisch wechseln zwischen Hell/Dunkel */
.sidebar-logo img,
.auth-logo img {
  content: var(--logo-src, url("../img/logo-white.svg"));
}
[data-theme="light"] .sidebar-logo img,
[data-theme="light"] .auth-logo img {
  content: url("../img/logo-dark.svg");
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   AUTH (Login)
═══════════════════════════════════════════════════════════ */
.auth-body {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(249,178,51,.1), transparent);
}

.auth-wrap {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.auth-card {
  background: rgba(13,21,37,.9);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 60px rgba(249,178,51,.06), 0 32px 64px rgba(0,0,0,.5);
}

.auth-logo {
  display: flex; justify-content: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.04em; text-align: center;
  margin-bottom: .25rem;
}

.auth-sub {
  font-size: .82rem; color: var(--muted);
  text-align: center; margin-bottom: 1.75rem;
}

.alert {
  display: flex; align-items: center; gap: 8px;
  padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .82rem; font-weight: 500;
  margin-bottom: 1.25rem;
}
.alert-error {
  background: var(--red-dim);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red);
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .78rem; font-weight: 600; color: var(--muted-2); }

.form-input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  color: var(--text);
  font-family: inherit; font-size: .9rem;
  padding: .7rem .9rem;
  width: 100%;
  transition: border-color 150ms, box-shadow 150ms;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus {
  outline: none;
  border-color: rgba(249,178,51,.5);
  box-shadow: 0 0 0 3px rgba(249,178,51,.1);
}

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 2.75rem; }
.pw-toggle {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--muted); padding: 4px;
  transition: color 140ms;
}
.pw-toggle:hover { color: var(--muted-2); }

.btn-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #080c16;
  border: none; border-radius: 9px;
  font-size: .95rem; font-weight: 700;
  padding: .8rem 1.25rem; width: 100%;
  margin-top: .25rem;
  transition: background 150ms, transform 150ms;
}
.btn-submit:hover  { background: #e09b1a; transform: translateY(-1px); }
.btn-submit:active { transform: scale(.98); }
.btn-submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.auth-footer {
  font-size: .75rem; color: var(--muted);
  text-align: center;
}
.auth-footer a { text-decoration: underline; text-underline-offset: 3px; }
.auth-footer a:hover { color: var(--muted-2); }

/* ═══════════════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════════════ */
.app-body {
  display: flex;
  min-height: 100dvh;
  background: var(--bg);
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-mid);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 280ms var(--ease);
}

.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  height: var(--topbar-h);
}

.sidebar-nav {
  flex: 1;
  padding: .75rem .75rem 0;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: .65rem .875rem;
  border-radius: 9px;
  font-size: .85rem; font-weight: 500;
  color: var(--muted-2);
  transition: background 140ms, color 140ms;
  position: relative;
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}
.nav-item.active svg { color: var(--gold); }
.nav-item.soon { opacity: .55; pointer-events: none; }

.nav-badge {
  margin-left: auto;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 7px;
  color: var(--muted);
}

/* Counter-Badge (Anzahl aktiver Items pro Menüeintrag) */
.nav-label { flex: 1; min-width: 0; }
.nav-count {
  margin-left: auto;
  font-size: .62rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;            /* zentriert tabular nums sauber */
  background: rgba(255,255,255,.08);
  color: var(--muted-2);
  transition: background 140ms, color 140ms;
}
.nav-item.active .nav-count {
  background: rgba(249,178,51,.22);
  color: var(--gold);
}
.nav-count-attention {
  background: rgba(249,178,51,.18);
  color: #f9b233;
}
.nav-count-critical {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(220,38,38,.2);
  animation: nav-pulse 2.4s ease-in-out infinite;
}
@keyframes nav-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(220,38,38,.2); }
  50%      { box-shadow: 0 0 0 4px rgba(220,38,38,.08); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-count-critical { animation: none; }
}

/* Sub-Item (eingerückt, kompakter) */
.nav-item-sub {
  padding-top: .4rem;
  padding-bottom: .4rem;
  padding-left: 2.1rem;
  font-size: .78rem;
  gap: 8px;
  position: relative;
}
.nav-item-sub::before {
  content: '';
  position: absolute;
  left: 1.2rem; top: 50%;
  width: 7px; height: 1px;
  background: rgba(255,255,255,.15);
}
.nav-item-sub svg { width: 13px; height: 13px; opacity: .7; }

.nav-divider {
  height: 1px; background: var(--border);
  margin: .65rem .875rem;
}

.sidebar-footer {
  padding: .875rem .875rem 1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.org-info { flex: 1; min-width: 0; }
.org-name  { font-size: .8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.org-role  { font-size: .7rem; color: var(--muted); }

.logout-btn {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: none; border: 1px solid var(--border);
  color: var(--muted); transition: background 140ms, color 140ms;
}
.logout-btn:hover { background: var(--red-dim); color: var(--red); border-color: rgba(248,113,113,.3); }

/* ── MAIN ────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-width: 0;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  min-height: var(--topbar-h);
  background: rgba(9,14,26,.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.75rem;
  position: sticky; top: 0; z-index: 100;
}

.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  padding: 4px;
}

.topbar-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.page-title  { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--text); }
.page-sub    { font-size: .86rem; line-height: 1.45; color: var(--muted-2); margin: 0; }
.page-sub strong { color: var(--text); font-weight: 600; }

.topbar-right {
  display: flex; align-items: center; gap: .875rem;
}

.license-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.license-badge.active   { background: rgba(74,222,128,.12);  color: var(--green); border: 1px solid rgba(74,222,128,.25); }
.license-badge.trial    { background: var(--gold-dim);        color: var(--gold);  border: 1px solid rgba(249,178,51,.25); }
.license-badge.expired  { background: var(--red-dim);         color: var(--red);   border: 1px solid rgba(248,113,113,.25); }
.license-badge.inactive { background: var(--surface);         color: var(--muted); border: 1px solid var(--border); }

.topbar-user { font-size: .78rem; color: var(--muted); }

/* ── CONTENT ─────────────────────────────────────────────── */
.content {
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}

/* ── PAGE-TABS (generische Sub-Navigation pro Seite) ─────── */
.page-tabs{
  display:flex;
  gap:.25rem;
  margin:0;
  border-bottom:1px solid var(--border);
  overflow-x:auto;
  scrollbar-width:thin;
}
.page-tab{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.7rem 1.05rem;
  color:var(--muted-2);
  text-decoration:none;
  font-weight:500;
  font-size:.92rem;
  border:0;
  background:transparent;
  border-bottom:2px solid transparent;
  white-space:nowrap;
  transition:color .15s, border-color .15s;
  cursor:pointer;
  font-family:inherit;
}
.page-tab:hover{color:var(--text)}
.page-tab.is-active{color:var(--gold);border-bottom-color:var(--gold)}
.page-tab .page-tab-count{
  font-size:.72rem;
  background:var(--surface-2);
  padding:.1rem .42rem;
  border-radius:99px;
  font-weight:600;
  font-feature-settings:"tnum" 1;
}
.page-tab.is-active .page-tab-count{background:var(--gold-dim);color:var(--gold)}

/* Section-Header (Eyebrow + Title) – wird in mehreren Seiten genutzt */
.section-header{display:flex;flex-direction:column;gap:.2rem;margin:0 0 .5rem}
.section-header h2{font-size:1.05rem;color:var(--text);margin:0;font-weight:600}
.section-header p{font-size:.86rem;color:var(--muted-2);margin:0}

/* Stats-Reihe (KPI-Kacheln) – generisch über alle Seiten */
.page-stats,
.vol-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:.75rem;
  margin:0;
}
.page-stat,
.vol-stat{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:.85rem;
  padding:.95rem 1.1rem;
  display:flex; flex-direction:column; gap:.15rem;
  font-feature-settings:"tnum" 1;
}
.page-stat-num,
.vol-stat-num{font-size:1.6rem;font-weight:700;color:var(--gold);line-height:1.1}
.page-stat-num.green,
.vol-stat-num.green{color:var(--green)}
.page-stat-num.muted,
.vol-stat-num.muted{color:var(--muted-2)}
.page-stat-label,
.vol-stat-label{font-size:.78rem;color:var(--muted-2);letter-spacing:.02em}

/* ── STATUS CARD ─────────────────────────────────────────── */
.status-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 300ms, box-shadow 300ms;
}
.status-card.active {
  border-color: rgba(74,222,128,.3);
  box-shadow: 0 0 40px rgba(74,222,128,.08);
}
.status-card.inactive {
  border-color: var(--border);
}

.status-card-body {
  background: var(--surface);
  padding: 1.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
}

.status-info {
  display: flex; align-items: center; gap: 1.25rem;
}

.status-indicator {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 300ms, box-shadow 300ms;
}
.status-card.active   .status-indicator { background: rgba(74,222,128,.15); box-shadow: 0 0 30px rgba(74,222,128,.2); }
.status-card.inactive .status-indicator { background: rgba(255,255,255,.05); }

@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }
.status-dot {
  width: 16px; height: 16px; border-radius: 50%;
  transition: background 300ms;
}
.status-card.active   .status-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.status-card.inactive .status-dot { background: var(--muted); }

.status-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.status-value {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em;
  transition: color 300ms;
}
.status-card.active   .status-value { color: var(--green); }
.status-card.inactive .status-value { color: var(--muted-2); }

.status-since { font-size: .78rem; color: var(--muted); margin-top: 3px; }

/* Toggle Button */
.toggle-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: .75rem 1.25rem;
  color: var(--muted-2); font-size: .875rem; font-weight: 600;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.toggle-btn:hover   { background: rgba(255,255,255,.09); color: var(--text); }
.toggle-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.toggle-btn.toggle-on {
  background: rgba(74,222,128,.1);
  border-color: rgba(74,222,128,.3);
  color: var(--green);
}
.toggle-btn.loading { opacity: .6; pointer-events: none; }

.toggle-track {
  width: 40px; height: 22px;
  background: rgba(255,255,255,.12);
  border-radius: 11px;
  position: relative;
  transition: background 250ms;
  flex-shrink: 0;
}
.toggle-btn.toggle-on .toggle-track { background: var(--green); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: transform 250ms var(--ease);
}
.toggle-btn.toggle-on .toggle-thumb { transform: translateX(18px); }

/* Status bar below card */
.status-alert, .status-info-bar {
  display: flex; align-items: center; gap: 8px;
  padding: .7rem 2rem;
  font-size: .78rem; font-weight: 500;
}
.status-alert {
  background: rgba(248,113,113,.07);
  border-top: 1px solid rgba(248,113,113,.18);
  color: #fca5a5;
}
.status-info-bar {
  background: rgba(255,255,255,.02);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* ── INFO GRID ───────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex; align-items: flex-start; gap: .875rem;
}
.info-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid rgba(249,178,51,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.info-label { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.info-value { font-size: .875rem; font-weight: 600; color: var(--text); }
.info-value.mono { font-family: 'Fira Mono', 'Courier New', monospace; }

/* ── MODULES ─────────────────────────────────────────────── */
.section-heading {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .module-grid { grid-template-columns: 1fr; } }

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  opacity: .65;
}
.module-icon {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.module-content { flex: 1; min-width: 0; }
.module-title   { font-size: .875rem; font-weight: 600; margin-bottom: 2px; }
.module-desc    { font-size: .78rem; color: var(--muted); }
.module-soon {
  flex-shrink: 0;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 9px;
}

/* ── SIDEBAR ADMIN SECTION (kompakt) ─────────────────────── */
.sidebar-admin {
  padding: .3rem .75rem .2rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-admin-label {
  font-size: .56rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: .3rem .65rem .15rem;
  opacity: .7;
}
.sidebar-admin-group + .sidebar-admin-group { margin-top: .3rem; }
.sidebar-admin nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar-admin .nav-item {
  color: var(--muted);
  padding: .28rem .65rem;
  font-size: .77rem;
  gap: 8px;
  border-radius: 7px;
}
.sidebar-admin .nav-item svg { width: 13px; height: 13px; opacity: .8; }
.sidebar-admin .nav-item.active { background: rgba(249,178,51,.08); color: var(--gold); }
.sidebar-admin .nav-item.active svg { opacity: 1; }
.sidebar-admin .nav-item:hover  { background: var(--surface); color: var(--muted-2); }
/* Kompaktes 2-Spalten-Raster (Administration) */
.sidebar-admin nav.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.sidebar-admin nav.is-grid .nav-item.full { grid-column: 1 / -1; }
.sidebar-admin nav.is-grid .nav-item { padding: .26rem .55rem; font-size: .74rem; gap: 6px; }
.sidebar-admin nav.is-grid .nav-item svg { width: 12px; height: 12px; }
.sidebar-admin nav.is-grid .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--gold); color: #080c16;
  border: none; border-radius: 9px;
  font-family: inherit; font-size: .875rem; font-weight: 700;
  padding: .65rem 1.25rem; cursor: pointer;
  transition: background 150ms, transform 150ms;
}
.btn-primary:hover  { background: #e09b1a; transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-2);
  border-radius: 8px; padding: .55rem .9rem;
  font-family: inherit; font-size: .78rem; font-weight: 600;
  color: var(--muted-2); cursor: pointer;
  transition: background 140ms, color 140ms;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.09); color: var(--text); }

.btn-action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  transition: background 140ms, color 140ms;
  text-decoration: none;
}
.btn-action:hover { background: var(--surface-2); color: var(--text); }

.action-row { display: flex; gap: 6px; align-items: center; }

/* ── ALERT ───────────────────────────────────────────────── */
.alert-success {
  display: flex; align-items: center; gap: 8px;
  padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .82rem; font-weight: 500;
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,.3);
  color: var(--green);
  margin-bottom: 1rem;
}

/* ── CONFIG SECTION ──────────────────────────────────────── */
.config-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
}
.section-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.section-sub { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.label-opt   { color: var(--muted); font-weight: 400; }

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 1rem;
}
.config-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .config-grid { grid-template-columns: 1fr; } }

/* ALLE selects mit form-input class normalisieren */
select.form-input,
.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  background-size: 12px 12px;
  padding-right: 2.25rem;
  cursor: pointer;
}
select.form-input::-ms-expand,
.form-select::-ms-expand { display: none; }
select.form-input option,
.form-select option { background: #0d1525; color: var(--text); }
[data-theme="light"] select.form-input option,
[data-theme="light"] .form-select option { background: #fff; color: var(--text); }

.form-textarea {
  resize: vertical; min-height: 100px;
}

/* ── ADMIN BADGE ─────────────────────────────────────────── */
.admin-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(249,178,51,.12); color: var(--gold);
  border: 1px solid rgba(249,178,51,.25);
}

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: .83rem;
}
.data-table th {
  background: rgba(255,255,255,.03);
  color: var(--muted); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .75rem 1rem; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.02); }

.td-primary { display: block; font-weight: 600; color: var(--text); }
.td-sub     { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.mono       { font-family: 'Courier New', monospace; font-size: .8rem; }
.empty-row  { text-align: center; color: var(--muted); padding: 2rem !important; }

/* Status chips */
.status-chip {
  display: inline-block;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  border: 1px solid transparent;
}
.status-chip.active   { background: var(--green-dim);  color: var(--green);   border-color: rgba(74,222,128,.25); }
.status-chip.trial    { background: var(--gold-dim);    color: var(--gold);    border-color: rgba(249,178,51,.25); }
.status-chip.inactive { background: var(--surface-2);  color: var(--muted);   border-color: var(--border); }
.status-chip.expired  { background: var(--red-dim);    color: var(--red);     border-color: rgba(248,113,113,.25); }
.status-chip.ds-on    { background: var(--red-dim);    color: var(--red);     border-color: rgba(248,113,113,.25); }
.status-chip.ds-off   { background: var(--surface);    color: var(--muted);   border-color: var(--border); }

.role-chip {
  display: inline-block;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; border: 1px solid transparent;
}
.role-chip.superadmin { background: rgba(249,178,51,.12); color: var(--gold);   border-color: rgba(249,178,51,.25); }
.role-chip.admin      { background: var(--surface-2);     color: var(--muted-2); border-color: var(--border); }
.role-chip.operator   { background: var(--surface);       color: var(--muted);   border-color: var(--border); }

.count-badge {
  display: inline-block;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: .65rem; font-weight: 700; padding: 1px 7px;
  vertical-align: middle; margin-left: 6px;
  text-transform: none; letter-spacing: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,.6);
  }
  .app-main { margin-left: 0; }
  .menu-toggle { display: flex; }
  .topbar { padding: .9rem 1rem; }
  .topbar-user { display: none; }
  .content { padding: 1.25rem 1rem; }
  .page-title { font-size: 1.05rem; }
  .page-sub   { font-size: .8rem; }
  .status-card-body { padding: 1.25rem; }
  .status-value { font-size: 1.3rem; }
}

/* ═══════════════════════════════════════════════════════════
   A11y / Utilities
═══════════════════════════════════════════════════════════ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--gold); color: #080c16;
  padding: 8px 16px; border-radius: 6px;
  font-size: .85rem; font-weight: 700;
  z-index: 9999;
  transition: top 160ms;
}
.skip-link:focus { top: 8px; outline: 2px solid #fff; outline-offset: 2px; }

/* Globaler Focus-Style */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form helper text */
.form-help {
  font-size: .72rem; color: var(--muted);
  margin-top: 4px;
}

/* Read-only inputs */
.form-input:disabled, .form-input[readonly] {
  background: rgba(255,255,255,.02);
  color: var(--muted-2); cursor: not-allowed;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--muted);
}
.breadcrumbs a { color: var(--muted-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   Info Banner
═══════════════════════════════════════════════════════════ */
.info-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--gold-dim);
  border: 1px solid rgba(249,178,51,.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--text); font-size: .88rem; line-height: 1.55;
}
.info-banner svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.info-banner a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }

/* ═══════════════════════════════════════════════════════════
   Liveticker (Backend)
═══════════════════════════════════════════════════════════ */
.radio-group {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 4px;
}
@media (max-width: 640px) { .radio-group { grid-template-columns: 1fr; } }

.radio-tile {
  position: relative; cursor: pointer;
  border-radius: 10px; overflow: hidden;
}
.radio-tile input {
  position: absolute; opacity: 0; pointer-events: none;
}
.radio-tile-content {
  display: flex; align-items: flex-start; gap: 10px;
  padding: .8rem .9rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 140ms, background 140ms;
  min-height: 56px;
}
.radio-tile-content strong { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 2px; }
.radio-tile-content small  { display: block; font-size: .72rem; color: var(--muted); }
.radio-tile:hover .radio-tile-content { background: rgba(255,255,255,.06); }
.radio-tile input:checked + .radio-tile-content {
  background: rgba(249,178,51,.10);
  border-color: var(--gold);
}
.radio-tile input:focus-visible + .radio-tile-content {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

.radio-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}
.radio-dot.info     { background: #60a5fa; }
.radio-dot.warning  { background: var(--gold); }
.radio-dot.critical { background: var(--red); }

/* Liveticker entries */
.ticker-list {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.ticker-entry {
  --tone-soft: rgba(148,163,184,.10);
  --tone-border: rgba(255,255,255,.10);
  position: relative;
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--tone-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.ticker-entry.priority-info     { --tone-soft: rgba(96,165,250,.10);  --tone-border: rgba(96,165,250,.32); }
.ticker-entry.priority-warning  { --tone-soft: rgba(249,178,51,.12);  --tone-border: rgba(249,178,51,.40); }
.ticker-entry.priority-critical { --tone-soft: rgba(239,68,68,.14);   --tone-border: rgba(239,68,68,.50); }

.ticker-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .72rem; color: var(--muted);
  margin-bottom: .5rem;
}
.ticker-priority {
  display: inline-block;
  padding: 2px 8px; border-radius: 20px;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid transparent;
}
.ticker-priority.priority-info     { background: rgba(96,165,250,.12); color: #60a5fa; border-color: rgba(96,165,250,.25); }
.ticker-priority.priority-warning  { background: var(--gold-dim);     color: var(--gold); border-color: rgba(249,178,51,.25); }
.ticker-priority.priority-critical { background: var(--red-dim);       color: var(--red);  border-color: rgba(248,113,113,.25); }
.ticker-time   { color: var(--muted-2); }
.ticker-author { color: var(--muted); }

.ticker-message {
  font-size: .92rem; line-height: 1.6; color: var(--text);
  margin: 0; padding-right: 2.5rem;
}
.ticker-actions {
  position: absolute; top: .85rem; right: .85rem;
  margin: 0;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state svg { color: var(--muted); margin: 0 auto 1rem; opacity: .5; }
.empty-state h3  { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.empty-state p   { font-size: .85rem; max-width: 320px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════
   Liveticker (Public Crisis Page)
═══════════════════════════════════════════════════════════ */
.ticker-section {
  padding: clamp(2rem,4vw,3rem) 0;
  border-top: 1px solid var(--border);
  background: rgba(13,21,37,.4);
}
.ticker-section-header { margin-bottom: 1.5rem; }
.ticker-section-header h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: .25rem;
}
.ticker-sub { font-size: .8rem; color: var(--muted); }

@keyframes livePulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(.7);opacity:.5} }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  animation: livePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 12px var(--red);
}

.ticker-public-list {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.ticker-public-entry {
  --tone-soft: rgba(148,163,184,.10);
  --tone-border: rgba(255,255,255,.10);
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20,33,55,.55), rgba(13,21,37,.65));
  border: 1px solid var(--tone-border);
  border-radius: 16px;
  padding: 1.1rem 1.4rem;
}
.ticker-public-entry.priority-info     { --tone-soft: rgba(96,165,250,.10);  --tone-border: rgba(96,165,250,.32); }
.ticker-public-entry.priority-warning  { --tone-soft: rgba(249,178,51,.12);  --tone-border: rgba(249,178,51,.40); }
.ticker-public-entry.priority-critical { --tone-soft: rgba(239,68,68,.14);   --tone-border: rgba(239,68,68,.50); }
.ticker-public-entry.latest { box-shadow: 0 0 30px rgba(249,178,51,.05); }

.ticker-public-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .72rem; margin-bottom: .5rem;
}
.ticker-public-priority {
  display: inline-block;
  padding: 2px 8px; border-radius: 20px;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.ticker-public-priority.priority-info     { background: rgba(96,165,250,.15); color: #60a5fa; }
.ticker-public-priority.priority-warning  { background: rgba(249,178,51,.18); color: var(--gold); }
.ticker-public-priority.priority-critical { background: rgba(248,113,113,.18); color: var(--red); }
.ticker-public-time { color: var(--muted); }
.ticker-public-message {
  font-size: 1rem; line-height: 1.65; color: var(--text);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   Stats Grid (Admin Overview)
═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  display: flex; align-items: center; gap: 14px;
  transition: border-color 200ms, transform 200ms;
}
.stat-card:hover { border-color: var(--border-2); }

.stat-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid rgba(249,178,51,.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.stat-icon.green { background: var(--green-dim); border-color: rgba(74,222,128,.25); color: var(--green); }
.stat-icon.red   { background: var(--red-dim);   border-color: rgba(248,113,113,.25); color: var(--red); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-label { font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* Quick action cards */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .quick-actions { grid-template-columns: 1fr; } }

.quick-action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.quick-action-card:hover {
  border-color: rgba(249,178,51,.3);
  background: rgba(249,178,51,.04);
  transform: translateY(-1px);
}
.quick-action-card:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.quick-action-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid rgba(249,178,51,.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.quick-action-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: 2px; }
.quick-action-card p  { font-size: .8rem; color: var(--muted); margin: 0; }
.quick-arrow { color: var(--muted); margin-left: auto; flex-shrink: 0; transition: transform 180ms, color 180ms; }
.quick-action-card:hover .quick-arrow { color: var(--gold); transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════════
   Module Cards
═══════════════════════════════════════════════════════════ */
.module-card.available {
  opacity: 1; cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.module-card.available:hover {
  border-color: rgba(249,178,51,.3);
  background: rgba(249,178,51,.04);
  transform: translateY(-1px);
}
.module-card.available .module-icon {
  background: var(--gold-dim);
  border-color: rgba(249,178,51,.25);
  color: var(--gold);
}
.module-badge.available {
  flex-shrink: 0;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--green); background: var(--green-dim);
  border: 1px solid rgba(74,222,128,.3); border-radius: 20px;
  padding: 3px 9px;
}

/* ═══════════════════════════════════════════════════════════
   Danger Zone
═══════════════════════════════════════════════════════════ */
.danger-zone {
  border: 1px solid rgba(248,113,113,.2);
  background: rgba(248,113,113,.04);
}
.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  border: none; border-radius: 9px;
  font-family: inherit; font-size: .875rem; font-weight: 700;
  padding: .65rem 1.25rem; cursor: pointer;
  transition: background 150ms, transform 150ms;
}
.btn-danger:hover { background: #ef4444; transform: translateY(-1px); }
.btn-danger:active { transform: scale(.98); }
.btn-danger:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════
   Sidebar enhancements
═══════════════════════════════════════════════════════════ */
.sidebar-logo a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-item svg { transition: color 140ms; }
.nav-item.soon:hover { background: transparent; cursor: default; }

/* Touch-target Verbesserung */
.nav-item, .btn-action, .pw-toggle, .menu-toggle, .logout-btn, .btn-primary, .btn-ghost, .btn-submit, .btn-danger {
  min-height: 36px;
}
.btn-action {
  min-width: 36px; min-height: 36px;
}

/* Tabular numbers in stats */
.stat-value, .ticker-time, .ticker-public-time { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════
   FAQ
═══════════════════════════════════════════════════════════ */
.faq-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden;
  transition: border-color 160ms;
}
.faq-item.inactive { opacity: .6; }
.faq-item details { width: 100%; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 1rem 1.25rem;
  outline: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { background: rgba(249,178,51,.05); }
.faq-summary-content { flex: 1; min-width: 0; }
.faq-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.faq-scenario-chip {
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px;
  background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(249,178,51,.25);
}
.faq-scenario-chip.all { background: var(--surface-2); color: var(--muted-2); border-color: var(--border); }
.faq-question { font-size: .92rem; font-weight: 600; line-height: 1.45; color: var(--text); margin: 0; }
.faq-chevron { color: var(--muted); flex-shrink: 0; margin-top: 4px; transition: transform 200ms; }
.faq-item details[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 1.25rem 1.1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.faq-answer { font-size: .88rem; color: var(--muted-2); line-height: 1.65; margin-bottom: 1rem; }
.faq-actions { display: flex; gap: 8px; }
.btn-link-danger {
  background: none; border: none; padding: 0;
  font-size: .78rem; color: var(--red); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-link-danger:hover { color: #ef4444; }

/* FAQ Public */
.faq-public-section { padding: clamp(2rem,5vw,3rem) 0; border-top: 1px solid var(--border); }
.faq-public-heading { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .3rem; }
.faq-public-sub { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.faq-public-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.faq-public-list details {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: border-color 140ms;
}
.faq-public-list details[open] { border-color: rgba(249,178,51,.3); }
.faq-public-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 1rem 1.4rem;
  font-weight: 600;
}
.faq-public-list summary::-webkit-details-marker { display: none; }
.faq-public-q { flex: 1; }
.faq-public-chevron { color: var(--muted); flex-shrink: 0; transition: transform 200ms; }
.faq-public-list details[open] .faq-public-chevron { transform: rotate(180deg); color: var(--gold); }
.faq-public-a { padding: 0 1.4rem 1.2rem; color: var(--muted-2); font-size: .92rem; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════
   Volunteers
═══════════════════════════════════════════════════════════ */
.volunteer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 1rem;
}
.volunteer-card {
  --tone-soft: rgba(148,163,184,.08);
  --tone-border: rgba(255,255,255,.10);
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--tone-border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.volunteer-card.status-pending   { --tone-soft: rgba(249,178,51,.10); --tone-border: rgba(249,178,51,.35); }
.volunteer-card.status-active    { --tone-soft: rgba(74,222,128,.10); --tone-border: rgba(74,222,128,.35); }
.volunteer-card.status-dismissed { opacity: .65; }
.volunteer-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.volunteer-name { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 3px; }
.volunteer-meta { font-size: .78rem; color: var(--muted-2); }
.volunteer-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: .8rem; }
.volunteer-contact .full { grid-column: 1 / -1; }
.volunteer-contact dt { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.volunteer-contact dd { color: var(--text); }
.volunteer-contact a { color: var(--gold); text-decoration: none; }
.volunteer-contact a:hover { text-decoration: underline; }
.volunteer-assign { display: flex; flex-direction: column; gap: 8px; }
.volunteer-assign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.volunteer-assign-row input { padding: .5rem .75rem; font-size: .82rem; }
.volunteer-assign-actions { display: flex; gap: 8px; }
.volunteer-assign-actions select { flex: 1; padding: .5rem .75rem; font-size: .82rem; }
@media (max-width: 480px) {
  .volunteer-assign-row { grid-template-columns: 1fr; }
}

/* Public volunteer CTA */
.volunteer-cta {
  background: rgba(74,222,128,.06);
  border: 1px solid rgba(74,222,128,.2);
  border-radius: 14px; padding: 1rem 1.25rem; margin-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.volunteer-cta strong { font-size: .95rem; color: var(--text); }
.volunteer-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #0a1a0a;
  padding: .7rem 1.25rem; border-radius: 9px;
  font-weight: 700; font-size: .88rem; text-decoration: none;
  transition: transform 150ms, background 150ms;
}
.volunteer-cta-btn:hover { background: #5fdc8b; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════
   BBK
═══════════════════════════════════════════════════════════ */
.bbk-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bbk-card {
  --tone-soft: rgba(148,163,184,.10);
  --tone-border: rgba(255,255,255,.10);
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--tone-border);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
}
.bbk-card.severity-extreme   { --tone-soft: rgba(239,68,68,.14);  --tone-border: rgba(239,68,68,.50); }
.bbk-card.severity-severe    { --tone-soft: rgba(249,115,22,.12); --tone-border: rgba(249,115,22,.40); }
.bbk-card.severity-moderate  { --tone-soft: rgba(249,178,51,.12); --tone-border: rgba(249,178,51,.40); }
.bbk-card.severity-minor     { --tone-soft: rgba(96,165,250,.10); --tone-border: rgba(96,165,250,.32); }

.bbk-card-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .6rem; font-size: .78rem; color: var(--muted); }
.bbk-severity {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 20px;
  background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,.25);
}
.bbk-card.severity-moderate .bbk-severity { background: var(--gold-dim); color: var(--gold); border-color: rgba(249,178,51,.3); }
.bbk-card.severity-minor    .bbk-severity { background: rgba(96,165,250,.15); color: #60a5fa; border-color: rgba(96,165,250,.3); }
.bbk-event { font-weight: 600; color: var(--text); }
.bbk-time  { color: var(--muted); }
.bbk-headline { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.35; }
.bbk-description { color: var(--muted-2); font-size: .9rem; line-height: 1.65; margin-bottom: .85rem; }
.bbk-instruction {
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--gold);
  padding: .7rem .9rem; border-radius: 6px;
  font-size: .88rem; color: var(--text); line-height: 1.6;
  margin-bottom: .85rem;
}
.bbk-card-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); padding-top: .6rem; border-top: 1px solid var(--border); }
.bbk-card-footer a { color: var(--gold); }

/* BBK Public */
.bbk-public-section { padding: clamp(2rem,5vw,3rem) 0; border-top: 1px solid var(--border); background: rgba(248,113,113,.03); }
.bbk-public-heading { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .3rem; display: flex; align-items: center; gap: 10px; color: var(--red); }
.bbk-public-sub { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.bbk-public-list { display: flex; flex-direction: column; gap: 12px; }
.bbk-public-card {
  --tone-soft: rgba(239,68,68,.12);
  --tone-border: rgba(239,68,68,.40);
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20,33,55,.55), rgba(13,21,37,.65));
  border: 1px solid var(--tone-border);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
}
.bbk-public-card.severity-moderate { --tone-soft: rgba(249,178,51,.12); --tone-border: rgba(249,178,51,.40); }
.bbk-public-card.severity-minor    { --tone-soft: rgba(96,165,250,.10); --tone-border: rgba(96,165,250,.32); }
.bbk-public-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: .5rem; font-size: .75rem; color: var(--muted); }
.bbk-public-severity {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 20px;
  background: var(--red-dim); color: var(--red);
}
.bbk-public-card.severity-moderate .bbk-public-severity { background: var(--gold-dim); color: var(--gold); }
.bbk-public-card.severity-minor    .bbk-public-severity { background: rgba(96,165,250,.15); color: #60a5fa; }
.bbk-public-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.bbk-public-card p  { color: var(--muted-2); font-size: .92rem; line-height: 1.6; margin-bottom: .5rem; }
.bbk-public-instruction { background: rgba(255,255,255,.04); padding: .65rem .85rem; border-radius: 6px; border-left: 3px solid var(--gold); }

/* ═══════════════════════════════════════════════════════════
   Visibility Toggles (Dashboard)
═══════════════════════════════════════════════════════════ */
.visibility-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 1rem; }
.toggle-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}
.toggle-row:hover { background: rgba(255,255,255,.07); }
.toggle-row input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0; cursor: pointer;
}
.toggle-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.toggle-row-content { display: flex; flex-direction: column; gap: 2px; }
.toggle-row-content strong { font-size: .9rem; font-weight: 600; color: var(--text); }
.toggle-row-content small  { font-size: .78rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   Locality Autocomplete
═══════════════════════════════════════════════════════════ */
.locality-widget { position: relative; }
.locality-input-wrap { position: relative; }
.locality-input-wrap .form-input { padding-right: 2.5rem; }
.locality-clear {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 6px;
  color: var(--muted); cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.locality-clear:hover { color: var(--text); background: rgba(255,255,255,.05); }

.locality-results {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #0d1525;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(249,178,51,.08);
  max-height: 320px; overflow-y: auto;
  z-index: 200;
}
.locality-results[hidden] { display: none; }

.ac-loading, .ac-empty, .ac-error {
  padding: 1rem 1.25rem;
  font-size: .82rem; color: var(--muted);
  text-align: center;
}
.ac-error { color: var(--red); }

.ac-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none;
  padding: .75rem 1rem;
  cursor: pointer; color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 140ms;
  font-family: inherit;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active {
  background: rgba(249,178,51,.08);
}
.ac-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.ac-item-main {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px;
}
.ac-name { font-weight: 600; font-size: .9rem; }
.ac-plz {
  font-size: .7rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted-2);
  padding: 1px 7px; border-radius: 20px;
  font-variant-numeric: tabular-nums;
}
.ac-item-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: .72rem; color: var(--muted);
}
.ac-region { flex: 1; min-width: 0; }
.ac-ars {
  font-family: 'Courier New', monospace;
  background: rgba(249,178,51,.08);
  color: var(--gold);
  padding: 1px 6px; border-radius: 4px;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
}

.locality-display {
  font-size: .78rem; color: var(--muted-2);
  padding: .6rem .85rem;
  background: rgba(74,222,128,.06);
  border: 1px solid rgba(74,222,128,.18);
  border-radius: 8px;
  margin-top: 8px;
  line-height: 1.5;
}
.locality-display[hidden] { display: none; }
.locality-display code {
  font-family: 'Courier New', monospace;
  background: rgba(255,255,255,.05);
  padding: 1px 5px; border-radius: 3px;
  font-size: .85em;
}
.locality-display strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   Self-Service Registrierung
═══════════════════════════════════════════════════════════ */
.reg-wrap { max-width: 980px; margin: 0 auto; }
.reg-header { text-align: center; margin-bottom: 2rem; }
.reg-header img { margin-bottom: 1.25rem; }
.reg-header h1 { font-size: clamp(1.6rem,4vw,2.2rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .35rem; }
.reg-header p  { color: var(--muted-2); font-size: .95rem; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}
@media (max-width: 960px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-card { position: relative; cursor: pointer; }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.4rem;
  transition: border-color 160ms, background 160ms, transform 160ms;
  height: 100%;
}
.plan-card:hover .plan-card-inner { border-color: rgba(249,178,51,.3); }
.plan-card.selected .plan-card-inner {
  border-color: var(--gold);
  background: rgba(249,178,51,.06);
  box-shadow: 0 0 0 1px rgba(249,178,51,.4) inset, 0 8px 24px rgba(249,178,51,.1);
}
.plan-card input:focus-visible + .plan-card-inner { outline: 2px solid var(--gold); outline-offset: 3px; }

.plan-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.plan-price { margin-bottom: .85rem; }
.plan-price .big { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; color: var(--gold); }
.plan-price small { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }

.plan-card ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-card li { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted-2); }
.plan-card li svg { color: var(--green); flex-shrink: 0; }

.reg-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
}
.reg-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 600px) { .reg-grid { grid-template-columns: 1fr; } }
.reg-grid .config-full { grid-column: 1 / -1; }

.reg-consent {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: .82rem; color: var(--muted-2); line-height: 1.55;
}
.reg-consent input {
  width: 20px; height: 20px;
  accent-color: var(--gold);
  margin-top: 1px;
}
.reg-consent a { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   Modal (zentriert, im Brand-Stil)
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 200ms ease;
}
.modal-overlay.open { opacity: 1; }
.modal-overlay[hidden] { display: none !important; }

.modal-dialog {
  background: linear-gradient(180deg, #142137, #0d1525);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(249,178,51,.1);
  transform: translateY(20px) scale(.97);
  transition: transform 220ms cubic-bezier(0.16,1,0.3,1);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
}
.modal-overlay.open .modal-dialog { transform: translateY(0) scale(1); }

.modal-header {
  padding: 1.4rem 1.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: flex-start; gap: 14px;
}
.modal-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.modal-icon.warning { background: rgba(249,178,51,.15); color: var(--gold); border: 1px solid rgba(249,178,51,.3); }
.modal-icon.danger  { background: rgba(248,113,113,.15); color: var(--red);  border: 1px solid rgba(248,113,113,.3); }
.modal-icon.info    { background: rgba(96,165,250,.15); color: #60a5fa; border: 1px solid rgba(96,165,250,.3); }
.modal-title-row { flex: 1; min-width: 0; }
.modal-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.modal-sub   { font-size: .85rem; color: var(--muted); line-height: 1.55; }

.modal-body { padding: 1.25rem 1.6rem; }
.modal-body p { font-size: .9rem; line-height: 1.65; color: var(--text); margin-bottom: 1rem; }
.modal-body .toggle-row { margin-top: 8px; }

.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 1rem 1.6rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   File Upload im Brand-Stil
═══════════════════════════════════════════════════════════ */
input[type="file"].form-input,
.file-upload {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04);
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  padding: .65rem .9rem;
  cursor: pointer;
  color: var(--muted-2);
  font-size: .85rem;
  font-family: inherit;
  transition: background 140ms, border-color 140ms, color 140ms;
}
input[type="file"].form-input:hover,
.file-upload:hover {
  background: rgba(249,178,51,.06);
  border-color: rgba(249,178,51,.35);
  color: var(--text);
}
input[type="file"]::file-selector-button {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(249,178,51,.3);
  border-radius: 7px;
  padding: 5px 14px;
  margin-right: 12px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(249,178,51,.18);
}

/* ═══════════════════════════════════════════════════════════
   Crisis-Body Bullet-Liste (schöner)
═══════════════════════════════════════════════════════════ */

/* BBK Details (weiterlesen) */
.bbk-details summary {
  cursor: pointer; font-size: .8rem; color: var(--gold);
  list-style: none; padding: 6px 0; font-weight: 600;
}
.bbk-details summary::-webkit-details-marker { display: none; }
.bbk-details summary::before { content: "▸ "; transition: transform 200ms; display: inline-block; }
.bbk-details[open] summary::before { content: "▾ "; }

/* ═══════════════════════════════════════════════════════════
   BBK Scope-Filter
═══════════════════════════════════════════════════════════ */
.bbk-scope-filter {
  display: flex; gap: 6px;
  margin-top: 1rem;
  padding: 5px;
  background: var(--surface-2);
  border-radius: 9px;
  width: fit-content;
}
.bbk-scope-pill {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .82rem; font-weight: 600;
  color: var(--muted-2);
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.bbk-scope-pill:hover { background: rgba(255,255,255,.05); color: var(--text); }
.bbk-scope-pill.active {
  background: var(--gold);
  color: #080c16;
}

/* ═══════════════════════════════════════════════════════════
   Drag-Drop Upload
═══════════════════════════════════════════════════════════ */
.dropzone {
  display: block;
  background: rgba(255,255,255,.025);
  border: 2px dashed var(--border-2);
  border-radius: 12px;
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
  position: relative;
  overflow: hidden;
}
.dropzone:hover, .dropzone.drag-over {
  background: rgba(249,178,51,.06);
  border-color: var(--gold);
}
.dropzone-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 1.5rem 1.25rem;
  color: var(--muted-2); text-align: center;
}
.dropzone-inner svg { color: var(--gold); }
.dropzone-inner strong { font-size: .9rem; color: var(--text); }
.dropzone-inner small  { font-size: .75rem; color: var(--muted); }

.dropzone-preview {
  position: relative;
  padding: 1rem;
}
.dropzone-preview img {
  max-width: 100%; max-height: 240px;
  border-radius: 8px;
  display: block; margin: 0 auto;
  border: 1px solid var(--border);
}
.dropzone-clear {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dropzone-clear:hover { background: var(--red); color: #fff; border-color: var(--red); }
.dropzone-info {
  text-align: center; margin-top: .65rem;
  font-size: .72rem; color: var(--muted);
}

/* Auto-Save Restored Badge */
.autosave-restored {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(249,178,51,.1);
  border: 1px solid rgba(249,178,51,.3);
  border-radius: 20px;
  color: var(--gold);
  font-size: .72rem; font-weight: 600;
}
.autosave-restored button {
  background: none; border: none; color: var(--gold);
  font-size: 1rem; cursor: pointer; padding: 0;
  line-height: 1;
}
.autosave-restored button:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   Embed Snippet
═══════════════════════════════════════════════════════════ */
.embed-snippet {
  background: #0d1525;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: .78rem;
  color: var(--gold);
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════
   Team-Verwaltung
═══════════════════════════════════════════════════════════ */
.team-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: .7rem 1rem;
}
.team-row.pending { border-style: dashed; opacity: .85; }
.team-row-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-row-info strong { font-size: .88rem; }

/* ═══════════════════════════════════════════════════════════
   Playbooks
═══════════════════════════════════════════════════════════ */
.playbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 1rem;
}
.playbook-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; width: 100%; cursor: pointer;
  color: var(--text); font-family: inherit;
  transition: background 140ms, border-color 140ms, transform 140ms;
}
.playbook-card:hover {
  background: rgba(249,178,51,.08);
  border-color: rgba(249,178,51,.35);
  transform: translateY(-2px);
}
.playbook-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.playbook-card-title { font-weight: 700; font-size: .9rem; letter-spacing: -.01em; }
.playbook-card-apply { font-size: .72rem; color: var(--gold); font-weight: 600; }

/* Collapsable Playbook-Sektion */
.playbook-collapse {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.playbook-collapse summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: .85rem 1.15rem;
}
.playbook-collapse summary::-webkit-details-marker { display: none; }
.playbook-collapse summary svg:first-child { color: var(--gold); flex-shrink: 0; }
.playbook-collapse summary span { font-weight: 600; font-size: .9rem; }
.playbook-collapse summary small { color: var(--muted); font-size: .75rem; }
.playbook-collapse summary .chev { margin-left: auto; color: var(--muted); transition: transform 200ms; }
.playbook-collapse[open] summary .chev { transform: rotate(180deg); }
.playbook-collapse .playbook-grid { padding: 0 1.15rem 1.15rem; margin-top: 0; }

/* Playbook-Editor Liste */
.playbook-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.playbook-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden;
}
.playbook-item details summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: .85rem 1.15rem; }
.playbook-item details summary::-webkit-details-marker { display: none; }
.playbook-summary { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.playbook-summary strong { font-size: .92rem; font-weight: 600; }

/* FAQ-Gruppen Akkordeon */
.faq-groups { display: flex; flex-direction: column; gap: 10px; }
.faq-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden;
}
.faq-group > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 1rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: background 140ms;
}
.faq-group > summary::-webkit-details-marker { display: none; }
.faq-group[open] > summary { border-bottom-color: var(--border); }
.faq-group > summary:hover { background: rgba(249,178,51,.04); }
.faq-group-title { flex: 1; font-size: .92rem; color: var(--gold); letter-spacing: -.01em; }
.faq-group[open] .faq-chevron { transform: rotate(180deg); }
.faq-group .faq-list { padding: .85rem 1rem 1rem; gap: 6px; }
.faq-group .faq-item { background: rgba(0,0,0,.2); }

/* Test-Modus Badge in Topbar */
.license-badge.test-mode-badge {
  background: rgba(249,178,51,.18);
  color: var(--gold);
  border: 1px solid rgba(249,178,51,.4);
  animation: pulseBadge 2s ease-in-out infinite;
}
@keyframes pulseBadge { 0%,100% { opacity: 1; } 50% { opacity: .7; } }

/* Test-Chip im Chip-Stil */
.test-chip-start {
  background: rgba(249,178,51,.06);
  border: 1px dashed rgba(249,178,51,.35);
  color: var(--gold);
  cursor: pointer; font-family: inherit;
}
.test-chip-start:hover { background: rgba(249,178,51,.12); border-style: solid; }
.test-chip-start svg { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   Test-Modus
═══════════════════════════════════════════════════════════ */
.test-mode-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, rgba(249,178,51,.1), rgba(249,178,51,.03));
  border: 1px solid rgba(249,178,51,.4);
  border-radius: 12px; padding: 1rem 1.25rem;
}
.test-mode-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(249,178,51,.18);
  color: var(--gold); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.test-mode-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.test-mode-text strong { color: var(--gold); font-size: .92rem; }
.test-mode-text small  { color: var(--muted-2); font-size: .78rem; }
.test-mode-link-row { display: flex; gap: 6px; align-items: stretch; margin-top: 4px; }
.test-mode-link {
  flex: 1; min-width: 0;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  color: var(--muted-2);
  font-family: 'Courier New', monospace; font-size: .72rem;
  padding: .45rem .65rem;
}
.test-mode-start {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted);
}
.btn-test-start {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); color: var(--muted-2);
  border: 1px dashed var(--border-2); border-radius: 9px;
  padding: .55rem 1rem; font-size: .82rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 140ms, color 140ms, border-color 140ms;
}
.btn-test-start:hover { background: rgba(249,178,51,.06); color: var(--gold); border-color: rgba(249,178,51,.35); border-style: solid; }

/* Hero-Bild Preview */
.hero-preview {
  max-width: 100%; max-height: 240px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-top: 1rem;
  background: #0d1525;
}

/* ═══════════════════════════════════════════════════════════
   Map Editor
═══════════════════════════════════════════════════════════ */
.map-editor {
  height: 380px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1525;
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   Chart
═══════════════════════════════════════════════════════════ */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}
.chart-card svg rect { transition: opacity 140ms; }
.chart-card svg rect:hover { opacity: 1; }
.chart-caption { font-size: .78rem; color: var(--muted); margin-top: .75rem; text-align: right; }
.chart-caption strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════
   FAQ Template Import
═══════════════════════════════════════════════════════════ */
.template-import-card {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, rgba(249,178,51,.08), rgba(249,178,51,.02));
  border: 1px solid rgba(249,178,51,.25);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  flex-wrap: wrap;
}
.template-import-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid rgba(249,178,51,.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.template-import-text { flex: 1; min-width: 240px; }
.template-import-text h2 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.template-import-text p  { font-size: .82rem; color: var(--muted-2); line-height: 1.55; }

.template-import-collapsed {
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.template-import-collapsed summary {
  display: flex; align-items: center; gap: 8px;
  padding: .7rem 1rem;
  cursor: pointer;
  font-size: .82rem; color: var(--muted-2);
  list-style: none;
}
.template-import-collapsed summary::-webkit-details-marker { display: none; }
.template-import-collapsed summary svg { color: var(--gold); }
.template-import-collapsed summary:hover { color: var(--text); }
.template-import-collapsed-body { padding: 0 1rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.template-import-collapsed-body p { font-size: .78rem; color: var(--muted); flex: 1; min-width: 240px; }

/* ═══════════════════════════════════════════════════════════
   Dashboard Compact Layout
═══════════════════════════════════════════════════════════ */
.dash-compact { gap: 1.5rem; }

/* Status Bar (kompakt, horizontal) */
.dash-status-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: border-color 250ms, box-shadow 250ms;
}
.dash-status-bar.active   { border-color: rgba(74,222,128,.3);   box-shadow: 0 0 30px rgba(74,222,128,.06); }
.dash-status-bar.inactive { border-color: var(--border); }

.dash-status-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.dash-status-indicator {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dash-status-bar.active   .dash-status-indicator { background: rgba(74,222,128,.15); box-shadow: 0 0 20px rgba(74,222,128,.18); }
.dash-status-bar.inactive .dash-status-indicator { background: rgba(255,255,255,.05); }
.dash-status-indicator .status-dot { width: 13px; height: 13px; }
.dash-status-bar.active   .status-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.dash-status-bar.inactive .status-dot { background: var(--muted); }

.dash-status-info { min-width: 0; }
.dash-status-label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.dash-status-value { font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.dash-status-bar.active   .dash-status-value { color: var(--green); }
.dash-status-bar.inactive .dash-status-value { color: var(--muted-2); }

.dash-status-meta {
  font-size: .75rem; color: var(--muted);
  margin-left: auto; padding: 0 1rem;
  white-space: nowrap;
}
.dash-status-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

@media (max-width: 720px) {
  .dash-status-bar { flex-wrap: wrap; }
  .dash-status-meta { width: 100%; padding: 0; margin: 0; order: 3; }
  .hide-on-mobile { display: none; }
}

/* Chips-Zeile */
.dash-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.dash-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: .78rem; color: var(--muted-2);
  white-space: nowrap;
}
.dash-chip svg { color: var(--gold); flex-shrink: 0; }
.dash-chip strong { color: var(--text); font-weight: 600; }
.dash-chip small { color: var(--muted); }

/* 2-Spalten Layout (50/50 standard, anpassbar) */
.dash-two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .dash-two-col { grid-template-columns: 1fr; }
}
.dash-col-main, .dash-col-side { padding: 1.25rem 1.4rem; }

.dash-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: .85rem;
}
.dash-current-scenario {
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.28);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}

/* Form Footer (kompakt) */
.form-footer-actions {
  display: flex; justify-content: flex-end;
  margin-top: 1rem;
}

/* Compact Toggle-Rows */
.toggle-row.compact { padding: .65rem .85rem; }
.toggle-row.compact strong { font-size: .85rem; }
.toggle-row.compact small  { font-size: .7rem; }

/* Spacing in compact dashboard – etwas mehr Luft */
.dash-compact .config-section { padding: 1.5rem 1.6rem; }
.dash-compact .config-grid { gap: 1rem; margin-top: 1rem; }
.dash-compact .section-heading { font-size: 1rem; font-weight: 600; color: var(--text); }
.dash-compact .section-sub     { color: var(--muted-2); font-size: .86rem; }

/* ═══════════════════════════════════════════════════════════
   Config Tabs
═══════════════════════════════════════════════════════════ */
.config-tabs {
  display: flex; gap: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  margin: 0;
}
.config-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .85rem 1rem;
  color: var(--muted-2);
  font-family: inherit;
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.config-tab:hover { color: var(--text); }
.config-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: transparent;
  font-weight: 600;
}
.config-tab-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.config-tab.active .config-tab-num {
  background: var(--gold); color: #080c16;
  border-color: var(--gold);
}
@media (max-width: 640px) {
  .config-tab-label { display: none; }
  .config-tab { padding: .65rem; }
}

.config-tab-panel { animation: fadeInPanel 240ms ease; padding-top: 1.5rem; }
.config-tab-panel[hidden] { display: none; }
@keyframes fadeInPanel { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Sichtbarkeit als auswählbare Kacheln (wie Vorlagen/Ausstattung) */
.vis-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}
.vis-tile {
  position: relative;
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .6rem;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.vis-tile:hover { border-color: rgba(249,178,51,.30); background: rgba(249,178,51,.04); }
.vis-tile input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.vis-tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.05);
  border-radius: .5rem;
  color: var(--muted-2);
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.vis-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vis-tile-text strong { font-size: .9rem; font-weight: 600; color: var(--text); }
.vis-tile-text small  { font-size: .76rem; color: var(--muted); }
.vis-tile-check {
  margin-left: auto;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background .12s, border-color .12s, color .12s;
}
.vis-tile:has(input:checked) { border-color: var(--gold); background: rgba(249,178,51,.10); }
.vis-tile:has(input:checked) .vis-tile-icon { background: var(--gold); color: var(--navy); }
.vis-tile:has(input:checked) .vis-tile-check { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.vis-tile input:focus-visible + .vis-tile-icon { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════
   Aktivieren-Preview Modal
═══════════════════════════════════════════════════════════ */
.act-preview { display: flex; flex-direction: column; gap: 10px; }
.act-preview-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.act-preview-row.warn {
  background: rgba(249,178,51,.06);
  border-color: rgba(249,178,51,.25);
}
.act-preview-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); flex-shrink: 0;
  min-width: 110px;
}
.act-preview-value { font-size: .9rem; color: var(--text); flex: 1; }
.act-preview-value em { color: var(--muted); font-style: normal; font-size: .82rem; }

/* Live-Edit-Banner (wenn Darksite aktiv ist) */
.live-edit-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, rgba(239,68,68,.08), rgba(239,68,68,.02));
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 10px;
  padding: .85rem 1.15rem;
  margin-bottom: 1rem;
}
.live-edit-banner strong { display: block; font-size: .85rem; color: var(--red); letter-spacing: .04em; }
.live-edit-banner small  { display: block; font-size: .78rem; color: var(--muted-2); margin-top: 2px; }
@keyframes livePulseDot {
  0%,100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50%     { transform: scale(.8); opacity: .6; box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}
.live-dot-pulse {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red);
  animation: livePulseDot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

/* Toast nach Save */
.dash-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--green);
  color: #0a1a0a;
  padding: 10px 22px;
  border-radius: 99px;
  font-weight: 700; font-size: .88rem;
  box-shadow: 0 8px 24px rgba(74,222,128,.35);
  opacity: 0; pointer-events: none;
  transition: transform 260ms cubic-bezier(0.16,1,0.3,1), opacity 200ms;
  z-index: 500;
}
.dash-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Stufenmodell Navigation */
.step-nav-back { margin-top: 1rem; text-align: left; }
.step-activate-row {
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.btn-activate-big {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border: none; border-radius: 11px;
  font-family: inherit; font-size: 1rem; font-weight: 800;
  padding: .95rem 2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239,68,68,.3);
  transition: transform 140ms, box-shadow 140ms;
  letter-spacing: -.01em;
}
.btn-activate-big:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(239,68,68,.45); }
.btn-activate-big:active { transform: scale(.98); }
.btn-activate-big:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.step-activate-hint { font-size: .78rem; color: var(--muted-2); text-align: center; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   Liveticker 50/50 Layout (kompakt)
═══════════════════════════════════════════════════════════ */
.ticker-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .ticker-split { grid-template-columns: 1fr; }
}

.ticker-form-col { position: sticky; top: 100px; padding: 1rem 1.15rem; }
.ticker-form-col .section-heading { margin-bottom: 2px; font-size: .92rem; }
.ticker-form-col .section-sub     { margin-bottom: .5rem; }
.ticker-form-col .config-form .form-group { margin-top: .65rem; }

/* Kleinere Priorität-Tiles im Form */
.ticker-form-col .radio-tile-content { padding: .55rem .7rem; min-height: 48px; }
.ticker-form-col .radio-tile-content strong { font-size: .78rem; }
.ticker-form-col .radio-tile-content small  { font-size: .66rem; }

.ticker-list-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}
.ticker-list-col .dash-section-header { margin-bottom: .65rem; }
.ticker-list-col .section-heading { font-size: .92rem; }

/* Liste kompakter */
.ticker-list-col .ticker-list { gap: 6px; }

.ticker-entry {
  position: relative;
  padding: .7rem .9rem;
  padding-right: 4rem;
  border-radius: 8px;
  border-left-width: 3px;
}
.ticker-entry.editing { padding-right: .9rem; background: rgba(249,178,51,.04); }

.ticker-view-mode .ticker-meta { margin-bottom: .25rem; font-size: .68rem; }
.ticker-view-mode .ticker-message { font-size: .82rem; padding-right: 0; line-height: 1.5; }
.ticker-view-mode .ticker-priority { padding: 1px 7px; font-size: .6rem; }
.ticker-view-mode .ticker-author   { font-size: .66rem; }

.ticker-row-actions {
  position: absolute; top: .55rem; right: .6rem;
  display: flex; gap: 4px;
  margin: 0;
}
.ticker-row-actions form { margin: 0; }
.ticker-row-actions .btn-action {
  width: 26px; height: 26px; min-width: 26px; min-height: 26px;
  border-radius: 6px;
}

/* Empty state kompakter */
.ticker-list-col .empty-state { padding: 1.5rem 1rem; }
.ticker-list-col .empty-state h3 { font-size: .9rem; }
.ticker-list-col .empty-state p  { font-size: .78rem; }

/* Edit Mode */
.ticker-edit-mode { display: flex; flex-direction: column; gap: 10px; }
.ticker-edit-mode[hidden],
.ticker-view-mode[hidden] { display: none; }
.ticker-edit-mode textarea { font-size: .88rem; line-height: 1.55; }
.ticker-edit-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.ticker-edit-row select { flex: 0 0 140px; padding: .5rem .75rem; font-size: .82rem; }
.ticker-edit-actions { margin-left: auto; display: flex; gap: 8px; }
.ticker-edit-actions .btn-primary { padding: .5rem 1rem; font-size: .82rem; }
.ticker-edit-actions .btn-ghost   { padding: .5rem 1rem; font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Karten-Editor: POI-Marker (runder Kreis, modern)
═══════════════════════════════════════════════════════════ */
.dsm-poi-icon { background: transparent !important; border: 0 !important; }
.dsm-marker {
  position: relative;
  width: 48px; height: 48px;
  --poi-color: #f9b233;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
}
.dsm-marker-body {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--poi-color);
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(15,23,41,.85);
}
.dsm-marker-body svg { display: block; }
.dsm-marker-body svg [fill="currentColor"] { fill: #fff; }

/* Preview-Pulse: weicher Ring um den neu platzierten Marker */
.dsm-marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: .55;
  animation: dsm-pulse 1.6s ease-out infinite;
  pointer-events: none;
}
@keyframes dsm-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(2.4); opacity: 0;   }
}

/* "POI hinzufügen"-Button im Add-Mode */
#mapAddPoi.active {
  background: rgba(249,178,51,.18);
  color: #f9b233;
  border-color: rgba(249,178,51,.5);
}

/* ═══════════════════════════════════════════════════════════
   Backend: Warnmeldungen (BBK + DWD)
═══════════════════════════════════════════════════════════ */
.alerts-admin-list { display: flex; flex-direction: column; gap: 14px; }

.alert-card {
  --tone-soft: rgba(148,163,184,.10);
  --tone-border: rgba(255,255,255,.10);
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20,33,55,.55), rgba(13,21,37,.65));
  border: 1px solid var(--tone-border);
  border-radius: 16px;
  padding: 1.2rem 1.4rem 1.25rem;
}
.alert-card.severity-extreme  { --tone: #ef4444; --tone-soft: rgba(239,68,68,.14);  --tone-border: rgba(239,68,68,.50); }
.alert-card.severity-severe   { --tone: #f97316; --tone-soft: rgba(249,115,22,.12); --tone-border: rgba(249,115,22,.40); }
.alert-card.severity-moderate { --tone: #f9b233; --tone-soft: rgba(249,178,51,.12); --tone-border: rgba(249,178,51,.40); }
.alert-card.severity-minor    { --tone: #60a5fa; --tone-soft: rgba(96,165,250,.10); --tone-border: rgba(96,165,250,.32); }

/* Leitsymbol + Content-Spalte */
.alert-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.alert-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: color-mix(in srgb, var(--tone, #94a3b8) 16%, transparent);
  color: var(--tone, #94a3b8);
  flex-shrink: 0;
}
.alert-card-content { min-width: 0; }

.alert-card-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .76rem; color: var(--muted-2); margin-bottom: .65rem;
}
.alert-source-badge {
  font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
}
.alert-source-badge.source-bbk { background: #f9b233; color: #0a1322; }
.alert-source-badge.source-dwd { background: #60a5fa; color: #0a1322; }

.alert-severity-badge {
  font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 20px;
  background: rgba(255,255,255,.1); color: var(--text);
}
.alert-severity-badge.sev-extreme  { background: #dc2626; color: #fff; }
.alert-severity-badge.sev-severe   { background: #ea580c; color: #fff; }
.alert-severity-badge.sev-moderate { background: #f9b233; color: #0a1322; }
.alert-severity-badge.sev-minor    { background: rgba(96,165,250,.22); color: #cfe1ff; }
[data-theme="light"] .alert-severity-badge { background: rgba(20,33,55,.08); }
[data-theme="light"] .alert-severity-badge.sev-minor { background: rgba(37,99,235,.14); color: #1e3a8a; }

.alert-event-chip {
  font-size: .7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,.06); color: var(--muted);
}
[data-theme="light"] .alert-event-chip { background: rgba(20,33,55,.06); }
.alert-time { margin-left: auto; color: var(--muted-2); font-size: .76rem; }

.alert-headline {
  font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem;
  color: var(--text); line-height: 1.35;
}
.alert-areas {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted); margin: .5rem 0;
}
.alert-areas svg { color: var(--muted-2); }
.alert-areas-more { color: #64748b; font-size: .72rem; }

.alert-details { margin-top: .6rem; }
.alert-details summary {
  cursor: pointer; font-size: .82rem; color: #f9b233;
  list-style: none; padding: .25rem 0;
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600;
}
.alert-details summary::-webkit-details-marker { display: none; }
.alert-details summary::before { content: '▸'; transition: transform .15s ease; display: inline-block; }
.alert-details[open] summary::before { transform: rotate(90deg); }
.alert-description {
  font-size: .9rem; color: var(--muted); line-height: 1.65;
  margin: .65rem 0 0;
}
.alert-instruction {
  background: rgba(249,178,51,.06);
  border-left: 3px solid #f9b233;
  padding: .75rem .95rem;
  border-radius: 6px;
  margin-top: .85rem;
}
.alert-instruction strong { color: #f9b233; display: block; font-size: .8rem; margin-bottom: .35rem; }
.alert-instruction p { margin: 0; font-size: .87rem; color: var(--muted-2); line-height: 1.55; }

.alert-card-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .65rem;
  margin-top: 1rem; padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .72rem; color: var(--muted-2);
}
.alert-source-line { color: var(--muted-2); }
.alert-source-link {
  color: #f9b233; text-decoration: none; font-weight: 600;
}
.alert-source-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   Dashboard Cockpit
═══════════════════════════════════════════════════════════ */

/* Hero */
.cockpit-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(20,33,55,.7), rgba(13,21,37,.7));
  transition: border-color 300ms, box-shadow 300ms;
}
.cockpit-hero.active {
  border-color: rgba(74,222,128,.45);
  box-shadow: 0 0 60px rgba(74,222,128,.10);
}
.cockpit-hero.inactive { border-color: var(--border); }
.cockpit-hero-main { display: flex; align-items: center; gap: 1.1rem; min-width: 0; flex: 1; }
.cockpit-hero-indicator {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cockpit-hero.active   .cockpit-hero-indicator { background: rgba(74,222,128,.16); box-shadow: 0 0 36px rgba(74,222,128,.25); }
.cockpit-hero.inactive .cockpit-hero-indicator { background: rgba(255,255,255,.06); }
.cockpit-dot { width: 18px; height: 18px; border-radius: 50%; }
.cockpit-hero.active   .cockpit-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.cockpit-hero.inactive .cockpit-dot { background: var(--muted-2); }
.cockpit-hero-text { min-width: 0; }
.cockpit-hero-eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin: 0 0 .2rem;
}
.cockpit-hero-title {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); margin: 0; line-height: 1.1;
}
.cockpit-hero.active   .cockpit-hero-title { color: var(--green); }
.cockpit-hero.inactive .cockpit-hero-title { color: var(--text); }
.cockpit-hero-sub { font-size: .9rem; color: var(--muted-2); margin: .3rem 0 0; }
.cockpit-hero-actions { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.cockpit-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem;
  background: var(--gold); color: var(--navy);
  border: 0; border-radius: .55rem;
  font-weight: 700; font-size: .95rem; font-family: inherit;
  cursor: pointer; transition: filter .15s, transform .12s;
}
.cockpit-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.cockpit-cta.toggle-on { background: rgba(239,68,68,.18); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
.cockpit-cta.toggle-on:hover { background: rgba(239,68,68,.28); color: #fff; }

@media (max-width: 740px) {
  .cockpit-hero { flex-direction: column; align-items: stretch; }
  .cockpit-hero-actions { justify-content: stretch; }
  .cockpit-cta { flex: 1; justify-content: center; }
}

/* KPI-Reihe */
.cockpit-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
}
.cockpit-kpi {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .12s, background .15s;
  font-feature-settings: "tnum" 1;
}
.cockpit-kpi:hover { border-color: rgba(249,178,51,.4); transform: translateY(-1px); }
.cockpit-kpi.alert { border-color: rgba(239,68,68,.4); }
.cockpit-kpi-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(249,178,51,.12); color: var(--gold); flex-shrink: 0;
}
.cockpit-kpi.alert .cockpit-kpi-icon { background: rgba(239,68,68,.15); color: #fca5a5; }
.cockpit-kpi-body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.cockpit-kpi-num { font-size: 1.7rem; font-weight: 700; color: var(--text); line-height: 1.05; }
.cockpit-kpi-label { font-size: .82rem; color: var(--muted-2); }
.cockpit-kpi-hint { font-size: .72rem; color: var(--muted-2); margin-top: .15rem; }
.cockpit-kpi-hint.warn  { color: var(--gold); }
.cockpit-kpi-hint.good  { color: var(--green); }
.cockpit-kpi-hint.alert { color: #fca5a5; font-weight: 600; }

/* Quicklinks + Activity Grid */
.cockpit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 880px) { .cockpit-grid { grid-template-columns: 1fr; } }

.cockpit-card {
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.cockpit-card-title {
  margin: 0 0 .85rem;
  font-size: .95rem; font-weight: 600;
  color: var(--text);
}

/* Quicklinks */
.cockpit-quicklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.cockpit-quicklist a {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem .85rem;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: .55rem;
  text-decoration: none; color: var(--text);
  transition: border-color .12s, background .12s;
}
.cockpit-quicklist a:hover { border-color: rgba(249,178,51,.35); background: rgba(249,178,51,.04); }
.cockpit-quicklist a > svg:first-child { color: var(--gold); flex-shrink: 0; }
.cockpit-quicklist span { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.cockpit-quicklist strong { font-size: .9rem; font-weight: 600; color: var(--text); }
.cockpit-quicklist small  { font-size: .76rem; color: var(--muted-2); }
.cockpit-quicklist .chev { color: var(--muted-2); flex-shrink: 0; }

/* Activity Feed */
.cockpit-feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.cockpit-feed li {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: .65rem;
  padding: .55rem .7rem;
  background: rgba(0,0,0,.18);
  border-radius: .45rem;
  font-size: .85rem;
}
.cockpit-feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.cockpit-feed-dot.tone-green { background: var(--green); }
.cockpit-feed-dot.tone-gold  { background: var(--gold); }
.cockpit-feed-dot.tone-muted { background: var(--muted-2); opacity: .6; }
.cockpit-feed-label { color: var(--text); }
.cockpit-feed-time { color: var(--muted-2); font-size: .76rem; font-feature-settings: "tnum" 1; }
.cockpit-empty { color: var(--muted-2); font-size: .86rem; margin: 0; }

/* Last Incident */
.cockpit-last-incident {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1.1rem;
  background: rgba(20,33,55,.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .88rem; color: var(--muted-2);
}
.cockpit-last-incident > svg { color: var(--gold); flex-shrink: 0; }
.cockpit-last-incident strong { color: var(--text); font-weight: 600; }
.cockpit-last-incident > a { margin-left: auto; }
@media (max-width: 560px) {
  .cockpit-last-incident { flex-wrap: wrap; }
  .cockpit-last-incident > a { margin-left: 0; }
}

/* Konfig-Akkordeon */
.cockpit-config {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.cockpit-config-summary {
  list-style: none;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  user-select: none;
}
.cockpit-config-summary::-webkit-details-marker { display: none; }
.cockpit-config-summary > svg:first-child { color: var(--gold); flex-shrink: 0; }
.cockpit-config-summary-text { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.cockpit-config-summary-text strong { font-size: .95rem; color: var(--text); }
.cockpit-config-summary-text small  { font-size: .8rem; color: var(--muted-2); }
.cockpit-config-actions { display: flex; gap: .5rem; align-items: center; }
.cockpit-config-summary .chev { color: var(--muted-2); transition: transform .15s ease; flex-shrink: 0; }
.cockpit-config[open] .cockpit-config-summary .chev { transform: rotate(180deg); }
.cockpit-config[open] .cockpit-config-summary { border-bottom: 1px solid var(--border); }
.cockpit-config > *:not(summary) {
  padding: 0 1.4rem 1.4rem;
}
.cockpit-config > .playbook-collapse { margin-left: 1.4rem; margin-right: 1.4rem; padding: 0; }

/* ═══════════════════════════════════════════════════════════
   POI-Liste (Dashboard Karten-Editor)
═══════════════════════════════════════════════════════════ */
.poi-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poi-row {
  --poi-color: #94a3b8;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  transition: border-color .15s, background .15s;
}
.poi-row:hover { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
.poi-row-icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--poi-color) 18%, transparent);
  color: var(--poi-color);
  border-radius: 6px;
  flex-shrink: 0;
}
.poi-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.poi-row-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poi-row-meta {
  font-size: .72rem;
  color: var(--muted-2);
  font-feature-settings: "tnum" 1;
}
.poi-row-type {
  font-weight: 600;
  color: var(--poi-color);
}
.poi-row-coords { color: var(--muted-2); }
.poi-row-actions {
  display: flex;
  gap: .25rem;
  align-items: center;
  flex-shrink: 0;
}

/* Icon-Buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  color: var(--muted-2);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-icon:hover { background: var(--gold-dim); color: var(--gold); border-color: rgba(249,178,51,.35); }
.btn-icon-danger:hover { background: rgba(239,68,68,.18); color: #fca5a5; border-color: rgba(239,68,68,.4); }

/* Form-Edit-Mode-Hinweis */
#mapPoiForm.is-editing {
  border: 1px solid rgba(249,178,51,.4);
  background: rgba(249,178,51,.04) !important;
}

/* ═══════════════════════════════════════════════════════════
   Dashboard Schnellzugriffe (4 nebeneinander)
═══════════════════════════════════════════════════════════ */
.cockpit-quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
}
.cockpit-quicklink {
  --tone-soft: rgba(249,178,51,.10);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.15rem 1rem;
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20,33,55,.55), rgba(13,21,37,.65));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .12s, background .15s;
}
.cockpit-quicklink:hover {
  border-color: rgba(249,178,51,.35);
  transform: translateY(-1px);
}
.cockpit-quicklink-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(249,178,51,.14);
  color: var(--gold);
  flex-shrink: 0;
  margin-bottom: .4rem;
}
.cockpit-quicklink strong {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.cockpit-quicklink small {
  font-size: .78rem;
  color: var(--muted-2);
  line-height: 1.4;
}
@media (max-width: 960px) {
  .cockpit-quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cockpit-quicklinks-grid { grid-template-columns: 1fr; }
}

/* Vorlagen-Quickselect oberhalb der Aktivierungs-Konfiguration */
.playbook-quickselect {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(249,178,51,.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20,33,55,.55), rgba(13,21,37,.55));
  border: 1px solid rgba(249,178,51,.28);
  border-radius: 14px;
  padding: 1rem 1.2rem;
}
.playbook-quickselect .form-input {
  margin: 0;
}

/* Dashboard – Vorlagen-Tiles (analog zu lt-portal Ausstattung) */
.pb-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.pb-tile-grid form { margin: 0; }
.pb-tile {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1rem;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .55rem;
  color: var(--muted-2);
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.pb-tile:hover {
  border-color: rgba(249,178,51,.30);
  background: rgba(249,178,51,.04);
  color: var(--text);
}
.pb-tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.05);
  border-radius: .4rem;
  color: var(--muted-2);
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.pb-tile:hover .pb-tile-icon { background: var(--gold-dim); color: var(--gold); }
.pb-tile.is-active {
  border-color: var(--gold);
  background: rgba(249,178,51,.10);
  color: var(--text);
}
.pb-tile.is-active .pb-tile-icon { background: var(--gold); color: var(--navy); }
.pb-tile-label { line-height: 1.25; white-space: nowrap; }

/* POI-Sichtbarkeit (Auge-Toggle) */
.poi-toggle-vis .poi-eye-on  { display: none; }
.poi-toggle-vis .poi-eye-off { display: inline-flex; }
.poi-toggle-vis.is-on .poi-eye-on  { display: inline-flex; }
.poi-toggle-vis.is-on .poi-eye-off { display: none; }
.poi-toggle-vis.is-on { color: var(--green); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.poi-toggle-vis.is-on:hover { background: rgba(74,222,128,.16); color: var(--green); }
.poi-row.is-hidden { opacity: .5; }
.poi-row.is-hidden .poi-row-title::after {
  content: " · ausgeblendet";
  font-weight: 400; font-size: .75rem; color: var(--muted-2);
}

/* ─────────────────────────────────────────────────────────
   Vertrieb / Lead-Management
   ───────────────────────────────────────────────────────── */
.sales-filter {
  display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.2rem;
}
.sales-filter .form-input { flex: 0 1 auto; min-width: 150px; }
.sales-filter input[type="search"] { flex: 1 1 260px; }

.sales-table-wrap {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface);
}
.sales-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.sales-table th {
  text-align: left; padding: .7rem .9rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border);
}
.sales-table th.num, .sales-table td.num { text-align: right; }
.sales-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--muted-2); }
.sales-table tr:last-child td { border-bottom: 0; }
.sales-table tbody tr:hover { background: rgba(255,255,255,.03); }
.sales-table strong { color: var(--text); font-weight: 600; display: block; }
.sales-email { font-size: .76rem; color: var(--muted); }
.sales-badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.sales-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.2rem 0; color: var(--muted); font-size: .85rem; }

/* Status-Buttons im Drawer */
.sales-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.sales-status-btn {
  padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: .82rem; font-weight: 600; text-align: left;
  color: var(--muted-2); background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.08); transition: all .12s;
}
.sales-status-btn:hover { border-color: var(--c); color: var(--text); }
.sales-status-btn.active { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-color: var(--c); }

.sales-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.sales-events li { font-size: .8rem; color: var(--muted-2); line-height: 1.4; }
.sales-events .ev-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.sales-events .ev-type { font-weight: 700; color: var(--text); }

/* Statistik */
.sales-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.sales-stat-card {
  display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.sales-stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.sales-stat-dot { width: 10px; height: 10px; border-radius: 50%; }
.sales-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.sales-stat-label { font-size: .82rem; color: var(--muted-2); }
.sales-stat-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: .3rem; }
.sales-stat-bar span { display: block; height: 100%; border-radius: 99px; }

/* Kanban-Karten-Mail-Button */
.kanban-card-mail { margin-left: auto; color: var(--muted-2); display: inline-flex; padding: 4px; border-radius: 6px; }
.kanban-card-mail:hover { color: var(--gold); background: var(--surface); }

/* Dialog (Import) */
.dsm-dialog { border: 1px solid var(--border-2); border-radius: 14px; background: var(--navy); color: var(--text); padding: 0; max-width: 520px; width: calc(100vw - 2rem); }
.dsm-dialog-form { padding: 1.5rem; }
.dsm-dialog code { font-size: .78rem; color: var(--gold); }

/* Vertrieb – Tabelle: sortierbar, klickbare Zeilen, Inline-Status, Sticky-Header */
.sales-table thead th { position: sticky; top: 0; z-index: 2; }
.sales-table th.sortable a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.sales-table th.sortable a:hover { color: var(--text); }
.sales-table th.is-sorted a { color: var(--gold); }
.sales-row { cursor: pointer; }
.sales-row td:first-child { border-left: 3px solid var(--c); }
.sales-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.sales-status-inline {
  font-family: inherit; font-size: .76rem; font-weight: 700;
  padding: .25rem 1.4rem .25rem .6rem; border-radius: 999px; cursor: pointer;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center;
}
.sales-status-inline option { color: #0b1220; background: #fff; }
.sales-table-wrap { max-height: calc(100dvh - 230px); overflow: auto; }

/* Vertrieb – Mehrfachauswahl, Bulk-Leiste, Mail-Status */
.sales-check-col { width: 38px; text-align: center; }
.sales-check-col input { cursor: pointer; width: 16px; height: 16px; accent-color: var(--gold); }
.sales-row.is-unsub { opacity: .55; }
.mail-flag { display: inline-block; margin-left: .4rem; font-size: .68rem; font-weight: 700; padding: .05rem .4rem; border-radius: 99px; }
.mail-flag.sent { color: #60a5fa; background: rgba(96,165,250,.14); }
.mail-flag.open { color: #4ade80; background: rgba(74,222,128,.16); }
.mail-flag.unsub { color: #f87171; background: rgba(248,113,113,.14); }
.sales-bulkbar {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 1rem;
  background: var(--navy); border: 1px solid var(--border-2); border-radius: 999px;
  padding: .6rem 1rem .6rem 1.3rem; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.sales-bulkbar-count { font-size: .9rem; color: var(--muted-2); }
.sales-bulkbar-count strong { color: var(--text); }
.sales-bulkbar .btn-primary, .sales-bulkbar .btn-ghost { padding: .5rem 1rem; }

/* Sticky-Header: deckender Hintergrund (sonst scheinen Zeilen durch) */
.sales-table thead th { background: var(--navy-mid); }

/* Vertrieb – Wiedervorlage-Erinnerungs-Banner */
.sales-due-banner {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 1rem 0 0; padding: .6rem 1rem; border-radius: 10px;
  background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.4);
  color: #c4b5fd; font-size: .88rem; font-weight: 600; text-decoration: none;
}
.sales-due-banner:hover { background: rgba(167,139,250,.18); }
.sales-due-banner.is-active { background: rgba(167,139,250,.22); }
.sales-due-banner strong { color: #ddd6fe; }

/* Vertrieb – Vorlagen-Verwaltung */
.sales-tpl-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sales-tpl-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Vertrieb – Antworten (Inbound) */
.mail-flag.replied { color: #f9b233; background: rgba(249,178,51,.16); }
.sales-reply { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .85rem; margin-bottom: .6rem; }
.sales-reply-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.sales-reply-head span { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.sales-reply-from { font-size: .76rem; color: var(--muted); margin: .15rem 0 .4rem; }
.sales-reply-body { font-size: .82rem; color: var(--muted-2); line-height: 1.5; white-space: pre-wrap; max-height: 220px; overflow: auto; }

/* ─── Vertrieb: Lead-Detail als großes zentriertes Popup ─── */
.sales-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
.sales-modal-overlay.open { opacity: 1; }
.sales-modal[hidden], .sales-modal-overlay[hidden] { display: none; }
.sales-modal {
  position: fixed; top: 50%; left: 50%; z-index: 201;
  transform: translate(-50%, -48%) scale(.98);
  width: min(820px, calc(100vw - 3rem));
  max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--navy); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.sales-modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.sales-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--border);
}
.sales-modal-header .drawer-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.sales-modal-body { padding: 1.6rem; overflow-y: auto; }

.sales-modal-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.8rem;
  margin-bottom: 1.4rem;
}
.sales-modal-meta .full { grid-column: 1 / -1; }
.sales-modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }

@media (max-width: 640px) {
  .sales-modal-meta, .sales-modal-cols { grid-template-columns: 1fr; }
  .sales-modal-body { padding: 1.1rem; }
}

/* ─── Vertrieb-Popup: breiter + Status-Zeile + Mailverlauf + Antwort ─── */
.sales-modal { width: min(1080px, calc(100vw - 3rem)); }

.sales-status-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sales-status-quick { display: flex; gap: .5rem; flex: 1; flex-wrap: wrap; }
.sales-status-quick .sales-status-btn { flex: 1; min-width: 130px; text-align: center; justify-content: center; }
.sales-status-more { max-width: 220px; }

/* Mailverlauf-Thread */
.sales-thread {
  display: flex; flex-direction: column; gap: .7rem;
  max-height: 340px; overflow-y: auto;
  padding: .2rem; margin-bottom: .9rem;
}
.sales-msg { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .85rem; max-width: 85%; }
.sales-msg.in  { align-self: flex-start; background: rgba(255,255,255,.04); }
.sales-msg.out { align-self: flex-end; background: rgba(249,178,51,.10); border-color: rgba(249,178,51,.30); }
.sales-msg-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .72rem; color: var(--muted); margin-bottom: .25rem; }
.sales-msg-subj { font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.sales-msg-body { font-size: .85rem; color: var(--muted-2); line-height: 1.5; white-space: pre-wrap; }

/* Antwort-Formular im Popup */
.sales-reply-form textarea {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border-2);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: .9rem;
  padding: .7rem .85rem; resize: vertical; min-height: 90px;
}
.sales-reply-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: rgba(249,178,51,.5); }
.sales-reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.sales-reply-to { font-size: .8rem; color: var(--muted); }

/* Pipeline-Karte: Antwort-Marker */
.kanban-card-reply { margin-left: auto; color: #f9b233; font-size: 1rem; }

/* Liveticker – Notizen */
.ticker-note { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; }
.ticker-note-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .76rem; color: var(--muted); margin-bottom: .35rem; }
.ticker-note p { font-size: .9rem; color: var(--muted-2); line-height: 1.5; margin: 0; white-space: pre-wrap; }

/* Vertrieb – 'gelesen'-Markierung im Thread */
.sales-read { color: #4ade80; font-weight: 700; }

/* Pipeline-Karte – Neue-Nachricht-Indikator (vor dem Namen) */
.sales-pcard { display: flex; align-items: center; gap: .55rem; }
.pcard-read { flex-shrink: 0; align-self: flex-start; margin-top: 1px; font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4ade80; background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.32); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.pcard-newmsg { position: relative; flex-shrink: 0; color: var(--gold); display: inline-flex; }
.pcard-newmsg::after {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 1.5px solid var(--navy);
}

/* Wiederverwendbare Auswahl-Tiles (Settings: Schweregrade, Sprachen, Webhook-Events) */
.opt-tiles { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.opt-tile {
  position: relative;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem .9rem; border-radius: .55rem;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.08);
  color: var(--muted-2); font-size: .86rem; font-weight: 500; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.opt-tile:hover { border-color: rgba(249,178,51,.3); background: rgba(249,178,51,.04); color: var(--text); }
.opt-tile input { position: absolute; opacity: 0; pointer-events: none; }
.opt-tile::before {
  content: ""; width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0;
  border: 1.5px solid var(--border-2); transition: background .12s, border-color .12s;
  background-repeat: no-repeat; background-position: center;
}
.opt-tile:has(input:checked) { border-color: var(--gold); background: rgba(249,178,51,.1); color: var(--text); }
.opt-tile:has(input:checked)::before {
  background-color: var(--gold); border-color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23142137' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.opt-tile:has(input:disabled) { opacity: .6; cursor: default; }
.opt-tile input:focus-visible ~ * { outline: 2px solid var(--gold); }

/* ─── Embed-Widget: Varianten + Mustervorschau ─── */
.embed-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.embed-variant { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .7rem; }
.embed-variant-head h3 { font-size: 1rem; margin: 0 0 .15rem; color: var(--text); }
.embed-variant-head p { font-size: .8rem; color: var(--muted); margin: 0; }
.embed-variant .embed-snippet { font-size: .68rem; white-space: pre-wrap; word-break: break-all; }
.embed-variant .btn-ghost { align-self: flex-start; padding: .4rem .8rem; font-size: .8rem; }

/* Vorschau-Bühne (stilisierte Website) */
.embed-preview {
  position: relative; height: 150px; border-radius: 10px; overflow: hidden;
  background: #f1f4f8; border: 1px solid var(--border);
}
.epv-page-lines { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.epv-page-lines span { height: 8px; border-radius: 4px; background: #d7dde6; }
.epv-page-lines span:nth-child(1){width:60%} .epv-page-lines span:nth-child(2){width:90%}
.epv-page-lines span:nth-child(3){width:75%} .epv-page-lines span:nth-child(4){width:85%}
.epv-dot { width:8px;height:8px;border-radius:50%;background:#fff;flex-shrink:0 }

/* Banner-Vorschau */
.epv-banner { position:absolute;top:0;left:0;right:0;display:flex;align-items:center;gap:8px;
  background:linear-gradient(90deg,#dc2626,#ef4444);color:#fff;padding:8px 10px;font-size:10px }
.epv-bn-text { flex:1;line-height:1.25 } .epv-bn-text strong{font-weight:800;letter-spacing:.03em}
.epv-btn { background:rgba(0,0,0,.25);padding:4px 8px;border-radius:5px;font-weight:700;white-space:nowrap }
.embed-preview:has(.epv-banner) .epv-page-lines { padding-top: 44px; }

/* Button-Vorschau */
.epv-corner-btn { position:absolute;bottom:12px;right:12px;display:inline-flex;align-items:center;gap:6px;
  background:linear-gradient(90deg,#dc2626,#ef4444);color:#fff;padding:7px 12px;border-radius:999px;
  font-size:11px;font-weight:700;box-shadow:0 4px 14px rgba(220,38,38,.45) }

/* Karten-Vorschau */
.epv-card { position:absolute;bottom:12px;right:12px;width:170px;background:#0d1525;color:#f0f4f8;
  border:1px solid rgba(239,68,68,.5);border-radius:10px;padding:10px;box-shadow:0 8px 20px rgba(0,0,0,.3) }
.epv-card .epv-dot{background:#ef4444}
.epv-card-head{display:flex;align-items:center;gap:6px;color:#fca5a5;font-size:8.5px;letter-spacing:.03em;margin-bottom:5px}
.epv-card p{font-size:10px;line-height:1.4;margin:0 0 8px;color:#e2e8f0}
.epv-card-btn{display:inline-block;background:#ef4444;color:#fff;padding:5px 9px;border-radius:6px;font-size:9.5px;font-weight:700}

/* Settings – Monitor: Drag&Drop-Modulliste */
.mon-modlist { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.mon-mod { display: flex; align-items: center; gap: .6rem; }
.mon-mod.dragging { opacity: .5; }
.mon-drag { cursor: grab; color: var(--muted); font-size: 1.1rem; user-select: none; padding: 0 .2rem; }
.mon-mod .opt-tile { width: 100%; }

/* Monitor – Raster-Editor */
.mon-editor { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; margin-top: .5rem; }
@media (max-width: 720px){ .mon-editor { grid-template-columns: 1fr; } }
.mon-palette { display: flex; flex-direction: column; gap: .4rem; align-content: start; }
.mon-pal-item { text-align: left; padding: .55rem .7rem; border-radius: 8px; cursor: pointer;
  background: rgba(0,0,0,.2); border: 1px solid var(--border-2); color: var(--muted-2); font-family: inherit; font-size: .82rem; }
.mon-pal-item small { color: var(--muted); }
.mon-pal-item:hover:not(:disabled) { border-color: var(--gold); color: var(--text); }
.mon-pal-item:disabled { opacity: .35; cursor: default; }
.mon-grid-edit {
  position: relative; width: 100%; border: 1px solid var(--border-2); border-radius: 10px;
  background-color: rgba(0,0,0,.18);
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px), linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: calc(100%/var(--cols,8)) calc(100%/var(--rows,6));
  touch-action: none; overflow: hidden;
}
.mon-tile {
  position: absolute; box-sizing: border-box; padding: .4rem .55rem;
  background: rgba(249,178,51,.14); border: 1px solid var(--gold); border-radius: 8px;
  color: var(--text); font-size: .8rem; font-weight: 600; cursor: grab;
  display: flex; align-items: flex-start; justify-content: space-between; gap: .3rem; overflow: hidden;
}
.mon-tile.dragging { opacity: .8; cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,.4); z-index: 5; }
.mon-tile-label { line-height: 1.2; overflow: hidden; }
.mon-tile-x { background: none; border: 0; color: var(--muted-2); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .1rem; flex-shrink: 0; }
.mon-tile-x:hover { color: #f87171; }

/* Monitor-Editor: Resize-Griff */
.mon-tile { position: absolute; }
.mon-tile-rz { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; cursor: nwse-resize;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); border-bottom-right-radius: 4px; opacity: .8; }
.mon-tile-rz:hover { opacity: 1; }

/* Vertrieb – Demo-Block im Lead-Drawer */
.sales-demo { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); border-radius: 10px; padding: .8rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.4rem; align-items: center; }
.sales-demo.expired { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); }
.sales-demo-grid { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .86rem; }
.sales-demo-grid span { color: var(--muted); }
.sales-demo-grid strong { color: var(--text); }
.sales-demo-act { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sales-demo-act .btn-primary { padding: .45rem .9rem; }

/* Demo-Mandant: Hinweis-Leiste (fix oben) */
.demo-tenant-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #f9b233; color: #1a1206; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-align: center; padding: 4px 10px; }
body:has(.demo-tenant-bar) .sidebar,
body:has(.demo-tenant-bar) .app-main { margin-top: 24px; }

/* Lead-Popup: kompaktere Sektions-Abstände */
.sales-modal-body .drawer-section { margin-top: 1rem; }
.sales-modal-body .drawer-section .drawer-section-label { display: block; margin-bottom: .4rem; }
.sales-modal-meta { margin-bottom: .9rem; }

/* Demo-Block: Code/Gültig links, Links rechts, Verwalten volle Breite darunter */
.sales-demo-links { display: flex; flex-direction: column; gap: .4rem; }
.sales-demo-linkrow { display: flex; gap: .5rem; align-items: center; }
.sales-demo-linkrow .btn-primary { padding: .4rem .85rem; }
.sales-demo-linkrow .btn-ghost { padding: .35rem .65rem; font-size: .78rem; }
.sales-demo-manage { display: flex; gap: .5rem; margin-top: .5rem; padding-top: .55rem; border-top: 1px solid var(--border); grid-column: 1 / -1; }

/* ═══════════════════════════════════════════════════════════
   Light-Theme: dunkle/Gradient-Flächen auf helle Flächen mappen
   (Karten waren dark-first als linear-gradient gebaut)
═══════════════════════════════════════════════════════════ */
[data-theme="light"] .cockpit-hero,
[data-theme="light"] .cockpit-quicklink,
[data-theme="light"] .playbook-quickselect,
[data-theme="light"] .alert-card,
[data-theme="light"] .volunteer-card,
[data-theme="light"] .bbk-card,
[data-theme="light"] .bbk-public-card,
[data-theme="light"] .ticker-public-entry {
  background:
    radial-gradient(ellipse at 100% 0%, var(--tone-soft, transparent) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff, #f4f7fb);
}
[data-theme="light"] .ticker-section { background: rgba(20,33,55,.03); }
[data-theme="light"] .auth-card      { background: #ffffff; }
[data-theme="light"] .locality-results { background: #ffffff; }
[data-theme="light"] .cockpit-quicklist a,
[data-theme="light"] .cockpit-feed li,
[data-theme="light"] .pb-tile {
  background: rgba(20,33,55,.04);
  border-color: var(--border);
}
[data-theme="light"] .cockpit-last-incident { background: #f1f5f9; }
[data-theme="light"] .poi-row { background: rgba(20,33,55,.025); border-color: var(--border); }
[data-theme="light"] .btn-icon { background: rgba(20,33,55,.04); border-color: var(--border-2); }
[data-theme="light"] .pb-tile-icon,
[data-theme="light"] .cockpit-hero.inactive .cockpit-hero-indicator { background: rgba(20,33,55,.06); }
[data-theme="light"] .hero-preview,
[data-theme="light"] .map-editor { background: #eef2f7; }
.sales-demo-manage .btn-ghost { padding: .4rem .8rem; font-size: .82rem; }
.demo-del-btn { color: #f87171 !important; }

/* ═══════════════════════════════════════════════════════════
   LIGHT-MODE SICHERHEITSNETZ
   Generisch: macht alle Container-Flächen hell & lesbar (WCAG AA),
   überschreibt auch Inline-Styles (!important). Greift nur bei
   data-theme="light" – also ausschließlich im Backend, nie auf der
   öffentlichen Darksite (die setzt kein data-theme) oder Landing
   (eigenes Stylesheet). Akzente (Buttons/Badges/farbige Status)
   sind per :not() ausgenommen und behalten ihre Farben.
═══════════════════════════════════════════════════════════ */
[data-theme="light"] :is(
  [class*="card"], [class*="-box"], [class*="-tile"], [class*="-panel"],
  [class*="-strip"], [class*="-feed"], [class*="-stream"], [class*="-bubble"],
  [class*="-note"], [class*="-checkin"], [class*="drawer"], [class*="modal"],
  [class*="quicklink"], [class*="quicklist"], [class*="quickselect"],
  [class*="empty-state"], [class*="-well"], [class*="-surface"]
):not([class*="badge"]):not([class*="pill"]):not([class*="chip"]):not([class*="btn"]):not([class*="cta"]):not([class*="tag"]):not([class*="-icon"]):not([class*="dot"]):not([class*="status-led"]):not([class*="severity"]):not([class*="urgency"]):not([class*="success"]):not([class*="danger"]):not([class*="-error"]):not([class*="active"]):not([class*="checked"]):not([class*="is-open"]):not([class*="selected"]) {
  background-color: var(--surface-solid) !important;
  background-image: none !important;
  border-color: var(--border) !important;
}
/* Text-Sicherung: häufigste hell-hardcodierten Inline-Textfarben auf den jetzt
   hellen Flächen dunkel machen. Akzente (gold/farbig) bleiben via eigene Klassen. */
[data-theme="light"] [style*="color:#fff"]:not([class*="badge"]):not([class*="pill"]):not([class*="btn"]):not([class*="cta"]),
[data-theme="light"] [style*="color: #fff"]:not([class*="badge"]):not([class*="pill"]):not([class*="btn"]):not([class*="cta"]),
[data-theme="light"] [style*="color:#e2e8f0"],
[data-theme="light"] [style*="color:#f1f5f9"],
[data-theme="light"] [style*="color:#f0f4f8"] {
  color: var(--text) !important;
}
