/* ============================================================
   markt.machen.cockpit — Design System & Stylesheet
   Swiss/Clean, Mobile-first, German UI
   ============================================================ */

/* ── 1. CSS Custom Properties (Design Tokens) ────────────────── */
:root {
  /* Colors */
  --color-primary:         #1a365d;
  --color-primary-hover:   #15304f;
  --color-primary-light:   #2a4a7f;
  --color-primary-muted:   #e8eef5;
  --color-cta:             #0f5bff;
  --color-cta-hover:       #0b4ad0;
  --color-cta-text:        #ffffff;
  --color-tab-bg:          #f3f7fc;
  --color-tab-bg-hover:    #e8f0fb;
  --color-tab-bg-active:   #dfeeff;
  --color-tab-border:      rgba(26, 54, 93, 0.12);
  --color-tab-border-active: rgba(15, 91, 255, 0.34);
  --color-bg:              #f7f7f5;
  --color-surface:         #ffffff;
  --color-surface-raised:  #ffffff;
  --color-border:          #e2e2de;
  --color-border-subtle:   #ececea;
  --color-text:            #1a1a18;
  --color-text-secondary:  #555552;
  --color-text-muted:      #888884;
  --color-text-inverse:    #ffffff;
  --color-accent-green:    #38a169;
  --color-accent-green-bg: #f0faf4;
  --color-accent-green-hover: #2f8a59;
  --color-accent-orange:   #d97706;
  --color-accent-orange-bg:#fffbeb;
  --color-accent-red:      #e53e3e;
  --color-accent-red-bg:   #fff5f5;
  --color-accent-blue:     #3182ce;
  --color-accent-blue-bg:  #ebf4ff;

  /* Semantic */
  --color-success:         var(--color-accent-green);
  --color-warning:         var(--color-accent-orange);
  --color-error:           var(--color-accent-red);
  --color-info:            var(--color-accent-blue);

  /* Sidebar / Layout */
  --sidebar-width:         200px;
  --sidebar-collapsed-width: 48px;
  --sidebar-bg:            #ffffff;
  --subnav-width:          0px;
  --topbar-height:         52px;

  /* Typography */
  --font-sans:             'Inter', system-ui, -apple-system, sans-serif;
  --text-xs:               0.6875rem;   /* 11px */
  --text-sm:               0.8125rem;   /* 13px */
  --text-base:             0.875rem;    /* 14px */
  --text-md:               1rem;        /* 16px */
  --text-lg:               1.125rem;    /* 18px */
  --text-xl:               1.375rem;    /* 22px */
  --text-2xl:              1.75rem;     /* 28px */
  --text-3xl:              2.25rem;     /* 36px */
  --leading-tight:         1.25;
  --leading-base:          1.5;
  --leading-relaxed:       1.65;

  /* Spacing (4px base) */
  --space-1:   0.25rem;   /* 4px */
  --space-2:   0.5rem;    /* 8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);

  /* Transitions */
  --transition-fast:  150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base:  180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow:  300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 1b. Dark Mode Tokens ────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;

  --color-primary:         #7ba3d4;
  --color-primary-hover:   #93b5e0;
  --color-primary-light:   #5a8abf;
  --color-primary-muted:   #1e2a3a;
  --color-cta:             #4d8aff;
  --color-cta-hover:       #6b9eff;
  --color-cta-text:        #ffffff;
  --color-tab-bg:          #1a2233;
  --color-tab-bg-hover:    #1f2b3f;
  --color-tab-bg-active:   #253448;
  --color-tab-border:      rgba(255,255,255,0.08);
  --color-tab-border-active: rgba(77,138,255,0.4);
  --color-bg:              #0f1319;
  --color-surface:         #181d27;
  --color-surface-raised:  #1e2530;
  --color-border:          #2a3140;
  --color-border-subtle:   #222938;
  --color-text:            #e4e5e7;
  --color-text-secondary:  #a0a4ab;
  --color-text-muted:      #6b7280;
  --color-text-inverse:    #0f1319;
  --color-accent-green:    #4ade80;
  --color-accent-green-bg: #0a1f12;
  --color-accent-green-hover: #22c55e;
  --color-accent-orange:   #fbbf24;
  --color-accent-orange-bg:#1a1508;
  --color-accent-red:      #f87171;
  --color-accent-red-bg:   #1f0a0a;
  --color-accent-blue:     #60a5fa;
  --color-accent-blue-bg:  #0a1628;

  --sidebar-bg:            #141820;

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
}

/* ── 2. Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dashboard layout: no body scroll */
body.app-mode {
  overflow: hidden;
  height: 100dvh;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-light); }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

/* Tabular numbers for data */
.tabular { font-variant-numeric: tabular-nums lining-nums; }

/* ── 3. Utility Classes ──────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* ── 4. Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
  min-height: 36px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cta) 0%, #2d73ff 100%);
  color: var(--color-cta-text);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(15, 91, 255, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-cta-hover) 0%, #185ae3 100%);
  box-shadow: 0 14px 28px rgba(15, 91, 255, 0.26);
}
.btn-primary:active {
  background: linear-gradient(135deg, var(--color-cta-hover) 0%, #185ae3 100%);
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(15, 91, 255, 0.2);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.btn-danger {
  background: var(--color-accent-red);
  color: #fff;
}
.btn-danger:hover { background: #c53030; }

.btn-sm { padding: var(--space-1) var(--space-3); min-height: 30px; font-size: var(--text-xs); }
.btn-lg { padding: var(--space-3) var(--space-6); min-height: 44px; font-size: var(--text-base); }
.btn-full { width: 100%; }
.btn-icon { padding: var(--space-2); min-width: 36px; }

/* Spinner inside button */
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-secondary .btn-spinner,
.btn-ghost .btn-spinner {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--color-text);
}

/* ── 5. Form Elements ────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 38px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--color-accent-red);
}

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

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.form-section-divider {
  height: 1px;
  margin: var(--space-2) 0 var(--space-4);
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.2));
}

.form-section-heading {
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

.form-section-hint {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.form-error {
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
  border: 1px solid rgba(229, 62, 62, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.form-success {
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-green-bg);
  color: var(--color-accent-green);
  border: 1px solid rgba(56, 161, 105, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* Slider */
.form-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  outline: none;
  cursor: pointer;
}
.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.form-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.form-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

/* Toggle buttons (Ja/Nein) */
.toggle-group {
  display: flex;
  gap: var(--space-2);
}
.toggle-btn {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px;
}
.toggle-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.toggle-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.toggle-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Radio choices */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.choice-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.choice-item:hover { border-color: var(--color-primary); background: var(--color-primary-muted); }
.choice-item input[type="radio"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.choice-item.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-muted);
}
.choice-item label { cursor: pointer; font-size: var(--text-sm); }

/* ── 6. Cards ────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
}

.card-sm { padding: var(--space-4); border-radius: var(--radius-md); }
.card-lg { padding: var(--space-8); border-radius: var(--radius-xl); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ── 7. Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.badge-blue   { background: var(--color-accent-blue-bg); color: var(--color-accent-blue); }
.badge-green  { background: var(--color-accent-green-bg); color: var(--color-accent-green); }
.badge-orange { background: var(--color-accent-orange-bg); color: var(--color-accent-orange); }
.badge-red    { background: var(--color-accent-red-bg); color: var(--color-accent-red); }
.badge-gray   { background: var(--color-bg); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* ── 8. Auth Layout ──────────────────────────────────────────── */
.view-auth {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(91,108,255,0.22) 0%, rgba(91,108,255,0) 60%),
    radial-gradient(50% 40% at 88% 100%, rgba(34,211,238,0.16) 0%, rgba(34,211,238,0) 60%),
    linear-gradient(160deg, #F7F8FB 0%, #ECEFF8 50%, #E4E9F5 100%);
  color: #0E1330;
}

[data-theme="dark"] .view-auth {
  background:
    radial-gradient(55% 45% at 10% 5%, rgba(91,108,255,0.28) 0%, rgba(91,108,255,0) 60%),
    radial-gradient(45% 35% at 90% 100%, rgba(34,211,238,0.18) 0%, rgba(34,211,238,0) 60%),
    radial-gradient(40% 30% at 70% 30%, rgba(123,138,255,0.10) 0%, rgba(123,138,255,0) 60%),
    linear-gradient(160deg, #0A0B14 0%, #0E1226 50%, #14183A 100%);
  color: #E8ECFF;
}

@media (min-width: 1024px) {
  .view-auth { grid-template-columns: 1fr 1fr; }
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

/* Hero on right side (split-screen) */
.auth-hero-side {
  display: none;
  position: relative;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .auth-hero-side { display: block; }
}

.auth-hero-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.auth-hero-mesh .blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.7;
  animation: auth-blob-drift 18s ease-in-out infinite alternate;
}
.auth-hero-mesh .blob.b1 { top: 10%; left: 15%; width: 380px; height: 380px; background: #5B6CFF; }
.auth-hero-mesh .blob.b2 { bottom: 5%;  right: 5%; width: 320px; height: 320px; background: #22D3EE; animation-delay: -4s; }
.auth-hero-mesh .blob.b3 { top: 40%;   right: 25%; width: 240px; height: 240px; background: #7B8AFF; animation-delay: -9s; }
@keyframes auth-blob-drift {
  0%   { transform: translate3d(0,0,0)        scale(1); }
  50%  { transform: translate3d(20px,-30px,0) scale(1.06); }
  100% { transform: translate3d(-15px,25px,0) scale(0.96); }
}

.auth-hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-12);
}

/* Glass utility for auth context (independent of mc-glass-card) */
.auth-glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(91, 108, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(14, 19, 48, 0.04),
    0 24px 60px -24px rgba(14, 19, 48, 0.20);
}
[data-theme="dark"] .auth-glass {
  background: rgba(20, 24, 48, 0.50);
  border-color: rgba(123, 138, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 32px 80px -32px rgba(0, 0, 0, 0.7);
}

/* Glass-input style for login form (icons left, optional eye-toggle right) */
.glass-input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3) 0 38px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(14, 19, 48, 0.08);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  color: inherit;
}
.glass-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.18);
  background: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .glass-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #E8ECFF;
}
[data-theme="dark"] .glass-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: #7B8AFF;
  box-shadow: 0 0 0 4px rgba(123, 138, 255, 0.18);
}
.glass-input::placeholder { opacity: 0.5; }

.glass-input-wrap {
  position: relative;
}
.glass-input-wrap .input-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
  color: currentColor;
}

/* Submit button with indigo→cyan gradient */
.btn-aurora {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg,#5B6CFF 0%, #4a5cff 60%, #22D3EE 140%);
  box-shadow: 0 8px 24px -8px rgba(91,108,255,0.65), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.btn-aurora:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(91,108,255,0.75), inset 0 1px 0 rgba(255,255,255,0.30); }
.btn-aurora:active { transform: translateY(0); }
.btn-aurora:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Logo lockup with glow */
.auth-logo-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(135deg, #5B6CFF, #22D3EE);
  box-shadow: 0 0 32px rgba(91,108,255,0.45), 0 0 80px rgba(34,211,238,0.18);
}
.auth-logo-text-primary {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.auth-logo-text-primary .accent { color: var(--color-primary); }
.auth-logo-text-secondary {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 4px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
  color: var(--color-primary);
}

.logo-svg {
  height: 44px;
  width: auto;
  color: var(--color-primary);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.auth-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.auth-switch {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-5);
}

.auth-switch .link {
  color: var(--color-primary);
  font-weight: 500;
}

.auth-footer {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}
.auth-footer a { color: var(--color-text-muted); }
.auth-footer a:hover { color: var(--color-text-secondary); }

/* ── 9. App Layout (Topbar + Sidebar + Subnav + Main) ────────── */
.app-layout {
  display: grid;
  grid-template-areas:
    "topbar topbar topbar"
    "sidebar subnav main";
  grid-template-columns: var(--sidebar-width) var(--subnav-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  height: 100dvh;
  overflow: hidden;
}

/* Topbar (full-width, row 1) */
.app-topbar {
  grid-area: topbar;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-3);
  z-index: 40;
  flex-shrink: 0;
}

.topbar-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-sidebar-toggle:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.topbar-logo {
  display: flex;
  align-items: center;
  color: var(--color-primary);
  flex-shrink: 0;
  text-decoration: none;
  margin-right: var(--space-2);
}
.logo-topbar { height: 32px; }

.topbar-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Topbar icon button (help etc.) */
.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-icon-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.topbar-icon-btn.is-active {
  background: var(--color-primary-muted);
  color: var(--color-primary);
}

/* Topbar user dropdown */
.topbar-user {
  position: relative;
}

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: 500;
}
.topbar-user-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.topbar-user-btn[aria-expanded="true"] {
  background: var(--color-bg);
  color: var(--color-text);
}
.topbar-user-chevron {
  opacity: 0.6;
  transition: transform var(--transition-fast);
}
.topbar-user-btn[aria-expanded="true"] .topbar-user-chevron {
  transform: rotate(180deg);
}

.topbar-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  padding: var(--space-1) 0;
}
.topbar-user-dropdown.hidden { display: none; }

.topbar-user-info {
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topbar-user-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-1) 0;
}
.topbar-user-item {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.topbar-user-item:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.topbar-user-item--danger { color: var(--color-accent-red); }
.topbar-user-item--danger:hover {
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
}

/* Sidebar (col 1, row 2) */
.sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  z-index: 30;
  position: relative;
  transition: transform var(--transition-slow);
}

/* Sidebar: icon-only collapsed state */
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-section-label { display: none; }
.sidebar.collapsed .nav-separator { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 0.5rem; }
.sidebar.collapsed .nav-link svg { margin: 0; }
.sidebar.collapsed .nav-link-small { display: none; }
.sidebar.collapsed .sidebar-nav { padding: var(--space-3) var(--space-2); }

/* Sidebar resize handle */
.sidebar-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background var(--transition-fast);
}
.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
  background: var(--color-primary);
}

/* Legacy elements (kept for backwards-compat, no longer rendered) */
.sidebar-logo { display: none; }
.logo-sidebar { height: 36px; }
.sidebar-toggle { display: none; }
.sidebar-footer { display: none; }

.sidebar-nav {
  flex: 1;
  padding: var(--space-3) var(--space-3) var(--space-4);
}

.sidebar-nav ul { display: flex; flex-direction: column; gap: 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.5rem var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 36px;
  margin-bottom: 2px;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.68;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  background: rgba(232, 238, 245, 0.55);
  color: var(--color-text);
  transform: translateX(1px);
}
.nav-link:hover svg { opacity: 1; transform: translateX(1px); }

.nav-link.active {
  background: var(--color-primary-muted);
  color: var(--color-primary);
  box-shadow: inset 2px 0 0 var(--color-primary);
}
.nav-link.active svg { opacity: 1; }

.nav-section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-3) var(--space-1);
  margin-top: var(--space-2);
  line-height: 1.2;
}

.nav-separator {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-2) var(--space-3) var(--space-1);
  list-style: none;
}

.nav-link-small {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  min-height: auto;
  gap: var(--space-2);
}
.nav-link-small svg {
  width: 14px;
  height: 14px;
}

/* ── Language Switcher (Top-Bar) ──────────────────────── */
.topbar-lang {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: 36px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.topbar-lang-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border-color: var(--color-border);
}

.topbar-lang-btn.open {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.topbar-lang-btn .lang-chevron {
  transition: transform 0.2s;
  opacity: 0.6;
}

.topbar-lang-btn.open .lang-chevron {
  transform: rotate(180deg);
}

.topbar-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  padding: var(--space-1);
}

.topbar-lang-dropdown.hidden {
  display: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.lang-option:hover {
  background: var(--color-surface-hover);
}

.lang-option.active {
  color: var(--color-primary);
  font-weight: 600;
  background: var(--color-primary-muted);
}

.lang-option-flag {
  font-size: 1.1rem;
  line-height: 1;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.lang-option-label {
  flex: 1;
}

.lang-option-code {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Auth page language switcher (top-right corner) */
.auth-lang {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 100;
}

/* Landing page language switcher (between nav links and mobile toggle) */
.landing-lang {
  margin-left: var(--space-3);
}

.sidebar-footer {
  padding: var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-email {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.user-plan {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: capitalize;
}

/* Subnav column (col 2, row 2) */
.subnav {
  grid-area: subnav;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  position: relative;
}
.subnav.subnav--hidden {
  width: 0;
  overflow: hidden;
  border-right: none;
}
.subnav.subnav--collapsed {
  overflow: hidden;
}
.subnav.subnav--collapsed .subnav-title,
.subnav.subnav--collapsed .subnav-items,
.subnav.subnav--collapsed .subnav-resize-handle {
  display: none;
}
.subnav.subnav--collapsed .subnav-header {
  padding: var(--space-2);
  justify-content: center;
  border-bottom: none;
}
.subnav.subnav--collapsed .subnav-collapse-btn {
  transform: rotate(180deg);
}

.subnav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
  min-height: 40px;
}
.subnav-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.subnav-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}
.subnav-collapse-btn:hover {
  background: var(--color-border-subtle);
  color: var(--color-text);
}
.subnav-items {
  flex: 1;
  padding: var(--space-2) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.subnav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  min-height: 34px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.subnav-item:hover {
  background: rgba(232, 238, 245, 0.55);
  color: var(--color-text);
}
.subnav-item.active {
  background: var(--color-primary-muted);
  color: var(--color-primary);
  box-shadow: inset 2px 0 0 var(--color-primary);
}
.subnav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}
.subnav-item.active svg { opacity: 1; }
.subnav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  font-size: 14px;
  line-height: 1;
}

/* Subnav resize handle */
.subnav-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background var(--transition-fast);
}
.subnav-resize-handle:hover,
.subnav-resize-handle.dragging {
  background: var(--color-primary);
}

/* Legacy top-bar (kept for compat with any stray references) */
.top-bar { display: none; }
.top-bar-title { display: none; }
.top-bar-actions { display: none; }
.mobile-menu-btn { display: none; }

/* Main content (col 3, row 2) */
.main-content {
  grid-area: main;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-content {
  flex: 1;
  padding: var(--space-4);
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.priority-accordion {
  border: 1px solid rgba(12, 89, 242, 0.12);
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.92));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.priority-accordion[open] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.96));
}

