/* ─── Google Fonts ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design Tokens — DARK (default, refreshed) ────────── */
:root {
  --bg: #060610;
  --bg2: #0b0b1e;
  --card: rgba(14, 14, 30, 0.88);
  --card-solid: #0e0e22;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-h: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --border-h: rgba(255, 255, 255, 0.18);

  --text: #eaeaf8;
  --text-muted: #8a8ab0;
  --text-dim: #3a3a5c;

  /* Vibrant accent palette */
  --indigo: #7c7eff;
  --violet: #a78bfa;
  --fuchsia: #e879f9;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --orange: #fb923c;

  --grad-brand: linear-gradient(135deg, #7c7eff 0%, #a78bfa 45%, #e879f9 100%);
  --grad-card: linear-gradient(135deg, rgba(124, 126, 255, 0.12), rgba(167, 139, 250, 0.06));
  --grad-green: linear-gradient(135deg, #34d399, #22d3ee);
  --grad-amber: linear-gradient(135deg, #fbbf24, #fb923c);
  --grad-red: linear-gradient(135deg, #f87171, #e879f9);
  --grad-teal: linear-gradient(135deg, #2dd4bf, #22d3ee);

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.75);
  --glow-indigo: 0 0 40px rgba(124, 126, 255, 0.28);
  --glow-violet: 0 0 40px rgba(167, 139, 250, 0.22);
  --glow-teal: 0 0 30px rgba(45, 212, 191, 0.2);

  --sidebar-w: 240px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.2s ease;

  /* Sidebar specific */
  --sidebar-bg: rgba(8, 8, 20, 0.97);
  --sidebar-border: rgba(255,255,255,0.07);
}

/* ─── Design Tokens — LIGHT ─────────────────────────────── */
[data-theme="light"] {
  --bg: #f0f2ff;
  --bg2: #e8ecff;
  --card: rgba(255, 255, 255, 0.90);
  --card-solid: #ffffff;
  --surface: rgba(99, 102, 241, 0.05);
  --surface-h: rgba(99, 102, 241, 0.10);
  --border: rgba(99, 102, 241, 0.14);
  --border-h: rgba(99, 102, 241, 0.28);

  --text: #1a1a3a;
  --text-muted: #6060a0;
  --text-dim: #b0b0d0;

  /* Slightly deeper accents for light bg readability */
  --indigo: #4f52e8;
  --violet: #7c3aed;
  --fuchsia: #c026d3;
  --cyan: #0891b2;
  --teal: #0d9488;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --orange: #ea580c;

  --grad-brand: linear-gradient(135deg, #4f52e8 0%, #7c3aed 45%, #c026d3 100%);
  --grad-card: linear-gradient(135deg, rgba(79, 82, 232, 0.08), rgba(124, 58, 237, 0.04));
  --grad-green: linear-gradient(135deg, #16a34a, #0891b2);
  --grad-amber: linear-gradient(135deg, #d97706, #ea580c);
  --grad-red: linear-gradient(135deg, #dc2626, #c026d3);
  --grad-teal: linear-gradient(135deg, #0d9488, #0891b2);

  --shadow-sm: 0 2px 12px rgba(79, 82, 232, 0.10);
  --shadow-md: 0 8px 32px rgba(79, 82, 232, 0.14);
  --shadow-lg: 0 20px 60px rgba(79, 82, 232, 0.16);
  --glow-indigo: 0 0 30px rgba(79, 82, 232, 0.18);
  --glow-violet: 0 0 30px rgba(124, 58, 237, 0.14);
  --glow-teal: 0 0 24px rgba(13, 148, 136, 0.15);

  --sidebar-bg: rgba(255, 255, 255, 0.97);
  --sidebar-border: rgba(99, 102, 241, 0.14);
}

/* ─── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/* ─── Animated BG Orbs ───────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orbs::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 126, 255, 0.14) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orbs::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.10) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

[data-theme="light"] .bg-orbs::before {
  background: radial-gradient(circle, rgba(79, 82, 232, 0.09) 0%, transparent 70%);
}

[data-theme="light"] .bg-orbs::after {
  background: radial-gradient(circle, rgba(192, 38, 211, 0.07) 0%, transparent 70%);
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, -80px) scale(1.05);
  }

  66% {
    transform: translate(-40px, 60px) scale(0.95);
  }
}

/* ─── App Shell (Sidebar Layout) ─────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  box-shadow: var(--glow-indigo);
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-h);
}

.nav-item.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.nav-item.active .nav-icon {
  color: var(--indigo);
}

.nav-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  background: var(--indigo);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.logout-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-size: 14px;
  flex-shrink: 0;
}

.logout-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

/* ─── Main Content ───────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px 36px;
  max-width: calc(100vw - var(--sidebar-w));
  min-height: 100vh;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Page Header ────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title-wrap {}

.page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo);
  margin-bottom: 6px;
}

.page-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── KPI Stats Grid ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  cursor: default;
  animation: fadeInUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}

.stat-icon.indigo {
  background: rgba(99, 102, 241, 0.15);
}

.stat-icon.violet {
  background: rgba(139, 92, 246, 0.15);
}

.stat-icon.green {
  background: rgba(34, 197, 94, 0.15);
}

.stat-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
}

.stat-icon.amber {
  background: rgba(245, 158, 11, 0.15);
}

.stat-icon.red {
  background: rgba(239, 68, 68, 0.15);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 6px;
}

.stat-trend.up {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
}

.stat-trend.down {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

/* ─── Glass Panel / Card ─────────────────────────────────── */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 20px;
  animation: fadeInUp 0.4s ease both;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
}

.panel-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font: 600 14px 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.25);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
}

.btn-icon.sm {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 13px;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-group {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-stack {
  display: grid;
  gap: 16px;
}

.input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 14px 'Inter', sans-serif;
  transition: all var(--transition);
  outline: none;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input::placeholder {
  color: var(--text-dim);
}

select {
  cursor: pointer;
}

select option {
  background: var(--card-solid);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--surface);
}

/* ─── Badges / Pills ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--indigo);
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.badge-violet {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: block;
}

/* ─── Search / Filter Bar ────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.search-input-wrap .input {
  padding-left: 38px;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill:hover {
  border-color: var(--border-h);
  color: var(--text);
}

.filter-pill.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--indigo);
}

/* ─── Login Page ─────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: min(480px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg), var(--glow-indigo);
  animation: fadeInUp 0.5s ease;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo .brand-icon {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.login-logo .brand-name {
  font-size: 22px;
}

.role-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}

.role-tab {
  flex: 1;
  padding: 9px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  border: none;
  background: transparent;
}

.role-tab.active {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.pw-wrap {
  position: relative;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: color var(--transition);
}

.pw-toggle:hover {
  color: var(--text);
}

.pw-wrap .input {
  padding-right: 42px;
}

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.cred-hint {
  margin-top: 20px;
  padding: 14px;
  background: var(--surface);
  border: 1px dashed var(--border-h);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}

.cred-hint strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

/* ─── Candidate Drawer ───────────────────────────────────── */
.drawer-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: -520px;
  bottom: 0;
  width: 500px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 201;
  transition: right 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer.open {
  right: 0;
}

.drawer-head {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
}

/* ─── Charts ─────────────────────────────────────────────── */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.chart-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.chart-canvas-wrap {
  position: relative;
  height: 220px;
}

.chart-canvas-wrap.tall {
  height: 280px;
}

/* ─── Question Builder ───────────────────────────────────── */
.qbuilder-list {
  display: grid;
  gap: 16px;
}

.qbuilder-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  cursor: grab;
}

.qbuilder-card:hover {
  border-color: var(--border-h);
}

.qbuilder-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
  border-style: dashed;
  border-color: var(--indigo);
}

.qbuilder-card.drag-over {
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.08);
}

.qbuilder-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.qbuilder-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.qbuilder-type {
  flex: 1;
  min-width: 140px;
}

.qbuilder-marks {
  width: 80px;
}

.drag-handle {
  color: var(--text-dim);
  cursor: grab;
  font-size: 16px;
  padding: 4px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.option-radio {
  width: auto !important;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--indigo);
}

.option-input {
  flex: 1;
}

.remove-option-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.remove-option-btn:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

.add-option-btn {
  margin-top: 8px;
}

/* ─── Paper Preview Modal ────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 300;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(700px, calc(100vw - 32px));
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── Candidate Quiz ─────────────────────────────────────── */
.quiz-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.quiz-sidebar {
  width: 240px;
  min-height: 100vh;
  background: rgba(10, 10, 20, 0.95);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  backdrop-filter: blur(20px);
}

.quiz-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.quiz-timer {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  margin-bottom: 20px;
}

.quiz-timer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quiz-timer-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--indigo);
  font-variant-numeric: tabular-nums;
}

.quiz-timer.warning .quiz-timer-value {
  color: var(--amber);
  animation: timerPulse 1s ease infinite;
}

.quiz-timer.danger .quiz-timer-value {
  color: var(--red);
  animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.qnav-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.qnav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.qnav-btn {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qnav-btn:hover {
  border-color: var(--border-h);
  color: var(--text);
}

.qnav-btn.answered {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

.qnav-btn.flagged {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
}

.qnav-btn.current {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--indigo);
  color: #fff;
}

.quiz-main {
  flex: 1;
  margin-left: 240px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 240px);
}

.quiz-progress {
  margin-bottom: 32px;
}

.quiz-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-brand);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  flex: 1;
  animation: fadeInUp 0.3s ease;
}

.question-card.animate {
  animation: slideQuestion 0.3s ease;
}

@keyframes slideQuestion {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.question-num {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 24px;
}

.answer-options {
  display: grid;
  gap: 10px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.answer-option:hover {
  border-color: var(--border-h);
  background: var(--surface);
}

.answer-option.selected {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.1);
}

.answer-option input[type="radio"] {
  display: none;
}

.option-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.answer-option.selected .option-circle {
  border-color: var(--indigo);
  background: var(--indigo);
}

.answer-option.selected .option-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.answer-option-text {
  font-size: 15px;
}

.answer-textarea {
  width: 100%;
  min-height: 120px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.flag-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.flag-btn.flagged {
  color: var(--amber);
}

/* ─── Welcome Screen ─────────────────────────────────────── */
.welcome-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.welcome-card {
  width: min(600px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease;
}

.welcome-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.welcome-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.rules-list {
  text-align: left;
  display: grid;
  gap: 10px;
  margin-bottom: 32px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}

.rule-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Results Screen ─────────────────────────────────────── */
.result-card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease;
}

.result-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: var(--glow-indigo);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.result-score-num {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.result-score-max {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.result-verdict {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.result-stats-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.result-stat {
  text-align: center;
}

.result-stat .val {
  font-size: 24px;
  font-weight: 800;
}

.result-stat .lbl {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Admin Management Cards ─────────────────────────────── */
.company-card,
.recruiter-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
}

.company-card:hover,
.recruiter-row:hover {
  border-color: var(--border-h);
  background: var(--surface-h);
}

.company-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Toast Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-solid);
  color: var(--text);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  backdrop-filter: blur(20px);
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}

.toast-msg {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0;
  transition: color var(--transition);
}

.toast-close:hover {
  color: var(--text);
}

.toast.success {
  border-left: 4px solid var(--green);
}

.toast.error {
  border-left: 4px solid var(--red);
}

.toast.info {
  border-left: 4px solid var(--indigo);
}

.toast.warning {
  border-left: 4px solid var(--amber);
}

/* ─── Divider / Misc ─────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.text-muted {
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-h);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
}

.toggle.on {
  background: var(--green);
}

.toggle.on::after {
  transform: translateX(18px);
}

.copy-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  margin-top: 8px;
}

.copy-link-text {
  flex: 1;
  font-family: monospace;
}

/* ─── Score indicator ─────────────────────────────────────── */
.score-bar-wrap {
  margin-top: 6px;
}

.score-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  width: 100px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.score-bar-fill.pass {
  background: var(--grad-green);
}

.score-bar-fill.fail {
  background: var(--grad-red);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    width: 60px;
  }

  .brand-name,
  .nav-label,
  .sidebar-user .user-info {
    display: none;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 24px 0;
  }

  .sidebar-nav {
    padding: 12px 8px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .nav-icon {
    margin: 0;
  }

  .main-content {
    margin-left: 60px;
    padding: 24px 20px;
    max-width: calc(100vw - 60px);
  }

  .quiz-sidebar {
    width: 60px;
  }

  .quiz-sidebar-brand span,
  .qnav-label,
  .quiz-timer-label {
    display: none;
  }

  .quiz-timer-value {
    font-size: 18px;
  }

  .quiz-main {
    margin-left: 60px;
    padding: 24px;
    max-width: calc(100vw - 60px);
  }
}

@media (max-width: 600px) {

  .sidebar,
  .quiz-sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    max-width: 100vw;
  }

  .quiz-main {
    margin-left: 0;
    padding: 16px;
    max-width: 100vw;
  }

  .welcome-card,
  .result-card {
    padding: 28px 20px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Notification Bell & Badge ─────────────────────────── */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  border: 2px solid var(--bg2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
}

/* ─── Notification Panel ─────────────────────────────────── */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.2);
}

.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 95vw;
  height: 100vh;
  background: var(--card);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#notifList {
  flex: 1;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.notif-item:hover {
  background: var(--surface-h);
}

.notif-item.unread {
  background: rgba(99, 102, 241, 0.06);
}

.notif-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--indigo);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ─── Clickable Stat Cards ────────────────────────────────── */
.clickable-stat {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.clickable-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.2);
  border-color: var(--indigo);
}

/* ─── Badge Amber ─────────────────────────────────────────── */
.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ─── Recruiters Directory & Teammate Modal ─────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
  background: var(--text-muted);
}

