/* ==========================================================================
   MENTAL HEALTH SIGNAL — ULTRA-MODERN LIGHT & EMERALD DESIGN SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  /* Canvas Backgrounds (Clean, Luminous, Porcelain) */
  --color-bg: #f5f8f6;
  --color-surface: #ffffff;
  --color-surface-soft: #f0f5f2;
  --color-surface-hover: #eaf2ee;
  
  /* Primary Green & Emerald Accents */
  --color-primary: #1b4332;
  --color-primary-dark: #123023;
  --color-emerald: #10b981;
  --color-emerald-dark: #059669;
  --color-emerald-light: #34d399;
  --color-sage: #52b788;
  --color-sage-soft: #d8f3dc;
  
  /* Right Telemetry Card Palette (Deep Forest Velvet) */
  --telemetry-bg-top: #153e2d;
  --telemetry-bg-bottom: #0d281d;
  --telemetry-border: rgba(82, 183, 136, 0.28);
  --telemetry-text: #f0f7f3;
  --telemetry-muted: #8fb9a2;

  /* Form & Input Variables */
  --input-bg: #f7faf8;
  --input-border: #d5e5dc;
  --input-focus-border: #2d6a4f;
  --input-focus-ring: rgba(45, 106, 79, 0.15);
  
  /* Typography Colors */
  --text-main: #14241c;
  --text-body: #3c5448;
  --text-muted: #6c8879;
  --text-light: #9ab4a5;

  /* Status Colors */
  --status-good: #10b981;
  --status-good-bg: rgba(16, 185, 129, 0.14);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.14);
  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.14);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Radius */
  --shadow-subtle: 0 2px 10px rgba(18, 48, 35, 0.04);
  --shadow-card: 0 8px 30px rgba(18, 48, 35, 0.06);
  --shadow-float: 0 16px 40px rgba(18, 48, 35, 0.1);
  --shadow-telemetry: 0 16px 45px rgba(13, 40, 29, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.16s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Document Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle organic background gradients */
.bg-decoration {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  z-index: 0;
}

.decoration-1 {
  width: 450px;
  height: 450px;
  background: rgba(182, 230, 203, 0.45);
  top: -120px;
  left: -80px;
}

.decoration-2 {
  width: 550px;
  height: 550px;
  background: rgba(216, 243, 220, 0.6);
  bottom: -150px;
  right: -100px;
}

.decoration-3 {
  width: 350px;
  height: 350px;
  background: rgba(116, 198, 157, 0.15);
  top: 40%;
  left: 30%;
}

.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 2.2rem 4rem;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   3. Top Minimalist App Header
   -------------------------------------------------------------------------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.8rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(82, 183, 136, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 2.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Outstanding, clear & readable Logo Frame */
.brand-logo-frame {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 18px;
  padding: 6px;
  border: 1.5px solid rgba(82, 183, 136, 0.35);
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-bounce);
  position: relative;
  flex-shrink: 0;
}

.brand-logo-frame:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.22), 0 0 0 2px rgba(82, 183, 136, 0.5);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.brand-title-fancy {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0d3b2e 0%, #1b4332 30%, #2d6a4f 65%, #52b788 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(45, 106, 79, 0.1);
  line-height: 1.15;
}

.brand-devanagari-badge {
  font-family: 'Rozha One', 'Noto Sans Devanagari', serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #2d6a4f;
  background: rgba(82, 183, 136, 0.16);
  border: 1px solid rgba(82, 183, 136, 0.35);
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(82, 183, 136, 0.1);
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Bilingual Language Switcher Controls */
.header-right-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(240, 245, 242, 0.95);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(82, 183, 136, 0.32);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  gap: 3px;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-pill:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.6);
}

.lang-pill.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.16);
  font-weight: 700;
  border: 1px solid rgba(82, 183, 136, 0.3);
}

.lang-flag-icon {
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   4. Hero Headline Section with Luxury Fancy Typography
   -------------------------------------------------------------------------- */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.6rem;
  flex-wrap: wrap;
}

.hero-content {
  max-width: 740px;
}