.priority-accordion__summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  cursor: pointer;
}

.priority-accordion__summary::-webkit-details-marker {
  display: none;
}

.priority-accordion__summary:hover {
  background: rgba(255, 255, 255, 0.45);
}

.priority-accordion__summary-main {
  min-width: 0;
  flex: 1;
}

.priority-accordion__summary-side {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.priority-accordion__chevron {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.priority-accordion[open] .priority-accordion__chevron {
  transform: rotate(180deg);
  background: rgba(12, 89, 242, 0.1);
  color: var(--color-primary);
}

.priority-accordion__body {
  padding: 0 var(--space-6) var(--space-6);
}

.help-drawer {
  position: fixed;
  top: calc(var(--topbar-height) + var(--space-3));
  right: var(--space-3);
  bottom: var(--space-3);
  width: min(360px, calc(100vw - 32px));
  z-index: 42;
  pointer-events: none;
  opacity: 0;
  transform: translateX(calc(100% + var(--space-4)));
  transition: transform 220ms ease, opacity 220ms ease;
}

.help-drawer.help-drawer-visible {
  opacity: 1;
  transform: translateX(0);
}

.help-drawer-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  overflow: hidden;
}

.help-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 41;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(15, 23, 42, 0.18)),
    rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.help-drawer-backdrop.help-drawer-backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

.help-drawer-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 46px;
  height: 88px;
  border: 1px solid rgba(12, 89, 242, 0.32);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background:
    linear-gradient(180deg, rgba(12, 89, 242, 0.96), rgba(8, 68, 198, 0.98)),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
  color: #ffffff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    0 14px 36px rgba(8, 68, 198, 0.28),
    0 2px 0 rgba(255,255,255,0.18) inset;
  z-index: 43;
  transition: right 220ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.help-drawer-toggle:hover {
  transform: translateY(calc(-50% - 1px)) scale(1.02);
  border-color: rgba(8, 68, 198, 0.48);
  box-shadow:
    0 18px 42px rgba(8, 68, 198, 0.34),
    0 2px 0 rgba(255,255,255,0.18) inset;
}

.help-drawer-toggle::after {
  content: '‹';
  font-size: 16px;
  font-weight: 700;
  opacity: 0.92;
  transition: transform 180ms ease, opacity 180ms ease;
}

.help-drawer-toggle.is-active {
  right: calc(min(360px, calc(100vw - 32px)) + var(--space-3));
  background:
    linear-gradient(180deg, rgba(5, 150, 105, 0.96), rgba(4, 120, 87, 0.98)),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
  border-color: rgba(4, 120, 87, 0.46);
  color: #ffffff;
  box-shadow:
    0 18px 42px rgba(4, 120, 87, 0.3),
    0 2px 0 rgba(255,255,255,0.18) inset;
}

.help-drawer-toggle.is-active::after {
  content: '›';
  opacity: 0.9;
}

/* Help toggle inside topbar: override fixed-tab styles */
.app-topbar .help-drawer-toggle {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
  flex-direction: row;
  gap: 0;
  z-index: auto;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.app-topbar .help-drawer-toggle::after { display: none; }
.app-topbar .help-drawer-toggle:hover {
  background: var(--color-bg);
  color: var(--color-text);
  transform: none;
  border-color: transparent;
  box-shadow: none;
}
.app-topbar .help-drawer-toggle.is-active {
  right: auto;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  border-color: transparent;
  box-shadow: none;
}

.help-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
}

.help-drawer-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.help-drawer-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}

.help-drawer-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.help-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  background: var(--color-bg);
}

.help-drawer-close:hover {
  background: var(--color-primary-muted);
  color: var(--color-primary);
}

.help-drawer-section-switcher {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
}

.help-drawer-chip {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.help-drawer-chip.active,
.help-drawer-chip:hover {
  background: var(--color-primary-muted);
  border-color: rgba(26, 54, 93, 0.18);
  color: var(--color-primary);
}

.help-drawer-body {
  flex: 1;
  overflow: auto;
  padding: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.help-drawer-body p,
.help-drawer-body ul,
.help-drawer-body ol,
.help-drawer-body table,
.help-drawer-body .help-callout {
  margin-bottom: var(--space-4);
}

.help-drawer-body ul,
.help-drawer-body ol {
  padding-left: var(--space-5);
}

.help-drawer-body ul {
  list-style: disc;
}

.help-drawer-body ol {
  list-style: decimal;
}

.help-drawer-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
}

.help-drawer-body th,
.help-drawer-body td {
  text-align: left;
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
}

.help-drawer-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border-subtle);
  background: rgba(247,247,245,0.75);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 25;
  backdrop-filter: blur(2px);
}

/* ── 10. Loading States ──────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-lg {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 247, 245, 0.8);
  z-index: 50;
  backdrop-filter: blur(2px);
}

/* Skeleton loader */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-bg) 25%, var(--color-border-subtle) 37%, var(--color-bg) 63%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; width: 100%; border-radius: var(--radius-sm); }
.skeleton-text.w-half { width: 50%; }
.skeleton-text.w-third { width: 33%; }
.skeleton-card { height: 120px; width: 100%; border-radius: var(--radius-lg); }

/* ── 11. Toast Notifications ─────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn var(--transition-slow) forwards;
}
.toast.toast-success { background: var(--color-accent-green); }
.toast.toast-error   { background: var(--color-accent-red); }
.toast.toast-info    { background: var(--color-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}
.toast.removing { animation: toastOut 0.25s forwards; }

/* ── 12. Dashboard Styles ────────────────────────────────────── */
.dashboard-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.dashboard-greeting {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* ── Daily motivation card ─────────────────────────────────── */
.dashboard-motivation-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb, 12,89,242), 0.06) 0%, rgba(var(--color-primary-rgb, 12,89,242), 0.01) 100%);
  border: 1px solid rgba(var(--color-primary-rgb, 12,89,242), 0.18);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
}
.dashboard-motivation-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.dashboard-motivation-card__body {
  min-width: 0;
}
.dashboard-motivation-card__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}
.dashboard-motivation-card__headline {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.45;
  margin-bottom: var(--space-1);
}
.dashboard-motivation-card__detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.dashboard-subline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  max-width: 72ch;
}

.dashboard-morning-hero {
  margin-bottom: var(--space-5);
  padding: var(--space-6);
  border-radius: calc(var(--radius-xl) + 2px);
  border: 1px solid rgba(12, 89, 242, 0.12);
  background:
    radial-gradient(circle at top left, rgba(12, 89, 242, 0.08), transparent 36%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-morning-hero__eyebrow,
.dashboard-morning-hero__summary-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.dashboard-morning-hero__subline {
  color: var(--color-text-secondary);
}

.dashboard-morning-hero__summary {
  padding: var(--space-4);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(12,89,242,0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 34px rgba(15,23,42,0.06);
}

.dashboard-morning-hero__summary-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.dashboard-morning-hero__summary-text {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Small stat tiles inside the morning-hero summary card (Website-Score,
   Artikel-Count). Used by dashboard.js to avoid duplicating the tint
   inline; the dark override lives in the dark-mode block at EOF. */
.dashboard-morning-hero__mini-stat {
  background: rgba(12, 89, 242, 0.05);
}

.dashboard-workspace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.dashboard-workspace-card {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  display: grid;
  gap: var(--space-2);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.dashboard-workspace-card:hover {
  border-color: rgba(12, 89, 242, 0.18);
  background: rgba(248, 250, 255, 0.98);
  transform: translateY(-1px);
}

.dashboard-workspace-card.is-active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(255,255,255,0.99) 100%);
  border-color: rgba(12, 89, 242, 0.34);
  box-shadow: 0 0 0 1px rgba(12, 89, 242, 0.08), 0 14px 32px rgba(15, 23, 42, 0.06);
}

.dashboard-workspace-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(12,89,242,0.08);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 800;
}

.dashboard-workspace-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}

.dashboard-workspace-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.dashboard-jumpnav {
  position: sticky;
  top: calc(var(--topbar-height, 0px) + var(--space-3));
  z-index: 8;
  padding: var(--space-2);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  width: fit-content;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.dashboard-jumpnav__link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard-jumpnav__link:hover {
  background: rgba(12, 89, 242, 0.08);
  color: var(--color-text);
}

.dashboard-jumpnav__link.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.05);
}

/* Score cards grid */
.score-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.score-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.score-card:hover { box-shadow: var(--shadow-sm); }

.score-card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.score-card-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Circular progress */
.circular-progress {
  width: 80px;
  height: 80px;
  position: relative;
}

.circular-progress svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circular-progress .track {
  fill: none;
  stroke: var(--color-bg);
  stroke-width: 7;
}

.circular-progress .fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.circular-progress .score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Color-coding for scores */
.score-strategie   .fill { stroke: var(--color-primary); }
.score-strategie   .score-text { color: var(--color-primary); }
.score-kommunikation .fill { stroke: var(--color-accent-orange); }
.score-kommunikation .score-text { color: var(--color-accent-orange); }
.score-wirkung     .fill { stroke: var(--color-accent-green); }
.score-wirkung     .score-text { color: var(--color-accent-green); }

/* Overall score */
.overall-score-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  box-shadow: var(--shadow-xs);
}

.overall-score-number {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.overall-score-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.overall-score-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Progress bar */
.progress-bar-wrapper {
  margin-bottom: var(--space-2);
}
.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
}
.progress-bar-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}
.progress-bar-value {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.progress-bar-track {
  height: 6px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-bar-fill.green  { background: var(--color-accent-green); }
.progress-bar-fill.orange { background: var(--color-accent-orange); }

/* Pyramid Visualization */
.pyramid-section {
  margin-bottom: var(--space-6);
}

.pyramid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: var(--space-6) var(--space-4);
  position: relative;
}

.pyramid-level {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-6);
  position: relative;
  transition: all var(--transition-base);
  cursor: default;
}

.pyramid-level:hover {
  filter: brightness(1.05);
}

.pyramid-level-wirkung {
  width: 40%;
  min-width: 140px;
  background: var(--color-accent-green-bg);
  border: 2px solid var(--color-accent-green);
  color: var(--color-accent-green);
}

.pyramid-level-kommunikation {
  width: 65%;
  min-width: 220px;
  background: var(--color-accent-orange-bg);
  border: 2px solid var(--color-accent-orange);
  color: var(--color-accent-orange);
  margin-top: 2px;
}

.pyramid-level-strategie {
  width: 90%;
  min-width: 300px;
  background: var(--color-primary-muted);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  margin-top: 2px;
}

.pyramid-level-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-3);
}

.pyramid-level-name {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: capitalize;
}

.pyramid-level-score {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pyramid-connector {
  width: 2px;
  height: 12px;
  background: var(--color-border);
  margin: 0 auto;
}

/* Dashboard widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.cta-banner {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.cta-banner-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.cta-banner-desc {
  font-size: var(--text-sm);
  opacity: 0.8;
}

.cta-banner .btn {
  background: white;
  color: var(--color-primary);
  flex-shrink: 0;
}
.cta-banner .btn:hover {
  background: var(--color-bg);
}

/* ── 12b. Meta-Dashboard ─────────────────────────────────────── */

/* KPI Row */
.meta-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.meta-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: box-shadow var(--transition-fast);
}
.meta-kpi-card:hover { box-shadow: var(--shadow-sm); }

.meta-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meta-kpi-body { min-width: 0; }

.meta-kpi-value {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text);
  line-height: var(--leading-tight);
}

.meta-kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.meta-kpi-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.dashboard-flow-section {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.92) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: calc(var(--space-6) + var(--space-1));
  box-shadow: var(--shadow-xs);
  scroll-margin-top: calc(var(--topbar-height, 0px) + 96px);
}

.dashboard-flow-section + .dashboard-flow-section {
  margin-top: calc(var(--space-8) + var(--space-2));
}

.dashboard-flow-section::before {
  content: none;
}

.dashboard-flow-section:first-of-type::before {
  display: none;
}

.dashboard-section-intro {
  max-width: 72ch;
}

.dashboard-flow-section > div:first-child {
  margin-bottom: var(--space-5);
}

/* 2-Column Grid */
.meta-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  align-items: start;
}

.dashboard-flow-section .card {
  background: rgba(255,255,255,0.98);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.dashboard-flow-section .card:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

#dashboard-now-important {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92) 0%, rgba(255,255,255,0.98) 100%);
  border-color: rgba(12, 89, 242, 0.14);
  box-shadow: 0 20px 48px rgba(12, 89, 242, 0.07);
}

#dashboard-now-important > div:first-child {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(12, 89, 242, 0.08);
}

#dashboard-now-important .card {
  border-color: rgba(12, 89, 242, 0.12);
  box-shadow: 0 16px 36px rgba(12, 89, 242, 0.06);
}

#dashboard-now-important .card:hover {
  box-shadow: 0 20px 42px rgba(12, 89, 242, 0.08);
}

#dashboard-next-steps {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245, 248, 255, 0.94) 100%);
  border-color: rgba(12, 89, 242, 0.1);
}

#dashboard-next-steps > div:first-child {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(12, 89, 242, 0.06);
}

#dashboard-next-steps .dashboard-step-list {
  position: relative;
}

#dashboard-next-steps .dashboard-step-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 14px;
  width: 1px;
  background: linear-gradient(180deg, rgba(12, 89, 242, 0.16) 0%, rgba(12, 89, 242, 0.05) 100%);
}

#dashboard-next-steps .dashboard-step-list .card {
  position: relative;
  border-color: rgba(12, 89, 242, 0.12);
  box-shadow: 0 14px 30px rgba(12, 89, 242, 0.045);
}

#dashboard-next-steps .dashboard-step-card {
  padding-left: calc(var(--space-4) + 2px);
}

#dashboard-next-steps .dashboard-step-card__layout {
  position: relative;
}

#dashboard-next-steps .dashboard-step-card__marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(12, 89, 242, 0.14) 0%, rgba(12, 89, 242, 0.08) 100%);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(12, 89, 242, 0.08), 0 6px 14px rgba(12, 89, 242, 0.08);
}

#dashboard-next-steps .dashboard-step-card__title {
  letter-spacing: -0.01em;
}

#dashboard-next-steps .dashboard-step-card__description {
  color: var(--color-text-muted);
}

#dashboard-next-steps .dashboard-step-list .card:hover {
  box-shadow: 0 18px 36px rgba(12, 89, 242, 0.06);
}

#dashboard-next-steps .dashboard-step-list .btn {
  box-shadow: none;
}

#dashboard-in-progress {
  background: linear-gradient(180deg, rgba(248,250,252,0.88) 0%, rgba(248,250,252,0.76) 100%);
  border-color: rgba(15, 23, 42, 0.06);
}

#dashboard-in-progress .card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
}

#dashboard-in-progress .card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

/* Assessment inside Meta-Dashboard */
.meta-overall-badge {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.meta-overall-max {
  font-size: var(--text-sm);
  font-weight: 400;
  opacity: 0.5;
}

.meta-assess-grid {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.meta-assess-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.meta-assess-item .circular-progress {
  width: 48px;
  height: 48px;
}
.meta-assess-item .score-text {
  font-size: var(--text-sm);
}
.meta-assess-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

/* Content Pipeline inside Meta-Dashboard */
.meta-pipeline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.meta-pipeline-stat {
  text-align: center;
  padding: var(--space-3) var(--space-2);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}
.meta-pipeline-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.meta-pipeline-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.meta-pipeline-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin-bottom: var(--space-3);
}

.meta-pipeline-approval-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.meta-pipeline-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.meta-pipeline-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
.meta-pipeline-dot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.meta-pipeline-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  flex: 1;
}
.meta-pipeline-count {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.meta-empty-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
}
.meta-empty-hint a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}
.meta-empty-hint a:hover { text-decoration: underline; }

/* GSC inside Meta-Dashboard */
.meta-gsc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.meta-gsc-empty-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.meta-gsc-empty-icon svg {
  width: 32px;
  height: 32px;
}
.meta-gsc-empty p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.meta-gsc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.meta-gsc-kpi {
  text-align: center;
  padding: var(--space-3) var(--space-2);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}
.meta-gsc-kpi-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.meta-gsc-kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.meta-gsc-sync {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  text-align: right;
}

.dashboard-priority-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: start;
}

.dashboard-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.dashboard-step-list {
  display: grid;
  gap: var(--space-5);
}

/* Token Budget inside Meta-Dashboard */
.meta-token-numbers {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-4);
}
.meta-token-big {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.meta-token-used {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-secondary);
}
.meta-token-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.meta-token-topup {
  font-size: var(--text-xs);
  color: var(--color-accent-green);
  font-weight: 500;
  margin-top: var(--space-2);
}

/* Progress bar red variant */
.progress-bar-fill.red {
  background: var(--color-accent-red);
}

