:root {
  --nav-height: 48px;
  --sidebar-width: 240px;
  --sidebar-collapsed: 52px;
  --bg-primary: #0b0f14;
  --bg-secondary: #0f1720;
  --bg-tertiary: #151e2b;
  --bg-surface: #111a27;
  --bg-elevated: #1a2535;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-subtle: #2a3556;
  --accent: #4cc9f0;
  --accent-dim: rgba(76, 201, 240, 0.12);
  --accent-glow: rgba(76, 201, 240, 0.35);
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══ Top Nav ═══ */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.nav-left, .nav-center, .nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-center { flex-wrap: nowrap; overflow: hidden; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  padding: 0 8px;
}

.brand:hover { text-decoration: none; opacity: 0.9; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(76, 201, 240, 0.25);
}

.top-nav button.nav-link { font-family: inherit; }

.nav-dropdown { position: relative; }
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}
.dd-arrow { font-size: 10px; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 190px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  padding: 6px 0;
  z-index: 200;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.dropdown-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu { display: block; }

.dropdown-trigger[aria-expanded="true"] .dd-arrow { transform: rotate(180deg); }
.dd-arrow { transition: transform 0.15s ease; }

.version-pill {
  font-size: 11px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(76, 201, 240, 0.22);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ═══ App Body Layout ═══ */
.app-body {
  display: flex;
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

.sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 8px;
  overflow-y: auto;
  transition: width 0.2s;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.sidebar-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.sidebar-collapse-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 4px;
}
.sidebar-collapse-btn:hover { color: var(--text-primary); }

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-link span { display: none; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

.sidebar-links { display: grid; gap: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: rgba(76, 201, 240, 0.2);
  text-decoration: none;
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(76, 201, 240, 0.3);
}

/* ═══ Main Content ═══ */
.main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-primary);
  padding: 24px;
}

/* ═══ Hero ═══ */
.hero {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.hero p { margin: 8px 0 0; color: var(--text-secondary); }
.hero.compact { padding: 14px 16px; }

/* ═══ Panel ═══ */
.panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

h2 {
  margin: 0 0 0.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

/* ═══ Forms ═══ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.form-grid .full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

input, textarea, select, button { font: inherit; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.58rem 0.7rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

input[type="checkbox"] { width: auto; margin-right: 0.4rem; }

button {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.58rem 0.85rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  color: var(--accent);
  border-color: var(--accent-glow);
  background: var(--bg-elevated);
}

.btn-accent {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn-accent:hover {
  background: #6dd4f5;
  color: var(--bg-primary);
  border-color: #6dd4f5;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--red);
}

.button-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

/* ═══ Card Lists ═══ */
.thread-list { display: grid; gap: 0.6rem; }

.thread-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  text-decoration: none;
}

.thread-card:hover {
  border-color: rgba(76, 201, 240, 0.32);
  text-decoration: none;
}

.thread-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.empty { color: var(--text-secondary); }

/* ═══ Status Badges ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-concept    { background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.badge-planning   { background: rgba(245,158,11,0.15);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-funding    { background: rgba(76,201,240,0.15);  color: var(--accent); border: 1px solid rgba(76,201,240,0.3); }
.badge-launch     { background: rgba(34,197,94,0.15);   color: var(--green);  border: 1px solid rgba(34,197,94,0.3); }
.badge-operating  { background: rgba(34,197,94,0.25);   color: var(--green);  border: 1px solid rgba(34,197,94,0.5); }
.badge-prospect   { background: rgba(100,116,139,0.15); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-contacted  { background: rgba(245,158,11,0.15);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-interviewing { background: rgba(76,201,240,0.15); color: var(--accent); border: 1px solid rgba(76,201,240,0.3); }
.badge-offer      { background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.badge-accepted   { background: rgba(34,197,94,0.15);   color: var(--green);  border: 1px solid rgba(34,197,94,0.3); }
.badge-rejected   { background: rgba(239,68,68,0.15);   color: var(--red);    border: 1px solid rgba(239,68,68,0.3); }
.badge-critical   { background: rgba(239,68,68,0.15);   color: var(--red);    border: 1px solid rgba(239,68,68,0.3); }
.badge-danger     { background: rgba(239,68,68,0.15);   color: var(--red);    border: 1px solid rgba(239,68,68,0.3); }
.badge-success    { background: rgba(34,197,94,0.15);   color: var(--green);  border: 1px solid rgba(34,197,94,0.3); }
.badge-warning    { background: rgba(245,158,11,0.15);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-high       { background: rgba(245,158,11,0.15);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.badge-medium     { background: rgba(76,201,240,0.15);  color: var(--accent); border: 1px solid rgba(76,201,240,0.3); }
.badge-low        { background: rgba(100,116,139,0.15); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-sba        { background: rgba(34,197,94,0.12);   color: var(--green);  border: 1px solid rgba(34,197,94,0.3); }
.badge-conventional { background: rgba(76,201,240,0.12); color: var(--accent); border: 1px solid rgba(76,201,240,0.3); }
.badge-micro      { background: rgba(167,139,250,0.12); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.badge-angel      { background: rgba(245,158,11,0.12);  color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }

/* ═══ Demand Score Ring ═══ */
.score-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.score-ring.high { border-color: var(--green); color: var(--green); background: rgba(34,197,94,0.1); }
.score-ring.mid  { border-color: var(--yellow); color: var(--yellow); background: rgba(245,158,11,0.1); }
.score-ring.low  { border-color: var(--red); color: var(--red); background: rgba(239,68,68,0.1); }

/* ═══ Match Score Bar ═══ */
.match-bar-wrap { display: flex; align-items: center; gap: 8px; }
.match-bar { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 999px; overflow: hidden; }
.match-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.match-score-label { font-size: 12px; font-weight: 700; min-width: 36px; text-align: right; }

/* ═══ Rank Badge ═══ */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 12px; font-weight: 800;
  border: 2px solid;
  flex-shrink: 0;
}

.rank-1 { border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,0.12); }
.rank-2 { border-color: #94a3b8; color: #94a3b8; background: rgba(148,163,184,0.1); }
.rank-3 { border-color: #78716c; color: #78716c; background: rgba(120,113,108,0.1); }

/* ═══ Metrics Bar ═══ */
.metrics-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.metric-card {
  flex: 1;
  min-width: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
  display: block;
}

.metric-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* ═══ Data Table (grid cards) ═══ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.data-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s;
}

.data-card:hover {
  border-color: rgba(76, 201, 240, 0.35);
  text-decoration: none;
}

.data-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.data-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}

