/* ================================================================= */
/*          HEALTH PROGRESS TRACKER — Premium Design System           */
/* ================================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --deep-teal: #0D6E6E;
  --deep-teal-hover: #0A5C5C;
  --deep-teal-light: #E8F5F3;
  --deep-teal-glow: rgba(13, 110, 110, 0.25);
  --navy: #1B2A4A;
  --navy-light: #2A3F6A;
  --soft-green: #4CAF82;
  --soft-green-bg: #EAFAF1;
  --warm-amber: #E8A838;
  --warm-amber-bg: #FFF8E8;
  --coral-red: #D9534F;
  --coral-red-bg: #FDEEEE;
  --bg-page: #F0F4F8;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  --text-primary: #1A202C;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(27, 42, 74, 0.05);
  --shadow-md: 0 4px 24px rgba(27, 42, 74, 0.07);
  --shadow-lg: 0 12px 40px rgba(27, 42, 74, 0.10);
  --shadow-xl: 0 20px 60px rgba(27, 42, 74, 0.12);
  --shadow-teal: 0 8px 28px rgba(13, 110, 110, 0.20);
  --shadow-teal-lg: 0 12px 36px rgba(13, 110, 110, 0.25);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  --transition-fast: 0.15s ease;
  --transition-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.50);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(13, 110, 110, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 10%, rgba(76, 175, 130, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 50%, rgba(232, 168, 56, 0.02) 0%, transparent 70%),
    var(--bg-page);
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(13, 110, 110, 0.15);
  color: var(--navy);
}

/* ---------- Top Navigation Bar ---------- */
.app-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 2px 4px rgba(13, 110, 110, 0.15));
  transition: transform var(--transition-bounce);
}

.header-logo:hover {
  transform: rotate(-5deg) scale(1.08);
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.header-title span {
  background: linear-gradient(135deg, var(--deep-teal), var(--soft-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.role-selector {
  display: flex;
  background: var(--bg-page);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inner);
}

.role-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 18px;
  border: none;
  background: none;
  color: var(--text-secondary);
  border-radius: 9px;
  cursor: pointer;
  transition: all var(--transition-med);
  position: relative;
}

.role-btn:hover {
  color: var(--deep-teal);
}

.role-btn.active {
  background: var(--bg-card);
  color: var(--deep-teal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

/* ---------- Views Logic ---------- */
.view-section { display: none; }
.view-section.active { display: block; animation: viewFadeIn 0.4s ease both; }

@keyframes viewFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--deep-teal), #0B8585);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-teal);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity var(--transition-med);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal-lg);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--deep-teal);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--deep-teal);
  background: var(--deep-teal-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  color: var(--deep-teal);
  background: var(--deep-teal-light);
}

.btn-lg { padding: 14px 30px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; border-radius: var(--radius-sm); }

/* ---------- Participant Welcome Screen / Reg Form ---------- */
.welcome-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 16px;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(13, 110, 110, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(76, 175, 130, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 0%, rgba(27, 42, 74, 0.02) 0%, transparent 50%);
}

.welcome-card {
  max-width: 620px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  animation: welcomeSlideUp 0.6s var(--transition-slow) both;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--deep-teal), var(--soft-green), var(--deep-teal));
  background-size: 200% 100%;
  animation: shimmerBar 3s ease infinite;
}

@keyframes shimmerBar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes welcomeSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-heading {
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.02em;
}

.welcome-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Registration Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.span-2 { grid-column: span 2; }

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-input, .form-select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-inner);
}

.form-input:hover, .form-select:hover {
  border-color: #CBD5E1;
}

