/* ═══════════════════════════════════════════════════════════════════
   FindMyRockstar — Phase 1 stylesheet
   Extends the UPPER brand system (style.css). Adds:
   homepage scroll-story, auth gate, app shell (left-nav), primer,
   control buttons + confirm dialogs.
   Brand tokens (--brand-navy, --brand-teal, --dark-*) are inherited.
═══════════════════════════════════════════════════════════════════ */

/* ── View switching (single-page app) ───────────────────────────── */
/* Hidden by default; only the active view renders. !important guarantees the
   hidden state always beats any layout `display` on .home/.auth/.app-shell. */
.view { display: none !important; }
.view.active { display: block !important; }
.view.app-active { display: flex !important; }
.view.auth.active { display: flex !important; }

/* prevent any horizontal overflow on mobile; allow body to grow & scroll
   (style.css sets html,body{height:100%} which would otherwise cap scroll) */
html { height: auto; overflow-x: hidden; }
body { height: auto; min-height: 100%; max-width: 100%; overflow-x: hidden; }

/* ════════════════════════════════════════════════ HOMEPAGE */
.home {
  background: var(--light-bg);
  color: var(--light-text);
}

/* Top nav (transparent over hero, solid on scroll) */
.home-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.home-nav.scrolled {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--light-border);
  box-shadow: var(--shadow-sm);
}
.home-nav .nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.home-nav .logo-img { height: 30px; }
.nav-spacer { flex: 1; }
.nav-cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: var(--brand-navy);
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--brand-navy-mid); transform: translateY(-1px); }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 96px var(--space-lg) var(--space-2xl);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(46,56,165,0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(0,201,160,0.08), transparent 55%),
    var(--light-bg);
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-navy);
  background: rgba(46,56,165,0.07);
  border: 1px solid rgba(46,56,165,0.15);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-lg);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-teal);
  animation: pulse-dot 1.6s infinite;
}
.hero-title {
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--light-text);
  max-width: 14ch;
  margin: 0 auto var(--space-lg);
}
.hero-title .accent {
  /* V2 OSCILLATE: widened multi-stop gradient so we can slide background-position
     side-to-side. Stops mirror navy->teal->navy so the sweep reads as a subtle
     reflection shimmer (head tilting in front of the letters), not a hue change.
     Default (no-JS / reduced-motion) rests on the original navy->teal look. */
  /* T-3564: single INTENSE teal on every pass (both sweep stops = --brand-teal),
     per Michael — the intense look reads better than the two-tone version.
     SETTLED state is PIXEL-IDENTICAL to the live site = linear-gradient(120deg,
     navy 0%, teal 100%): the first band (0%..~36% of the 280% size) reproduces
     exactly that, and the shimmer returns to position 0% to rest there. */
  background: linear-gradient(
    120deg,
    var(--brand-navy) 0%,      /* << SETTLE band: navy -> teal == live V1 */
    var(--brand-teal) 36%,
    var(--brand-navy-mid) 52%,
    var(--brand-teal) 68%,     /* restored to vivid teal (T-3564): both passes intense, single tone */
    var(--brand-navy-mid) 84%,
    var(--brand-navy) 100%
  );
  background-size: 280% 100%;
  background-position: 0% 50%;   /* REST = 0% = exact live navy->teal */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* The shimmer: 3 slow side-to-side passes, then settle. Added via .oscillate
   on load (JS), so a non-JS visitor simply sees the static gradient. */
.hero-title .accent.oscillate {
  /* MADISON AVE (T-3567): ONE fast, eased sweep ~1.5s, once, then rest on brand
     colors forever. A premium "sheen" reveal (light catching the letters), not a
     loop. ease-out so it's elegant, not jumpy. */
  animation: accentShimmer 1.5s cubic-bezier(0.22, 1, 0.36, 1) 1 both;
}
@keyframes accentShimmer {
  /* ONE pass: sheen sweeps across once, then settles EXACTLY on the live look. */
  0%   { background-position: 100% 50%; }   /* sheen starts off to one side */
  100% { background-position: 0%   50%; }   /* lands on live navy->teal, stays */
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .accent.oscillate { animation: none; }
}
.hero-sub {
  font-size: clamp(15px, 2.4vw, 19px);
  line-height: 1.6;
  color: var(--light-muted);
  max-width: 52ch;
  margin: 0 auto var(--space-xl);
}
.hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}
.btn-rockstar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 40px;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 700;
  color: #fff;
  background: var(--brand-navy);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 30px rgba(46,56,165,0.35);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-rockstar::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.btn-rockstar:hover { background: var(--brand-navy-mid); transform: translateY(-2px); box-shadow: 0 12px 38px rgba(46,56,165,0.45); }
.btn-rockstar:hover::after { left: 130%; }
.btn-rockstar .star { font-size: 18px; }
.hero-trust {
  font-size: var(--text-xs);
  color: var(--light-muted);
  letter-spacing: 0.02em;
}
.scroll-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--light-muted);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* Scroll-reveal primitive */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* Story sections */
.story {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}
.section-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: var(--space-md);
}
.section-tag.navy { color: var(--brand-navy); }
.story h2 {
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--light-text);
  max-width: 18ch;
  margin-bottom: var(--space-lg);
}
.story .lead {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: var(--light-muted);
  max-width: 58ch;
}

