/* BrandRadar — Design System
   Palette : fond charbon très sombre, accent bleu acier + ambre secondaire
   Même famille que PhishRadar mais identité visuelle propre.
*/

:root {
  --bg-primary:    #08090c;
  --bg-secondary:  #0d0f14;
  --bg-card:       #12141a;
  --bg-card-hover: #181b24;
  --border:        rgba(99,120,170,.18);
  --border-hover:  rgba(99,120,170,.35);

  /* Accent principal : bleu acier */
  --accent:        #4f8ef7;
  --accent-hover:  #6ba3ff;
  --accent-dim:    rgba(79,142,247,.15);

  /* Accent secondaire : ambre (hérité PhishRadar, utilisé pour alertes/score) */
  --amber:         #f59e0b;
  --amber-dim:     rgba(245,158,11,.15);

  /* Status */
  --danger:        #ef4444;
  --danger-dim:    rgba(239,68,68,.12);
  --success:       #22c55e;
  --success-dim:   rgba(34,197,94,.12);
  --warning:       #f59e0b;
  --warning-dim:   rgba(245,158,11,.12);

  --text-primary:   #eef0f5;
  --text-secondary: #8b95aa;
  --text-muted:     #4a5268;

  --font-sans:    'Inter', system-ui, sans-serif;
  --font-heading: 'Bebas Neue', 'Syne', 'Inter', sans-serif;
  --font-mono:    'DM Mono', 'Consolas', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,.45);
  --radius: 12px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: rgba(8,9,12,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
  max-width: 1400px;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 700; color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: .06em;
}

.navbar-brand svg { color: var(--accent); }
.navbar-brand .brand-word { color: var(--text-primary); transition: color .15s; }
.navbar-brand .accent-word { color: var(--accent); }
.navbar-brand:hover .brand-word { color: #3a7de0; }

.navbar-links { display: flex; align-items: center; gap: 1.5rem; }
.navbar-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: color .15s; }
.navbar-links a:hover, .navbar-links a.active { color: var(--text-primary); }

.lang-switcher {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lang-switcher:hover { border-color: var(--accent); color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 0 16px rgba(79,142,247,.35); }

.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn-outline:hover:not(:disabled) { background: var(--accent-dim); }

.btn-danger {
  background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.22); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: none; border: none; color: var(--text-secondary); cursor: pointer; }
.btn-ghost:hover { color: var(--text-primary); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card:hover { border-color: var(--border-hover); }

/* ── Hero section ───────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(79,142,247,.12) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); border: 1px solid rgba(79,142,247,.3);
  color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 1.5rem;
  text-transform: uppercase; letter-spacing: .05em;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.02em; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 2rem;
}

.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Radar animation */
.radar-wrap {
  position: relative; width: 200px; height: 200px;
  margin: 3rem auto 0;
}
.radar-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(79,142,247,.25);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.radar-ring:nth-child(1) { width: 60px; height: 60px; }
.radar-ring:nth-child(2) { width: 110px; height: 110px; }
.radar-ring:nth-child(3) { width: 160px; height: 160px; }
.radar-ring:nth-child(4) { width: 200px; height: 200px; border-color: rgba(79,142,247,.12); }
.radar-sweep {
  position: absolute; width: 100px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
  top: 50%; left: 50%; transform-origin: left center;
  animation: sweep 3s linear infinite;
  border-radius: 2px;
}
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.radar-dot {
  position: absolute; width: 6px; height: 6px;
  background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
  animation: blink 1.5s ease-in-out infinite;
}
.radar-dot:nth-child(5) { top: 28%; left: 62%; animation-delay: .3s; }
.radar-dot:nth-child(6) { top: 55%; left: 75%; animation-delay: .9s; }
.radar-dot:nth-child(7) { top: 70%; left: 35%; animation-delay: 1.5s; }
@keyframes blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ── Features grid ──────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid rgba(79,142,247,.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 1rem;
}

.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: .5rem; }
.feature-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem; max-width: 860px; margin: 0 auto;
}

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

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex; flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--bg-card) 70%, rgba(79,142,247,.08));
  box-shadow: 0 0 40px rgba(79,142,247,.15);
}

