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

/* ─── CSS Variables — Light Theme ─────────────────── */
:root {
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --accent-blue: #4361ee;
  --accent-purple: #7c3aed;
  --accent-cyan: #0ea5e9;
  --accent-green: #059669;
  --accent-orange: #d97706;
  --accent-red: #dc2626;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --border: rgba(67, 97, 238, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(67, 97, 238, 0.08), 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(67, 97, 238, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --glow-blue: 0 4px 24px rgba(67, 97, 238, 0.18);
  --glow-purple: 0 4px 24px rgba(124, 58, 237, 0.15);
  --input-bg: #f9fafb;
  --input-border: #e2e8f0;
  --table-border: #f1f5f9;
  --table-head-bg: #f8fafc;
  --alert-success-bg: #ecfdf5;
  --alert-danger-bg: #fef2f2;
  --alert-warning-bg: #fffbeb;
  --sidebar-active: rgba(67, 97, 238, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── CSS Variables — Dark Theme ──────────────────── */
html.dark {
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #1e293b;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
  --input-bg: #0f172a;
  --input-border: #334155;
  --table-border: #1e293b;
  --table-head-bg: #020617;
  --alert-success-bg: rgba(16, 185, 129, 0.12);
  --alert-danger-bg: rgba(239, 68, 68, 0.12);
  --alert-warning-bg: rgba(245, 158, 11, 0.12);
  --sidebar-active: rgba(255, 255, 255, 0.06);
}

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

/* Global theme switch transition */
body,
aside,
header,
main,
div,
section,
span,
a,
button,
input,
textarea,
.card {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Custom Text Selection */
::selection {
  background: rgba(67, 97, 238, 0.2);
  color: var(--accent-blue);
}

html.dark ::selection {
  background: rgba(67, 97, 238, 0.4);
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  /* Subtle dot-grid texture */
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
}

html.dark body {
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--input-border);
  border-radius: 10px;
  border: 3px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(67, 97, 238, 0.07);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

html.dark .sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.6);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.back-arrow-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  margin-right: 4px;
}

.back-arrow-link:hover {
  background: var(--sidebar-active);
  color: var(--accent-blue);
  transform: translateX(-2px);
}

html.dark .back-arrow-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--glow-blue);
  animation: brand-pulse 4s ease-in-out infinite;
}

@keyframes brand-pulse {

  0%,
  100% {
    box-shadow: var(--glow-blue);
  }

  50% {
    box-shadow: 0 4px 28px rgba(124, 58, 237, 0.45);
  }
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--accent-blue);
  background: var(--sidebar-active);
  transform: translateX(3px);
}

.nav-link.active {
  color: var(--accent-blue);
  background: linear-gradient(90deg, rgba(67, 97, 238, 0.14), rgba(67, 97, 238, 0.04));
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
  border-radius: 0 3px 3px 0;
}

.nav-link .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.logout-link {
  color: #ef4444 !important;
  margin-top: 4px;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #dc2626 !important;
}

.sidebar-footer {
  padding: 16px 12px 24px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--sidebar-active);
  border: 1px solid var(--border);
}

.user-info-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--sidebar-active);
  border-radius: 30px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.user-info-topbar:hover {
  background: var(--bg-card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-name-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ─── Main Content ───────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed~.main-content,
body.sidebar-closed .main-content {
  margin-left: 0;
}

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Removed redundant dark override as topbar now uses --glass-bg variable */

.sidebar-toggle {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--sidebar-active);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  border: 1px solid transparent;
}

.theme-toggle-btn:hover {
  background: var(--sidebar-active);
  transform: rotate(15deg) scale(1.1);
  border-color: var(--border);
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.topbar-btn:hover {
  background: var(--sidebar-active);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.btn-logout {
  background: rgba(220, 38, 38, 0.08);
  color: var(--accent-red);
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.btn-logout:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-red);
  transform: translateY(-1px);
}

/* ─── Page Content ───────────────────────────────── */
.page-content {
  padding: 36px 40px;
  flex: 1;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ─── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.04), rgba(124, 58, 237, 0.02));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.card:hover {
  border-color: rgba(67, 97, 238, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-body {
  padding: 28px;
}

/* ── Gradient Stat Cards ── */
.stat-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.06;
  transition: all 0.4s ease;
}

.stat-card:hover {
  border-color: rgba(67, 97, 238, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}

.stat-card:hover::after {
  transform: scale(1.5);
  opacity: 0.1;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.icon-blue {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.18), rgba(67, 97, 238, 0.08));
}

.icon-purple {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0.08));
}