/* WHY — problem/solution split */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.why-card {
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid var(--light-border);
}
.why-card.old { background: #fff; }
.why-card.new {
  background: linear-gradient(155deg, var(--brand-navy), var(--brand-navy-deep));
  border-color: var(--brand-navy);
  color: #fff;
}
.why-card .wc-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.why-card.old .wc-label { color: var(--strength-weak); }
.why-card.new .wc-label { color: var(--brand-teal); }
.why-card h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-md); letter-spacing: -0.01em; }
.why-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-md); }
.why-list li { display: flex; gap: 10px; font-size: var(--text-base); line-height: 1.5; }
.why-list .mark { flex-shrink: 0; font-weight: 700; }
.why-card.old .mark { color: var(--strength-weak); }
.why-card.new .mark { color: var(--brand-teal); }
.why-card.new .why-list li { color: rgba(255,255,255,0.92); }

/* VALUE — feature cards */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.value-card {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(0,201,160,0.12);
  margin-bottom: var(--space-md);
}
.value-card h3 { font-size: var(--text-md); font-weight: 700; margin-bottom: var(--space-sm); color: var(--light-text); }
.value-card p { font-size: var(--text-sm); line-height: 1.6; color: var(--light-muted); }

/* PROOF — dark metrics band */
.proof {
  background: var(--dark-bg);
  color: var(--dark-text);
}
.proof-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}
.proof .section-tag { color: var(--brand-teal); }
.proof h2 { color: #fff; }
.proof .lead { color: var(--dark-muted); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.metric {
  border: 1px solid var(--dark-border);
  background: var(--dark-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}
.metric-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--brand-teal);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-label {
  font-size: var(--text-xs);
  color: var(--dark-muted);
  margin-top: var(--space-sm);
  letter-spacing: 0.04em;
}
.proof-quote {
  margin-top: var(--space-2xl);
  border-left: 3px solid var(--brand-teal);
  padding-left: var(--space-lg);
  max-width: 60ch;
}
.proof-quote p { font-size: clamp(17px, 2.6vw, 23px); line-height: 1.5; color: #fff; font-weight: 500; }
.proof-quote cite { display: block; margin-top: var(--space-md); font-size: var(--text-sm); color: var(--dark-muted); font-style: normal; }

/* Final CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-deep));
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(26px, 5vw, 40px); font-weight: 700; letter-spacing: -0.02em; max-width: 20ch; margin: 0 auto var(--space-lg); }
.cta-band .btn-rockstar { background: var(--brand-teal); color: var(--dark-bg); box-shadow: 0 8px 30px rgba(0,201,160,0.4); }
.cta-band .btn-rockstar:hover { background: #00e0b3; }
.home-footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  font-size: var(--text-xs);
  border-top: 1px solid var(--dark-border);
}

/* ════════════════════════════════════════════════ AUTH GATE */
.auth {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background:
    radial-gradient(900px 500px at 50% -5%, rgba(46,56,165,0.12), transparent 60%),
    var(--light-bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  text-align: center;
}
.auth-logo { height: 34px; margin-bottom: var(--space-lg); }
.auth-card h1 { font-size: var(--text-xl); font-weight: 700; color: var(--brand-navy); letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .auth-sub { font-size: var(--text-sm); color: var(--light-muted); margin-bottom: var(--space-xl); line-height: 1.5; }
.auth-providers { display: flex; flex-direction: column; gap: var(--space-md); }
.provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--light-text);
  background: #fff;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.provider-btn:hover { border-color: var(--brand-navy); box-shadow: 0 0 0 3px rgba(46,56,165,0.08); transform: translateY(-1px); }
.provider-btn .pi { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.provider-btn.sso { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.provider-btn.sso:hover { background: var(--brand-navy-mid); }
.auth-divider {
  display: flex; align-items: center; gap: var(--space-md);
  margin: var(--space-lg) 0;
  font-size: var(--text-xs); color: var(--light-muted); letter-spacing: 0.06em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--light-border); }
.auth-foot { margin-top: var(--space-lg); font-size: var(--text-xs); color: var(--light-muted); line-height: 1.5; }
.auth-foot a { color: var(--brand-navy); text-decoration: none; }
.auth-back {
  position: absolute; top: var(--space-lg); left: var(--space-lg);
  font-size: var(--text-sm); color: var(--light-muted);
  background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.auth-back:hover { color: var(--brand-navy); }
.auth-demo-note {
  margin-top: var(--space-md);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-gold);
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

/* ════════════════════════════════════════════════ AUTH — EMAIL/PASSWORD (Option B)
   Namespaced .auth-email-* / .auth-* additions. Reuses brand tokens; matches the
   existing .auth-card / .provider-btn premium styling. */
.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
  margin-bottom: var(--space-md);
}
.auth-email-field { display: flex; flex-direction: column; gap: 5px; }
.auth-email-field[hidden] { display: none; }
.auth-email-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--light-text);
  letter-spacing: 0.01em;
}
.auth-email-field input {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--light-text);
  background: var(--light-bg);
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.auth-email-field input::placeholder { color: #b0b7c9; }
.auth-email-field input:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(46, 56, 165, 0.12);
}
.auth-email-field input.invalid {
  border-color: var(--strength-weak, #e5484d);
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.12);
}
.auth-pw-labelrow { display: flex; align-items: center; justify-content: space-between; }
.auth-pw-toggle {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: var(--text-xs); font-weight: 600;
  color: var(--brand-navy); padding: 2px 4px; border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.auth-pw-toggle:hover { color: var(--brand-navy-mid); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 2px; }
.auth-field-err {
  font-size: var(--text-xs);
  color: var(--strength-weak, #e5484d);
  min-height: 0;
  line-height: 1.4;
}
.auth-field-err:empty { display: none; }
.auth-email-submit {
  width: 100%;
  margin-top: 2px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--brand-navy);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.auth-email-submit:hover {
  background: var(--brand-navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(46, 56, 165, 0.32);
}
.auth-email-submit:active { transform: translateY(0); }
.auth-email-submit:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.auth-toggle-row {
  font-size: var(--text-sm);
  color: var(--light-muted);
  text-align: center;
  margin-bottom: var(--space-sm);
}
.auth-toggle-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: var(--text-sm); font-weight: 600;
  color: var(--brand-navy); padding: 0 2px;
  transition: color var(--transition);
}
.auth-toggle-link:hover { color: var(--brand-navy-mid); text-decoration: underline; }
.auth-toggle-link:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Home-nav logged-in chip */
.nav-user {
  display: flex; align-items: center; gap: 8px;
  margin-right: var(--space-md);
}
.nav-user[hidden] { display: none; }
.nav-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy-mid), var(--brand-teal));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; color: #fff; flex-shrink: 0;
}
.nav-user-name {
  font-size: var(--text-sm); font-weight: 600; color: var(--light-text);
  max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-nav.scrolled .nav-user-name { color: var(--light-text); }
.nav-logout {
  background: none; border: 1px solid var(--light-border); cursor: pointer;
  font-family: inherit; font-size: var(--text-xs); font-weight: 600;
  color: var(--light-muted); padding: 5px 10px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-logout:hover { color: var(--brand-navy); border-color: var(--brand-navy); }
.nav-logout:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 2px; }

/* Sidebar logout button (post-login app shell) */
.sb-logout {
  margin-left: auto; flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--dark-border); border-radius: var(--radius-sm);
  color: var(--dark-muted); cursor: pointer;
  transition: all var(--transition);
}
.sb-logout:hover { color: var(--brand-teal); border-color: var(--brand-teal); background: rgba(0, 201, 160, 0.08); }
.sb-logout:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }

/* ════════════════════════════════════════════════ APP SHELL (post-login) */
.app-shell {
  min-height: 100svh;
  width: 100%;
  background: var(--dark-bg);
  color: var(--dark-text);
}
.app-shell { display: flex; }

/* Sidebar */
.sidebar {
  width: 252px;
  flex-shrink: 0;
  background: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100svh;
}
.sb-head {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--dark-border);
}
.sb-logo { height: 26px; }
.sb-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
}
/* Requisition list */
.req-list { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--space-sm); overflow-y: auto; flex: 1; }
.req-item {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
}
.req-item:hover { background: var(--dark-card); }
.req-item.active { background: var(--dark-card); border-color: var(--brand-teal); }
.req-item-role { font-size: var(--text-sm); font-weight: 600; color: var(--dark-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-item-client { font-size: var(--text-xs); color: var(--dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.req-item-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
  margin-top: 6px; color: var(--dark-muted);
}
.req-item-status .sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-teal); }
.req-item-status.sourcing .sdot { animation: pulse-dot 1.4s infinite; }
.req-item-status.complete .sdot { background: #22c55e; }
.req-item-status.cancelled .sdot { background: var(--strength-weak); }
.req-item.cancelled .req-item-role { text-decoration: line-through; opacity: 0.55; }

.sb-add {
  margin: var(--space-md) var(--space-sm) ;
  padding: 11px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-teal);
  background: transparent;
  border: 1px dashed rgba(0,201,160,0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.sb-add:hover { background: rgba(0,201,160,0.08); border-style: solid; }
.sb-foot {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--dark-border);
  display: flex; align-items: center; gap: 10px;
}
.sb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy-mid), var(--brand-teal));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; color: #fff; flex-shrink: 0;
}
.sb-user-name { font-size: var(--text-sm); font-weight: 600; color: var(--dark-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-mail { font-size: 10px; color: var(--dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main content area */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--dark-bg);
}
.app-topbar {
  height: 56px;
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  gap: var(--space-md);
  background: var(--dark-surface);
  position: sticky; top: 0; z-index: 50;
}
.mobile-menu-btn {
  display: none;
  background: none; border: none; color: var(--dark-text);
  font-size: 22px; cursor: pointer; padding: 4px; line-height: 1;
}
.app-tabs { display: flex; gap: 4px; }
.app-tab {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark-muted);
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.app-tab:hover { color: var(--dark-text); background: var(--dark-card); }
.app-tab.active { color: var(--brand-teal); background: rgba(0,201,160,0.1); }
.topbar-spacer { flex: 1; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 600;
  color: var(--brand-teal);
  border: 1px solid var(--brand-teal);
  padding: 4px 10px; border-radius: 999px;
}
.live-pill .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-teal); animation: pulse-dot 1.5s infinite; }
.live-pill.complete { color: #22c55e; border-color: #22c55e; }
.live-pill.complete .sdot { background: #22c55e; animation: none; }
.live-pill.cancelled { color: var(--strength-weak); border-color: var(--strength-weak); }
.live-pill.cancelled .sdot { background: var(--strength-weak); animation: none; }

.app-scroll { flex: 1; overflow-y: auto; padding: var(--space-lg); }
.tab-panel { display: none; max-width: 1100px; margin: 0 auto; }
.tab-panel.active { display: block; }

/* Primer banner */
.primer-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(135deg, rgba(46,56,165,0.25), rgba(0,201,160,0.12));
  border: 1px solid rgba(0,201,160,0.35);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}
.primer-spinner {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 2.5px solid rgba(0,201,160,0.25);
  border-top-color: var(--brand-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.primer-text { flex: 1; min-width: 0; }
.primer-title { font-size: var(--text-sm); font-weight: 700; color: var(--dark-text); }
.primer-sub { font-size: var(--text-xs); color: var(--dark-muted); margin-top: 2px; line-height: 1.4; }
.primer-banner.reconciled {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.35);
}
.primer-banner.reconciled .primer-spinner { display: none; }
.primer-check { display: none; font-size: 20px; color: #22c55e; flex-shrink: 0; }
.primer-banner.reconciled .primer-check { display: block; }

/* Progressive numeration: funnel numbers tick + flash as they reconcile.
   (No estimate/EST treatment — warming numbers carry no label.) */
.num-flash { animation: numflash 0.6s ease; }
@keyframes numflash {
  0% { color: var(--brand-teal); text-shadow: 0 0 12px rgba(0,201,160,0.6); }
  100% { color: var(--dark-text); text-shadow: none; }
}

/* Job Details panel */
.jd-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.jd-card h3 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--dark-border);
}
.jd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}
.jd-field .jd-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dark-muted); margin-bottom: 4px;
}
.jd-field .jd-value { font-size: var(--text-base); color: var(--dark-text); font-family: 'JetBrains Mono', monospace; word-break: break-word; }
.jd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-tag { font-size: var(--text-xs); font-weight: 500; background: var(--brand-navy); color: #fff; padding: 3px 9px; border-radius: 4px; }
.jd-tag.nice { background: rgba(0,201,160,0.18); color: var(--brand-teal); }

/* Control buttons row */
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.ctrl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--dark-border);
  background: var(--dark-card);
  color: var(--dark-text);
}
.ctrl-btn:hover { border-color: var(--dark-muted); transform: translateY(-1px); }
.ctrl-btn.danger { color: #fca5a5; border-color: rgba(239,68,68,0.4); }
.ctrl-btn.danger:hover { background: rgba(239,68,68,0.12); border-color: var(--strength-weak); }
.ctrl-btn.warn { color: var(--brand-gold); border-color: rgba(245,166,35,0.4); }
.ctrl-btn.warn:hover { background: rgba(245,166,35,0.1); }
.ctrl-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Candidate table (pipeline tab) */
.cand-table-wrap { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-lg); overflow: hidden; }
.cand-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--dark-border);
}
.cand-head h3 { font-size: var(--text-sm); font-weight: 700; color: var(--dark-text); }
.cand-head .cand-count { font-size: var(--text-xs); color: var(--dark-muted); font-family: 'JetBrains Mono', monospace; }
.cand-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-md);
  align-items: center;
  padding: 12px var(--space-lg);
  border-bottom: 1px solid var(--dark-border);
  transition: background var(--transition);
}
.cand-row:last-child { border-bottom: none; }
.cand-row:hover { background: rgba(255,255,255,0.02); }
.cand-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cand-ava {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand-navy-mid), var(--brand-teal));
}
.cand-meta { min-width: 0; }
.cand-name { font-size: var(--text-sm); font-weight: 600; color: var(--dark-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-title { font-size: var(--text-xs); color: var(--dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-score { font-family: 'JetBrains Mono', monospace; font-size: var(--text-sm); font-weight: 700; color: var(--brand-teal); }
.cand-stage {
  font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(46,56,165,0.25); color: #aab4f0; white-space: nowrap;
}
.cand-cancel {
  background: none; border: none; color: var(--dark-muted); cursor: pointer;
  font-size: 16px; padding: 4px; border-radius: 4px; line-height: 1; transition: all var(--transition);
}
.cand-cancel:hover { color: var(--strength-weak); background: rgba(239,68,68,0.1); }
.cand-row.cancelled { opacity: 0.4; }
.cand-row.cancelled .cand-name { text-decoration: line-through; }

/* Cancelled / empty overlay state for a req */
.req-cancelled-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--dark-muted);
}
.req-cancelled-state .big { font-size: 40px; margin-bottom: var(--space-md); }
.req-cancelled-state h3 { color: var(--dark-text); font-size: var(--text-lg); margin-bottom: var(--space-sm); }

/* ── Confirm dialog ─────────────────────────────────────────────── */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,10,16,0.7);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center; justify-content: center;
  padding: var(--space-lg);
}
.dialog-backdrop.open { display: flex; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: 100%; max-width: 380px;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
  transform: scale(0.96);
  animation: pop 0.2s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes pop { to { transform: scale(1); } }
.dialog-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: var(--space-md);
  background: rgba(239,68,68,0.15);
}
.dialog-icon.warn { background: rgba(245,166,35,0.15); }
/* .go = positive launch confirm (T-3583): brand-teal, exciting not scary. */
.dialog-icon.go { background: rgba(0,201,160,0.16); color: var(--brand-teal); }
.dialog h3 { font-size: var(--text-md); font-weight: 700; color: var(--dark-text); margin-bottom: var(--space-sm); }
.dialog p { font-size: var(--text-sm); line-height: 1.55; color: var(--dark-muted); margin-bottom: var(--space-lg); }
.dialog-actions { display: flex; gap: var(--space-md); }
.dialog-actions button { flex: 1; padding: 11px; font-family: inherit; font-size: var(--text-sm); font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.dlg-cancel { background: var(--dark-card); border: 1px solid var(--dark-border); color: var(--dark-text); }
.dlg-cancel:hover { border-color: var(--dark-muted); }
.dlg-confirm { background: var(--strength-weak); border: 1px solid var(--strength-weak); color: #fff; }
.dlg-confirm:hover { background: #dc2626; }
.dlg-confirm.warn { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--dark-bg); }
.dlg-confirm.warn:hover { background: #e0941d; }
/* Positive launch CTA (T-3583): brand teal, the "Let's Go!" button. */
.dlg-confirm.go { background: var(--brand-teal); border-color: var(--brand-teal); color: var(--dark-bg); }
.dlg-confirm.go:hover { background: #00e0b3; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
  font-size: var(--text-sm);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 600;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .tcheck { color: var(--brand-teal); margin-right: 8px; }

/* Sidebar mobile overlay backdrop */
.sb-backdrop {
  position: fixed; inset: 0; z-index: 140; background: rgba(0,0,0,0.5); display: none;
}
.sb-backdrop.open { display: block; }

/* ── Expanded form (post-login) wrapper on dark shell ───────────── */
.app-scroll .intake-form { max-width: 820px; margin: 0 auto; }
.app-scroll .intake-hero { max-width: 820px; margin: 0 auto var(--space-xl); }
.app-scroll .intake-hero .intake-title { color: #fff; }
.app-scroll .intake-hero .intake-subtitle { color: var(--dark-muted); }
/* Dark-mode form fields inside app shell */
.app-scroll .form-section { background: var(--dark-card); border-color: var(--dark-border); box-shadow: none; }
.app-scroll .form-section-label { color: var(--brand-teal); }
.app-scroll label { color: var(--dark-text); }
.app-scroll input[type="text"],
.app-scroll input[type="number"],
.app-scroll input[type="date"],
.app-scroll textarea,
.app-scroll select {
  background: var(--dark-bg); border-color: var(--dark-border); color: var(--dark-text);
}
.app-scroll input::placeholder, .app-scroll textarea::placeholder { color: #5a6580; }
.app-scroll .select-wrapper::after { color: var(--dark-muted); }
.app-scroll input:focus, .app-scroll textarea:focus, .app-scroll select:focus {
  border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(0,201,160,0.15);
}
.app-scroll .tag-input-wrapper { background: var(--dark-bg); border-color: var(--dark-border); }
.app-scroll .tag-input { color: var(--dark-text); }
.app-scroll .field-hint { color: var(--dark-muted); }
.app-scroll .strength-wrapper { background: var(--dark-card); border-color: var(--dark-border); box-shadow: none; }
.app-scroll .strength-label { color: var(--dark-text); }
.app-scroll .strength-track { background: var(--dark-border); }
.app-scroll .submit-note { color: var(--dark-muted); }

/* ════════════════════════════════════════════════ RESPONSIVE */
@media (max-width: 860px) {
  .why-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  /* Sidebar becomes slide-over */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    width: 80vw; max-width: 300px;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: block; }
  .app-scroll { padding: var(--space-md); }
}
@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .story { padding: var(--space-xl) var(--space-md); }
  .proof-inner { padding: var(--space-xl) var(--space-md); }
  .cand-row { grid-template-columns: 1fr auto auto; }
  .cand-row .cand-score { display: none; }
  .hero { padding: 88px var(--space-md) var(--space-xl); }
  /* On narrow screens, tabs take priority; collapse the live pill to a dot */
  .live-pill span:not(.sdot) { display: none; }
  .live-pill { padding: 6px; }
  .app-topbar { padding: 0 var(--space-md); gap: var(--space-sm); }
  .app-tab { padding: 8px 10px; }
  .control-row .ctrl-btn { flex: 1; justify-content: center; min-width: 0; }
}

/* ════════════════════════════════════════════════ FORM-MODE — white surface to match homepage (T-3235, Michael) */
/* When the New Requisition form is showing, the whole app shell goes light/white like the homepage.
   The Candidate Pipeline + Job Details views stay dark (intentional internal-dashboard look). */
.app-shell.form-mode { background: var(--light-bg); color: var(--light-text); }
.app-shell.form-mode .app-main { background: var(--light-bg); }
.app-shell.form-mode .sidebar { background: #fff; border-right-color: var(--light-border); }
.app-shell.form-mode .sb-head { border-bottom-color: var(--light-border); }
.app-shell.form-mode .sb-section-label { color: var(--light-muted); }
.app-shell.form-mode .req-item-role { color: var(--light-text); }
.app-shell.form-mode .req-item-client,
.app-shell.form-mode .req-item-status { color: var(--light-muted); }
.app-shell.form-mode .req-item:hover,
.app-shell.form-mode .req-item.active { background: #eef0f8; }
.app-shell.form-mode .req-item.active { border-color: var(--brand-teal); }
.app-shell.form-mode .sb-foot { border-top-color: var(--light-border); }
.app-shell.form-mode .sb-user-name { color: var(--light-text); }
.app-shell.form-mode .sb-user-mail { color: var(--light-muted); }

/* Top status bar — always visible, light to match the white form */
.app-shell.form-mode .app-topbar {
  background: #fff;
  border-bottom-color: var(--light-border);
  position: sticky; top: 0; z-index: 50;
}
.app-shell.form-mode .app-tab { color: var(--light-muted); }
.app-shell.form-mode .app-tab:hover { color: var(--light-text); background: #eef0f8; }
.app-shell.form-mode .app-tab.active { color: var(--brand-navy); background: rgba(46,56,165,0.08); }
.app-shell.form-mode .mobile-menu-btn { color: var(--light-text); }

/* Form panel content — white surface, dark text */
.app-shell.form-mode .intake-hero .intake-title { color: var(--light-text); }
.app-shell.form-mode .intake-hero .intake-subtitle { color: var(--light-muted); }
.app-shell.form-mode .form-section {
  background: #fff;
  border-color: var(--light-border);
  box-shadow: 0 1px 3px rgba(26,29,46,0.06);
}
.app-shell.form-mode .form-section-label { color: var(--brand-navy); }
.app-shell.form-mode .form-field label { color: var(--light-text); }
.app-shell.form-mode .form-field input,
.app-shell.form-mode .form-field select,
.app-shell.form-mode .form-field textarea {
  background: var(--light-bg);
  border: 1.5px solid var(--light-border);
  color: var(--light-text);
}
.app-shell.form-mode .form-field input::placeholder,
.app-shell.form-mode .form-field textarea::placeholder { color: var(--light-muted); }
.app-shell.form-mode .form-field input:focus,
.app-shell.form-mode .form-field select:focus,
.app-shell.form-mode .form-field textarea:focus { border-color: var(--brand-navy); }
.app-shell.form-mode .select-wrapper::after { color: var(--light-muted); }
.app-shell.form-mode .live-pill { color: var(--brand-navy); border-color: var(--brand-navy); }
.app-shell.form-mode .live-pill .sdot { background: var(--brand-navy); }
/* form-mode: skill tag inputs light too */
.app-shell.form-mode .tag-input-wrapper { background: var(--light-bg); border-color: var(--light-border); }
.app-shell.form-mode .tag-input { color: var(--light-text); }
.app-shell.form-mode .tag-input::placeholder { color: var(--light-muted); }

/* ═══════════════════════════════════════════════════════════════════
   STREAM1 ADDITIONS — Settings, Left Nav, 8-Stage Funnel, Channels 2up,
   Candidate Expand/Collapse, Outreach Stages, Sticky Banner
═══════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════ ITEM 4: STATUS BANNER STICKY TO TOP */
/* The primer banner is moved OUT of app-scroll and anchored just below
   the topbar via position:sticky. It is always visible on pipeline/details. */
.primer-banner.primer-sticky {
  position: sticky;
  top: 0;
  z-index: 45;
  /* override any margin that would push it down */
  margin-bottom: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  /* keep the gradient but flatten the radius */
  background: linear-gradient(135deg, rgba(46,56,165,0.30), rgba(0,201,160,0.14));
  border-top: none;
  border-bottom: 1px solid rgba(0,201,160,0.35);
  transition: background 0.4s ease, border-color 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
}
.primer-banner.primer-sticky.reconciled {
  background: rgba(34,197,94,0.12);
  border-bottom-color: rgba(34,197,94,0.35);
}
/* When banner should be invisible (settings/form) — keep it in DOM but hide visually */
.primer-banner.primer-sticky[style*="visibility: hidden"] {
  height: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}

/* ════════════════════════════════ ITEM 1 + 3: LEFT NAV & GEAR */
/* Gear button in topbar */
.topbar-gear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.topbar-gear:hover {
  color: var(--brand-teal);
  border-color: var(--brand-teal);
  background: rgba(0,201,160,0.08);
}

/* Sidebar bottom area for settings nav */
.sb-nav-bottom {
  margin-top: auto;
  border-top: 1px solid var(--dark-border);
  padding-top: var(--space-sm);
}
/* form-mode: adjust sb-nav-bottom border */
.app-shell.form-mode .sb-nav-bottom {
  border-top-color: var(--light-border);
}

/* Primary nav items in sidebar */
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-sm);
}
.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--dark-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.sb-nav-item:hover {
  color: var(--dark-text);
  background: var(--dark-card);
}
.sb-nav-item.active {
  color: var(--brand-teal);
  background: rgba(0,201,160,0.1);
  border-color: rgba(0,201,160,0.2);
  font-weight: 600;
}
.sb-nav-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}
.sb-nav-settings {
  margin: var(--space-sm) var(--space-sm) var(--space-xs);
}

/* form-mode sidebar nav */
.app-shell.form-mode .sb-nav-item {
  color: var(--light-muted);
}
.app-shell.form-mode .sb-nav-item:hover {
  color: var(--light-text);
  background: #eef0f8;
}
.app-shell.form-mode .sb-nav-item.active {
  color: var(--brand-navy);
  background: rgba(46,56,165,0.08);
  border-color: rgba(46,56,165,0.2);
}
.app-shell.form-mode .topbar-gear {
  color: var(--light-muted);
  border-color: var(--light-border);
}
.app-shell.form-mode .topbar-gear:hover {
  color: var(--brand-navy);
  border-color: var(--brand-navy);
  background: rgba(46,56,165,0.06);
}

/* ════════════════════════════════ ITEM 5: 8-STAGE FUNNEL */
/* Force single horizontal row; horizontal scroll OK on mobile */
.funnel-8 {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  /* Hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: rgba(0,201,160,0.3) transparent;
}
.funnel-8::-webkit-scrollbar {
  height: 4px;
}
.funnel-8::-webkit-scrollbar-thumb {
  background: rgba(0,201,160,0.3);
  border-radius: 2px;
}
.funnel-8 .funnel-stage {
  flex: 0 0 100px;
  min-width: 80px;
  max-width: 130px;
}
.funnel-8 .funnel-arrow {
  flex-shrink: 0;
}
/* Override the 480px wrapping rule for funnel-8 */
@media (max-width: 480px) {
  .funnel-8 {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
  .funnel-8 .funnel-stage {
    flex: 0 0 82px !important;
    min-width: 78px !important;
    max-width: 90px !important;
    padding: 10px 6px 8px !important;
  }
  .funnel-8 .funnel-arrow {
    display: flex !important;
  }
  .funnel-8 .funnel-stage-name {
    font-size: 8px;
    letter-spacing: 0.04em;
  }
  .funnel-8 .funnel-stage-num {
    font-size: 18px;
  }
}

/* ════════════════════════════════ ITEM 6: CHANNEL CARDS 2-UP */
.channels-grid-2up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 480px) {
  .channels-grid-2up {
    grid-template-columns: 1fr 1fr;
  }
}

/* ════════════════════════════════ ITEM 7: CANDIDATE EXPAND/COLLAPSE */
.cand-row-wrap {
  border-bottom: 1px solid var(--dark-border);
}
.cand-row-wrap:last-child {
  border-bottom: none;
}
.cand-row-wrap.cancelled {
  opacity: 0.45;
}
.cand-row-wrap.cancelled .cand-name {
  text-decoration: line-through;
}

/* Summary row */
.cand-row.cand-row-summary {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: var(--space-sm);
  align-items: center;
  padding: 12px var(--space-lg);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.cand-row.cand-row-summary:hover {
  background: rgba(255,255,255,0.02);
}
.cand-row-wrap.expanded .cand-row-summary {
  background: rgba(0,201,160,0.05);
}

/* Expand icon rotates when open */
.cand-expand-icon {
  color: var(--dark-muted);
  font-size: 18px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Detail area — collapsed by default */
.cand-detail {
  display: none;
  padding: 0 var(--space-lg) var(--space-md);
  border-top: 1px solid var(--dark-border);
  background: rgba(0,0,0,0.15);
  overflow-x: auto;
}
.cand-row-wrap.expanded .cand-detail {
  display: block;
}

.cand-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  padding: var(--space-md) 0 var(--space-sm);
  min-width: 560px; /* allows horizontal scroll on very narrow screens */
}
.cand-detail-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cand-detail-wide {
  grid-column: span 2;
}
.cand-detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-muted);
}
.cand-detail-val {
  font-size: var(--text-sm);
  color: var(--dark-text);
  word-break: break-word;
}
.cand-score-large {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--brand-teal);
}
.cand-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xs);
}
.cand-link {
  color: var(--brand-teal);
  text-decoration: none;
  word-break: break-all;
}
.cand-link:hover {
  text-decoration: underline;
}
.cand-detail-actions {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  flex-wrap: wrap;
}
.cand-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--dark-border);
  background: var(--dark-card);
  color: var(--dark-text);
}
.cand-action-btn:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
  background: rgba(0,201,160,0.07);
}