/* Responsive: Meta-Dashboard */
@media (max-width: 900px) {
  .dashboard-jumpnav {
    position: static;
    width: 100%;
  }

  .dashboard-flow-section {
    padding: calc(var(--space-5) + var(--space-1));
  }

  #dashboard-next-steps .dashboard-step-list::before {
    display: none;
  }

  .help-drawer {
    top: calc(var(--topbar-height) + var(--space-2));
    right: var(--space-2);
    bottom: var(--space-2);
    width: min(380px, calc(100vw - 16px));
  }

  .help-drawer-toggle.is-active {
    right: calc(min(380px, calc(100vw - 16px)) + var(--space-2));
  }

  .meta-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .meta-grid-2col {
    grid-template-columns: 1fr;
  }
  .dashboard-priority-grid,
  .dashboard-steps-grid {
    grid-template-columns: 1fr;
  }
  .meta-pipeline-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .meta-gsc-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .website-main-grid,
  .website-analysis-grid,
  .visibility-main-grid,
  .visibility-detail-grid,
  .competitor-overview-stats,
  .competitor-history-layout {
    grid-template-columns: 1fr;
  }

  .visibility-priority-grid {
    grid-template-columns: 1fr;
  }

  .visibility-panel {
    padding: var(--space-5);
  }

  .visibility-panel__header {
    flex-direction: column;
  }

  .website-score-grid,
  .visibility-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .page-content {
    padding: var(--space-2) var(--space-2);
  }

  .dashboard-header {
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-3);
  }

  .dashboard-jumpnav {
    padding: 6px;
    gap: 6px;
  }

  .dashboard-jumpnav__link {
    padding: 9px 13px;
    font-size: var(--text-xs);
  }

  .dashboard-flow-section {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
  }

  .visibility-panel {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
  }

  .visibility-score-grid {
    grid-template-columns: 1fr;
  }

  .help-drawer {
    right: 0;
    top: var(--topbar-height);
    bottom: var(--space-2);
    width: min(100vw, 100%);
  }

  .help-drawer-panel {
    border-radius: 24px 0 0 0;
  }

  .help-drawer-toggle {
    width: 42px;
    height: 76px;
  }

  .help-drawer-toggle.is-active {
    right: min(100vw, 100%);
  }

  .meta-kpi-row {
    grid-template-columns: 1fr;
  }
  .meta-assess-grid {
    flex-direction: column;
  }
  .meta-pipeline-stats {
    grid-template-columns: 1fr 1fr;
  }
  .meta-gsc-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .website-score-grid,
  .visibility-score-grid,
  .content-overview-stats,
  .competitor-card-metrics {
    grid-template-columns: 1fr;
  }
}

/* ── 13. Onboarding/Assessment Styles ────────────────────────── */
.onboarding-layout {
  max-width: 720px;
  margin: 0 auto;
}

.onboarding-header {
  margin-bottom: var(--space-8);
}

.onboarding-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-2);
}

/* Step indicator */
.step-indicator {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-6);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all var(--transition-base);
}
.step-dot.done   { background: var(--color-accent-green); }
.step-dot.active { background: var(--color-primary); width: 24px; border-radius: var(--radius-full); }

/* Category tabs */
.category-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.category-tab {
  appearance: none;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-tab-border);
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--color-tab-bg) 100%);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.category-tab:hover {
  color: var(--color-text);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, var(--color-tab-bg-hover) 100%);
  border-color: rgba(15, 91, 255, 0.18);
  box-shadow: var(--shadow-sm);
}
.category-tab.active {
  color: var(--color-cta-hover);
  border-color: var(--color-tab-border-active);
  background: linear-gradient(135deg, rgba(15, 91, 255, 0.14), rgba(45, 115, 255, 0.08));
  box-shadow: 0 10px 22px rgba(15, 91, 255, 0.12);
}
.category-tab .tab-progress {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.category-tab.active .tab-progress { color: var(--color-cta-hover); }

/* Question card */
.question-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-fast);
  animation: fadeIn 0.25s ease;
}
.question-card:hover { box-shadow: var(--shadow-sm); }

.question-highlight {
  border-color: var(--color-accent-orange, #e8a838);
  box-shadow: 0 0 0 2px rgba(232, 168, 56, 0.3);
  animation: highlightPulse 0.6s ease;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(232, 168, 56, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(232, 168, 56, 0.2); }
}

.slider-untouched {
  opacity: 0.5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.question-number {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.question-saved {
  font-size: var(--text-xs);
  color: var(--color-accent-green);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.question-saved.visible { opacity: 1; }

.question-text {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.slider-display {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}

.slider-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Navigation between questions */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

/* Final summary */
.summary-pyramid {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.summary-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  letter-spacing: -0.3px;
}

.summary-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

/* ── 14. Profile Styles ───────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: 800px;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
  margin-bottom: var(--space-6);
}

.module-hero-title {
  font-size: clamp(1.1rem, 0.82rem + 0.95vw, 1.4rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-meta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.subtle-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 30px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, white);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-badge--success {
  background: var(--color-accent-green-bg);
  color: var(--color-accent-green);
}

.status-badge--warning {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

.status-badge--error {
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
}

.status-badge--neutral {
  background: color-mix(in srgb, var(--color-primary) 8%, white);
  color: var(--color-primary);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}

.kpi-grid--compact {
  gap: var(--space-3);
}

.kpi-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.kpi-card:hover {
  box-shadow: var(--shadow-sm);
}

.kpi-value {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.kpi-label {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  color: var(--color-text-muted);
}

.website-panel,
.visibility-panel,
.content-panel,
.authority-panel,
.social-panel,
.competitor-panel,
.team-panel {
  margin-bottom: var(--space-5);
}

.website-panel__header,
.visibility-panel__header,
.content-panel__header,
.authority-panel__header,
.social-panel__header,
.competitor-panel__header,
.team-panel__header {
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.website-panel__eyebrow,
.visibility-panel__eyebrow,
.content-panel__eyebrow,
.authority-panel__eyebrow,
.social-panel__eyebrow,
.competitor-panel__eyebrow,
.team-panel__eyebrow {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.website-panel__subline,
.visibility-panel__subline,
.content-panel__subline,
.authority-panel__subline,
.social-panel__subline,
.competitor-panel__subline,
.team-panel__subline {
  max-width: 72ch;
  font-size: var(--text-base);
  line-height: 1.52;
  color: var(--color-text-muted);
}

.website-priority-grid,
.visibility-priority-grid,
.content-priority-grid,
.authority-priority-grid,
.social-priority-grid,
.competitor-priority-grid,
.team-priority-grid {
  gap: var(--space-5);
}

.website-priority-card,
.visibility-priority-card,
.content-priority-card,
.authority-priority-card,
.social-priority-card,
.competitor-priority-card,
.team-priority-card {
  border-radius: calc(var(--radius-xl) + 2px);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.website-priority-card__title,
.visibility-priority-card__title,
.content-priority-card__title,
.authority-priority-card__title,
.social-priority-card__title,
.competitor-priority-card__title,
.team-priority-card__title {
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.35rem);
  line-height: 1.35;
}

.website-priority-card p,
.visibility-priority-card p,
.content-priority-card p,
.authority-priority-card p,
.social-priority-card p,
.competitor-priority-card p,
.team-priority-card p {
  line-height: var(--leading-relaxed);
}

.section-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

.avatar-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.avatar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.avatar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}
.avatar-card-header:hover { background: var(--color-bg); }

.avatar-card-name {
  font-size: var(--text-base);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.avatar-card-toggle {
  transition: transform var(--transition-fast);
  color: var(--color-text-muted);
}
.avatar-card-toggle.open { transform: rotate(180deg); }

.avatar-card-body {
  display: none;
  padding: var(--space-5);
  border-top: 1px solid var(--color-border-subtle);
}
.avatar-card-body.open { display: block; }

.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 40px;
  cursor: text;
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.tag-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  background: var(--color-primary-muted);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.tag-remove:hover { opacity: 1; }

.tag-text-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-sm);
  min-width: 80px;
  flex: 1;
  padding: 2px var(--space-1);
}

.completeness-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.completeness-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.completeness-pct {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── 15. Page Transitions ─────────────────────────────────────── */
.page-enter {
  animation: pageIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .section-meta {
    white-space: normal;
  }

  .website-panel__header,
  .visibility-panel__header,
  .content-panel__header,
  .authority-panel__header,
  .social-panel__header,
  .competitor-panel__header,
  .team-panel__header {
    gap: var(--space-4);
  }

  .website-panel__subline,
  .visibility-panel__subline,
  .content-panel__subline,
  .authority-panel__subline,
  .social-panel__subline,
  .competitor-panel__subline,
  .team-panel__subline {
    font-size: var(--text-md);
  }
}

@media (max-width: 768px) {
  /* Hero 2-column collapses to single column on mobile */
  .website-panel--hero > div,
  .visibility-panel--hero > div,
  .dashboard-morning-hero > div,
  .employees-panel--hero > div,
  .sales-panel--hero > div,
  .local-panel--hero > div {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .website-panel,
  .visibility-panel,
  .content-panel,
  .authority-panel,
  .social-panel,
  .competitor-panel,
  .team-panel,
  .employees-panel {
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    border-radius: 18px;
  }

  .website-panel__header,
  .visibility-panel__header,
  .content-panel__header,
  .authority-panel__header,
  .social-panel__header,
  .competitor-panel__header,
  .team-panel__header,
  .employees-panel__header {
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }

  .website-panel__subline,
  .visibility-panel__subline,
  .content-panel__subline,
  .authority-panel__subline,
  .social-panel__subline,
  .competitor-panel__subline,
  .team-panel__subline,
  .employees-panel__subline {
    font-size: var(--text-base);
    line-height: 1.7;
  }

  .website-priority-grid,
  .visibility-priority-grid,
  .content-priority-grid,
  .authority-priority-grid,
  .social-priority-grid,
  .competitor-priority-grid,
  .team-priority-grid,
  .employees-priority-grid,
  .local-priority-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ── 16. Empty & Error States ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  opacity: 0.3;
}

.empty-state-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 300px;
  margin: 0 auto var(--space-4);
  line-height: var(--leading-relaxed);
}

/* ── 17. Responsive — Mobile ─────────────────────────────────── */
@media (max-width: 1024px) {
  .score-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .page-content {
    padding: var(--space-4);
  }

  .dashboard-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  /* Mobile: sidebar slides in from left as overlay, subnav hidden */
  .app-layout {
    grid-template-areas:
      "topbar"
      "main";
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-height) 1fr;
  }

  .subnav { display: none; }
  .sidebar-resize-handle { display: none; }
  .subnav-resize-handle { display: none; }

  .sidebar {
    grid-area: unset;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 300px) !important;
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: var(--shadow-lg);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
  }

  /* On mobile, sidebar must show labels even in collapsed state */
  .sidebar.collapsed .nav-link span { display: unset; }
  .sidebar.collapsed .nav-section-label { display: unset; }
  .sidebar.collapsed .nav-separator { display: unset; }
  .sidebar.collapsed .nav-link { justify-content: flex-start; padding: 0.8125rem var(--space-3); }
  .sidebar.collapsed .nav-link-small { display: flex; }
  .sidebar.collapsed .sidebar-nav { padding: var(--space-4) var(--space-3); }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }
  .sidebar-overlay.visible {
    display: block;
  }

  .main-content {
    grid-area: main;
  }

  .app-topbar {
    padding: 0 var(--space-3);
    gap: var(--space-2);
  }

  .topbar-title {
    font-size: var(--text-sm);
  }

  .topbar-user-name { display: none; }

  .topbar-lang-btn {
    min-height: 34px;
    padding: 6px 8px;
  }

  .sidebar-nav {
    padding: var(--space-4) var(--space-3) calc(var(--space-6) + env(safe-area-inset-bottom));
  }

  .nav-section-label {
    padding-top: var(--space-5);
  }

  .nav-link {
    min-height: 46px;
    padding: 0.8125rem var(--space-3);
    font-size: var(--text-base);
  }

  .score-cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .score-card {
    flex-direction: row;
    text-align: left;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
  }

  .overall-score-section {
    flex-direction: column;
    text-align: center;
  }

  .page-content {
    padding: var(--space-3) var(--space-3) calc(var(--space-8) + env(safe-area-inset-bottom));
  }

  .dashboard-morning-hero {
    padding: var(--space-4);
  }

  .dashboard-workspace-grid {
    grid-template-columns: 1fr;
  }

  .priority-accordion__summary {
    padding: var(--space-4);
    flex-direction: column;
  }

  .priority-accordion__summary-side {
    width: 100%;
    justify-content: space-between;
  }

  .priority-accordion__body {
    padding: 0 var(--space-4) var(--space-4);
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pyramid-level-strategie { width: 100%; min-width: unset; }
  .pyramid-level-kommunikation { width: 80%; min-width: unset; }
  .pyramid-level-wirkung { width: 55%; min-width: unset; }

  .category-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-jumpnav {
    gap: var(--space-2);
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    margin-inline: calc(var(--space-1) * -1);
    scrollbar-width: none;
  }

  .dashboard-jumpnav::-webkit-scrollbar {
    display: none;
  }

  .dashboard-jumpnav__link {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: var(--space-4);
  }

  .auth-card { padding: var(--space-6); }

  .dashboard-greeting { font-size: var(--text-xl); }

  .overall-score-number { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .top-bar {
    padding-inline: var(--space-3);
    gap: var(--space-2);
  }

  .top-bar-title {
    font-size: var(--text-xs);
    font-weight: 700;
  }

  .top-bar-actions {
    gap: var(--space-1);
  }

  .topbar-lang-btn {
    min-width: 34px;
    min-height: 34px;
    padding: 6px;
  }

  .topbar-lang-btn #lang-current-label {
    display: none;
  }

  .topbar-lang-btn .lang-chevron {
    display: none;
  }

  .help-drawer-toggle {
    width: 42px;
    height: 76px;
  }

  .page-content {
    padding: var(--space-2) var(--space-2) calc(var(--space-8) + env(safe-area-inset-bottom));
  }

  .sidebar {
    width: min(90vw, 300px);
  }

  .nav-link {
    min-height: 44px;
    padding: 0.75rem var(--space-3);
  }

  .nav-link svg {
    width: 17px;
    height: 17px;
  }

  .nav-section-label {
    padding-top: var(--space-4);
    margin-top: var(--space-2);
  }

  .score-cards-grid {
    grid-template-columns: 1fr;
  }

  .toggle-group { flex-direction: column; }
}

/* ── Plan Cards ───────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.plan-card:hover {
  border-color: var(--color-border);
}

.plan-card-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.plan-card-header {
  border-bottom: 2px solid currentColor;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
}

.plan-card-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.plan-card-price {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5) 0;
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.plan-card-features li {
  padding: var(--space-1) 0;
  padding-left: var(--space-4);
  position: relative;
}

.plan-card-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent-green);
  font-weight: 600;
}

.plan-card-action {
  text-align: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
}

.badge-active {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}


/* ============================================================
   KI Reality-Check — Analysis Module Styles
   ============================================================ */

/* ── Wrapper & layout ─────────────────────────────────────── */
.rc-wrapper {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

/* When used as a card directly */
.rc-wrapper.card {
  padding: var(--space-6);
}

/* ── Header ───────────────────────────────────────────────── */
.rc-header {
  margin-bottom: var(--space-5);
}

.rc-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.rc-icon {
  font-size: var(--text-xl);
  line-height: 1;
}

.rc-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.rc-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ── Form ─────────────────────────────────────────────────── */
.rc-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rc-form .form-group {
  margin-bottom: 0;
}

/* ── Progress ─────────────────────────────────────────────── */
.rc-progress-container {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.rc-progress-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  animation: rc-pulse 2s ease-in-out infinite;
}

@keyframes rc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.95); }
}

.rc-progress-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}

.rc-progress-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
}

.rc-progress-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}

.rc-progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.rc-progress-step.rc-step-active {
  opacity: 1;
  color: var(--color-text);
  font-weight: 500;
}

.rc-progress-step.rc-step-done {
  opacity: 0.8;
  color: var(--color-accent-green);
}

.rc-step-icon {
  width: 20px;
  text-align: center;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.rc-step-label {
  flex: 1;
}

.rc-step-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-primary-muted);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: rc-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes rc-spin {
  to { transform: rotate(360deg); }
}

/* ── Results header ───────────────────────────────────────── */
.rc-results-header.card {
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.rc-results-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.rc-results-url {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: monospace;
  margin: 0 0 var(--space-5);
  word-break: break-all;
}

/* ── Overall score banner ─────────────────────────────────── */
.rc-overall-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-4);
  background: var(--color-primary-muted);
  border-radius: var(--radius-lg);
}

.rc-overall-score-block {
  text-align: center;
  flex-shrink: 0;
}

.rc-overall-score-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
}

.rc-overall-score-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.rc-comparison-text {
  flex: 1;
  min-width: 200px;
}

.rc-comparison-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.rc-comparison-narrative {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ── Category cards ───────────────────────────────────────── */
.rc-category-card.card {
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.rc-category-header {
  margin-bottom: var(--space-5);
}

.rc-category-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.rc-category-label {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.rc-scores-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.rc-score-block {
  text-align: center;
}

.rc-gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rc-score-sublabel {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  max-width: 72px;
  text-align: center;
}

.rc-score-divider {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Delta indicators ─────────────────────────────────────── */
.rc-delta {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

.rc-delta-positive {
  background: var(--color-accent-green-bg);
  color: var(--color-accent-green);
}

.rc-delta-negative {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

.rc-delta-neutral {
  background: var(--color-border-subtle);
  color: var(--color-text-muted);
}

/* ── Findings list ────────────────────────────────────────── */
.rc-findings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rc-finding {
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
}

.rc-finding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.rc-finding-aspect {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.rc-finding-assessment {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-2);
}

/* ── Score badges ─────────────────────────────────────────── */
.rc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.rc-badge-green {
  background: var(--color-accent-green-bg);
  color: var(--color-accent-green);
}

.rc-badge-orange {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

.rc-badge-red {
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
}

/* ── Reality vs. Self ─────────────────────────────────────── */
.rc-reality-vs-self {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--color-accent-blue-bg);
  border-left: 3px solid var(--color-accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-2);
}

.rc-rvs-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rc-rvs-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Analytics tools ──────────────────────────────────────── */
.rc-analytics-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.rc-tool-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-3);
  background: var(--color-primary-muted);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.rc-tool-none {
  font-size: var(--text-xs);
  color: var(--color-accent-orange);
  font-style: italic;
}

/* ── Tips ─────────────────────────────────────────────────── */
.rc-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-accent-green-bg);
  border-radius: var(--radius-sm);
}

.rc-tip-icon {
  font-size: var(--text-sm);
  line-height: 1.5;
  flex-shrink: 0;
}

.rc-tip-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Top actions ──────────────────────────────────────────── */
.rc-top-actions.card {
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.rc-actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rc-action-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
}

.rc-action-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.rc-action-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Error state ──────────────────────────────────────────── */
.rc-error {
  text-align: center;
  padding: var(--space-6);
}

.rc-error-text {
  font-size: var(--text-sm);
  color: var(--color-accent-red);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

/* ── Footer row ───────────────────────────────────────────── */
.rc-footer {
  display: flex;
  justify-content: center;
  padding: var(--space-4) 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .rc-overall-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .rc-comparison-text {
    text-align: center;
  }

  .rc-scores-row {
    justify-content: center;
  }
}

/* ============================================================
   Team Management Styles
   ============================================================ */

.team-panel {
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(255, 255, 255, 0.98));
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, white);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: clamp(var(--space-6), 2vw, var(--space-8));
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-xs);
}

.team-panel--hero {
  background:
    radial-gradient(circle at top right, rgba(32, 201, 151, 0.08), transparent 32%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.team-panel--accent {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.team-panel--muted {
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.9), rgba(255, 255, 255, 0.98));
}

.team-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.team-panel__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-primary-dark);
}

