/* =========================================================
   AstrumCare — Complete Unified Stylesheet (All 8 Pages)
   ========================================================= */

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

:root {
  --bg-void: #03060E;
  --bg-deep: #070D1D;
  --bg-card: rgba(13, 22, 44, 0.84);
  --bg-card-inner: rgba(7, 13, 29, 0.78);
  --bg-input: rgba(6, 11, 25, 0.94);
  --border-subtle: rgba(148, 163, 184, 0.18);
  --border-glow: rgba(56, 189, 248, 0.4);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --cyan-bright: #38BDF8;
  --cyan-glow: rgba(56, 189, 248, 0.25);
  --gold-accent: #FBBF24;
  --emerald-ok: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --rose-alert: #F43F5E;
  --rose-bg: rgba(244, 63, 94, 0.15);
  --amber-warn: #F59E0B;
  --amber-bg: rgba(245, 158, 11, 0.15);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html, body {
  min-height: 100%;
  background: radial-gradient(circle at 18% 12%, #0C1B3A 0%, var(--bg-deep) 45%, var(--bg-void) 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
}

/* =========================================================
   DEEP-SPACE BACKDROP, STARFIELD & ORBITAL ARCS
   ========================================================= */
.space-bg,
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#starfield {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0.7;
  animation: twinkle var(--duration, 4s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.85); }
  50% { opacity: 0.95; transform: scale(1.15); }
}

.nebula,
.nebula-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.nebula-cyan,
.nebula-glow {
  width: 640px;
  height: 640px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.13) 0%, rgba(16, 185, 129, 0.04) 45%, transparent 72%);
}

.nebula-indigo {
  width: 580px;
  height: 580px;
  bottom: -200px;
  left: -140px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.11) 0%, transparent 70%);
}

.orbital-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

/* =========================================================
   UNIFIED TOP NAVIGATION BAR
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 10, 24, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
}

.top-nav-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

body[data-page="login"] .top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-logo,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-logo .accent,
h1 .accent {
  color: var(--cyan-bright);
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 14px var(--cyan-bright);
}

body[data-page="login"] .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--cyan-bright);
}

body[data-page="login"] .brand-logo svg {
  width: 18px;
  height: 18px;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.46rem 0.88rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.38);
}

.nav-link.admin-tab {
  color: var(--gold-accent);
  border-color: rgba(251, 191, 36, 0.3);
}

.nav-link.admin-tab.active {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.55);
}

.nav-user-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.35rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle);
}

.nav-user-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

.nav-logout-btn {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: #FDA4AF;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.38);
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-logout-btn:hover {
  background: rgba(244, 63, 94, 0.28);
  color: #FFFFFF;
}

/* =========================================================
   SHARED PAGE CONTAINER, TOPBAR, BADGES & BUTTONS
   ========================================================= */
.assessment-page {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.1rem 1.5rem 4.2rem;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.topbar-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(13, 22, 44, 0.82);
  transition: all 0.18s ease;
}

.back-link:hover {
  color: var(--cyan-bright);
  border-color: var(--cyan-bright);
}

.mission-tag,
.mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.mission-tag.compact {
  padding: 0.36rem 0.82rem;
  font-size: 0.71rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 10px var(--cyan-bright);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.assessment-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.1rem;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

.card-header {
  margin-bottom: 1.65rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan-bright);
  margin-bottom: 0.4rem;
}

.card-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 780px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, #0284C7 0%, #0EA5E9 55%, #38BDF8 100%);
  color: #030712;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.93rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.42);
}

.cta-btn.secondary-gold {
  background: linear-gradient(135deg, #D97706 0%, #F59E0B 55%, #FBBF24 100%);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.25);
}

.cta-btn.secondary-gold:hover {
  box-shadow: 0 14px 34px rgba(251, 191, 36, 0.38);
}

/* =========================================================
   LOGIN PAGE (login.html)
   ========================================================= */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3.5rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.35rem 2.15rem;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.72);
}

.page-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin: 0.75rem 0 0.45rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

/* =========================================================
   MISSION HUB (index.html)
   ========================================================= */
.hero-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.6rem 1.5rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 1rem 0 1.15rem;
}

.hero-content .subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 1.9rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
}

.planet-horizon {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  animation: spinOrbit 40s linear infinite;
}

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

.astronaut-svg {
  position: relative;
  width: 280px;
  max-width: 72%;
  height: auto;
  z-index: 1;
  animation: floatSuit 5.5s ease-in-out infinite;
}

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