.pricing-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--accent); color: #fff;
  padding: 2px 10px; border-radius: 99px; margin-bottom: .75rem;
  text-transform: uppercase; letter-spacing: .05em; align-self: flex-start;
}

.pricing-name { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .5rem; }
.pricing-price {
  display: flex; align-items: flex-start; gap: 2px;
  line-height: 1; margin-bottom: .25rem;
}
.pricing-price .price-currency {
  font-size: 1.2rem; font-weight: 700; color: var(--text-secondary); padding-top: 5px;
}
.pricing-price .price-amount {
  font-size: 2.8rem; font-weight: 800; color: var(--text-primary); line-height: 1;
}
.pricing-price .price-custom {
  font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1; align-self: center;
}
.pricing-period { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }

.pricing-features { list-style: none; flex: 1; margin-bottom: 1.5rem; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13.5px; padding: .5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .check { color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
/* Brand selector bar (replaces sidebar) */
.brand-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: .6rem .9rem;
}

/* Legacy — kept for reference, no longer used for layout */
.dashboard-layout {
  padding: 1.5rem; max-width: 1400px; margin: 0 auto;
}
.sidebar { display: none; }

.brand-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.brand-item:hover, .brand-item.active {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.brand-item.active { border-left: 3px solid var(--accent); }

.brand-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.brand-item-meta { font-size: 12px; color: var(--text-muted); }
.brand-item-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--danger-dim); color: var(--danger);
  padding: 1px 7px; border-radius: 99px; margin-left: 6px;
}

.main-panel { display: flex; flex-direction: column; gap: 1rem; }

/* Stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Domains table */
.domains-table-wrap { overflow-x: auto; max-width: 100%; }
.domains-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  table-layout: fixed;
}
.domains-table th {
  text-align: left; padding: .6rem .75rem;
  color: var(--text-muted); font-weight: 500; font-size: 11.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; user-select: none;
}
.domains-table th.sortable { cursor: pointer; }
.domains-table th.sortable:hover { color: var(--text-primary); }
.domains-table th.sort-asc::after  { content: ' ↑'; color: var(--accent); }
.domains-table th.sort-desc::after { content: ' ↓'; color: var(--accent); }
/* Compact column widths (no overflow) */
.domains-table .col-risk_score   { width: 64px; }
.domains-table .col-score        { width: 64px; }
.domains-table .col-domain       { min-width: 160px; }
.domains-table .col-first_seen   { width: 120px; }
.domains-table .col-date         { width: 120px; }
.domains-table .col-discovery_source { width: 90px; }
.domains-table .col-source       { width: 90px; }
.domains-table .col-status       { width: 100px; }
.domains-table .col-toggle       { width: 44px; text-align: center; }
.domains-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.domains-table tr.domain-row { cursor: pointer; }
.domains-table tr.domain-row:hover td { background: var(--bg-card-hover); }
.domains-table tr.detail-row td {
  padding: 0; background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
}