.team-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.team-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-top: var(--space-1);
}

.team-priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.team-priority-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
}

.team-priority-card--critical {
  border-left-color: var(--color-accent-red);
}

.team-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.team-priority-card--info {
  border-left-color: var(--color-primary);
}

.team-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.team-priority-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.team-priority-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.35rem);
  line-height: 1.35;
}

.team-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.team-priority-card__actions {
  margin-top: auto;
}

.team-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--space-5);
}

.team-overview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.team-invite-form {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: flex-end;
}

.team-pending-section {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-subtle);
}

.team-subtitle {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-secondary);
}

.employees-panel {
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), rgba(255, 255, 255, 0.98));
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, white);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-xs);
}

.content-panel + .content-panel,
.authority-panel + .authority-panel,
.social-panel + .social-panel,
.competitor-panel + .competitor-panel,
.employees-panel + .employees-panel {
  margin-top: var(--space-6);
}

.employees-panel--hero {
  background:
    radial-gradient(circle at top right, rgba(34, 211, 160, 0.08), transparent 32%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.employees-panel--accent {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.employees-panel--muted {
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.9), rgba(255, 255, 255, 0.98));
}

.employees-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.employees-panel__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.employees-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.employees-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-top: var(--space-1);
}

.employees-priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.employees-priority-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-left: 4px solid var(--color-border);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
}

.employees-priority-card--critical {
  border-left-color: var(--color-accent-red);
}

.employees-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.employees-priority-card--info {
  border-left-color: var(--color-primary);
}

.employees-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.employees-priority-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.employees-priority-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.35rem);
  line-height: 1.35;
}

.employees-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.employees-priority-card__actions {
  margin-top: auto;
}

.employees-priority-card__actions .btn-primary {
  box-shadow: 0 10px 24px rgba(26, 54, 93, 0.16);
}

.employees-priority-card__actions .btn-primary:hover {
  box-shadow: 0 14px 28px rgba(26, 54, 93, 0.22);
}

/* ── Local Visibility Module ─────────────────────────────── */
.local-panel {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  margin-bottom: var(--space-5);
}

.local-panel + .local-panel {
  margin-top: 0;
}

.local-panel--hero {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 32%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
  margin-bottom: var(--space-5);
}

.local-panel--accent {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.local-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.local-panel__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.local-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.local-priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.local-priority-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
}

.local-priority-card--critical { border-left-color: var(--color-accent-red); }
.local-priority-card--warning  { border-left-color: var(--color-accent-orange); }
.local-priority-card--info     { border-left-color: var(--color-primary); }
.local-priority-card--success  { border-left-color: var(--color-accent-green); }

.local-priority-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.local-priority-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.35rem);
  line-height: 1.35;
}

.local-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.local-priority-card__actions {
  margin-top: auto;
}

/* ── Member list ─────────────────────────────────────────── */
.team-members-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.team-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
  gap: var(--space-3);
}

.team-member-row:hover {
  background: var(--color-bg);
}

.team-invite-row {
  border-style: dashed;
  border-color: var(--color-accent-orange);
  background: var(--color-accent-orange-bg);
}

.team-invite-row:hover {
  background: var(--color-accent-orange-bg);
}

.team-member-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.team-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.team-avatar-pending {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

.team-member-details {
  min-width: 0;
  flex: 1;
}

.team-member-email {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-member-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 2px;
  flex-wrap: wrap;
}

.team-role-badge {
  font-size: var(--text-xs);
  font-weight: 600;
}

.team-member-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Badges ──────────────────────────────────────────────── */
.team-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.team-badge-active {
  background: var(--color-accent-green-bg);
  color: var(--color-accent-green);
}

.team-badge-inactive {
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
}

.team-badge-pending {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

/* ── Actions ─────────────────────────────────────────────── */
.team-member-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.team-role-select {
  font-size: var(--text-xs);
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  min-width: 90px;
}

.team-role-select:hover {
  border-color: var(--color-primary);
}

/* ── Plan limit bar ──────────────────────────────────────── */
.team-limit-bar-container {
  width: 120px;
}

.team-limit-bar {
  height: 6px;
  background: var(--color-border-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.team-limit-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Responsive team ─────────────────────────────────────── */
@media (max-width: 600px) {
  .employees-panel {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
  }

  .employees-panel__header {
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }

  .employees-hero-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .team-panel {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
  }

  .team-panel__header {
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }

  .team-hero-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .team-overview-grid {
    grid-template-columns: 1fr;
  }

  .team-invite-form {
    flex-direction: column;
    align-items: stretch;
  }

  .team-member-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-member-actions {
    margin-left: 48px;
  }

  .team-limit-bar-container {
    width: 100%;
  }
}

/* ============================================================
   24. CONTENT MODULE
   ============================================================ */

/* ── Tag Input ─────────────────────────────────────────── */
.content-tag-container {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  cursor: text;
  background: var(--color-surface);
  transition: border-color 0.15s ease;
}

.content-tag-container:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-muted);
}

.content-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.content-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  background: var(--color-primary-muted);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
}

.content-tag-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
  font-size: var(--text-md);
  line-height: 1;
  opacity: 0.6;
}

.content-tag-remove:hover {
  opacity: 1;
}

.content-tag-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  flex: 1;
  min-width: 120px;
  padding: 2px 0;
  color: var(--color-text);
}

.content-tag-input::placeholder {
  color: var(--color-text-muted);
}

/* ── Keyword Table ─────────────────────────────────────── */
.content-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--space-5));
  padding: 0 var(--space-5);
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.content-table thead th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.content-th-center {
  text-align: center !important;
}

.content-kw-cell {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}

.content-kw-cell-center {
  text-align: center;
}

.content-kw-row {
  transition: background 0.15s ease;
}

.content-kw-row:hover {
  background: var(--color-bg);
}

.content-kw-selected {
  background: var(--color-accent-green-bg);
}

.content-kw-selected:hover {
  background: var(--color-accent-green-bg);
}

.content-kw-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.content-kw-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent-green);
  cursor: pointer;
  flex-shrink: 0;
}

.content-kw-text {
  font-weight: 500;
  color: var(--color-text);
}

/* ── Badges ────────────────────────────────────────────── */
.content-badge {
  display: inline-block;
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.content-badge-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* ── Score Bars ────────────────────────────────────────── */
.content-score-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
}

.content-score-bar {
  width: 48px;
  height: 6px;
  background: var(--color-border-subtle);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.content-score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.content-score-value {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  min-width: 20px;
  text-align: right;
}

/* ── Jobs List ─────────────────────────────────────────── */
.content-jobs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.content-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.75fr);
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-6);
}

.content-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.content-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.content-overview-stat {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.content-overview-stat strong {
  font-size: var(--text-xl);
  line-height: 1.1;
}

.content-overview-stat span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.content-overview-flow {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.content-job-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.content-job-info {
  flex: 1;
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.content-job-seeds {
  font-weight: 500;
  color: var(--color-text);
}

.content-job-date {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.content-job-error {
  color: var(--color-accent-red);
  cursor: help;
}

.content-panel {
  margin-bottom: calc(var(--space-7) + var(--space-2));
  padding: calc(var(--space-6) + var(--space-1));
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.content-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
}

.content-panel--hero,
.authority-panel--hero,
.social-panel--hero,
.competitor-panel--hero,
.employees-panel--hero,
.website-panel--hero,
.visibility-panel--hero {
  margin-bottom: var(--space-8);
}

.content-panel--accent {
  background:
    linear-gradient(180deg, rgba(241, 248, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(59, 130, 246, 0.18);
}

.content-panel--muted {
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.98) 0%, #fff 100%);
}

.content-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space-6) + var(--space-1));
  margin-bottom: calc(var(--space-6) + var(--space-1));
}

.content-panel__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.content-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.content-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-left: auto;
  padding-top: var(--space-2);
}

.content-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space-4) + var(--space-1));
  margin-top: var(--space-5);
}

.content-priority-card {
  display: grid;
  gap: var(--space-4);
  min-height: 100%;
  padding: calc(var(--space-5) + var(--space-1));
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.content-priority-card--error {
  border-left-color: var(--color-accent-red);
}

.content-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.content-priority-card--info {
  border-left-color: var(--color-primary);
}

.content-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.content-priority-card__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.35;
}

.content-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.content-priority-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.content-main-grid {
  gap: calc(var(--space-6) + var(--space-1));
  margin-top: var(--space-2);
  margin-bottom: calc(var(--space-6) + var(--space-1));
}

.content-panel .card {
  padding: calc(var(--space-5) + var(--space-1));
}

.content-panel .card + .card {
  margin-top: var(--space-5);
}

.content-panel .section-title {
  line-height: 1.2;
}

.content-overview-stats {
  gap: var(--space-4);
  margin-bottom: calc(var(--space-4) + var(--space-1));
}

.content-overview-flow {
  gap: var(--space-3);
  line-height: 1.7;
}

.content-jobs-list {
  gap: var(--space-3);
}

.content-job-row {
  padding: var(--space-3) var(--space-4);
}

.authority-panel {
  margin-bottom: calc(var(--space-7) + var(--space-2));
  padding: calc(var(--space-6) + var(--space-1));
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.authority-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
}

.authority-panel--accent {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.88) 0%, rgba(255,255,255,0.98) 100%);
  border-color: rgba(16, 185, 129, 0.16);
}

.authority-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space-6) + var(--space-1));
  margin-bottom: calc(var(--space-6) + var(--space-1));
}

.authority-panel__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.authority-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.authority-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-left: auto;
  padding-top: var(--space-2);
}

.authority-content-card {
  padding: var(--space-4);
}

.authority-content-card__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.authority-content-card__title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.45;
}

.authority-content-card__body {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  max-height: 200px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  font-size: var(--text-xs);
  line-height: 1.65;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
}

.authority-content-tags {
  margin-bottom: var(--space-3);
}

.authority-content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.authority-content-meta__chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  background: var(--color-surface-raised);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.authority-content-meta__chip--highlight {
  border-color: rgba(59, 130, 246, 0.16);
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-primary);
  font-weight: 600;
}

.social-post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--space-2) 0 var(--space-3);
}

.social-post-metrics__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  background: var(--color-surface-raised);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.social-post-metrics__chip--muted {
  color: var(--color-text-muted);
}

.authority-content-error {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: var(--radius-md);
  background: rgba(254, 242, 242, 0.92);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: #991b1b;
}

.authority-content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.authority-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space-4) + var(--space-1));
  margin-top: var(--space-5);
}

.authority-priority-card {
  display: grid;
  gap: var(--space-4);
  min-height: 100%;
  padding: calc(var(--space-5) + var(--space-1));
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.authority-priority-card--error {
  border-left-color: var(--color-accent-red);
}

.authority-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.authority-priority-card--info {
  border-left-color: var(--color-primary);
}

.authority-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.authority-priority-card__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.35;
}

.authority-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.authority-priority-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.authority-foundation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--space-4) + var(--space-1));
  margin-top: var(--space-5);
}

.authority-foundation-card {
  display: grid;
  gap: var(--space-3);
  padding: calc(var(--space-5) + var(--space-1));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.authority-foundation-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.authority-foundation-card__score {
  font-size: clamp(2rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.authority-foundation-card__level {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-secondary);
}

.authority-foundation-card__list {
  list-style: disc;
  padding-left: var(--space-4);
  display: grid;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.authority-foundation-note {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.social-panel {
  margin-bottom: calc(var(--space-7) + var(--space-2));
  padding: calc(var(--space-6) + var(--space-1));
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.social-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-5);
}

.social-panel--compact {
  margin-bottom: 0;
  padding: var(--space-5);
}

.social-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
}

.social-panel--accent {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9) 0%, rgba(255,255,255,0.98) 100%);
  border-color: rgba(12, 89, 242, 0.16);
}

.social-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space-6) + var(--space-1));
  margin-bottom: calc(var(--space-6) + var(--space-1));
}

.social-panel--compact .social-panel__header {
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.social-panel__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.social-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.social-panel--compact .social-panel__subline {
  font-size: var(--text-sm);
  line-height: 1.55;
}

.social-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-left: auto;
  padding-top: var(--space-2);
}

.social-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: var(--space-3);
  align-items: stretch;
  margin-bottom: var(--space-3);
}

.social-top-grid > .social-panel {
  margin: 0;
}

.social-top-grid .social-panel--hero {
  min-height: 0;
}

.social-top-grid .social-panel__header {
  margin-bottom: var(--space-2);
}

.social-top-grid .social-panel {
  padding: var(--space-5);
}

.social-top-grid .social-panel--compact .social-panel__subline {
  max-width: 60ch;
}

.social-top-grid .social-panel--compact .social-priority-list {
  gap: var(--space-2);
}

.social-top-grid .social-priority-item {
  padding: var(--space-3) var(--space-4);
}

.social-top-grid .social-priority-item__title {
  font-size: var(--text-sm);
}

.social-top-grid .social-priority-item p {
  font-size: 13px;
  line-height: 1.45;
}

.social-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space-4) + var(--space-1));
  margin-top: var(--space-5);
}

.social-priority-list {
  display: grid;
  gap: var(--space-3);
}

.social-panel--compact .social-priority-list {
  gap: var(--space-2);
}

.social-priority-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border-subtle);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
}

.social-panel--compact .social-priority-item {
  padding: var(--space-3) var(--space-4);
}

.social-priority-item--error {
  border-left-color: var(--color-accent-red);
}

.social-priority-item--warning {
  border-left-color: var(--color-accent-orange);
}

.social-priority-item--info {
  border-left-color: var(--color-primary);
}

.social-priority-item--success {
  border-left-color: var(--color-accent-green);
}

.social-priority-item__title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text-primary);
}

.social-priority-item p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.social-panel--compact .social-priority-item p {
  line-height: 1.5;
  font-size: var(--text-sm);
}

.social-workspace-shell {
  display: grid;
  gap: var(--space-4);
}

.social-workspace-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.social-workspace-tab {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 132px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  position: relative;
  border: 1px solid var(--color-tab-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--color-tab-bg) 100%);
  color: var(--color-text-primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.social-connections-card,
.social-branding-card,
.social-plan-card,
.social-calendar-card,
.social-generator-card,
.social-posts-card {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.social-workspace-tab:hover {
  border-color: rgba(15, 91, 255, 0.26);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, var(--color-tab-bg-hover) 100%);
}

.social-workspace-tab:focus-visible {
  outline: 3px solid rgba(15, 91, 255, 0.18);
  outline-offset: 2px;
  border-color: var(--color-tab-border-active);
}

.social-workspace-tab.is-active {
  border-color: var(--color-tab-border-active);
  background: linear-gradient(135deg, rgba(15, 91, 255, 0.14), rgba(45, 115, 255, 0.08));
  box-shadow: 0 18px 38px rgba(15, 91, 255, 0.12);
}

.social-workspace-tab__label {
  font-size: var(--text-base);
  font-weight: 800;
}

.social-workspace-tab__meta {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.social-workspace-tab__count {
  display: inline-flex;
  width: fit-content;
  margin-top: var(--space-1);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-secondary);
}

.social-workspace-tab::after {
  content: "Bereich öffnen";
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-3);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-cta-hover);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(15, 91, 255, 0.12);
}

.social-workspace-tab.is-active::after {
  content: "Aktiv";
  background: rgba(15, 91, 255, 0.12);
  color: var(--color-cta-hover);
  border-color: rgba(15, 91, 255, 0.2);
}

.social-workspace-body,
.social-workspace-stack {
  display: grid;
  gap: var(--space-5);
}

.social-planning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.social-planning-layout__main,
.social-planning-layout__side {
  display: grid;
  gap: var(--space-3);
}

.social-setup-layout,
.social-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.social-setup-layout__main,
.social-setup-layout__side,
.social-content-layout__main,
.social-content-layout__side {
  display: grid;
  gap: var(--space-3);
}

@media (max-width: 1100px) {
  .social-top-grid {
    grid-template-columns: 1fr;
  }

  .social-top-grid .social-panel--compact .social-panel__subline {
    max-width: none;
  }
}

.social-connections-card .card-header,
.social-branding-card .card-header {
  margin-bottom: var(--space-4);
}

.social-connections-list {
  display: grid;
  gap: var(--space-2);
}

.social-connection-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
}

.social-connection-item__main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.social-connection-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.social-connection-item__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.social-connection-item__meta,
.social-connection-item__link,
.social-connection-item__error {
  font-size: var(--text-xs);
}

.social-connection-item__meta,
.social-connection-item__link {
  color: var(--color-text-muted);
}

.social-connection-item__link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-connection-item__error {
  color: var(--color-accent-red);
}

.social-connection-item__actions {
  display: flex;
  align-items: center;
}

.social-branding-form {
  display: grid;
  gap: var(--space-3);
}

.social-branding-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-bottom: 0;
}

.social-branding-form__grid--colors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-branding-field {
  display: grid;
  gap: 6px;
}

.social-branding-field__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.social-branding-field__color {
  min-height: 42px;
  padding: 6px;
}

