/* ==========================================================================
   SkillScan.AI — Core Design System & Tokens
   ========================================================================== */

:root {
  /* Color Palette - Deep Obsidian Dark Theme */
  --bg-main: #090d16;
  --bg-surface: rgba(18, 24, 40, 0.75);
  --bg-surface-hover: rgba(26, 35, 58, 0.85);
  --bg-card: rgba(22, 29, 49, 0.65);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-glow: rgba(99, 102, 241, 0.35);

  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-on-accent: #ffffff;

  /* Accent & Gradients */
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #a855f7; /* Purple */
  --accent-cyan: #06b6d4; /* Cyan */
  --accent-emerald: #10b981; /* Emerald */
  --accent-amber: #f59e0b; /* Amber */
  --accent-rose: #f43f5e; /* Rose */

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(9, 13, 22, 0) 70%);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Effects */
  --glass-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 12px 36px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--bg-card-border);
  --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.3);
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.background-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
}

.orb-1 {
  top: -10%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #4f46e5 0%, #7c3aed 60%, transparent 70%);
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-2 {
  top: 40%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06b6d4 0%, #3b82f6 60%, transparent 70%);
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: -15%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #10b981 0%, #059669 60%, transparent 70%);
  opacity: 0.2;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(80px) scale(1.1); }
}

@keyframes floatOrb2 {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-70px) scale(1.08); }
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

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

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

.text-emerald { color: var(--accent-emerald) !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-purple { color: var(--accent-secondary) !important; }
.text-highlight { color: #38bdf8; font-weight: 600; }

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

.hidden {
  display: none !important;
}

.view-container {
  animation: fadeIn 0.35s ease-out;
}

/* ==========================================================================
   Header Component
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--bg-card-border);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-status-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
}

.status-dot.active {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.status-dot.pulsing {
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.btn-icon {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Main Layout & Hero
   ========================================================================== */

.app-main {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.hero-section {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.95rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.1rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   VIEW 1: Featured Job Cards Grid
   ========================================================================== */

.job-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.job-card {
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.job-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.2);
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.job-role-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  box-shadow: var(--shadow-sm);
}

.job-role-icon.large {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  flex-shrink: 0;
}

.data-icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.25) 100%);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.web-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.job-tags-row {
  display: flex;
  gap: 0.45rem;
}

.job-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
}

.bias-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.job-card-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: #fff;
}