.icon-green {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.18), rgba(5, 150, 105, 0.08));
}

.icon-orange {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(217, 119, 6, 0.08));
}

.icon-cyan {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.08));
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* ─── Forms ───────────────────────────────────────── */
.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: block;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-blue);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-control::placeholder {
  color: #94a3b8;
  opacity: 0.6;
}

html.dark .form-control::placeholder {
  color: #64748b;
  opacity: 0.7;
}

/* Removed custom select arrow - using default browser appearance */

/* Fix option rendering in dark mode */
select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px;
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-group {
  margin-bottom: 20px;
}

/* ─── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(67, 97, 238, 0.55);
  color: #fff;
}

.btn-purple {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-purple:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), #047857);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.btn-outline {
  background: var(--bg-secondary);
  border: 1.5px solid var(--input-border);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(67, 97, 238, 0.05);
}

.btn-danger {
  background: rgba(220, 38, 38, 0.08);
  border: 1.5px solid rgba(220, 38, 38, 0.2);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.14);
  color: var(--accent-red);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ─── Alerts / Flash Messages ────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border: 1.5px solid transparent;
  font-weight: 500;
}

.alert-success {
  background: var(--alert-success-bg);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.alert-danger {
  background: var(--alert-danger-bg);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.alert-warning {
  background: var(--alert-warning-bg);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.alert-info {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ─── Resume Table ───────────────────────────────── */
.resume-table {
  width: 100%;
  border-collapse: collapse;
}

.resume-table thead tr {
  background: var(--table-head-bg);
  border-bottom: 1.5px solid var(--table-border);
}

.resume-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 18px;
  text-align: left;
}

.resume-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--table-border);
  font-size: 0.88rem;
  vertical-align: middle;
}

.resume-table tbody tr {
  transition: var(--transition);
}

.resume-table tbody tr:hover {
  background: rgba(67, 97, 238, 0.04);
}

.resume-name {
  font-weight: 600;
  color: var(--text-primary);
}

.resume-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Badges ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-blue {
  background: rgba(67, 97, 238, 0.1);
  color: var(--accent-blue);
}

.badge-green {
  background: rgba(5, 150, 105, 0.1);
  color: var(--accent-green);
}

.badge-orange {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent-orange);
}

.badge-red {
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
}

/* ─── Auth Page Layout ────────────────────────────── */
body.auth-page {
  display: block;
}

/* ─── Auth Pages ─────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(67, 97, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

html:not(.dark) .auth-wrapper {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 50%, #f5f0ff 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(67, 97, 238, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  font-size: 24px;
}

.auth-logo h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.87rem;
  margin-top: 6px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 12px;
  font-weight: 500;
}

.auth-divider a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.auth-divider a:hover {
  text-decoration: underline;
}

/* ─── Score Circle ───────────────────────────────── */
.score-ring-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-ring {
  position: relative;
  width: 160px;
  height: 160px;
}

.score-ring svg {
  transform: rotate(-90deg);
  width: 160px;
  height: 160px;
}

.score-ring circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.score-ring .ring-bg {
  stroke: #e5e7eb;
}

.score-ring .ring-fill {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-green {
  stroke: #059669;
}

.ring-blue {
  stroke: #4361ee;
}

.ring-orange {
  stroke: #d97706;
}

.ring-red {
  stroke: #dc2626;
}

.text-green {
  color: #059669;
}

.text-blue {
  color: #4361ee;
}

.text-orange {
  color: #d97706;
}

.text-red {
  color: #dc2626;
}

.score-ring .score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Progress Bars ──────────────────────────────── */
.progress-bar-wrap {
  padding-bottom: 30px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
}

.sidebar.mobile-open {
  transform: translateX(0) !important;
}

.sidebar-overlay.active {
  display: block;
}

/* Sidebar toggle button (hamburger) only visible on mobile or when forced */
.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
  margin-right: 12px;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-bar-title {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-primary);
}

