/* ============================================================
   AI Resume Maker — Main Stylesheet
   Premium SaaS Design | Glassmorphism | Dark Mode Ready
   ============================================================ */

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

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --primary:       #6366f1;
  --primary-light: #818cf8;
  --primary-dark:  #4f46e5;
  --secondary:     #ec4899;
  --accent:        #06b6d4;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --dark:          #0f0f23;
  --dark-2:        #1a1a2e;
  --dark-3:        #16213e;
  --surface:       rgba(255,255,255,0.08);
  --surface-hover: rgba(255,255,255,0.13);
  --border:        rgba(255,255,255,0.12);
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --radius:        16px;
  --radius-sm:     8px;
  --radius-lg:     24px;
  --shadow:        0 4px 32px rgba(99,102,241,0.15);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.4);
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font:          'Inter', sans-serif;
  --font-heading:  'Plus Jakarta Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Animated Gradient Background ─────────────────────── */
.gradient-bg {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #0d1b3a 50%, #1a0b2e 75%, #0f0f23 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── Glassmorphism Cards ───────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.glass:hover {
  background: rgba(255,255,255,0.09);
  box-shadow: 0 12px 40px rgba(99,102,241,0.2);
  transform: translateY(-2px);
}

.glass-dark {
  background: rgba(15,15,35,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #ec4899, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 30px rgba(99,102,241,0.5);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.6);
  color: white;
  filter: brightness(1.1);
}

.btn-outline-custom {
  background: transparent;
  color: var(--primary-light);
  border: 1.5px solid rgba(129,140,248,0.4);
  padding: 11px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.btn-outline-custom:hover {
  background: rgba(99,102,241,0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.2);
}

.btn-gradient {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 30px rgba(99,102,241,0.5);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-gradient:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(99,102,241,0.7);
  color: white;
}

/* ─── Navbar ────────────────────────────────────────────── */
.navbar-custom {
  background: rgba(15,15,35,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar-brand-custom {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #818cf8, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link-custom {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.nav-link-custom:hover {
  color: var(--text-primary) !important;
  background: rgba(255,255,255,0.06);
}

/* ─── Hero Section ──────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(99,102,241,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(236,72,153,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.8;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Hero floating cards */
.hero-mockup {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(-10px) rotate(-1deg); }
}

.floating-card {
  position: absolute;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 16px 20px;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.floating-card-1 { top: 10%; left: -15%; animation-delay: 0s; }
.floating-card-2 { bottom: 20%; right: -10%; animation-delay: 1s; }
.floating-card-3 { top: 50%; left: -20%; animation-delay: 2s; }

/* ─── Section Styles ────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

/* ─── Feature Cards ─────────────────────────────────────── */
.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99,102,241,0.15);
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(236,72,153,0.1));
  border: 1px solid rgba(99,102,241,0.2);
}

/* ─── Template Cards ────────────────────────────────────── */
.template-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.template-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 60px rgba(99,102,241,0.25);
  border-color: rgba(99,102,241,0.4);
}

.template-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e1e40, #2d2d5e);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.template-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.5));
}

.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(99,102,241,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: var(--transition);
}

.template-card:hover .template-overlay { opacity: 1; }

.badge-premium {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
}

.badge-ats {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ─── Pricing Cards ─────────────────────────────────────── */
.pricing-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  height: 100%;
}

.pricing-card.featured {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.4);
  transform: scale(1.04);
  box-shadow: 0 24px 80px rgba(99,102,241,0.3);
}

.pricing-card:hover:not(.featured) {
  transform: translateY(-6px);
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 16px 50px rgba(99,102,241,0.15);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 50px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #818cf8, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pricing-features li i { color: var(--success); font-size: 1rem; }

/* ─── Testimonials ──────────────────────────────────────── */
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  height: 100%;
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(99,102,241,0.25);
  transform: translateY(-4px);
}

.testimonial-stars { color: #f59e0b; font-size: 1rem; letter-spacing: 2px; }

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(99,102,241,0.4);
}

