/* ============================================
   Admissions OS — Global Styles v2.0
   Enhanced UI/UX with animations, dark mode,
   glassmorphism, and micro-interactions
   ============================================ */

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --primary-bg: #EEF2FF;
  --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --secondary: #0F172A;
  --accent: #06B6D4;
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(79,70,229,0.15);
  --transition: 0.2s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
}

/* Dark Mode */
[data-theme="dark"] {
  --primary-bg: rgba(79,70,229,0.15);
  --gray-50: #0B1120;
  --gray-100: #131B2E;
  --gray-200: #1E293B;
  --gray-300: #334155;
  --gray-400: #64748B;
  --gray-500: #94A3B8;
  --gray-600: #CBD5E1;
  --gray-700: #E2E8F0;
  --gray-800: #F1F5F9;
  --gray-900: #F8FAFC;
  --white: #0F172A;
  --glass-bg: rgba(15,23,42,0.8);
  --glass-border: rgba(255,255,255,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(79,70,229,0.3);
  --success-light: rgba(16,185,129,0.15);
  --warning-light: rgba(245,158,11,0.15);
  --danger-light: rgba(239,68,68,0.15);
}

[data-theme="dark"] .auth-screen {
  background: linear-gradient(135deg, #0B0D1A 0%, #131347 50%, #1E1B5E 100%);
}

[data-theme="dark"] .auth-card {
  background: #131B2E;
  border: 1px solid rgba(255,255,255,0.08);
}

[data-theme="dark"] .auth-tab {
  color: var(--gray-500);
}

[data-theme="dark"] .auth-tab.active {
  background: var(--gray-200);
  color: var(--gray-800);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

[data-theme="dark"] .btn-google {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

[data-theme="dark"] .sidebar {
  background: #0B1120;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .module-icon.blue { background: rgba(59,130,246,0.15); }
[data-theme="dark"] .module-icon.purple { background: rgba(139,92,246,0.15); }
[data-theme="dark"] .module-icon.green { background: rgba(16,185,129,0.15); }
[data-theme="dark"] .module-icon.orange { background: rgba(249,115,22,0.15); }
[data-theme="dark"] .module-icon.pink { background: rgba(236,72,153,0.15); }
[data-theme="dark"] .module-icon.cyan { background: rgba(6,182,212,0.15); }
[data-theme="dark"] .module-icon.yellow { background: rgba(234,179,8,0.15); }
[data-theme="dark"] .module-icon.red { background: rgba(239,68,68,0.15); }

* { margin: 0; padding: 0; box-sizing: border-box; }

.hidden { display: none !important; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   Page Transitions
   ============================================ */

#page-content {
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeSlideIn 0.35s ease-out;
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
}

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

@keyframes celebrateBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.95); }
}

@keyframes confettiDrop {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60px) rotate(720deg); opacity: 0; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

/* Staggered card animations */
.modules-grid > * { animation: fadeSlideIn 0.4s ease-out backwards; }
.modules-grid > *:nth-child(1) { animation-delay: 0.05s; }
.modules-grid > *:nth-child(2) { animation-delay: 0.1s; }
.modules-grid > *:nth-child(3) { animation-delay: 0.15s; }
.modules-grid > *:nth-child(4) { animation-delay: 0.2s; }
.modules-grid > *:nth-child(5) { animation-delay: 0.25s; }
.modules-grid > *:nth-child(6) { animation-delay: 0.3s; }
.modules-grid > *:nth-child(7) { animation-delay: 0.35s; }
.modules-grid > *:nth-child(8) { animation-delay: 0.4s; }

.stats-grid > * { animation: scaleIn 0.35s ease-out backwards; }
.stats-grid > *:nth-child(1) { animation-delay: 0.05s; }
.stats-grid > *:nth-child(2) { animation-delay: 0.1s; }
.stats-grid > *:nth-child(3) { animation-delay: 0.15s; }
.stats-grid > *:nth-child(4) { animation-delay: 0.2s; }

/* ============================================
   Auth Screen
   ============================================ */

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  animation: scaleIn 0.5s ease-out;
}

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

.logo-icon {
  width: 56px;
  height: 56px;
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(79,70,229,0.3);
}

.logo-icon.small {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.auth-logo h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-logo p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--white);
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ============================================
   Form Controls
   ============================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: all 0.25s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(79,70,229,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover { background: var(--gray-200); transform: translateY(-1px); }

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.btn-success:hover { box-shadow: 0 4px 16px rgba(16,185,129,0.4); transform: translateY(-1px); }

.btn-danger { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover { background: var(--primary-bg); }

.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

.btn-google {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}

.btn-google:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   App Layout
   ============================================ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .user-details { display: none; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
  min-height: var(--header-height);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

.sidebar-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover { color: var(--gray-600); background: var(--gray-100); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 12px 6px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover { background: var(--gray-100); color: var(--gray-800); }

.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}

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

.nav-item.active svg { stroke: var(--primary); }

.nav-item svg {
  flex-shrink: 0;
  stroke: var(--gray-400);
  transition: var(--transition);
}

.nav-item:hover svg { stroke: var(--gray-600); }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

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

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tier {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-logout:hover { color: var(--danger); background: var(--danger-light); }

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover { background: var(--gray-100); color: var(--gray-700); }

/* ============================================
   Main Content
   ============================================ */

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: var(--gray-50);
  transition: background 0.3s ease;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
  margin-bottom: 28px;
  animation: fadeSlideIn 0.3s ease-out;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 14px;
  color: var(--gray-500);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ============================================
   Cards — Enhanced with Glass Effect
   ============================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px;
  transition: all 0.3s ease;
}

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

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.card-gradient {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
}

.card-gradient .card-title,
.card-gradient p,
.card-gradient .stat-label { color: rgba(255,255,255,0.85); }
.card-gradient .stat-value { color: #fff; }

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ============================================
   Dashboard Grid — Enhanced
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.stat-value.animated {
  animation: countUp 0.6s ease-out;
}

.stat-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.module-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.module-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

.module-card:hover::after { opacity: 0.03; }
.module-card:active { transform: translateY(-1px); }

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

.module-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.module-card:hover .module-icon { transform: scale(1.1); }

.module-icon.blue { background: #EFF6FF; color: #3B82F6; }
.module-icon.purple { background: #F5F3FF; color: #8B5CF6; }
.module-icon.green { background: #ECFDF5; color: #10B981; }
.module-icon.orange { background: #FFF7ED; color: #F97316; }
.module-icon.pink { background: #FDF2F8; color: #EC4899; }
.module-icon.cyan { background: #ECFEFF; color: #06B6D4; }
.module-icon.yellow { background: #FEFCE8; color: #EAB308; }
.module-icon.red { background: #FEF2F2; color: #EF4444; }

.module-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.module-card p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 16px;
}

.module-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

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

.progress-fill.blue { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.progress-fill.purple { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.progress-fill.green { background: linear-gradient(90deg, #10B981, #34D399); }
.progress-fill.orange { background: linear-gradient(90deg, #F97316, #FB923C); }
.progress-fill.pink { background: linear-gradient(90deg, #EC4899, #F472B6); }
.progress-fill.cyan { background: linear-gradient(90deg, #06B6D4, #22D3EE); }
.progress-fill.yellow { background: linear-gradient(90deg, #EAB308, #FACC15); }
.progress-fill.red { background: linear-gradient(90deg, #EF4444, #F87171); }

.progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 32px;
  text-align: right;
}

.module-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
}

.module-status.not-started { background: var(--gray-100); color: var(--gray-500); }
.module-status.in-progress { background: #DBEAFE; color: #2563EB; }
.module-status.complete { background: #D1FAE5; color: #059669; }
.module-status.locked { background: var(--gray-100); color: var(--gray-400); }

/* ============================================
   Next Best Action Card
   ============================================ */

.next-action-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  animation: scaleIn 0.4s ease-out 0.2s backwards;
  position: relative;
  overflow: hidden;
  border: none;
}

.next-action-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.next-action-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: 10%;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.next-action-icon {
  font-size: 36px;
  flex-shrink: 0;
  z-index: 1;
}

.next-action-content {
  flex: 1;
  z-index: 1;
}

.next-action-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.next-action-content p {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
}

.next-action-card .btn {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  z-index: 1;
  flex-shrink: 0;
}

.next-action-card .btn:hover {
  background: rgba(255,255,255,0.35);
}

/* ============================================
   Score Display — Enhanced
   ============================================ */

.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-ring svg {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: var(--gray-100);
  stroke-width: 8;
}

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

.score-ring-fill.high { stroke: var(--success); }
.score-ring-fill.medium { stroke: var(--warning); }
.score-ring-fill.low { stroke: var(--danger); }

.score-ring-value {
  font-size: 28px;
  font-weight: 700;
  z-index: 1;
}

.score-ring-value.high { color: var(--success); }
.score-ring-value.medium { color: var(--warning); }
.score-ring-value.low { color: var(--danger); }

.score-ring-label {
  position: absolute;
  bottom: 20px;
  font-size: 11px;
  color: var(--gray-400);
}

/* Legacy score circle (still supported) */
.score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 4px solid;
  transition: all 0.5s ease;
}

.score-circle.high { border-color: var(--success); color: var(--success); }
.score-circle.medium { border-color: var(--warning); color: var(--warning); }
.score-circle.low { border-color: var(--danger); color: var(--danger); }

.score-circle.celebrate {
  animation: celebrateBounce 0.6s ease;
}

.score-circle small {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
}

.score-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.score-delta.up { background: var(--success-light); color: #059669; }
.score-delta.down { background: var(--danger-light); color: #DC2626; }

/* ============================================
   AI Thinking Animation
   ============================================ */

.ai-thinking {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--primary-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79,70,229,0.15);
  animation: pulseGlow 2s ease-in-out infinite;
}

.ai-thinking-dots {
  display: flex;
  gap: 4px;
}

.ai-thinking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: aiDotBounce 1.4s ease-in-out infinite;
}

.ai-thinking-dot:nth-child(2) { animation-delay: 0.16s; }
.ai-thinking-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes aiDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-thinking-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.ai-thinking-steps {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-500);
  transition: all 0.3s ease;
}

.ai-step.active { color: var(--primary); font-weight: 500; }
.ai-step.complete { color: var(--success); }

.ai-step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: var(--gray-100);
  color: var(--gray-400);
  flex-shrink: 0;
}

.ai-step.active .ai-step-icon { background: var(--primary-bg); color: var(--primary); }
.ai-step.complete .ai-step-icon { background: var(--success-light); color: var(--success); }

/* Shimmer loading */
.shimmer {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ============================================
   Confetti
   ============================================ */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiDrop 2s ease-in forwards;
}

/* ============================================
   Consultation Form
   ============================================ */

.form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 28px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.form-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.form-section-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

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

.form-row.single { grid-template-columns: 1fr; }
.form-row.triple { grid-template-columns: 1fr 1fr 1fr; }

.form-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  margin-bottom: 20px;
}

.form-progress-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  white-space: nowrap;
}

.form-progress .progress-bar { flex: 1; height: 8px; }

.form-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--gray-100);
  color: var(--gray-500);
  border: none;
}

.form-step:hover { background: var(--gray-200); }

.form-step.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.form-step.completed { background: var(--success-light); color: #059669; }

.form-step-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
}

.form-step.active .form-step-number { background: rgba(255,255,255,0.3); }
.form-step.completed .form-step-number { background: rgba(5,150,105,0.15); }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
  margin-top: 24px;
}

/* ============================================
   School Tags
   ============================================ */

.school-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.school-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gray-100);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
}

.school-tag:hover { border-color: var(--primary-light); transform: translateY(-1px); }

.school-tag.selected {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79,70,229,0.15);
}

.school-tag .remove {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  border-radius: 50%;
  color: var(--gray-400);
}

.school-tag.selected .remove { color: var(--primary); }

/* School-specific colors */
.school-color-hbs { --school-color: #A51C30; }
.school-color-stanford { --school-color: #8C1515; }
.school-color-wharton { --school-color: #011F5B; }
.school-color-columbia { --school-color: #003DA5; }
.school-color-lbs { --school-color: #002060; }
.school-color-insead { --school-color: #004E42; }
.school-color-hec { --school-color: #0B2239; }
.school-color-ie { --school-color: #004B87; }
.school-color-booth { --school-color: #800000; }
.school-color-kellogg { --school-color: #4E2A84; }

/* ============================================
   Tables
   ============================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
}

.data-table tr:hover td { background: var(--gray-50); }

/* ============================================
   Badges & Tags
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-light); color: #059669; }
.badge-warning { background: var(--warning-light); color: #D97706; }
.badge-danger { background: var(--danger-light); color: #DC2626; }
.badge-info { background: #CFFAFE; color: #0891B2; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* ============================================
   Heatmap
   ============================================ */

.heatmap-grid {
  display: grid;
  gap: 2px;
}

.heatmap-cell {
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.heatmap-cell:hover { transform: scale(1.05); }

.heatmap-cell.strong { background: var(--success-light); color: #065F46; }
.heatmap-cell.good { background: var(--warning-light); color: #92400E; }
.heatmap-cell.weak { background: var(--danger-light); color: #991B1B; }
.heatmap-cell.header { background: var(--gray-100); color: var(--gray-600); font-weight: 600; }

/* ============================================
   Toast Notifications — Enhanced
   ============================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--gray-800);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  max-width: 380px;
  backdrop-filter: blur(10px);
}

.toast.success {
  background: linear-gradient(135deg, #065F46, #047857);
}

.toast.error {
  background: linear-gradient(135deg, #991B1B, #B91C1C);
}

.toast.warning {
  background: linear-gradient(135deg, #92400E, #B45309);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 0.5s ease;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--gray-100);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--gray-400);
}

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

.empty-state p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Tier Badge
   ============================================ */

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tier-badge.free { background: var(--gray-100); color: var(--gray-500); }
.tier-badge.core { background: #DBEAFE; color: #2563EB; }
.tier-badge.full { background: #F5F3FF; color: #7C3AED; }
.tier-badge.consulting { background: #FFF7ED; color: #EA580C; }

/* ============================================
   Modal / Overlay — Enhanced
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease-out;
}

.modal h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

/* ============================================
   Tabs
   ============================================ */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn:hover { color: var(--gray-700); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============================================
   Sparkline
   ============================================ */

.sparkline {
  display: inline-block;
  vertical-align: middle;
}

.sparkline svg {
  overflow: visible;
}

/* ============================================
   Readiness Level
   ============================================ */

.readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.readiness-badge.platinum { background: linear-gradient(135deg, #E5E7EB, #F3F4F6); color: #374151; border: 1px solid #D1D5DB; }
.readiness-badge.gold { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; border: 1px solid #FCD34D; }
.readiness-badge.silver { background: linear-gradient(135deg, #F1F5F9, #E2E8F0); color: #475569; border: 1px solid #CBD5E1; }
.readiness-badge.bronze { background: linear-gradient(135deg, #FED7AA, #FDBA74); color: #9A3412; border: 1px solid #FB923C; }

/* ============================================
   Feedback Cards (inline highlights)
   ============================================ */

.feedback-card {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  animation: slideInRight 0.3s ease-out backwards;
}

.feedback-card.improve {
  background: var(--danger-light);
  border-left: 3px solid var(--danger);
  color: #991B1B;
}

.feedback-card.moderate {
  background: var(--warning-light);
  border-left: 3px solid var(--warning);
  color: #92400E;
}

.feedback-card.good {
  background: var(--success-light);
  border-left: 3px solid var(--success);
  color: #065F46;
}

.feedback-icon { font-size: 16px; flex-shrink: 0; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 200;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
  }
  .sidebar.open { left: 0; }
  #page-content { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.triple { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .next-action-card { flex-direction: column; text-align: center; }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
