/* ==========================================================================
   Dynamic Career Pathways — Design tokens & shared styles
   Palette: dark navy / electric blue "AI career intelligence" design
   Type: Fraunces (display) + Inter (body/UI)
   ========================================================================== */

:root {
  --bg: #05060d;
  --bg-soft: #0a0c18;
  --surface: #0e1120;
  --surface-2: #12162a;
  --surface-soft: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.09);
  --border-soft: rgba(255,255,255,0.06);

  --text: #f4f5f9;
  --text-soft: rgba(244,245,249,0.68);
  --text-faint: rgba(244,245,249,0.45);

  --blue: #2f6fed;
  --blue-2: #123f9e;
  --blue-light: #8fb8ff;
  --blue-glow: rgba(47,111,237,0.35);

  /* legacy alias names kept so any inline references still resolve */
  --navy-900: var(--text);
  --navy-800: var(--surface);
  --navy-700: var(--blue-2);
  --blue-500: var(--blue);
  --blue-400: var(--blue-light);
  --gold-500: var(--blue-light);
  --gold-400: var(--blue-light);
  --white: var(--surface);
  --ink: var(--text);
  --ink-soft: var(--text-soft);
  --line: var(--border);

  --status-submitted-bg: rgba(255,255,255,0.06);
  --status-submitted-fg: var(--text-soft);
  --status-researching-bg: rgba(169,150,255,0.14);
  --status-researching-fg: var(--blue-light);
  --status-report_ready-bg: rgba(91,157,245,0.14);
  --status-report_ready-fg: #7fb2ff;
  --status-completed-bg: rgba(56,199,147,0.14);
  --status-completed-fg: #4fd8a8;
  --status-paid-bg: rgba(56,199,147,0.14);
  --status-paid-fg: #4fd8a8;
  --status-pending-bg: rgba(232,183,79,0.14);
  --status-pending-fg: #e8b74f;
  --status-failed-bg: rgba(239,103,103,0.14);
  --status-failed-fg: #ef6767;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-card-hover: 0 16px 40px -14px rgba(0, 0, 0, 0.65);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-light); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { line-height: 1.6; color: var(--text-soft); margin: 0 0 1em; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Gradient surfaces ---------- */

.gradient-hero {
  background: linear-gradient(135deg, #140c2b 0%, #1c1140 55%, #2a1a44 100%);
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero p { color: var(--text); }

.gradient-hero .eyebrow {
  color: var(--blue-light);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px var(--blue-glow); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--blue-light); background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }

.btn-danger {
  background: #ef6767;
  color: #1a0a0a;
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
  border: 1px solid var(--border);
}

.card-compact { padding: 20px; border-radius: var(--radius-md); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--bg);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  animation: rise 0.5s ease both;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
}
.auth-brand .logo-mark {
  width: 34px; height: 34px;
  object-fit: contain;
}

.auth-side {
  display: flex;
  align-items: center;
  padding: 48px;
}
.auth-side-inner { max-width: 460px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ---------- Forms ---------- */

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(124, 92, 239, 0.18);
}
.field textarea { resize: vertical; min-height: 90px; }

.field-error {
  color: #ef6767;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field.has-error input { border-color: #ef6767; }
.field.has-error .field-error { display: block; }

/* honeypot field: present in the DOM but invisible & unreachable to humans */
.hp-field {
  /* display:none (not just off-screen) so browser autofill — Chrome's
     saved Google account/address data in particular — can't find and
     fill this field. An off-screen-but-rendered field can still get
     autofilled, which was wrongly triggering the spam check below. */
  display: none !important;
}

.form-message {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.form-message.visible { display: block; }
.form-message.error { background: var(--status-failed-bg); color: var(--status-failed-fg); }
.form-message.success { background: var(--status-completed-bg); color: var(--status-completed-fg); }

/* ---------- App shell (dashboard / admin) ---------- */

.app-header {
  background: rgba(5,6,13,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
}
.app-header .logo-mark {
  width: 30px; height: 30px;
  object-fit: contain;
}
.app-header nav { display: flex; gap: 12px; align-items: center; }

.app-main { padding: 40px 0 80px; }

.welcome-banner {
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  background: linear-gradient(120deg, #140c2b, #1c1140 60%, #2a1a44);
  border: 1px solid var(--border);
  color: var(--text);
  animation: rise 0.5s ease both;
}
.welcome-banner h1 { color: var(--text); margin-bottom: 6px; }
.welcome-banner p { color: rgba(244,245,249,0.85); margin: 0; }

/* ---------- Status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-submitted { background: var(--status-submitted-bg); color: var(--status-submitted-fg); }
.pill-researching { background: var(--status-researching-bg); color: var(--status-researching-fg); }
.pill-report_ready { background: var(--status-report_ready-bg); color: var(--status-report_ready-fg); }
.pill-completed { background: var(--status-completed-bg); color: var(--status-completed-fg); }
.pill-paid { background: var(--status-paid-bg); color: var(--status-paid-fg); }
.pill-pending { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.pill-failed { background: var(--status-failed-bg); color: var(--status-failed-fg); }
.pill-refunded { background: var(--status-submitted-bg); color: var(--status-submitted-fg); }

/* ---------- Stat tiles ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  animation: rise 0.5s ease both;
}
.stat-tile .stat-label {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-tile .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
}
.stat-tile .stat-accent { color: var(--blue-light); }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- Tables ---------- */

.table-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.table-toolbar input,
.table-toolbar select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.table-toolbar input { flex: 1; min-width: 200px; }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 780px; }
thead th {
  text-align: left;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

select.status-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

/* ---------- Submission list (dashboard) ---------- */

.submission-list { display: flex; flex-direction: column; gap: 16px; }
.submission-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  animation: rise 0.4s ease both;
}
.submission-item .meta { display: flex; flex-direction: column; gap: 6px; }
.submission-item .meta .id { font-size: 12px; color: var(--text-soft); }
.submission-item .meta .package { font-weight: 700; color: var(--text); }
.submission-item .actions { display: flex; align-items: center; gap: 12px; }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-soft);
}
.empty-state .icon { margin: 0 auto 16px; width: 48px; height: 48px; color: var(--blue-light); }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 3, 8, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  animation: rise 0.25s ease both;
}
.modal-close-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
  font-size: 14px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 60;
}
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.error { background: #3a1414; border-color: rgba(239,103,103,0.4); color: #ff9c9c; }

/* ---------- Loading / spinner ---------- */

.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.15);
  border-top-color: var(--blue-light);
  animation: spin 0.7s linear infinite;
}
.btn .spinner { border-color: rgba(255,255,255,0.25); border-top-color: #fff; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ---------- Utility ---------- */

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-soft { color: var(--text-soft); }
.text-sm { font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Section basics for marketing page ---------- */

section { padding: 72px 0; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 12px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 760px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Homepage logo and clickable sections */
.site-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.home-option {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-option:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.home-option h3 { color: var(--text); }