/* ─── FAQ ───────────────────────────────────────────────── */
.faq-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: rgba(99,102,241,0.25); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  background: rgba(255,255,255,0.03);
  transition: var(--transition);
}

.faq-question:hover { background: rgba(255,255,255,0.06); }

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-item.active .faq-answer { max-height: 400px; padding: 0 24px 20px; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--primary); }

.faq-icon { transition: transform 0.3s ease; color: var(--text-muted); font-size: 1.2rem; }

/* ─── Dashboard Sidebar ─────────────────────────────────── */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: rgba(10,10,25,0.95);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 24px 16px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #818cf8, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 8px 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
  text-decoration: none;
  display: block;
}

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

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

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(99,102,241,0.15);
  color: var(--text-primary);
}

.sidebar-link.active {
  color: var(--primary-light);
  background: rgba(99,102,241,0.18);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-link i { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  min-width: 22px;
  text-align: center;
}

/* ─── Main Content Area ─────────────────────────────────── */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--dark-2);
  padding: 0;
}

.page-header {
  background: rgba(10,10,25,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
}

.page-content { padding: 32px; }

/* ─── Stat Cards ────────────────────────────────────────── */
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(99,102,241,0.08);
  transform: translate(20px, -20px);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.25);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}

.stat-card-value { font-size: 2.2rem; font-weight: 800; margin-bottom: 6px; line-height: 1; }
.stat-card-label { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.stat-card-icon { font-size: 1.8rem; opacity: 0.4; position: absolute; top: 24px; right: 24px; }
.stat-card-change { font-size: 0.8rem; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }

/* ─── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-control-custom {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}

.form-control-custom:focus {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-control-custom::placeholder { color: var(--text-muted); }

.form-control-custom option { background: var(--dark-2); color: var(--text-primary); }

/* ─── Tables ────────────────────────────────────────────── */
.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-custom th {
  text-align: left;
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.table-custom td {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table-custom tr:hover td { background: rgba(255,255,255,0.03); }

/* ─── Badges ────────────────────────────────────────────── */
.badge-custom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-success { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25);  }
.badge-info    { background: rgba(6,182,212,0.15);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.25);  }
.badge-purple  { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }

/* ─── Alerts / Flash Messages ───────────────────────────── */
.alert-custom {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease;
  border: 1px solid;
}

.alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.25); color: #34d399; }
.alert-error, .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(6,182,212,0.1);  border-color: rgba(6,182,212,0.25);  color: #22d3ee; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.auth-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: fadeInUp 0.5s ease;
}

.auth-logo { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, #818cf8, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-align: center; display: block; margin-bottom: 8px; text-decoration: none; }
.auth-title { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 32px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--text-muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }

/* ─── Resume Builder ────────────────────────────────────── */
.builder-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
  background: var(--dark-2);
}

.builder-sidebar {
  background: rgba(10,10,25,0.95);
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  padding: 24px;
  height: 100vh;
  position: sticky;
  top: 0;
}

.builder-preview {
  background: #e8e8e8;
  padding: 24px;
  overflow-y: auto;
  height: 100vh;
}

.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: grab;
  transition: var(--transition);
}

.section-toggle:hover { background: rgba(255,255,255,0.07); border-color: rgba(99,102,241,0.2); }
.section-toggle.sortable-chosen { background: rgba(99,102,241,0.12); border-color: var(--primary); }

/* ─── AI Chat ───────────────────────────────────────────── */
.ai-chat {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ai-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }

.ai-message { max-width: 80%; animation: messageSlide 0.3s ease; display: flex; align-items: flex-start; gap: 10px; }
.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-message.assistant { align-self: flex-start; }

.ai-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: white; margin-top: 4px;
}

