/* =========================================================================
   DrutoScan Design System — Light theme
   Public marketing site — Phase 1 (re-themed)
   Same class names/structure as the dark version, so no HTML changed.
   ========================================================================= */

:root {
  /* ---- Surfaces ---- */
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #eef2f7;
  --surface-3: #e6ecf3;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* ---- Text (WCAG-checked against --bg and --surface) ---- */
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;

  /* ---- Brand accent (decorative / UI only — never used to encode data) ---- */
  --accent: #2563eb;
  --accent-cyan: #3b82f6;
  --accent-soft: #eff6ff;
  --gradient-brand: linear-gradient(100deg, #2563eb 0%, #3b82f6 100%);

  /* ---- Status palette — dot/badge fills (vivid) vs text (darkened for contrast) ---- */
  --status-good: #10b981;
  --status-warning: #f59e0b;
  --status-serious: #f97316;
  --status-critical: #ef4444;
  --status-good-text: #047857;
  --status-warning-text: #b45309;
  --status-critical-text: #dc2626;

  /* ---- Type ---- */
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* ---- Spacing scale ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* ---- Radius ---- */
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

  --container-w: 1180px;
  color-scheme: light;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Type scale ---- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-1); font-weight: 650; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { color: var(--text-2); }
.lede { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--text-2); line-height: 1.65; max-width: 62ch; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
}
.mono-tag::before { content: ""; width: 14px; height: 1px; background: var(--accent); display: inline-block; }

.text-muted { color: var(--text-3); }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Layout ---- */
.container { max-width: var(--container-w); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding-block: var(--sp-9); position: relative; }
.section-tight { padding-block: var(--sp-7); }
.section-head { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 640px; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.stack { display: flex; flex-direction: column; }
.cluster { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: var(--sp-7); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  padding: 13px 24px; border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.34); }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--text-1); }
.btn-secondary:hover { border-color: #93c5fd; background: var(--accent-soft); transform: translateY(-1px); }
.btn-ghost { color: var(--text-2); padding: 13px 10px; }
.btn-ghost:hover { color: var(--text-1); }
.btn-sm { padding: 9px 16px; font-size: 0.84rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---- Badges / pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2);
}
.badge svg { width: 13px; height: 13px; }
.badge-planned { color: var(--status-warning-text); border-color: #fde3b0; background: #fffbeb; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-good { color: var(--status-good-text); } .status-good .status-dot, .status-dot.good { background: var(--status-good); }
.status-warning { color: var(--status-warning-text); } .status-warning .status-dot, .status-dot.warning { background: var(--status-warning); }
.status-critical { color: var(--status-critical-text); } .status-critical .status-dot, .status-dot.critical { background: var(--status-critical); }

/* ---- Panels / cards ---- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.service-card {
  padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4);
}
.service-card:hover { border-color: #cfe0fb; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { margin-top: var(--sp-1); }
.service-card p { font-size: 0.92rem; line-height: 1.6; }
.service-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--sp-3); }
.service-link { font-size: 0.86rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.service-link svg { width: 14px; height: 14px; }

.stat-tile { padding: var(--sp-5); text-align: left; }
.stat-tile .val { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 500; color: var(--text-1); }
.stat-tile .lbl { font-size: 0.78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: var(--sp-1); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.navbar { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--sp-5); }
.logo { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--text-1); }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.32);
}
.logo-mark svg { width: 18px; height: 18px; }

.nav-links { display: flex; align-items: center; gap: var(--sp-6); }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-2); transition: color 0.15s ease; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -26px; height: 2px; background: var(--gradient-brand); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle { display: none; width: 40px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: flex-start; padding: var(--sp-6) var(--sp-5); gap: var(--sp-5); transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a.active::after { display: none; }
  .nav-actions .btn-secondary { display: none; }
  .nav-toggle { display: flex; }
}

/* ---- Hero ---- */
.hero { padding-top: var(--sp-8); padding-bottom: var(--sp-8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -180px; right: -140px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0) 65%);
  filter: blur(4px); z-index: -1;
}
.hero::after {
  content: ""; position: absolute; top: 40px; right: 40px; width: 420px; height: 420px; border-radius: 50%;
  border: 1.5px dashed rgba(37, 99, 235, 0.22); transform: rotate(-10deg); z-index: -1;
}