.job-card-tagline {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.job-key-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.skill-mini-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.22rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  color: #cbd5e1;
  border-radius: var(--radius-sm);
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--bg-card-border);
  padding-top: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.job-meta-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-job-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.job-card:hover .btn-job-action {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   VIEW 2: Job Details & Split Match View
   ========================================================================== */

.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-back.secondary {
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.role-pill-crumb {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.job-detail-banner {
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.job-detail-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.job-badges-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.detail-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.job-detail-meta-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

.meta-row {
  margin-bottom: 0.35rem;
}
.meta-row:last-child {
  margin-bottom: 0;
}
.meta-row strong {
  color: var(--text-muted);
  margin-right: 0.4rem;
}

/* Split Layout */
.job-match-split-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.specs-card {
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}

.specs-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.specs-heading:first-child {
  margin-top: 0;
}

.specs-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.specs-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.specs-list li::before {
  content: '•';
  color: var(--accent-primary);
  font-weight: bold;
  font-size: 1.2rem;
  position: absolute;
  left: 0.2rem;
  top: -0.1rem;
}

.skills-pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skills-pill-cloud.required span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  border-radius: var(--radius-sm);
}

.skills-pill-cloud.preferred span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

/* Upload Card in Right Col */
.upload-card-header {
  padding: 1.5rem 1.75rem 0.75rem;
}

.pdf-only-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  color: #fca5a5;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.pdf-badge {
  background: var(--accent-rose);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

.pdf-tag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.pdf-feature-chip {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.file-type-icon.pdf-icon {
  background: #ef4444;
}

.specs-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.card-header-tabs {
  display: flex;
  border-bottom: 1px solid var(--bg-card-border);
  background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 2px solid var(--accent-primary);
}

.drop-zone.compact {
  padding: 2.25rem 1.5rem;
  margin: 1.25rem;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.015);
}

.drop-zone.compact:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

.upload-icon-bubble.compact {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  margin-bottom: 0.85rem;
}

.file-input-hidden {
  display: none;
}

.file-selected-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
}

.file-info-col {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-type-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.file-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

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

.file-size {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-ghost-danger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
}

.btn-ghost-danger:hover {
  color: var(--accent-rose);
}

.text-input-container {
  padding: 1.25rem;
}

.text-input-container textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.text-input-container textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.compact-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-top: 1px solid var(--bg-card-border);
  background: rgba(0, 0, 0, 0.15);
}

.btn-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-sample:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  transition: var(--transition-smooth);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   Pipeline Stepper
   ========================================================================== */

.pipeline-section {
  max-width: 820px;
  margin: 2.5rem auto;
}

.pipeline-card {
  padding: 2.2rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.pipeline-title {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.pipeline-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  position: relative;
  transition: var(--transition-smooth);
}

.step-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-secondary);
}

.step-content p {
  font-size: 0.73rem;
  color: var(--text-muted);
  max-width: 135px;
  line-height: 1.35;
}

.step-connector {
  flex: 0.8;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.step-item.active .step-marker {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.step-item.active .step-spinner {
  position: absolute;
  inset: -4px;
  border: 2px solid transparent;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.step-item.active .step-content h4 {
  color: #fff;
}

.step-item.done .step-marker {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
  color: #fff;
}

.step-item.done .step-marker::after {
  content: '✓';
  font-size: 1rem;
}

.step-item.done .step-num {
  display: none;
}

.step-connector.done {
  background: var(--accent-emerald);
}

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

/* ==========================================================================
   VIEW 3: Role Match Results Dashboard
   ========================================================================== */

.results-header-card {
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  margin-bottom: 1.75rem;
}

.match-score-hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* Radial Gauge */
.radial-gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radial-gauge-wrap {
  position: relative;
  width: 150px;
  height: 150px;
}

.radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 11;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.5s ease;
}

.radial-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-percent-num {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.gauge-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

.match-badge-wrap {
  margin-top: 1rem;
}

.match-level-badge {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.level-strong {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.level-good {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
}

.level-moderate {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.level-low {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

/* Candidate & Role Fit Info */
.candidate-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.candidate-name-row h2 {
  font-size: 1.8rem;
  font-weight: 800;
}

.seniority-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.redaction-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.candidate-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.redaction-audit-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #a7f3d0;
}

.audit-icon {
  font-size: 1.2rem;
}

/* Sub-metrics Progress Bars */
.sub-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sub-metric-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.sub-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sub-metric-name {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sub-metric-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.sub-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sub-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

/* Skills Breakdown Grid */
.match-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.dashboard-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card-inner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.icon-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-icon {
  font-size: 1.15rem;
  font-weight: bold;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.tag-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.tag-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.tag-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.tag-purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.skills-match-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.match-skill-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.match-skill-card.matched {
  border-left: 3px solid var(--accent-emerald);
}

.match-skill-card.missing {
  border-left: 3px solid var(--accent-rose);
}

.match-skill-card.bonus {
  border-left: 3px solid var(--accent-secondary);
}

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

.skill-chip-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.skill-status-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
}

.skill-chip-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Recommendation Card */
.recommendation-card {
  padding: 2rem;
}

.rec-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.rec-header .header-icon {
  font-size: 1.8rem;
}

.export-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bg-card-border);
}

/* ==========================================================================
   Modal Component
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  max-width: 500px;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.25rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
}

.form-input, .form-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-select option {
  background: #111827;
  color: #fff;
}

.input-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.input-tip a {
  color: #818cf8;
  text-decoration: underline;
}

.feedback-msg {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-top: 1rem;
}

.feedback-msg.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.feedback-msg.error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-card-border);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  padding: 0.85rem 1.35rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s ease-out;
}

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

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

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

@media (max-width: 992px) {
  .job-cards-grid {
    grid-template-columns: 1fr;
  }
  .job-match-split-layout {
    grid-template-columns: 1fr;
  }
  .match-breakdown-grid {
    grid-template-columns: 1fr;
  }
  .match-score-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .candidate-name-row {
    justify-content: center;
  }
  .sub-metrics-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .stepper {
    flex-direction: column;
    gap: 1rem;
  }
  .step-connector {
    display: none;
  }
}
