/* ============================================
   Design System - Indigo/Purple with modern SaaS feel
   ============================================ */

:root {
  /* Primary palette - Indigo */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Accent (cyan/electric) */
  --accent-300: #67e8f9;
  --accent-400: #22d3ee;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;

  /* Secondary accent (violet) */
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  /* Semantic colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #2563eb;
  --info-light: #dbeafe;

  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #a1b1c7;
  --gray-500: #7a8ba0;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* New design colors */
  --sidebar-bg: #0f1729;
  --content-bg: #f5f7fa;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  /* Gradients */
  --gradient-hero: linear-gradient(145deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  --gradient-glow: linear-gradient(135deg, var(--primary-500), var(--violet-500), var(--accent-400));
  --gradient-text: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #22d3ee 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
  --shadow-glow-sm: 0 0 20px rgba(99, 102, 241, 0.2);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --nav-height: 72px;
  --sidebar-width: 240px;
  --topbar-height: 64px;
  --container-max: 1200px;
  --section-padding: 6rem;
}

/* ============================================
   Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Sidebar Navigation (App Pages)
   ============================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 1000;
}

/* --- Sidebar Logo --- */
.sidebar-logo {
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: rgba(99,102,241,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
}

.sidebar-logo-text {
  font-family: 'Space Grotesk', var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* --- Nav Sections --- */
.sidebar-nav-sections {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 4px 0;
}

/* --- Top-level Nav Items (Home, JAM) --- */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-item.active {
  color: #fff;
  background: rgba(99,102,241,0.15);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: #6366f1;
  border-radius: 0 3px 3px 0;
}

.nav-item .icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

/* JAM special styling */
.nav-item-jam {
  margin: 4px 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,0.2);
}

.nav-item-jam:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.25));
}

.nav-item-jam.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.3));
}

.nav-item-jam.active::before {
  display: none;
}

.nav-badge-soon {
  background: #6366f1;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* --- Nav Group Headers --- */
.nav-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  user-select: none;
}

.nav-group-header:hover {
  color: rgba(255,255,255,0.7);
}

.nav-group-header .chevron {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
  display: inline-block;
}

.nav-group-header.expanded .chevron {
  transform: rotate(90deg);
}

/* --- Nav Sub Items --- */
.nav-sub-items {
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 0;
}

.nav-sub-items.expanded {
  max-height: 200px;
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 48px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
}

.nav-sub-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.03);
}

.nav-sub-item.active {
  color: #c4b5fd;
}

.nav-sub-item.active::before {
  content: '';
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #6366f1;
  border-radius: 50%;
}

/* --- Sub-item Badges --- */
.sub-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: auto;
  font-weight: 600;
}

.sub-badge.soon {
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
}

.sub-badge.new {
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
}

.sub-badge.beta {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
}

/* --- Sidebar Bottom (User Info & Settings) --- */
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-meta {
  flex: 1;
  min-width: 0;
}

.sidebar-user-email {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
}

.sidebar-user-toggle:hover {
  color: rgba(255,255,255,0.7);
}

.sidebar-profile-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.sidebar-user-toggle.open .sidebar-profile-chevron,
.sidebar-profile-toggle.open .sidebar-profile-chevron {
  transform: rotate(180deg);
}

/* Keep existing profile menu/action styles */
.sidebar-profile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  margin-top: 4px;
}

.sidebar-profile-menu.open {
  max-height: 150px;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.sidebar-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255,255,255,0.8);
}

.sidebar-action-danger {
  color: #fb7185;
}

.sidebar-action-danger:hover {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
}

/* --- Profile Info Link (legacy, hidden in new design) --- */
.sidebar-profile-info-link {
  display: none !important;
}

/* ============================================
   Topbar
   ============================================ */

.topbar {
  height: var(--topbar-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.topbar-left h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.topbar-left p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 52px;
}

.topbar-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: #374151;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.topbar-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.topbar-btn.primary {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.topbar-btn.primary:hover {
  background: #4f46e5;
}

/* ============================================
   Content Area
   ============================================ */

.content-area {
  flex: 1;
  overflow-y: auto;
  background: var(--content-bg);
}

/* Mobile topbar (hidden on desktop) */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  height: var(--nav-height);
  padding: 0 1rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-brand {
  font-family: 'Space Grotesk', var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  letter-spacing: -0.02em;
}

.sidebar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.sidebar-toggle .hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-300);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

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

/* ============================================
   Redesign Cards & Components
   ============================================ */

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card-new {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--card-border);
}

.stat-card-new .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-new .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.stat-card-new .stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-card-new .stat-sub span {
  color: var(--success);
  font-weight: 500;
}

.stat-card-new .stat-sub span.warn {
  color: var(--warning);
}

/* Cards (new design) */
.card-new {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.card-new-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-new-header h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.card-new-body {
  padding: 20px;
}

/* Section grids */
.section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.section-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Workflow cards */
.workflow-card-new {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.workflow-card-new:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}

.workflow-card-new .wf-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.workflow-card-new .wf-icon.purple { background: rgba(99,102,241,0.1); }
.workflow-card-new .wf-icon.green { background: rgba(16,185,129,0.1); }
.workflow-card-new .wf-icon.blue { background: rgba(59,130,246,0.1); }
.workflow-card-new .wf-icon.amber { background: rgba(245,158,11,0.1); }

.workflow-card-new h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.workflow-card-new p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Activity list */
.activity-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-info { flex: 1; min-width: 0; }

.activity-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.activity-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.activity-badge.applied { background: var(--info-light); color: var(--info); }
.activity-badge.interview { background: var(--success-light); color: #059669; }
.activity-badge.rejected { background: var(--danger-light); color: #dc2626; }

.match-score {
  width: 36px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.match-score.high { background: var(--success); }
.match-score.mid { background: var(--warning); }
.match-score.low { background: var(--danger); }

/* Tab bar (for section sub-tabs) */
.tab-bar {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
  width: fit-content;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Coming Soon placeholder */
.coming-soon-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.coming-soon-placeholder .cs-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(99,102,241,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.coming-soon-placeholder h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.coming-soon-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
}

/* ===== Job Insights Hub ===== */

/* Search section - AI style */
.insights-search-section {
  background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(6,182,212,0.03) 100%);
  border-radius: 20px;
  padding: 32px 28px 28px;
  border: 1px solid rgba(99,102,241,0.12);
  margin-bottom: 24px;
  position: relative;
}

.ai-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-500, #6366f1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 4px 10px;
  background: rgba(99,102,241,0.08);
  border-radius: 20px;
}

/* AI chat intro message */
.ai-chat-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.ai-chat-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-500, #6366f1), var(--accent-500, #06b6d4));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ai-chat-bubble {
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.08);
  border-radius: 0 14px 14px 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 600px;
}

.ai-intro-cursor {
  color: var(--primary-400, #818cf8);
  font-weight: 300;
  animation: ai-cursor-blink 0.8s ease-in-out infinite;
}

.insights-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-bottom: 10px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.1);
  border-radius: 999px;
}

.insights-mode-toggle .imt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1;
}

