/* ── Theme variables ──────────────────────────────────────────── */
:root {
  --bg: #0c1222;
  --surface: #151d32;
  --surface-hover: #1a2442;
  --border: #2d3a5c;
  --text: #e8ecf4;
  --text-soft: #94a3b8;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --accent-hover: #67e8f9;
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --nav-height: 60px;
}

/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  font-size: 15px;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Navigation ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 2rem;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--accent-hover); text-decoration: none; }
.nav-brand svg { width: 28px; height: 28px; }
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.nav-links a.active { background: rgba(34, 211, 238, 0.1); color: var(--accent); }
.nav-links a svg { width: 18px; height: 18px; opacity: 0.7; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}
.nav-user strong { color: var(--text); }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-right { gap: 0.5rem; }
}

/* ── Main content area ───────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 1.5rem;
}
.container { max-width: 1400px; margin: 0 auto; }

/* ── Page header ─────────────────────────────────────────────── */
.page-header { margin-bottom: 1.75rem; }
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}
.page-header .subtitle {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Panels / Cards ──────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.panel-header h2, .panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}
.panel-header svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.panel-header .badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}
.badge-success { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.badge-info { background: rgba(34, 211, 238, 0.1); color: var(--accent); }

/* ── Forms ────────────────────────────────────────────────────── */
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}
input[type="text"], input[type="number"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row > * { flex: 1 1 180px; }
.form-hint {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #0c1222;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; color: #0c1222; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-secondary {
  background: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--error);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.25); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Messages ────────────────────────────────────────────────── */
.message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.message.error { background: rgba(248, 113, 113, 0.12); color: var(--error); }
.message.success { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.message.info { background: rgba(34, 211, 238, 0.1); color: var(--accent); }
.message.warning { background: rgba(251, 191, 36, 0.1); color: var(--warning); }

/* ── Filter bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filter-bar label { margin-bottom: 0; margin-right: 0.25rem; }
.filter-bar select { margin-bottom: 0; width: 220px; }

/* ── Data table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--surface-hover);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table th:first-child { border-radius: var(--radius) 0 0 0; padding-left: 1.25rem; }
.data-table th:last-child { padding-right: 1.25rem; }
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:first-child { padding-left: 1.25rem; }
.data-table td:last-child { padding-right: 1.25rem; }

/* Table cells */
.cell-logo { width: 52px; }
.logo-wrap { display: inline-flex; align-items: center; justify-content: center; }
.logo-img {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
}
.logo-fallback {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: var(--bg);
  font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.cell-company { min-width: 140px; }
.company-name { font-weight: 600; color: var(--accent); }
.cell-reason { max-width: 220px; color: var(--text-soft); font-size: 0.85rem; line-height: 1.4; }
.cell-tags { max-width: 180px; }
.tag {
  display: inline-block;
  background: var(--bg);
  color: var(--text-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
}
.cell-link a { color: var(--accent); text-decoration: none; }
.cell-link a:hover { text-decoration: underline; }
.cell-social { font-size: 0.8rem; }
.cell-social a { color: var(--accent); text-decoration: none; margin-right: 0.5rem; }
.cell-social a:hover { text-decoration: underline; }
.empty-cell { color: var(--text-soft); font-size: 0.85rem; opacity: 0.7; }

/* ── Dashboard cards ─────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.dash-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.dash-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.dash-card-icon svg { width: 24px; height: 24px; color: var(--accent); }
.dash-card h3 { margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.dash-card p { margin: 0; color: var(--text-soft); font-size: 0.9rem; flex: 1; }
.dash-card .card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── Landing page ────────────────────────────────────────────── */
.landing-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height) - 4rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: -1.5rem -1.5rem 1.5rem;
  padding: 6.5rem 1.5rem 5rem;
  isolation: isolate;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12,18,34,0.96) 0%, rgba(12,18,34,0.86) 42%, rgba(12,18,34,0.58) 100%),
    radial-gradient(circle at 75% 28%, rgba(52,211,153,0.22), transparent 28rem),
    radial-gradient(circle at 78% 78%, rgba(251,191,36,0.16), transparent 24rem),
    var(--bg);
  z-index: -3;
}
.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  z-index: -2;
}
.hero-content {
  width: min(680px, 100%);
  position: relative;
  z-index: 2;
}
.eyebrow {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.hero-content h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}
.hero-content p {
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 620px;
  margin: 1.35rem 0 1.5rem;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero-proof {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}
.hero-proof span {
  border: 1px solid rgba(148,163,184,0.32);
  color: var(--text-soft);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(21,29,50,0.65);
}
.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-window {
  position: absolute;
  background: rgba(21,29,50,0.86);
  border: 1px solid rgba(148,163,184,0.28);
  box-shadow: 0 24px 80px rgba(0,0,0,0.38);
  backdrop-filter: blur(12px);
}
.hero-window-main {
  right: max(2rem, 7vw);
  top: 13%;
  width: min(520px, 43vw);
  border-radius: 12px;
  padding: 1rem;
}
.hero-window-side {
  right: max(1rem, 4vw);
  bottom: 10%;
  width: min(360px, 32vw);
  border-radius: 12px;
  padding: 1rem;
}
.window-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 0.78rem;
}
.window-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--error);
}
.window-top span:nth-child(2) { background: var(--warning); }
.window-top span:nth-child(3) { background: var(--success); margin-right: 0.4rem; }
.window-top strong { color: var(--text); font-size: 0.82rem; }
.score-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: center;
}
.score-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 12px solid rgba(34,211,238,0.14);
  border-top-color: var(--accent);
  border-right-color: var(--success);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring span { font-size: 2.25rem; font-weight: 800; }
