/* ============================================================
   VERTICAL RECRUITMENT — DESIGN SYSTEM
   Glassmorphic Dark Mode + Dynamic Accent Color Selection
   ============================================================ */

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

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  /* Base backgrounds */
  --bg-primary:      #080b18;
  --bg-secondary:    #0d1023;
  --bg-tertiary:     #111526;
  --bg-card:         rgba(255,255,255,0.035);
  --bg-card-hover:   rgba(255,255,255,0.055);
  --bg-input:        rgba(255,255,255,0.06);
  --bg-sidebar:      rgba(8,11,24,0.95);

  /* Borders */
  --border-glass:    rgba(255,255,255,0.07);
  --border-strong:   rgba(255,255,255,0.12);
  --border-input:    rgba(255,255,255,0.1);

  /* Text */
  --text-primary:    #eef2ff;
  --text-secondary:  rgba(238,242,255,0.55);
  --text-muted:      rgba(238,242,255,0.35);
  --text-inverse:    #080b18;

  /* Dynamic Accent — Electric Blue (default) */
  --accent-h: 221;
  --accent-s: 83%;
  --accent-l: 63%;
  --accent:         hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-dark:    hsl(var(--accent-h), var(--accent-s), 48%);
  --accent-light:   hsl(var(--accent-h), var(--accent-s), 78%);
  --accent-glow:    hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.25);
  --accent-glow-lg: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
  --accent-soft:    hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.1);
  --accent-border:  hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.3);

  /* Status colors */
  --status-applied:   #3b82f6;
  --status-screening: #f59e0b;
  --status-interview: #8b5cf6;
  --status-selected:  #14b8a6;
  --status-offer:     #f97316;
  --status-accepted:  #22c55e;
  --status-rejected:  #ef4444;
  --status-pending:   #94a3b8;

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #38bdf8;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
}

/* ─── ACCENT THEMES ─────────────────────────────────────────── */
html[data-accent="blue"]   { --accent-h: 221; --accent-s: 83%; --accent-l: 63%; }
html[data-accent="violet"] { --accent-h: 258; --accent-s: 75%; --accent-l: 65%; }
html[data-accent="emerald"]{ --accent-h: 158; --accent-s: 64%; --accent-l: 48%; }
html[data-accent="amber"]  { --accent-h: 38;  --accent-s: 92%; --accent-l: 55%; }
html[data-accent="rose"]   { --accent-h: 338; --accent-s: 82%; --accent-l: 62%; }
html[data-accent="cyan"]   { --accent-h: 196; --accent-s: 85%; --accent-l: 50%; }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1 { font-size: 2rem;   font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem;font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem;   font-weight: 600; }
h5 { font-size: 0.9rem; font-weight: 600; }
h6 { font-size: 0.8rem; font-weight: 600; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-light); }

/* ─── GLASS CARD ─────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.glass-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong);
}
.glass-card-static { /* no hover lift */
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ─── STAT / KPI CARDS ───────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  cursor: default;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .stat-trend {
  font-size: 0.75rem;
  font-weight: 500;
  display: flex; align-items: center; gap: 3px;
  margin-top: 8px;
}
.stat-card .stat-trend.up   { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* Sparkline area */
.stat-card .sparkline {
  position: absolute;
  bottom: 0; right: 0;
  opacity: 0.25;
  width: 80px; height: 40px;
}

/* ─── METRIC RINGS ───────────────────────────────────────────── */
.metric-ring-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.ring-wrap {
  position: relative;
  width: 64px; height: 64px;
  flex-shrink: 0;
}
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 6; }
.ring-wrap .ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 163; /* 2πr, r=26 */
  stroke-dashoffset: 163;
  transition: stroke-dashoffset 1.2s ease;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}