.ai-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.ai-message.user .ai-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-message.assistant .ai-bubble {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.ai-input-area {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
}

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

/* ─── Skeleton Loading ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-up { animation: fadeInUp 0.6s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.7); }

/* ─── Footer ────────────────────────────────────────────── */
.footer-main {
  background: rgba(5,5,15,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 60px 0 0;
}

.footer-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, #818cf8, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; margin-bottom: 16px; text-decoration: none; }
.footer-title { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 16px; }
.footer-link { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; padding: 5px 0; transition: var(--transition); }
.footer-link:hover { color: var(--primary-light); padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding: 20px 0; margin-top: 48px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-credit { font-size: 0.85rem; color: var(--text-muted); }
.footer-credit a { color: var(--primary-light); text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .builder-layout { grid-template-columns: 1fr; }
  .builder-preview { height: 60vh; }
  .builder-sidebar { height: auto; position: static; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 767px) {
  .auth-card { padding: 32px 24px; }
  .page-content { padding: 20px; }
  .hero-title { font-size: 2.2rem; }
  .hero-actions { gap: 12px; }
  .pricing-card.featured { transform: scale(1); }
  .floating-card { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ─── Admin specific ────────────────────────────────────── */
.admin-topbar {
  background: rgba(10,10,25,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.card-custom {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header-custom {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
}

.card-body-custom { padding: 24px; }

/* ─── Tooltips ──────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: rgba(15,15,35,0.95); color: var(--text-primary); font-size: 0.8rem; padding: 6px 12px; border-radius: 6px; white-space: nowrap; z-index: 100; border: 1px solid rgba(255,255,255,0.1); pointer-events: none; }

/* ─── Progress Bars ─────────────────────────────────────── */
.progress-custom {
  background: rgba(255,255,255,0.08);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.8s ease;
}

/* ─── Toggle Switch ─────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); transition: 0.3s; border-radius: 50px; }
.toggle-slider:before { position: absolute; content: ''; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; transition: 0.3s; border-radius: 50%; }
input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
input:checked + .toggle-slider:before { transform: translateX(22px); }

/* ─── Notification dot ──────────────────────────────────── */
.notif-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }

/* ─── Premium Micro-interactions & Polish ──────────────────
   Additive layer: page-load transition, button ripple, link
   underline sweep, staggered reveal, richer focus/hover states.
   Applies site-wide since app.css is shared by every layout.
   ──────────────────────────────────────────────────────────── */

/* Page load fade-in (body starts hidden, JS/CSS reveals it) */
body { animation: pageEnter 0.5s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ripple effect container for buttons (JS adds .ripple span on click) */
.btn-primary-custom, .btn-outline-custom, .sidebar-link, .nav-link-custom {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  background: rgba(255,255,255,0.45);
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(2.8); opacity: 0; }
}

/* Nav link underline sweep */
.nav-link-custom {
  position: relative;
}
.nav-link-custom::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border-radius: 2px;
}
.nav-link-custom:hover::after { transform: scaleX(1); }

/* Card lift + glow refinement (applies to any glass / card-custom / stat-card) */
.glass, .card-custom, .stat-card, .section-toggle {
  will-change: transform;
}
.card-custom:hover, .glass:hover {
  transform: translateY(-3px);
}

/* Buttons: subtle scale-down on active press for tactile feel */
.btn-primary-custom:active, .btn-outline-custom:active {
  transform: translateY(0) scale(0.97);
}

/* Staggered reveal utility — combine with .animate-on-scroll */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }
.stagger > *:nth-child(5) { animation-delay: 0.33s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }
.stagger > *:nth-child(n+7) { animation-delay: 0.46s; }

/* Table rows: gentle hover lift for a livelier feel */
.table-custom tbody tr {
  transition: background 0.25s ease, transform 0.25s ease;
}
.table-custom tbody tr:hover { transform: translateX(2px); }

/* Richer focus ring for accessibility + polish */
a:focus-visible, button:focus-visible, .form-control-custom:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* Loading spinner (used by JS while async actions run) */
.spinner-premium {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spinPremium 0.7s linear infinite;
}
@keyframes spinPremium { to { transform: rotate(360deg); } }

/* Smooth image reveal */
img { transition: filter 0.3s ease, opacity 0.3s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