.progress-bar-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.progress-track {
  height: 7px;
  background: var(--input-border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-blue {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

.fill-green {
  background: linear-gradient(90deg, var(--accent-green), #34d399);
}

.fill-purple {
  background: linear-gradient(90deg, var(--accent-purple), #a78bfa);
}

.fill-orange {
  background: linear-gradient(90deg, var(--accent-orange), #fbbf24);
}

/* ─── Skill Tags ─────────────────────────────────── */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-tag {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.tag-missing {
  background: var(--alert-danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--accent-red);
}

.tag-present {
  background: var(--alert-success-bg);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: var(--accent-green);
}

/* ─── Chip Checkboxes ────────────────────────────── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--input-border);
  color: var(--text-muted);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  user-select: none;
}

.chip input[type="checkbox"] {
  display: none;
}

.chip:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(67, 97, 238, 0.05);
}

.chip.checked {
  background: var(--sidebar-active);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 600;
}

/* ─── Repeatable Cards ───────────────────────────── */
.repeatable-card {
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
}

.remove-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--accent-red);
  border-radius: 6px;
  cursor: pointer;
  padding: 3px 10px;
  font-size: 0.75rem;
  transition: var(--transition);
}

.remove-btn:hover {
  background: rgba(220, 38, 38, 0.15);
}

.repeatable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.repeatable-header .section-title {
  margin-bottom: 0;
}

.repeatable-header .section-title::after {
  display: none;
}

/* ─── Section Title ──────────────────────────────── */
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(67, 97, 238, 0.2), transparent);
}

/* ─── Resume View Card ───────────────────────────── */
.resume-view-header {
  padding: 32px;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.07), rgba(124, 58, 237, 0.07));
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.resume-view-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.resume-view-header .title-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  background: rgba(67, 97, 238, 0.1);
  border: 1px solid rgba(67, 97, 238, 0.25);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 500;
}

.resume-section {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.resume-section:last-child {
  border-bottom: none;
}

.resume-section h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

.resume-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── Recommendation Cards ───────────────────────── */
.rec-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition);
}

.rec-card:hover {
  border-color: rgba(67, 97, 238, 0.3);
  background: rgba(67, 97, 238, 0.04);
}

.rec-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.rec-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rec-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── Grid Helpers ───────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ─── Skill rows in view_resume ──────────────────── */
.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 90px;
  padding-top: 6px;
}

.skill-row .skill-tags {
  margin-top: 0;
}

/* ─── Utility ─────────────────────────────────────── */
.mt-0 {
  margin-top: 0
}

.mt-1 {
  margin-top: 8px
}

.mt-2 {
  margin-top: 16px
}

.mt-3 {
  margin-top: 24px
}

.mt-4 {
  margin-top: 32px
}

.mb-1 {
  margin-bottom: 8px
}

.mb-2 {
  margin-bottom: 16px
}

.mb-3 {
  margin-bottom: 24px
}

.mb-4 {
  margin-bottom: 32px
}

.gap-2 {
  gap: 16px
}

.gap-3 {
  gap: 24px
}