/* ════════════════════════════════ ITEM 8: OUTREACH STAGES */
.outreach-section {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow: hidden;
}
.outreach-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.outreach-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-teal);
}
.outreach-sub {
  font-size: var(--text-xs);
  color: var(--dark-muted);
}
.outreach-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}
@media (max-width: 720px) {
  .outreach-tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .outreach-tiers {
    grid-template-columns: 1fr 1fr;
  }
}
.outreach-tier {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.outreach-tier-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.outreach-tier-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: 0.04em;
}
.outreach-tier-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.outreach-tier-bar-track {
  height: 4px;
  background: var(--dark-border);
  border-radius: 2px;
  overflow: hidden;
}
.outreach-tier-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.34,1.56,0.64,1);
}
.outreach-tier-desc {
  font-size: 10px;
  color: var(--dark-muted);
}

/* ════════════════════════════════ ITEM 2: SETTINGS PANEL */
.settings-panel {
  padding: 0;
}
.settings-layout {
  display: flex;
  gap: 0;
  min-height: calc(100svh - 120px);
}
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--dark-border);
  padding: var(--space-lg) var(--space-sm) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--dark-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  white-space: nowrap;
}
.settings-nav-item:hover {
  color: var(--dark-text);
  background: var(--dark-card);
}
.settings-nav-item.active {
  color: var(--brand-teal);
  background: rgba(0,201,160,0.1);
  border-color: rgba(0,201,160,0.2);
  font-weight: 600;
}
.settings-content {
  flex: 1;
  min-width: 0;
  padding: var(--space-lg) var(--space-xl);
  overflow-y: auto;
}
.settings-pane {
  display: none;
  max-width: 680px;
}
.settings-pane.active {
  display: block;
}
.settings-pane-header {
  margin-bottom: var(--space-xl);
}
.settings-pane-header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.settings-pane-header p {
  font-size: var(--text-sm);
  color: var(--dark-muted);
  line-height: 1.5;
}
.settings-section {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.settings-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-teal);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: var(--space-lg);
}