.form-input:focus, .form-select:focus {
  border-color: var(--deep-teal);
  box-shadow: 0 0 0 3px var(--deep-teal-glow), var(--shadow-inner);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.welcome-note {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ---------- Participant Assessment Screen ---------- */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeSlideIn 0.35s ease both;
}

.assessment-container {
  max-width: 680px;
  width: 100%;
  margin: 28px auto 60px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.assessment-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.step-indicator {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--deep-teal);
  background: var(--deep-teal-light);
  padding: 6px 16px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(13, 110, 110, 0.08);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-inner);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--deep-teal), var(--soft-green));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -1px;
  bottom: -1px;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  border-radius: 100px;
  animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.pillar-content {
  animation: fadeSlideIn 0.35s ease both;
}

.pillar-header {
  text-align: center;
  margin-bottom: 28px;
}

.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 1.7rem;
  background: linear-gradient(135deg, var(--deep-teal-light), rgba(76, 175, 130, 0.1));
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(13, 110, 110, 0.08);
  transition: transform var(--transition-bounce);
}

.pillar-icon:hover {
  transform: scale(1.1) rotate(-5deg);
}

.pillar-header h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.pillar-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Question groups */
.question-group {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 14px;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-xs);
}

.question-group:hover {
  box-shadow: var(--shadow-sm);
}

.question-group.unanswered {
  border-color: var(--coral-red);
  box-shadow: 0 0 0 3px var(--coral-red-bg);
  animation: shakeSubtle 0.4s ease;
}

@keyframes shakeSubtle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.question-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.45;
}

/* Radio options styled as premium cards */
.radio-options { display: flex; flex-direction: column; gap: 8px; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-med);
  position: relative;
  background: var(--bg-card);
}

.radio-option:hover {
  border-color: var(--deep-teal);
  background: var(--deep-teal-light);
  transform: translateX(3px);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: all var(--transition-med);
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.radio-option input[type="radio"]:checked {
  border-color: var(--deep-teal);
  background: var(--deep-teal);
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--deep-teal-glow);
}

.radio-option:has(input:checked) {
  border-color: var(--deep-teal);
  background: var(--deep-teal-light);
  box-shadow: 0 2px 8px rgba(13, 110, 110, 0.08);
}

.radio-text {
  font-size: 0.87rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

/* Validation Alert */
.validation-msg {
  color: var(--coral-red);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  min-height: 22px;
  margin-bottom: 10px;
  opacity: 0;
  transition: all var(--transition-med);
  transform: translateY(-4px);
}

.validation-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.nav-buttons .btn-prev-hidden { visibility: hidden; }

/* ---------- Calculating Loading Screen ---------- */
.calculating-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  gap: 24px;
  padding: 32px;
  text-align: center;
}

.calc-spinner svg { animation: rotate 1.2s linear infinite; }
.calc-ring { transform-origin: center; }

.calc-title {
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 700;
}

.calc-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Participant Results Screen ---------- */
.results-container {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 16px 70px;
}

.results-header {
  text-align: center;
  margin-bottom: 36px;
}

.results-header h1 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.user-report-title {
  position: relative;
  display: inline-block;
}

.user-report-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--deep-teal), var(--soft-green));
}

.results-date {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-top: 8px;
}

/* Score Hero Block */
.score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  margin-bottom: 40px;
}

.gauge-wrapper {
  width: 200px;
  height: 200px;
  animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: drop-shadow(0 6px 20px rgba(13, 110, 110, 0.12));
}

.gauge-wrapper svg { width: 100%; height: 100%; }

.gauge-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 13;
}

.gauge-fill {
  fill: none;
  stroke-width: 13;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-score-text {
  font-family: var(--font-heading);
  font-size: 50px;
  font-weight: 800;
  fill: var(--navy);
}

.gauge-label-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  fill: var(--text-secondary);
}

.score-meta { max-width: 420px; }

