/* ============================================================
   GetHire.ai — Professional Corporate Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Tokens ── */
:root {
  --navy:       #0f172a;
  --navy-700:   #1e293b;
  --navy-600:   #334155;
  --blue:       #2563eb;
  --blue-600:   #1d4ed8;
  --blue-100:   #dbeafe;
  --blue-50:    #eff6ff;
  --green:      #16a34a;
  --green-100:  #dcfce7;
  --amber:      #d97706;
  --amber-100:  #fef3c7;
  --red:        #dc2626;
  --red-100:    #fee2e2;
  --slate-100:  #f1f5f9;
  --slate-200:  #e2e8f0;
  --slate-400:  #94a3b8;
  --slate-500:  #64748b;
  --slate-700:  #334155;
  --text:       #0f172a;
  --white:      #ffffff;
  --shadow-xs:  0 1px 2px rgba(15,23,42,.06);
  --shadow-sm:  0 1px 3px rgba(15,23,42,.1), 0 1px 2px rgba(15,23,42,.06);
  --shadow-md:  0 4px 16px rgba(15,23,42,.1), 0 2px 6px rgba(15,23,42,.06);
  --shadow-lg:  0 12px 40px rgba(15,23,42,.14), 0 4px 12px rgba(15,23,42,.08);
  --shadow-xl:  0 24px 60px rgba(15,23,42,.2);
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  22px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--slate-100); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-600); }
ul { list-style: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 200;
  height: 58px;
  background: var(--navy);
  display: flex; align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 20px rgba(0,0,0,.3);
}
.nav-brand {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.4px;
  color: var(--white); display: flex; align-items: center; gap: 6px;
}
.nav-brand .dot { color: #60a5fa; font-size: 1.4rem; line-height: 1; }
.nav-sep { flex: 1; }
.nav-items { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 6px 14px; border-radius: var(--r-sm);
  font-size: .82rem; font-weight: 500; color: #94a3b8;
  transition: all .15s;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: var(--white); }
.nav-chip {
  display: inline-flex; align-items: center;
  background: rgba(37,99,235,.25); border: 1px solid rgba(96,165,250,.3);
  color: #93c5fd; font-size: .72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: .3px;
}

/* ============================================================
   AUTH — SPLIT LAYOUT
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-left {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 55%, #1e40af 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 60px 64px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(37,99,235,.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99,102,241,.2) 0%, transparent 50%);
}
.auth-left > * { position: relative; z-index: 1; }
.auth-logo-big { font-size: 2rem; font-weight: 800; color: var(--white); letter-spacing: -.5px; margin-bottom: 4px; }
.auth-logo-big span { color: #60a5fa; }
.auth-tagline { font-size: .88rem; color: #94a3b8; margin-bottom: 52px; }
.auth-feature {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px;
}
.auth-feature-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.auth-feature-text strong { display: block; font-size: .9rem; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.auth-feature-text span { font-size: .8rem; color: #94a3b8; }

.auth-right {
  background: var(--white);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 60px 64px;
}
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-form-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.auth-form-sub { font-size: .875rem; color: var(--slate-500); margin-bottom: 28px; }
.auth-footer-link { text-align: center; font-size: .85rem; color: var(--slate-500); margin-top: 20px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.page      { max-width: 1140px; margin: 0 auto; padding: 32px 24px; }
.page-wide { max-width: 1340px; margin: 0 auto; padding: 32px 24px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
.page-header p { font-size: .875rem; color: var(--slate-500); margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white); border-radius: var(--r-md);
  border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 22px; border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header-text h2 { font-size: .95rem; font-weight: 600; color: var(--navy); }
.card-header-text p  { font-size: .78rem; color: var(--slate-500); margin-top: 1px; }
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px; border-top: 1px solid var(--slate-200);
  background: #fafbfc; border-radius: 0 0 var(--r-md) var(--r-md);
  display: flex; align-items: center; gap: 10px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: .8rem; font-weight: 600; color: var(--slate-700); letter-spacing: .1px;
}
.form-label .optional { font-weight: 400; color: var(--slate-400); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--slate-200); border-radius: var(--r-sm);
  font-family: inherit; font-size: .875rem; color: var(--text);
  background: var(--white); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--slate-400); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}
.form-hint { font-size: .76rem; color: var(--slate-400); margin-top: 4px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border: 1.5px solid transparent;
  border-radius: var(--r-sm); font-family: inherit;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all .15s; white-space: nowrap; text-decoration: none !important;
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost { background: transparent; color: var(--slate-700); border-color: var(--slate-200); }
.btn-ghost:hover { background: var(--slate-100); color: var(--navy); }
.btn-success { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-success:hover { background: #15803d; color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }
.btn-sm  { padding: 5px 12px; font-size: .78rem; }
.btn-lg  { padding: 12px 26px; font-size: .95rem; }
.btn-xl  { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: .72rem; font-weight: 600; letter-spacing: .2px;
}
.badge-blue   { background: var(--blue-100);  color: var(--blue); }
.badge-green  { background: var(--green-100); color: var(--green); }
.badge-amber  { background: var(--amber-100); color: var(--amber); }
.badge-red    { background: var(--red-100);   color: var(--red); }
.badge-slate  { background: var(--slate-100); color: var(--slate-700); }
.badge-navy   { background: #dde8f5; color: var(--navy); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: .85rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: var(--red-100);   border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: var(--green-100); border: 1px solid #86efac; color: #166534; }
.alert-info    { background: var(--blue-100);  border: 1px solid #93c5fd; color: #1e40af; }

/* ============================================================
   STEP INDICATOR
   ============================================================ */
.steps { display: flex; align-items: center; margin-bottom: 28px; }
.step-item { display: flex; align-items: center; gap: 8px; }
.step-circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
  border: 2px solid var(--slate-200); color: var(--slate-400); background: var(--white);
  transition: all .2s;
}
.step-item.active  .step-circle { background: var(--blue);  border-color: var(--blue);  color: var(--white); }
.step-item.done    .step-circle { background: var(--green); border-color: var(--green); color: var(--white); }
.step-text { font-size: .78rem; font-weight: 600; color: var(--slate-400); }
.step-item.active .step-text { color: var(--blue); }
.step-item.done   .step-text { color: var(--green); }
.step-connector { flex: 1; height: 2px; background: var(--slate-200); margin: 0 10px; min-width: 24px; transition: background .2s; }
.step-connector.done { background: var(--green); }