.social-branding-preview {
  display: grid;
  gap: 10px;
  padding: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.social-branding-preview__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.social-branding-preview__hint {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
}

.social-branding-preview__preset {
  font-size: var(--text-sm);
  font-weight: 800;
}

.social-branding-preview__swatches {
  display: flex;
  gap: 8px;
  align-items: center;
}

.social-branding-preview__swatches span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.social-branding-preview__card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--color-surface);
  border-left: 4px solid;
}

.social-branding-preview__channels {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.social-branding-preview__voice {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.social-branding-preview__logo {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--color-text-muted);
}

.social-branding-form__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-plan-card .card-header,
.social-calendar-card .card-header,
.social-generator-card .card-header,
.social-posts-card .card-header {
  margin-bottom: var(--space-2);
}

.social-plan-form {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.social-plan-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.social-plan-form__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-plan-form__note {
  font-size: 12px;
  color: var(--color-text-muted);
}

.social-generator-form {
  display: grid;
  gap: var(--space-2);
}

.social-generator-form__lead,
.social-generator-form__grid {
  display: grid;
  gap: var(--space-2);
}

.social-generator-form__grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.social-generator-form__actions {
  display: flex;
  justify-content: flex-end;
}

.social-plan-list {
  display: grid;
  gap: var(--space-3);
}

.social-plan-item {
  padding: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
}

.social-plan-item__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
}

.social-plan-item__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.social-plan-item__meta {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.social-plan-item__focus {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.social-plan-weeks {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.social-plan-week {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(12,89,242,0.05);
}

.social-plan-week__label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.social-plan-week__posts {
  display: grid;
  gap: 6px;
}

.social-plan-week__post {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.social-calendar-actions,
.social-calendar-view-switch {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.social-calendar-titlebar {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text-primary);
}

.social-calendar-weekdays,
.social-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.social-calendar-weekdays {
  margin-bottom: var(--space-2);
}

.social-post-list {
  display: grid;
  gap: var(--space-2);
}

.social-post-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
}

.social-post-card__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: flex-start;
}

.social-post-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.social-post-card__meta {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.social-post-card__excerpt {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.social-post-card__error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239,68,68,0.10);
  color: #b91c1c;
  font-size: 12px;
}

.social-post-card__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.social-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: 112px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.94) 100%);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

@media (max-width: 1180px) {
  .social-top-grid {
    grid-template-columns: 1fr;
  }

  .social-setup-layout,
  .social-planning-layout {
    grid-template-columns: 1fr;
  }

  .social-content-layout {
    grid-template-columns: 1fr;
  }

  .social-connection-item {
    grid-template-columns: 1fr;
  }

  .social-connection-item__actions {
    justify-content: flex-start;
  }

  .social-plan-form__grid {
    grid-template-columns: 1fr;
  }

  .social-generator-form__grid {
    grid-template-columns: 1fr;
  }

  .social-branding-form__grid--colors {
    grid-template-columns: 1fr;
  }

  .social-generator-form__actions {
    justify-content: flex-start;
  }
}

.social-kpi-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  font-size: 20px;
  background: rgba(15, 23, 42, 0.06);
}

.social-kpi-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.social-kpi-card__value {
  font-size: clamp(1.85rem, 2.1vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--color-text-primary);
}

.social-kpi-card__label {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
  text-transform: none;
}

.social-kpi-card__sub {
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.social-kpi-card--primary {
  border-color: rgba(12, 89, 242, 0.16);
}

.social-kpi-card--primary .social-kpi-card__icon {
  background: rgba(12, 89, 242, 0.12);
}

.social-kpi-card--warning {
  border-color: rgba(245, 158, 11, 0.18);
}

.social-kpi-card--warning .social-kpi-card__icon {
  background: rgba(245, 158, 11, 0.14);
}

.social-kpi-card--success {
  border-color: rgba(5, 150, 105, 0.18);
}

.social-kpi-card--success .social-kpi-card__icon {
  background: rgba(5, 150, 105, 0.14);
}

.social-kpi-card--info {
  border-color: rgba(14, 116, 144, 0.16);
}

.social-kpi-card--info .social-kpi-card__icon {
  background: rgba(14, 116, 144, 0.12);
}

.social-kpi-card--neutral {
  border-color: rgba(100, 116, 139, 0.18);
}

.social-kpi-card--neutral .social-kpi-card__icon {
  background: rgba(100, 116, 139, 0.12);
}

.social-priority-card {
  display: grid;
  gap: var(--space-4);
  min-height: 100%;
  padding: calc(var(--space-5) + var(--space-1));
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.social-priority-card--error {
  border-left-color: var(--color-accent-red);
}

.social-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.social-priority-card--info {
  border-left-color: var(--color-primary);
}

.social-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.social-priority-card__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.35;
}

.social-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.competitor-panel {
  margin-bottom: calc(var(--space-7) + var(--space-2));
  padding: calc(var(--space-6) + var(--space-1));
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.competitor-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(12, 89, 242, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
}

.competitor-panel--accent {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.92) 0%, rgba(255,255,255,0.98) 100%);
  border-color: rgba(245, 158, 11, 0.18);
}

/* Flat info-panel variant for the competitor hero KPI block. Replaces
   inline style in competitors.js:148; mirrors .website/visibility-panel--info. */
.competitor-panel--info {
  margin-bottom: 0;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(12, 89, 242, 0.08);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.competitor-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space-6) + var(--space-1));
  margin-bottom: calc(var(--space-6) + var(--space-1));
}

.competitor-panel__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.competitor-panel__subline {
  max-width: 72ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.competitor-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 420px;
  margin-left: auto;
  padding-top: var(--space-2);
}

.competitor-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space-4) + var(--space-1));
  margin-top: var(--space-5);
}

.competitor-priority-card {
  display: grid;
  gap: var(--space-4);
  min-height: 100%;
  padding: calc(var(--space-5) + var(--space-1));
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.competitor-priority-card--error {
  border-left-color: var(--color-accent-red);
}

.competitor-priority-card--warning {
  border-left-color: var(--color-accent-orange);
}

.competitor-priority-card--info {
  border-left-color: var(--color-primary);
}

.competitor-priority-card--success {
  border-left-color: var(--color-accent-green);
}

.competitor-priority-card__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.35;
}

.competitor-priority-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* ── Responsive content module ─────────────────────────── */
@media (max-width: 768px) {
  .content-panel {
    padding: calc(var(--space-5) + var(--space-1));
    margin-bottom: var(--space-6);
  }

  .content-panel__header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .content-hero-badges {
    justify-content: flex-start;
    max-width: none;
    margin-left: 0;
    padding-top: 0;
  }

  .content-priority-grid {
    grid-template-columns: 1fr;
  }

  .authority-panel {
    padding: calc(var(--space-5) + var(--space-1));
    margin-bottom: var(--space-6);
  }

  .authority-panel__header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .authority-hero-badges {
    justify-content: flex-start;
    max-width: none;
    margin-left: 0;
    padding-top: 0;
  }

  .authority-priority-grid {
    grid-template-columns: 1fr;
  }

  .authority-foundation-grid {
    grid-template-columns: 1fr;
  }

  .social-panel {
    padding: calc(var(--space-5) + var(--space-1));
    margin-bottom: var(--space-6);
  }

  .social-panel__header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .social-hero-badges {
    justify-content: flex-start;
    max-width: none;
    margin-left: 0;
    padding-top: 0;
  }

  .social-priority-grid {
    grid-template-columns: 1fr;
  }

  .social-workspace-nav {
    grid-template-columns: 1fr;
  }

  .competitor-panel {
    padding: calc(var(--space-5) + var(--space-1));
    margin-bottom: var(--space-6);
  }

  .competitor-panel__header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .competitor-hero-badges {
    justify-content: flex-start;
    max-width: none;
    margin-left: 0;
    padding-top: 0;
  }

  .competitor-priority-grid {
    grid-template-columns: 1fr;
  }

  .competitor-overview-stats--compact,
  .competitor-list-card__metrics {
    grid-template-columns: 1fr;
  }

  .competitor-toolbar,
  .competitor-filter-bar,
  .competitor-context-strip,
  .competitor-list-card__header,
  .competitor-list-card__footer {
    align-items: stretch;
  }

  .competitor-toolbar__meta,
  .competitor-context-strip__chips {
    justify-content: flex-start;
  }

  .content-table-wrap {
    margin: 0 calc(-1 * var(--space-4));
    padding: 0 var(--space-4);
  }

  .content-table {
    font-size: var(--text-xs);
  }

  .content-score-bar {
    width: 32px;
  }

  .content-main-grid,
  .content-form-grid,
  .content-overview-stats {
    grid-template-columns: 1fr;
  }

  .content-job-row {
    flex-wrap: wrap;
  }

  .content-job-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

/* ── 20. Help Module ─────────────────────────────────────────── */

.help-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Help Sidebar / TOC */
.help-sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.help-search {
  position: relative;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.help-search-icon {
  position: absolute;
  left: calc(var(--space-4) + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.help-search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) calc(var(--space-8) + 2px);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.help-search-input:focus {
  border-color: var(--color-primary);
}

.help-search-input::placeholder {
  color: var(--color-text-muted);
}

/* Search results */
.help-search-results {
  padding: var(--space-2);
  overflow-y: auto;
  flex: 1;
}

.help-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
}

.help-search-result:hover {
  background: var(--color-bg);
}

.help-search-result-chapter {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.help-search-result-title {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.help-search-empty {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* TOC */
.help-toc {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) 0;
}

.help-toc-chapter {
  border-bottom: 1px solid var(--color-border-subtle);
}

.help-toc-chapter:last-child {
  border-bottom: none;
}

.help-toc-chapter-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.help-toc-chapter-btn:hover {
  background: var(--color-bg);
}

.help-toc-chapter.active > .help-toc-chapter-btn {
  color: var(--color-primary);
}

.help-toc-icon {
  display: flex;
  align-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.help-toc-icon svg {
  width: 18px;
  height: 18px;
}

.help-toc-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.help-toc-chapter.active .help-toc-chevron {
  transform: rotate(180deg);
}

.help-toc-sections {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-toc-sections.expanded {
  max-height: 600px;
}

.help-toc-section-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-4) var(--space-2) calc(var(--space-4) + 26px);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: var(--leading-base);
}

.help-toc-section-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.help-toc-section-btn.active {
  color: var(--color-primary);
  background: var(--color-primary-muted);
  font-weight: 500;
}

/* Help Content area */
.help-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-8);
  max-width: 760px;
}

.help-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.help-breadcrumb-current {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.help-breadcrumb svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.help-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
}

.help-body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.help-body p {
  margin-bottom: var(--space-4);
}

.help-body ul, .help-body ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.help-body li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

.help-body h4 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.help-body strong {
  font-weight: 600;
}

.help-muted {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Help tables */
.help-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
}

.help-table thead th {
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.help-table tbody td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
}

.help-table tbody tr:nth-child(even) {
  background: var(--color-bg);
}

.help-table-compact {
  max-width: 360px;
}

.help-table-compact td,
.help-table-compact th {
  text-align: center;
}

.help-table-compact td:first-child,
.help-table-compact th:first-child {
  text-align: left;
}

/* Info / Tip / Warning callouts */
.help-callout {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  border-left: 3px solid;
}

.help-callout-info {
  background: var(--color-accent-blue-bg);
  border-color: var(--color-accent-blue);
  color: var(--color-text);
}

.help-callout-success {
  background: var(--color-accent-green-bg);
  border-color: var(--color-accent-green);
  color: var(--color-text);
}

.help-callout-warning {
  background: var(--color-accent-orange-bg);
  border-color: var(--color-accent-orange);
  color: var(--color-text);
}

/* Prev / Next footer nav */
.help-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.help-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  max-width: 48%;
  text-align: left;
}

.help-nav-btn:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}

.help-nav-btn svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.help-nav-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.help-nav-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.help-nav-next {
  margin-left: auto;
  text-align: right;
}

/* Mobile TOC toggle */
.help-toc-toggle {
  display: none;
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Responsive */
@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: 300px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
  }

  .help-sidebar.open {
    transform: translateX(0);
  }

  .help-content {
    padding: var(--space-4);
  }

  .help-title {
    font-size: var(--text-lg);
  }

  .help-toc-toggle {
    display: flex;
  }

  .help-nav-footer {
    flex-direction: column;
  }

  .help-nav-btn {
    max-width: 100%;
  }

  .help-nav-next {
    margin-left: 0;
  }

  .help-table {
    font-size: var(--text-xs);
  }
}

/* ── SERP Analysis ────────────────────────────────────────────── */

.serp-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.serp-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.serp-tab {
  appearance: none;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-secondary);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--color-tab-bg) 100%);
  border: 1px solid var(--color-tab-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 180ms ease;
}

.serp-tab:hover {
  color: var(--color-text-primary);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, var(--color-tab-bg-hover) 100%);
  border-color: rgba(15, 91, 255, 0.18);
  box-shadow: var(--shadow-sm);
}

.serp-tab-active {
  color: var(--color-cta-hover);
  border-color: var(--color-tab-border-active);
  background: linear-gradient(135deg, rgba(15, 91, 255, 0.14), rgba(45, 115, 255, 0.08));
  box-shadow: 0 10px 22px rgba(15, 91, 255, 0.12);
}

.serp-result-card {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: border-color 180ms ease;
}

.serp-result-card:hover {
  border-color: var(--color-border);
}

.serp-result-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.serp-result-position {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}

.serp-result-meta {
  flex: 1;
  min-width: 0;
}

