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

/* ==========================================================================
   EXECUTIVE ENTERPRISE SAAS DESIGN SYSTEM
   Professional, High-Trust, Clean Palette (Stripe / Linear / Vercel Grade)
   ========================================================================== */
:root {
  /* Core Brand Colors */
  --primary: #0f172a;               /* Slate-900 Deep Charcoal/Navy */
  --primary-hover: #1e293b;         /* Slate-800 */
  --primary-subtle: #f8fafc;        /* Slate-50 */
  --primary-border: #e2e8f0;        /* Slate-200 */

  /* Functional Accent Color (Tech Blue) */
  --accent: #2563eb;                /* Blue-600 */
  --accent-hover: #1d4ed8;          /* Blue-700 */
  --accent-light: #eff6ff;          /* Blue-50 */
  --accent-border: #bfdbfe;         /* Blue-200 */
  --accent-text: #1e40af;           /* Blue-800 */

  /* Semantic Status Colors (Human-crafted, muted, executive) */
  --success: #059669;               /* Emerald-600 */
  --success-light: #f0fdf4;         /* Emerald-50 */
  --success-border: #bbf7d0;        /* Emerald-200 */
  --success-text: #166534;          /* Emerald-800 */

  --warning: #d97706;               /* Amber-600 */
  --warning-light: #fffbeb;         /* Amber-50 */
  --warning-border: #fde68a;        /* Amber-200 */
  --warning-text: #92400e;          /* Amber-800 */

  --danger: #dc2626;                /* Red-600 */
  --danger-light: #fef2f2;          /* Red-50 */
  --danger-border: #fecaca;         /* Red-200 */
  --danger-text: #991b1b;           /* Red-800 */

  --info: #0284c7;                  /* Sky-600 */
  --info-light: #f0f9ff;            /* Sky-50 */
  --info-border: #bae6fd;           /* Sky-200 */
  --info-text: #075985;             /* Sky-800 */

  /* Neutral Surface Palette */
  --bg-body: #f8fafc;               /* Crisp Clean Canvas */
  --bg-card: #ffffff;               /* Pure White */
  --bg-subtle: #f1f5f9;             /* Slate-100 */
  --bg-input: #ffffff;
  --border-color: #e2e8f0;          /* Subtle Hairline Border */
  --border-focus: #2563eb;

  /* Typography Colors */
  --text-main: #0f172a;             /* Slate-900 */
  --text-muted: #475569;            /* Slate-600 */
  --text-subtle: #64748b;           /* Slate-500 */
  --text-light: #94a3b8;            /* Slate-400 */

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevation Shadows (Soft, authentic, non-glowing) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 1.15rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

h1 { font-size: 2.85rem; font-weight: 800; }
h2 { font-size: 2.35rem; font-weight: 700; }
h3 { font-size: 1.95rem; font-weight: 700; }
h4 { font-size: 1.6rem; font-weight: 600; }
h5 { font-size: 1.35rem; font-weight: 600; }
h6 { font-size: 1.15rem; font-weight: 600; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ==========================================================================
   NAVBAR (Clean, Executive Header)
   ========================================================================== */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  box-shadow: var(--shadow-xs);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease;
}

.brand-logo:hover .brand-icon-box {
  background: #1e293b;
}

.brand-logo span.highlight {
  color: var(--accent);
  font-weight: 800;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.05em;
  margin-left: 0.35rem;
}

.nav-link-custom {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.55rem 1.15rem !important;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.nav-link-custom:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.nav-link-custom.active {
  color: var(--text-main);
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  font-weight: 700;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.45rem 1rem 0.45rem 0.55rem;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.user-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ==========================================================================
   BUTTONS (Modern Solid, Confident, Executive)
   ========================================================================== */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
}

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

/* Primary Button: Solid Slate-900 / Charcoal */
.btn-primary, .app-btn {
  background: #0f172a;
  color: #ffffff !important;
  border: 1px solid #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover, .app-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

/* Accent Button (Tech Blue Alternative) */
.btn-accent {
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Outline Primary */
.btn-outline-primary {
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.btn-outline-primary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Secondary Subtle */
.btn-secondary-subtle {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary-subtle:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.15rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  overflow: hidden;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  padding: 0.85rem 1.15rem;
  font-size: 1.05rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background-color: #ffffff;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-light);
  font-size: 1rem;
}

.input-icon-group {
  position: relative;
}

.input-icon-group i {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  font-size: 1.25rem;
}

.input-icon-group .form-control {
  padding-left: 3.15rem;
}

/* ==========================================================================
   ALERTS & TOASTS
   ========================================================================== */
.custom-alert {
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.5rem;
  animation: slideDown 0.25s ease-out;
}

.custom-alert-success {
  background: var(--success-light);
  border-color: var(--success-border);
  color: var(--success-text);
}

.custom-alert-danger {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.custom-alert-warning {
  background: var(--warning-light);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.custom-alert-info {
  background: var(--info-light);
  border-color: var(--info-border);
  color: var(--info-text);
}

/* ==========================================================================
   AUTH PAGES (HIGH-END MINIMALIST EXECUTIVE AUTH CARD)
   ========================================================================== */
.auth-card-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.auth-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
}


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

.auth-feature-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  color: #cbd5e1;
}

.auth-feature-item i {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #38bdf8;
}

.auth-stats-box {
  position: relative;
  z-index: 2;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.auth-form-side {
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin-bottom: 0.85rem;
  border: 1px solid transparent;
}

.stat-icon.primary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.stat-icon.success {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

.stat-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning-border);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* History Cards */
.analysis-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.analysis-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.match-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.match-badge.high {
  background: var(--success-light);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.match-badge.mid {
  background: var(--warning-light);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.match-badge.low {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-xl);
}

.empty-illustration {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.85rem;
  margin-bottom: 1.75rem;
}

/* ==========================================================================
   DRAG & DROP UPLOAD ZONE
   ========================================================================== */
.dropzone-container {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone-container:hover, .dropzone-container.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.25rem;
  transition: transform 0.15s ease;
}

.dropzone-container:hover .dropzone-icon {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: var(--accent-border);
}

.dropzone-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-preview-pill {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-xs);
  animation: fadeIn 0.2s ease;
}

.quick-preset-chip {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-preset-chip:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* ==========================================================================
   RESULT PAGE & PROGRESS GAUGE
   ========================================================================== */
.radial-progress-wrapper {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto;
}

.radial-progress-svg {
  transform: rotate(-90deg);
  width: 210px;
  height: 210px;
}

.radial-progress-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 14;
}

.radial-progress-bar {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.radial-progress-bar.high {
  stroke: #059669; /* Emerald */
}

.radial-progress-bar.mid {
  stroke: #d97706; /* Amber */
}

.radial-progress-bar.low {
  stroke: #dc2626; /* Crimson */
}

.radial-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.radial-progress-number {
  font-family: var(--font-heading);
  font-size: 3.15rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.radial-progress-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
}

/* Skill Badges & Chips */
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  margin: 0.3rem;
  transition: all 0.15s ease;
}

.skill-chip.matched {
  background: var(--success-light);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.skill-chip.matched:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

.skill-chip.missing {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.skill-chip.missing:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

/* ==========================================================================
   LOADING OVERLAY
   ========================================================================== */
.analysis-loader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.analysis-loader-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
}

.pulsing-scanner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #0f172a;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 1.75rem;
  animation: pulseGlow 1.5s infinite;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  padding: 2rem 0;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(15, 23, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 23, 42, 0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
  .auth-hero-side {
    display: none;
  }
  .auth-form-side {
    padding: 2.5rem 1.75rem;
  }
  .stat-card {
    margin-bottom: 1rem;
  }
  .stat-value {
    font-size: 2.5rem;
  }
}