/* Settings form rows */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.settings-form-row {
  display: grid;
  gap: var(--space-md);
}
.settings-form-row.two-col {
  grid-template-columns: 1fr 1fr;
}
/* Dark form fields inside settings */
.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="tel"],
.settings-form input[type="url"],
.settings-form input[type="password"],
.settings-form select,
.settings-form textarea {
  background: var(--dark-bg);
  border: 1.5px solid var(--dark-border);
  color: var(--dark-text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.settings-form input::placeholder,
.settings-form textarea::placeholder { color: #5a6580; }
.settings-form select { padding-right: 32px; cursor: pointer; }
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(0,201,160,0.15);
}
.settings-form label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark-text);
  display: block;
  margin-bottom: 4px;
}
.settings-form textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.settings-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}
.btn-settings-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--brand-navy);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-settings-save:hover {
  background: var(--brand-navy-mid);
  transform: translateY(-1px);
}
.settings-save-note {
  font-size: 10px;
  color: var(--dark-muted);
  font-style: italic;
}

/* Profile photo section */
.profile-photo-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.profile-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy-mid), var(--brand-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.profile-photo-initials {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-photo-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  justify-content: center;
}
.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-teal);
  background: transparent;
  border: 1px solid rgba(0,201,160,0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-upload:hover {
  background: rgba(0,201,160,0.08);
  border-color: var(--brand-teal);
}
.btn-remove-photo {
  font-family: inherit;
  font-size: var(--text-xs);
  color: var(--dark-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
  display: inline-flex;
}
.btn-remove-photo:hover { color: var(--strength-weak); }
.profile-photo-hint {
  font-size: 10px;
  color: var(--dark-muted);
  line-height: 1.4;
  margin: 0;
}

/* Toggle switch (Notifications / Security) */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--dark-border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s ease;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--brand-teal);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--dark-border);
}
.notif-row:last-child { border-bottom: none; }
.notif-info { flex: 1; min-width: 0; }
.notif-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 2px;
}
.notif-desc {
  font-size: var(--text-xs);
  color: var(--dark-muted);
  line-height: 1.4;
}