.serp-result-title {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-result-url {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.serp-result-url a {
  color: var(--color-accent-blue);
  text-decoration: none;
}

.serp-result-url a:hover {
  text-decoration: underline;
}

.serp-result-score {
  flex-shrink: 0;
  font-size: var(--text-xl);
  font-weight: 700;
}

.serp-score-label {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
}

.serp-result-metrics {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.serp-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.serp-metric-value {
  font-size: var(--text-sm);
  font-weight: 600;
}

.serp-metric-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.serp-features {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.serp-feature-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-subtle, #e8f0fe);
  color: var(--color-primary);
}

.serp-result-analysis {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.serp-analysis-col {
  flex: 1;
  min-width: 180px;
}

.serp-analysis-heading {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.serp-good { color: var(--color-accent-green); }
.serp-bad { color: var(--color-accent-red, #d44); }

.serp-analysis-list {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  list-style: none;
  padding: 0;
  margin: 0;
}

.serp-analysis-list li {
  padding: 2px 0;
  padding-left: var(--space-3);
  position: relative;
}

.serp-analysis-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

.serp-topics {
  margin-top: var(--space-2);
}

.serp-topics-wrap {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.serp-topic-tag {
  font-size: var(--text-xs);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-border-subtle);
  color: var(--color-text-secondary);
}

/* Blueprint */
.serp-blueprint-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
}

.serp-blueprint-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.serp-blueprint-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.serp-blueprint-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.serp-blueprint-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.serp-blueprint-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  min-width: 100px;
}

.serp-blueprint-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
}

.serp-blueprint-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.serp-gaps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-2);
}

.serp-gap-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
}

.serp-gap-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Structure */
.serp-structure-h1 {
  font-size: var(--text-md);
  font-weight: 700;
  padding: var(--space-3);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.serp-structure-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.serp-structure-section {
  padding: var(--space-3);
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface-raised);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.serp-structure-h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.serp-structure-h3 {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding-left: var(--space-4);
  position: relative;
}

.serp-structure-h3::before {
  content: '└';
  position: absolute;
  left: var(--space-2);
  color: var(--color-text-muted);
}

.serp-structure-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.serp-structure-point {
  font-size: var(--text-xs);
  padding: 2px 6px;
  background: var(--color-primary-subtle, #e8f0fe);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
}

.serp-structure-words {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: inline-block;
  margin-top: var(--space-1);
}

/* FAQ */
.serp-faq-list {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-left: var(--space-5);
  line-height: 1.8;
}

/* Checklist */
.serp-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.serp-check-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  font-size: var(--text-sm);
}

.serp-check-label {
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  font-size: var(--text-sm);
}

.serp-check-value {
  color: var(--color-text-secondary);
  text-align: right;
  word-break: break-word;
}

/* Requirements columns */
.serp-blueprint-columns {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.serp-requirements-list {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-left: var(--space-5);
  line-height: 1.7;
}

/* Button XS for SERP */
.btn-xs {
  font-size: var(--text-xs);
  padding: 2px 8px;
  gap: 4px;
  height: auto;
  min-height: 0;
}

@media (max-width: 768px) {
  .serp-result-metrics {
    gap: var(--space-2);
  }

  .serp-result-header {
    flex-wrap: wrap;
  }

  .serp-blueprint-columns {
    flex-direction: column;
  }

  .serp-check-item {
    flex-direction: column;
    gap: var(--space-1);
  }

  .serp-check-value {
    text-align: left;
  }
}

/* ============================================================
   Article View — Content Generator
   ============================================================ */

/* Header with SEO Score Ring */
.article-header {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-5);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.article-seo-score-ring {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.article-seo-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.article-seo-score-number {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1;
}

.article-seo-score-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-meta-info {
  flex: 1;
  min-width: 0;
}

.article-meta-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.article-meta-label {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 80px;
}

.article-meta-value {
  color: var(--color-text-primary);
  word-break: break-word;
}

.article-meta-count {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.article-meta-slug {
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs);
  color: var(--color-accent-blue);
}

/* Stats Row */
.article-stats {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.article-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.article-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.article-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* View Toggle */
.article-view-toggle {
  display: flex;
  gap: 2px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: 2px;
  margin-bottom: var(--space-4);
}

.article-view-btn {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.article-view-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
}

.article-view-btn-active {
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Article Preview (rendered HTML) */
.article-preview {
  padding: var(--space-5);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  max-height: 600px;
  overflow-y: auto;
  line-height: 1.7;
}

.article-preview h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.article-preview h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: var(--space-6) 0 var(--space-3);
  color: var(--color-text-primary);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
}

.article-preview h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-2);
  color: var(--color-text-primary);
}

.article-preview h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: var(--space-3) 0 var(--space-1);
  color: var(--color-text-secondary);
}

.article-preview p {
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
}

.article-preview ul,
.article-preview ol {
  margin: var(--space-2) 0 var(--space-4);
  padding-left: var(--space-5);
}

.article-preview li {
  margin-bottom: var(--space-1);
  color: var(--color-text-secondary);
}

.article-preview strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.article-preview a {
  color: var(--color-accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Markdown Editor */
.article-editor {
  width: 100%;
  min-height: 500px;
  padding: var(--space-4);
  font-family: var(--font-mono, 'Fira Code', 'Cascadia Code', monospace);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  resize: vertical;
  tab-size: 2;
}

.article-editor:focus {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: -2px;
  border-color: transparent;
}

/* SEO Check Details */
.article-seo-checks {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.article-seo-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.article-seo-icon {
  flex-shrink: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  width: 24px;
  text-align: center;
  line-height: 1.2;
}

.article-seo-check-info {
  flex: 1;
  min-width: 0;
}

.article-seo-check-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.article-seo-check-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.article-seo-check-score {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 700;
}

/* HTML Code View */
.article-html-code {
  max-height: 500px;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
}

.article-html-code pre {
  margin: 0;
  padding: var(--space-4);
  background: var(--color-bg-secondary);
  overflow-x: auto;
}

.article-html-code code {
  font-family: var(--font-mono, monospace);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Actions Row */
.article-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
  .article-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .article-meta-row {
    flex-direction: column;
    gap: 0;
  }

  .article-meta-label {
    min-width: unset;
  }

  .article-stats {
    gap: var(--space-2);
    justify-content: space-between;
  }

  .article-view-toggle {
    overflow-x: auto;
  }

  .article-view-btn {
    white-space: nowrap;
    font-size: var(--text-xs);
    padding: var(--space-2);
  }

  .article-actions {
    flex-direction: column;
  }

  .article-actions .btn {
    width: 100%;
  }

  .article-editor {
    min-height: 300px;
    font-size: var(--text-xs);
  }
}

/* ── CMS Push Status Banners ──────────────────────────────── */
.cms-push-status {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.cms-push-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.cms-push-success a {
  color: #047857;
  text-decoration: underline;
}

.cms-push-pending {
  background: var(--color-primary-muted);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.cms-push-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.cms-push-draft {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.cms-push-draft a {
  color: #b45309;
  text-decoration: underline;
}

/* ── Content Dashboard Panel ─────────────────────────── */
.content-dashboard-panel .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.content-dash-body {
  padding-top: var(--space-4);
}

.content-funnel-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.content-funnel-step {
  text-align: center;
  min-width: 60px;
}

.content-funnel-value {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
}

.content-funnel-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.content-funnel-arrow {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  padding: 0 var(--space-1);
}

.content-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 640px) {
  .content-dash-grid {
    grid-template-columns: 1fr;
  }
  .content-funnel-row {
    justify-content: center;
  }
}

.content-dash-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.content-dash-bar-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  min-width: 80px;
}

.content-dash-bar-track {
  flex: 1;
  height: 6px;
  background: var(--color-surface-alt);
  border-radius: 3px;
  overflow: hidden;
}

.content-dash-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.content-dash-bar-val {
  font-size: var(--text-xs);
  font-weight: 600;
  min-width: 20px;
  text-align: right;
}

.content-dash-topkw-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border-subtle);
}

.content-dash-topkw-row:last-child {
  border-bottom: none;
}

.content-dash-topkw-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-dash-topkw-score {
  font-weight: 700;
  font-size: var(--text-sm);
}

.content-dash-topkw-status {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Website Dashboard Trend */
.website-trend-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.website-trend-card {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.website-trend-score {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
}

.website-trend-diff {
  font-size: var(--text-xs);
  font-weight: 600;
}

.website-trend-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.website-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  align-items: start;
}

.website-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.website-stack {
  display: grid;
  gap: var(--space-6);
  align-content: start;
}

.website-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.website-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.92) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.website-panel + .website-panel {
  margin-top: var(--space-5);
}

.website-panel--hero {
  margin-bottom: var(--space-5);
}

.website-panel--accent {
  margin-bottom: var(--space-6);
  border-color: rgba(12, 89, 242, 0.10);
  background: linear-gradient(180deg, rgba(239,246,255,0.86) 0%, rgba(255,255,255,0.98) 100%);
  box-shadow: 0 18px 42px rgba(12, 89, 242, 0.04);
}

/* Flat info-panel variant used by the website-overview hero KPI block.
   Lighter, more translucent than the default gradient panel.
   Previously expressed via inline styles in website.js; extracted here so
   the dark-mode override in the EOF block can target it. */
.website-panel--info {
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(12, 89, 242, 0.08);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.website-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.website-panel__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.website-panel__subline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 72ch;
  line-height: 1.6;
}

.website-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.website-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.website-priority-card {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.website-priority-card--error {
  border-left: 3px solid var(--color-accent-red);
}

.website-priority-card--warning {
  border-left: 3px solid var(--color-accent-orange);
}

.website-priority-card--info {
  border-left: 3px solid var(--color-primary);
}

.website-context-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-3);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.website-context-chip__meta {
  color: var(--color-text-muted);
}

.visibility-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  align-items: start;
}

.visibility-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.visibility-stack {
  display: grid;
  gap: var(--space-6);
  align-content: start;
}

.visibility-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.visibility-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.92) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: calc(var(--radius-xl) + 2px);
  padding: calc(var(--space-5) + var(--space-1));
  box-shadow: var(--shadow-xs);
}

.visibility-panel + .visibility-panel {
  margin-top: var(--space-6);
}

.visibility-panel--hero {
  margin-bottom: var(--space-8);
}

.visibility-panel--accent {
  margin-bottom: var(--space-6);
  border-color: rgba(12, 89, 242, 0.12);
  background: linear-gradient(180deg, rgba(239,246,255,0.88) 0%, rgba(255,255,255,0.98) 100%);
  box-shadow: 0 18px 42px rgba(12, 89, 242, 0.05);
}

/* Flat info-panel variant used by the visibility hero KPI block.
   Replaces the inline style in visibility.js:1540 so the dark-mode
   override at EOF can target it. Mirrors .website-panel--info. */
.visibility-panel--info {
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(12, 89, 242, 0.08);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

/* Priority pills used by _recPriorityBadge() in visibility.js. Extracted
   from inline styles so the dark-mode variants can swap background/color
   via tokens. The base hex values reproduce the original light-mode look. */
.visibility-priority-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
}
.visibility-priority-badge--high   { background: #fef2f2; color: #dc2626; }
.visibility-priority-badge--medium { background: #fffbeb; color: #d97706; }
.visibility-priority-badge--low    { background: #f1f5f9; color: #64748b; }

.visibility-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.visibility-panel__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.visibility-panel__subline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 72ch;
  line-height: 1.6;
}

.visibility-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.visibility-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.visibility-priority-card {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.visibility-priority-card--error {
  border-left: 3px solid var(--color-accent-red);
}

.visibility-priority-card--warning {
  border-left: 3px solid var(--color-accent-orange);
}

.visibility-priority-card--info {
  border-left: 3px solid var(--color-primary);
}

.visibility-priority-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.visibility-priority-card__impact {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

.visibility-priority-card__action {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.competitor-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.competitor-overview-stats--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.competitor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, #fff 100%);
}

.competitor-toolbar__actions,
.competitor-toolbar__meta,
.competitor-context-strip__chips,
.competitor-list-card__identity,
.competitor-list-card__badges,
.competitor-list-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.competitor-toolbar__meta {
  justify-content: flex-end;
}

.competitor-context-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: rgba(248, 250, 252, 0.86);
}

.competitor-context-strip__copy,
.competitor-filter-bar__copy,
.competitor-list-card__name {
  display: grid;
  gap: 4px;
}

.competitor-context-strip__copy {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.competitor-context-strip__copy strong {
  color: var(--color-text-primary);
}

.competitor-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: #fff;
}

.competitor-filter-bar__copy {
  max-width: 34rem;
}

.competitor-filter-bar__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.competitor-filter-bar__hint {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.competitor-segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
}

.competitor-segmented-control__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.competitor-segmented-control__button.is-active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.competitor-segmented-control__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.16);
  color: inherit;
}

.competitor-overview-list {
  display: grid;
  gap: var(--space-4);
}

.competitor-list-card {
  padding: calc(var(--space-5) + var(--space-1));
}

.competitor-list-card__header,
.competitor-list-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
}

.competitor-list-card__identity {
  min-width: 0;
  gap: var(--space-3);
}

.competitor-list-card__rank {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.competitor-list-card__domain {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-list-card__display {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-list-card__summary {
  margin-top: var(--space-4);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.competitor-list-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.competitor-list-card__metric {
  display: grid;
  gap: 6px;
}

.competitor-list-card__metric-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
}

.competitor-list-card__metric-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.competitor-list-card__footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.competitor-empty-state {
  padding: var(--space-6);
  text-align: center;
}

.competitor-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.competitor-card-metrics {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}

.competitor-card-score {
  text-align: center;
}

.competitor-tab-stack {
  display: grid;
  gap: var(--space-4);
}

.competitor-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: var(--space-4);
  align-items: start;
}

.competitor-keyword-toolbar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

/* Accent Button (CMS Push) */
.btn-accent {
  background: #047857;
  color: #ffffff;
  border: none;
}

.btn-accent:hover {
  background: #065f46;
}

.btn-accent:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Approval-Workflow ──────────────────────────────────────── */
.approval-section {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  background: var(--color-surface);
}

.approval-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full, 9999px);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.approval-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.approval-note-section {
  margin-top: var(--space-3);
}

.approval-note-input {
  width: 100%;
  resize: vertical;
  min-height: 50px;
}

.approval-note-display {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary-muted);
  border-radius: var(--radius-md);
}

/* ── 24. Rankings / GSC ──────────────────────────────────────── */
.ranking-row td {
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: var(--text-sm);
  vertical-align: middle;
}

.ranking-row:hover {
  background: var(--color-surface-raised) !important;
}

.ranking-row:last-child td {
  border-bottom: none;
}

/* ── 25. Module Tab Bar (shared: settings, authority, website, visibility) ─ */

/* Container: segmented-control track */
.settings-tabs,
.mod-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 3px;
  background: var(--color-surface-secondary, #f1f5f9);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  width: fit-content;
  max-width: 100%;
}

.settings-tabs::-webkit-scrollbar,
.mod-tabs::-webkit-scrollbar {
  display: none;
}

/* Individual tab button */
.settings-tab,
.mod-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.settings-tab:hover,
.mod-tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.7);
}

/* Active state: white pill with subtle shadow */
.settings-tab-active,
.mod-tab--active {
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(12, 89, 242, 0.10);
}

.settings-tab svg,
.mod-tab svg {
  flex-shrink: 0;
  opacity: 0.65;
}

.settings-tab-active svg,
.mod-tab--active svg {
  opacity: 1;
}

/* Number badge inside a tab */
.mod-tab__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(12, 89, 242, 0.08);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.mod-tab--active .mod-tab__num {
  background: var(--color-primary);
  color: #fff;
}

.settings-tab-content,
.mod-tab-content {
  padding-top: var(--space-6);
}

@media (max-width: 640px) {
  .settings-tab,
  .mod-tab {
    padding: 7px 11px;
    font-size: 0.8125rem;
    gap: var(--space-1);
  }
}

/* ── 26. Module KPI Strip ──────────────────────────────────── */
.module-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.module-kpi-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease;
}

.module-kpi-item:hover {
  border-color: var(--color-border);
}

.module-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.module-kpi-body {
  min-width: 0;
}

.module-kpi-value {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.module-kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.module-kpi-trend {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-left: var(--space-1);
}

.module-kpi-trend.up { color: var(--color-accent-green); }
.module-kpi-trend.down { color: var(--color-accent-red); }
.module-kpi-trend.neutral { color: var(--color-text-muted); }

/* Score-based value colors */
.module-kpi-value.score-good { color: var(--color-accent-green); }
.module-kpi-value.score-mid { color: var(--color-accent-orange); }
.module-kpi-value.score-bad { color: var(--color-accent-red); }
.module-kpi-value.score-none { color: var(--color-text-muted); }

/* Icon background tints */
.module-kpi-icon.tint-blue { background: #ebf5ff; color: var(--color-accent-blue); }
.module-kpi-icon.tint-green { background: var(--color-accent-green-bg); color: var(--color-accent-green); }
.module-kpi-icon.tint-orange { background: var(--color-accent-orange-bg); color: var(--color-accent-orange); }
.module-kpi-icon.tint-red { background: var(--color-accent-red-bg); color: var(--color-accent-red); }
.module-kpi-icon.tint-primary { background: var(--color-primary-muted); color: var(--color-primary); }

@media (max-width: 640px) {
  .module-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
  .module-kpi-item {
    padding: var(--space-2) var(--space-3);
  }
  .module-kpi-icon {
    width: 30px;
    height: 30px;
    font-size: var(--text-md);
  }
  .module-kpi-value {
    font-size: var(--text-md);
  }
}

/* ============================================================
   27 — Agency / White-Label Module
   ============================================================ */

/* Agency page layout */
.agency-page {
  max-width: 960px;
}

/* Tab switcher */
.agency-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.agency-tab {
  appearance: none;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-secondary);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--color-tab-bg) 100%);
  border: 1px solid var(--color-tab-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.agency-tab:hover {
  color: var(--color-text);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, var(--color-tab-bg-hover) 100%);
  border-color: rgba(15, 91, 255, 0.18);
  box-shadow: var(--shadow-sm);
}
.agency-tab.active {
  color: var(--color-cta-hover);
  border-color: var(--color-tab-border-active);
  background: linear-gradient(135deg, rgba(15, 91, 255, 0.14), rgba(45, 115, 255, 0.08));
  box-shadow: 0 10px 22px rgba(15, 91, 255, 0.12);
}

/* Clients header */
.agency-clients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

/* Client cards grid */
.agency-clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.agency-client-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow 0.15s;
}
.agency-client-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.client-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  flex-shrink: 0;
}
.client-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.client-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.client-plan {
  font-size: var(--text-xs);
}

.client-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.client-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.meta-value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* Plan badges */
.badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
}
.badge-starter { background: #edf2f7; color: #4a5568; }
.badge-pro { background: #ebf5ff; color: #1a73e8; }
.badge-premium { background: #fef3c7; color: #92400e; }
.badge-agency { background: #f0fdf4; color: #166534; }

/* New client form */
.agency-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.agency-form .form-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 var(--space-4) 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3) var(--space-4);
}
.form-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-4);
}

/* Branding */
.agency-branding {
  max-width: 640px;
}
.section-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: var(--space-1) 0 var(--space-5) 0;
}
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.form-color {
  width: 40px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
  cursor: pointer;
  background: var(--color-surface);
}
.form-input-sm {
  width: 100px;
}

/* Branding preview */
.branding-preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-5) 0;
}
.preview-header {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
}
.preview-body {
  padding: var(--space-4);
  background: var(--color-surface);
}
.preview-card {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-3);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

/* Context banner (shown when switched into client) */
.agency-context-banner {
  background: #fef3c7;
  border-bottom: 1px solid #f6e05e;
  padding: var(--space-2) var(--space-4);
}
.context-banner-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: #92400e;
}
.context-banner-inner svg {
  flex-shrink: 0;
  color: #d97706;
}
.context-switch-back {
  margin-left: auto;
  color: #92400e;
  font-weight: 500;
  font-size: var(--text-xs);
}

@media (max-width: 640px) {
  .agency-clients-grid {
    grid-template-columns: 1fr;
  }
  .client-card-meta {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .context-banner-inner {
    flex-wrap: wrap;
  }
}

/* ============================================================
   SCHEDULER MODULE — Geplante Aufgaben
   ============================================================ */

.scheduler-page {
  max-width: 800px;
}

.scheduler-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.scheduler-job-card {
  margin-bottom: var(--space-4);
}

.scheduler-job-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.scheduler-job-info {
  flex: 1;
  min-width: 0;
}

.scheduler-job-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.scheduler-job-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

.scheduler-job-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.scheduler-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.scheduler-detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scheduler-detail-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.scheduler-job-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Edit form */
.scheduler-edit-form {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-accent-blue-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-accent-blue);
}

.scheduler-edit-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.scheduler-edit-actions {
  display: flex;
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .scheduler-header {
    flex-direction: column;
  }

  .scheduler-job-details {
    grid-template-columns: 1fr;
  }

  .scheduler-edit-row {
    flex-direction: column;
  }

  .scheduler-job-actions {
    flex-direction: column;
  }

  .scheduler-job-actions .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════════ */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-bg-tertiary);
  border-radius: 24px;
  transition: background 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-accent-green);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* Notification rows hover */
.notif-row:hover {
  background: var(--color-bg-secondary);
}

/* ============================================================
   Landing Page
   ============================================================ */

.landing-page {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--color-bg);
}

/* ── Nav ──────────────────────────────────────────────────────── */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
}

.landing-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav-logo {
  display: flex;
  text-decoration: none;
  color: var(--color-text);
}

.landing-nav-logo .logo-svg {
  height: 32px;
  width: auto;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.landing-nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.landing-nav-link:hover {
  color: var(--color-text);
}

.landing-nav-cta {
  padding: var(--space-2) var(--space-4);
}

.landing-mobile-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.landing-mobile-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  position: absolute;
  left: 0;
  transition: all var(--transition-fast);
}

.landing-mobile-menu span:nth-child(1) { top: 0; }
.landing-mobile-menu span:nth-child(2) { top: 9px; }
.landing-mobile-menu span:nth-child(3) { top: 18px; }

.landing-mobile-menu.open span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.landing-mobile-menu.open span:nth-child(2) { opacity: 0; }
.landing-mobile-menu.open span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