.hud-pills-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hud-pill {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.95rem;
  border-radius: 14px;
  background: rgba(10, 18, 38, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.hud-pill.alert {
  border-color: rgba(244, 63, 94, 0.65);
  background: rgba(38, 12, 24, 0.92);
}

.hud-pill.standby {
  border-color: var(--border-subtle);
}

.pill-top-left { top: 8%; left: 0; }
.pill-top-right { top: 10%; right: 0; }
.pill-bottom-left { bottom: 10%; left: 0; }
.pill-bottom-right { bottom: 8%; right: 0; }

.hud-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.hud-icon.cyan {
  background: rgba(56, 189, 248, 0.16);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hud-icon.gold {
  background: rgba(251, 191, 36, 0.16);
  color: var(--gold-accent);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.hud-data {
  display: flex;
  flex-direction: column;
}

.hud-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.hud-value {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-status {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--emerald-bg);
  color: var(--emerald-ok);
}

.hud-pill.alert .hud-status {
  background: var(--rose-bg);
  color: var(--rose-alert);
}

.hud-pill.standby .hud-status {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--cyan-bright);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.6);
}

.pillar-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan-bright);
}

.pillar-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* =========================================================
   TOOLBAR, ENVIRONMENT BUTTONS & QUICK FILL PRESETS
   ========================================================= */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.65rem;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
}

.toolbar.align-end {
  justify-content: flex-end;
}

.env-group,
.preset-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

.env-btn,
.regimen-env-btn,
.preset-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.env-btn:hover,
.regimen-env-btn:hover,
.preset-btn:hover {
  color: var(--text-primary);
  border-color: var(--cyan-bright);
}

.env-btn.active,
.regimen-env-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
}

/* =========================================================
   ASSESSMENT & ADMIN GRID FORMS (assessment.html / admin.html)
   ========================================================= */
.telemetry-grid,
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.35rem;
}

.form-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.form-section-header:first-child {
  margin-top: 0;
}

.form-section-title {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--cyan-bright);
  letter-spacing: 0.04em;
}

.form-section-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.dual-input,
.triple-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dual-input span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.field input,
.field select,
.dual-input input,
.triple-input input {
  width: 100%;
  min-width: 0;
  padding: 0.74rem 0.88rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.dual-input input:focus,
.triple-input input:focus {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.form-actions.space-between {
  justify-content: space-between;
}

.inline-notice {
  display: none;
  padding: 0.85rem 1.05rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--rose-bg);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #FDA4AF;
}

.inline-notice.success {
  background: var(--emerald-bg);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
}

/* =========================================================
   GHQ-28 QUESTIONNAIRE (questionnaire.html)
   ========================================================= */
.ghq-progress-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
}

.ghq-progress-track {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.ghq-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284C7, #38BDF8);
  transition: width 0.25s ease;
}

.ghq-progress-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan-bright);
  white-space: nowrap;
}

.questionnaire-stack {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.ghq-subscale {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.45rem;
  margin-bottom: 1.35rem;
}

.ghq-subscale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ghq-subscale-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.ghq-subscale-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-bright);
}

.ghq-item {
  padding: 0.95rem;
  border-radius: 11px;
  border: 1px solid transparent;
  margin-bottom: 0.75rem;
  background: rgba(13, 22, 44, 0.72);
}

.ghq-item.missing-highlight {
  border-color: var(--rose-alert);
  background: rgba(244, 63, 94, 0.1);
}

.ghq-question-text {
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 0.65rem;
}

.ghq-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.ghq-option-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(7, 13, 29, 0.85);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghq-option-label:hover {
  border-color: var(--cyan-bright);
}

/* =========================================================
   OVERALL HEALTH SCORE & STICKMAN GAUGES (results.html)
   ========================================================= */
.stickman-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-bottom: 1.8rem;
}

.stickman-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
}

.stickman-figure-box {
  flex-shrink: 0;
  width: 116px;
  padding: 0.6rem;
  border-radius: 14px;
  background: rgba(13, 22, 44, 0.85);
  border: 1px solid var(--border-subtle);
}

.stickman-svg {
  width: 100%;
  height: auto;
  display: block;
}

.stickman-pct {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  fill: #FFFFFF;
  paint-order: stroke;
  stroke: #03060E;
  stroke-width: 4px;
}

.stickman-status-block {
  flex: 1;
}

.stickman-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan-bright);
  margin-bottom: 0.35rem;
}

.stickman-headline {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.stickman-headline.nominal {
  color: var(--emerald-ok);
}

.stickman-headline.alert {
  color: var(--rose-alert);
}

.stickman-subtext {
  font-size: 0.89rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Longitudinal Trends Panel */
.trends-panel,
.trend-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.65rem;
  margin-bottom: 1.65rem;
}

.trends-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.trends-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0.25rem 0;
}