/* Team members */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.team-member {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--dark-border);
}
.team-member:last-child { border-bottom: none; }
.team-member-ava {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy-mid), var(--brand-teal));
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; color: #fff; flex-shrink: 0;
}
.team-member-info { flex: 1; min-width: 0; }
.team-member-name {
  font-size: var(--text-sm); font-weight: 600; color: var(--dark-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-member-email {
  font-size: var(--text-xs); color: var(--dark-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-member-role {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; flex-shrink: 0;
}
.team-member-role.owner {
  color: var(--brand-teal);
  background: rgba(0,201,160,0.12);
  border: 1px solid rgba(0,201,160,0.3);
}

/* Billing early access card */
.early-access-card {
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(46,56,165,0.15), rgba(0,201,160,0.08));
  border: 1px solid rgba(0,201,160,0.25);
  border-radius: var(--radius-md);
}
.ea-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-gold);
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: var(--space-md);
}
.early-access-card h3 {
  font-size: var(--text-md); font-weight: 700; color: var(--dark-text);
  margin-bottom: var(--space-sm);
}
.early-access-card p {
  font-size: var(--text-sm); color: var(--dark-muted); line-height: 1.5;
  margin-bottom: var(--space-lg);
}
.ea-perks {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm);
}
.ea-perk {
  font-size: var(--text-sm); font-weight: 500;
  color: var(--brand-teal);
}