.landing-mobile-nav {
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.landing-mobile-link {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-subtle);
}

@media (max-width: 768px) {
  .landing-nav-links { display: none; }
  .landing-mobile-menu { display: block; }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.landing-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-12);
  text-align: center;
}

.landing-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.landing-hero-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-green);
  background: var(--color-accent-green-bg);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.landing-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.landing-hero-sub {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.landing-hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.landing-hero-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

/* Hero Preview (Cockpit mockup) */
.landing-hero-preview {
  margin-top: var(--space-12);
  perspective: 1200px;
}

.landing-preview-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 24px 64px rgba(0,0,0,0.06);
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto;
  transform: rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-preview-window:hover {
  transform: rotateX(0deg);
}

.landing-preview-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-subtle);
}

.landing-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.landing-preview-dot:first-child { background: #ff5f57; }
.landing-preview-dot:nth-child(2) { background: #febc2e; }
.landing-preview-dot:nth-child(3) { background: #28c840; }

.landing-preview-url {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: var(--space-3);
  background: var(--color-surface);
  padding: 2px var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
}

.landing-preview-content {
  display: flex;
  min-height: 220px;
}

.landing-preview-sidebar {
  width: 52px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-subtle);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.landing-preview-nav-item {
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.landing-preview-nav-item.active {
  background: var(--color-primary-muted);
}

.landing-preview-main {
  flex: 1;
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  background: var(--color-bg);
}

.landing-score-ring {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.landing-score-progress {
  animation: landing-score-anim 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  stroke-dashoffset: 327;
}

@keyframes landing-score-anim {
  to { stroke-dashoffset: 82; }
}

.landing-preview-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.landing-preview-bar {
  height: 28px;
  background: var(--color-primary-muted);
  border-radius: var(--radius-sm);
  width: var(--bar-width);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  animation: landing-bar-anim 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.landing-preview-bar:nth-child(1) { animation-delay: 0.3s; }
.landing-preview-bar:nth-child(2) { animation-delay: 0.5s; }
.landing-preview-bar:nth-child(3) { animation-delay: 0.7s; }
.landing-preview-bar:nth-child(4) { animation-delay: 0.9s; }

@keyframes landing-bar-anim {
  to { transform: scaleX(1); }
}

.landing-preview-bar span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  white-space: nowrap;
  opacity: 0;
  animation: landing-fade-in 0.4s ease forwards;
  animation-delay: 1.4s;
}

@keyframes landing-fade-in {
  to { opacity: 1; }
}

@media (max-width: 600px) {
  .landing-preview-main { flex-direction: column; padding: var(--space-4); gap: var(--space-4); }
  .landing-score-ring { width: 80px; height: 80px; }
  .landing-preview-sidebar { display: none; }
}

/* ── Trust ────────────────────────────────────────────────────── */
.landing-trust {
  text-align: center;
  padding: var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.landing-trust-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.landing-trust-text strong {
  color: var(--color-text-secondary);
}

/* ── Sections ─────────────────────────────────────────────────── */
.landing-section {
  padding: var(--space-16) var(--space-6);
}

.landing-section-alt {
  background: var(--color-surface);
}

.landing-section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.landing-section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.landing-section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-green);
  margin-bottom: var(--space-3);
}

.landing-section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.landing-section-sub {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Pain Points Grid ─────────────────────────────────────────── */
.landing-pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 960px;
  margin: 0 auto;
}

.landing-pain-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.landing-pain-emoji {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  line-height: 1;
}

.landing-pain-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.landing-pain-text strong {
  color: var(--color-text);
  display: block;
  font-size: var(--text-md);
  margin-bottom: var(--space-1);
}

/* ── Benefits Grid ────────────────────────────────────────────── */
.landing-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.landing-benefit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.landing-benefit-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
}

.landing-benefit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.landing-benefit-icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.landing-benefit-icon svg {
  width: 100%;
  height: 100%;
}

.landing-benefit-metric {
  text-align: right;
}

.landing-benefit-metric-value {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent-green);
  line-height: 1.2;
}

.landing-benefit-metric-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 120px;
  margin-left: auto;
}

.landing-benefit-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.landing-benefit-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* ── Bereiche List (compact) ─────────────────────────────────── */
.landing-bereiche-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.landing-bereich-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition-fast);
}

.landing-bereich-row:hover {
  border-color: var(--color-border);
}

.landing-bereich-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-bereich-info {
  flex: 1;
  min-width: 0;
}

.landing-bereich-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.landing-bereich-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-left: var(--space-2);
}

.landing-bereich-bar-wrap {
  width: 100px;
  height: 6px;
  background: var(--color-border-subtle);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.landing-bereich-bar {
  height: 100%;
  width: var(--bw);
  background: var(--color-accent-green);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 600px) {
  .landing-bereich-bar-wrap { display: none; }
  .landing-bereich-desc { display: block; margin-left: 0; margin-top: 2px; }
}

/* ── Quote Block ──────────────────────────────────────────────── */
.landing-quote-block {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-8) 0;
}

.landing-quote-text {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text);
  font-style: normal;
  margin-bottom: var(--space-6);
}

.landing-quote-author {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
}

.landing-quote-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-quote-author strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.landing-quote-author span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Steps ────────────────────────────────────────────────────── */
.landing-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
}

.landing-step {
  flex: 0 1 280px;
  text-align: center;
  padding: var(--space-6);
}

.landing-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-lg);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.landing-step-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.landing-step-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.landing-step-arrow {
  flex-shrink: 0;
  width: 32px;
  color: var(--color-text-muted);
  margin-top: var(--space-10);
}

.landing-step-arrow svg {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .landing-steps {
    flex-direction: column;
    align-items: center;
  }
  .landing-step-arrow {
    transform: rotate(90deg);
    margin-top: 0;
  }
}

/* ── Pricing ──────────────────────────────────────────────────── */
.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  align-items: start;
}

.landing-price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  position: relative;
  transition: box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.landing-price-card:hover {
  box-shadow: var(--shadow-md);
}

.landing-price-highlighted {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.landing-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.landing-price-name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.landing-price-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: var(--space-3);
}

.landing-price-currency {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.landing-price-value {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.landing-price-period {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-left: var(--space-1);
}

.landing-price-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  min-height: 40px;
}

.landing-price-features {
  list-style: none;
  margin-bottom: var(--space-8);
  flex: 1;
}

.landing-price-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  color: var(--color-text-secondary);
}

.landing-price-features li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Registration Card ────────────────────────────────────────── */
.landing-register-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.landing-register-back {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--space-6);
  transition: color var(--transition-fast);
}

.landing-register-back:hover {
  color: var(--color-text);
}

.landing-register-back svg {
  width: 18px;
  height: 18px;
}

.landing-register-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.landing-register-sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.landing-register-trial {
  color: var(--color-accent-green);
  font-weight: 500;
}

.landing-register-legal {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-4);
  line-height: var(--leading-relaxed);
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.landing-faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.landing-faq-item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.landing-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-md);
  font-weight: 600;
  padding: var(--space-5) 0;
  cursor: pointer;
  color: var(--color-text);
  list-style: none;
}

.landing-faq-q::-webkit-details-marker { display: none; }

.landing-faq-q::after {
  content: '+';
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

.landing-faq-item[open] .landing-faq-q::after {
  content: '\2212';
}

.landing-faq-a {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  padding-bottom: var(--space-5);
  max-width: 640px;
}

/* ── CTA Section ──────────────────────────────────────────────── */
.landing-cta-section {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.landing-cta-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text-inverse);
}

.landing-cta-sub {
  font-size: var(--text-md);
  opacity: 0.85;
  margin-bottom: var(--space-8);
}

.landing-cta-section .btn-primary {
  background: var(--color-text-inverse);
  color: var(--color-primary);
}

.landing-cta-section .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

/* ── Footer ──────────────────────────────────────────────────── */
.landing-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.landing-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.landing-footer-inner span,
.landing-footer-link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}

.landing-footer-link:hover {
  color: var(--color-text-secondary);
}

/* ── Scroll Animations ────────────────────────────────────────── */
[data-anim="fade-up"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-anim="fade-up"].anim-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── btn-lg / btn-ghost (Landing additions) ────────────────── */
.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-md);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════════════════════
   SUPERADMIN — Plattform-Verwaltung
   ══════════════════════════════════════════════════════════════ */

.sa-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-6);
}

.sa-header {
  margin-bottom: var(--space-6);
}

.sa-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-1) 0;
}

.sa-title svg {
  color: var(--color-primary);
}

.sa-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

/* ── Tabs ──────────────────────────────────────────────────── */

.sa-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.sa-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--color-tab-bg) 100%);
  border: 1px solid var(--color-tab-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.sa-tab:hover {
  color: var(--color-text);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, var(--color-tab-bg-hover) 100%);
  border-color: rgba(15, 91, 255, 0.18);
  box-shadow: var(--shadow-sm);
}

.sa-tab--active {
  color: var(--color-cta-hover);
  border-color: var(--color-tab-border-active);
  background: linear-gradient(135deg, rgba(15, 91, 255, 0.14), rgba(45, 115, 255, 0.08));
  box-shadow: 0 10px 22px rgba(15, 91, 255, 0.12);
}

.sa-tab svg {
  flex-shrink: 0;
}

/* ── KPI Cards ────────────────────────────────────────────── */

.sa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.sa-kpi-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s ease;
}

.sa-kpi-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sa-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.sa-kpi-body {
  min-width: 0;
}

.sa-kpi-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.sa-kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Section ──────────────────────────────────────────────── */

.sa-section {
  margin-bottom: var(--space-6);
}

.sa-section-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-3) 0;
}

/* ── Plan Distribution Bars ───────────────────────────────── */