.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: center; }
.hero-title { margin-top: var(--sp-4); }
.hero-sub { margin-top: var(--sp-4); }
.hero-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.hero-note { margin-top: var(--sp-5); font-size: 0.82rem; color: var(--text-3); }

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

/* ---- Hero orbit visual ---- */
.hero-orbit { position: relative; aspect-ratio: 1 / 0.92; display: grid; place-items: center; }
.orbit-glow { position: absolute; width: 68%; height: 68%; background: radial-gradient(circle, rgba(37,99,235,0.16), rgba(37,99,235,0) 65%); filter: blur(4px); }
.orbit-ring { position: absolute; inset: 6% 4%; border: 1.5px dashed rgba(37,99,235,0.28); border-radius: 50%; transform: rotate(-12deg); }
.orbit-ring.inner { inset: 16% 14%; border-style: solid; border-color: rgba(37,99,235,0.16); }
.orbit-card {
  position: relative; z-index: 2; width: 40%; aspect-ratio: 0.78 / 1; border-radius: 24px;
  background: linear-gradient(170deg, rgba(219,234,254,0.95), rgba(255,255,255,0.9));
  border: 1.5px solid rgba(37,99,235,0.32);
  box-shadow: 0 22px 60px rgba(37,99,235,0.2), inset 0 0 40px rgba(255,255,255,0.7);
  display: grid; place-items: center;
}
.orbit-card svg { width: 46%; height: 46%; color: var(--accent); }
.orbit-badge {
  position: absolute; z-index: 3; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18); color: #fff;
}
.orbit-badge svg { width: 24px; height: 24px; }
.ob-fb { background: #1877f2; top: 4%; left: 47%; }
.ob-x { background: #0f0f10; top: 22%; left: 12%; }
.ob-ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); top: 26%; right: 8%; }
.ob-tt { background: #0f0f10; top: 58%; left: 8%; }
.ob-yt { background: #ff0033; top: 58%; right: 6%; }
.orbit-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); opacity: 0.55; }
@media (max-width: 1024px) { .hero-orbit { max-width: 420px; margin-inline: auto; } }

/* ---- Hero honest-stat row (format matches a metrics row; content is capability claims, not invented numbers) ---- */
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 40px; }
.hero-stat { display: flex; gap: 9px; align-items: flex-start; }
.hero-stat svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.hero-stat b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-1); }
.hero-stat span { font-size: 11.5px; color: var(--text-3); }

/* ---- Content Scanner showcase section ---- */
.ss-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--sp-8); align-items: center; }
.ss-visual { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: start; }
.ss-post-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-md); }
.ss-post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ss-post-head .dp-avatar { width: 30px; height: 30px; font-size: 0.7rem; background: linear-gradient(140deg, #60a5fa, #2563eb); }
.ss-post-head b { font-size: 0.8rem; display: block; }
.ss-post-head span { font-size: 0.65rem; color: var(--text-3); }
.ss-post-img { border-radius: 10px; overflow: hidden; aspect-ratio: 16/11; }
.ss-post-card > p { font-size: 0.8rem; margin-top: 12px; color: var(--text-2); }
.ss-risk-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-md); margin-top: 26px; }
.ss-risk-card .mono-tag { font-size: 0.62rem; margin-bottom: 10px; }
.ss-score { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0; color: var(--text-1); }
.ss-score i { font-style: normal; font-size: 0.85rem; color: var(--text-3); font-weight: 500; }
.ss-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 14px; }
.ss-bar span { display: block; height: 100%; border-radius: 99px; background: var(--gradient-brand); }
.ss-risk-list { display: grid; gap: 9px; }
.ss-risk-list li { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--text-2); }
.ss-risk-list b { font-weight: 600; font-size: 0.72rem; }
.ss-risk-list b.low { color: var(--status-good-text); }
.ss-risk-list b.med { color: var(--status-warning-text); }
.ss-rec { margin-top: 14px; background: var(--surface); border-radius: 9px; padding: 10px 11px; }
.ss-rec b { font-size: 0.68rem; display: block; margin-bottom: 2px; }
.ss-rec p { font-size: 0.66rem; color: var(--text-3); line-height: 1.45; margin: 0; }
.ss-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: var(--sp-6) 0; }
.ss-chip { text-align: center; }
.ss-chip .service-icon { width: 44px; height: 44px; margin: 0 auto 9px; }
.ss-chip .service-icon svg { width: 20px; height: 20px; }
.ss-chip span { font-size: 0.72rem; font-weight: 600; color: var(--text-2); }
@media (max-width: 1024px) { .ss-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }
@media (max-width: 640px) { .ss-visual, .ss-chips { grid-template-columns: 1fr 1fr; } }

