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

:root {
  /* Core palette */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99,102,241,0.08);
  --primary-glow: rgba(99,102,241,0.25);

  /* Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-active: rgba(99,102,241,0.15);
  --sidebar-hover: rgba(255,255,255,0.05);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 260px;

  /* Surfaces */
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-hover: #fafbfc;
  --glass: rgba(255,255,255,0.7);

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: var(--primary);

  /* Status */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  /* Shape */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px -8px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.15);

  /* Transition */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }

/* =============================================
   VISIBILITY GUARDS & HELPERS
   ============================================= */
[hidden] {
  display: none !important;
}

body.logged-in .login-screen {
  display: none !important;
}

body:not(.logged-in) .admin-navbar,
body:not(.logged-in) .admin-sidebar,
body:not(.logged-in) .admin-main {
  display: none !important;
}

/* =============================================
   LOGIN SCREEN
   ============================================= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15), transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(14,165,233,0.1), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(168,85,247,0.08), transparent 50%);
  animation: loginGlow 15s ease-in-out infinite alternate;
}

@keyframes loginGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, -5%) rotate(3deg); }
}

.login-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

.login-card h2 {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 32px;
}

.login-card form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-card label {
  color: rgba(255,255,255,0.7) !important;
}

.login-card .form-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #ffffff;
}

.login-card .form-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.login-card .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255,255,255,0.08);
}

.login-card .btn-primary {
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
}

/* =============================================
   TOP NAVBAR (visible after login)
   ============================================= */
.admin-navbar {
  display: none;
}

body.logged-in .admin-navbar {
  display: block;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 40;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-container {
  height: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.admin-brand { display: none; }

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.user-tag {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--border-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

/* =============================================
   SIDEBAR NAVIGATION
   ============================================= */
.admin-sidebar {
  display: none;
}

body.logged-in .admin-sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  z-index: 50;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
  padding: 24px 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-text strong {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.sidebar-brand-text span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(148,163,184,0.5);
  padding: 20px 22px 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.sidebar-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-align: left;
  width: 100%;
  position: relative;
}

.sidebar-nav-btn:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.sidebar-nav-btn.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}

.sidebar-nav-btn.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

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

.sidebar-nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  border-radius: 10px;
  transition: all var(--transition);
  margin: 0 -14px;
}

.sidebar-footer a:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.admin-main {
  display: none;
}

body.logged-in .admin-main {
  display: block;
  margin-left: var(--sidebar-width);
  padding: 88px 32px 40px;
  min-height: 100vh;
}

/* Hide the old tabs */
.admin-tabs { display: none !important; }

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

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

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #6d28d9);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--border-light);
  border-color: #cbd5e1;
  color: var(--text);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 8px;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}

/* =============================================
   STATS GRID
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.stat-card:nth-child(1)::after { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.stat-card:nth-child(2)::after { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.stat-card:nth-child(3)::after { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card:nth-child(4)::after { background: linear-gradient(90deg, #f59e0b, #f97316); }

.stat-info span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info b {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  margin-top: 6px;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.stat-icon.cyan { background: linear-gradient(135deg, #e0f2fe, #bae6fd); color: #0284c7; }
.stat-icon.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; }
.stat-icon.emerald { background: linear-gradient(135deg, #ecfdf5, #a7f3d0); color: #059669; }
.stat-icon.amber { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.card-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =============================================
   CONTENT GRID (2-column forms)
   ============================================= */
.content-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-message {
  font-size: 12px;
}

/* =============================================
   RECORDS LIST
   ============================================= */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}

.record-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-main h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.record-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.record-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-new { background: var(--info-bg); color: var(--info); }
.badge-review { background: var(--warning-bg); color: #b45309; }
.badge-interview { background: #f3e8ff; color: #6b21a8; }
.badge-selected { background: var(--success-bg); color: #047857; }
.badge-closed { background: var(--border-light); color: var(--text-secondary); }
.badge-active { background: var(--success-bg); color: #047857; border: 1px solid #a7f3d0; }
.badge-hidden { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }

/* =============================================
   TEAM ITEMS
   ============================================= */
.team-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  align-items: center;
  transition: all var(--transition);
}

.team-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

/* =============================================
   FILE UPLOAD ITEMS
   ============================================= */
.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: all var(--transition);
}

.file-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.file-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.file-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-light), rgba(139,92,246,0.08));
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}

/* =============================================
   SYSTEM STATUS GRID (Overview)
   ============================================= */
.system-status-grid {
  display: flex;
  flex-direction: column;
}

.system-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.system-status-row .status-label {
  color: var(--text-muted);
  font-weight: 500;
}

.system-status-row strong {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* =============================================
   TAB PANES (handled by JS)
   ============================================= */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--sidebar-bg);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  border-left: 3px solid var(--primary);
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   NEW ADMIN OPTIONS & UI EXTENSIONS
   ============================================= */
.quick-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-actions-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 16px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

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

.search-input-wrap .form-input {
  padding-left: 36px;
  font-size: 13px;
  height: 38px;
}

.filter-select {
  width: auto;
  min-width: 150px;
  height: 38px;
  font-size: 13px;
}

.user-role-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(99,102,241,0.12);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-role-super {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-role-editor {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-role-hr {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-active {
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.badge-inactive {
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Internal Notes Box */
.notes-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-container label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-input-row {
  display: flex;
  gap: 8px;
}

.notes-textarea {
  flex: 1;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  min-height: 34px;
  max-height: 120px;
  font-family: inherit;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Admin Modals */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.admin-modal {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.admin-modal-header h3 {
  font-size: 18px;
  margin: 0;
}

.admin-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}

.admin-modal-close:hover {
  background: var(--border-light);
  color: var(--text);
}

.admin-modal-body {
  padding: 24px;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
  .content-grid {
    grid-template-columns: 1fr;
  }
  body.logged-in .admin-main {
    padding: 80px 20px 32px;
  }
}

@media (max-width: 768px) {
  body.logged-in .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
  }
  body.logged-in .admin-navbar {
    left: 0;
  }
  body.logged-in .admin-main {
    margin-left: 0;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 4px;
  }
  .sidebar-nav-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
  }
  .sidebar-nav-btn.active::before { display: none; }
  .sidebar-section-label { display: none; }
  .sidebar-footer { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .record-bottom { flex-direction: column; align-items: flex-start; }
}

/* =============================================
   STUDENT APPLICANT CARD STYLES
   ============================================= */
.applicant-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.applicant-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.applicant-card.card-highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  animation: pulseHighlight 2s ease-in-out;
}

@keyframes pulseHighlight {
  0% { transform: scale(1.01); }
  50% { transform: scale(1); }
  100% { transform: scale(1); }
}

.applicant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.applicant-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.applicant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.applicant-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.applicant-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.applicant-meta-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 4px;
}

.meta-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: color var(--transition);
}

.meta-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.applicant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.applicant-grid-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.applicant-grid-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.applicant-grid-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.skills-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.1px;
}

.portfolio-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-chip:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.applicant-message-box {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

.live-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulseDot 2s infinite;
}

@keyframes livePulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Status Badges */
.badge-status-new { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-status-under-review { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-status-shortlisted { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-status-interview { background: #fce7f3; color: #be185d; border: 1px solid #fbcfe8; }
.badge-status-selected { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-status-not-selected { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-status-on-hold { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