.hero-prebadge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(82, 183, 136, 0.14);
  border: 1px solid rgba(82, 183, 136, 0.32);
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-emerald);
  box-shadow: 0 0 6px var(--color-emerald);
  animation: beaconPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero-heading-fancy {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 3.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #0d3b2e 0%, #1b4332 25%, #2d6a4f 55%, #52b788 85%, #74c69d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-devanagari-callout {
  font-family: 'Rozha One', 'Noto Sans Devanagari', serif;
  font-size: 2.2rem;
  font-weight: 400;
  background: linear-gradient(135deg, #2d6a4f 0%, #52b788 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.92;
}

.hero-subheading {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.65;
  font-weight: 450;
}

.hero-quick-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.05rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(82, 183, 136, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  box-shadow: var(--shadow-subtle);
}

.hero-quick-notice i {
  color: var(--color-emerald);
}

/* --------------------------------------------------------------------------
   5. Main Grid Workspace (Left Form Cards + Right Lush Emerald Monitor)
   -------------------------------------------------------------------------- */
.main-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.2rem;
  align-items: start;
}

/* Left Form Column */
.form-column {
  display: flex;
  flex-direction: column;
}

/* Common Card Styling */
.card {
  background: var(--color-surface);
  border: 1px solid rgba(82, 183, 136, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.75rem;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.8rem 1rem;
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-surface-soft);
  border: 1px solid rgba(45, 106, 79, 0.16);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.card-title-wrap h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-title-wrap p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-body {
  padding: 1.2rem 1.8rem 1.8rem;
}

/* Grid helpers */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.4rem; }

/* --------------------------------------------------------------------------
   6. Form Controls, Inputs & Selects
   -------------------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label,
.section-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.input-box,
.select-box {
  position: relative;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.input-box:focus-within,
.select-box:focus-within {
  border-color: var(--input-focus-border);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px var(--input-focus-ring);
}

.input-box input,
.select-box select {
  width: 100%;
  padding: 0.75rem 0.95rem;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
}

.select-box select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.2rem;
}

.select-box .caret {
  position: absolute;
  right: 0.95rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  pointer-events: none;
}

.input-box.unit-box input {
  padding-right: 2.8rem;
}

.unit-label {
  position: absolute;
  right: 0.95rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

.input-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Perceived Stress Level Button Group */
.stress-button-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.stress-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 0.5rem;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.stress-btn:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-sage);
  transform: translateY(-1px);
}

.stress-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.25);
}

.stress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-low { background: #10b981; }
.dot-med { background: #3b82f6; }
.dot-high { background: #f59e0b; }
.dot-vhigh { background: #ef4444; }

.stress-btn.active .stress-dot {
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Action Buttons Bar */
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cta-submit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(27, 67, 50, 0.35);
  transition: all var(--transition-smooth);
}

.cta-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(27, 67, 50, 0.45);
  background: linear-gradient(135deg, #123023 0%, #1b4332 100%);
}

.cta-submit-btn:active {
  transform: translateY(0);
}

.cta-secondary-btn {
  padding: 1rem 1.4rem;
  background: var(--color-surface);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-pill);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.cta-secondary-btn:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-sage);
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   7. Right Column: Lush Forest Emerald Telemetry Monitor Card
   -------------------------------------------------------------------------- */
.signal-column {
  position: sticky;
  top: 1.5rem;
}

.emerald-signal-card {
  background: linear-gradient(165deg, var(--telemetry-bg-top) 0%, var(--telemetry-bg-bottom) 100%);
  border: 1.5px solid var(--telemetry-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-telemetry);
  padding: 2rem 1.8rem;
  color: var(--telemetry-text);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
  overflow: hidden;
}

.emerald-signal-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: rgba(82, 183, 136, 0.18);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* Header & Beacon */
.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.telemetry-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #74c69d;
  background: rgba(82, 183, 136, 0.15);
  border: 1px solid rgba(82, 183, 136, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.beacon-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52b788;
  position: relative;
}

.beacon-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid #52b788;
  animation: beaconWave 2s infinite ease-out;
}

@keyframes beaconWave {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.signal-quick-tools {
  display: flex;
  gap: 0.45rem;
}

.tool-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--telemetry-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Hero Signal Text */
.signal-hero-text {
  text-align: center;
  padding: 0 0.5rem;
}

.signal-hero-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.signal-hero-subtitle {
  font-size: 0.82rem;
  color: var(--telemetry-muted);
  line-height: 1.45;
}

/* Radial Gauge Meter */
.radial-gauge-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0.4rem 0;
}

.gauge-arc-wrapper {
  position: relative;
  width: 100%;
  max-width: 290px;
}

.radial-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.arc-fill {
  transition: stroke-dashoffset 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

.arc-ticks text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--telemetry-muted);
  text-anchor: middle;
}

.gauge-score-overlay {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -40%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.score-val {
  font-family: var(--font-sans);
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1;
}

.score-denom {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--telemetry-muted);
  font-weight: 600;
}

.score-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #bbf7d0;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ✅ Wellness chip color variants */
.score-state-chip.chip-excellent {
  background: rgba(74, 222, 128, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}
.score-state-chip.chip-balanced {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}
.score-state-chip.chip-elevated {
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.3);
}
.score-state-chip.chip-critical {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.3);
}