.risk-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; font-family: var(--font-mono);
}
.risk-critical { background: rgba(239,68,68,.15); color: #f87171; }
.risk-high     { background: rgba(245,158,11,.15); color: #fbbf24; }
.risk-medium   { background: rgba(234,179,8,.12); color: #facc15; }
.risk-low      { background: rgba(34,197,94,.12); color: #4ade80; }

.status-pill {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
}
.status-new          { background: var(--accent-dim); color: var(--accent); }
.status-confirmed    { background: var(--warning-dim); color: var(--warning); }
.status-dismissed    { background: rgba(255,255,255,.06); color: var(--text-muted); }
.status-takedown_sent { background: rgba(168,85,247,.15); color: #c084fc; }
.status-taken_down   { background: var(--success-dim); color: var(--success); }

.source-badge {
  font-size: 11px; font-weight: 600; font-family: var(--font-mono);
  background: rgba(255,255,255,.06); color: var(--text-secondary);
  padding: 1px 6px; border-radius: 4px;
}
.source-ct_log { background: rgba(79,142,247,.12); color: var(--accent); }

.mx-badge {
  font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px;
}
.mx-yes { background: var(--danger-dim); color: var(--danger); }
.mx-no  { color: var(--text-muted); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-size: 14px;
  transition: border-color .15s;
  font-family: var(--font-sans);
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control { cursor: pointer; }

/* ── Login page ─────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(79,142,247,.08) 0%, transparent 70%);
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.login-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 2rem; font-size: 1.2rem; font-weight: 700;
}
.login-logo svg { color: var(--accent); }
.login-error {
  background: var(--danger-dim); border: 1px solid rgba(239,68,68,.25);
  color: var(--danger); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 1rem; display: none;
}
.login-toggle { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 1.5rem; }

/* ── Section helpers ────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-secondary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800;
  letter-spacing: -.02em; margin-bottom: .5rem;
}
.section-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 2.5rem; }
.text-center { text-align: center; }

/* ── Alerts / Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: .875rem 1.25rem;
  font-size: 13.5px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(calc(100% + 32px));
  transition: transform .3s ease, opacity .3s ease;
  max-width: 340px; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast.success { border-color: rgba(34,197,94,.4); }
.toast.error   { border-color: rgba(239,68,68,.4); }

/* ── Loader ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted); font-size: 14px;
}
.empty-state svg { margin-bottom: 1rem; opacity: .4; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .navbar-links { gap: .75rem; }
  .hero h1 { font-size: 1.75rem; }
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

/* ── Feature cards 3D ───────────────────────────────────────────────────── */
.features-grid {
  perspective: 1200px;
}
.feature-card {
  transform-style: preserve-3d;
  transition: transform .25s ease, border-color .2s, box-shadow .25s;
  will-change: transform;
}
.feature-card:hover {
  border-color: rgba(79,142,247,.55);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(79,142,247,.15);
  transform: translateY(-4px);
}
.feature-card.tilt {
  transition: none;
}

/* ── Radar amélioré ─────────────────────────────────────────────────────── */
.radar-wrap {
  position: relative; width: 240px; height: 240px;
  margin: 3.5rem auto 0;
  filter: drop-shadow(0 0 24px rgba(79,142,247,.18));
}
.radar-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(79,142,247,.2);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: radar-pulse 4s ease-in-out infinite;
}
.radar-ring:nth-child(1) { width: 52px;  height: 52px;  animation-delay: 0s; }
.radar-ring:nth-child(2) { width: 104px; height: 104px; animation-delay: .5s; }
.radar-ring:nth-child(3) { width: 160px; height: 160px; animation-delay: 1s; }
.radar-ring:nth-child(4) { width: 220px; height: 220px; animation-delay: 1.5s; border-color: rgba(79,142,247,.1); }
@keyframes radar-pulse {
  0%,100% { border-color: rgba(79,142,247,.15); }
  50%      { border-color: rgba(79,142,247,.35); }
}
.radar-sweep {
  position: absolute; width: 120px; height: 2px;
  top: 50%; left: 50%; transform-origin: 0 50%;
  animation: sweep 3.5s linear infinite;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(79,142,247,.8), transparent);
}
.radar-sweep::after {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(from -30deg at 0 50%, rgba(79,142,247,.25), transparent 50deg);
  transform-origin: 0 50%;
  width: 240px; height: 240px;
  top: -120px; left: 0;
  border-radius: 50%;
  pointer-events: none;
}
@keyframes sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.radar-center {
  position: absolute; width: 10px; height: 10px;
  background: var(--accent); border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  box-shadow: 0 0 12px var(--accent);
}
.radar-dot {
  position: absolute; width: 7px; height: 7px;
  background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 10px var(--amber), 0 0 20px rgba(245,158,11,.4);
  animation: dot-blink 2s ease-in-out infinite;
}
.radar-dot:nth-child(5) { top: 26%; left: 64%; animation-delay: .2s; }
.radar-dot:nth-child(6) { top: 58%; left: 76%; animation-delay: .8s; }
.radar-dot:nth-child(7) { top: 72%; left: 33%; animation-delay: 1.4s; }
.radar-dot:nth-child(8) { top: 38%; left: 22%; animation-delay: 2.1s; width: 5px; height: 5px; background: var(--danger); box-shadow: 0 0 8px var(--danger); }
@keyframes dot-blink {
  0%,100% { opacity: .25; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.3); }
}

/* ── Stats cards index (effet 3D) ───────────────────────────────────────── */
.stats-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.stat-index-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .25s, transform .25s;
  transform-style: preserve-3d;
  will-change: transform;
}
.stat-index-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(79,142,247,.1), transparent);
  opacity: 0; transition: opacity .25s;
}
.stat-index-card:hover { border-color: rgba(79,142,247,.4); box-shadow: 0 8px 32px rgba(0,0,0,.35); transform: translateY(-3px); }
.stat-index-card:hover::before { opacity: 1; }
.stat-index-number { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-index-label { font-size: 13px; color: var(--text-secondary); margin-top: .5rem; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Constellation background ──────────────────────────────────────────── */
#constellation-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}
/* All content sits above the constellation canvas */
.navbar, .dashboard-layout, .hero, .section, .section-alt,
.login-wrap, footer { position: relative; z-index: 1; }

/* ── Dashboard tabs ─────────────────────────────────────────────────────── */
.dash-tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.dash-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-muted); font-size: 13px; font-weight: 500; padding: .6rem 1.25rem .75rem; cursor: pointer; transition: color .15s, border-color .15s; }
.dash-tab:hover { color: var(--text-primary); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Notification settings modal tabs ──────────────────────────────────── */
.modal-tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: -.25rem 0 1.25rem; }
.modal-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-muted); font-size: 13px; font-weight: 500; padding: .5rem 1.1rem .65rem; cursor: pointer; transition: color .15s, border-color .15s; }
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Legal page ─────────────────────────────────────────────────────────── */
.legal-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  padding: .5rem 1rem .75rem; cursor: pointer; transition: color .15s, border-color .15s;
}
.legal-tab:hover { color: var(--text-primary); }
.legal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.legal-content h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .25rem; }
.legal-content h3 { font-size: .95rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: var(--text-secondary); }
.legal-content p, .legal-content li { font-size: 14px; color: var(--text-secondary); line-height: 1.75; }
.legal-content ul { padding-left: 1.25rem; margin-bottom: .75rem; }
.legal-date { font-size: 12px; color: var(--text-muted); margin-bottom: 1.5rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: .75rem 0 1rem; font-size: 13px; }
.legal-table th { text-align: left; padding: .5rem .75rem; background: var(--bg-secondary); color: var(--text-muted); font-weight: 500; }
.legal-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }

/* ── Tickets page ───────────────────────────────────────────────────────── */
.ticket-list { display: flex; flex-direction: column; gap: .75rem; }
.ticket-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ticket-item:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.ticket-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .25rem; }
.ticket-ref { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.ticket-subject { font-size: 14px; font-weight: 600; }
.ticket-meta { font-size: 11.5px; color: var(--text-muted); }
.ticket-message {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: .75rem 1rem; font-size: 13.5px;
  line-height: 1.6; color: var(--text-secondary); white-space: pre-wrap;
}
.ticket-message.from-admin { border-left: 3px solid var(--accent); background: var(--accent-dim); }
.ticket-message.from-user  { border-left: 3px solid var(--border-hover); }
.priority-low      { color: var(--success); }
.priority-medium   { color: var(--warning); }
.priority-high, .priority-critical { color: var(--danger); }