.sa-plan-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sa-plan-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sa-plan-bar-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sa-plan-bar-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.sa-plan-bar-track {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.sa-plan-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.sa-plan-bar-fill--starter  { background: var(--color-text-muted); }
.sa-plan-bar-fill--pro      { background: var(--color-accent-green); }
.sa-plan-bar-fill--premium  { background: var(--color-primary); }
.sa-plan-bar-fill--agency   { background: #8b5cf6; }

/* ── Badges ───────────────────────────────────────────────── */

.sa-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.sa-badge--trial-active {
  background: #dcfce7;
  color: #166534;
}

.sa-badge--trial-expired {
  background: #fee2e2;
  color: #991b1b;
}

.sa-badge--trial-none {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.sa-badge--module {
  background: #ede9fe;
  color: #5b21b6;
}

[data-theme="dark"] .sa-badge--trial-active {
  background: #052e16;
  color: #86efac;
}

[data-theme="dark"] .sa-badge--trial-expired {
  background: #450a0a;
  color: #fca5a5;
}

[data-theme="dark"] .sa-badge--module {
  background: #2e1065;
  color: #c4b5fd;
}

/* ── Status Dot ───────────────────────────────────────────── */

.sa-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sa-status-dot--active {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.sa-status-dot--inactive {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ── Toolbar ──────────────────────────────────────────────── */

.sa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.sa-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.sa-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sa-search {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
  min-width: 260px;
  outline: none;
  transition: border-color 0.15s ease;
}

.sa-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.08);
}

.sa-filter {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
  outline: none;
  cursor: pointer;
}

.sa-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Table ────────────────────────────────────────────────── */

.sa-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.sa-table th {
  padding: var(--space-3) var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  user-select: none;
}

.sa-table td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.sa-table tbody tr:last-child td {
  border-bottom: none;
}

.sa-table tbody tr:hover {
  background: var(--color-bg);
}

.sa-table--compact td,
.sa-table--compact th {
  padding: var(--space-2) var(--space-3);
}

.sa-cell-primary {
  font-weight: 500;
  color: var(--color-text);
}

.sa-cell-secondary {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.sa-cell-link {
  font-size: var(--text-xs);
  margin-top: 2px;
}

.sa-cell-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.sa-cell-link a:hover {
  text-decoration: underline;
}

.sa-cell-center {
  text-align: center;
}

.sa-cell-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sa-cell-name {
  font-weight: 500;
}

.sa-empty-row {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-6) !important;
}

/* ── Sortable Headers ─────────────────────────────────────── */

.sa-sortable {
  cursor: pointer;
}

.sa-sortable:hover {
  color: var(--color-text);
}

.sa-sort-icon {
  font-size: 10px;
  margin-left: 4px;
  color: var(--color-text-muted);
}

.sa-sort-icon--asc,
.sa-sort-icon--desc {
  color: var(--color-primary);
}

/* ── Action Buttons ───────────────────────────────────────── */

.sa-actions {
  display: flex;
  gap: var(--space-1);
  justify-content: center;
}

.sa-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sa-btn-icon:hover {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.sa-btn-icon--danger:hover {
  color: #dc2626;
  border-color: #dc2626;
  background: #fef2f2;
}

[data-theme="dark"] .sa-btn-icon--danger:hover {
  background: #450a0a;
}

/* ── Error State ──────────────────────────────────────────── */

.sa-error {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.sa-error h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.sa-error p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .sa-page {
    padding: var(--space-4);
  }

  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .sa-tabs {
    overflow-x: auto;
    white-space: nowrap;
    gap: 0;
  }

  .sa-tab {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .sa-search {
    min-width: 180px;
  }

  .sa-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sa-toolbar-left,
  .sa-toolbar-right {
    justify-content: space-between;
  }
}

/* ── Driver.js Tour Popover (markt.machen.cockpit Branding) ──────────────── */
.mmc-tour-popover.driver-popover {
  font-family: var(--font-sans);
  max-width: 340px;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg);
  color: var(--color-text-primary);
}

.mmc-tour-popover .driver-popover-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.mmc-tour-popover .driver-popover-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.mmc-tour-popover .driver-popover-description strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.mmc-tour-popover .driver-popover-description code {
  font-family: monospace;
  font-size: 0.85em;
  background: var(--color-bg-subtle);
  padding: 1px 4px;
  border-radius: 3px;
}

.mmc-tour-popover .driver-popover-progress-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.mmc-tour-popover .driver-popover-navigation-btns button {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 6px 14px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.mmc-tour-popover button.driver-popover-prev-btn {
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
}

.mmc-tour-popover button.driver-popover-next-btn {
  background: var(--color-primary, #1a365d);
  border: 1px solid var(--color-primary, #1a365d);
  color: #fff;
}

.mmc-tour-popover button.driver-popover-close-btn {
  color: var(--color-text-muted);
  font-size: 1rem;
  opacity: 0.6;
}

.driver-overlay {
  background: rgba(0,0,0,0.45) !important;
}

/* ── Marketing-Glossar (P5) ──────────────────────────────────────────────── */

/* Markierter Fachbegriff im Text */
.gloss-term {
  white-space: nowrap;
}

/* ⓘ Icon neben dem Begriff */
.gloss-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  font-size: 0.7em;
  line-height: 1;
  color: var(--color-accent-blue);
  cursor: pointer;
  border-radius: 50%;
  transition: opacity 0.15s;
  vertical-align: middle;
  user-select: none;
}

.gloss-tip:hover,
.gloss-tip:focus {
  opacity: 0.7;
  outline: none;
}

.gloss-tip:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 1px;
  border-radius: 2px;
}

/* Schwebendes Tooltip-Fenster */
#gloss-tooltip {
  position: absolute;
  z-index: 9000;
  max-width: 280px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

#gloss-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.gloss-tooltip-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.gloss-tooltip-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Glossar-Liste auf der Kurs-Seite */
.gloss-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gloss-list-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  align-items: start;
}

.gloss-list-row:last-child {
  border-bottom: none;
}

.gloss-list-term {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.gloss-list-def {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 480px) {
  .gloss-list-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
}

/* ── Schnell-Referenz-Karte (P6) ─────────────────────────────────────────── */

.reference-card {
  padding: var(--space-6);
}

.ref-card-header {
  text-align: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border-subtle);
}

.ref-card-logo {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.ref-card-headline {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.ref-card-sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.ref-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.ref-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.ref-section-icon {
  font-size: 1.1rem;
}

.ref-section-title {
  line-height: 1.2;
}

.ref-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ref-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.ref-checklist li::before {
  content: '✓';
  color: var(--color-accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.ref-card-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-4);
}

.ref-tip {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  line-height: 1.5;
}

.ref-tip strong {
  color: var(--color-text-primary);
}

/* ── Print-Styles: nur Referenz-Karte zeigen ─────────────────────────────── */

@media print {
  body.printing-reference > *:not(#gloss-tooltip) {
    display: none !important;
  }

  body.printing-reference #kurs-reference-card {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    margin: 0 !important;
    padding: 24mm 20mm !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-family: 'Inter', sans-serif !important;
    z-index: 99999 !important;
    overflow: visible !important;
  }

  body.printing-reference .ref-card-body {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  body.printing-reference .ref-card-headline {
    font-size: 22pt !important;
  }

  body.printing-reference .ref-checklist li,
  body.printing-reference .ref-section-title,
  body.printing-reference .ref-tip {
    font-size: 10pt !important;
  }

  @page {
    size: A4 landscape;
    margin: 0;
  }
}

/* ── ATS Bewerber-Tracking (Sprint 16) ──────────────────────────────────── */

.ats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.ats-toolbar-left,
.ats-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ats-job-filter {
  min-width: 200px;
}

.ats-gdpr-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Kanban Layout */
.ats-layout {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  min-height: 0;
}

.ats-board {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding-bottom: var(--space-4);
}

.ats-loading {
  color: var(--color-text-muted);
  padding: var(--space-6);
  text-align: center;
}

/* Columns */
.ats-column {
  flex: 0 0 220px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
}

.ats-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-top: 3px solid transparent;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}

.ats-column-title {
  font-weight: 600;
  font-size: var(--text-sm);
}

.ats-column-count {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.ats-cards {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  flex: 1;
}

.ats-empty-col {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-4) var(--space-2);
}

/* Cards */
.ats-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.ats-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.ats-card-name {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ats-card-job {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ats-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.ats-card-source {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
  text-transform: capitalize;
}

/* Detail Panel */
.ats-detail-panel {
  width: 0;
  overflow: hidden;
  transition: width 0.25s ease;
  flex-shrink: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.ats-detail-panel.open {
  width: 420px;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
}

.ats-detail-loading,
.ats-detail-error {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
}

.ats-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 1;
}

.ats-detail-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-1);
}

.ats-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.ats-detail-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ats-detail-close:hover {
  color: var(--color-text);
  background: var(--color-bg-secondary);
}

.ats-detail-info {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.ats-info-row {
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
}

.ats-info-row span:first-child {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ats-detail-section {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ats-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.ats-message-box {
  font-size: var(--text-sm);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

/* Status-Transition-Buttons */
.ats-transition-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ats-transition-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid;
  background: transparent;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: opacity 0.15s;
}

.ats-transition-btn:hover {
  opacity: 0.75;
}

.ats-transition-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Notes */
.ats-notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 280px;
  overflow-y: auto;
}

.ats-note {
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  border-left: 3px solid transparent;
}

.ats-note-internal      { background: var(--color-bg-secondary); border-left-color: #6b7280; }
.ats-note-status_change { background: #f0fdf4; border-left-color: #10b981; }
.ats-note-email_sent    { background: #eff6ff; border-left-color: #3b82f6; }
.ats-note-email_received{ background: #faf5ff; border-left-color: #8b5cf6; }

.ats-note-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.ats-note-icon { font-size: 12px; }

.ats-note-type {
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.ats-note-ai {
  font-size: 10px;
  background: #fef3c7;
  color: #d97706;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.ats-note-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: auto;
}

.ats-note-subject {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.ats-note-content {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--color-text);
}

/* Form-Elemente im Detail-Panel */
.ats-select,
.ats-input,
.ats-textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
  box-sizing: border-box;
}

.ats-textarea {
  resize: vertical;
  font-family: inherit;
}

/* Danger Zone */
.ats-danger-zone {
  border-bottom: none;
}

.ats-danger-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .ats-column {
    flex: 0 0 180px;
  }
  .ats-detail-panel.open {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    border-radius: 0;
    max-height: 100vh;
  }
}

/* ── Social Listening (Sprint 17) ───────────────────────────────────────── */

.sl-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.sl-header-actions {
  display: flex;
  gap: var(--space-2);
}

.sl-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-4);
  align-items: flex-start;
}

.sl-sidebar {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sl-sidebar-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.sl-sidebar-title {
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.sl-keywords-list {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sl-keyword-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.sl-keyword-inactive { opacity: 0.5; }

.sl-keyword-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.sl-keyword-name {
  font-weight: 600;
  font-size: var(--text-sm);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-keyword-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.sl-keyword-cat {
  background: var(--color-bg-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 10px;
}

.sl-keyword-checked {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.sl-toggle {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.sl-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.sl-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.sl-toggle-slider::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.sl-toggle input:checked + .sl-toggle-slider { background: var(--color-primary); }
.sl-toggle input:checked + .sl-toggle-slider::after { transform: translateX(12px); }

.sl-add-keyword {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sl-add-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.sl-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sl-filter-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sl-filter-select { min-width: 140px; }

.sl-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
}

.sl-tab-btn {
  padding: var(--space-2) var(--space-4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.15s, border-color 0.15s;
}

.sl-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.sl-stats-summary {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-4);
  align-items: center;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.sl-stat-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
}

.sl-stat-total-num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
}

.sl-stat-total-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.sl-sentiment-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sl-stat-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px 42px;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.sl-stat-label { font-weight: 500; }

.sl-stat-bar-wrap {
  height: 10px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.sl-stat-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  min-width: 2px;
}

.sl-stat-count { font-weight: 700; text-align: right; }
.sl-stat-pct { font-size: var(--text-xs); color: var(--color-text-muted); }

.sl-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.sl-top-negative { display: flex; flex-direction: column; gap: var(--space-2); }

.sl-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-4);
  font-size: var(--text-sm);
}

.sl-empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
}

.sl-empty-icon { font-size: 3rem; margin-bottom: var(--space-3); }

.sl-mentions-feed { display: flex; flex-direction: column; gap: var(--space-3); }

.sl-mention-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.sl-mention-positive { border-left-color: #10b981; }
.sl-mention-neutral  { border-left-color: #6b7280; }
.sl-mention-negative { border-left-color: #ef4444; }

.sl-mention-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.sl-mention-source { font-size: var(--text-xs); font-weight: 600; text-transform: capitalize; }

.sl-mention-kw {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  font-size: var(--text-xs);
}

.sl-mention-date { font-size: var(--text-xs); color: var(--color-text-muted); margin-left: auto; }
.sl-mention-title { font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--space-1); }

.sl-mention-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.sl-mention-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.sl-mention-reason {
  font-style: italic;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-mention-link { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.sl-mention-link:hover { text-decoration: underline; }

.sl-sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.sl-input,
.sl-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
  box-sizing: border-box;
}

.btn-full { width: 100%; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  line-height: 1;
  flex-shrink: 0;
}

.icon-btn:hover { color: var(--color-text); background: var(--color-bg-secondary); }

@media (max-width: 900px) {
  .sl-layout { grid-template-columns: 1fr; }
  .sl-stats-summary { grid-template-columns: 1fr; }
}

/* ── A/B-Testing (Sprint 18) ────────────────────────────────────────────── */

.abt-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.abt-filter-bar {
  margin-bottom: var(--space-3);
}

.abt-layout {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

/* List */
.abt-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.abt-loading {
  color: var(--color-text-muted);
  padding: var(--space-6);
  text-align: center;
}

.abt-empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
}

.abt-empty-icon { font-size: 3rem; margin-bottom: var(--space-3); }

.abt-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: border-color 0.15s;
}

.abt-list-item:hover { border-color: var(--color-primary); }

.abt-list-main { flex: 1; min-width: 0; }

.abt-list-name {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abt-list-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.abt-list-date { margin-left: auto; }

.abt-winner-hint {
  color: #d97706;
  font-weight: 600;
}

.abt-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Detail Panel */
.abt-detail-panel {
  width: 0;
  overflow: hidden;
  transition: width 0.25s ease;
  flex-shrink: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.abt-detail-panel.open {
  width: 500px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.abt-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 1;
}

.abt-detail-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-1);
}

.abt-detail-sub {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.abt-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 18px;
  padding: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.abt-close-btn:hover { color: var(--color-text); background: var(--color-bg-secondary); }

.abt-detail-desc {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.abt-detail-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}

.abt-overview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  border-right: 1px solid var(--color-border);
  text-align: center;
}

.abt-overview-stat:last-child { border-right: none; }

.abt-overview-num {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
}

.abt-overview-lbl {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.abt-detail-actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.abt-eval-success {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-3);
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #15803d;
}

.abt-eval-pending {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-3);
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #92400e;
}

/* Variants Grid */
.abt-variants-grid {
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.abt-variant-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-bg-secondary);
}

.abt-variant-winner {
  border-color: #10b981;
  background: #f0fdf4;
}

.abt-variant-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.abt-variant-label {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
  font-weight: 800;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.abt-variant-name {
  font-weight: 600;
  font-size: var(--text-sm);
  flex: 1;
}

.abt-winner-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.abt-variant-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-2);
}

.abt-variant-seo {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.abt-variant-seo span { font-weight: 600; color: var(--color-text); }

.abt-variant-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: var(--space-2) 0;
  text-align: center;
}

.abt-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.abt-stat-val {
  font-size: var(--text-base);
  font-weight: 700;
}

.abt-stat-highlight { color: #10b981; }

.abt-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.abt-conv-bar-wrap {
  height: 6px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
}

.abt-conv-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  min-width: 2px;
}

.abt-variant-content {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.abt-variant-content summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 500;
}

.abt-variant-preview {
  margin-top: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.abt-preview-iframe {
  width: 100%;
  height: 200px;
  border: none;
}

/* Modal */
.abt-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.abt-modal-box {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.abt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.abt-modal-header h3 { margin: 0; font-size: var(--text-lg); }

.abt-modal-body {
  padding: var(--space-4);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.abt-modal-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

.abt-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
}

.abt-input,
.abt-select,
.abt-textarea {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
  box-sizing: border-box;
  width: 100%;
}

.abt-textarea { resize: vertical; font-family: inherit; }
.abt-html-input { font-family: monospace; font-size: 12px; }

.abt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.abt-error {
  color: #ef4444;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  background: #fef2f2;
  border-radius: var(--radius-md);
  border: 1px solid #fecaca;
}

@media (max-width: 768px) {
  .abt-detail-panel.open { width: 100%; position: fixed; inset: 0; border-radius: 0; max-height: 100vh; z-index: 300; }
  .abt-detail-overview { grid-template-columns: repeat(2, 1fr); }
  .abt-form-row { grid-template-columns: 1fr; }
}

/* ── Dark Mode Component Overrides ──────────────────────────── */
/* Elements that use hardcoded #fff or light colors instead of tokens */

[data-theme="dark"] .card,
[data-theme="dark"] .data-table,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea.form-input,
[data-theme="dark"] .lead-panel,
[data-theme="dark"] .abt-detail-panel {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .app-topbar {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .sidebar {
  background: var(--sidebar-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .subnav {
  background: var(--sidebar-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .main-content {
  background: var(--color-bg);
}

[data-theme="dark"] .data-table th {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .data-table td {
  border-color: var(--color-border-subtle);
}

[data-theme="dark"] .data-table tr:hover td {
  background: var(--color-surface-raised);
}

[data-theme="dark"] .btn-ghost {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .btn-ghost:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

[data-theme="dark"] .btn-secondary {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--color-border);
}

[data-theme="dark"] .topbar-user-dropdown {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .topbar-user-item:hover {
  background: var(--color-surface-raised);
}

[data-theme="dark"] .topbar-lang-dropdown {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  background: var(--color-surface-raised);
}

[data-theme="dark"] .subnav-item:hover {
  background: var(--color-surface-raised);
}

[data-theme="dark"] .subnav-item.active {
  background: var(--color-tab-bg-active);
}

[data-theme="dark"] .subtle-badge {
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .authority-panel,
[data-theme="dark"] .authority-panel--hero,
[data-theme="dark"] .authority-priority-card,
[data-theme="dark"] .authority-foundation-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .settings-tab,
[data-theme="dark"] .mod-tab {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .settings-tab.settings-tab-active,
[data-theme="dark"] .settings-tab:hover,
[data-theme="dark"] .mod-tab--active,
[data-theme="dark"] .mod-tab:hover {
  background: var(--color-tab-bg-active);
  color: var(--color-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(77, 138, 255, 0.25);
}

[data-theme="dark"] .priority-accordion {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .sales-panel,
[data-theme="dark"] .sales-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] pre,
[data-theme="dark"] code {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

[data-theme="dark"] .help-drawer {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] ::placeholder {
  color: var(--color-text-muted);
}

[data-theme="dark"] img {
  opacity: 0.9;
}

/* Landing/Auth pages */
[data-theme="dark"] .auth-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .landing-hero {
  background: var(--color-bg);
}

/* ── Dashboard Dark Mode Overrides ──────────────────────────── */
/* Base rules use hardcoded white/blue tints for the light Aurora-Cool
   look; these selectors swap in surface tokens for legible dark theme. */

[data-theme="dark"] .dashboard-morning-hero {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 36%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 34%),
    linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: rgba(96, 165, 250, 0.22);
}

[data-theme="dark"] .dashboard-morning-hero__summary {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .dashboard-flow-section {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dashboard-workspace-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dashboard-workspace-card:hover {
  background: var(--color-surface-raised);
  border-color: rgba(77, 138, 255, 0.3);
}

[data-theme="dark"] .dashboard-workspace-card.is-active {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.1) 0%, var(--color-surface) 100%);
  border-color: rgba(77, 138, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(77, 138, 255, 0.2), 0 14px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .dashboard-morning-hero__mini-stat {
  background: var(--color-surface-raised);
}

[data-theme="dark"] .dashboard-flow-section .card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dashboard-flow-section .card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] #dashboard-now-important {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.08) 0%, var(--color-surface) 100%);
  border-color: rgba(77, 138, 255, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] #dashboard-now-important > div:first-child {
  border-bottom-color: rgba(77, 138, 255, 0.16);
}

[data-theme="dark"] #dashboard-now-important .card {
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] #dashboard-now-important .card:hover {
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] #dashboard-next-steps {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
  border-color: rgba(77, 138, 255, 0.18);
}

[data-theme="dark"] #dashboard-next-steps > div:first-child {
  border-bottom-color: rgba(77, 138, 255, 0.12);
}

[data-theme="dark"] #dashboard-next-steps .dashboard-step-list::before {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.28) 0%, rgba(77, 138, 255, 0.08) 100%);
}

[data-theme="dark"] #dashboard-next-steps .dashboard-step-list .card {
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] #dashboard-next-steps .dashboard-step-list .card:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] #dashboard-next-steps .dashboard-step-card__marker {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.22) 0%, rgba(77, 138, 255, 0.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(77, 138, 255, 0.22), 0 6px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #dashboard-in-progress {
  background: linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] #dashboard-in-progress .card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] #dashboard-in-progress .card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .metric-badge {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

/* ── Website Module Dark Mode ──────────────────────────────── */

[data-theme="dark"] .website-panel {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .website-panel--accent {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.1) 0%, var(--color-surface) 100%);
  border-color: rgba(77, 138, 255, 0.22);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .website-panel--info {
  background: var(--color-surface);
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .website-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .website-context-chip {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

/* ── Visibility Module Dark Mode ───────────────────────────── */

[data-theme="dark"] .visibility-panel {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .visibility-panel--accent {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.1) 0%, var(--color-surface) 100%);
  border-color: rgba(77, 138, 255, 0.22);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .visibility-panel--info {
  background: var(--color-surface);
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .visibility-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .visibility-priority-badge--high {
  background: var(--color-accent-red-bg);
  color: var(--color-accent-red);
}

[data-theme="dark"] .visibility-priority-badge--medium {
  background: var(--color-accent-orange-bg);
  color: var(--color-accent-orange);
}

[data-theme="dark"] .visibility-priority-badge--low {
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}

/* ── Local Visibility Module Dark Mode ─────────────────────── */
/* .local-panel itself already uses --color-surface and works as-is.
   Only the hero/accent variants and priority cards have hardcoded
   light backgrounds that need overrides. */

[data-theme="dark"] .local-panel--hero {
  background:
    radial-gradient(circle at top right, rgba(74, 222, 128, 0.12), transparent 32%),
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 28%),
    linear-gradient(180deg, var(--color-surface), var(--color-surface-raised));
  border-color: var(--color-border);
}

[data-theme="dark"] .local-panel--accent {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.08), var(--color-surface));
  border-color: rgba(77, 138, 255, 0.2);
}

[data-theme="dark"] .local-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Competitors Module Dark Mode ──────────────────────────── */

[data-theme="dark"] .competitor-panel {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .competitor-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(77, 138, 255, 0.12), transparent 34%),
    linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] .competitor-panel--accent {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), var(--color-surface));
  border-color: rgba(251, 191, 36, 0.22);
}

[data-theme="dark"] .competitor-panel--info {
  background: var(--color-surface);
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .competitor-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .competitor-toolbar {
  background: linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] .competitor-context-strip {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}

[data-theme="dark"] .competitor-filter-bar {
  background: var(--color-surface);
  border-color: var(--color-border);
}

/* ── Authority Module — Remaining Dark Overrides ──────────── */
/* .authority-panel (+ --hero), .authority-priority-card and
   .authority-foundation-card already live in the dark block above.
   These three variants were missed in the initial pass. */

[data-theme="dark"] .authority-panel--accent {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.1) 0%, var(--color-surface) 100%);
  border-color: rgba(74, 222, 128, 0.22);
}

[data-theme="dark"] .authority-content-error {
  background: var(--color-accent-red-bg);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--color-accent-red);
}

[data-theme="dark"] .authority-foundation-note {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}

/* ── Content Module Dark Mode ──────────────────────────────── */

[data-theme="dark"] .content-panel {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .content-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 34%),
    linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] .content-panel--accent {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.08) 0%, var(--color-surface) 100%);
  border-color: rgba(96, 165, 250, 0.22);
}

[data-theme="dark"] .content-panel--muted {
  background: linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] .content-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Employees Module Dark Mode ────────────────────────────── */

[data-theme="dark"] .employees-panel {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
  border-color: rgba(77, 138, 255, 0.2);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .employees-panel--hero {
  background:
    radial-gradient(circle at top right, rgba(74, 222, 128, 0.12), transparent 32%),
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 28%),
    linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
}

[data-theme="dark"] .employees-panel--accent {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.08) 0%, var(--color-surface) 100%);
}

[data-theme="dark"] .employees-panel--muted {
  background: linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
}

[data-theme="dark"] .employees-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Social Module Dark Mode ───────────────────────────────── */

[data-theme="dark"] .social-panel {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .social-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 34%),
    linear-gradient(180deg, var(--color-surface-raised) 0%, var(--color-surface) 100%);
  border-color: var(--color-border);
}

[data-theme="dark"] .social-panel--accent {
  background: linear-gradient(180deg, rgba(77, 138, 255, 0.08) 0%, var(--color-surface) 100%);
  border-color: rgba(77, 138, 255, 0.22);
}

[data-theme="dark"] .social-priority-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Status Pills (A/B-Tests, CMS-Push) Dark Mode ─────────── */
/* These are amber/red warning tints; the light base uses hex pastels
   so they also need explicit dark variants keyed to accent-bg tokens. */

[data-theme="dark"] .abt-eval-pending {
  background: var(--color-accent-orange-bg);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--color-accent-orange);
}

[data-theme="dark"] .abt-error {
  background: var(--color-accent-red-bg);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--color-accent-red);
}

[data-theme="dark"] .cms-push-draft {
  background: var(--color-accent-orange-bg);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--color-accent-orange);
}

[data-theme="dark"] .cms-push-draft a {
  color: var(--color-accent-orange);
}