/* Danger zone */
.danger-zone-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg); flex-wrap: wrap;
  padding: var(--space-md);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-md);
  background: rgba(239,68,68,0.05);
}
.danger-zone-title {
  font-size: var(--text-sm); font-weight: 700;
  color: #fca5a5; margin-bottom: 3px;
}
.danger-zone-desc {
  font-size: var(--text-xs); color: var(--dark-muted); line-height: 1.4;
}
.btn-danger-zone {
  font-family: inherit; font-size: var(--text-sm); font-weight: 600;
  padding: 9px 16px;
  color: #fca5a5; background: transparent;
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition); flex-shrink: 0;
  white-space: nowrap;
}
.btn-danger-zone:hover:not(:disabled) {
  background: rgba(239,68,68,0.12); border-color: var(--strength-weak);
}
.btn-danger-zone:disabled { opacity: 0.4; cursor: not-allowed; }

/* Security sessions */
.session-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); flex-wrap: wrap;
  padding: var(--space-md) 0;
}
.session-device {
  font-size: var(--text-sm); font-weight: 600; color: var(--dark-text);
  margin-bottom: 2px;
}
.session-meta { font-size: var(--text-xs); color: var(--dark-muted); }
.session-current-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; flex-shrink: 0;
  color: var(--brand-teal);
  background: rgba(0,201,160,0.12);
  border: 1px solid rgba(0,201,160,0.3);
}