.insights-mode-toggle .imt-tab:hover {
  color: var(--text-primary, #0f172a);
}

.insights-mode-toggle .imt-tab.active {
  background: var(--card-bg, #fff);
  color: var(--primary-500, #6366f1);
  box-shadow: 0 1px 3px rgba(15,23,42,0.08);
}

.insights-mode-toggle .imt-tab svg {
  flex-shrink: 0;
}

.ai-search-static-placeholder {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #94a3b8);
  pointer-events: none;
  font-size: 15px;
}

.ai-search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card-bg, #fff);
  border-radius: 14px;
  border: 2px solid transparent;
  box-shadow: 0 2px 12px rgba(99,102,241,0.06), 0 0 0 1px rgba(99,102,241,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.ai-search-bar:focus-within {
  border-color: var(--primary-400, #818cf8);
  box-shadow: 0 2px 20px rgba(99,102,241,0.12), 0 0 0 1px var(--primary-400, #818cf8);
}

.ai-search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.ai-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.ai-search-placeholder {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--gray-400, #9ca3af);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  overflow: hidden;
}

.ai-search-placeholder::after {
  content: '|';
  animation: ai-cursor-blink 0.8s ease-in-out infinite;
  margin-left: 1px;
  color: var(--primary-400, #818cf8);
  font-weight: 300;
}

@keyframes ai-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.ai-search-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-500, #6366f1);
  color: #fff;
  border: none;
  border-radius: 10px;
  margin: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.ai-search-btn:hover {
  background: var(--primary-600, #4f46e5);
  transform: scale(1.02);
}

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

.ai-search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Clear button inside chat bubble */
.ai-clear-btn {
  background: none;
  border: none;
  color: var(--primary-500, #6366f1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  padding: 0;
}
.ai-clear-btn:hover { text-decoration: underline; }

/* Search results - bubble continuation */
.sr-bubble-container {
  margin-left: 44px;
  max-width: 780px;
  background: rgba(99,102,241,0.03);
  border: 1px solid rgba(99,102,241,0.08);
  border-radius: 0 0 14px 14px;
  border-top: none;
  margin-top: -8px;
  overflow: hidden;
}

.sr-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(99,102,241,0.06);
  animation: sr-fade-in 0.25s ease-out both;
  transition: background 0.12s;
}

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

.sr-row:hover {
  background: rgba(99,102,241,0.04);
}

@keyframes sr-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sr-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sr-row-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-company {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-right: 6px;
}

.sr-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sr-row-tags {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-dot { margin: 0 3px; opacity: 0.4; }

.sr-tag-remote {
  color: #059669;
  font-weight: 600;
}

.sr-tag-salary {
  font-weight: 600;
  color: #10b981;
}

.sr-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sr-enhance-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: var(--primary-500, #6366f1);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}

.sr-enhance-btn:hover { background: var(--primary-600, #4f46e5); }

.sr-apply-icon {
  color: var(--text-secondary);
  opacity: 0.5;
  transition: opacity 0.12s, color 0.12s;
  display: flex;
}

.sr-apply-icon:hover {
  opacity: 1;
  color: var(--primary-500, #6366f1);
}

@media (max-width: 640px) {
  .sr-bubble-container { margin-left: 0; }
  .sr-row-info { white-space: normal; }
  .sr-row-top { flex-wrap: wrap; }
}

/* Night mode - search results */
.app-layout[data-theme="night"] .sr-bubble-container {
  background: rgba(99,102,241,0.05);
  border-color: rgba(99,102,241,0.1);
}

.app-layout[data-theme="night"] .sr-row {
  border-bottom-color: rgba(99,102,241,0.08);
}

.app-layout[data-theme="night"] .sr-row:hover {
  background: rgba(99,102,241,0.07);
}

.app-layout[data-theme="night"] .sr-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .sr-tag-remote {
  color: #6ee7b7;
}

/* Search results + promo layout */
.search-results-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.search-results-main {
  flex: 1;
  min-width: 0;
}

/* Promo sidebar */
.search-promo-sidebar {
  width: 260px;
  min-width: 260px;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(139,92,246,0.04) 100%);
  border: 1px solid rgba(99,102,241,0.1);
  border-radius: 14px;
  position: sticky;
  top: 80px;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--violet-500, #8b5cf6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.promo-typewriter {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px 0;
  min-height: 60px;
}

.promo-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(99,102,241,0.08);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.promo-card:hover {
  background: rgba(99,102,241,0.04);
  border-color: rgba(99,102,241,0.15);
}

.promo-card.disabled {
  opacity: 0.6;
  cursor: default;
}

.promo-card.disabled:hover {
  background: transparent;
  border-color: rgba(99,102,241,0.08);
}

.promo-card-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.promo-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .search-results-layout { flex-direction: column; }
  .search-promo-sidebar { width: 100%; min-width: 0; position: static; }
}

/* ── Job Scout scanning animation ── */
.jb-scanning-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.jb-scan-visual {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 16px;
  background: rgba(16,185,129,0.06);
  overflow: hidden;
}

.jb-scan-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  animation: jb-scan-sweep 2s ease-in-out infinite;
}

@keyframes jb-scan-sweep {
  0% { top: 0; opacity: 0.8; }
  50% { top: 100%; opacity: 0.4; }
  100% { top: 0; opacity: 0.8; }
}

.jb-scanning-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #10b981;
  margin-bottom: 8px;
}

.jb-scan-note {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 340px;
}

/* ── Job Scout results ── */
.jb-chat-bubble {
  background: rgba(16,185,129,0.04);
  border-color: rgba(16,185,129,0.1);
}

.jb-results-container {
  margin-left: 44px;
  background: rgba(16,185,129,0.02);
  border: 1px solid rgba(16,185,129,0.08);
  border-radius: 0 0 14px 14px;
  border-top: none;
  margin-top: -8px;
  overflow: hidden;
}

.jb-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(16,185,129,0.06);
  animation: sr-fade-in 0.25s ease-out both;
  transition: background 0.12s;
}

.jb-row:last-child { border-bottom: none; }
.jb-row:hover { background: rgba(16,185,129,0.04); }

.jb-reason {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Night mode - promo + job scout */
.app-layout[data-theme="night"] .search-promo-sidebar {
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.06) 100%);
  border-color: rgba(99,102,241,0.12);
}

.app-layout[data-theme="night"] .promo-card {
  border-color: rgba(99,102,241,0.1);
}

.app-layout[data-theme="night"] .promo-card:hover {
  background: rgba(99,102,241,0.06);
}

.app-layout[data-theme="night"] .promo-card-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .jb-chat-bubble {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.12);
}

.app-layout[data-theme="night"] .jb-results-container {
  background: rgba(16,185,129,0.03);
  border-color: rgba(16,185,129,0.1);
}

.app-layout[data-theme="night"] .jb-row {
  border-bottom-color: rgba(16,185,129,0.08);
}

.app-layout[data-theme="night"] .jb-row:hover {
  background: rgba(16,185,129,0.06);
}

.insights-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

.insights-search-empty {
  text-align: center;
  padding: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Module section */
.insights-modules-section { margin-top: 32px; }

/* Agents section header */
.agents-section-header {
  margin-bottom: 16px;
}

.agents-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-500, #6366f1);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding: 3px 8px;
  background: rgba(99,102,241,0.06);
  border-radius: 6px;
}

.agents-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.agents-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Card action buttons row */
.ic-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ===== Enhance Modal ===== */

.enhance-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.enhance-modal {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

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

.em-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.em-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.em-close:hover { color: var(--text-primary); }

.em-job-info {
  margin-bottom: 16px;
}

.em-job-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-500, #6366f1);
}

.em-job-company {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.em-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.em-toggle-row {
  margin-bottom: 20px;
}

.em-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.em-toggle input { cursor: pointer; }

.em-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.em-actions .btn { flex: 1; min-width: 140px; justify-content: center; }

.em-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  text-align: center;
}

.em-loading-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

.em-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.em-score-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.em-score-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.em-saved-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(16,185,129,0.06);
  border-radius: 8px;
}

.em-details {
  margin-bottom: 12px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
}

.em-details summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  background: rgba(99,102,241,0.03);
}

.em-details summary:hover { background: rgba(99,102,241,0.06); }

.em-resume-preview, .em-cover-letter-preview {
  padding: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.em-secondary-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Night mode - hub additions */
.app-layout[data-theme="night"] .insights-search-section {
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(6,182,212,0.04) 100%);
  border-color: rgba(99,102,241,0.15);
}

.app-layout[data-theme="night"] .ai-search-badge {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
}

.app-layout[data-theme="night"] .ai-search-bar {
  background: #1a1d2e;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2), 0 0 0 1px rgba(99,102,241,0.12);
}

.app-layout[data-theme="night"] .ai-search-bar:focus-within {
  box-shadow: 0 2px 20px rgba(99,102,241,0.2), 0 0 0 1px var(--primary-400, #818cf8);
}

.app-layout[data-theme="night"] .ai-search-input {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .ai-search-placeholder,
.app-layout[data-theme="night"] .ai-search-static-placeholder {
  color: #4b5068;
}

.app-layout[data-theme="night"] .insights-mode-toggle {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.18);
}

.app-layout[data-theme="night"] .insights-mode-toggle .imt-tab {
  color: #7a8196;
}

.app-layout[data-theme="night"] .insights-mode-toggle .imt-tab:hover {
  color: #c8cce0;
}

.app-layout[data-theme="night"] .insights-mode-toggle .imt-tab.active {
  background: #1a1d2e;
  color: #a5b4fc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.app-layout[data-theme="night"] .ai-chat-bubble {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.12);
  color: #c8cce0;
}

.app-layout[data-theme="night"] .enhance-modal {
  background: #1e2130;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.app-layout[data-theme="night"] .em-header h3,
.app-layout[data-theme="night"] .em-score-label {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .em-details {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .em-details summary {
  background: rgba(99,102,241,0.06);
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .em-saved-note {
  background: rgba(16,185,129,0.08);
}

/* ===== Job Insights ===== */

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

.insights-module-card {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--gray-200, #e5e7eb);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.insights-module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, transparent);
  transition: background 0.25s;
}

.insights-module-card:hover {
  box-shadow: 0 6px 24px rgba(99,102,241,0.1);
  border-color: var(--primary-300, #a5b4fc);
  transform: translateY(-2px);
}

.insights-module-card.active::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.insights-module-card.disabled {
  opacity: 0.6;
  cursor: default;
}

.insights-module-card.disabled::before {
  background: linear-gradient(90deg, var(--gray-300), var(--gray-400));
}

.insights-module-card.disabled:hover {
  box-shadow: none;
  border-color: var(--gray-200, #e5e7eb);
  transform: none;
}

.insights-module-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: rgba(99,102,241,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500, #6366f1);
}

.insights-module-body {
  flex: 1;
  min-width: 0;
}

.insights-module-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.insights-module-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.insights-module-badge.soon {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245,158,11,0.1);
  color: #d97706;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.insights-module-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Night mode for module cards */
.app-layout[data-theme="night"] .insights-module-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .insights-module-card:hover {
  border-color: var(--primary-500, #6366f1);
}

.app-layout[data-theme="night"] .insights-module-card.disabled:hover {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .insights-module-header h4,
.app-layout[data-theme="night"] .agents-section-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .agents-section-badge {
  background: rgba(99,102,241,0.1);
  color: #a5b4fc;
}

.app-layout[data-theme="night"] .insights-module-icon {
  background: rgba(99,102,241,0.15);
}

.app-layout[data-theme="night"] .insights-module-badge.soon {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
}

.insights-module-badge.active {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(16,185,129,0.1);
  color: #059669;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.insights-module-card.active {
  cursor: pointer;
}

.insights-module-card.active:hover {
  box-shadow: 0 4px 16px rgba(16,185,129,0.1);
  border-color: #6ee7b7;
}

/* Job Bank score badge */
.jb-score {
  min-width: 40px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Job Bank meta row */
.jb-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  align-items: center;
}

.jb-salary {
  font-weight: 600;
  color: #10b981;
}

/* Night mode additions */
.app-layout[data-theme="night"] .insights-module-badge.active {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
}

.app-layout[data-theme="night"] .insights-module-card.active:hover {
  border-color: #10b981;
}

/* Locked state */
.insights-locked-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  background: var(--card-bg, #fff);
  border-radius: 16px;
  border: 2px dashed var(--gray-300, #d1d5db);
}

.insights-locked-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(99,102,241,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-500, #6366f1);
}

.insights-locked-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.insights-locked-card p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.insights-locked-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Empty state */
.insights-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.insights-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(99,102,241,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-500, #6366f1);
}

.insights-empty-icon.error {
  background: rgba(239,68,68,0.1);
  color: var(--danger, #ef4444);
}

.insights-empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.insights-empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Generating state */
.insights-generating-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.insights-generating-animation {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.insights-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary-500, #6366f1);
  opacity: 0;
  animation: insights-pulse 2.4s ease-out infinite;
}

.insights-pulse-ring.delay-1 { animation-delay: 0.8s; }
.insights-pulse-ring.delay-2 { animation-delay: 1.6s; }

@keyframes insights-pulse {
  0% { transform: scale(0.5); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.insights-generating-icon {
  color: var(--primary-500, #6366f1);
  animation: insights-spin 3s linear infinite;
}

@keyframes insights-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.insights-generating-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: opacity 0.3s;
}

.insights-generating-note {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.5;
}

/* Header */
.insights-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.insights-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.insights-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.insights-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.insights-refresh-count {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Stale banner */
.insights-stale-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.insights-stale-banner svg {
  color: #f59e0b;
  flex-shrink: 0;
}

/* Results grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

/* Insight card */
.insight-card {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-left: 3px solid var(--primary-500, #6366f1);
  transition: all 0.2s ease;
}

.insight-card:hover {
  box-shadow: 0 4px 16px rgba(99,102,241,0.1);
  border-color: var(--primary-300, #a5b4fc);
  transform: translateY(-1px);
}

.ic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ic-company {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.ic-company:hover {
  color: var(--primary-500, #6366f1);
}

.ic-external {
  opacity: 0.4;
  transition: opacity 0.15s;
}

.ic-company:hover .ic-external {
  opacity: 1;
}

.ic-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(99,102,241,0.08);
  color: var(--primary-600, #4f46e5);
  white-space: nowrap;
  flex-shrink: 0;
}

.ic-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-500, #6366f1);
  margin: 0 0 8px 0;
}

a.ic-role-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}

a.ic-role-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.ic-match {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Skeleton loading */
.skeleton-line {
  background: linear-gradient(90deg, var(--gray-200, #e5e7eb) 25%, var(--gray-100, #f3f4f6) 50%, var(--gray-200, #e5e7eb) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-card {
  pointer-events: none;
}

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

/* Toast */
.insights-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900, #111827);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw;
  text-align: center;
}

.insights-toast.error {
  background: var(--danger, #ef4444);
}

.insights-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Job Insights Mobile ===== */

@media (max-width: 768px) {
  /* Search section */
  .insights-search-section {
    padding: 20px 16px 16px;
    border-radius: 14px;
  }

  .ai-search-input {
    font-size: 14px;
    padding: 12px 14px;
  }

  .ai-search-placeholder { font-size: 14px; left: 14px; }

  .ai-search-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  /* Chat messages */
  .ai-chat-message { gap: 10px; }

  .ai-chat-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
  }

  .ai-chat-bubble {
    font-size: 13px;
    padding: 10px 14px;
    max-width: 100%;
  }

  /* Search results bubble */
  .sr-bubble-container {
    margin-left: 0;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 8px;
  }

  .sr-row { padding: 10px 12px; }

  .sr-row-top { flex-wrap: wrap; gap: 8px; }

  .sr-row-info { white-space: normal; width: 100%; }

  .sr-row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .sr-row-tags { font-size: 10px; }

  /* Job Scout results */
  .jb-results-container {
    margin-left: 0;
    border-radius: 12px;
    margin-top: 8px;
  }

  .jb-row { padding: 10px 12px; }

  .jb-reason { white-space: normal; }

  /* Scanning card */
  .jb-scanning-card { padding: 40px 16px; }

  /* Module cards */
  .insights-modules-grid { grid-template-columns: 1fr; }

  .insights-module-card { padding: 18px; }

  /* Promo sidebar (already stacks via search-results-layout at 900px) */
  .search-promo-sidebar { padding: 16px; }

  /* Enhance modal */
  .enhance-modal-overlay { padding: 12px; }

  .enhance-modal {
    max-width: 100%;
    padding: 20px;
    border-radius: 14px;
  }

  .em-actions { flex-direction: column; }
  .em-actions .btn { min-width: 0; }

  .em-secondary-actions { flex-direction: column; align-items: stretch; }

  /* Locked / empty states */
  .insights-locked-card,
  .insights-empty-state,
  .insights-generating-card {
    padding: 48px 16px;
  }
}

@media (max-width: 480px) {
  .ai-chat-avatar {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .ai-chat-avatar svg { width: 14px; height: 14px; }

  .sr-enhance-btn { font-size: 10px; padding: 3px 8px; }

  .jb-score {
    min-width: 34px;
    height: 24px;
    font-size: 11px;
    border-radius: 6px;
  }

  .agents-section-title { font-size: 15px; }
}

/* ===== End Job Insights ===== */

/* Progress bars */
.progress-bar-new {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-new .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-bar-new .progress-fill.green { background: var(--success); }
.progress-bar-new .progress-fill.purple { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.progress-bar-new .progress-fill.gray { background: #9ca3af; }

/* ============================================
   Top Navbar (Landing, Auth, Legal pages only)
   ============================================ */

.navbar-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-custom.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.navbar-custom.dark {
  background: rgba(2, 6, 23, 0.8);
  border-bottom-color: rgba(255,255,255,0.05);
}

.navbar-custom.dark .nav-link-custom {
  color: var(--gray-400);
}

.navbar-custom.dark .nav-link-custom:hover {
  color: white;
  background: rgba(255,255,255,0.05);
}

.navbar-custom.dark .nav-brand {
  color: white;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gray-900);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1.5px solid white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.nav-brand-text {
  font-family: 'Space Grotesk', var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link-custom {
  padding: 0.5rem 1rem;
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-custom:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link-custom.active {
  color: var(--primary-600);
  background: var(--primary-50);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.5rem;
}

/* Mobile hamburger for landing/auth pages */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.mobile-nav-toggle .hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-300);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Footer (Landing, Legal pages) */
.footer {
  padding: 2rem 0;
  background: var(--gray-950);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-icon {
  color: var(--gray-400);
  display: flex;
  align-items: center;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-400);
}

.footer-tagline {
  color: var(--gray-500);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--gray-500);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gray-300);
}

/* ============================================
   Landing Page
   ============================================ */

.landing-page {
  background: var(--gray-950);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Grid background pattern (Supabase-style) */
.landing-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Glow orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.6;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(59, 130, 246, 0.15);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.15);
  top: 30%;
  right: -100px;
}

.glow-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.1);
  bottom: 20%;
  left: -50px;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-title-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-400);
  max-width: 520px;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-slogan {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--primary-400);
  font-style: italic;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.25rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
}

/* 3D Resume Container */
.hero-3d-wrapper {
  position: relative;
  z-index: 1;
}

.hero-3d-container {
  width: 100%;
  height: 560px;
  position: relative;
}

.hero-3d-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 80%;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 158, 11, 0.07) 0%,
    rgba(139, 92, 246, 0.05) 25%,
    rgba(59, 130, 246, 0.03) 50%,
    transparent 75%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

#resume-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#resume-3d-canvas:active {
  cursor: grabbing;
}

/* Mobile Fallback Resume Card */
.hero-resume-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  perspective: 1200px;
}

.resume-card-static {
  width: 300px;
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  transform: rotateY(-12deg) rotateX(4deg);
  animation: float 6s ease-in-out infinite;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(59, 130, 246, 0.12);
  position: relative;
  overflow: hidden;
}

.resume-card-static::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #22d3ee);
}

.resume-card-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.resume-card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.resume-card-role {
  font-size: 0.75rem;
  color: #3b82f6;
  font-weight: 500;
  margin-top: 2px;
}

.resume-card-contact {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 4px;
}

.resume-card-section {
  margin-bottom: 12px;
}

.resume-card-section-title {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.resume-card-entry {
  margin-bottom: 6px;
}

.resume-card-entry strong {
  font-size: 0.7rem;
  color: #0f172a;
  display: block;
}

.resume-card-entry span {
  font-size: 0.6rem;
  color: #64748b;
}

.resume-card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.resume-card-skill {
  font-size: 0.55rem;
  padding: 2px 8px;
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  border-radius: 4px;
}

.resume-card-match {
  position: absolute;
  top: 16px;
  right: 16px;
}

.match-score {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  padding: 4px 12px;
  border-radius: 100px;
}

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

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  color: white;
}

.btn-secondary-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--gray-300);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gray-600);
  color: white;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--primary-500);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

/* ============================================
   Process Section (Steps)
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Features Section
   ============================================ */

.features-section {
  padding: var(--section-padding) 0;
  background: var(--gray-900);
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.features-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-400);
  font-size: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  padding: var(--section-padding) 0;
  background: var(--gray-950);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.125rem;
  color: var(--gray-400);
  margin-bottom: 2rem;
}

/* ============================================
   Footer
   ============================================ */

/* ============================================
   App Pages - Layout
   ============================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  background: var(--content-bg);
  position: relative;
  overflow: hidden;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.app-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 32px;
  position: relative;
}

.page-header {
  margin-bottom: 2rem;
  position: relative;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--gray-400);
  font-size: 1rem;
}

/* ============================================
   Cards (App Pages)
   ============================================ */

.section-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

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

.section-card h5 {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-500);
}

.entry-block {
  border-left: 3px solid var(--gray-200);
  padding-left: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.entry-block:hover {
  border-color: var(--primary-500);
}

/* ============================================
   Forms
   ============================================ */

.form-control {
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: white;
}

.form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--gray-400);
}

textarea.form-control {
  resize: vertical;
}

textarea.jd-input {
  min-height: 200px;
}

.form-select {
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: white;
}

.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* ============================================
   Buttons (App Pages)
   ============================================ */

.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  background: var(--primary-600);
}

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

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

.btn-outline-primary {
  border: 1px solid var(--primary-500);
  color: var(--primary-400);
  background: transparent;
}

.btn-outline-primary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary-400);
  color: var(--primary-300);
}

.btn-outline-danger {
  border: 1px solid #fb7185;
  color: #fb7185;
  background: transparent;
}

.btn-outline-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: #f43f5e;
  color: #f43f5e;
}

.builder-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
}

.builder-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-add {
  border-style: dashed;
  border-color: var(--gray-300);
  color: var(--gray-600);
  background: transparent;
}

.btn-add:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--primary-50);
}

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

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  padding: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

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

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

/* ============================================
   Status Badges (Dashboard)
   ============================================ */

.status-select {
  width: auto;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-applied {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.status-recruiter_screen {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.status-interview {
  background-color: #e0e7ff;
  color: #4338ca;
}

.status-last_round {
  background-color: #fae8ff;
  color: #a21caf;
}

.status-offer {
  background-color: #fef3c7;
  color: #b45309;
}

.status-hired {
  background-color: #d1fae5;
  color: #047857;
}

.status-not_hired {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* ============================================
   Dashboard Notes Feature
   ============================================ */

.expand-cell {
  cursor: pointer;
  position: relative;
  padding: 0.75rem 0.5rem !important;
}

.expand-cell:hover {
  background: var(--gray-100);
}

.expand-icon {
  color: var(--gray-400);
  transition: transform 0.2s ease;
}

.expand-cell:hover .expand-icon {
  color: var(--gray-600);
}

.app-row.expanded {
  background: var(--gray-50);
}

.notes-indicator {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--primary-500);
  border-radius: 50%;
}

.notes-row {
  background: var(--gray-50);
}

.notes-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--primary-200) !important;
}

.notes-container {
  padding: 1rem 1rem 1rem 2.5rem;
}

.notes-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.notes-textarea {
  min-height: 80px;
  font-size: 0.9rem;
  resize: vertical;
  border-color: var(--gray-200);
}

.notes-textarea:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   Bullet Rows
   ============================================ */

.bullet-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.bullet-row input {
  flex: 1;
}

.bullet-row .btn {
  padding: 0.375rem 0.625rem;
  font-size: 0.85rem;
}

/* ============================================
   Status Messages
   ============================================ */

#status {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.alert {
  border-radius: 12px;
  border: none;
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  font-weight: 500;
}

/* ============================================
   Spinner Overlay - Stick Figure Animation
   ============================================ */

.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
}

.spinner-overlay.active {
  display: flex;
}

.spinner-text {
  color: var(--gray-400);
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

/* Stick Figure Loader */
.stick-loader {
  width: 120px;
  height: 120px;
  position: relative;
}

.stick-figure {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: stickWalk 0.6s ease-in-out infinite;
}

.stick-figure svg {
  width: 60px;
  height: 80px;
  stroke: var(--primary-400);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Walking animation */
@keyframes stickWalk {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  25% {
    transform: translateX(-50%) translateY(-8px) rotate(-5deg);
  }
  50% {
    transform: translateX(-50%) translateY(0);
  }
  75% {
    transform: translateX(-50%) translateY(-8px) rotate(5deg);
  }
}

/* Legs animation */
.stick-figure .legs {
  animation: legsMove 0.3s ease-in-out infinite alternate;
  transform-origin: center top;
}

@keyframes legsMove {
  0% { transform: scaleX(0.8); }
  100% { transform: scaleX(1.2); }
}

/* Arms animation - like carrying papers */
.stick-figure .arms {
  animation: armsMove 0.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes armsMove {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Progress dots */
.loader-dots {
  display: flex;
  gap: 8px;
}

.loader-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

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

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

@media (max-width: 768px) {
  .hero-container,
  .features-container,
  .cta-container,
  .app-container {
    padding: 0 1rem;
  }

  .hero-section {
    padding-top: calc(var(--nav-height) + 2rem);
  }

  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    margin: 0 auto 1.5rem;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-slogan {
    text-align: center;
  }

  .hero-3d-wrapper {
    order: -1;
  }

  .hero-3d-container {
    height: 260px;
  }

  .hero-3d-container::before {
    filter: blur(25px);
    width: 80%;
    height: 70%;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-card {
    padding: 1.25rem;
  }

  .cta-glow {
    width: 300px;
    height: 300px;
  }
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* CTA Glow */
.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  animation: ctaPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Large button variant */
.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* ============================================
   Visual Demo Element (Hero)
   ============================================ */

/* Features Compact Grid */
.features-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card-compact {
  padding: 1.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.feature-card-compact:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.feature-card-compact .feature-icon {
  margin-bottom: 1rem;
}

.feature-compact-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  margin-bottom: 0.375rem;
}

.feature-compact-desc {
  font-size: 0.9rem;
  color: var(--gray-400);
  line-height: 1.5;
}

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

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

  .feature-card-compact {
    padding: 1.25rem;
  }

  .feature-compact-title {
    font-size: 0.95rem;
  }

  .feature-compact-desc {
    font-size: 0.8rem;
  }
}

/* ============================================
   Hired Celebration Animation
   ============================================ */

.celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  animation: celebrationFadeIn 0.3s ease forwards;
}

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

.celebration-content {
  text-align: center;
  animation: celebrationBounce 0.6s ease forwards;
}

@keyframes celebrationBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.celebration-stick-figure {
  margin-bottom: 1.5rem;
}

.celebration-stick-figure svg {
  width: 100px;
  height: 130px;
  stroke: #10b981;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: celebrationJump 0.4s ease-in-out infinite;
}

@keyframes celebrationJump {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-10deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-20px) rotate(10deg); }
}

.celebration-arms {
  animation: celebrationArms 0.2s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes celebrationArms {
  0% { transform: rotate(-30deg); }
  100% { transform: rotate(30deg); }
}

.celebration-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.celebration-subtext {
  color: var(--gray-400);
  font-size: 1rem;
}

/* Confetti particles */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary-500);
  animation: confettiFall 1.5s ease-out forwards;
}

.confetti:nth-child(odd) { background: #10b981; border-radius: 50%; }
.confetti:nth-child(even) { background: #fbbf24; }
.confetti:nth-child(3n) { background: #8b5cf6; border-radius: 2px; }
.confetti:nth-child(4n) { background: #f43f5e; }

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

/* ============================================
   Feedback Box (Builder Page)
   ============================================ */

.feedback-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.feedback-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #10b981;
  font-weight: 600;
  font-size: 0.95rem;
}

.feedback-header svg {
  flex-shrink: 0;
}

.feedback-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--gray-400);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.feedback-close:hover {
  color: var(--gray-600);
}

.feedback-content {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 3rem;
}

.feedback-content p {
  margin: 0;
}

.feedback-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
}

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

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

/* ============================================
   Feedback Ready Toast
   ============================================ */

.feedback-ready-toast {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 1001;
  background: linear-gradient(135deg, var(--primary-500), var(--violet-500));
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  max-width: 340px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-ready-toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}

.feedback-ready-toast .toast-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}

.feedback-ready-toast .toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.feedback-ready-toast .toast-close:hover {
  color: white;
}

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

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

@media (max-width: 768px) {
  .feedback-ready-toast {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* ============================================
   Feedback Success Toast
   ============================================ */

.feedback-success-toast {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 1100;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  font-size: 0.9rem;
  font-weight: 500;
  animation: feedbackToastSlideIn 0.25s ease forwards;
}

.feedback-success-toast.hiding {
  animation: feedbackToastSlideOut 0.3s ease forwards;
}

@media (max-width: 768px) {
  .feedback-success-toast {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* ============================================
   Journey Animation Section
   ============================================ */

.journey-track {
  position: relative;
  height: 140px;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem 1rem;
}

.journey-line {
  position: absolute;
  top: 40px;
  left: 5%;
  right: 5%;
  height: 3px;
  background: linear-gradient(90deg, var(--gray-700), var(--primary-500), var(--primary-400), #10b981);
  border-radius: 2px;
}

.journey-figure {
  position: absolute;
  top: 0;
  left: 5%;
  animation: journeyWalk 8s ease-in-out infinite;
}

.stick-person {
  width: 40px;
  height: 55px;
  stroke: var(--primary-400);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transform: translateX(-50%);
}

.stick-person .arm-left,
.stick-person .arm-right {
  animation: armSwing 0.4s ease-in-out infinite alternate;
  transform-origin: 30px 28px;
}

.stick-person .arm-right {
  animation-delay: 0.2s;
}

.stick-person .leg-left,
.stick-person .leg-right {
  animation: legSwing 0.4s ease-in-out infinite alternate;
  transform-origin: 30px 45px;
}

.stick-person .leg-right {
  animation-delay: 0.2s;
}

@keyframes armSwing {
  from { transform: rotate(-15deg); }
  to { transform: rotate(15deg); }
}

@keyframes legSwing {
  from { transform: rotate(-10deg); }
  to { transform: rotate(10deg); }
}

@keyframes journeyWalk {
  0% { left: 5%; }
  20% { left: 25%; }
  40% { left: 45%; }
  60% { left: 65%; }
  80%, 100% { left: 90%; }
}

.journey-steps {
  position: absolute;
  top: 30px;
  left: 5%;
  right: 5%;
  display: flex;
  justify-content: space-between;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.journey-dot {
  width: 20px;
  height: 20px;
  background: var(--gray-800);
  border: 3px solid var(--gray-600);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.journey-step span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.journey-step-final .journey-dot {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.journey-step-final span {
  color: #10b981;
}

@media (max-width: 576px) {
  .journey-step span {
    font-size: 0.65rem;
  }

  .journey-dot {
    width: 14px;
    height: 14px;
  }

  .stick-person {
    width: 30px;
    height: 42px;
  }
}

/* ============================================
   Authentication Pages
   ============================================ */

.auth-page {
  min-height: 100vh;
  background: var(--gray-950);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
  margin-bottom: 2rem;
}

.auth-logo:hover {
  color: white;
}

.auth-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(20px);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--gray-400);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  margin-bottom: 0.5rem;
}

.auth-field .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1rem;
}

.auth-field .form-control::placeholder {
  color: var(--gray-500);
}

.auth-field .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  color: white;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.4rem;
  border-radius: 0.375rem;
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.15s;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: white;
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.password-toggle .eye-off { display: none; }
.password-toggle.is-visible .eye { display: none; }
.password-toggle.is-visible .eye-off { display: block; }

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.auth-submit {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-400);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--primary-300);
  text-decoration: underline;
}

.auth-card .form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.auth-card .form-check-input:checked {
  background-color: var(--primary-500, #3b82f6);
  border-color: var(--primary-500, #3b82f6);
}

.auth-card .form-check-label {
  color: var(--gray-300, #cbd5e1);
}

.auth-card .form-check-label a {
  color: var(--primary-400, #60a5fa);
  text-decoration: none;
  font-weight: 500;
}

.auth-card .form-check-label a:hover {
  color: var(--primary-300, #93c5fd);
  text-decoration: underline;
}

/* ============================================
   No Resume Prompt (Enhance Page)
   ============================================ */

.no-resume-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
}

.no-resume-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.no-resume-icon svg {
  stroke: var(--primary-500);
}

.no-resume-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.no-resume-content p {
  color: var(--gray-500);
  max-width: 480px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ============================================
   Transformation Animation (Enhance Page)
   ============================================ */

.transform-animation-section {
  margin-top: 3rem;
  padding: 2rem 0;
  overflow: hidden;
}

.transform-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 140px;
  position: relative;
}

/* Incoming plain stick figure */
.transform-runner {
  width: 60px;
  height: 100px;
  position: relative;
}

.transform-runner.incoming {
  animation: runToMachine 3s ease-in-out infinite;
}

.transform-runner.incoming svg {
  width: 40px;
  height: 70px;
  color: var(--gray-400);
}

.transform-runner.incoming .arm-left,
.transform-runner.incoming .arm-right,
.transform-runner.incoming .leg-left,
.transform-runner.incoming .leg-right {
  transform-origin: 20px 22px;
  animation: runningArmsLegs 0.3s ease-in-out infinite alternate;
}

.transform-runner.incoming .leg-left,
.transform-runner.incoming .leg-right {
  transform-origin: 20px 40px;
}

.transform-runner.incoming .arm-right,
.transform-runner.incoming .leg-left {
  animation-delay: 0.15s;
}

@keyframes runToMachine {
  0% {
    transform: translateX(-80px);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  45% {
    transform: translateX(0);
    opacity: 1;
  }
  55% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes runningArmsLegs {
  0% {
    transform: rotate(-15deg);
  }
  100% {
    transform: rotate(15deg);
  }
}

/* Transformation Machine */
.transform-machine {
  width: 160px;
  height: 120px;
  position: relative;
  z-index: 2;
}

.machine-body {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.machine-svg {
  width: 120px;
  height: 100px;
  color: var(--primary-500);
}

.machine-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  animation: machineGlow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes machineGlow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.machine-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Machine gears animation */
.gear {
  transform-origin: center;
}

.gear-1 {
  animation: spinGear 2s linear infinite;
}

.gear-2 {
  animation: spinGear 2s linear infinite reverse;
}

@keyframes spinGear {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Portal pulse */
.portal-in,
.portal-out {
  animation: portalPulse 1.5s ease-in-out infinite;
}

.portal-out {
  animation-delay: 0.75s;
}

@keyframes portalPulse {
  0%, 100% {
    stroke-width: 2;
    opacity: 0.7;
  }
  50% {
    stroke-width: 3;
    opacity: 1;
  }
}

/* Energy lines */
.energy {
  animation: energyFlow 1s ease-in-out infinite;
}

@keyframes energyFlow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Outgoing transformed figure */
.transform-runner.outgoing {
  animation: runFromMachine 3s ease-in-out infinite;
}

.transform-runner.outgoing svg {
  width: 60px;
  height: 70px;
  color: var(--primary-500);
  position: absolute;
  top: 15px;
  left: 0;
}

/* Hide all transformed figures by default */
.stick-transformed {
  opacity: 0;
  display: none;
}

/* Show one at a time with cycling animation - 6 figures, 3s each = 18s total */
.stick-executive {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
}

.stick-construction {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
  animation-delay: 3s;
}

.stick-graduate {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
  animation-delay: 6s;
}

.stick-superhero {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
  animation-delay: 9s;
}

.stick-chef {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
  animation-delay: 12s;
}

.stick-pilot {
  display: block;
  animation: showTransformed 18s ease-in-out infinite;
  animation-delay: 15s;
}

@keyframes showTransformed {
  0%, 10% {
    opacity: 0;
  }
  12%, 14% {
    opacity: 1;
  }
  16%, 100% {
    opacity: 0;
  }
}

@keyframes runFromMachine {
  0%, 45% {
    transform: translateX(0);
    opacity: 0;
  }
  55% {
    opacity: 1;
    transform: translateX(0);
  }
  85% {
    opacity: 1;
    transform: translateX(80px);
  }
  100% {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* Running animation for outgoing */
.transform-runner.outgoing .arm-left,
.transform-runner.outgoing .arm-right,
.transform-runner.outgoing .leg-left,
.transform-runner.outgoing .leg-right {
  animation: runningArmsLegs 0.25s ease-in-out infinite alternate;
}

.transform-runner.outgoing .arm-right,
.transform-runner.outgoing .leg-left {
  animation-delay: 0.125s;
}

/* Caption */
.transform-caption {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-top: 1rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 576px) {
  .transform-track {
    transform: scale(0.8);
  }

  .transform-animation-section {
    margin-top: 2rem;
  }
}

/* ============================================
   Success Modal (Enhance Page)
   ============================================ */

.success-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.success-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.success-modal {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.success-modal-overlay.active .success-modal {
  transform: scale(1) translateY(0);
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successPop 0.5s ease 0.2s both;
}

.success-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--primary-500);
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-modal h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.success-modal p {
  color: var(--gray-500);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.success-actions .btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-actions .btn-primary {
  background: var(--gradient-primary);
  border: none;
}

.success-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.success-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.success-close:hover {
  background: var(--gray-200);
  color: var(--gray-600);
}

@media (max-width: 480px) {
  .success-modal {
    padding: 2rem 1.5rem;
  }

  .success-icon {
    width: 60px;
    height: 60px;
  }

  .success-icon svg {
    width: 30px;
    height: 30px;
  }
}

/* ============================================
   Rejection Modal (Dashboard)
   ============================================ */

.rejection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.rejection-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rejection-modal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.rejection-modal-overlay.active .rejection-modal {
  transform: scale(1) translateY(0);
}

.rejection-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.rejection-close:hover {
  background: var(--gray-200);
  color: var(--gray-600);
}

.rejection-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}

.rejection-modal h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.rejection-modal p {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.rejection-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.rejection-option {
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.rejection-option:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.rejection-option.selected {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.rejection-modal textarea {
  margin-bottom: 1.5rem;
  resize: none;
}

.rejection-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.rejection-actions .btn {
  min-width: 120px;
}

/* ============================================
   Pending Review Modal & Banner
   ============================================ */

.review-progress {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-align: center;
  margin-bottom: 0.25rem;
}

.review-email-context {
  background: var(--gray-50, #f8fafc);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-100, #f1f5f9);
}

.review-app-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
}

.review-app-status {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-left: 0.5rem;
}

.review-matched-app-card {
  background: var(--gray-50, #f8fafc);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200, #e2e8f0);
  margin-bottom: 0.75rem;
}

.review-inline-input {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, margin 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  margin-top: 0;
}

.review-inline-input.expanded {
  max-height: 120px;
  opacity: 1;
  margin-top: 0.75rem;
}

.pending-review-banner {
  border-left: 3px solid var(--amber-400, #fbbf24);
}

/* ============================================
   Review Modal — Amber Theme & Animations
   ============================================ */

.review-modal-amber {
  border-top: 3px solid #fbbf24;
}

.review-icon-amber {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(251,191,36,0.18) 0%, rgba(245,158,11,0.28) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
}

.review-progress-amber {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d97706;
  text-align: center;
  margin-bottom: 0.25rem;
}

.review-type-cursor {
  color: #d97706;
  font-weight: 300;
  animation: ai-cursor-blink 0.8s ease-in-out infinite;
}

/* Amber buttons inside review modal */
.review-modal-amber .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
}

.review-modal-amber .btn-primary:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #b45309;
}

.review-modal-amber .btn-outline-primary {
  color: #d97706;
  border-color: #d97706;
}

.review-modal-amber .btn-outline-primary:hover {
  background: rgba(245,158,11,0.08);
  color: #b45309;
  border-color: #b45309;
}

/* App option amber hover/selected in review modal */
.review-modal-amber .review-app-option:hover {
  border-color: rgba(251,191,36,0.6);
  background: rgba(251,191,36,0.06);
}

.review-modal-amber .review-app-option.selected {
  background: rgba(251,191,36,0.08);
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.12);
}

/* New application detected card */
.review-new-app-card {
  background: linear-gradient(135deg, rgba(251,191,36,0.06) 0%, rgba(245,158,11,0.10) 100%);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}
.review-new-app-card .review-app-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800, #1e293b);
}
.review-new-app-card .review-app-company {
  font-size: 0.9rem;
  color: var(--gray-500, #64748b);
  margin-top: 0.15rem;
}

/* Searchable app dropdown */
.review-app-search-results {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 0.4rem;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 8px;
  background: var(--gray-50, #f8fafc);
}
.review-app-search-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100, #f1f5f9);
  transition: background 0.12s;
  font-size: 0.85rem;
}
.review-app-search-item:last-child { border-bottom: none; }
.review-app-search-item:hover {
  background: rgba(245,158,11,0.08);
}
.review-app-search-item-title {
  font-weight: 500;
  color: var(--gray-800, #1e293b);
}
.review-app-search-item-meta {
  font-size: 0.75rem;
  color: var(--gray-500, #64748b);
  margin-top: 0.1rem;
}

/* Fade transition for review body content */
.review-body-animate {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.review-body-animate.review-fading {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes review-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.review-body-animate.review-entering {
  animation: review-fade-in 0.25s ease-out both;
}

/* ============================================
   Match Score Badges
   ============================================ */

.match-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.match-score.no-score {
  color: var(--gray-400);
  background: var(--gray-100);
}

.match-score.score-low, .recent-score.score-low {
  color: #7f1d1d;
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

.match-score.score-fair, .recent-score.score-fair {
  color: #7c2d12;
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.match-score.score-good, .recent-score.score-good {
  color: #713f12;
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
}

.match-score.score-great, .recent-score.score-great {
  color: #14532d;
  background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
}

.match-score.score-excellent, .recent-score.score-excellent {
  color: #052e16;
  background: linear-gradient(135deg, #86efac 0%, #4ade80 100%);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}

/* Score display in success modal */
.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 12px;
}

.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 8px;
}

.score-value.score-low {
  color: #dc2626;
}

.score-value.score-fair {
  color: #ea580c;
}

.score-value.score-good {
  color: #ca8a04;
}

.score-value.score-great {
  color: #16a34a;
}

.score-value.score-excellent {
  color: #15803d;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* Navbar active indicator animation */
.nav-link-custom {
  position: relative;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: all 0.25s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link-custom.active::after {
  width: 60%;
}

.nav-link-custom:hover::after {
  width: 40%;
}

/* ============================================
   Home Page
   ============================================ */

.home-page {
  max-width: 1000px;
  margin: 0 auto;
}

/* Welcome Section */
.home-welcome {
  text-align: center;
  margin-bottom: 2rem;
}

.home-greeting {
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.home-subtitle {
  color: var(--gray-400);
  font-size: 1rem;
}

/* Stats Bar */
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-500);
  flex-shrink: 0;
}

.stat-icon-blue {
  background: var(--primary-50);
  color: var(--primary-500);
}

.stat-icon-green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon-gray {
  background: var(--gray-100);
  color: var(--gray-400);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Home Section */
.home-section {
  margin-bottom: 2.5rem;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.home-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

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

.home-section-link {
  font-size: 0.875rem;
  color: var(--primary-500);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.home-section-link:hover {
  color: var(--primary-600);
}

/* Workflow Grid */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.workflow-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.2s ease;
}

.workflow-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.workflow-card-locked {
  opacity: 0.6;
}

.workflow-card-locked:hover {
  border-color: var(--gray-200);
  box-shadow: none;
}

.workflow-number {
  position: absolute;
  top: -10px;
  left: 20px;
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.workflow-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary-500);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.workflow-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.workflow-description {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.workflow-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
}

.status-dot.status-complete {
  background: #16a34a;
}

.status-dot.status-active {
  background: var(--primary-500);
}

.workflow-status.status-complete {
  color: #16a34a;
}

.workflow-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.workflow-btn.btn-disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Recent Activity */
.recent-list {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
}

.recent-item:last-child {
  border-bottom: none;
}

.recent-item:hover {
  background: var(--gray-50);
}

.recent-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.recent-title {
  font-weight: 500;
  color: var(--gray-800);
}

.recent-company {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.recent-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recent-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.status-badge-applied {
  background: var(--gray-100);
  color: var(--gray-600);
}

.status-badge-recruiter_screen {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge-interview {
  background: #fef3c7;
  color: #b45309;
}

.status-badge-last_round {
  background: #fce7f3;
  color: #be185d;
}

.status-badge-offer {
  background: #d1fae5;
  color: #047857;
}

.status-badge-hired {
  background: #bbf7d0;
  color: #15803d;
}

.status-badge-not_hired {
  background: var(--gray-100);
  color: var(--gray-500);
}

.recent-score {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.recent-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  min-width: 60px;
  text-align: right;
}

/* Getting Started */
.getting-started-card {
  display: flex;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
  border: 1px solid var(--primary-100);
  border-radius: 16px;
  padding: 1.5rem;
}

.getting-started-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--primary-500);
  border-radius: 12px;
  flex-shrink: 0;
}

.getting-started-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.getting-started-content p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.getting-started-content .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .home-stats {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .recent-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .recent-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .getting-started-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* Delete Account */
.delete-account-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.delete-account-info strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.delete-account-info p {
  color: var(--gray-500);
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
}

.btn-danger {
  background: #dc2626;
  border: 1px solid #dc2626;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   Beta Feedback Widget
   ============================================ */

.beta-feedback-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
}

.beta-feedback-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.beta-feedback-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.beta-feedback-trigger.active {
  opacity: 0;
  pointer-events: none;
}

.beta-feedback-panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(8px);
  transform-origin: bottom right;
  transition: all 0.25s ease;
}

.beta-feedback-panel.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.beta-feedback-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.beta-feedback-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
}

.beta-feedback-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.beta-feedback-panel-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.beta-feedback-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.beta-feedback-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.beta-feedback-type-btn:hover {
  border-color: var(--gray-300);
  background: var(--gray-100);
}

.beta-feedback-type-btn.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
  color: var(--primary-700);
}

.beta-feedback-type-btn .type-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.beta-feedback-context {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: var(--gray-50);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.beta-feedback-context svg {
  flex-shrink: 0;
}

.beta-feedback-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.625rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  resize: vertical;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease;
  background: white;
  color: var(--gray-800);
}

.beta-feedback-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.beta-feedback-textarea::placeholder {
  color: var(--gray-400);
}

.beta-feedback-submit {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.beta-feedback-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.beta-feedback-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.beta-feedback-status {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}

.beta-feedback-status.success {
  color: #16a34a;
}

.beta-feedback-status.error {
  color: #dc2626;
}

@media (max-width: 768px) {
  .beta-feedback-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .beta-feedback-panel {
    width: calc(100vw - 2rem);
    right: 0;
    left: auto;
  }
}

/* ============================================
   URL Extraction Toggle (Enhance Page)
   ============================================ */

.jd-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--gray-50);
}

.jd-mode-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s ease;
}

.jd-mode-btn:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.jd-mode-btn.active {
  background: var(--gradient-primary);
  color: white;
}

.manual-entry-hint {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  background: var(--gray-50);
  border-left: 3px solid var(--primary-400);
  padding: 0.65rem 2rem 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

.manual-entry-hint.fade-in {
  animation: manualHintFadeIn 0.4s ease forwards;
}

.manual-entry-hint.fade-out {
  animation: manualHintFadeOut 0.3s ease forwards;
}

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

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

/* Hint severity variants */
.manual-entry-hint.hint-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
  color: #92400e;
}

.manual-entry-hint.hint-error {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444;
  color: #991b1b;
}

.manual-entry-hint.hint-info {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--primary-400);
  color: var(--primary-700);
}

/* Hint icon */
.hint-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Typewriter cursor */
.typing::after,
.hint-text.typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: currentColor;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: hintCursorBlink 0.6s step-end infinite;
}

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

/* Dismiss button */
.hint-dismiss {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: inherit;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  line-height: 1;
}

.hint-dismiss:hover {
  opacity: 1;
}

/* Toggle reveal animation */
.jd-mode-toggle.reveal {
  animation: toggleReveal 0.35s ease forwards;
}

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

/* Field highlight for empty fields after partial extraction */
.form-control.field-needs-attention {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

/* "Or enter manually" link */
.manual-entry-link {
  color: var(--primary-500);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.url-extract-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.extract-status {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.extract-status.extract-loading {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary-600);
}

.extract-status.extract-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #047857;
}

.extract-status.extract-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.extract-status.extract-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #b45309;
}

.extract-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: extractSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes extractSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 576px) {
  .jd-mode-toggle {
    display: flex;
  }

  .jd-mode-btn {
    flex: 1;
    text-align: center;
  }
}

/* ============================================
   Resume Preview Mode (Builder two-mode system)
   ============================================ */

.resume-preview-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 4rem;
  perspective: 1200px;
}

.resume-preview-paper {
  width: 100%;
  max-width: 800px;
  background: white;
  border-radius: 4px;
  padding: 3rem 3.5rem;
  position: relative;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.06),
    0 8px 16px rgba(0, 0, 0, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.04),
    0 32px 64px rgba(0, 0, 0, 0.03),
    0 0 80px rgba(59, 130, 246, 0.15);
  animation: paperFloat 6s ease-in-out infinite;
  transition: box-shadow 0.4s ease;
}

.resume-preview-paper:hover {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.06),
    0 8px 16px rgba(0, 0, 0, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.04),
    0 32px 64px rgba(0, 0, 0, 0.03),
    0 0 100px rgba(59, 130, 246, 0.2),
    0 0 40px rgba(139, 92, 246, 0.1);
}

@keyframes paperFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Resume preview typography — mirrors PDF layout */

.rp-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.rp-contact-line {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.rp-contact-line span + span::before {
  content: " | ";
  color: var(--gray-300);
  margin: 0 0.25rem;
}

.rp-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-700);
  border-bottom: 1.5px solid var(--gray-800);
  padding-bottom: 0.3rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

.rp-summary {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.rp-entry {
  margin-bottom: 0.75rem;
}

.rp-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.rp-entry-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-900);
}

.rp-entry-dates {
  font-size: 0.82rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.rp-entry-sub {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 0.2rem;
}

.rp-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.2rem 0 0;
}

.rp-bullets li {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 0.15rem;
}

.rp-skills,
.rp-certifications {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Empty state */
.rp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.rp-empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--gray-300);
  margin-bottom: 1.5rem;
}

.rp-empty-state p {
  color: var(--gray-500);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.rp-empty-state .btn {
  font-size: 0.95rem;
}

/* Mode transition animation */
.mode-fade-in {
  animation: modeFadeIn 0.3s ease forwards;
}

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

/* Responsive adjustments for preview */
@media (max-width: 640px) {
  .resume-preview-paper {
    padding: 2rem 1.5rem;
  }

  .rp-name {
    font-size: 1.35rem;
  }

  .rp-contact-line {
    font-size: 0.78rem;
  }

  .rp-entry-header {
    flex-direction: column;
    gap: 0;
  }

  .rp-entry-dates {
    white-space: normal;
  }
}

/* ============================================
   Enhance Tab — Card-Based Output Layout
   ============================================ */

/* --- Output Grid Layout --- */
.enhance-output-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.enhance-output-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.enhance-output-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

/* --- Enhance Card Base (matches insights-module-card) --- */
.enhance-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.enhance-card:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.08);
}

.enhance-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.enhance-card-header h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700, #374151);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.enhance-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.enhance-card-icon svg {
  width: 16px;
  height: 16px;
}

.enhance-card-icon.icon-resume {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-500, #6366f1);
}

.enhance-card-icon.icon-score {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.enhance-card-icon.icon-actions {
  background: rgba(6, 182, 212, 0.08);
  color: #06b6d4;
}

.enhance-card-icon.icon-coverletter {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
}

/* --- Resume Card (contains the preview paper) --- */
.enhance-resume-card .resume-preview-container {
  padding: 1rem 0 0;
  margin: 0 -24px -24px;
}

.enhance-resume-card .resume-preview-paper {
  border-radius: 0 0 14px 14px;
  box-shadow: none;
  animation: none;
}

.enhance-resume-card .resume-preview-paper:hover {
  box-shadow: none;
}

/* --- Score Card --- */
.enhance-score-display {
  text-align: center;
  padding: 8px 0;
}

.enhance-score-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.enhance-score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500, #6b7280);
  margin-bottom: 12px;
}

.enhance-score-job {
  font-size: 0.8rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.4;
  border-top: 1px solid var(--gray-100, #f3f4f6);
  padding-top: 12px;
  margin-top: 4px;
}

.enhance-score-job strong {
  display: block;
  font-weight: 600;
  color: var(--gray-800, #1f2937);
}

/* Score colors (reuse existing palette) */
.enhance-score-number.score-low { color: #dc2626; }
.enhance-score-number.score-fair { color: #ea580c; }
.enhance-score-number.score-good { color: #ca8a04; }
.enhance-score-number.score-great { color: #10b981; }
.enhance-score-number.score-excellent { color: #15803d; text-shadow: 0 0 20px rgba(74, 222, 128, 0.4); }

/* --- Actions Card --- */
.enhance-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enhance-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--gray-200, #e5e7eb);
  background: var(--card-bg, #fff);
  color: var(--gray-700, #374151);
}

.enhance-action-btn:hover {
  border-color: var(--primary-300, #a5b4fc);
  background: rgba(99, 102, 241, 0.04);
  transform: translateY(-1px);
}

.enhance-action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.enhance-action-btn.primary {
  background: linear-gradient(135deg, var(--primary-500, #6366f1), var(--accent-500, #06b6d4));
  color: white;
  border: none;
  font-weight: 600;
}

.enhance-action-btn.primary:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

/* --- Cover Letter Card --- */
.enhance-cl-preview {
  font-size: 0.85rem;
  color: var(--gray-600, #4b5563);
  line-height: 1.65;
  max-height: 120px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.enhance-cl-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--card-bg, #fff));
}

.enhance-cl-preview.expanded {
  max-height: none;
}

.enhance-cl-preview.expanded::after {
  display: none;
}

.enhance-cl-toggle {
  font-size: 0.8rem;
  color: var(--primary-500, #6366f1);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.enhance-cl-toggle:hover {
  text-decoration: underline;
}

.enhance-cl-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* --- Loading Status Bar --- */
.enhance-loading-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(6, 182, 212, 0.03) 100%);
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 14px;
  margin-bottom: 20px;
}

.enhance-loading-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-500, #6366f1), var(--accent-500, #06b6d4));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.enhance-loading-avatar svg {
  width: 18px;
  height: 18px;
  color: white;
}

.enhance-loading-text {
  font-size: 0.85rem;
  color: var(--gray-600, #4b5563);
  transition: opacity 0.15s ease;
}

.enhance-loading-dots {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.enhance-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-400, #818cf8);
  animation: enhance-dot-pulse 1.4s ease-in-out infinite;
}

.enhance-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.enhance-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes enhance-dot-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* --- Skeleton Loading --- */
.enhance-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(99, 102, 241, 0.05) 25%,
    rgba(99, 102, 241, 0.1) 50%,
    rgba(99, 102, 241, 0.05) 75%);
  background-size: 200% 100%;
  animation: enhance-shimmer 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}

.enhance-skeleton-line:nth-child(2) { width: 85%; animation-delay: 0.1s; }
.enhance-skeleton-line:nth-child(3) { width: 70%; animation-delay: 0.2s; }
.enhance-skeleton-line:nth-child(4) { width: 90%; animation-delay: 0.15s; }
.enhance-skeleton-line:nth-child(5) { width: 60%; animation-delay: 0.25s; }
.enhance-skeleton-line:nth-child(6) { width: 80%; animation-delay: 0.3s; }

.enhance-skeleton-heading {
  height: 20px;
  width: 40%;
  border-radius: 6px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg,
    rgba(99, 102, 241, 0.06) 25%,
    rgba(99, 102, 241, 0.12) 50%,
    rgba(99, 102, 241, 0.06) 75%);
  background-size: 200% 100%;
  animation: enhance-shimmer 1.5s ease-in-out infinite;
}

.enhance-skeleton-score {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(90deg,
    rgba(16, 185, 129, 0.06) 25%,
    rgba(16, 185, 129, 0.12) 50%,
    rgba(16, 185, 129, 0.06) 75%);
  background-size: 200% 100%;
  animation: enhance-shimmer 1.5s ease-in-out infinite;
}

.enhance-skeleton-btn {
  height: 40px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: linear-gradient(90deg,
    rgba(99, 102, 241, 0.04) 25%,
    rgba(99, 102, 241, 0.08) 50%,
    rgba(99, 102, 241, 0.04) 75%);
  background-size: 200% 100%;
  animation: enhance-shimmer 1.5s ease-in-out infinite;
}

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

/* --- Resume Skeleton Placeholder --- */
.enhance-resume-skeleton {
  padding: 2.5rem 3rem;
  background: var(--card-bg, #fff);
  border-radius: 0 0 14px 14px;
  min-height: 420px;
}

/* --- Staggered Card Reveal --- */
.enhance-card-reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: enhance-card-in 0.45s ease-out forwards;
}

.enhance-card-reveal:nth-child(1) { animation-delay: 0s; }
.enhance-card-reveal:nth-child(2) { animation-delay: 0.1s; }
.enhance-card-reveal:nth-child(3) { animation-delay: 0.2s; }
.enhance-card-reveal:nth-child(4) { animation-delay: 0.3s; }

@keyframes enhance-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Resume content reveal after matrix */
.enhance-resume-reveal .rp-name,
.enhance-resume-reveal .rp-contact-line,
.enhance-resume-reveal .rp-section-title,
.enhance-resume-reveal .rp-summary,
.enhance-resume-reveal .rp-entry,
.enhance-resume-reveal .rp-skills,
.enhance-resume-reveal .rp-certifications {
  opacity: 0;
  animation: enhance-text-reveal 0.5s ease-out forwards;
}

.enhance-resume-reveal .rp-name { animation-delay: 0s; }
.enhance-resume-reveal .rp-contact-line { animation-delay: 0.05s; }
.enhance-resume-reveal .rp-section-title:nth-of-type(1) { animation-delay: 0.1s; }
.enhance-resume-reveal .rp-summary { animation-delay: 0.15s; }
.enhance-resume-reveal .rp-entry:nth-child(1) { animation-delay: 0.2s; }
.enhance-resume-reveal .rp-entry:nth-child(2) { animation-delay: 0.25s; }
.enhance-resume-reveal .rp-entry:nth-child(3) { animation-delay: 0.3s; }
.enhance-resume-reveal .rp-skills { animation-delay: 0.35s; }
.enhance-resume-reveal .rp-certifications { animation-delay: 0.4s; }

@keyframes enhance-text-reveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* Score counter glow */
.enhance-score-number.counting {
  animation: score-glow 0.1s ease infinite;
}

@keyframes score-glow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 12px rgba(99, 102, 241, 0.3); }
}

/* --- Enhance Another Section --- */
.enhance-restart-section {
  text-align: center;
  padding: 16px 0;
}

.enhance-restart-section .enhance-action-btn {
  display: inline-flex;
  width: auto;
  padding: 10px 24px;
  animation: enhance-heartbeat 2s ease-in-out infinite;
}

.enhance-restart-section .enhance-action-btn:hover {
  animation: none;
}

@keyframes enhance-heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.06); }
  28% { transform: scale(1); }
  42% { transform: scale(1.04); }
  56% { transform: scale(1); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .enhance-output-layout {
    grid-template-columns: 1fr;
  }

  .enhance-output-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .enhance-output-sidebar .enhance-card {
    flex: 1;
    min-width: 240px;
  }
}

@media (max-width: 640px) {
  .enhance-output-sidebar {
    flex-direction: column;
  }

  .enhance-output-sidebar .enhance-card {
    min-width: 0;
  }

  .enhance-card {
    padding: 16px;
  }

  .enhance-score-number {
    font-size: 2.5rem;
  }
}

/* --- Night Mode Overrides --- */
.app-layout[data-theme="night"] .enhance-card {
  background: var(--card-bg);
  border-color: var(--gray-200);
}

.app-layout[data-theme="night"] .enhance-loading-status {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(6, 182, 212, 0.04) 100%);
  border-color: rgba(99, 102, 241, 0.12);
}

.app-layout[data-theme="night"] .enhance-cl-preview::after {
  background: linear-gradient(transparent, var(--card-bg));
}

.app-layout[data-theme="night"] .enhance-action-btn {
  background: var(--card-bg);
  border-color: var(--gray-200);
  color: var(--gray-300);
}

.app-layout[data-theme="night"] .enhance-action-btn:hover {
  border-color: var(--primary-400);
  background: rgba(99, 102, 241, 0.08);
}

/* ============================================
   Builder — In-Card Import Loading
   ============================================ */

.builder-import-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
}

.builder-import-loading .resume-preview-paper {
  animation: none;
}

.builder-feedback-generating {
  margin-bottom: 1rem;
}

/* ============================================
   Mobile Optimization
   ============================================ */

/* --- Sidebar Mobile --- */

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    width: min(var(--sidebar-width), 85vw);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
  }

  .main-content {
    margin-left: 0;
    padding-top: var(--nav-height);
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-right {
    padding-right: 0;
  }

  .app-container {
    padding: 16px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-grid-3 {
    grid-template-columns: 1fr;
  }

  body.sidebar-active {
    overflow: hidden;
  }
}

/* --- Landing/Auth Page Mobile Nav --- */

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--nav-height));
    height: calc(100dvh - var(--nav-height));
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 2rem;
    gap: 0.125rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.mobile-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link-custom {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
    color: var(--gray-300);
  }

  .navbar-custom.dark .nav-link-custom.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-400);
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.08);
  }

  /* index.html sign-up button full-width */
  #nav-signup .btn-primary-custom {
    display: block;
    text-align: center;
    width: 100%;
  }

  body.mobile-nav-active {
    overflow: hidden;
  }

  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Phase 2: Global Layout & Typography Scaling --- */

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  body {
    overflow-x: hidden;
  }

  .page-title {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  }

  .page-subtitle {
    font-size: 0.825rem;
  }

  .app-container {
    padding: 1rem 0.875rem;
  }

  /* Prevent iOS zoom on input focus */
  .form-control,
  .form-select,
  textarea.form-control,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  select {
    font-size: 16px !important;
  }

  textarea.form-control {
    min-height: 90px;
  }

  .section-card {
    padding: 0.875rem;
    border-radius: 12px;
  }

  .section-card h5 {
    font-size: 0.85rem;
  }

  /* Page headers that use d-flex should stack on mobile */
  .page-header.d-flex {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .btn, .btn-primary, .btn-outline-primary, .btn-primary-custom, .btn-secondary-custom {
    padding: 0.5rem 0.875rem;
    font-size: 0.825rem;
  }

  .app-container {
    padding: 0.75rem 0.625rem;
  }
}

/* --- Phase 3: Builder Page --- */

@media (max-width: 768px) {
  .builder-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .builder-actions .btn,
  .builder-actions .topbar-btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }

  /* Tighten the page topbar title/subtitle so they always fit on mobile. */
  .topbar-left h1 {
    font-size: 17px;
    line-height: 1.2;
  }

  .topbar-left p {
    font-size: 12px;
    line-height: 1.3;
  }

  /* In-content builder action toolbar — sits at the top of #tab-builder on mobile,
     not in the topbar (see updateBuilderTopbarActions JS). All buttons keep labels. */
  #tab-builder > .builder-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
  }

  #tab-builder > .builder-actions .topbar-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: center;
    padding: 8px 10px;
    font-size: 11.5px;
    border-radius: 8px;
    white-space: nowrap;
    gap: 6px;
  }

  #tab-builder > .builder-actions .topbar-btn .btn-label {
    display: inline;
  }

  #tab-builder > .builder-actions .topbar-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  #tab-builder > .builder-actions .topbar-btn.primary {
    background: var(--primary-500, #6366f1);
    border-color: var(--primary-500, #6366f1);
    color: #fff;
  }

  #tab-builder > .builder-actions .topbar-btn.primary:hover {
    background: var(--primary-600, #4f46e5);
    border-color: var(--primary-600, #4f46e5);
  }

  .resume-preview-container {
    padding: 1rem 0.5rem 2rem;
  }

  .resume-preview-paper {
    padding: 1.75rem 1.25rem;
  }

  .feedback-box {
    padding: 0.875rem;
  }

  .feedback-content {
    font-size: 0.825rem;
  }

  .feedback-header {
    font-size: 0.825rem;
  }

  .rp-name {
    font-size: 1.35rem;
  }

  .rp-contact-line {
    font-size: 0.75rem;
  }

  .rp-bullets li,
  .rp-summary,
  .rp-skills,
  .rp-certifications {
    font-size: 0.82rem;
  }

  .rp-entry-title {
    font-size: 0.85rem;
  }

  .rp-entry-sub {
    font-size: 0.78rem;
  }

  /* Disable paper float animation on mobile for performance */
  .resume-preview-paper {
    animation: none;
  }
}

@media (max-width: 480px) {
  .builder-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
  }

  .builder-actions .btn,
  .builder-actions .topbar-btn {
    justify-content: center;
    white-space: normal;
    text-align: center;
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }

  .resume-preview-paper {
    padding: 1.25rem 0.875rem;
  }

  .rp-name {
    font-size: 1.1rem;
  }

  .rp-contact-line {
    font-size: 0.68rem;
  }

  .rp-section-title {
    font-size: 0.6rem;
  }

  .rp-bullets li,
  .rp-summary,
  .rp-skills,
  .rp-certifications {
    font-size: 0.75rem;
  }

  .rp-entry-title {
    font-size: 0.8rem;
  }

  .rp-entry-dates {
    font-size: 0.7rem;
  }

  .rp-entry-sub {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  #tab-builder > .builder-actions .topbar-btn {
    flex: 1 1 100%;
  }
}

/* --- Phase 4: Enhance Page --- */

@media (max-width: 480px) {
  .transform-track {
    transform: scale(0.6);
  }

  .no-resume-content {
    padding: 1.5rem 0.75rem;
  }

  .no-resume-icon {
    width: 56px;
    height: 56px;
  }

  .no-resume-content h3 {
    font-size: 1.15rem;
  }

  .no-resume-content p {
    font-size: 0.825rem;
  }
}

@media (max-width: 360px) {
  .transform-track {
    transform: scale(0.45);
  }

  .jd-mode-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }
}

/* --- Phase 5: Dashboard Tables --- */

/*
 * Dashboard table columns (by position):
 * 1: expand  2: Job Title  3: Company  4: Status
 * 5: Date    6: Resume     7: Match    8: Actions
 *
 * Strategy: horizontal scroll + progressive column hiding via nth-child
 */
@media (max-width: 768px) {
  .section-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 0;
  }

  .table thead th {
    padding: 0.5rem 0.375rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .table tbody td {
    padding: 0.5rem 0.375rem;
    font-size: 0.8rem;
  }

  .status-select {
    font-size: 0.7rem;
    padding: 0.2rem 0.375rem;
    min-width: 90px;
  }

  .notes-container {
    padding: 0.75rem 0.5rem;
  }

  .notes-textarea {
    min-height: 60px;
    font-size: 0.8rem;
  }

  .match-score {
    font-size: 0.7rem;
    min-width: 32px;
    padding: 0.15rem 0.35rem;
  }

  /* Hide Date (col 5) and Match (col 7) on tablets */
  .table thead th:nth-child(5),
  .table tbody td:nth-child(5),
  .table thead th:nth-child(7),
  .table tbody td:nth-child(7) {
    display: none;
  }

  /* Smaller action buttons */
  .table .btn-sm {
    padding: 0.25rem 0.4rem;
  }

  .table .btn-sm svg {
    width: 12px;
    height: 12px;
  }

  /* Rejection modal options wrap */
  .rejection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
  }

  .rejection-option {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

@media (max-width: 480px) {
  /* Also hide Company (col 3) on small phones */
  .table thead th:nth-child(3),
  .table tbody td:nth-child(3) {
    display: none;
  }

  .table thead th {
    padding: 0.375rem 0.25rem;
    font-size: 0.65rem;
  }

  .table tbody td {
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
  }

  .status-select {
    font-size: 0.65rem;
    padding: 0.15rem 0.25rem;
    min-width: 75px;
  }

  /* Expand cell minimal */
  .expand-cell {
    padding: 0.375rem 0.125rem !important;
  }
}

/* --- Phase 6: Home Page --- */

@media (max-width: 768px) {
  .home-greeting {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  }

  .home-subtitle {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .stat-card {
    padding: 0.75rem;
    gap: 0.625rem;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .workflow-card {
    padding: 1rem;
  }

  .workflow-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.625rem;
  }

  .workflow-icon svg {
    width: 18px;
    height: 18px;
  }

  .workflow-title {
    font-size: 0.95rem;
  }

  .workflow-description {
    font-size: 0.775rem;
  }

  .workflow-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .getting-started-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .getting-started-icon {
    width: 40px;
    height: 40px;
  }

  .getting-started-content h3 {
    font-size: 0.95rem;
  }

  .getting-started-content p {
    font-size: 0.8rem;
  }
}

/* --- Phase 7: Landing Page Polish --- */

@media (max-width: 768px) {
  .hero-section {
    padding-bottom: 3rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group .btn-primary-custom,
  .hero-cta-group .btn-secondary-custom {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .journey-track {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .hero-3d-container {
    height: 220px;
  }

  .resume-card-static {
    width: 220px;
    padding: 18px 16px;
  }

  .resume-card-name {
    font-size: 1rem;
  }

  .resume-card-role {
    font-size: 0.65rem;
  }

  .resume-card-contact {
    font-size: 0.55rem;
  }

  .resume-card-section-title {
    font-size: 0.5rem;
  }

  .resume-card-entry strong {
    font-size: 0.6rem;
  }

  .resume-card-entry span {
    font-size: 0.5rem;
  }

  .resume-card-skill {
    font-size: 0.45rem;
    padding: 1px 6px;
  }

  .match-score {
    font-size: 0.55rem;
    padding: 3px 8px;
  }

  .hero-slogan {
    font-size: 0.75rem;
    padding: 0.375rem 1rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .journey-track {
    height: 100px;
    padding: 1.25rem 0.5rem;
    margin-top: 2rem !important;
  }

  .glow-orb-1 {
    width: 250px;
    height: 250px;
  }

  .glow-orb-2 {
    width: 180px;
    height: 180px;
  }

  .glow-orb-3 {
    width: 120px;
    height: 120px;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.875rem;
  }

  .section-subtitle {
    font-size: 0.875rem;
  }

  .cta-title {
    margin-bottom: 0.75rem;
  }

  .cta-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }

  /* Section padding reduction */
  .features-section,
  .cta-section {
    padding: 3rem 0;
  }

  .features-container {
    padding: 0 0.75rem;
  }

  .footer-container {
    padding: 0 0.75rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* --- Phase 8: Auth Pages --- */

@media (max-width: 768px) {
  .auth-field .form-control {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.25rem;
  }

  .auth-title {
    font-size: 1.2rem;
  }

  .auth-subtitle {
    font-size: 0.825rem;
    margin-bottom: 1.25rem;
  }

  .auth-page {
    padding: 0.75rem;
  }

  .auth-submit {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* --- Phase 9: Modals --- */

@media (max-width: 480px) {
  .success-modal,
  .rejection-modal {
    width: 95%;
    padding: 1.25rem 1rem;
    border-radius: 12px;
  }

  .success-modal h3,
  .rejection-modal h3 {
    font-size: 1.15rem;
  }

  .success-modal p,
  .rejection-modal p {
    font-size: 0.85rem;
  }

  .rejection-actions {
    flex-direction: column;
  }

  .rejection-actions .btn {
    width: 100%;
    min-width: unset;
  }

  .score-display {
    padding: 0.625rem;
  }

  .score-value {
    font-size: 1.35rem;
  }

  .success-actions .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.825rem;
  }

  .success-icon {
    width: 56px;
    height: 56px;
  }

  .success-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* --- Phase 10: Touch & Polish --- */

@media (max-width: 768px) {
  /* Minimum 44x44px touch targets */
  .sidebar-action {
    min-height: 44px;
  }

  .expand-cell {
    min-width: 36px;
    min-height: 44px;
  }

  /* Status toast: full-width on mobile */
  #status {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  #status .alert {
    width: 100%;
  }

  /* Spinner overlay scale */
  .stick-loader {
    transform: scale(0.75);
  }

  .spinner-text {
    font-size: 0.85rem;
  }

  /* Beta feedback widget repositioned */
  .beta-feedback-widget {
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .beta-feedback-trigger {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
  }

  .beta-feedback-panel {
    width: calc(100vw - 1.5rem);
    right: 0;
    left: auto;
  }
}

/* ============================================
   Night Mode - CSS Variable Overrides
   ============================================ */

.app-layout[data-theme="night"] {
  /* Neutrals — remap to dark palette */
  --gray-50: #1a1d27;
  --gray-100: #1e2130;
  --gray-200: #2d3148;
  --gray-300: #2d3148;
  --gray-400: #6b7094;
  --gray-500: #9196b0;
  --gray-600: #9196b0;
  --gray-700: #c8cad6;
  --gray-800: #e4e6f0;
  --gray-900: #e4e6f0;
  --gray-950: #0f1117;

  /* Remap new design text/card variables for dark bg */
  --text-primary: #e4e6f0;
  --text-secondary: #9196b0;
  --text-muted: #6b7094;
  --card-bg: #1e2130;
  --card-border: #2d3148;
  --content-bg: #0f1117;

  /* Primary — shift from blue to indigo */
  --primary-50: rgba(99, 102, 241, 0.08);
  --primary-100: rgba(99, 102, 241, 0.12);
  --primary-200: rgba(99, 102, 241, 0.2);
  --primary-300: rgba(99, 102, 241, 0.35);
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

  /* Shadows — darker for dark bg */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
  --shadow-glow-sm: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* ============================================
   Night Mode - Hardcoded White Overrides
   ============================================ */

/* --- Cards --- */
.app-layout[data-theme="night"] .section-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .notification-message {
  color: var(--gray-200, #e2e8f0);
}

.app-layout[data-theme="night"] .stat-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .workflow-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .workflow-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.app-layout[data-theme="night"] .recent-list {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .getting-started-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, #1e2130 100%);
  border-color: rgba(99, 102, 241, 0.15);
}

/* --- Icon containers --- */
.app-layout[data-theme="night"] .workflow-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.app-layout[data-theme="night"] .stat-icon-blue {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.app-layout[data-theme="night"] .stat-icon-green {
  background: rgba(22, 163, 106, 0.12);
}

.app-layout[data-theme="night"] .stat-icon-gray {
  background: #252838;
}

.app-layout[data-theme="night"] .getting-started-icon {
  background: #252838;
  color: #818cf8;
}

/* --- Forms --- */
.app-layout[data-theme="night"] .form-control {
  background: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.app-layout[data-theme="night"] .form-control::placeholder {
  color: #6b7094;
}

.app-layout[data-theme="night"] .form-select {
  background-color: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* --- Tables --- */
.app-layout[data-theme="night"] .table thead th {
  background: #1a1d27;
  color: #6b7094;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .table tbody td {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* --- Status select (dashboard) --- */
.app-layout[data-theme="night"] .status-select {
  background: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

/* --- Notes container (dashboard expand) --- */
.app-layout[data-theme="night"] .notes-container {
  background: #1a1d27;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .notes-textarea {
  background: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

/* --- Grid pattern overlay --- */
.app-layout[data-theme="night"] .main-content::before {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
}

/* --- Feedback widget --- */
.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-panel {
  background: #1e2130;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-textarea {
  background: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-textarea::placeholder {
  color: #6b7094;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-type-btn {
  background: #252838;
  border-color: #2d3148;
  color: #9196b0;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-type-btn:hover {
  border-color: #3d4260;
  background: #2d3148;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-type-btn.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-panel-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-panel-close {
  background: #252838;
  color: #9196b0;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-panel-close:hover {
  background: #2d3148;
  color: #c8cad6;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-context {
  background: #252838;
  color: #6b7094;
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-submit {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-submit:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.app-layout[data-theme="night"] ~ .beta-feedback-widget .beta-feedback-trigger {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* --- Modals (siblings of .app-layout) --- */
.app-layout[data-theme="night"] ~ .success-modal-overlay .success-modal {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] ~ .success-modal-overlay .success-modal h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] ~ .success-modal-overlay .success-close {
  background: #252838;
  color: #6b7094;
}

.app-layout[data-theme="night"] ~ .success-modal-overlay .success-close:hover {
  background: #2d3148;
  color: #c8cad6;
}

.app-layout[data-theme="night"] ~ .success-modal-overlay .success-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.15) 100%);
}

.app-layout[data-theme="night"] ~ .success-modal-overlay .score-display {
  background: #1a1d27;
}

/* Delete account modal */
.app-layout[data-theme="night"] ~ #delete-modal .success-modal {
  background: #1e2130;
}

.app-layout[data-theme="night"] ~ #delete-modal .success-modal h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] ~ #delete-modal .success-close {
  background: #252838;
  color: #6b7094;
}

/* Inactivity timeout modal */
.app-layout[data-theme="night"] ~ #inactivity-modal .success-modal {
  background: #1e2130;
}

.app-layout[data-theme="night"] ~ #inactivity-modal .success-modal h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] ~ #inactivity-modal .success-modal p {
  color: #6b7094;
}

/* Rejection modal */
.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-modal {
  background: #1e2130;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-modal h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-close {
  background: #252838;
  color: #6b7094;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-close:hover {
  background: #2d3148;
  color: #c8cad6;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-icon {
  background: linear-gradient(135deg, #252838 0%, #2d3148 100%);
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-option {
  background: #252838;
  border-color: #2d3148;
  color: #9196b0;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-option:hover {
  background: #2d3148;
  border-color: #3d4260;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-option.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  color: #818cf8;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .rejection-modal textarea {
  background: #252838;
  color: #e4e6f0;
  border-color: #2d3148;
}

/* Review modal night theme */
.app-layout[data-theme="night"] ~ .rejection-modal-overlay .review-email-context {
  background: #252838;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] ~ .rejection-modal-overlay .review-matched-app-card {
  background: #252838;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .pending-review-banner {
  border-left-color: #fbbf24;
}

/* --- JD mode toggle (Enhance page) --- */
.app-layout[data-theme="night"] .jd-mode-toggle {
  background: #252838;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .jd-mode-btn {
  color: #9196b0;
}

.app-layout[data-theme="night"] .jd-mode-btn:hover {
  color: #c8cad6;
  background: #2d3148;
}

.app-layout[data-theme="night"] .jd-mode-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.app-layout[data-theme="night"] .manual-entry-hint {
  background: #252838;
  color: #9196b0;
  border-left-color: #6366f1;
}

.app-layout[data-theme="night"] .manual-entry-hint.hint-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
  color: #fbbf24;
}

.app-layout[data-theme="night"] .manual-entry-hint.hint-error {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.app-layout[data-theme="night"] .manual-entry-hint.hint-info {
  background: rgba(99, 102, 241, 0.1);
  border-left-color: #6366f1;
  color: #a5b4fc;
}

.app-layout[data-theme="night"] .manual-entry-link {
  color: #818cf8;
}

.app-layout[data-theme="night"] .manual-entry-link:hover {
  color: #a5b4fc;
}

.app-layout[data-theme="night"] .form-control.field-needs-attention {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* --- Buttons (outline) --- */
.app-layout[data-theme="night"] .btn-outline-primary {
  border-color: #6366f1;
  color: #818cf8;
}

.app-layout[data-theme="night"] .btn-outline-primary:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* --- Recent item hover --- */
.app-layout[data-theme="night"] .recent-item {
  border-bottom-color: #2d3148;
}

.app-layout[data-theme="night"] .recent-item:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* --- Resume preview — keep day-mode appearance --- */
.app-layout[data-theme="night"] .resume-preview-paper {
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #a1b1c7;
  --gray-500: #7a8ba0;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  background: white;
}

/* =============================================
   JAM Dash — OjamaDash & Notification Styles
   ============================================= */

/* --- Beta Tag --- */
.beta-tag {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-400, #67e8f9), var(--secondary-accent, #a78bfa));
  color: var(--gray-900, #0f172a);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.35rem;
  line-height: 1;
}

/* Beta tag in page title */
.page-title .beta-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
}

/* --- Email Connection Card --- */
.email-connect-prompt {
  text-align: center;
  padding: 2rem 1rem;
}

.email-connect-prompt svg {
  margin-bottom: 1rem;
}

.email-connect-prompt h5 {
  margin-bottom: 0.5rem;
  color: var(--gray-900, #0f172a);
}

.email-connect-prompt .text-muted {
  color: var(--gray-500, #7a8ba0) !important;
}

.email-connected-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.email-connected-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-800, #1e293b);
  font-size: 0.9rem;
}

.email-connected-info .text-muted {
  color: var(--gray-500, #7a8ba0) !important;
}

.email-connected-actions {
  display: flex;
  gap: 0.5rem;
}

/* --- Scan Status --- */
.scan-status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.scan-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-600, #475569);
  border-top-color: var(--primary-400, #60a5fa);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#scan-status-text {
  color: var(--gray-300, #cbd5e1);
  font-size: 0.9rem;
}

/* --- Scan Results --- */
.scan-results-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
  color: var(--gray-300, #cbd5e1);
  font-size: 0.9rem;
}

/* --- Updates Panel (Notifications on OjamaDash page) --- */
.updates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: background 0.15s;
}

.notification-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notification-card.unread {
  background: rgba(96, 165, 250, 0.06);
  border-left: 3px solid var(--primary-400, #60a5fa);
}

.notification-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-message {
  color: var(--gray-700, #334155);
  font-size: 0.875rem;
  line-height: 1.4;
}

.notification-time {
  color: var(--gray-500, #64748b);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.notification-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--gray-500, #64748b);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
}

.notification-card:hover .notification-dismiss {
  opacity: 1;
}

.notification-dismiss:hover {
  color: var(--gray-300, #cbd5e1);
}

/* --- No Resume Badge --- */
.badge-no-resume {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--gray-400, #94a3b8);
  background: rgba(148, 163, 184, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* --- Error Toast --- */
.error-toast {
  background: rgba(239, 68, 68, 0.9) !important;
}

/* --- Notification Bell (Top-right) --- */
.notification-bell-container {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 999;
}

.notification-bell-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-400, #94a3b8);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.notification-bell-btn:hover {
  color: var(--gray-200, #e2e8f0);
  background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* --- Notification Panel (Dropdown) --- */
.notification-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  max-height: 360px;
  background: var(--gray-800, #1e293b);
  border: 1px solid var(--gray-700, #334155);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 100;
  overflow: hidden;
  margin-top: 8px;
}

.notification-panel.open {
  display: block;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-700, #334155);
  color: var(--gray-200, #e2e8f0);
  font-weight: 600;
  font-size: 0.85rem;
}

.notification-panel-clear {
  background: none;
  border: none;
  color: var(--primary-400, #60a5fa);
  font-size: 0.75rem;
  cursor: pointer;
}

.notification-panel-clear:hover {
  text-decoration: underline;
}

.notification-panel-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.notification-panel-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500, #64748b);
  font-size: 0.85rem;
}

.notification-panel-item {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
}

.notification-panel-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notification-panel-item.unread {
  background: rgba(96, 165, 250, 0.06);
}

.notification-panel-item-msg {
  color: var(--gray-300, #cbd5e1);
  font-size: 0.8rem;
  line-height: 1.4;
}

.notification-panel-item-time {
  color: var(--gray-500, #64748b);
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

/* --- Inline editable fields (OjamaDash) --- */
.editable-field {
  cursor: pointer;
  border-bottom: 1px dashed var(--gray-500);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.editable-field:hover {
  border-bottom-color: var(--primary-400);
}
.inline-edit-input {
  background: var(--gray-800);
  color: var(--gray-100);
  border: 1px solid var(--primary-500);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: inherit;
  font-family: inherit;
  width: 100%;
  outline: none;
}
.inline-edit-input:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* --- Mobile responsive for OjamaDash --- */
@media (max-width: 768px) {
  .email-connected-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-bell-container {
    top: calc((var(--nav-height) - 36px) / 2);
    right: 1rem;
  }

  .notification-bell-btn {
    width: 36px;
    height: 36px;
  }

  .notification-panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }
}

/* OjamaDash Loading State */
.ojamadash-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  gap: 1rem;
}

.ojamadash-loading-state p {
  color: var(--gray-400);
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================
   Profile Info Page
   ============================================ */

/* Sidebar Profile Info Link */
.sidebar-profile-info-link {
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
}

.sidebar-profile-info-link a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  color: var(--gray-400);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}

.sidebar-profile-info-link a:hover {
  color: var(--gray-200);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-profile-info-link a.active {
  color: white;
  background: rgba(59, 130, 246, 0.15);
}

/* Privacy Banner */
.profile-info-privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #10b981;
}

.profile-info-privacy-banner strong {
  display: block;
  color: #10b981;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.profile-info-privacy-banner p {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* 4-Card Grid Layout */
.profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.profile-section-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-section-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-section-card.editing {
  grid-column: 1 / -1;
}

.profile-cards-grid:has(.editing) .profile-section-card:not(.editing) {
  display: none;
}

/* Card Header */
.psc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.psc-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.psc-icon {
  color: var(--primary-500);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.psc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
  margin: 0;
}

/* Status Badge */
.psc-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.625rem;
  border-radius: 12px;
  flex-shrink: 0;
}

.psc-status-filled {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.psc-status-empty {
  background: var(--gray-100);
  color: var(--gray-400);
}

/* Card Summary (view mode) */
.psc-summary {
  margin-bottom: 1rem;
}

.psc-summary-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem 0;
  align-items: baseline;
}

.psc-summary-label {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 0.8rem;
  min-width: 90px;
  flex-shrink: 0;
}

.psc-summary-value {
  color: var(--gray-700);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Tags (used in both cards and old preview) */
.profile-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.profile-preview-tag {
  background: var(--primary-50);
  color: var(--primary-600);
  padding: 0.125rem 0.625rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Empty State */
.psc-empty-desc {
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Card Actions */
.psc-actions {
  display: flex;
  justify-content: flex-start;
}

/* Edit Body */
.psc-edit-body {
  margin-bottom: 1rem;
}

.psc-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.checkbox-grid label:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
}

.checkbox-grid input[type="checkbox"] {
  accent-color: var(--primary-500);
}

.checkbox-grid input[type="checkbox"]:checked + span {
  color: var(--primary-600);
  font-weight: 500;
}

/* Toggle Labels */
.profile-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.25rem 0;
}

/* Field Helper Text */
.field-helper {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 0.375rem;
  margin-top: -0.125rem;
  line-height: 1.4;
}

/* Profile Info Prompt (builder/home) */
.profile-info-prompt {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
  border: 1px solid var(--primary-100);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.profile-info-prompt-icon {
  color: var(--primary-500);
  flex-shrink: 0;
}

.profile-info-prompt-content {
  flex: 1;
}

.profile-info-prompt-content strong {
  display: block;
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.profile-info-prompt-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.profile-info-prompt-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
}

.profile-info-prompt-dismiss:hover {
  color: var(--gray-600);
}

/* ============================================
   Profile Info Night Mode
   ============================================ */

.app-layout[data-theme="night"] .profile-info-privacy-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.15);
}

.app-layout[data-theme="night"] .profile-info-privacy-banner p {
  color: #9196b0;
}

.app-layout[data-theme="night"] .profile-section-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .profile-section-card:hover {
  border-color: #3d4260;
}

.app-layout[data-theme="night"] .psc-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .psc-status-empty {
  background: #2d3148;
  color: #6b7094;
}

.app-layout[data-theme="night"] .psc-summary-label {
  color: #6b7094;
}

.app-layout[data-theme="night"] .psc-summary-value {
  color: #c8cce0;
}

.app-layout[data-theme="night"] .psc-empty-desc {
  color: #6b7094;
}

.app-layout[data-theme="night"] .profile-preview-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-400);
}

.app-layout[data-theme="night"] .psc-edit-actions {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .checkbox-grid label {
  border-color: #2d3148;
  color: #9196b0;
}

.app-layout[data-theme="night"] .checkbox-grid label:hover {
  border-color: var(--primary-500);
  background: rgba(59, 130, 246, 0.1);
}

.app-layout[data-theme="night"] .field-helper {
  color: #6b7094;
}

.app-layout[data-theme="night"] .profile-toggle-label {
  color: #9196b0;
}

.app-layout[data-theme="night"] .profile-info-prompt {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, #1e2130 100%);
  border-color: rgba(59, 130, 246, 0.15);
}

.app-layout[data-theme="night"] .profile-info-prompt-content strong {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .profile-info-prompt-content p {
  color: #9196b0;
}

/* Profile Info Responsive */
@media (max-width: 768px) {
  .profile-cards-grid {
    grid-template-columns: 1fr;
  }
  .psc-summary-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  .psc-summary-label {
    min-width: auto;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .profile-info-prompt {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .profile-info-prompt .btn {
    width: 100%;
  }
}

/* ============================================
   Cover Letter Toggle (Enhance Page)
   ============================================ */

.cover-letter-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

/* Modern pill switch */
.cl-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cl-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cl-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.cl-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cl-switch input:checked + .cl-switch-slider {
  background: var(--primary-500);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.cl-switch input:checked + .cl-switch-slider::before {
  transform: translateX(18px);
}

.cl-switch input:focus-visible + .cl-switch-slider {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}

.cl-switch-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  user-select: none;
}

/* Gate message banner */
.cl-gate-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.03) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  color: #b45309;
  animation: clGateSlideIn 0.25s ease;
}

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

.cl-gate-message strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  color: #92400e;
}

.cl-gate-message p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gray-600);
}

.cl-gate-message a {
  color: var(--primary-500);
  font-weight: 600;
  text-decoration: none;
}

.cl-gate-message a:hover {
  text-decoration: underline;
}

/* Night mode */
.app-layout[data-theme="night"] .cl-switch-slider {
  background: #3d4260;
}

.app-layout[data-theme="night"] .cl-switch input:checked + .cl-switch-slider {
  background: var(--primary-500);
}

.app-layout[data-theme="night"] .cl-switch-slider::before {
  background: #e4e6f0;
}

.app-layout[data-theme="night"] .cl-switch-text {
  color: #c8cce0;
}

.app-layout[data-theme="night"] .cl-gate-message {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(234, 179, 8, 0.04) 100%);
  border-color: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

.app-layout[data-theme="night"] .cl-gate-message strong {
  color: #fbbf24;
}

.app-layout[data-theme="night"] .cl-gate-message p {
  color: #9196b0;
}

/* ===== Job Insights Night Mode ===== */

.app-layout[data-theme="night"] .insights-locked-card {
  background: #1e2130;
  border-color: #3d4260;
}

.app-layout[data-theme="night"] .insights-locked-icon {
  background: rgba(99,102,241,0.15);
}

.app-layout[data-theme="night"] .insights-locked-card h3,
.app-layout[data-theme="night"] .insights-empty-state h3,
.app-layout[data-theme="night"] .insights-generating-card h3,
.app-layout[data-theme="night"] .insights-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .insight-card {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .insight-card:hover {
  border-color: var(--primary-500, #6366f1);
  box-shadow: 0 4px 16px rgba(99,102,241,0.15);
}

.app-layout[data-theme="night"] .ic-company {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .ic-tag {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
}

.app-layout[data-theme="night"] .insights-stale-banner {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.2);
}

.app-layout[data-theme="night"] .skeleton-line {
  background: linear-gradient(90deg, #2d3148 25%, #363b54 50%, #2d3148 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.app-layout[data-theme="night"] .insights-toast {
  background: #363b54;
}

/* ============================================
   Night Mode - New Design Components
   ============================================ */

.app-layout[data-theme="night"] .topbar {
  background: #1a1d27;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .topbar-left h1 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .topbar-btn {
  background: #252838;
  border-color: #2d3148;
  color: #c8cad6;
}

.app-layout[data-theme="night"] .topbar-btn:hover {
  background: #2d3148;
}

.app-layout[data-theme="night"] .topbar-btn.primary {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.app-layout[data-theme="night"] .content-area {
  background: #0f1117;
}

.app-layout[data-theme="night"] .stat-card-new {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .stat-card-new .stat-value {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .card-new {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .card-new-header {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .card-new-header h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .workflow-card-new {
  background: #1e2130;
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .workflow-card-new:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.app-layout[data-theme="night"] .workflow-card-new h4 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .activity-item {
  border-color: #2d3148;
}

.app-layout[data-theme="night"] .activity-title {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .tab-bar {
  background: #252838;
}

.app-layout[data-theme="night"] .tab-btn {
  color: #9196b0;
}

.app-layout[data-theme="night"] .tab-btn.active {
  background: #1e2130;
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .coming-soon-placeholder h3 {
  color: #e4e6f0;
}

.app-layout[data-theme="night"] .progress-bar-new {
  background: #2d3148;
}

.app-layout[data-theme="night"] .coming-soon-placeholder .cs-icon {
  background: rgba(99,102,241,0.15);
}

.app-layout[data-theme="night"] .profile-info-privacy-banner {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.app-layout[data-theme="night"] .profile-info-privacy-banner strong {
  color: #6ee7b7;
}

/* Builder action buttons in topbar context */
.builder-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Night mode: notification panel text */
.app-layout[data-theme="night"] .notification-panel-item-msg {
  color: #c8cad6;
}

/* Night mode: notification bell crystal look */
.app-layout[data-theme="night"] .notification-bell-btn {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.app-layout[data-theme="night"] .notification-bell-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Ensure sidebar nav sections scroll */
.sidebar::-webkit-scrollbar { width: 0; }
.sidebar-nav-sections::-webkit-scrollbar { width: 0; }


/* ============================================
   Settings Page
   ============================================ */

.settings-layout {
  display: flex;
  gap: 28px;
  max-width: 960px;
}

/* Settings nav sidebar */
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.settings-nav-item:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: var(--card-bg);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.settings-nav-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.settings-nav-danger {
  color: var(--danger);
}

.settings-nav-danger:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.settings-nav-danger.active {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
}

.settings-nav-divider {
  height: 1px;
  background: var(--card-border);
  margin: 8px 14px;
}

/* Settings content panels */
.settings-content {
  flex: 1;
  min-width: 0;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

/* Settings cards */
.s-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 24px;
  margin-bottom: 16px;
}

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

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

/* Edit button */
.s-edit-btn {
  font-size: 13px;
  color: var(--primary-500);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
}

.s-edit-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
}

.s-edit-btn-save {
  background: var(--primary-500);
  color: #fff;
  border-color: var(--primary-500);
}

.s-edit-btn-save:hover {
  background: var(--primary-600);
}

/* Profile hero section */
.s-profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

.s-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-500), var(--violet-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.s-profile-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.s-profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Form rows */
.s-form-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.s-form-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.s-form-row:first-child {
  padding-top: 0;
}

.s-form-label {
  width: 160px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.s-form-value {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.s-form-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.s-form-action {
  flex-shrink: 0;
  margin-left: 12px;
}

.s-text-muted {
  color: var(--text-muted) !important;
}

/* Input fields */
.s-input-field {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: border-color 0.15s;
}

.s-input-field:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.s-select {
  width: auto;
  padding: 8px 12px;
  cursor: pointer;
}

/* Buttons */
.s-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.s-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.s-btn-primary {
  background: var(--primary-500);
  color: #fff;
  border-color: var(--primary-500);
}

.s-btn-primary:hover {
  background: var(--primary-600);
}

.s-btn-danger {
  color: var(--danger);
  border-color: var(--danger-light);
}

.s-btn-danger:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: var(--danger);
}

.s-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badge */
.s-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.s-badge-muted {
  background: var(--gray-100);
  color: var(--text-muted);
}

/* Toggle switch */
.s-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.s-toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.s-toggle-row:first-child {
  padding-top: 0;
}

.s-toggle-info {
  flex: 1;
  min-width: 0;
}

.s-toggle-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.s-toggle-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.s-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--gray-300);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
  border: none;
  padding: 0;
}

.s-toggle.on {
  background: var(--primary-500);
}

.s-toggle::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.s-toggle.on::after {
  transform: translateX(20px);
}

/* Plan card */
.s-plan-card {
  background: linear-gradient(135deg, #1a1a2e, #312e81);
  border-radius: 14px;
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.s-plan-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
}

.s-plan-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.s-plan-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.s-plan-price {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* Usage meters */
.s-usage-meter {
  margin-bottom: 20px;
}

.s-usage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.s-usage-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.s-usage-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.s-usage-count strong {
  color: var(--text-primary);
}

.s-usage-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.s-usage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
  background: var(--gray-300);
}

.s-usage-green {
  background: var(--success);
}

.s-usage-amber {
  background: var(--warning);
}

.s-usage-red {
  background: var(--danger);
}

.s-usage-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Coming soon box */
.s-coming-soon-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 10px;
  color: var(--text-secondary);
}

.s-coming-soon-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Connected account rows */
.s-connected-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.s-connected-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s-connected-gmail {
  background: #fef2f2;
  color: #dc2626;
}

.s-connected-linkedin {
  background: #eff6ff;
  color: #2563eb;
}

.s-connected-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.s-connected-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.s-connected-status {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.s-status-active {
  background: #ecfdf5;
  color: #059669;
}

.s-status-inactive {
  background: var(--gray-100);
  color: var(--text-secondary);
}

.s-status-soon {
  background: var(--primary-50);
  color: var(--primary-500);
}

/* Theme selector */
.s-theme-options {
  display: flex;
  gap: 12px;
}

.s-theme-option {
  flex: 1;
  padding: 16px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  background: var(--card-bg);
  transition: all 0.15s;
  font-family: inherit;
}

.s-theme-option:hover {
  border-color: var(--gray-300);
}

.s-theme-option.active {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.s-theme-icon {
  margin-bottom: 6px;
}

.s-theme-icon svg {
  width: 24px;
  height: 24px;
}

.s-theme-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Danger zone */
.s-danger-zone {
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 24px;
  background: var(--card-bg);
}

.s-danger-zone h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.s-danger-zone > p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.s-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #fee2e2;
}

.s-danger-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.s-danger-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Toast notification */
.s-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
  pointer-events: none;
  z-index: 9999;
}

.s-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Night mode overrides for settings */
.app-layout[data-theme="night"] .s-connected-gmail {
  background: rgba(239, 68, 68, 0.1);
}

.app-layout[data-theme="night"] .s-connected-linkedin {
  background: rgba(37, 99, 235, 0.1);
}

.app-layout[data-theme="night"] .s-status-active {
  background: rgba(5, 150, 105, 0.12);
}

.app-layout[data-theme="night"] .s-danger-zone {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}

.app-layout[data-theme="night"] .s-danger-row {
  border-color: rgba(239, 68, 68, 0.15);
}

.app-layout[data-theme="night"] .s-toast {
  background: #e4e6f0;
  color: #0f1117;
}

/* Settings mobile responsive */
@media (max-width: 768px) {
  .settings-layout {
    flex-direction: column;
    gap: 0;
  }

  .settings-nav {
    width: 100%;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
    -webkit-overflow-scrolling: touch;
  }

  .settings-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .settings-nav-divider {
    display: none;
  }

  .s-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .s-form-label {
    width: 100%;
  }

  .s-form-action {
    margin-left: 0;
    margin-top: 6px;
  }

  .s-connected-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .s-danger-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .s-theme-options {
    flex-direction: column;
  }
}