/* ---- "One Dashboard" showcase section ---- */
.dp-grid { display: grid; grid-template-columns: 0.82fr 1.4fr; gap: var(--sp-8); align-items: center; }
.dp-check-list { margin: var(--sp-6) 0 var(--sp-6); display: grid; gap: var(--sp-3); }
.dp-check-list li { display: flex; align-items: center; gap: 11px; font-size: 0.94rem; font-weight: 500; color: var(--text-1); }
.dp-check-list .tick { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.dp-check-list .tick svg { width: 11px; height: 11px; color: #fff; }

.dp-mock { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.dp-mock-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.dp-mock-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.03em; }
.dp-mock-brand .mark { width: 20px; height: 20px; border-radius: 6px; background: var(--gradient-brand); display: grid; place-items: center; color: #fff; }
.dp-mock-brand .mark svg { width: 12px; height: 12px; }
.dp-mock-user { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--text-3); }
.dp-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(140deg, #fbbf24, #f97316); display: grid; place-items: center; color: #fff; font-size: 0.6rem; font-weight: 700; }
.dp-badge-row { padding: 12px 18px 0; }
.dp-mock-body { display: grid; grid-template-columns: 148px 1fr; min-height: 320px; }
.dp-side { border-right: 1px solid var(--line); padding: 12px 8px; background: var(--surface); }
.dp-side a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 0.72rem; color: var(--text-3); font-weight: 500; }
.dp-side a svg { width: 13px; height: 13px; flex-shrink: 0; }
.dp-side a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dp-main { padding: 16px; }
.dp-main h4 { font-size: 0.82rem; margin-bottom: 12px; }
.dp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dp-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.dp-kpi span { font-size: 0.6rem; color: var(--text-3); display: block; text-transform: uppercase; letter-spacing: 0.04em; }
.dp-kpi b { font-family: var(--font-mono); font-size: 1rem; letter-spacing: -0.01em; display: block; margin: 3px 0 1px; }
.dp-kpi em { font-style: normal; font-size: 0.6rem; color: var(--text-3); font-weight: 500; }
.dp-row { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; margin-top: 12px; }
.dp-panel { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.dp-panel h5 { margin: 0 0 8px; font-size: 0.7rem; font-weight: 600; }
.dp-chart { width: 100%; height: 100px; }
.dp-activity { display: grid; gap: 9px; }
.dp-activity li { display: flex; align-items: center; gap: 9px; }
.dp-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dp-dot svg { width: 9px; height: 9px; }
.dp-activity b { font-size: 0.68rem; font-weight: 600; display: block; }
.dp-activity span { font-size: 0.6rem; color: var(--text-3); }
@media (max-width: 1024px) { .dp-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }
@media (max-width: 640px) { .dp-mock-body { grid-template-columns: 1fr; } .dp-side { display: none; } .dp-row, .dp-kpis { grid-template-columns: 1fr 1fr; } }

/* ---- Dashboard preview mock (hero, legacy — unused, kept for potential reuse) ---- */
.dash-mock { padding: var(--sp-5); box-shadow: var(--shadow-lg); }
.dash-mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.dash-mock-head .dots { display: flex; gap: 6px; }
.dash-mock-head .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.dash-mock-title { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.dash-score { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.dash-score .num { font-family: var(--font-mono); font-size: 2.6rem; color: var(--text-1); font-weight: 600; }
.dash-score .of { font-family: var(--font-mono); color: var(--text-3); font-size: 1rem; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.dash-item { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--sp-4); background: var(--surface); }
.dash-item .lbl { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-2); }
.dash-item .row { display: flex; align-items: center; justify-content: space-between; }
.dash-item .row strong { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; }
.dash-bar { height: 4px; border-radius: var(--radius-pill); background: var(--line); margin-top: var(--sp-3); overflow: hidden; }
.dash-bar span { display: block; height: 100%; border-radius: var(--radius-pill); }
.dash-foot { margin-top: var(--sp-4); font-size: 0.74rem; color: var(--text-3); font-family: var(--font-mono); display: flex; align-items: center; gap: 6px; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-good); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4);} 50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(16,185,129,0);} }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }

/* ---- Platform strip ---- */
.platform-strip { padding-block: var(--sp-6); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.platform-strip-inner { display: flex; align-items: center; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; }
.platform-strip-inner .p-item { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.88rem; font-weight: 600; }
.platform-strip-inner svg { width: 18px; height: 18px; color: var(--text-3); }
.platform-note { text-align: center; font-size: 0.76rem; color: var(--text-3); margin-top: var(--sp-4); }

/* ---- Loop / steps (Discover -> Analyze -> Protect -> Act) ---- */
.loop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); position: relative; }
.loop-step { padding: var(--sp-5); }
.loop-step .idx { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.loop-step h3 { margin-top: var(--sp-3); margin-bottom: var(--sp-3); }
.loop-step ul { display: flex; flex-direction: column; gap: 8px; }
.loop-step li { font-size: 0.86rem; color: var(--text-2); padding-left: 16px; position: relative; }
.loop-step li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 1px; background: var(--text-3); }
@media (min-width: 1025px) {
  .loop-grid::before {
    content: ""; position: absolute; top: 38px; left: 12%; right: 12%; height: 2px;
    background: linear-gradient(90deg, #bfdbfe, #93c5fd);
  }
}
@media (max-width: 1024px) { .loop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .loop-grid { grid-template-columns: 1fr; } }

/* ---- Numbered process (How it works) ---- */
.process-list { display: flex; flex-direction: column; }
.process-item { display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-5); padding-block: var(--sp-6); border-top: 1px solid var(--line); }
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-item .idx { font-family: var(--font-mono); font-size: 1.4rem; color: var(--line-strong); font-weight: 600; }
.process-item h3 { margin-bottom: var(--sp-2); }
.process-item p { max-width: 60ch; }
@media (max-width: 640px) { .process-item { grid-template-columns: 40px 1fr; } .process-item .idx { font-size: 1.1rem; } }

/* ---- Use cases ---- */
.usecase-card { padding: var(--sp-5); }
.usecase-card .role { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: var(--sp-3); font-weight: 600; }
.usecase-card p { font-size: 0.94rem; }

.pricing-card { display: flex; flex-direction: column; padding: var(--sp-6); text-align: center; }
.pricing-card h3 { margin-bottom: 4px; }
.pricing-card .pricing-tagline { font-size: 0.86rem; color: var(--text-3); }
.pricing-card .pricing-price { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; color: var(--accent); margin: var(--sp-4) 0; }
.pricing-card .icon-list { text-align: left; flex: 1; margin-bottom: var(--sp-5); }

/* --- Social Publisher --- */
.social-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.social-cal-daylabel { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); text-align: center; padding-bottom: 6px; }
.social-cal-day { min-height: 86px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; background: var(--surface); }
.social-cal-day.other-month { opacity: 0.4; }
.social-cal-day.today { border-color: var(--accent); border-width: 2px; }
.social-cal-daynum { font-size: 0.76rem; color: var(--text-3); font-weight: 600; }
.social-cal-post { margin-top: 4px; padding: 3px 6px; border-radius: 4px; font-size: 0.7rem; background: var(--accent-soft); color: var(--accent); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .social-cal-day { min-height: 54px; } .social-cal-daynum { font-size: 0.68rem; } .social-cal-post { font-size: 0.62rem; } }

.social-platform-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 0.86rem; cursor: pointer; background: #fff; }
.social-platform-chip input { margin: 0; }
.social-platform-chip.checked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.social-platform-chip svg, .social-platform-chip .sp-icon { width: 16px; height: 16px; flex-shrink: 0; }
.sp-preview-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 0.84rem; cursor: pointer; background: var(--panel-bg, #fff); color: var(--text-2); }
.sp-preview-tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sp-preview-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--sp-4); }
.sp-preview-media { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 8px; background: var(--surface); }
.social-account-card { padding: var(--sp-5); }
.social-media-tile { padding: var(--sp-4); text-align: center; }
.social-media-tile .thumb { width: 100%; aspect-ratio: 1; background: var(--surface); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-3); margin-bottom: 8px; overflow: hidden; }
.social-media-tile .thumb img, .social-media-tile .thumb video { width: 100%; height: 100%; object-fit: cover; }