.recruiters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.recruiter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recruiter-card:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow: 0 20px 50px rgba(79, 82, 232, 0.18);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-user-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar.lg {
  width: 52px;
  height: 52px;
  font-size: 22px;
  font-weight: 700;
  border-radius: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
}

.answer-option:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

.answer-option.selected {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.15);
}

.answer-option input[type="radio"] {
  display: none;
}

.option-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.answer-option.selected .option-circle {
  border-color: var(--indigo);
  background: var(--indigo);
}

.answer-option.selected .option-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.answer-option-text {
  font-size: 14px;
  color: var(--text);
}

.answer-textarea {
  width: 100%;
  min-height: 100px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
  flex-wrap: wrap;
}

.flag-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.flag-btn.flagged {
  color: var(--amber);
  border-color: var(--amber);
}

/* ─── Welcome Screen & Results ────────────────────────────── */
.welcome-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.welcome-card,
.result-card {
  width: min(540px, 100%);
  background: var(--card);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.welcome-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.welcome-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.rules-list {
  text-align: left;
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
}

.result-score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--indigo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.result-score-num {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.result-score-max {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.result-verdict {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}


/* ─── Utilities & Empty States ───────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.copy-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-solid);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  transition: background 0.3s ease;
}

.copy-link-text {
  flex: 1;
  font-family: monospace;
}

/* ─── Theme Toggle Button ─────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-h);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.25s ease;
  flex-shrink: 0;
  color: var(--text-muted);
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--surface-h);
  border-color: var(--indigo);
  color: var(--indigo);
  box-shadow: var(--glow-indigo);
  transform: scale(1.1) rotate(15deg);
}

/* ─── Light mode: card + input overrides ─────────────────── */
[data-theme="light"] .card,
[data-theme="light"] .panel,
[data-theme="light"] .stat-card,
[data-theme="light"] .modal-box,
[data-theme="light"] .notif-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(79, 82, 232, 0.10);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-h);
  color: var(--text);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: var(--text-dim);
}

[data-theme="light"] .nav-item:hover {
  background: var(--surface-h);
  color: var(--indigo);
}

[data-theme="light"] .nav-item.active {
  background: rgba(79, 82, 232, 0.12);
  border-color: rgba(79, 82, 232, 0.25);
  color: var(--indigo);
}

[data-theme="light"] .bg-orbs::before {
  background: radial-gradient(circle, rgba(79, 82, 232, 0.10) 0%, transparent 70%);
}
[data-theme="light"] .bg-orbs::after {
  background: radial-gradient(circle, rgba(192, 38, 211, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .rule-item {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.18);
  color: var(--text);
}

[data-theme="light"] .welcome-card,
[data-theme="light"] .result-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 8px 32px rgba(79, 82, 232, 0.10);
}

/* ─── HR Analytics & Chart Grid System ─────────────────── */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.chart-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chart-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 18px;
}

.chart-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.chart-badge.indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.chart-badge.green  { background: rgba(34, 197, 94, 0.15);  color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.chart-badge.amber  { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.chart-badge.cyan   { background: rgba(6, 182, 212, 0.15);  color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

.chart-canvas-wrap {
  position: relative;
  height: 270px;
  width: 100%;
  flex: 1;
}

.chart-canvas-wrap.tall {
  height: 330px;
}

[data-theme="light"] .chart-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(79, 82, 232, 0.08);
}

[data-theme="light"] .chart-title {
  color: #1e293b;
}

[data-theme="light"] .chart-sub {
  color: #64748b;
}