.score-ring small { color: var(--text-soft); font-size: 0.68rem; }
.score-bars {
  display: grid;
  gap: 0.7rem;
}
.score-bars div span {
  display: block;
  color: var(--text-soft);
  font-size: 0.74rem;
  margin-bottom: 0.25rem;
}
.score-bars div {
  position: relative;
}
.score-bars div::after {
  content: "";
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
}
.score-bars b {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--success));
}
.prompt-row, .mini-rank {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  border-radius: 8px;
  background: rgba(12,18,34,0.72);
  border: 1px solid rgba(148,163,184,0.16);
}
.prompt-row span, .mini-rank span {
  color: var(--text);
  flex: 1;
}
.prompt-row strong {
  color: var(--warning);
  font-size: 0.78rem;
}
.prompt-row strong.good { color: var(--success); }
.mini-rank b {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,211,238,0.13);
  color: var(--accent);
}
.mini-rank em {
  color: var(--text-soft);
  font-style: normal;
  font-size: 0.76rem;
}
.landing-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  margin-bottom: 4rem;
}
.landing-strip div {
  background: var(--surface);
  padding: 1.4rem;
}
.landing-strip strong {
  display: block;
  font-size: 1.8rem;
  color: var(--text);
}
.landing-strip span {
  color: var(--text-soft);
  font-size: 0.86rem;
}
.landing-section {
  margin-bottom: 4rem;
}
.section-heading {
  max-width: 760px;
  margin-bottom: 1.5rem;
}
.section-heading h2, .section-copy h2, .landing-cta h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0;
  margin: 0 0 0.9rem;
}
.section-heading p, .section-copy p {
  color: var(--text-soft);
  font-size: 1rem;
  margin: 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.35rem;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(34,211,238,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.feature-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 2rem;
  align-items: start;
}
.section-copy {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}
.section-copy .btn {
  margin-top: 1.25rem;
}
.workflow-list {
  display: grid;
  gap: 0.75rem;
}
.workflow-list div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.workflow-list b {
  grid-row: span 2;
  color: var(--accent);
  font-size: 1.35rem;
}
.workflow-list span {
  font-weight: 700;
}
.workflow-list small {
  color: var(--text-soft);
  font-size: 0.85rem;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.channel-grid span {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 650;
}
.landing-cta {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,0.14), rgba(52,211,153,0.09));
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.landing-cta h2 {
  max-width: 760px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

@media (max-width: 1100px) {
  .hero-window-main { width: 48vw; right: 1rem; opacity: 0.72; }
  .hero-window-side { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .landing-hero {
    min-height: auto;
    margin: -1rem -1rem 1rem;
    padding: 4rem 1rem 16rem;
  }
  .landing-hero::before {
    background:
      linear-gradient(180deg, rgba(12,18,34,0.95) 0%, rgba(12,18,34,0.88) 56%, rgba(12,18,34,0.72) 100%),
      radial-gradient(circle at 50% 78%, rgba(52,211,153,0.2), transparent 18rem),
      var(--bg);
  }
  .landing-hero::after { mask-image: none; }
  .hero-window-main {
    width: calc(100% - 2rem);
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: 1rem;
    opacity: 0.9;
    padding: 0.75rem;
  }
  .score-layout {
    grid-template-columns: 96px 1fr;
  }
  .score-ring {
    width: 88px;
    height: 88px;
    border-width: 8px;
  }
  .score-ring span { font-size: 1.6rem; }
  .prompt-row { display: none; }
  .hero-content h1 { font-size: clamp(3rem, 17vw, 4.8rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .landing-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 2.5rem; }
  .feature-grid, .split-section, .channel-grid { grid-template-columns: 1fr; }
  .section-copy { position: static; }
  .landing-section { margin-bottom: 2.5rem; }
  .landing-cta {
    align-items: stretch;
    flex-direction: column;
    padding: 1.25rem;
  }
}

/* ── Profile sections ────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}
.profile-sidebar .panel { position: sticky; top: calc(var(--nav-height) + 1.5rem); }
.profile-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.profile-sidebar .nav-item:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.profile-sidebar .nav-item.active { background: rgba(34, 211, 238, 0.1); color: var(--accent); }
.profile-sidebar .nav-item svg { width: 18px; height: 18px; }
.key-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.key-status-row:last-child { border-bottom: none; }
.key-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.key-status-dot.saved { background: var(--success); }
.key-status-dot.missing { background: var(--text-soft); opacity: 0.4; }

@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .panel { padding: 1rem; }
  .form-row > * { flex: 1 1 100%; }
  .filter-bar select { width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-sidebar .panel { position: static; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-top: auto;
}
.site-footer a { color: var(--accent); }

/* ── Light theme (toggle via html[data-theme="light"]) ─────────── */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-hover: #eef2f9;
  --border: #d8dee9;
  --text: #0f172a;
  --text-soft: #64748b;
  --accent: #0284c7;
  --accent-dim: #0369a1;
  --accent-hover: #0ea5e9;
  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .navbar {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
}
.theme-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
}
html[data-theme="light"] .theme-toggle-track { background: #cbd5e1; }
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}
html[data-theme="light"] .theme-toggle-thumb {
  background: #fff;
  transform: translateX(20px);
}
html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(0);
}

/* ── Project workspace ─────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.project-card h3 { margin: 0 0 0.35rem 0; font-size: 1.05rem; }
.project-card .meta { color: var(--text-soft); font-size: 0.85rem; margin: 0 0 0.75rem 0; }
.project-card .card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}
.tab:hover { color: var(--text); background: var(--surface-hover); }
.tab.active {
  color: var(--accent);
  border-color: var(--border);
  background: var(--surface);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dash-card {
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: center;
  border: 1px solid var(--border);
}
.dash-card .num { font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.dash-card .lbl { font-size: 0.75rem; color: var(--text-soft); }

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.8rem;
  overflow: auto;
  max-height: 320px;
  white-space: pre-wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.detail-grid .span-2 { grid-column: span 2; }
.detail-grid .lbl { font-size: 0.75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .span-2 { grid-column: span 1; }
}

.evidence-row, .prompt-row, .rec-row {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.evidence-row:last-child, .prompt-row:last-child, .rec-row:last-child { border-bottom: none; }
.evidence-row .snippet { color: var(--text-soft); font-size: 0.85rem; margin: 0.35rem 0 0 0; }

.report-section h2 { margin-top: 0; font-size: 1.15rem; }
.report-list { margin: 0; padding-left: 1.2rem; }
.report-list li { margin-bottom: 0.5rem; }
.report-list .soft { color: var(--text-soft); font-size: 0.9rem; }
.big-stat { font-size: 2.5rem; font-weight: 700; color: var(--accent); margin: 0; }
.report-block { margin-bottom: 1.25rem; }