/* ---- FAQ accordion ---- */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item { padding: var(--sp-4) var(--sp-5); cursor: pointer; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); font-weight: 600; font-family: var(--font-display); }
.faq-q svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; transition: transform 0.2s ease; }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; font-size: 0.92rem; }
.faq-item.open .faq-a { max-height: 300px; margin-top: var(--sp-3); }

/* ---- CTA band ---- */
.cta-band { padding: var(--sp-9) 0; text-align: center; position: relative; }
.cta-panel {
  padding: var(--sp-8) var(--sp-6); text-align: center;
  background: linear-gradient(115deg, #0b1739, #15265f 55%, #0d1c45);
  border: none; box-shadow: var(--shadow-lg); color: #fff;
}
.cta-panel h2 { max-width: 640px; margin-inline: auto; color: #fff; }
.cta-panel .lede { margin-inline: auto; text-align: center; color: #c3cee6; }
.cta-panel .mono-tag { color: #93c5fd; }
.cta-panel .mono-tag::before { background: #93c5fd; }
.cta-actions { display: flex; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-6); flex-wrap: wrap; }
.cta-panel .btn-secondary { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: #fff; }
.cta-panel .btn-secondary:hover { background: rgba(255,255,255,0.16); }

/* ---- Forms ---- */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.84rem; font-weight: 600; color: var(--text-1); }
.form-label .opt { font-weight: 400; color: var(--text-3); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 13px 14px; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text-1); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.84rem; color: var(--text-2); }
.form-check input { margin-top: 3px; }
.form-hint { font-size: 0.78rem; color: var(--text-3); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-msg { display: none; padding: var(--sp-4); border-radius: var(--radius-sm); font-size: 0.88rem; margin-top: var(--sp-4); }
.form-msg.show { display: block; }
.form-msg.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }

/* ---- Content pages (legal / about / etc.) ---- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--sp-8); margin-bottom: var(--sp-3); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--sp-6); margin-bottom: var(--sp-2); font-size: 1.05rem; }
.prose p, .prose li { margin-bottom: var(--sp-3); font-size: 0.96rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.page-hero { padding-top: var(--sp-8); padding-bottom: var(--sp-7); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .mono-tag { margin-bottom: var(--sp-4); }
.updated-note { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-3); margin-top: var(--sp-3); }

/* ---- Limitations / callout box ---- */
.callout { border: 1px solid #fde3b0; border-left: 3px solid var(--status-warning); border-radius: var(--radius-md); padding: var(--sp-4) var(--sp-5); background: #fffbeb; }
.callout strong { color: var(--text-1); }
.callout p { font-size: 0.9rem; margin: 0; color: var(--text-2); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding-top: var(--sp-8); padding-bottom: var(--sp-6); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); padding-bottom: var(--sp-7); }
.footer-brand p { margin-top: var(--sp-3); font-size: 0.88rem; max-width: 32ch; }
.footer-title { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: var(--sp-4); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.88rem; color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; margin-top: var(--sp-4); }
.footer-contact a { font-size: 0.86rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.footer-contact svg { width: 15px; height: 15px; color: var(--text-3); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-3); flex-wrap: wrap; gap: var(--sp-3); }
.footer-disclaimer { font-size: 0.76rem; color: var(--text-3); max-width: 70ch; margin-top: var(--sp-4); line-height: 1.6; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---- Reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Misc ---- */
.divider { height: 1px; background: var(--line); border: none; }
.icon-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.icon-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--text-2); }
.icon-list svg { width: 16px; height: 16px; color: var(--status-good-text); margin-top: 2px; flex-shrink: 0; }
.kv-list dt { font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.kv-list dd { font-size: 0.92rem; color: var(--text-2); }

/* =========================================================================
   App shell — authenticated dashboard (customer app / admin)
   ========================================================================= */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--surface); }
/* Hidden by default at every viewport width — only ever shown (via .open, added
   in the mobile media query below) when the mobile drawer is actually open.
   Without this base rule, the empty <div> defaults to display:block and becomes
   an unintended third grid item on desktop, pushing .app-sidebar and .app-main
   out of their intended 240px/1fr columns — this is the "blank dashboard" bug. */
.app-drawer-scrim { display: none; }
.app-sidebar { background: #fff; border-right: 1px solid var(--line); padding: var(--sp-5) var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-sidebar .logo { padding: 0 var(--sp-3); margin-bottom: var(--sp-6); }
.app-nav-group { margin-top: var(--sp-4); }
.app-nav-group:first-child { margin-top: 0; }
.app-nav-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); padding: 0 var(--sp-3); margin-bottom: var(--sp-2); }
.app-nav a, .app-nav button.app-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--text-2); cursor: pointer; width: 100%; text-align: left; border: 0; background: none;
}
.app-nav a svg, .app-nav button.app-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-3); }
.app-nav a:hover, .app-nav button.app-nav-item:hover { background: var(--surface); color: var(--text-1); }
.app-nav a.active, .app-nav button.app-nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-nav a.active svg, .app-nav button.app-nav-item.active svg { color: var(--accent); }
.app-nav button.app-nav-item.locked { opacity: 0.55; cursor: not-allowed; }
.app-nav button.app-nav-item.locked svg:last-child { color: var(--text-3); }
.app-nav-item.app-nav-parent { color: var(--text-1); font-weight: 600; cursor: default; }
.app-nav-item.app-nav-subitem { padding-left: 34px; font-size: 0.84rem; }
.app-nav-item.app-nav-subitem svg { width: 15px; height: 15px; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-6); position: sticky; top: 0; z-index: 20; }
.app-topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.app-user { display: flex; align-items: center; gap: var(--sp-3); font-size: 0.86rem; color: var(--text-2); }
.app-user .role-badge { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); }
.app-content { padding: var(--sp-6); flex: 1; }
.app-drawer-toggle { display: none; }