/* ============================================================
   SCORE CARDS
   ============================================================ */
.score-card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); padding: 24px 20px;
  text-align: center; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.score-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: var(--r-md) var(--r-md) 0 0;
}
.score-card.blue::before   { background: var(--blue); }
.score-card.green::before  { background: var(--green); }
.score-card.red::before    { background: var(--red); }
.score-card.amber::before  { background: var(--amber); }
.score-card.navy::before   { background: var(--navy); }
.score-value { font-size: 2.6rem; font-weight: 800; line-height: 1; margin-bottom: 4px; letter-spacing: -1px; }
.score-card.blue  .score-value { color: var(--blue); }
.score-card.green .score-value { color: var(--green); }
.score-card.red   .score-value { color: var(--red); }
.score-card.amber .score-value { color: var(--amber); }
.score-card.navy  .score-value { color: var(--navy); }
.score-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--slate-400); }
.score-sub { font-size: .75rem; color: var(--slate-400); margin-top: 6px; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress { height: 5px; background: var(--slate-200); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.progress-bar { height: 100%; border-radius: 3px; transition: width .5s ease; }
.progress-bar.blue  { background: var(--blue); }
.progress-bar.green { background: var(--green); }
.progress-bar.red   { background: var(--red); }
.progress-bar.amber { background: var(--amber); }

/* ============================================================
   RATING BANNER
   ============================================================ */
.rating-banner {
  border-radius: var(--r-md); padding: 20px 24px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px;
  border: 1.5px solid;
}
.rating-banner.hire       { background: #f0fdf4; border-color: #86efac; }
.rating-banner.borderline { background: #fffbeb; border-color: #fcd34d; }
.rating-banner.reject     { background: #fef2f2; border-color: #fca5a5; }
.rating-icon { font-size: 2rem; flex-shrink: 0; }
.rating-title { font-size: 1.1rem; font-weight: 700; }
.rating-banner.hire       .rating-title { color: var(--green); }
.rating-banner.borderline .rating-title { color: #92400e; }
.rating-banner.reject     .rating-title { color: #991b1b; }
.rating-sub { font-size: .82rem; color: var(--slate-500); margin-top: 2px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead { background: var(--slate-100); }
th {
  padding: 10px 16px; text-align: left;
  font-size: .7rem; font-weight: 700; color: var(--slate-500);
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1.5px solid var(--slate-200);
}
td { padding: 12px 16px; border-bottom: 1px solid var(--slate-200); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.table-empty { padding: 48px; text-align: center; color: var(--slate-400); }
.table-empty .empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.table-empty p { font-size: .875rem; }

/* ============================================================
   CODING EDITOR LAYOUT
   ============================================================ */
.editor-layout {
  display: grid; grid-template-columns: 420px 1fr;
  gap: 20px; min-height: 560px;
}
.question-pane {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.qpane-header {
  background: var(--navy); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.qpane-header h3 { font-size: .9rem; font-weight: 600; color: var(--white); }
.qpane-body { padding: 20px; flex: 1; overflow-y: auto; }
.qpane-body .problem-text { font-size: .875rem; line-height: 1.75; color: var(--text); margin-bottom: 18px; }
.example-box {
  background: var(--slate-100); border: 1px solid var(--slate-200);
  border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 12px;
}
.example-box label { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--slate-400); margin-bottom: 6px; }
.example-box pre { font-size: .82rem; font-family: 'Courier New', monospace; color: var(--navy); white-space: pre-wrap; }

.editor-pane {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.editor-toolbar {
  background: #1e293b; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.editor-toolbar-left { display: flex; align-items: center; gap: 10px; }
.editor-dot { width: 10px; height: 10px; border-radius: 50%; }
.editor-dot.red   { background: #ff5f57; }
.editor-dot.amber { background: #ffbd2e; }
.editor-dot.green { background: #28c840; }
.editor-filename { font-size: .78rem; color: #94a3b8; font-family: monospace; }
.editor-lang { font-size: .72rem; color: #60a5fa; font-weight: 600; background: rgba(96,165,250,.12); padding: 2px 8px; border-radius: 4px; }
.code-textarea {
  flex: 1; width: 100%; min-height: 400px;
  background: #0f172a; color: #e2e8f0;
  font-family: 'Courier New', Consolas, monospace; font-size: .875rem;
  line-height: 1.65; padding: 16px 20px;
  border: none; outline: none; resize: none;
  border-radius: 0;
}
.code-textarea::placeholder { color: #475569; }
.editor-footer {
  background: #1e293b; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .72rem; color: #64748b;
}

/* ============================================================
   TECHNICAL INTERVIEW ROOM
   ============================================================ */
.interview-layout {
  display: grid; grid-template-columns: 1fr 420px;
  gap: 24px; min-height: 500px;
}
.interview-question-panel {
  background: var(--navy);
  border-radius: var(--r-md); padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 460px; position: relative; overflow: hidden;
}
.interview-question-panel::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.2), transparent 70%);
}
.iq-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: #60a5fa; margin-bottom: 20px;
}
.iq-label::before { content: '●'; font-size: .5rem; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.iq-text {
  font-size: 1.25rem; font-weight: 500; line-height: 1.65;
  color: var(--white); flex: 1; margin-bottom: 28px;
}
.iq-audio-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #cbd5e1; padding: 8px 16px; border-radius: 20px;
  font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.iq-audio-btn:hover { background: rgba(255,255,255,.14); color: var(--white); }

.answer-panel {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); padding: 22px; display: flex;
  flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm);
}
.answer-panel h3 { font-size: .9rem; font-weight: 600; color: var(--navy); }
.record-row { display: flex; gap: 8px; align-items: center; }
.rec-status {
  display: none; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; color: var(--red);
}
.rec-status.active { display: flex; }
.rec-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; animation: recpulse 1s ease-in-out infinite; }
@keyframes recpulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.85)} }
.answer-textarea {
  width: 100%; flex: 1; min-height: 180px;
  padding: 12px 14px; border: 1.5px solid var(--slate-200);
  border-radius: var(--r-sm); font-family: inherit; font-size: .875rem;
  color: var(--text); resize: vertical; outline: none;
  transition: border-color .15s, box-shadow .15s; line-height: 1.6;
}
.answer-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.answer-textarea::placeholder { color: var(--slate-400); }

/* ============================================================
   TIMER
   ============================================================ */
.timer-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--navy-700); color: #cbd5e1;
  padding: 5px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.timer-badge.urgent { background: #7f1d1d; color: #fca5a5; }

/* ============================================================
   TRANSCRIPT
   ============================================================ */
.transcript-card {
  border: 1px solid var(--slate-200); border-radius: var(--r-md);
  overflow: hidden; margin-bottom: 14px; background: var(--white);
  box-shadow: var(--shadow-xs);
}
.tc-header {
  background: var(--slate-100); padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--slate-200);
}
.tc-header .tc-num { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--slate-500); }
.tc-body { padding: 16px 18px; }
.tc-question { font-size: .875rem; font-weight: 600; color: var(--navy); margin-bottom: 10px; line-height: 1.5; }
.tc-answer {
  font-size: .85rem; color: var(--slate-700); line-height: 1.65;
  padding-left: 14px; border-left: 3px solid var(--blue-100);
  margin-bottom: 12px;
}
.tc-meta {
  background: var(--slate-100); padding: 10px 18px;
  border-top: 1px solid var(--slate-200); font-size: .78rem; color: var(--slate-500);
  display: flex; gap: 20px; flex-wrap: wrap;
}
.tc-meta strong { color: var(--navy); }

/* ============================================================
   DIVIDERS / UTILS
   ============================================================ */
.divider { height: 1px; background: var(--slate-200); margin: 20px 0; }
.flex       { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end    { display: flex; align-items: center; justify-content: flex-end; }
.gap-6  { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4{margin-top:4px} .mt-8{margin-top:8px} .mt-16{margin-top:16px} .mt-24{margin-top:24px}
.mb-4{margin-bottom:4px} .mb-8{margin-bottom:8px} .mb-16{margin-bottom:16px} .mb-24{margin-bottom:24px}
.text-muted { color: var(--slate-400); }
.text-sm    { font-size: .82rem; }
.text-xs    { font-size: .72rem; }
.text-bold  { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--slate-200); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .editor-layout  { grid-template-columns: 1fr; }
  .interview-layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .auth-right { padding: 40px 24px; }
  .navbar { padding: 0 16px; }
  .page { padding: 20px 16px; }
}

/* ============================================================
   APP LAYOUT — Sidebar + Main (shared across all pages)
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.app-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform .3s ease;
}
.sb-brand-wrap {
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sb-brand {
  font-size: 1.15rem; font-weight: 900; color: #fff;
  text-decoration: none; display: block;
}
.sb-brand span { color: #3b82f6; }
.sb-brand-wrap small {
  display: block; font-size: .65rem; font-weight: 600;
  color: #334155; letter-spacing: .8px; margin-top: 2px;
  text-transform: uppercase;
}
.sb-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sb-av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .92rem; color: #fff;
}
.sb-uname  { font-size: .84rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sb-uemail { font-size: .7rem; color: #475569; margin-top: 1px; }
.sb-nav    { flex: 1; padding: 10px 0; }
.sb-section {
  font-size: .63rem; font-weight: 700; color: #334155;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 12px 22px 5px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px;
  color: #94a3b8; font-size: .875rem; font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
  position: relative;
}
.sb-item:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.sb-item.active {
  background: rgba(59,130,246,.15); color: #60a5fa; font-weight: 700;
}
.sb-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: #3b82f6; border-radius: 0 3px 3px 0;
}
.sb-divider { height: 1px; background: rgba(255,255,255,.06); margin: 6px 22px; }
.sb-plan-wrap { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.sb-plan {
  border-radius: 10px; padding: 11px 14px; text-align: center;
}
.sb-plan.pro {
  background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.3);
}
.sb-plan.free {
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2);
}
.spp-label { font-size: .72rem; font-weight: 800; color: #fbbf24; margin-bottom: 3px; }
.sb-plan.pro .spp-label { color: #60a5fa; }
.spp-sub { font-size: .68rem; color: #475569; margin-bottom: 7px; }
.spp-bar { background: rgba(255,255,255,.08); border-radius: 100px; height: 4px; overflow: hidden; margin-bottom: 8px; }
.spp-fill { height: 100%; background: #f59e0b; border-radius: 100px; }
.spp-cta {
  display: block; background: linear-gradient(135deg,#f59e0b,#d97706);
  color: #fff; border-radius: 8px; padding: 6px;
  font-size: .75rem; font-weight: 700; text-decoration: none; transition: opacity .15s;
}
.spp-cta:hover { opacity: .88; color: #fff; }
.sb-bottom { padding: 14px 16px 20px; border-top: 1px solid rgba(255,255,255,.07); }
.sb-logout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px; color: #f87171;
  font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: background .15s;
}
.sb-logout:hover { background: rgba(239,68,68,.18); color: #f87171; }

/* ── App topbar (mobile hamburger) ── */
.app-topbar {
  display: none;
  position: sticky; top: 0; z-index: 150;
  height: 56px; background: #fff;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
  padding: 0 16px; gap: 12px;
}
.app-topbar-title { font-size: .95rem; font-weight: 700; color: #0f172a; }
.sb-hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: #f1f5f9; font-size: 1.1rem;
}

/* ── Main content area ── */
.app-main {
  margin-left: 248px;
  flex: 1;
  min-height: 100vh;
  background: #f0f4ff;
}

/* ── Mobile overlay ── */
.sb-mob-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 199;
}
.sb-mob-overlay.show { display: block; }

/* ── Responsive ── */
@media(max-width: 800px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .app-topbar { display: flex; }
}

/* ════════════════════════════════════════════════════
   ADMIN SIDEBAR  (shared across admin pages)
════════════════════════════════════════════════════ */
.admin-sidebar {
  width: 240px;
  background: #0f172a;
  min-height: 100vh;
  padding: 0;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 300;
  display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.asb-brand {
  font-size: 1.2rem; font-weight: 900; color: #fff;
  padding: 22px 24px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
}
.asb-brand span { color: #3b82f6; }
.asb-close {
  display: none; background: none; border: none;
  color: #64748b; font-size: 1.1rem; cursor: pointer; padding: 2px 6px;
}
.asb-label {
  font-size: .68rem; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 20px 24px 8px;
}
.asb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; font-size: .9rem; font-weight: 500;
  color: #94a3b8; text-decoration: none; transition: .15s;
}
.asb-link:hover, .asb-link.active {
  background: rgba(255,255,255,.06); color: #fff;
}
.asb-link.active { border-left: 3px solid #3b82f6; color: #fff; }
.asb-bottom {
  margin-top: auto; padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.asb-logout {
  display: block; text-align: center; padding: 10px;
  background: rgba(239,68,68,.15); color: #f87171;
  border: 1px solid rgba(239,68,68,.3); border-radius: 9px;
  text-decoration: none; font-size: .85rem; font-weight: 600;
}
.asb-logout:hover { background: rgba(239,68,68,.25); color: #f87171; }

/* Admin main area */
.admin-main {
  margin-left: 240px; flex: 1; padding: 32px 36px; min-height: 100vh;
}

/* Admin topbar (mobile only) */
.admin-topbar {
  display: none;
  position: sticky; top: 0; z-index: 250;
  background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.08);
  height: 56px; align-items: center; padding: 0 16px; gap: 12px;
}
.admin-topbar-title { font-size: .95rem; font-weight: 700; color: #fff; flex: 1; }
.admin-hamburger {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 7px; padding: 6px 11px;
  font-size: 1rem; cursor: pointer;
}

/* Mobile overlay for admin sidebar */
.admin-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 290;
}
.admin-overlay.show { display: block; }

/* Admin responsive */
@media(max-width: 860px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .asb-close { display: block; }
  .admin-main { margin-left: 0; padding: 20px 16px; }
  .admin-topbar { display: flex; }
}

/* ════════════════════════════════════════════════════
   INTERVIEWER SIDEBAR
════════════════════════════════════════════════════ */
.iv-sidebar {
  width: 252px; background: #0f172a;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 300; display: flex; flex-direction: column;
  transition: transform .3s ease; overflow-y: auto;
}
.ivsb-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: flex-start; justify-content: space-between;
  font-size: 1.1rem; font-weight: 900; color: #fff;
}
.ivsb-brand span { color: #3b82f6; }
.ivsb-brand small {
  display: block; font-size: .6rem; font-weight: 600;
  color: #334155; letter-spacing: .8px; text-transform: uppercase; margin-top: 2px;
}
.ivsb-close {
  display: none; background: none; border: none;
  color: #64748b; font-size: 1rem; cursor: pointer; flex-shrink: 0; padding: 2px 4px;
}
.ivsb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.ivsb-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#2563eb,#06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; color: #fff;
}
.ivsb-info { overflow: hidden; }
.ivsb-name    { font-size: .84rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivsb-role    { font-size: .7rem; color: #475569; }
.ivsb-company { font-size: .7rem; color: #3b82f6; font-weight: 600; }
.ivsb-nav     { flex: 1; padding: 8px 0; }
.ivsb-section {
  font-size: .63rem; font-weight: 700; color: #334155;
  text-transform: uppercase; letter-spacing: .8px; padding: 12px 20px 5px;
}
.ivsb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: #94a3b8; font-size: .875rem; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s; position: relative;
}
.ivsb-item:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.ivsb-item.active {
  background: rgba(59,130,246,.15); color: #60a5fa; font-weight: 700;
}
.ivsb-item.active::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: #3b82f6; border-radius: 0 3px 3px 0;
}
.ivsb-stats {
  display: flex; gap: 0;
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 12px 0;
}
.ivsb-stat {
  flex: 1; text-align: center; padding: 6px 0;
  border-right: 1px solid rgba(255,255,255,.07);
}
.ivsb-stat:last-child { border-right: none; }
.ivsb-stat-val { font-size: 1.1rem; font-weight: 800; color: #e2e8f0; }
.ivsb-stat-lbl { font-size: .62rem; color: #475569; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.ivsb-bottom { padding: 14px 16px 20px; }
.ivsb-logout {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2); border-radius: 10px;
  color: #f87171; font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: background .15s;
}
.ivsb-logout:hover { background: rgba(239,68,68,.18); color: #f87171; }

/* IV main area */
.iv-main { margin-left: 252px; flex: 1; min-height: 100vh; background: #f0f4ff; }
.iv-topbar {
  display: none; position: sticky; top: 0; z-index: 250;
  background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.08);
  height: 56px; align-items: center; padding: 0 16px; gap: 12px;
}
.iv-topbar-title { font-size: .95rem; font-weight: 700; color: #fff; flex: 1; }
.iv-hamburger {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 7px; padding: 6px 11px; font-size: 1rem; cursor: pointer;
}
.iv-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 290;
}
.iv-overlay.show { display: block; }

@media(max-width: 860px) {
  .iv-sidebar { transform: translateX(-100%); }
  .iv-sidebar.open { transform: translateX(0); }
  .ivsb-close { display: block; }
  .iv-main { margin-left: 0; }
  .iv-topbar { display: flex; }
}
