/* ── Sentinel Design System ─────────────────────────────── */
:root {
  --bg:           #ffffff;
  --surface:      #f8faff;
  --surface-2:    #f0f5ff;
  --border:       #e4ecff;
  --border-hover: #c7d5ff;

  --primary:      #1a6fff;
  --primary-dark: #1557d4;
  --primary-soft: rgba(26,111,255,.08);
  --primary-glow: rgba(26,111,255,.25);
  --cyan:         #00c6ff;
  --gradient:     linear-gradient(135deg, #1a6fff 0%, #00c6ff 100%);

  --text:         #08101f;
  --text-2:       #3d5068;
  --text-muted:   #8fa3be;

  --green:        #0ecb7a;
  --green-soft:   rgba(14,203,122,.1);
  --amber:        #f5a623;
  --amber-soft:   rgba(245,166,35,.1);
  --orange:       #f97316;
  --orange-soft:  rgba(249,115,22,.1);
  --red:          #ef4444;
  --red-soft:     rgba(239,68,68,.1);

  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;

  --shadow-xs:  0 1px 3px rgba(8,16,31,.06);
  --shadow-sm:  0 2px 8px rgba(26,111,255,.06), 0 1px 3px rgba(8,16,31,.04);
  --shadow:     0 4px 16px rgba(26,111,255,.08), 0 1px 4px rgba(8,16,31,.06);
  --shadow-md:  0 8px 28px rgba(26,111,255,.12), 0 2px 8px rgba(8,16,31,.06);
  --shadow-lg:  0 20px 48px rgba(26,111,255,.16), 0 4px 16px rgba(8,16,31,.08);

  --ease:       cubic-bezier(.4,0,.2,1);
  --t-fast:     .15s var(--ease);
  --t:          .22s var(--ease);
  --t-slow:     .35s var(--ease);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--t);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 18px; color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: .12em;
  color: var(--text);
}
.logo-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin-top: 1px;
}

.sidebar-section { padding: 16px 12px 8px; }

.sidebar-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast);
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav-item svg { flex-shrink: 0; }

.subject-pill {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast);
  margin-bottom: 3px;
  border-left: 3px solid transparent;
}
.subject-pill:hover { background: var(--surface); color: var(--text); }
.subject-pill.active {
  background: var(--surface-2);
  border-left-color: var(--subject-color, var(--primary));
  color: var(--text);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: var(--text-muted); }
.logout-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.logout-btn:hover { background: var(--red-soft); color: var(--red); }