.data-card-meta { font-size: 0.8rem; color: var(--text-secondary); }
.data-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ═══ Coverage Indicator ═══ */
.coverage-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cov-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.cov-dot.filled { background: var(--green); border-color: var(--green); }
.cov-dot.warning { background: var(--yellow); border-color: var(--yellow); }
.cov-dot.empty { background: var(--bg-tertiary); }

/* ═══ Candidate Slot Cards ═══ */
.candidate-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.candidate-slot {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.candidate-slot.primary { border-color: rgba(245,158,11,0.36); }
.candidate-slot.empty-slot {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  opacity: 0.5;
  cursor: pointer;
}

.candidate-slot.empty-slot:hover { opacity: 0.8; }

/* ═══ Pipeline Stage View ═══ */
.stage-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.stage-row:last-child { border-bottom: none; }

.stage-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
}

/* ═══ Loan Projections Table ═══ */
.proj-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.proj-table th, .proj-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.proj-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.proj-table tr:last-child td { border-bottom: none; }

/* ═══ AI Analysis Box ═══ */
.ai-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-top: 8px;
}

.ai-box.empty { color: var(--text-muted); font-style: italic; }

/* ═══ Home Page (hp-*) ═══ */

/* Hero */
.hp-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 48px 44px;
  background: linear-gradient(145deg, #0a1628 0%, #0b1221 60%, #080e18 100%);
  margin-bottom: 20px;
}

/* Dot-grid mesh background */
.hp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(76, 201, 240, 0.13) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Radial accent glow centered top */
.hp-hero-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 280px;
  background: radial-gradient(ellipse, rgba(76, 201, 240, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.hp-hero-inner { position: relative; z-index: 1; }

.hp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(76, 201, 240, 0.08);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 22px;
}

.hp-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: hp-pulse 2s ease-in-out infinite;
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.hp-headline {
  margin: 0 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-primary);
}