.ring-wrap .ring-label {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ring-info .ring-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.ring-info .ring-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ring-info .ring-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ─── PIPELINE STATUS BADGES ─────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-applied    { background: rgba(59,130,246,0.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-screening  { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-interview  { background: rgba(139,92,246,0.15);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.badge-selected   { background: rgba(20,184,166,0.15);  color: #2dd4bf; border: 1px solid rgba(20,184,166,0.3); }
.badge-offer      { background: rgba(249,115,22,0.15);  color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.badge-accepted   { background: rgba(34,197,94,0.15);   color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-joined     { background: rgba(34,197,94,0.15);   color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-rejected   { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-pending    { background: rgba(148,163,184,0.1);  color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.badge-active     { background: rgba(34,197,94,0.15);   color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 6px 24px var(--accent-glow); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--accent-border); color: var(--accent); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-md); }

/* ─── FORM ELEMENTS ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: rgba(255,255,255,0.08);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
select.form-control option {
  background-color: #ffffff;
  color: #000000;
}
textarea.form-control { resize: vertical; min-height: 100px; }

.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }

/* ─── DATA TABLE ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:last-child { border-bottom: none; }

/* ─── PROGRESS BAR ───────────────────────────────────────────── */
.progress-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 1s ease;
}

/* ─── ALERTS / TOAST ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid;
}
.alert-success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.25);  color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.25);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); color: #fbbf24; }
.alert-info    { background: rgba(56,189,248,0.1); border-color: rgba(56,189,248,0.25); color: #38bdf8; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 560px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-base);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* ─── SIDEBAR LAYOUT ─────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition-base);
  overflow-x: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.sidebar-logo .logo-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
}
.sidebar-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 20px 6px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--transition-base);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.nav-item .nav-icon {
  width: 20px; height: 20px;
  font-size: 1rem;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nav-item .nav-icon i, .nav-item .nav-icon svg {
  max-width: 20px; max-height: 20px;
  font-size: 1rem;
}
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}
.nav-item .nav-chevron {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}
.nav-item.open .nav-chevron { transform: rotate(90deg); }

.nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-base);
}
.nav-sub.open { max-height: 400px; }
.nav-sub .nav-item {
  padding-left: 52px;
  font-size: 0.82rem;
  border-left: none;
}
.nav-sub .nav-item.active { background: var(--accent-soft); }

/* Collapsed sidebar tooltips */
.sidebar.collapsed .nav-item { padding: 12px; justify-content: center; border-left: none; }
.sidebar.collapsed .nav-item .nav-label,
.sidebar.collapsed .nav-item .nav-chevron,
.sidebar.collapsed .nav-item .nav-badge { display: none; }

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition-base);
  min-width: 0;
  min-height: 100vh;
}
.main-content.expanded { margin-left: var(--sidebar-collapsed); }

/* ─── TOP BAR ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: rgba(8,11,24,0.95);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-wrap: nowrap;
}
.topbar-toggle {
  width: 36px; height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.topbar-toggle:hover { color: var(--accent); border-color: var(--accent-border); }

.topbar-welcome { flex: 1; }
.topbar-welcome .welcome-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.topbar-welcome .welcome-sub  { font-size: 0.75rem; color: var(--text-muted); }

.topbar-filters { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.topbar-filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.8rem;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}
.topbar-filter-select:focus { border-color: var(--accent); }
.topbar-filter-select option {
  background-color: #ffffff;
  color: #000000;
}

.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-icon-btn {
  width: 36px; height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}
.topbar-icon-btn:hover { color: var(--accent); border-color: var(--accent-border); }
.topbar-icon-btn .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}
.topbar-icon-btn .notif-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px; text-align: center;
}

.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── PAGE CONTENT ───────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── GRID HELPERS ───────────────────────────────────────────── */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-7 { grid-template-columns: repeat(7, 1fr); }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-3  { gap: 12px; }
.gap-2  { gap: 8px; }

/* ─── FLEX HELPERS ───────────────────────────────────────────── */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1         { flex: 1; }
.flex-wrap      { flex-wrap: wrap; }
.gap-1          { gap: 4px; }
.gap-2          { gap: 8px; }
.gap-3          { gap: 12px; }
.gap-4          { gap: 16px; }

/* ─── SPACING ────────────────────────────────────────────────── */
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }

/* ─── TEXT HELPERS ───────────────────────────────────────────── */
.text-sm    { font-size: 0.8rem; }
.text-xs    { font-size: 0.72rem; }
.text-lg    { font-size: 1rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── SEARCH BAR ─────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  gap: 10px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-bar input {
  background: none; border: none; outline: none;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  flex: 1;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { color: var(--text-muted); font-size: 0.9rem; }

/* ─── TABS ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--bg-input); border-radius: var(--radius-md); padding: 4px; }
.tab-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none; background: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-family);
}
.tab-btn.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }
.tab-btn:not(.active):hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* ─── AVATAR ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  border: 2px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 42px; height: 42px; font-size: 0.9rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* ─── CHART CONTAINERS ───────────────────────────────────────── */
.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap canvas { display: block; width: 100% !important; }

/* ─── PIPELINE TRACKER (Candidate Portal) ────────────────────── */
.pipeline-tracker {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-step {
  flex: 1; min-width: 100px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.pipeline-step::before {
  content: '';
  position: absolute;
  top: 20px; left: 50%;
  width: 100%; height: 2px;
  background: var(--border-glass);
  z-index: 0;
}
.pipeline-step:last-child::before { display: none; }
.pipeline-step.completed::before { background: var(--accent); }

.pipeline-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-glass);
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  position: relative; z-index: 1;
  transition: all var(--transition-base);
  flex-shrink: 0;
}
.pipeline-step.completed .pipeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}
.pipeline-step.active .pipeline-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.pipeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.3;
  max-width: 90px;
}
.pipeline-step.completed .pipeline-label { color: var(--accent); }
.pipeline-step.active    .pipeline-label { color: var(--text-primary); }

/* ─── DOCUMENT UPLOAD ZONES ──────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-input);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-input);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone .upload-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 8px; }
.upload-zone.has-file { border-color: var(--success); background: rgba(34,197,94,0.05); }
.upload-zone.has-file .upload-icon { color: var(--success); }

/* ─── NOTIFICATION BELL DROPDOWN ────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 360px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition-base);
}
.notif-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.875rem; font-weight: 700;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item .notif-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 0.9rem; flex-shrink: 0;
}
.notif-item .notif-body { flex: 1; }
.notif-item .notif-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.notif-item .notif-sub   { font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; }

/* ─── ACCENT SWITCHER ────────────────────────────────────────── */
.accent-switcher { display: flex; gap: 8px; align-items: center; }
.accent-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.accent-swatch:hover { transform: scale(1.2); }
.accent-swatch.active { border-color: #fff; transform: scale(1.15); }
.accent-swatch[data-accent="blue"]   { background: hsl(221,83%,63%); }
.accent-swatch[data-accent="violet"] { background: hsl(258,75%,65%); }
.accent-swatch[data-accent="emerald"]{ background: hsl(158,64%,48%); }
.accent-swatch[data-accent="amber"]  { background: hsl(38,92%,55%); }
.accent-swatch[data-accent="rose"]   { background: hsl(338,82%,62%); }
.accent-swatch[data-accent="cyan"]   { background: hsl(196,85%,50%); }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.animate-fade-up  { animation: fadeInUp 0.5s ease both; }
.animate-fade     { animation: fadeIn 0.4s ease both; }

/* Staggered card animations */
.stat-card:nth-child(1) { animation: fadeInUp 0.4s 0.05s ease both; }
.stat-card:nth-child(2) { animation: fadeInUp 0.4s 0.10s ease both; }
.stat-card:nth-child(3) { animation: fadeInUp 0.4s 0.15s ease both; }
.stat-card:nth-child(4) { animation: fadeInUp 0.4s 0.20s ease both; }
.stat-card:nth-child(5) { animation: fadeInUp 0.4s 0.25s ease both; }
.stat-card:nth-child(6) { animation: fadeInUp 0.4s 0.30s ease both; }
.stat-card:nth-child(7) { animation: fadeInUp 0.4s 0.35s ease both; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-sm);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-cols-7 { grid-template-columns: repeat(4, 1fr); }
  .grid-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .topbar-filters { display: none; }
  .grid-cols-5, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .page-body { padding: 16px; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