/* ── Main layout ────────────────────────────────────────── */
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.sidebar-toggle {
  display: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: all var(--t-fast);
}
.sidebar-toggle:hover { background: var(--surface); }
.topbar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.main-content { padding: 28px; flex: 1; max-width: 1440px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--t);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Stat cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--t);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--t);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card:hover::before { opacity: 1; }
.stat-icon {
  width: 36px; height: 36px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 12px;
}
.stat-icon.red   { background: var(--red-soft);    color: var(--red); }
.stat-icon.green { background: var(--green-soft);   color: var(--green); }
.stat-icon.amber { background: var(--amber-soft);   color: var(--amber); }
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; line-height: 1;
  color: var(--text);
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Grid layouts ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px; font-weight: 600;
}
.badge-green  { background: var(--green-soft);  color: #059669; }
.badge-amber  { background: var(--amber-soft);  color: #d97706; }
.badge-orange { background: var(--orange-soft); color: #ea580c; }
.badge-red    { background: var(--red-soft);    color: #dc2626; }
.badge-blue   { background: var(--primary-soft); color: var(--primary); }
.badge-gray   { background: var(--surface-2);   color: var(--text-2); }

/* Threat badge — glowing on critical */
.threat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 28px; padding: 0 10px;
  border-radius: 6px;
  font-size: 13px; font-weight: 700;
  transition: all var(--t-fast);
}
.threat-green  { background: var(--green-soft);  color: #059669; }
.threat-amber  { background: var(--amber-soft);  color: #d97706; }
.threat-orange { background: var(--orange-soft); color: #ea580c; }
.threat-red    { background: var(--red-soft);    color: #dc2626; box-shadow: 0 0 12px rgba(239,68,68,.3); }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  transition: all var(--t-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238fa3be' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-input.error { border-color: var(--red); }

/* Score input group */
.score-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.score-item { display: flex; flex-direction: column; gap: 6px; }
.score-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.score-desc  { font-size: 10.5px; color: var(--text-muted); line-height: 1.4; }
.score-input-wrap { display: flex; align-items: center; gap: 10px; }
.score-input-wrap input[type=number] {
  width: 64px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 16px; font-weight: 700;
  text-align: center;
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast);
}
.score-input-wrap input[type=number]:focus { border-color: var(--primary); }
.score-bar {
  flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 99px;
  background: var(--gradient);
  transition: width var(--t);
}

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  transition: background var(--t-fast);
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 14px 16px; font-size: 13.5px; vertical-align: middle; }
.td-url { max-width: 280px; }
.td-url a { color: var(--primary); font-weight: 500; }
.td-url a:hover { text-decoration: underline; }
.td-title { font-weight: 500; color: var(--text); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-actions { display: flex; align-items: center; gap: 6px; }

/* Category pill */
.cat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
  white-space: nowrap;
}

/* ── Parameter display ──────────────────────────────────── */
.params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.param-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.param-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.param-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.param-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700;
  line-height: 1;
}
.param-bar { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 5px; }
.param-bar-fill { height: 100%; border-radius: 99px; transition: width .6s var(--ease); }
.param-desc { font-size: 10.5px; color: var(--text-muted); }

/* ── AI summary box ─────────────────────────────────────── */
.ai-summary-box {
  background: var(--primary-soft);
  border: 1px solid rgba(26,111,255,.15);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}
.ai-summary-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}

/* ── Status badges ──────────────────────────────────────── */
.status-pending   { background: var(--amber-soft);  color: #d97706; }
.status-confirmed { background: var(--green-soft);  color: #059669; }
.status-archived  { background: var(--surface-2);   color: var(--text-muted); }

/* ── Confirm panel ──────────────────────────────────────── */
.confirm-panel {
  background: linear-gradient(135deg, rgba(26,111,255,.04), rgba(0,198,255,.04));
  border: 1px solid rgba(26,111,255,.15);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

/* ── Sentiment badge ────────────────────────────────────── */
.sentiment-positive { background: var(--green-soft);  color: #059669; }
.sentiment-negative { background: var(--red-soft);    color: #dc2626; }
.sentiment-neutral  { background: var(--surface-2);   color: var(--text-2); }
.sentiment-mixed    { background: var(--amber-soft);  color: #d97706; }

/* ── Login page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(26,111,255,.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,198,255,.05) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.login-logo .logo-mark { width: 44px; height: 44px; font-size: 22px; border-radius: 13px; }
.login-logo .logo-name { font-size: 16px; }
.login-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.5; }
.login-error {
  background: var(--red-soft); border: 1px solid rgba(239,68,68,.2);
  color: #dc2626; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}

/* ── Analyze loading ────────────────────────────────────── */
.analyze-btn-wrap { position: relative; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* pending overlay on score fields */
.scores-pending { opacity: .45; pointer-events: none; transition: opacity .4s; }
.scores-pending.loaded { opacity: 1; pointer-events: all; }

/* ── URL detail header ──────────────────────────────────── */
.url-hero {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.url-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700;
  margin-bottom: 8px; line-height: 1.3;
}
.url-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.url-hero-link { color: var(--primary); font-size: 13px; word-break: break-all; }
.url-hero-link:hover { text-decoration: underline; }

/* ── Composite score ring ───────────────────────────────── */
.composite-ring-wrap {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  padding: 16px;
}
.composite-score-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px; font-weight: 700; line-height: 1;
}
.composite-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }

/* ── Metrics / daily graph ──────────────────────────────── */
.metrics-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.metric-log-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.metric-log-form .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }

/* ── Filters bar ────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.filter-sep { width: 1px; height: 20px; background: var(--border); }
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input-wrap input { padding-left: 34px; }

/* ── Audit log ──────────────────────────────────────────── */
.audit-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.audit-item:last-child { border-bottom: none; }
.audit-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
  margin-top: 5px;
}
.audit-dot.red    { background: var(--red); }
.audit-dot.green  { background: var(--green); }
.audit-dot.amber  { background: var(--amber); }
.audit-body { flex: 1; min-width: 0; }
.audit-action { font-size: 13.5px; font-weight: 500; }
.audit-meta   { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.audit-diff   { font-size: 12px; margin-top: 4px; }
.audit-diff del  { color: var(--red);   background: var(--red-soft);   padding: 1px 5px; border-radius: 3px; text-decoration: none; }
.audit-diff ins  { color: var(--green); background: var(--green-soft); padding: 1px 5px; border-radius: 3px; text-decoration: none; }

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { opacity: .3; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 13.5px; line-height: 1.6; }

/* ── Toast notifications ────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUp .25s var(--ease);
  max-width: 340px;
}
.toast.success { background: #059669; }
.toast.error   { background: #dc2626; }
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeOut { to { opacity:0; transform:translateY(8px); } }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 18px; font-size: 13.5px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: all var(--t-fast); margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Section headings ───────────────────────────────────── */
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Page header ────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  display: flex; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 20px;
}
.alert-success { background: var(--green-soft); color: #059669; border: 1px solid rgba(14,203,122,.2); }
.alert-error   { background: var(--red-soft);   color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.alert-info    { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(26,111,255,.15); }

/* ── Analytics chart toggle ─────────────────────────────── */
.period-toggle { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.period-btn {
  padding: 6px 14px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted); transition: all var(--t-fast);
}
.period-btn.active { background: var(--bg); color: var(--primary); box-shadow: var(--shadow-xs); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .params-grid { grid-template-columns: 1fr; }
  .score-group { grid-template-columns: 1fr; }
  .main-content { padding: 16px; }
}

/* ── Utility ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.archived-row td { opacity: .55; }