/* ✅ Dynamic score number color based on wellness level */
.score-val.score-excellent { color: #4ade80; }
.score-val.score-good      { color: #93c5fd; }
.score-val.score-warning   { color: #fde68a; }
.score-val.score-danger    { color: #f87171; }

/* Waveform Strip */
.waveform-strip {
  background: rgba(6, 20, 14, 0.5);
  border: 1px solid rgba(82, 183, 136, 0.18);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.6rem 0.5rem;
  position: relative;
  overflow: hidden;
}

#waveformCanvas {
  display: block;
  width: 100%;
  height: 40px;
}

.waveform-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.76rem;
  color: #bbf7d0;
  text-align: center;
  margin-top: 0.15rem;
}

/* Factors Grid */
.factors-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.factor-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.factor-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(82, 183, 136, 0.2);
  color: #74c69d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.factor-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.factor-name {
  font-size: 0.65rem;
  color: var(--telemetry-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.factor-stat {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
}

.status-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

.tag-good { background: rgba(74, 222, 128, 0.2); color: #86efac; }
.tag-med { background: rgba(250, 204, 21, 0.2); color: #fde047; }
.tag-bad { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }

/* Actionable Insights Box */
.insights-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
}

.insights-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #74c69d;
  margin-bottom: 0.5rem;
}

.insights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.insights-list li {
  font-size: 0.76rem;
  color: var(--telemetry-text);
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
}

.insights-list li i {
  color: #52b788;
  font-size: 0.68rem;
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   8. Toast Notification System
   -------------------------------------------------------------------------- */
.toast-center {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
  pointer-events: none;
}

.toast-msg {
  padding: 0.75rem 1.25rem;
  background: #14241c;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg i {
  color: #34d399;
}

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

/* --------------------------------------------------------------------------
   9. Footer & Copyright Remarks
   -------------------------------------------------------------------------- */
.app-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 183, 136, 0.25), transparent);
  margin-bottom: 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo-frame {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 3px;
  border: 1px solid rgba(82, 183, 136, 0.32);
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.12);
  flex-shrink: 0;
}

.footer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand-fancy {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--color-primary);
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.devanagari-mini {
  font-family: 'Rozha One', 'Noto Sans Devanagari', serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2d6a4f;
}

.copyright-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.copyright-text strong {
  color: var(--text-main);
  font-weight: 600;
}

.footer-heart {
  color: #ef4444;
  font-size: 0.75rem;
  margin: 0 2px;
}


/* --------------------------------------------------------------------------
   9. Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  
  .signal-column {
    position: static;
  }
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 1rem 1rem 3rem;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1rem 1.2rem;
  }

  .header-right-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-heading-fancy {
    font-size: 2.3rem;
    gap: 0.5rem;
  }

  .hero-devanagari-callout {
    font-size: 1.6rem;
  }

  .brand-logo-frame {
    width: 60px;
    height: 60px;
  }

  .brand-title-fancy {
    font-size: 1.35rem;
  }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .stress-button-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .factors-container {
    grid-template-columns: 1fr;
  }
}