.hp-hl-accent {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(76, 201, 240, 0.35);
}

.hp-subline {
  margin: 0 0 30px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

.hp-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--accent);
  color: #05101e;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.hp-btn-primary:hover {
  background: #6dd4f5;
  box-shadow: 0 0 24px rgba(76, 201, 240, 0.4);
  text-decoration: none;
}

.hp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.hp-btn-ghost:hover {
  border-color: rgba(76, 201, 240, 0.5);
  color: var(--accent);
  text-decoration: none;
}

/* Stats bar in hero */
.hp-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 28px;
  max-width: 640px;
}

.hp-stat {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

.hp-stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.hp-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.hp-stat-div {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 8px;
}

/* Section wrapper */
.hp-section {
  margin-bottom: 20px;
}

.hp-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.hp-section-title {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hp-section-sub {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 560px;
  line-height: 1.6;
}

/* Pipeline steps */
.hp-pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.hp-pipe-step {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, transform 0.15s;
}

.hp-pipe-step:hover {
  border-color: rgba(76, 201, 240, 0.3);
  transform: translateY(-2px);
}

.hp-pipe-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hp-pipe-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--clr, var(--accent));
  flex-shrink: 0;
}

.hp-pipe-step h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hp-pipe-step p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.hp-pipe-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hp-pipe-link:hover { text-decoration: none; opacity: 0.8; }

.hp-pipe-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 10px;
  margin-top: 34px;
}

/* Feature cards */
.hp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hp-feat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}

.hp-feat:hover { border-color: rgba(76, 201, 240, 0.25); }

.hp-feat-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-feat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--bg, rgba(76,201,240,0.1));
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--clr, var(--accent));
  flex-shrink: 0;
}

.hp-feat-header h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hp-feat > p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hp-feat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-feat-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hp-feat-list li i {
  color: var(--green);
  font-size: 10px;
  flex-shrink: 0;
}

/* Bottom CTA banner */
.hp-cta-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 20px;
  padding: 52px 40px;
  background: linear-gradient(135deg, #0a1628 0%, #0c1a2e 100%);
  text-align: center;
  margin-bottom: 8px;
}

.hp-cta-banner-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(76, 201, 240, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.hp-cta-banner-inner { position: relative; z-index: 1; }

.hp-cta-banner-icon {
  font-size: 2.4rem;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 18px rgba(76, 201, 240, 0.5));
}

.hp-cta-banner h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hp-cta-banner p {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 420px;
  margin-inline: auto;
  line-height: 1.6;
}

/* ═══ Job Description Sections ═══ */
.jd-section {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.jd-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.jd-section-title {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.jd-section-title i { color: var(--accent); font-size: 12px; }

.jd-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.jd-list li {
  display: flex;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.jd-list li::before {
  content: "›";
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: -1px;
}

.jd-list.jd-list-star li::before {
  content: "✦";
  color: var(--yellow);
  font-size: 0.65rem;
  margin-top: 3px;
}

.jd-list.jd-list-green li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 1px;
}

/* ═══ Admin Components ═══ */
.adm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.adm-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.adm-search-input {
  flex: 1;
  min-width: 160px;
}

.adm-filter-bar select { width: auto; }

.adm-table-wrap { overflow-x: auto; }

.adm-data-table {
  width: 100%;
  border-collapse: collapse;
}

.adm-data-table th, .adm-data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: top;
}

.adm-data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}

.adm-data-table tr:hover td { background: var(--bg-tertiary); }

.adm-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.adm-empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ═══ Admin Modal ═══ */
.adm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.adm-modal-overlay.open { display: flex; }

.adm-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.adm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.adm-modal-header h3 { margin: 0; font-family: "Space Grotesk", sans-serif; }

.adm-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}

.adm-modal-close:hover { color: var(--red); }

.adm-modal-body { padding: 18px 20px; }