/* ════════════════════════════════ SETTINGS RESPONSIVE */
@media (max-width: 700px) {
  .settings-layout { flex-direction: column; }
  .settings-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--dark-border);
    flex-direction: row;
    flex-wrap: wrap;
    padding: var(--space-sm);
    gap: 4px;
  }
  .settings-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: var(--text-xs);
    padding: 7px 10px;
  }
  .settings-content { padding: var(--space-md); }
  .settings-form-row.two-col { grid-template-columns: 1fr; }
  .ea-perks { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .settings-nav-item span:not(.sb-nav-icon) { display: inline; }
}


/* ── Homepage hero demo video (T-3810: June 2 brand demo under CTA) ── */
.hero-demo{
  margin: clamp(28px, 4vw, 44px) auto 0;
  max-width: 760px;
  width: 100%;
}
.hero-demo-video{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: #05071a;
  box-shadow: 0 24px 70px -24px rgba(110,86,255,.55), 0 0 0 1px rgba(255,255,255,.06);
}
.hero-demo-cap{
  margin: 12px 0 0;
  font-size: clamp(13px, 2vw, 14px);
  color: var(--light-muted, #aeb4d6);
  text-align: center;
  letter-spacing: .01em;
}
@media (max-width: 640px){
  .hero-demo{ margin-top: 24px; }
  .hero-demo-video{ border-radius: 12px; }
  /* T-3902: stop scroll-hint overlapping the video caption on mobile.
     Drop it into normal flow below the demo with clear breathing room. */
  .scroll-hint{
    position: static;
    transform: none;
    margin: 28px auto 4px;
    animation: none;
  }
}
