@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy: #0a1628;
  --navy-mid: #0f2040;
  --royal: #1340a0;
  --royal-light: #1a52c8;
  --ice: #4a8ec2;
  --ice-light: #7fb3d9;
  --ice-pale: #daeef8;
  --white: #ffffff;
  --off: #f4f7fb;
  --border: #e2e8f0;
  --text: #0d1321;
  --muted: #4a5568;
  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;
  --max: 1200px;
  --pad: 40px;
  --radius: 4px;
  --heading: 'Outfit', sans-serif;
  --body: 'Inter', sans-serif;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--off);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--royal-light); }

/* ── Nav ── */
.app-nav {
  background: var(--navy);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.app-logo-mark {
  width: 28px; height: 28px;
  background: var(--royal);
  display: flex; align-items: center; justify-content: center;
}
.app-logo-mark svg { width: 16px; height: 16px; }
.app-logo-text {
  font-family: var(--heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.app-logo-text span {
  color: var(--ice-light);
  font-weight: 400;
  font-size: 13px;
  margin-left: 6px;
}
.app-nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.app-nav-user {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.app-nav-user strong { color: var(--white); }
.app-nav-home {
  font-size: 13px;
  color: var(--ice-light);
  font-weight: 500;
}
.app-nav-logout {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--body);
  transition: color 0.2s;
}
.app-nav-logout:hover { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  border-radius: var(--radius);
}
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-mid); color: var(--white); }
.btn-royal { background: var(--royal); color: var(--white); }
.btn-royal:hover { background: var(--royal-light); color: var(--white); }
.btn-outline { background: transparent; color: var(--royal); border: 1.5px solid var(--royal); }
.btn-outline:hover { background: var(--royal); color: var(--white); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--royal); color: var(--royal); }
.btn-sm { font-size: 13px; padding: 8px 16px; }
.btn-lg { font-size: 16px; padding: 16px 32px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.card-sm { padding: 20px 24px; }

/* ── Form elements ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-size: 15px;
  color: var(--text);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  border-radius: var(--radius);
  -webkit-appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--royal); }
.field textarea { resize: vertical; min-height: 100px; }

/* ── Progress ── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--royal);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Score display ── */
.score-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 8px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  position: relative;
}
.score-ring-value {
  font-family: var(--heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.score-ring-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Alert / message ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #f0fdf4; border-left: 4px solid var(--success); color: #15803d; }
.alert-warning { background: #fffbeb; border-left: 4px solid var(--warning); color: #92400e; }
.alert-error { background: #fef2f2; border-left: 4px solid var(--error); color: #b91c1c; }
.alert-info { background: var(--ice-pale); border-left: 4px solid var(--ice); color: var(--navy); }

/* ── Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.tag-blue { background: var(--ice-pale); color: var(--royal); }
.tag-green { background: #f0fdf4; color: #15803d; }
.tag-amber { background: #fffbeb; color: #92400e; }
.tag-red { background: #fef2f2; color: #b91c1c; }

/* ── Utility ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--muted); }
.text-navy { color: var(--navy); }
.text-royal { color: var(--royal); }
.font-heading { font-family: var(--heading); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── Step indicator ── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step.active .step-num { background: var(--royal); color: var(--white); }
.step.active { color: var(--navy); }
.step.done .step-num { background: var(--success); color: var(--white); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step.done + .step-line { background: var(--success); }

/* ── Radio/checkbox cards ── */
.option-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.option-card:hover { border-color: var(--ice); background: var(--ice-pale); }
.option-card.selected { border-color: var(--royal); background: #eef2ff; }
.option-card input { margin-top: 2px; flex-shrink: 0; }
.option-card-label { font-size: 14px; font-weight: 600; color: var(--navy); }
.option-card-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Print ── */
@media print {
  .app-nav, .no-print { display: none !important; }
  body { background: white; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --pad: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-nav-user { display: none; }
}