.app-section { display: none; }
.app-section.active { display: block; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.stat-card .lbl { font-size: 0.76rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card .val { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; color: var(--text-1); margin-top: 6px; }

.data-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 14px 18px; background: var(--surface); font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-1); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); }
.status-pill.new, .status-pill.under-review, .status-pill.assigned-to-expert, .status-pill.assigned { background: var(--accent-soft); color: var(--accent); }
.status-pill.in-progress, .status-pill.waiting-for-user, .status-pill.waiting-for-platform, .status-pill.submitted-to-platform { background: #fffbeb; color: var(--status-warning-text); }
.status-pill.resolved, .status-pill.closed, .status-pill.approved { background: #ecfdf5; color: var(--status-good-text); }
.status-pill.rejected, .status-pill.action-required-from-customer, .status-pill.additional-information-required, .status-pill.action-required { background: #fef2f2; color: var(--status-critical-text); }
.status-pill.pending { background: var(--surface); color: var(--text-2); }

.empty-panel { text-align: center; padding: var(--sp-8) var(--sp-6); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-panel .service-icon { margin: 0 auto var(--sp-4); }
.empty-panel h3 { margin-bottom: var(--sp-2); }
.empty-panel p { max-width: 46ch; margin-inline: auto; }
.empty-panel .badge-planned { margin-top: var(--sp-4); }
.empty-panel.empty-panel-sm { padding: var(--sp-6) var(--sp-4); }

/* ---- Dashboard redesign: metric cards ---- */
.metric-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.metric-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.metric-icon svg { width: 20px; height: 20px; }
.metric-icon.blue { background: var(--accent-soft); color: var(--accent); }
.metric-icon.green { background: #ecfdf5; color: var(--status-good-text); }
.metric-icon.purple { background: #f5f3ff; color: #7c3aed; }
.metric-icon.orange { background: #fffbeb; color: var(--status-warning-text); }
.metric-icon.teal { background: #ecfeff; color: #0e7490; }
.metric-title { font-size: 0.82rem; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.metric-value { font-family: var(--font-mono); font-size: 1.85rem; font-weight: 700; color: var(--text-1); line-height: 1.1; }
.metric-desc { font-size: 0.74rem; color: var(--text-3); margin-top: 3px; }
.metric-spark { width: 100%; height: 32px; margin-top: 10px; display: block; }

/* ---- Overview grid layout ---- */
.ov-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--sp-5); align-items: start; }
.ov-left { display: grid; gap: var(--sp-5); min-width: 0; }
.ov-top-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-5); align-items: start; }
.ov-right { display: grid; gap: var(--sp-5); align-content: start; }
@media (max-width: 1180px) { .ov-grid { grid-template-columns: 1fr; } .ov-right { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .ov-top-row { grid-template-columns: 1fr; } .ov-right { grid-template-columns: 1fr; } }
@media (max-width: 1300px) { .metric-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .metric-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .metric-row { grid-template-columns: 1fr; } }

/* ---- Quick actions ---- */
.quick-actions { display: grid; gap: 8px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: #fff; text-align: left; width: 100%; transition: background 0.15s ease, border-color 0.15s ease;
}
.quick-action:hover { background: var(--surface); border-color: var(--line-strong); }
.quick-action strong { display: block; font-size: 0.86rem; color: var(--text-1); }
.quick-action small { display: block; font-size: 0.74rem; color: var(--text-3); margin-top: 1px; }
.quick-action-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; }
.quick-action-icon svg { width: 16px; height: 16px; }
.quick-action-primary { background: var(--accent); border-color: var(--accent); }
.quick-action-primary strong, .quick-action-primary small { color: #fff; }
.quick-action-primary small { color: rgba(255,255,255,0.8); }
.quick-action-primary .quick-action-icon { background: rgba(255,255,255,0.18); color: #fff; }
.quick-action-primary:hover { background: #1d4ed8; }

/* ---- Guidelines ---- */
.guideline-list { display: grid; gap: var(--sp-4); }
.guideline-item { display: flex; gap: 12px; align-items: flex-start; }
.guideline-item svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.guideline-item strong { display: block; font-size: 0.84rem; color: var(--text-1); }
.guideline-item span { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 1px; }

/* ---- Cases Overview donut chart ---- */
.donut-wrap { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.donut-legend { display: grid; gap: 9px; flex: 1; min-width: 160px; }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.82rem; }
.donut-legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.donut-legend-value { color: var(--text-1); font-weight: 600; font-family: var(--font-mono); font-size: 0.8rem; }
.donut-center-total { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; fill: var(--text-1); }
.donut-center-label { font-size: 0.62rem; fill: var(--text-3); letter-spacing: 0.04em; }
.donut-avg { margin-top: var(--sp-4); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--accent); }
.donut-avg svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---- Sidebar footer / Need Help card ---- */
.app-sidebar { display: flex; flex-direction: column; }
.app-nav { flex: 1; }
.app-sidebar-footer { padding: var(--sp-3); }
.help-card { background: var(--accent-soft); border-radius: var(--radius-md); padding: var(--sp-4); }
.help-card-icon { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; }
.help-card-icon svg { width: 16px; height: 16px; }
.help-card h4 { font-size: 0.86rem; margin-bottom: 4px; }
.help-card p { font-size: 0.76rem; color: var(--text-2); margin-bottom: 12px; line-height: 1.4; }

/* ---- Topbar: welcome subtitle, bell, avatar, user menu ---- */
.app-topbar-subtitle { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--line); background: #fff; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--status-critical); color: #fff; font-size: 0.62rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.nav-badge {
  margin-left: auto; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--status-critical); color: #fff; font-size: 0.62rem; font-weight: 700; display: grid; place-items: center;
}
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: grid; place-items: center; font-size: 0.76rem; font-weight: 700; flex-shrink: 0; }
.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--radius-sm); }
.user-menu-trigger:hover { background: var(--surface); }
.user-menu-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.user-menu-text #userEmail { font-size: 0.82rem; font-weight: 600; color: var(--text-1); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-sub { font-size: 0.7rem; color: var(--text-3); }
.user-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 170px; padding: 6px; z-index: 50;
}
.user-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 0.86rem; color: var(--text-2); text-align: left;
}
.user-menu-item:hover { background: var(--surface); color: var(--text-1); }
.user-menu-item svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  .app-user .badge#planBadge { display: none !important; }
  .user-menu-text { display: none; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 200; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .app-sidebar.open { transform: translateX(0); }
  .app-drawer-toggle { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
  .app-drawer-scrim { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 150; }
  .app-drawer-scrim.open { display: block; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .app-content { padding: var(--sp-4); }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .data-table-wrap { overflow-x: auto; }
  .data-table { min-width: 560px; }
}