.trends-header p {
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.timeframe-group,
.metric-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.metric-tabs {
  margin-bottom: 1.15rem;
}

.tf-btn,
.metric-tab {
  padding: 0.44rem 0.82rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(13, 22, 44, 0.9);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tf-btn:hover,
.metric-tab:hover {
  color: var(--text-primary);
  border-color: var(--cyan-bright);
}

.tf-btn.active,
.metric-tab.active {
  border-color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.16);
  color: var(--cyan-bright);
}

.trend-kpis,
.trend-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.trend-kpi-card {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(13, 22, 44, 0.85);
  border: 1px solid var(--border-subtle);
}

.trend-kpi-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.trend-kpi-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.trend-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.trend-kpi-sub.pos { color: var(--emerald-ok); }
.trend-kpi-sub.neg { color: var(--rose-alert); }

.chart-stage {
  position: relative;
  width: 100%;
  background: rgba(4, 9, 20, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem;
}

.trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.chart-tooltip {
  display: none;
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(7, 13, 29, 0.96);
  border: 1px solid var(--cyan-bright);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}

.chart-tooltip-date {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.log-history-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.results-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* =========================================================
   ADVISORY, DIET & WORKOUT, AND ADMIN TABLES
   ========================================================= */
.telemetry-summary-bar,
.nutrient-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.summary-pill-item,
.nutrient-box {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
}

.summary-pill-label,
.nutrient-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.summary-pill-value,
.nutrient-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

.summary-pill-value.ok { color: var(--emerald-ok); }
.summary-pill-value.warn { color: var(--rose-alert); }

.nutrient-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.advisory-section {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.55rem;
}

.advisory-section.spaced {
  margin-top: 1.5rem;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-heading-row h2 {
  font-size: 1.12rem;
  font-weight: 700;
}

.sub-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.4rem 0 0.85rem;
  color: var(--cyan-bright);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
}

.status-pill.normal {
  background: var(--emerald-bg);
  color: var(--emerald-ok);
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.status-pill.alert {
  background: var(--rose-bg);
  color: var(--rose-alert);
  border: 1px solid rgba(244, 63, 94, 0.42);
}

.advisory-grid {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.advisory-card {
  background: rgba(13, 22, 44, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.25rem;
}

.advisory-card.alert-card {
  border-color: rgba(244, 63, 94, 0.45);
}

.advisory-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.advisory-card-title {
  font-size: 1.02rem;
  font-weight: 700;
}

.advisory-card-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cyan-bright);
}

.card-summary-box {
  padding: 0.78rem 0.95rem;
  border-radius: 9px;
  background: rgba(7, 13, 29, 0.85);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.risk-action-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin-bottom: 0.4rem;
}

.advisory-steps {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.regimen-override-banner {
  padding: 1.15rem 1.3rem;
  border-radius: 14px;
  background: var(--emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.38);
  margin-bottom: 1.4rem;
}

.regimen-override-banner.caution {
  background: var(--amber-bg);
  border-color: rgba(245, 158, 11, 0.45);
}

.regimen-override-banner.critical {
  background: var(--rose-bg);
  border-color: rgba(244, 63, 94, 0.5);
}

.override-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.override-tags,
.macro-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.override-tag,
.macro-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(7, 13, 29, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--cyan-bright);
}

.macro-pill.gold {
  color: var(--gold-accent);
  border-color: rgba(251, 191, 36, 0.38);
}

.override-list {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.75rem;
}

.regimen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.regimen-table th,
.regimen-table td {
  text-align: left;
  padding: 0.82rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
}

.regimen-table th {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(13, 22, 44, 0.6);
}

.danger-mini-btn {
  padding: 0.32rem 0.7rem;
  border-radius: 7px;
  border: 1px solid rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.14);
  color: #FDA4AF;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.danger-mini-btn:hover {
  background: rgba(244, 63, 94, 0.28);
  color: #FFFFFF;
}

.empty-state-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.2rem 1.5rem;
  background: var(--bg-card-inner);
  border: 1px dashed var(--border-glow);
  border-radius: 16px;
  gap: 0.85rem;
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.empty-state-box p {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .pillar-grid,
  .stickman-stack,
  .telemetry-summary-bar,
  .nutrient-grid,
  .trend-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ghq-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .telemetry-grid,
  .admin-form-grid,
  .pillar-grid,
  .stickman-stack,
  .telemetry-summary-bar,
  .nutrient-grid,
  .trend-kpis,
  .ghq-options {
    grid-template-columns: 1fr;
  }
  .assessment-card {
    padding: 1.35rem;
  }
  .stickman-row {
    flex-direction: column;
    text-align: center;
  }
}