/* ==========================================================================
   HireSense AI — single stylesheet for the whole app.
   Source of truth: the HireSense design pack (theme.css), merged with the
   compatibility rules the PHP templates need. Inter is loaded from the
   <head> in includes/header.php; icons come from Font Awesome (same CDN as
   the design) plus the small inline-SVG set in includes/icons.php that the
   interview room uses.
   ========================================================================== */

/* ===== RESET & TOKENS ===== */
* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --ink:#14152B; --sub:#6B7089; --line:#E6E4F2;
  --surface:#FFFFFF; --backdrop:#F6F5FD;
  --brand:#6D28D9; --brand-2:#06AED4;
  --red:#DC2626; --red-tint:#FEECEC;
  --blue:#2563EB; --blue-tint:#EFF4FF;
  --green:#15803D; --green-tint:#E7F8EC;
  --yellow:#D97706; --yellow-tint:#FEF3C7;
  --shadow-sm: 0 1px 3px rgba(20,21,43,0.05);
  --shadow-md: 0 20px 48px -28px rgba(20,21,43,0.16);
  --shadow-lg: 0 24px 48px -24px rgba(220,38,38,0.28);
}

body {
  font-family:'Inter', sans-serif;
  background: var(--backdrop);
  color: var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a { text-decoration:none; color:inherit; }
.container { max-width:1240px; margin:0 auto; padding:0 24px; }
.text-center { text-align:center; }
.text-muted { color:var(--sub); }
.small { font-size:13px; }
.mb-0 { margin-bottom:0; }

h1,h2,h3,h4 { font-weight:700; letter-spacing:-0.02em; }

/* ===== NAVBAR ===== */
.navbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 0; border-bottom:1px solid var(--line);
  flex-wrap:wrap; gap:16px;
  position:sticky; top:0; z-index:50;
  background:rgba(246,245,253,0.86);
  backdrop-filter:blur(10px);
}
.logo { display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; letter-spacing:-0.5px; }
.logo-icon {
  width:34px; height:34px;
  background:linear-gradient(135deg, var(--red), #F97316);
  border-radius:9px; display:flex; align-items:center; justify-content:center;
  color:white; font-size:16px;
}
.logo span {
  background:linear-gradient(135deg, var(--red), #F97316);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.nav-links { display:flex; gap:28px; font-weight:500; font-size:14.5px; }
.nav-links a { transition:color .15s; }
.nav-links a:hover { color:var(--red); }
.nav-actions { display:flex; gap:12px; align-items:center; }

.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 22px; border-radius:40px;
  font-weight:600; font-size:14px; border:none; cursor:pointer;
  transition:transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn-primary {
  background:linear-gradient(135deg, var(--red), #F97316);
  color:white;
  box-shadow:0 4px 12px rgba(220,38,38,0.25);
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(220,38,38,0.4); }
.btn-secondary {
  background:transparent; border:1.5px solid var(--line); color:var(--ink);
}
.btn-secondary:hover { background:#ffffff80; border-color:var(--red); }
.btn-block { width:100%; justify-content:center; }
.btn-large { padding:14px 28px; font-size:15px; border-radius:44px; }

/* ===== HERO ===== */
.hero {
  display:grid; grid-template-columns:1.05fr 0.95fr;
  gap:56px; align-items:center;
  padding:72px 0 56px;
}

.hero h1 {
  font-size:56px; line-height:1.06; letter-spacing:-1.8px;
  margin-bottom:22px;
}
.hero .lede {
  font-size:16.5px; color:var(--sub);
  max-width:52ch; line-height:1.65; margin-bottom:34px;
}
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:24px; }
.hero-note {
  display:flex; align-items:center; gap:10px;
  font-size:13px; color:var(--sub);
}
.hero-note i { color:var(--green); }

/* ===== HERO VISUAL ===== */
.hero-visual { position:relative; }

.hero-blob {
  position:absolute; border-radius:50%; z-index:0; pointer-events:none;
}
.hero-blob-blue {
  width:200px; height:200px; top:-40px; right:-40px;
  background:radial-gradient(circle, #06AED433, transparent 70%);
}
.hero-blob-green {
  width:160px; height:160px; bottom:-30px; left:-30px;
  background:radial-gradient(circle, #15803D33, transparent 70%);
}
.hero-blob-yellow {
  width:120px; height:120px; top:40%; right:20%;
  background:radial-gradient(circle, #D9770633, transparent 70%);
}

.hero-chip {
  position:absolute; z-index:2;
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:40px;
  font-size:12px; font-weight:600;
  background:var(--surface); border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
}
.hero-chip-top { top:-12px; right:20px; color:var(--green); }
.hero-chip-bottom { bottom:-12px; left:20px; color:var(--blue); }

.mock-room {
  position:relative; z-index:1;
  background:var(--surface); border:1px solid var(--line);
  border-radius:20px; padding:0; overflow:hidden;
  box-shadow:var(--shadow-sm), var(--shadow-lg);
}
.mock-room-head {
  padding:16px 22px;
  background:linear-gradient(135deg, #14152B, #1E1B4B);
  color:white;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12.5px;
}
.mock-live {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(220,38,38,0.2); color:#FCA5A5;
  padding:4px 12px; border-radius:40px; font-weight:600; font-size:11px;
  letter-spacing:.5px;
}
.mock-live .dot {
  width:6px; height:6px; border-radius:50%; background:#F87171;
  animation:pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; }
  50% { opacity:.4; }
}

.timeline { padding:22px 24px; display:flex; flex-direction:column; gap:18px; }
.timeline-item {
  padding-left:22px; position:relative;
}
.timeline-item::before {
  content:''; position:absolute; left:0; top:4px; bottom:-18px;
  width:1px; background:var(--line);
}
.timeline-item:last-child::before { display:none; }
.timeline-dot {
  position:absolute; left:-4px; top:4px;
  width:9px; height:9px; border-radius:50%;
  background:var(--line); border:2px solid var(--surface);
}
.timeline-item.is-info .timeline-dot { background:var(--blue); }
.timeline-item.is-success .timeline-dot { background:var(--green); }
.timeline-item.is-flag .timeline-dot { background:var(--red); }

.timeline-label {
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.8px; margin-bottom:4px;
}
.timeline-item.is-info .timeline-label { color:var(--blue); }
.timeline-item.is-success .timeline-label { color:var(--green); }
.timeline-item.is-flag .timeline-label { color:var(--red); }

.timeline-title { font-size:14px; font-weight:600; margin-bottom:3px; }
.timeline-meta { font-size:12px; color:var(--sub); }

/* ===== STEPS SECTION ===== */
.steps-section { padding:80px 0; }
.steps-section h2 { text-align:center; font-size:38px; letter-spacing:-1px; margin-bottom:48px; }
.steps-grid {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:24px;
  max-width:1080px; margin:0 auto;
}
.step-block {
  background:var(--surface); border:1px solid var(--line);
  border-radius:16px; padding:32px 26px; position:relative;
  transition:transform .2s, box-shadow .2s;
}
.step-block:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.step-num {
  position:absolute; top:24px; right:26px;
  font-family:'JetBrains Mono', monospace;
  font-size:13px; font-weight:700; color:var(--sub);
  opacity:.5;
}
.icon-badge {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; margin-bottom:20px;
  color:white;
}
.icon-badge.is-blue { background:linear-gradient(135deg, var(--blue), #3B82F6); box-shadow:0 8px 20px -8px rgba(37,99,235,0.5); }
.icon-badge.is-green { background:linear-gradient(135deg, var(--green), #22C55E); box-shadow:0 8px 20px -8px rgba(21,128,61,0.5); }
.icon-badge.is-yellow { background:linear-gradient(135deg, var(--yellow), #F59E0B); box-shadow:0 8px 20px -8px rgba(217,119,6,0.5); }
.icon-badge.is-red { background:linear-gradient(135deg, var(--red), #F97316); box-shadow:0 8px 20px -8px rgba(220,38,38,0.5); }

.step-block h3 { font-size:17px; margin-bottom:10px; letter-spacing:-0.2px; }
.step-block p { font-size:14.5px; color:var(--sub); line-height:1.65; }

/* ===== AUDIENCE SECTION ===== */
.audience-section { padding:80px 0; background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.audience-section h2 { font-size:38px; letter-spacing:-1px; margin-bottom:16px; }
.audience-section > .container > p { font-size:16px; color:var(--sub); line-height:1.65; margin-bottom:40px; }
.mark {
  background:linear-gradient(135deg, var(--red), #F97316);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  font-weight:600;
}
.audience-grid {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;
}
.audience-card {
  background:var(--backdrop); border:1px solid var(--line);
  border-radius:16px; padding:32px 28px;
  transition:transform .2s, box-shadow .2s;
}
.audience-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.audience-card h3 { font-size:17.5px; margin-bottom:12px; letter-spacing:-0.2px; }
.audience-card p { font-size:14.5px; color:var(--sub); line-height:1.65; }

/* ===== SPOTLIGHT SECTION ===== */
.spotlight-section { padding:80px 0; }
.spotlight-grid {
  display:grid; grid-template-columns:1.15fr 0.85fr; gap:56px; align-items:start;
}
.spotlight-section h2 { font-size:34px; letter-spacing:-1px; margin-bottom:18px; line-height:1.15; }
.spotlight-section > .container > .spotlight-grid > div > p { font-size:15.5px; color:var(--sub); line-height:1.65; }

.spotlight-transcript {
  display:flex; flex-direction:column; gap:18px;
  margin-top:28px;
}
.spotlight-turn {
  padding:18px 22px; border-radius:14px;
  background:var(--surface); border:1px solid var(--line);
}
.spotlight-who {
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.8px; color:var(--sub); margin-bottom:8px;
}
.spotlight-line { font-size:15px; line-height:1.6; }
.spotlight-followup { color:var(--red); font-weight:600; }

.fact-rows { display:flex; flex-direction:column; gap:20px; }
.fact-row {
  display:flex; gap:16px; align-items:flex-start;
  background:var(--surface); border:1px solid var(--line);
  border-radius:14px; padding:22px;
}
.fact-row h3 { font-size:16px; margin-bottom:6px; letter-spacing:-0.2px; }
.fact-row p { font-size:14px; color:var(--sub); line-height:1.6; }

/* ===== REPORT SECTION ===== */
.report-section { padding:80px 0; background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.report-section h2 { font-size:34px; letter-spacing:-1px; }
.report-section > .container > p { font-size:16px; color:var(--sub); max-width:56ch; }

.report-mock {
  max-width:640px; margin:0 auto;
  background:var(--backdrop); border:1px solid var(--line);
  border-radius:18px; padding:28px 30px;
  box-shadow:var(--shadow-sm);
}
.report-mock-head {
  display:flex; justify-content:space-between; align-items:flex-start;
  margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid var(--line);
  flex-wrap:wrap; gap:12px;
}
.report-mock-head h3 { font-size:18px; margin-bottom:4px; }
.report-rec {
  display:inline-flex; align-items:center; gap:6px;
  background:var(--green-tint); color:var(--green);
  padding:7px 16px; border-radius:40px;
  font-size:12.5px; font-weight:700; white-space:nowrap;
}
.report-scores {
  display:grid; grid-template-columns:1fr 1fr; gap:20px;
  margin-bottom:24px;
}
.report-score {
  text-align:center; padding:20px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:12px;
}
.report-score .num {
  font-size:32px; font-weight:800; letter-spacing:-1.2px;
  background:linear-gradient(135deg, var(--red), #F97316);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  margin-bottom:4px;
}
.report-score .label { font-size:12.5px; color:var(--sub); font-weight:600; }

.report-lines { display:flex; flex-direction:column; gap:12px; }
.report-line {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px; background:var(--surface); border:1px solid var(--line);
  border-radius:10px; font-size:14px;
}
.report-line b { font-weight:600; }
.report-line span { color:var(--red); font-weight:700; }

/* ===== PRICING ===== */
#pricing { padding:80px 0; }
.pricing-head { text-align:center; max-width:640px; margin:0 auto 48px; }
.pricing-head h2 { font-size:38px; letter-spacing:-1px; margin-bottom:14px; }
.pricing-head p { font-size:16px; color:var(--sub); line-height:1.6; }

.pricing-grid {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;
  max-width:1080px; margin:0 auto;
}
.pricing-card {
  background:var(--surface); border:1px solid var(--line);
  border-radius:20px; padding:36px 30px; position:relative;
  transition:transform .2s, box-shadow .2s;
}
.pricing-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.pricing-card-featured {
  border-color:var(--red);
  box-shadow:0 20px 48px -24px rgba(220,38,38,0.28);
  transform:scale(1.02);
}
.pricing-card-featured:hover { transform:scale(1.02) translateY(-4px); }
.pricing-tag {
  position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:linear-gradient(135deg, var(--red), #F97316);
  color:white; padding:5px 18px; border-radius:40px;
  font-size:11px; font-weight:700; letter-spacing:.5px;
  text-transform:uppercase; white-space:nowrap;
  box-shadow:0 4px 12px rgba(220,38,38,0.3);
}
.pricing-tier-icon {
  font-size:24px; color:var(--red); margin-bottom:16px;
  display:block;
}
.pricing-card h3 { font-size:20px; margin-bottom:14px; letter-spacing:-0.3px; }
.pricing-price {
  font-size:36px; font-weight:800; letter-spacing:-1.5px;
  margin-bottom:6px;
  background:linear-gradient(135deg, var(--red), #F97316);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.pricing-price sup { font-size:14px; font-weight:600; opacity:.7; }
.pricing-credits {
  font-size:13.5px; color:var(--sub); font-weight:600;
  margin-bottom:24px; padding-bottom:20px;
  border-bottom:1px solid var(--line);
}
.pricing-features {
  list-style:none; display:flex; flex-direction:column; gap:12px;
  margin-bottom:28px;
}
.pricing-features li {
  display:flex; align-items:flex-start; gap:10px;
  font-size:14px; color:var(--sub); line-height:1.5;
}
.pricing-features li i { color:var(--green); margin-top:3px; flex-shrink:0; }

/* ===== FINAL CTA ===== */
.final-cta {
  padding:90px 0;
  background:linear-gradient(135deg, #14152B, #1E1B4B);
  color:white; text-align:center; position:relative; overflow:hidden;
  border-radius:28px; margin:0 0 60px;
}
.final-cta::before {
  content:''; position:absolute; top:-100px; right:-100px; width:400px; height:400px;
  background:radial-gradient(circle, #DC262633, transparent 70%);
  border-radius:50%;
}
.final-cta::after {
  content:''; position:absolute; bottom:-120px; left:-80px; width:350px; height:350px;
  background:radial-gradient(circle, #06AED422, transparent 70%);
  border-radius:50%;
}
.final-cta-content { position:relative; z-index:1; max-width:640px; margin:0 auto; padding:0 24px; }
.final-cta h2 { font-size:40px; line-height:1.15; letter-spacing:-1.2px; margin-bottom:18px; color:white; }
.final-cta p { font-size:16.5px; color:#C9C6E8; line-height:1.65; margin-bottom:36px; }
.final-cta-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.btn-on-dark { border-color:rgba(255,255,255,0.25); color:white; }
.btn-on-dark:hover { background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.5); }

/* ===== FOOTER ===== */
.footer {
  padding:64px 0 32px;
  display:grid; grid-template-columns:1.4fr 2.6fr; gap:56px;
  border-top:1px solid var(--line);
}
.footer-brand p { font-size:14px; color:var(--sub); line-height:1.7; margin-top:16px; max-width:36ch; }
.footer-links { display:grid; grid-template-columns:repeat(3, 1fr); gap:32px; }
.footer-column h5 {
  font-size:12.5px; text-transform:uppercase; letter-spacing:.8px;
  color:var(--red); margin-bottom:16px; font-weight:700;
}
.footer-column a {
  display:block; font-size:14px; color:var(--sub);
  margin-bottom:11px; transition:color .15s;
}
.footer-column a:hover { color:var(--ink); }
.footer-bottom {
  text-align:center; font-size:13px; color:var(--sub);
  padding:28px 0 0; border-top:1px solid var(--line); margin-top:40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width:1024px) {
  .hero { grid-template-columns:1fr; gap:48px; padding:48px 0 40px; }
  .hero h1 { font-size:44px; }
  .steps-grid { grid-template-columns:repeat(2, 1fr); }
  .audience-grid { grid-template-columns:1fr 1fr; }
  .spotlight-grid { grid-template-columns:1fr; gap:40px; }
  .pricing-grid { grid-template-columns:1fr; max-width:480px; }
  .pricing-card-featured { transform:scale(1); }
  .footer { grid-template-columns:1fr; gap:40px; }
}

@media (max-width:768px) {
  .nav-links { display:none; }
  .hero h1 { font-size:36px; letter-spacing:-1px; }
  .steps-section h2, .audience-section h2, .pricing-head h2 { font-size:30px; }
  .spotlight-section h2, .report-section h2 { font-size:28px; }
  .final-cta h2 { font-size:30px; }
  .steps-grid, .audience-grid, .report-scores { grid-template-columns:1fr; }
  .footer-links { grid-template-columns:1fr 1fr; }
}

@media (max-width:480px) {
  .container { padding:0 16px; }
  .nav-actions { gap:8px; }
  .btn { padding:9px 16px; font-size:13px; }
  .hero-actions { flex-direction:column; align-items:stretch; }
  .hero-actions a { justify-content:center; }
  .final-cta-actions { flex-direction:column; align-items:stretch; }
  .footer-links { grid-template-columns:1fr; }
}

/* ========================================================================
   SHARED APP COMPONENTS — auth pages, dashboard shell, admin, forms
   These reuse the tokens/vars above so every inner page stays on-theme.
   ======================================================================== */

/* ---------- Badges (status / match tints) ---------- */
.badge { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:40px; font-size:12px; font-weight:700; white-space:nowrap; }
.badge-green { background:var(--green-tint); color:var(--green); }
.badge-red { background:var(--red-tint); color:var(--red); }
.badge-yellow { background:var(--yellow-tint); color:var(--yellow); }
.badge-blue { background:var(--blue-tint); color:var(--blue); }
.badge-neutral { background:var(--line); color:var(--sub); }

/* ---------- Form controls ---------- */
.field { margin-bottom:18px; }
.field label { display:block; font-size:13px; font-weight:600; margin-bottom:7px; color:var(--ink); }
.field .hint { font-size:12px; color:var(--sub); margin-top:6px; }
.input, textarea.input, select.input {
  width:100%; padding:12px 14px; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface); font-family:'Inter',sans-serif; font-size:14.5px; color:var(--ink);
  transition:border-color .15s, box-shadow .15s;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline:none; border-color:var(--brand); box-shadow:0 0 0 4px rgba(109,40,217,0.12);
}
textarea.input { resize:vertical; min-height:140px; line-height:1.55; }
.input-row { display:flex; gap:12px; }
.input-row .field { flex:1; }
.input-icon-wrap { position:relative; }
.input-icon-wrap i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--sub); font-size:14px; }
.input-icon-wrap .input { padding-left:40px; }
.checkbox-row { display:flex; align-items:center; gap:9px; font-size:13.5px; color:var(--sub); }
.checkbox-row input { width:16px; height:16px; accent-color:var(--brand); }

/* ---------- Auth pages (login / signup / forgot) ---------- */
.auth-shell { min-height:100vh; display:grid; grid-template-columns:1fr 1fr; }
.auth-visual {
  background:linear-gradient(160deg, #14152B, #1E1B4B 60%, #3B2172);
  color:white; padding:56px; display:flex; flex-direction:column; justify-content:space-between;
  position:relative; overflow:hidden;
}
.auth-visual::before { content:''; position:absolute; top:-120px; right:-100px; width:380px; height:380px; background:radial-gradient(circle, #DC262633, transparent 70%); border-radius:50%; }
.auth-visual::after { content:''; position:absolute; bottom:-140px; left:-100px; width:380px; height:380px; background:radial-gradient(circle, #06AED422, transparent 70%); border-radius:50%; }
.auth-visual .logo { color:white; position:relative; z-index:1; }
.auth-quote { position:relative; z-index:1; max-width:34ch; }
.auth-quote p { font-size:22px; font-weight:600; line-height:1.4; letter-spacing:-0.3px; margin-bottom:18px; }
.auth-quote .who { font-size:13.5px; color:#B7B3DB; }
.auth-metrics { position:relative; z-index:1; display:flex; gap:32px; }
.auth-metrics div b { display:block; font-size:26px; font-weight:800; letter-spacing:-0.8px; }
.auth-metrics div span { font-size:12.5px; color:#B7B3DB; }
.auth-form-side { display:flex; align-items:center; justify-content:center; padding:48px 24px; }
.auth-card { width:100%; max-width:400px; }
.auth-card .logo { display:none; }
.auth-card h1 { font-size:26px; letter-spacing:-0.7px; margin-bottom:8px; }
.auth-card .sub { font-size:14.5px; color:var(--sub); margin-bottom:32px; }
.auth-divider { display:flex; align-items:center; gap:14px; margin:24px 0; color:var(--sub); font-size:12.5px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:var(--line); }
.auth-foot { text-align:center; font-size:13.5px; color:var(--sub); margin-top:26px; }
.auth-foot a { color:var(--brand); font-weight:600; }
.auth-back { display:inline-flex; align-items:center; gap:7px; font-size:13.5px; color:var(--sub); margin-bottom:28px; }
.role-toggle { display:flex; background:var(--backdrop); border:1px solid var(--line); border-radius:12px; padding:4px; margin-bottom:28px; }
.role-toggle button { flex:1; border:none; background:transparent; padding:10px; border-radius:9px; font-family:'Inter',sans-serif; font-weight:600; font-size:13.5px; color:var(--sub); cursor:pointer; transition:all .15s; }
.role-toggle button.is-active { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }
@media (max-width:900px) { .auth-shell { grid-template-columns:1fr; } .auth-visual { display:none; } }

/* ---------- App shell (dashboard / admin) ---------- */
.app-shell { display:grid; grid-template-columns:248px 1fr; min-height:100vh; }
.app-sidebar { background:var(--surface); border-right:1px solid var(--line); padding:24px 18px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.app-sidebar .logo { margin-bottom:32px; padding:0 8px; }
.side-nav { display:flex; flex-direction:column; gap:3px; flex:1; }
.side-nav a { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px; font-size:14px; font-weight:500; color:var(--sub); }
.side-nav a i { width:18px; text-align:center; font-size:15px; }
.side-nav a:hover { background:var(--backdrop); color:var(--ink); }
.side-nav a.is-active { background:var(--red-tint); color:var(--red); font-weight:600; }
.side-nav .nav-group-label { font-size:11px; text-transform:uppercase; letter-spacing:.7px; color:var(--sub); font-weight:700; opacity:.7; padding:14px 12px 6px; }
.sidebar-user { display:flex; align-items:center; gap:10px; padding:12px; border-radius:12px; background:var(--backdrop); margin-top:12px; }
.avatar { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg, var(--brand), var(--brand-2)); color:white; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13.5px; flex-shrink:0; }
.sidebar-user .who { flex:1; min-width:0; }
.sidebar-user .who .name { font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user .who .role { font-size:11.5px; color:var(--sub); }

.app-main { padding:28px 36px 60px; max-width:1180px; }
.app-topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; flex-wrap:wrap; gap:14px; }
.app-topbar h1 { font-size:24px; letter-spacing:-0.5px; }
.app-topbar .sub { font-size:14px; color:var(--sub); margin-top:4px; }
.credit-chip { display:inline-flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); padding:9px 16px 9px 12px; border-radius:40px; font-size:13.5px; font-weight:600; box-shadow:var(--shadow-sm); }
.credit-chip .dot-icon { width:26px; height:26px; border-radius:50%; background:linear-gradient(135deg, var(--yellow), #F59E0B); display:flex; align-items:center; justify-content:center; color:white; font-size:12px; }

/* ---------- Stat cards ---------- */
.stat-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:18px; margin-bottom:32px; }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:22px; }
.stat-card .stat-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
.stat-card .stat-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; color:white; font-size:16px; }
.stat-card .num { font-size:28px; font-weight:800; letter-spacing:-0.8px; }
.stat-card .label { font-size:13px; color:var(--sub); margin-top:2px; }
.stat-card .delta { font-size:12px; font-weight:600; }
.stat-card .delta.up { color:var(--green); }
.stat-card .delta.down { color:var(--red); }
@media (max-width:1024px) { .stat-grid { grid-template-columns:1fr 1fr; } }

/* ---------- Panels / cards ---------- */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:28px; margin-bottom:24px; }
.panel-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.panel-head h2 { font-size:17px; letter-spacing:-0.3px; }
.panel-head .sub { font-size:13px; color:var(--sub); margin-top:3px; }

/* ---------- Dropzone ---------- */
.dropzone { border:1.5px dashed var(--line); border-radius:14px; padding:32px; text-align:center; background:var(--backdrop); transition:border-color .15s, background .15s; cursor:pointer; }
.dropzone:hover { border-color:var(--brand); background:#F1EEFC; }
.dropzone i { font-size:26px; color:var(--brand); margin-bottom:10px; }
.dropzone .dz-title { font-size:14px; font-weight:600; margin-bottom:4px; }
.dropzone .dz-sub { font-size:12.5px; color:var(--sub); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x:auto; }
table.data-table { width:100%; border-collapse:collapse; font-size:13.5px; }
table.data-table th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--sub); font-weight:700; padding:0 14px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
table.data-table td { padding:14px; border-bottom:1px solid var(--line); vertical-align:middle; }
table.data-table tr:last-child td { border-bottom:none; }
table.data-table tr:hover td { background:var(--backdrop); }
.cell-primary { font-weight:600; }
.cell-sub { font-size:12px; color:var(--sub); margin-top:2px; }
.row-actions { display:flex; gap:8px; }
.icon-btn { width:32px; height:32px; border-radius:9px; border:1px solid var(--line); background:var(--surface); display:inline-flex; align-items:center; justify-content:center; color:var(--sub); font-size:13px; cursor:pointer; transition:all .15s; }
.icon-btn:hover { border-color:var(--brand); color:var(--brand); }

/* ---------- Score ring (match score) ---------- */
.score-ring { position:relative; width:96px; height:96px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.score-ring .ring-num { font-size:24px; font-weight:800; letter-spacing:-0.8px; }
.score-ring .ring-max { font-size:10px; color:var(--sub); font-weight:600; }

/* ---------- Modal ---------- */
.modal-backdrop { position:fixed; inset:0; background:rgba(20,21,43,0.5); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; z-index:100; padding:20px; }
.modal-card { background:var(--surface); border-radius:18px; padding:28px; max-width:420px; width:100%; box-shadow:var(--shadow-lg); }
.modal-card h3 { font-size:18px; margin-bottom:6px; }
.modal-card .sub { font-size:13.5px; color:var(--sub); margin-bottom:22px; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:24px; }

/* ---------- Empty / misc ---------- */
.divider-line { height:1px; background:var(--line); margin:24px 0; }
.pill-tabs { display:flex; gap:6px; background:var(--backdrop); border:1px solid var(--line); border-radius:12px; padding:4px; width:fit-content; }
.pill-tabs button { border:none; background:transparent; padding:8px 16px; border-radius:9px; font-family:'Inter',sans-serif; font-weight:600; font-size:13px; color:var(--sub); cursor:pointer; }
.pill-tabs button.is-active { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }

@media (max-width:960px) {
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { display:none; }
  .stat-grid { grid-template-columns:1fr 1fr; }
  .app-main { padding:20px 18px 48px; }
}

/* ==========================================================================
   APP COMPATIBILITY LAYER
   Legacy variable names + class names still used by PHP templates / the
   interview room, mapped onto the HireSense tokens above.
   ========================================================================== */
:root {
    --brand-wash:#F1EEFC;
    --blue-wash:var(--blue-tint); --blue-deep:var(--blue);
    --green-wash:var(--green-tint); --green-deep:var(--green);
    --yellow-wash:var(--yellow-tint); --yellow-deep:var(--yellow);
    --red-wash:var(--red-tint); --red-deep:var(--red);
    --ink-soft:var(--sub); --canvas:var(--backdrop); --panel:var(--surface); --panel-alt:var(--backdrop);
    --radius:10px;
    --sans:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --serif:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono:'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --grad:linear-gradient(135deg, var(--red), #F97316);
}
html { -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}
:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
p { margin:0 0 1em; }
h1,h2,h3,h4 { margin:0 0 .5em; }
.link { color:var(--brand); font-weight:600; }
.link:hover { text-decoration:underline; }
.mt-0 { margin-top:0; }
.flex-between { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.logo-icon svg { width:18px; height:18px; }

/* Public pages: content area under the navbar */
.page-main { padding:44px 0 80px; min-height:60vh; }
.nav-links a.is-current { color:var(--red); font-weight:700; }

/* Generic cards (legacy .card == design .panel) */
.card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:28px; margin-bottom:24px; }
.card h2 { font-size:17px; letter-spacing:-0.3px; margin-bottom:16px; }
.card-row { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.form-narrow { max-width:460px; margin:0 auto; }

/* Legacy stat tiles (admin + candidate pages) */
.stat { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:22px; }
.stat .num { font-size:28px; font-weight:800; letter-spacing:-0.8px; }
.stat .label { font-size:13px; color:var(--sub); margin-top:2px; }

/* Legacy form markup: <div class="field"><input …> */
.field input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.field select, .field textarea {
    width:100%; padding:12px 14px; border-radius:10px; border:1.5px solid var(--line);
    background:var(--surface); font-family:'Inter',sans-serif; font-size:14.5px; color:var(--ink);
    transition:border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline:none; border-color:var(--brand); box-shadow:0 0 0 4px rgba(109,40,217,0.12);
}
.field textarea { resize:vertical; min-height:140px; line-height:1.55; }
.field textarea.compact { min-height:90px; }
.field-hint { font-size:12px; color:var(--sub); margin-top:6px; }
.field-inline { display:flex; gap:12px; }
.field-inline .field { flex:1; }
@media (max-width:640px) { .field-inline { flex-direction:column; gap:0; } }
.radio-group { display:flex; gap:20px; margin-bottom:18px; }
.btn-sm { padding:7px 14px; font-size:12.5px; }
.btn-danger { background:var(--red-tint); color:var(--red); border:1.5px solid transparent; }
.btn-danger:hover { background:var(--red); color:#fff; }
.btn[disabled] { opacity:.5; cursor:not-allowed; transform:none !important; box-shadow:none !important; }
.btn svg { width:16px; height:16px; }
.input-inline { padding:8px 12px !important; width:110px !important; }

/* Alerts */
.alert { display:flex; gap:10px; align-items:flex-start; padding:13px 16px; border-radius:12px; margin-bottom:20px; font-size:14px; border:1px solid transparent; }
.alert-success { background:var(--green-tint); color:var(--green); border-color:#BFE6CB; }
.alert-error { background:var(--red-tint); color:var(--red); border-color:#F8C9C9; }
.alert-info { background:var(--blue-tint); color:var(--blue); border-color:#C9DBFB; }

/* Plain tables (any table not using .data-table) */
.card table, .panel table { width:100%; border-collapse:collapse; font-size:13.5px; }
.card th, .panel th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--sub); font-weight:700; padding:0 14px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.card td, .panel td { padding:14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.card tr:last-child td, .panel tr:last-child td { border-bottom:none; }
.card tbody tr:hover td, .panel tbody tr:hover td { background:var(--backdrop); }

/* Status badges used by templates (badge-<status>) */
.badge-active, .badge-completed, .badge-ready { background:var(--green-tint); color:var(--green); }
.badge-pending, .badge-invited, .badge-draft { background:var(--yellow-tint); color:var(--yellow); }
.badge-failed, .badge-expired { background:var(--red-tint); color:var(--red); }
.badge-progress { background:var(--blue-tint); color:var(--blue); }

/* Hero paragraph note */
.hero-note { margin-bottom:0; }
.hero-note i { color:var(--green); }
.final-cta .btn-primary { box-shadow:0 8px 24px rgba(220,38,38,.35); }

/* Auth: inline message list + flash inside the card */
.auth-card .alert { margin-bottom:18px; }
.auth-card .sub { margin-bottom:28px; }
.auth-status { text-align:left; }
.auth-status .icon-badge { margin-bottom:22px; }
.auth-card .role-toggle a { flex:1; text-align:center; padding:10px; border-radius:9px; font-weight:600; font-size:13.5px; color:var(--sub); transition:all .15s; }
.auth-card .role-toggle a.is-active { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }
.auth-card .logo { display:none; }
@media (max-width:900px) { .auth-card .logo { display:flex; margin-bottom:28px; } }

/* App shell extras */
.app-main { width:100%; min-width:0; }
.app-main > .app-topbar { margin-top:0; }
.back-link { display:inline-flex; align-items:center; gap:7px; font-size:13.5px; color:var(--sub); margin-bottom:14px; }
.back-link:hover { color:var(--ink); }
.side-nav a.is-active i { color:var(--red); }
.mobile-bar { display:none; }
@media (max-width:960px) {
    .mobile-bar { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:40; }
    .mobile-bar nav { display:flex; gap:6px; flex-wrap:wrap; }
    .mobile-bar nav a { font-size:13px; font-weight:600; color:var(--sub); padding:6px 10px; border-radius:8px; }
    .mobile-bar nav a.is-active { background:var(--red-tint); color:var(--red); }
}
.panel-note { font-size:13px; color:var(--sub); }
.q-list { list-style:none; counter-reset:q; display:flex; flex-direction:column; gap:10px; }
.q-list li { counter-increment:q; display:flex; gap:14px; align-items:flex-start; padding:14px 16px; background:var(--backdrop); border:1px solid var(--line); border-radius:12px; font-size:14.5px; }
.q-list li::before { content:counter(q); font-family:var(--mono); font-size:12px; font-weight:700; color:var(--brand); background:var(--brand-wash); border-radius:8px; min-width:26px; height:26px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.q-list .badge { margin-left:8px; }
.list-checks { list-style:none; display:flex; flex-direction:column; gap:12px; margin:18px 0 22px; }
.list-checks li { display:flex; gap:10px; align-items:flex-start; font-size:14px; color:var(--sub); }
.list-checks li i { color:var(--green); margin-top:3px; }
.score-hero { display:inline-block; text-align:center; padding:22px 36px; background:var(--backdrop); border:1px solid var(--line); border-radius:16px; margin:12px 0 20px; }
.score-hero .num { font-size:44px; font-weight:800; letter-spacing:-1.5px; background:var(--grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.score-hero .label { font-size:13px; color:var(--sub); font-weight:600; }
.center-card { max-width:520px; margin:24px auto 0; text-align:center; }
.center-card .icon-badge { margin:0 auto 20px; }
.center-card p { margin-left:auto; margin-right:auto; }
.site-footer-mini { text-align:center; font-size:13px; color:var(--sub); padding:28px 0 0; border-top:1px solid var(--line); margin-top:40px; }

/* Inputs with a leading icon: keep text clear of the icon (must out-rank the .field input padding above) */
.field .input-icon-wrap input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { padding-left:42px; }
.input-icon-wrap i { pointer-events:none; z-index:1; }