.score-tier-badge {
  display: inline-block;
  padding: 7px 22px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.tier-flourishing { background: var(--soft-green-bg); color: var(--soft-green); border: 1px solid rgba(76, 175, 130, 0.15); }
.tier-ontrack { background: var(--deep-teal-light); color: var(--deep-teal); border: 1px solid rgba(13, 110, 110, 0.12); }
.tier-attention { background: var(--warm-amber-bg); color: #C4841D; border: 1px solid rgba(232, 168, 56, 0.15); }
.tier-reset { background: var(--coral-red-bg); color: var(--coral-red); border: 1px solid rgba(217, 83, 79, 0.12); }

.score-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Card layout elements */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-med);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Wheel of Health Radar Graph styling */
.wheel-card { text-align: center; }
.radar-wrapper {
  max-width: 380px;
  margin: 0 auto;
}
.radar-wrapper svg { width: 100%; height: auto; }

.radar-grid-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.radar-axis {
  stroke: var(--border-light);
  stroke-width: 1;
}

.radar-data-polygon {
  fill: rgba(13, 110, 110, 0.12);
  stroke: var(--deep-teal);
  stroke-width: 2.5;
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.radar-data-polygon-baseline {
  fill: rgba(76, 175, 130, 0.08);
  stroke: var(--soft-green);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.radar-data-point {
  fill: var(--deep-teal);
  stroke: #fff;
  stroke-width: 2;
}

.radar-data-point-baseline {
  fill: var(--soft-green);
  stroke: #fff;
  stroke-width: 2;
}

.radar-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  fill: var(--text-secondary);
}

/* Pillar Cards display */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.pillar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  transition: all var(--transition-med);
  animation: cardFadeIn 0.5s ease both;
}

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

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pillar-card-accent {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
}

.pillar-card-icon {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.pillar-card-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.pillar-card-bar-track {
  height: 7px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: var(--shadow-inner);
}

.pillar-card-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.pillar-card-score {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pillar-card-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 8px;
}

.status-teal { background: var(--deep-teal-light); color: var(--deep-teal); }
.status-green { background: var(--soft-green-bg); color: var(--soft-green); }
.status-amber { background: var(--warm-amber-bg); color: #C4841D; }
.status-red { background: var(--coral-red-bg); color: var(--coral-red); }

/* Strengths/Growth display column layout */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.insight-col { margin-bottom: 0; }

.insight-heading {
  font-size: 1rem;
  margin-bottom: 14px;
}

.strengths-heading { color: var(--soft-green); }
.improvements-heading { color: var(--warm-amber); }

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.insight-item:last-child { border-bottom: none; }

.insight-item:hover {
  background: rgba(13, 110, 110, 0.02);
  border-radius: var(--radius-xs);
}

.insight-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.insight-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Action plan styling */
.action-plan-card {
  background: linear-gradient(135deg, #f6fffe, #f3fbf7);
  border: 1px solid rgba(13, 110, 110, 0.08);
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-med);
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep-teal-light), rgba(76, 175, 130, 0.1));
  color: var(--deep-teal);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.action-card-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.action-card-pillar {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Disclaimer text block */
.disclaimer {
  background: var(--bg-page);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.disclaimer p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Results action buttons */
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: 8px;
}

/* ---------- Participant History Display ---------- */
.history-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.history-top-bar { margin-bottom: 10px; }

.history-title {
  font-size: 1.65rem;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.history-empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.history-empty-icon { font-size: 2.8rem; margin-bottom: 14px; }

.history-empty h3 {
  color: var(--navy);
  margin-bottom: 8px;
}

.history-empty p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.history-celebration {
  background: linear-gradient(135deg, var(--soft-green-bg), var(--deep-teal-light));
  border: 1px solid rgba(76, 175, 130, 0.15);
  border-radius: var(--radius-xl);
  padding: 20px 28px;
  margin-bottom: 22px;
  text-align: center;
  animation: celebrateIn 0.6s ease both;
}

@keyframes celebrateIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.celebration-icon { font-size: 2rem; margin-bottom: 6px; }

.celebration-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-teal);
}

.history-comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.comparison-score { text-align: center; }

.comparison-label {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.comparison-value {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 800;
}

.comparison-delta {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 5px 16px;
  border-radius: 100px;
}

.delta-positive { background: var(--soft-green-bg); color: var(--soft-green); }
.delta-negative { background: var(--coral-red-bg); color: var(--coral-red); }
.delta-neutral { background: var(--deep-teal-light); color: var(--text-secondary); }

.comparison-pillar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.comparison-pillar-row:last-child { border-bottom: none; }

.comparison-pillar-name {
  width: 140px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.comparison-pillar-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.comparison-bar-track {
  height: 5px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
}

.comparison-bar-fill {
  height: 100%;
  border-radius: 100px;
}

.comparison-bar-prev { opacity: 0.35; }

.comparison-pillar-delta {
  font-size: 0.76rem;
  font-weight: 600;
  width: 46px;
  text-align: right;
  flex-shrink: 0;
}

.history-record {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.history-record:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.history-record-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.history-record-score {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.history-record-tier {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}


/* ================================================================= */
/*                     ADMINISTRATOR REPORTING DASHBOARD             */
/* ================================================================= */

.admin-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title {
  font-size: 1.95rem;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

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

/* Statistics Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-med);
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--deep-teal-light), rgba(76, 175, 130, 0.08));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 2px;
}

/* Risk stratification cards */
.admin-section-heading {
  font-size: 1.08rem;
  color: var(--navy);
  margin-bottom: 14px;
}

.risk-strat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.risk-strat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-med);
}

.clickable-risk-card { cursor: pointer; }
.clickable-risk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.clickable-risk-card.active-filter {
  border-color: var(--deep-teal);
  box-shadow: 0 0 0 3px var(--deep-teal-glow), var(--shadow-md);
}

.risk-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.risk-count {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.risk-subtext {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Admin split panel */
.admin-split-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .admin-split-grid { grid-template-columns: 1fr; }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

/* Tables general design */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.admin-table th {
  background: var(--bg-page);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.admin-table tbody tr {
  transition: background var(--transition-fast);
}

.admin-table tbody tr:hover td {
  background: rgba(13, 110, 110, 0.02);
}

.admin-table .wrap-cell {
  white-space: normal;
  min-width: 160px;
}

/* Roster list controls */
.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.roster-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  width: 250px;
  font-size: 0.82rem;
}

/* Action icons inside tables */
.btn-action-view {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--deep-teal);
  cursor: pointer;
  background: var(--deep-teal-light);
  border: 1px solid rgba(13, 110, 110, 0.12);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-action-view:hover {
  background: var(--deep-teal);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Pillar averages indicators in admin view */
.pillar-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-avg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pillar-avg-name {
  width: 150px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.pillar-avg-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pillar-avg-pct-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}

.weakest-pillars-notice {
  margin-top: 18px;
  background: var(--warm-amber-bg);
  border: 1px solid rgba(232, 168, 56, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.weakest-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: #B2751E;
  margin-bottom: 6px;
}

.weakest-list {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.5;
  padding-left: 18px;
}

/* ================================================================= */
/*                     ADMIN MODAL OVERLAY DETAIL PANEL              */
/* ================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
  animation: overlayFadeIn 0.3s ease both;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  max-width: 1120px;
  width: 100%;
  max-height: 92vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.35rem;
  color: var(--navy);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-scroll-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

/* Master grid details split */
.modal-profile-grid {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 26px;
}

@media (max-width: 900px) {
  .modal-profile-grid { grid-template-columns: 1fr; }
}

.modal-left-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-right-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-section-box {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.modal-sub-title {
  font-size: 0.95rem;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

/* Demographics key-value table */
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.demo-table th {
  padding: 6px 0;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  vertical-align: top;
  width: 115px;
}

.demo-table td {
  padding: 6px 0;
  color: var(--text-primary);
  font-weight: 500;
}

/* Progress Stats Row */
.prog-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 14px;
}

.prog-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.prog-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prog-stat-val {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 3px;
}

/* Pillar trend lists inside modal */
.pillar-trend-header-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.pillar-trend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-trend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 5px;
}

.pillar-trend-row:last-child { border-bottom: none; }

.pillar-trend-name {
  color: var(--text-primary);
  font-weight: 500;
}

.pillar-trend-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-trend-indicator {
  font-weight: 800;
  font-size: 0.88rem;
}

/* Detailed Pillar Sub-Classifications Roster */
.m-pillar-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m-pillar-detail-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: box-shadow var(--transition-fast);
}

.m-pillar-detail-card:hover {
  box-shadow: var(--shadow-sm);
}

.m-pillar-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.m-pillar-detail-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
}

.m-subclassifications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-bottom: 8px;
}

.m-sub-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.m-sub-item strong { color: var(--text-primary); }

.m-insight-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
}

.m-insight-line {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Response log table adjustments */
.response-log-table { font-size: 0.78rem; }
.response-log-table th { padding: 10px; }
.response-log-table td { padding: 10px; }

/* Coach notes design */
.coach-notes-container {
  border-left: 4px solid var(--deep-teal);
  background: linear-gradient(90deg, rgba(13, 110, 110, 0.02), transparent);
}

/* ---------- Toast Alert Notification ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 1100;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Premium Animations ---------- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

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

/* Staggered card animations */
.pillar-card:nth-child(1) { animation-delay: 0.05s; }
.pillar-card:nth-child(2) { animation-delay: 0.10s; }
.pillar-card:nth-child(3) { animation-delay: 0.15s; }
.pillar-card:nth-child(4) { animation-delay: 0.20s; }
.pillar-card:nth-child(5) { animation-delay: 0.25s; }
.pillar-card:nth-child(6) { animation-delay: 0.30s; }

/* ================================================================= */
/*                       PRINT STYLES (@media print)                 */
/* ================================================================= */
.print-only { display: none; }

@media print {
  /* Hide interactive screens, buttons, toolbars */
  body, html {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
  }

  body::before { display: none !important; }
  
  .no-print,
  .app-header,
  .results-actions,
  .nav-buttons,
  .coach-notes-container,
  .roster-filters,
  #btn-admin-export-csv,
  .modal-header-actions,
  .toast,
  .welcome-note,
  #header-user-select-group {
    display: none !important;
  }

  /* Force modal content visibility and formatting */
  .modal-overlay {
    position: relative !important;
    display: block !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    inset: auto !important;
  }

  .modal-card {
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    animation: none !important;
  }

  .modal-scroll-body {
    overflow: visible !important;
    padding: 0 !important;
  }

  /* Two column print grid */
  .modal-profile-grid {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 15pt !important;
  }

  .modal-section-box {
    background: #fff !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    margin-bottom: 12pt !important;
    padding: 10pt !important;
  }

  /* Document header and branding */
  .print-only {
    display: block !important;
  }

  .print-header-box {
    border-bottom: 2px solid #000;
    padding-bottom: 8pt;
    margin-bottom: 16pt;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-brand {
    font-family: var(--font-heading);
    font-size: 18pt;
    font-weight: 800;
    color: #000;
  }

  .print-type {
    font-size: 9pt;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
  }

  .print-footer-box {
    border-top: 1px solid #ccc;
    margin-top: 20pt;
    padding-top: 6pt;
    font-size: 8pt;
    color: #555;
    display: flex;
    justify-content: space-between;
  }

  /* Table styles during printing */
  .admin-table th {
    background: #eaeaea !important;
    color: #000 !important;
    border-bottom: 1.5px solid #000 !important;
  }

  .admin-table td {
    border-bottom: 1px solid #ccc !important;
  }

  /* Page breaks */
  .page-break {
    page-break-before: always;
  }
}

/* ---------- Responsive Layout Breakpoints ---------- */
@media (max-width: 768px) {
  .header-container { flex-direction: column; align-items: stretch; }
  .header-controls { flex-direction: column; align-items: stretch; }
  .welcome-card { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .insights-grid { grid-template-columns: 1fr; }
  .action-cards-grid { grid-template-columns: 1fr; }
  .gauge-wrapper { width: 170px; height: 170px; }
  .roster-header { flex-direction: column; align-items: stretch; }
  .search-input { width: 100%; }
  .comparison-header { flex-direction: column; gap: 10px; }
  .results-header h1 { font-size: 1.6rem; }
  .welcome-heading { font-size: 1.5rem; }
  .admin-title { font-size: 1.5rem; }
  .modal-profile-grid { grid-template-columns: 1fr; }
  .section-card { padding: 20px 16px; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 100px;
  border: 2px solid var(--bg-page);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Smooth focus rings for accessibility */
*:focus-visible {
  outline: 2px solid var(--deep-teal);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Form select with better styling */
.select-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* ================================================================= */
/*                     AUTHENTICATION & LOGIN STYLES                 */
/* ================================================================= */

/* Auth Header Controls */
.header-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-display-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  line-height: 1.2;
}

.user-role-badge {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--coral-red);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background: var(--coral-red-bg);
}

/* Auth Landing Screen */
.auth-landing-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 40px 20px;
}

.auth-landing-content {
  max-width: 800px;
  width: 100%;
  animation: fadeSlideIn 0.5s ease both;
}

.auth-hero {
  text-align: center;
  margin-bottom: 48px;
}

.auth-hero-icon {
  margin-bottom: 20px;
}

.auth-heading {
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.auth-subheading {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.auth-role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .auth-role-cards { grid-template-columns: 1fr; }
}

.auth-role-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.auth-role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--deep-teal);
}

.auth-role-card-admin:hover {
  border-color: var(--navy);
}

.role-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--deep-teal-light);
  color: var(--deep-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.role-card-icon-admin {
  background: rgba(27, 42, 74, 0.08);
  color: var(--navy);
}

.auth-role-card h3 {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.auth-role-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 24px;
  flex-grow: 1;
}

.role-card-arrow {
  align-self: flex-end;
  font-size: 1.2rem;
  color: var(--deep-teal);
  font-weight: 700;
  transition: transform var(--transition-fast);
}

.auth-role-card-admin .role-card-arrow {
  color: var(--navy);
}

.auth-role-card:hover .role-card-arrow {
  transform: translateX(4px);
}

.auth-footer-note {
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Auth Forms */
.auth-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 40px 20px;
}

.auth-form-card {
  max-width: 500px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeSlideIn 0.4s ease both;
}

.auth-form-card-admin {
  border-top: 4px solid var(--navy);
}

.auth-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 32px;
  margin-top: 20px;
}

.auth-form-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--deep-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.auth-form-icon-admin {
  background: rgba(27, 42, 74, 0.08);
}

.auth-form-header h2 {
  font-size: 1.6rem;
  color: var(--navy);
}

.admin-auth-note {
  font-size: 0.85rem;
  color: var(--coral-red);
  margin-top: 8px;
}

/* Tabs */
.auth-tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.auth-tab:hover {
  color: var(--deep-teal);
}

.auth-tab.active {
  color: var(--deep-teal);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--deep-teal);
}

/* Password inputs */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--deep-teal);
}

.auth-form .form-input {
  width: 100%;
}

.btn-full {
  width: 100%;
  margin-top: 12px;
}

.btn-admin-login {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  box-shadow: 0 8px 24px rgba(27, 42, 74, 0.2);
}

.btn-admin-login:hover {
  box-shadow: 0 12px 32px rgba(27, 42, 74, 0.3);
}

.auth-switch-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--deep-teal);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

.auth-switch-link:hover {
  text-decoration: underline;
}

.auth-error {
  color: var(--coral-red);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 12px;
  text-align: center;
  min-height: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.admin-key-info {
  margin-top: 32px;
  padding: 16px;
  background: var(--warm-amber-bg);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: #B2751E;
  line-height: 1.5;
}

.admin-key-info-icon {
  font-size: 1.2rem;
}