.adm-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.adm-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.adm-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* ═══ Split layout ═══ */
.split {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ═══ About ═══ */
.about-section { margin-top: 20px; }
.about-section h2 { font-size: 1rem; color: var(--accent); }
.about-section p { color: var(--text-secondary); line-height: 1.6; }

/* ═══ Toolbar ═══ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-primary);
  font-size: 13px;
  min-width: 200px;
}

/* ═══ Progress Step ═══ */
.progress-steps {
  display: flex;
  gap: 0;
  margin-top: 8px;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 3px solid var(--border);
}

.progress-step.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.progress-step.done {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ═══ Responsive — see web/static/css/mobile.css ═══ */

/* ═══════════════════════════════════════
   Admin – extended classes (HR parity)
   ═══════════════════════════════════════ */

/* Badges */
.adm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.72rem; font-weight: 600; text-transform: capitalize;
}
.adm-badge-cyan    { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.adm-badge-blue    { background: rgba(59,130,246,0.15);  color: #3b82f6; }
.adm-badge-green   { background: rgba(34,197,94,0.15);   color: #22c55e; }
.adm-badge-yellow  { background: rgba(234,179,8,0.15);   color: #eab308; }
.adm-badge-orange  { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.adm-badge-red     { background: rgba(239,68,68,0.15);   color: #ef4444; }
.adm-badge-purple  { background: rgba(139,92,246,0.15);  color: #8b5cf6; }

/* Inline tags */
.adm-tag {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 0.7rem; background: rgba(255,255,255,0.06);
  color: var(--text-muted); border: 1px solid var(--border);
}

/* Modal footer */
.adm-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

/* Outline + danger-sm buttons */
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-primary); border-radius: 6px; padding: 6px 14px;
  font-size: 0.82rem; cursor: pointer;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger-sm {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25);
  color: #ef4444; border-radius: 6px; padding: 4px 8px;
  font-size: 0.78rem; cursor: pointer;
}
.btn-danger-sm:hover { background: rgba(239,68,68,0.25); }

/* ── Backlog expand rows ── */
.bl-expand-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); width: 26px; height: 26px;
  border-radius: 4px; cursor: pointer; font-size: 0.7rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.bl-expand-btn:hover { border-color: var(--accent); color: var(--accent); }
.bl-expand-btn.expanded { background: rgba(96,165,250,0.1); border-color: var(--accent); color: var(--accent); }
.bl-expand-row td { padding: 0 !important; border-bottom: 1px solid var(--border); }
.bl-expand-content {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
  padding: 16px 12px; background: rgba(255,255,255,0.015);
}
.bl-expand-section {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px;
}
.bl-expand-section-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); margin-bottom: 8px; font-weight: 700;
}
.bl-expand-section-body {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
}

/* ── Prompt editor cards ── */
.prompt-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 16px;
}
.prompt-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.prompt-card-header h3 { margin: 0; font-size: 0.95rem; }
.prompt-textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: rgba(0,0,0,0.2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-primary); padding: 12px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem;
  line-height: 1.6; outline: none; box-sizing: border-box;
}
.prompt-textarea:focus { border-color: var(--accent); }
.prompt-heading-input {
  width: 100%; background: rgba(0,0,0,0.15); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-primary); padding: 8px 12px;
  font-size: 0.85rem; font-weight: 600; outline: none; box-sizing: border-box;
}
.prompt-heading-input:focus { border-color: var(--accent); }
.prompt-save-status {
  font-size: 0.7rem; color: var(--text-muted); opacity: 0;
  transition: opacity 0.3s;
}
.prompt-save-status.show { opacity: 1; color: #22c55e; }
.step-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700;
  background: rgba(96,165,250,0.12); color: #60a5fa;
}
.step-badge-last { background: rgba(239,68,68,0.12); color: #ef4444; }

/* ── KPI Grid ── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
}
.kpi-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; transition: border-color .2s;
}
.kpi-card:hover { border-color: rgba(76,201,240,0.3); }
.kpi-card .kpi-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted); margin-bottom: 8px;
}
.kpi-card .kpi-value {
  font-size: 28px; font-weight: 700; color: var(--text-primary);
}
.kpi-card .kpi-change { font-size: 12px; margin-top: 4px; color: var(--text-muted); }

/* ── Build History: Panel Header/Body ── */
.panel-header {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.panel-header:hover { background: rgba(255,255,255,0.02); }
.panel-body { padding: 20px; }
.release-collapsed { display: none; }

/* ── Build Timeline ── */
.build-timeline { padding-left: 16px; }
.build-entry {
  display: flex; gap: 16px; padding-bottom: 20px; position: relative;
}
.build-entry::before {
  content: ''; position: absolute; left: 7px; top: 22px; bottom: 0;
  width: 2px; background: var(--border);
}
.build-entry:last-child::before { display: none; }
.build-marker {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--border); flex-shrink: 0; margin-top: 4px;
  position: relative; z-index: 1;
}
.build-marker.done   { background: #10b981; }
.build-marker.active { background: #f59e0b; }
.build-content h4 { color: var(--text-primary); font-size: 0.92rem; margin: 0 0 4px; }
.build-content p  { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6; margin: 0; }
.build-tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600;
  background: rgba(76,201,240,0.1); color: var(--accent); margin-bottom: 4px;
}

/* ── info-table (Builds page) ── */
.info-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.info-table th, .info-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.info-table th { color: var(--accent); font-weight: 600; }
.info-table td:first-child { color: var(--text-muted); white-space: nowrap; width: 40%; }

/* -- Training Module Pages -- */
.training-module-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 24px; margin-top: 24px; }
.training-module-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px 24px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s; }
.training-module-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.training-module-icon { font-size: 2rem; color: var(--accent); }
.training-module-card h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.training-module-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.training-module-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.training-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; padding: 3px 10px; border-radius: 99px; background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }
.training-section { margin-bottom: 28px; }
.training-section h2 { font-size: 1.15rem; color: var(--accent); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.training-section p, .training-section li { font-size: 0.92rem; color: var(--text-muted); line-height: 1.65; }
.training-callout { background: rgba(var(--accent-rgb,0,188,212),0.07); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 16px 0; font-size: 0.9rem; color: var(--text-muted); }
.training-callout strong { color: var(--text); }
.training-step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.training-step-list li { display: flex; gap: 12px; align-items: flex-start; }
.training-step-num { min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #000; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.training-step-text { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.training-step-text strong { color: var(--text); }
.training-exercise { background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; padding: 20px 22px; }
.training-exercise h3 { margin: 0 0 8px; font-size: 1rem; color: var(--accent); }
.training-exercise p { margin: 0 0 14px; font-size: 0.9rem; color: var(--text-muted); }
.training-exercise .btn-primary { display: inline-flex; align-items: center; gap: 7px; }

/* -- Company Overview Collapsible -- */
.co-section { border-top: 1px solid var(--border); margin: 0; }
.co-section:first-of-type { border-top: none; }
.co-header { display: flex; align-items: center; justify-content: space-between; padding: 11px 0 10px; cursor: pointer; user-select: none; gap: 8px; }
.co-header:hover .field-label { color: var(--accent); }
.co-chevron { font-size: 0.72rem; color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.co-header.open .co-chevron { transform: rotate(180deg); }
.co-body { padding-bottom: 14px; }

/* -- Staff Rows (Staffing Plan) -- */
.staff-list { display: flex; flex-direction: column; }
.staff-row { border-bottom: 1px solid var(--border); }
.staff-row:last-child { border-bottom: none; }
.staff-row-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; cursor: pointer; gap: 8px; user-select: none; }
.staff-row-header:hover .staff-title { color: var(--accent); }
.staff-title { font-size: 0.9rem; font-weight: 600; color: var(--text); text-decoration: none; transition: color .15s; }
.staff-row-left { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.staff-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.staff-chevron { font-size: 0.7rem; color: var(--text-muted); transition: transform .2s; }
.staff-row.open .staff-chevron { transform: rotate(180deg); }
.staff-row-body { padding: 0 0 14px 22px; }
.salary-range { font-size: 0.78rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.ai-agent-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; padding: 2px 8px; border-radius: 99px; background: rgba(168,85,247,0.12); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); white-space: nowrap; font-weight: 600; }
.staff-row.staff-ai .staff-row-header { background: rgba(168,85,247,0.03); border-radius: 6px; padding-left: 4px; padding-right: 4px; }