.flex {
  display: flex
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.flex-center {
  display: flex;
  align-items: center
}

.text-muted {
  color: var(--text-muted)
}

.text-center {
  text-align: center
}

.fw-600 {
  font-weight: 600
}

.fw-700 {
  font-weight: 700
}

/* ─── Analyze Page Utilities ─────────────────────── */
.resume-pill {
  padding: 10px 14px;
  background: rgba(67, 97, 238, 0.07);
  border: 1.5px solid rgba(67, 97, 238, 0.2);
  border-radius: 8px;
  font-size: 0.87rem;
  color: var(--accent-blue);
  font-weight: 600;
}

.action-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.score-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.kw-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

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

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

/* Responsive Table Adjustments for Dark Mode */
html.dark .resume-table tr {
  background: var(--bg-secondary);
  border-color: var(--border);
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(67, 97, 238, 0.2);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.2);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .sidebar-toggle {
    display: flex;
  }

  .topbar {
    left: 0;
    width: 100%;
    padding: 0 12px;
  }

  .topbar-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-content {
    padding: 16px;
    padding-bottom: 100px;
    /* footer space */
  }

  .repeatable-card {
    padding: 20px 16px;
  }

  .form-section {
    padding: 24px 16px;
  }

  /* Fix for overlapping Career Copilot FAB */
  .page-content {
    padding-bottom: 110px !important;
  }

  /* Fix for overlapping Alerts in Auth Pages */
  .auth-page .alert {
    margin-top: 84px !important;
    position: relative;
    z-index: 50;
  }

  .pub-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .pub-photo,
  .pub-photo-placeholder {
    margin: 0 auto;
  }

  .pub-exp-card {
    padding: 16px 12px;
  }

  /* Responsive Table - Transform to Cards */
  .resume-table,
  .resume-table thead,
  .resume-table tbody,
  .resume-table th,
  .resume-table td,
  .resume-table tr {
    display: block;
  }

  .resume-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .resume-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .resume-table td {
    border: none;
    position: relative;
    padding-left: 50% !important;
    text-align: right;
    border-bottom: 1px solid var(--border);
    padding: 12px 8px !important;
  }

  .resume-table td:last-child {
    border-bottom: none;
  }

  .resume-table td:before {
    position: absolute;
    left: 8px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .resume-table td[data-label="Resume"] {
    padding-left: 8px !important;
    text-align: left;
  }

  .resume-table td[data-label="Resume"]:before {
    display: none;
  }

  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ─── Template Selection ─────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.template-card {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-card);
}

.template-card:hover {
  border-color: rgba(67, 97, 238, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.template-card.selected {
  border-color: var(--accent-blue);
  background: rgba(67, 97, 238, 0.05);
  box-shadow: 0 4px 16px rgba(67, 97, 238, 0.2);
}

.template-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.template-preview {
  width: 100%;
  height: 100px;
  background: var(--input-bg);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px;
  overflow: hidden;
}

/* Classic template preview */
.template-classic {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.template-classic .preview-header {
  width: 60%;
  height: 8px;
  background: #374151;
  border-radius: 2px;
  margin-bottom: 6px;
}

.template-classic .preview-line {
  height: 4px;
  background: #d1d5db;
  border-radius: 1px;
  margin-bottom: 4px;
}

.template-classic .preview-section {
  width: 100%;
  margin-top: 6px;
}

/* Modern template preview */
.template-modern {
  display: flex;
  gap: 6px;
}

.template-modern .preview-sidebar {
  width: 30%;
  background: #e5e7eb;
  border-radius: 3px;
}

.template-modern .preview-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-modern .preview-header {
  width: 70%;
  height: 6px;
  background: #374151;
  border-radius: 2px;
  margin-bottom: 4px;
}

.template-modern .preview-line {
  height: 3px;
  background: #d1d5db;
  border-radius: 1px;
  margin-bottom: 3px;
}

.template-modern .preview-section {
  margin-top: 4px;
}

/* Minimal template preview */
.template-minimal {
  display: flex;
  flex-direction: column;
  padding-left: 8px;
}

.template-minimal .preview-header-minimal {
  width: 40%;
  height: 7px;
  background: #374151;
  border-radius: 2px;
  margin-bottom: 4px;
}

.template-minimal .preview-line {
  height: 3px;
  background: #9ca3af;
  border-radius: 1px;
  margin-bottom: 3px;
}

.template-minimal .preview-section {
  margin-top: 6px;
}

/* Creative template preview */
.template-creative {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.template-creative .preview-header-creative {
  width: 80%;
  height: 10px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 2px;
  margin-bottom: 8px;
}

.template-creative .preview-line {
  height: 4px;
  background: #d1d5db;
  border-radius: 1px;
  margin-bottom: 4px;
}

.template-creative .preview-section {
  width: 100%;
  margin-top: 6px;
}

.template-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.template-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .template-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: 1fr;
  }
}

/* Password Toggle Styles */
.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-wrapper .form-control {
  padding-right: 48px;
}

.password-toggle-icon {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  user-select: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.password-toggle-icon:hover {
  color: var(--brand-primary);
  background: rgba(67, 97, 238, 0.08);
}