:root {
  color-scheme: light;
  
  /* Unified High-Contrast Visual Identity (beachcitiesfrontline.org branding) */
  --bg-canvas: #FFFFFF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F9FAFB;
  --bg-elevated: #F3F4F6;
  --bg-glass: rgba(255, 255, 255, 0.94);
  
  /* Dark Feature Panels (Obsidian Matte Black) */
  --bg-obsidian: #0F1115;
  --bg-obsidian-surface: #16191E;
  --bg-obsidian-card: #1D2128;
  --border-obsidian: rgba(255, 255, 255, 0.10);
  
  /* Authority Navy */
  --brand-navy: #0B2545;
  --brand-navy-dark: #041021;
  --brand-navy-mid: #13293D;
  --bcff-navy: #0B2545;
  --bcff-navy-mid: #13293D;
  --bcff-navy-light: #1E3A5F;

  /* Brand Primary / Alert (Crimson Red) */
  --brand-crimson: #D90429;
  --brand-crimson-bright: #E63946;
  --brand-crimson-hover: #B80322;
  --brand-crimson-soft: rgba(217, 4, 41, 0.08);
  --bcff-red: #D90429;
  --bcff-red-bright: #E63946;
  --bcff-red-soft: rgba(217, 4, 41, 0.08);

  /* The "Martini Rose" Accent (Subtle Muted Pink) */
  --martini-rose: #FDE8E9;
  --martini-rose-border: #E5989B;
  --martini-rose-text: #9F3A41;
  --martini-rose-pip: #D47378;
  --martini-pink: #D47378;
  --martini-pink-bright: #E5989B;
  --martini-pink-soft: rgba(229, 152, 155, 0.22);
  --martini-pink-bg: #FDE8E9;
  --martini-pink-text: #9F3A41;

  /* Typography Colors */
  --text-primary: #111827;
  --text-navy: #0B2545;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: #9CA3AF;

  /* Accents & Trust States */
  --accent-primary: #D90429;
  --accent-primary-soft: rgba(217, 4, 41, 0.08);
  --accent-sage: #4E7D68;
  --accent-teal: #0D9488;
  --accent-green: #10B981;
  --accent-gold: #B45309;
  --accent-gold-soft: rgba(180, 83, 9, 0.12);

  /* Borders & Shadows (Zero Bleed, Hairlines) */
  --border-hairline: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-white-10: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  --shadow-elevated: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-obsidian: 0 16px 40px -8px rgba(0, 0, 0, 0.5);

  /* Geometry Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-2xl: 18px;
  --radius-3xl: 26px;
  --radius-pill: 9999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #f8fafc;
  --bg-primary: #FFFFFF;
  --bg-secondary: #f8fafc;
  --bg-card: #FFFFFF;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-hairline: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  --shadow-elevated: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #090d16;
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #131d2e;
  --bg-card-hover: #1c283f;
  --bg-elevated: #1e293b;
  --bg-glass: rgba(19, 29, 46, 0.94);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-card: 0 2px 8px 0 rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 6px 18px 0 rgba(0, 0, 0, 0.5);
}

/* =========================================================================
   LOW-STIMULATION / RED-LIGHT NIGHT SHIFT THEME (Circadian Defense & PTSD Grounding)
   ========================================================================= */
[data-theme="redshift"] {
  color-scheme: dark;
  --bg-primary: #0a0406;
  --bg-secondary: rgba(26, 8, 12, 0.96);
  --bg-card: rgba(38, 11, 17, 0.88);
  --bg-card-hover: rgba(56, 15, 24, 0.96);
  --bg-elevated: #280a10;
  --text-primary: #fee2e2;
  --text-secondary: #fca5a5;
  --text-muted: #e11d48;
  --border-subtle: rgba(225, 29, 72, 0.3);
  --border-strong: rgba(244, 63, 94, 0.55);
  --accent-primary: #f43f5e;
  --accent-secondary: #fb7185;
  --accent-teal: #f43f5e;
  --accent-green: #fbbf24;
  --bcff-navy: #180407;
  --bcff-red: #be123c;
  --bcff-gold: #f59e0b;
  --martini-pink: #f43f5e;
  --martini-pink-soft: rgba(244, 63, 94, 0.25);
  --martini-pink-bg: rgba(190, 18, 60, 0.2);
  --martini-pink-text: #ffe4e6;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.65);
}

[data-theme="redshift"] * {
  animation-duration: 0.001ms !important;
  transition-duration: 0.06s !important;
}

[data-theme="redshift"] .app-header {
  background: rgba(10, 4, 6, 0.96);
  border-bottom: 1.5px solid rgba(225, 29, 72, 0.4);
}

[data-theme="redshift"] .desktop-sidebar {
  background: rgba(10, 4, 6, 0.98);
  border-right: 1.5px solid rgba(225, 29, 72, 0.4);
}

[data-theme="redshift"] .bottom-nav {
  background: rgba(10, 4, 6, 0.98);
  border-top: 1.5px solid rgba(225, 29, 72, 0.4);
}

[data-theme="redshift"] .track-pill.active {
  background: #be123c;
  color: #fff1f2;
  border-color: #fda4af;
}

[data-theme="redshift"] .btn-teal,
[data-theme="redshift"] .btn-primary {
  background: #be123c;
  border-color: #fda4af;
  color: #fff1f2;
}

[data-theme="redshift"] .btn-outline {
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #FFFFFF;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Responsive Mobile & Desktop Layout Shell (Clean-Sweep max-w-lg Centered Shell matching vfr-team-hub) */
body {
  margin: 0;
  padding: 0;
  background-color: #f8fafc !important;
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  max-width: 32rem !important; /* 512px / max-w-lg centered */
  margin-inline: auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  position: relative;
  overflow-x: clip;
  border-left: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  box-shadow: 0 4px 25px rgba(15, 23, 42, 0.05);
}

html.auth-view-active,
body.auth-view-active,
html:has(body.auth-view-active),
body:has(#authGateView[style*="display: flex"]),
body:has(#authGateView:not([style*="display: none"])) {
  background-color: #f8fafc !important;
  color-scheme: light;
}

.app-shell.auth-view-active,
.app-shell:has(#authGateView[style*="display: flex"]),
.app-shell:has(#authGateView:not([style*="display: none"])) {
  max-width: 32rem !important;
  width: 100% !important;
  background: #FFFFFF !important;
  border-left: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
  box-shadow: 0 4px 25px rgba(15, 23, 42, 0.05) !important;
}

@media (min-width: 600px) {
  .app-shell {
    max-width: 32rem !important;
  }
}

/* Hide desktop sidebar to keep clean mobile shell layout */
.desktop-sidebar {
  display: none !important;
}

.app-layout-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 100%;
}

/* Strip secondary clutter elements */
#floatingHomeBtn {
  display: none !important;
}
.header-firewall-pill {
  display: none !important;
}
#headerCloudSyncBtn,
#quickGroundingHeaderBtn,
#toggleEasyReadBtn,
#stealthPrivacyToggleBtn {
  display: none !important;
}
.header-dropdown-bar,
#headerCohortPillRail {
  display: none !important;
}
#activePageHeaderBanner {
  display: none !important;
}
#nav-admin {
  display: none !important;
}

/* Persistent Top Safety Rail (Legacy / Fallback Hidden) */
.crisis-banner {
  display: none !important;
}

/* Discreet, High-Accessibility 24/7 SOS 988 Header Button */
.header-sos-btn {
  background: var(--brand-crimson);
  color: #FFFFFF !important;
  border: 1px solid var(--brand-crimson-bright);
  border-radius: var(--radius-pill);
  min-height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(217, 4, 41, 0.35);
}

.header-sos-btn:hover,
.header-sos-btn:focus-visible {
  background: var(--brand-crimson-hover);
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.45);
}

.header-sos-btn .sos-icon {
  font-size: 0.85rem;
}

/* Privacy Firewall Status Pill (Header Right) */
.header-firewall-pill {
  background: #FDF2F2;
  border: 1px solid #F8B4B4;
  color: #B91C1C;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.70rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.firewall-pip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  animation: pulse-firewall 2s infinite ease-in-out;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulse-firewall {
  0% { transform: scale(0.92); opacity: 0.75; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.75; }
}

/* Sleek Enterprise Command Bar (~58px height) */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
  padding: var(--safe-top) 16px 0;
  height: calc(58px + var(--safe-top));
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
}

.header-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 58px;
  gap: 6px;
  min-width: 0;
}

/* Left: Agency Brand Lockup & Subtle Preset Indicator Button */
.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
}

.brand-logo {
  width: 34px;
  height: 34px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  border: 1px solid var(--border-hairline);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name-bold {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.brand-subtitle-line {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.15;
  white-space: nowrap;
  text-transform: uppercase;
  margin: 1px 0 0 0;
}

.header-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  padding: 3px 7px;
  min-height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.header-preset-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Center: Calm Screen Title / Module Context */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.header-module-badge {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-elevated);
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-hairline);
  max-width: 100%;
}

/* Right: 🆘 988 emergency pill + Profile avatar button */
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-sos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 32px;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.22);
  color: #dc2626;
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.header-sos-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  transform: scale(1.02);
}

.header-sos-btn:active {
  transform: scale(0.96);
}

[data-theme="dark"] .header-sos-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.header-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  min-height: 32px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-profile-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.header-avatar-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #041e42;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.header-callsign-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subapp-exit-pill {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 30px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.subapp-exit-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

body.subapp-mode .subapp-exit-pill {
  display: inline-flex !important;
}

body.subapp-mode .header-profile-btn {
  display: none !important;
}

@media (max-width: 580px) {
  .brand-subtitle-line {
    display: none;
  }
  .header-callsign-text,
  #headerUserCallsign {
    display: none !important;
  }
  .header-profile-btn {
    padding: 3px;
  }
  .header-module-badge {
    font-size: 11.5px;
    padding: 3px 8px;
  }
}

@media (max-width: 420px) {
  .app-header {
    padding: var(--safe-top) 10px 0;
  }
  .header-command-bar {
    gap: 6px;
  }
  .header-left {
    gap: 6px;
  }
  .brand-group {
    gap: 6px;
  }
  .header-right {
    gap: 6px;
  }
  .header-preset-btn .preset-label {
    display: none;
  }
  .header-preset-btn {
    padding: 4px 6px;
  }
  .brand-name-bold {
    font-size: 11px;
    max-width: 108px;
    letter-spacing: -0.01em;
  }
  .header-sos-btn {
    padding: 0 7px;
    gap: 3px;
  }
  .header-module-badge {
    font-size: 11px;
    padding: 2.5px 7px;
  }
}

/* Audience Track Switcher Pills (Swipeable Horizontal Carousel) */
.track-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 10px;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px 10px;
  scrollbar-width: none;
}

.track-bar::-webkit-scrollbar {
  display: none;
}

.track-pill {
  scroll-snap-align: start;
  flex: 0 0 auto;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 36px;
  user-select: none;
}

.track-pill.active {
  background: var(--bcff-navy);
  color: #ffffff;
  border-color: var(--bcff-red);
  box-shadow: 0 2px 8px rgba(4, 30, 66, 0.25);
}

[data-theme="dark"] .track-pill.active {
  background: var(--bcff-red);
  color: #ffffff;
  border-color: #ffffff;
}

/* ==========================================
   MANDATORY LOGIN / SIGN-UP GATE VIEW
   ========================================== */
.auth-gate {
  flex: 1;
  width: 100%;
  padding: 24px 16px 60px;
  background: transparent;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.auth-gate-layout {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .auth-gate {
    padding: 36px 32px 70px;
    justify-content: center;
  }
  .auth-gate-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    grid-template-areas:
      "hero auth"
      "features auth"
      "footer footer";
    gap: 24px 44px;
    align-items: start;
  }
  .web-brand-hero-block {
    grid-area: hero;
  }
  .web-auth-column {
    grid-area: auth;
  }
  .web-features-showcase-block {
    grid-area: features;
  }
  .auth-gate-layout .app-copyright-footer {
    grid-area: footer;
    width: 100%;
  }
}

@media (max-width: 991px) {
  .auth-gate-layout {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    gap: 20px;
  }
  .web-brand-hero-block {
    order: 1;
  }
  .web-auth-column {
    order: 2;
  }
  .web-features-showcase-block {
    order: 3;
  }
  .auth-gate-layout .app-copyright-footer {
    order: 4;
  }
}

/* Brand Hero Block (Top Left on Desktop, Top of Page on Mobile) */
.web-brand-hero-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.web-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.web-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3;
}

.web-pill-gold {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.web-pill-cyan {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

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

.web-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.web-brand-logo-bcff {
  border: 3px solid #bf0d18;
}

.web-brand-logo-martini {
  border: 3px solid #f472b6;
}

.web-foundation-tag {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fbbf24;
  text-transform: uppercase;
}

.web-tagline-small {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

.web-hero-title-box {
  margin-top: 2px;
}

.web-hero-title {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
}

.web-hero-title-accent {
  color: #fbbf24;
  display: inline-block;
}

.web-hero-subtitle {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 8px 0 0;
}

/* Official Features Showcase (Bottom Left on Desktop, Below Form on Mobile) */
.web-features-showcase-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.web-security-callout {
  background: rgba(10, 24, 46, 0.8);
  border: 1.5px solid rgba(56, 189, 248, 0.32);
  border-radius: 12px;
  padding: 13px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.web-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.web-callout-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.42;
  margin: 0;
}

/* Built For Real Shift Life: 4 Feature Grid Cards (from Image 3) */
.web-features-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.web-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.web-features-title {
  font-size: 1.18rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.web-features-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.web-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 2px;
}

@media (min-width: 540px) {
  .web-features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.web-feature-card {
  background: rgba(10, 24, 46, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.web-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(14, 32, 60, 0.88);
}

.web-feature-badge {
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fbbf24;
  text-transform: uppercase;
}

.web-feature-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.web-feature-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.38;
}

.web-nonclinical-card {
  border-left: 4px solid var(--bcff-red) !important;
  padding: 11px 14px !important;
  background: rgba(10, 24, 46, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 4px solid var(--bcff-red) !important;
  border-radius: 10px !important;
}

/* Auth Portal Column (Right Column on Desktop, Mobile-Optimized) */
.web-auth-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.web-auth-card {
  background: rgba(10, 26, 49, 0.94);
  color: #f8fafc;
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.22);
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  border-top: 4px solid var(--bcff-red);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-sizing: border-box;
  max-width: 100%;
}

.web-auth-card-top-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #38bdf8;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.web-auth-card .auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(4, 18, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
}

.web-auth-card .auth-tab-btn {
  background: transparent;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.2s ease;
}

.web-auth-card .auth-tab-btn.active {
  background: #041e42;
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.web-auth-card .form-label {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.82rem;
}

.web-auth-card .form-input,
.web-auth-card .form-select {
  background: rgba(4, 18, 38, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  box-sizing: border-box;
  width: 100%;
}

.web-auth-card .form-input:focus,
.web-auth-card .form-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  outline: none;
}

.web-auth-card .form-input::placeholder {
  color: #64748b;
}

.web-auth-card .radio-card {
  background: rgba(4, 18, 38, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.web-auth-card .radio-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.08);
}

.web-auth-card .radio-card:has(input:checked) {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.web-auth-card .password-wrap {
  position: relative;
  display: flex;
}

.web-auth-card .password-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.web-auth-card .password-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.web-auth-card .btn-primary {
  background: linear-gradient(135deg, #c50e1b 0%, #9e0812 100%);
  border: 1.5px solid #ef4444;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(191, 13, 24, 0.45);
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.web-auth-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(191, 13, 24, 0.6);
}

.web-auth-card .clean-accordion {
  background: rgba(4, 18, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.web-auth-card .clean-accordion-summary {
  color: #cbd5e1;
}

.web-auth-card .clean-accordion-tag {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.auth-hero {
  background: linear-gradient(135deg, #041e42 0%, #0a2e63 65%, #123973 100%);
  border: 2px solid #041e42;
  border-top: 6px solid #bf0d18;
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  color: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.auth-logo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #ffffff;
  padding: 4px;
  border: 3px solid #bf0d18;
  object-fit: contain;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-elevated);
  padding: 5px;
  border-radius: var(--radius-sm);
}

.auth-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.radio-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 420px) {
  .radio-group-grid {
    grid-template-columns: 1fr;
  }
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
}

.radio-card input[type="radio"] {
  accent-color: var(--bcff-red);
  width: 18px;
  height: 18px;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap .form-input {
  padding-right: 76px;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
}

/* ==========================================
   DAILY MOTIVATIONAL STORY, PHOTO & PROMPT
   ========================================== */
.daily-story-card {
  background: var(--bg-card);
  border: 2px solid var(--bcff-navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.daily-story-photo-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  background: #041e42;
  overflow: hidden;
}

.daily-story-photo-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.daily-story-overlay-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daily-story-nav-btns {
  display: inline-flex;
  gap: 6px;
}

.story-nav-btn {
  background: rgba(4, 30, 66, 0.82);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.daily-story-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 16px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 30, 66, 0.94) 100%);
  color: #ffffff;
}

.daily-story-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.daily-prompt-box {
  background: var(--accent-primary-soft);
  border-left: 5px solid var(--bcff-red);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Daily Prompt Popup Modal Card - High Contrast, Crisp Typography, Zero Murkiness */
#dailyPopupModal.app-dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-2xl) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

#dailyPopupModal .dialog-inner {
  background: #ffffff !important;
  color: #0f172a !important;
}

#popupDailyNarrative {
  color: #334155 !important;
  font-size: 0.94rem !important;
  line-height: 1.62 !important;
  font-weight: 500 !important;
}

#dailyPopupModal .daily-prompt-box {
  background: #fff5f5 !important;
  border: 1px solid #fed7d7 !important;
  border-left: 4px solid #d90429 !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
}

#popupDailyPromptText {
  color: #0f172a !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
}

#dailyPopupModal .form-label {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
}

#popupDailyTrackSelect {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
}

#popupReflectionInput {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
}

#popupDismissForTodayBtn {
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
}

#popupDismissForTodayBtn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="dark"] #dailyPopupModal.app-dialog {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] #dailyPopupModal .dialog-inner {
  background: #0f172a !important;
  color: #f8fafc !important;
}

[data-theme="dark"] #popupDailyNarrative {
  color: #e2e8f0 !important;
}

[data-theme="dark"] #dailyPopupModal .daily-prompt-box {
  background: rgba(217, 4, 41, 0.15) !important;
  border-color: rgba(217, 4, 41, 0.35) !important;
  border-left-color: #d90429 !important;
}

[data-theme="dark"] #popupDailyPromptText {
  color: #ffffff !important;
}

[data-theme="dark"] #dailyPopupModal .form-label {
  color: #cbd5e1 !important;
}

[data-theme="dark"] #popupDailyTrackSelect,
[data-theme="dark"] #popupReflectionInput {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] #popupDismissForTodayBtn {
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: transparent !important;
}

/* ==========================================
   SOBER GRID–STYLE FRONTLINE PEER GRID
   ========================================== */
.subnav-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-elevated);
  padding: 5px;
  border-radius: var(--radius-sm);
}

.subnav-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  padding: 9px 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 42px;
}

.subnav-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(4, 30, 66, 0.15);
}

.peer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@container (max-width: 310px) {
  .peer-grid {
    grid-template-columns: 1fr;
  }
}

.peer-tile {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  overflow: clip;
  transition: transform 0.14s ease, border-color 0.14s ease;
  box-shadow: var(--shadow-card);
}

.peer-tile:hover {
  transform: translateY(-2px);
  border-color: var(--bcff-red);
}

.peer-tile.sos-flare {
  border-color: var(--bcff-red);
  background: linear-gradient(180deg, rgba(191, 13, 24, 0.12) 0%, var(--bg-card) 100%);
}

.peer-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  position: relative;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 10px rgba(4, 30, 66, 0.25);
  overflow: visible;
}

.peer-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Clickable Post Author Profile Triggers */
.feed-author-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  padding: 3px 6px;
  margin: -3px -6px;
  transition: all 0.15s ease;
  user-select: none;
  background: transparent;
  border: none;
  text-align: left;
}

.feed-author-trigger:hover,
.feed-author-trigger:focus-visible {
  background: rgba(2, 132, 199, 0.08);
  outline: none;
}

.feed-author-trigger:hover .feed-author-name,
.feed-author-trigger:focus-visible .feed-author-name {
  color: #38bdf8;
  text-decoration: underline;
}

.feed-author-trigger:hover .peer-avatar,
.feed-author-trigger:focus-visible .peer-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px #38bdf8, 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comment-author-trigger {
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-author-trigger:hover,
.comment-author-trigger:focus-visible {
  color: #38bdf8 !important;
  text-decoration: underline;
}

/* Social Media Feed Photos, Videos & Comments */
.media-upload-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.media-upload-label {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  flex: 1 1 calc(50% - 6px);
  box-shadow: 0 2px 6px rgba(4, 30, 66, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.media-upload-label:hover,
.media-upload-label:active {
  border-color: var(--bcff-red);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

@media (min-width: 600px) {
  .media-upload-label {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

.feed-media-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  background: #000000;
  max-height: 320px;
}

.feed-media-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  background: #020617;
  cursor: zoom-in;
  transition: opacity 0.18s ease;
}

.feed-media-img:hover {
  opacity: 0.96;
}

.feed-media-video {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #000000;
  display: block;
}

.feed-media-wrapper {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #020617;
  border: 1px solid var(--border-subtle);
  margin: 10px 0;
  cursor: zoom-in;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feed-media-wrapper.feed-video-wrapper {
  cursor: default;
  background: #000000;
  flex-direction: column;
}

.media-expand-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  pointer-events: none;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.feed-media-wrapper:hover .media-expand-hint {
  opacity: 1;
}

.media-hint-pill {
  background: rgba(4, 30, 66, 0.88);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.video-theater-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(4, 30, 66, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}

.video-theater-btn:hover {
  background: rgba(191, 13, 24, 0.95);
  transform: scale(1.03);
}

/* =========================================================================
   FULLSCREEN MEDIA LIGHTBOX DIALOG (UNCROPPED PHOTOS & THEATER VIDEO PLAYER)
   ========================================================================= */
.media-lightbox-dialog {
  max-width: 95vw;
  width: 95vw;
  max-height: 95vh;
  background: rgba(3, 7, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
  margin: auto;
}

.media-lightbox-dialog::backdrop {
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: 95vh;
  width: 100%;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 5;
}

.lightbox-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-body {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  overflow: auto;
  background: #020617;
  min-height: 320px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.lightbox-video {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.lightbox-footer {
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 120px;
  overflow-y: auto;
}

.comments-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 0.8rem;
}

.comment-form {
  display: flex;
  gap: 6px;
}

.comment-form .form-input {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 0.88rem;
}

.peer-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  background: #22c55e;
}

.peer-status-dot.sos {
  background: #ef4444;
  animation: pulse 1.5s infinite;
}

.peer-status-dot.walk {
  background: #0ea5e9;
}

.peer-name {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

.peer-role-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-navy-soft);
  color: var(--text-primary);
}

.peer-distance {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.peer-streak {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-primary);
}

/* ==========================================
   MESSAGING / COMMS INBOX & CHAT THREADS
   ========================================== */
.chat-thread-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-thread-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.chat-thread-item.active {
  border-color: #1877f2 !important;
  background: #eff6ff !important;
  box-shadow: 0 1px 4px rgba(24, 119, 242, 0.12);
}

.chat-messages-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="dark"] .chat-messages-box {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-bubble.theirs {
  align-self: flex-start;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-bottom-left-radius: 4px;
}

[data-theme="dark"] .chat-bubble.theirs {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: #1877f2 !important;
  color: #ffffff !important;
  border: 1px solid #166fe5 !important;
  border-bottom-right-radius: 4px;
}

[data-theme="dark"] .chat-bubble.mine {
  background: #1877f2 !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}

.chat-bubble.theirs .chat-meta {
  color: #64748b !important;
}

.chat-bubble.mine .chat-meta {
  color: rgba(255, 255, 255, 0.9) !important;
}

.chat-meta {
  font-size: 0.68rem;
  opacity: 0.88;
  margin-bottom: 3px;
  font-weight: 700;
}

/* Main Content Area (Smartphone Portrait Spacing) */
.main-content {
  flex: 1;
  padding: 12px 12px calc(88px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-copyright-footer {
  margin-top: 8px;
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-version-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: flex;
}

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

/* Hero Mission Banner */
.hero-card {
  background: linear-gradient(135deg, #041e42 0%, #0a2e63 65%, #123973 100%);
  border: 2px solid #041e42;
  border-top: 5px solid #bf0d18;
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.hero-crest {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  border: 2px solid #bf0d18;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #bf0d18;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.hero-title {
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-mission {
  font-size: 0.88rem;
  color: #f1f5f9;
  margin-bottom: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bcff-stripes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.bcff-stripe {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: #bf0d18;
}

/* Buttons */
.btn-primary {
  background: #bf0d18;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  text-decoration: none;
}

.btn-teal {
  background: var(--accent-teal);
  color: #f8fafc;
  border: 1px solid var(--accent-sage);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-teal:hover {
  background: var(--accent-sage);
  color: #0a0f18;
}

[data-theme="dark"] .btn-teal {
  background: var(--accent-teal);
  border-color: var(--accent-sage);
  color: #f8fafc;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

/* Grid & Cards (Stacked for Rectangular Smartphone Form Ergonomics) */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elevated);
}

.card-title {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Badges & Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-veteran {
  background: var(--accent-navy-soft);
  color: var(--accent-navy);
  border: 1px solid var(--border-strong);
}

.badge-responder {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.badge-family {
  background: var(--accent-navy-soft);
  color: var(--accent-navy);
  border: 1px solid var(--border-strong);
}

.badge-all {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.badge-done {
  background: rgba(21, 128, 61, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.badge-muted {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #f59e0b !important;
  font-weight: 700;
}

.badge-banned {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid #ef4444 !important;
  font-weight: 800;
}

/* Subtle Cohort Micro-Theme Accent Borders & Distinct Tags */
.cohort-accent-k9 {
  border-left: 4.5px solid var(--martini-pink) !important;
}
.cohort-accent-responder {
  border-left: 4.5px solid var(--bcff-red) !important;
}
.cohort-accent-veteran {
  border-left: 4.5px solid #1e40af !important;
}
.cohort-accent-family {
  border-left: 4.5px solid #d97706 !important;
}
.cohort-accent-socal {
  border-left: 4.5px solid #0284c7 !important;
}
.cohort-accent-pnw {
  border-left: 4.5px solid #059669 !important;
}
.cohort-accent-southwest {
  border-left: 4.5px solid #ea580c !important;
}
.cohort-accent-texas {
  border-left: 4.5px solid #c2410c !important;
}
.cohort-accent-midwest {
  border-left: 4.5px solid #ca8a04 !important;
}
.cohort-accent-southeast {
  border-left: 4.5px solid #0d9488 !important;
}
.cohort-accent-midatlantic {
  border-left: 4.5px solid #4338ca !important;
}
.cohort-accent-northeast {
  border-left: 4.5px solid #b91c1c !important;
}
.cohort-accent-norcal {
  border-left: 4.5px solid #047857 !important;
}
.cohort-accent-national {
  border-left: 4.5px solid #475569 !important;
}

.cohort-badge-k9 {
  background: var(--martini-pink-bg) !important;
  color: var(--martini-pink-text) !important;
  border: 1px solid var(--martini-pink-soft) !important;
}
.cohort-badge-responder {
  background: var(--accent-primary-soft) !important;
  color: var(--accent-primary) !important;
  border: 1px solid var(--accent-primary) !important;
}
.cohort-badge-veteran {
  background: var(--accent-navy-soft) !important;
  color: var(--accent-navy) !important;
  border: 1px solid var(--border-strong) !important;
}
.cohort-badge-family {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
}
.cohort-badge-socal {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
}
.cohort-badge-pnw {
  background: rgba(5, 150, 105, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(5, 150, 105, 0.35) !important;
}
.cohort-badge-southwest {
  background: rgba(234, 88, 12, 0.12) !important;
  color: #ea580c !important;
  border: 1px solid rgba(234, 88, 12, 0.35) !important;
}
.cohort-badge-texas {
  background: rgba(194, 65, 12, 0.12) !important;
  color: #c2410c !important;
  border: 1px solid rgba(194, 65, 12, 0.35) !important;
}
.cohort-badge-midwest {
  background: rgba(202, 138, 4, 0.12) !important;
  color: #ca8a04 !important;
  border: 1px solid rgba(202, 138, 4, 0.35) !important;
}
.cohort-badge-southeast {
  background: rgba(13, 148, 136, 0.12) !important;
  color: #0d9488 !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
}
.cohort-badge-midatlantic {
  background: rgba(67, 56, 202, 0.12) !important;
  color: #4338ca !important;
  border: 1px solid rgba(67, 56, 202, 0.35) !important;
}
.cohort-badge-northeast {
  background: rgba(185, 28, 28, 0.12) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(185, 28, 28, 0.35) !important;
}
.cohort-badge-norcal {
  background: rgba(4, 120, 87, 0.12) !important;
  color: #047857 !important;
  border: 1px solid rgba(4, 120, 87, 0.35) !important;
}
.cohort-badge-national {
  background: rgba(71, 85, 105, 0.12) !important;
  color: #475569 !important;
  border: 1px solid rgba(71, 85, 105, 0.35) !important;
}

/* Course & Module Cards */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--border-subtle);
  border-left: 5px solid #0284c7;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.course-card:hover {
  border-color: #0284c7;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12);
}

.course-card .card-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
}

.course-card .card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.course-footer .btn-teal {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.course-footer .btn-teal:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.course-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
}

.course-friendly-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.course-modal-large .lesson-step-box strong {
  font-size: 1.15rem !important;
}

.course-modal-large .lesson-step-box .card-desc {
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
}

.course-modal-large .form-textarea {
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
}

/* Service Dog Hub */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--bcff-red);
  flex-shrink: 0;
}

.checklist-item.checked .checklist-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.checklist-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* Breathing Coach Visualizer */
.breathing-box {
  background: radial-gradient(circle at center, rgba(191, 13, 24, 0.12), transparent 70%), var(--bg-card);
  border: 2px solid var(--bcff-navy);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.breath-circle-wrap {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-circle {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bcff-navy), var(--bcff-navy-light));
  border: 3px solid var(--bcff-red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  transition: transform 4s ease-in-out, background 0.6s ease;
}

.breath-circle.inhale {
  transform: scale(1.45);
}

.breath-circle.hold {
  transform: scale(1.45);
  background: linear-gradient(135deg, var(--bcff-red), var(--bcff-red-bright));
}

.breath-circle.exhale {
  transform: scale(0.88);
}

.breath-phase {
  font-size: 0.92rem;
}

.breath-timer {
  font-size: 1.45rem;
}

/* Forms & Inputs (1rem = 16px to prevent iOS Safari auto-zoom) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  min-height: 48px;
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 1px;
}

.error-msg {
  display: none;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 2px;
}

.form-input:user-invalid,
.form-input.user-invalid-fallback {
  border-color: #dc2626;
  background-color: rgba(220, 38, 38, 0.06);
}

.form-input:user-invalid + .error-msg,
.form-input.user-invalid-fallback + .error-msg,
.checklist-item:has(input:user-invalid) + .error-msg,
.checklist-item:has(input.user-invalid-fallback) + .error-msg {
  display: block;
}

.form-input:required:user-valid {
  border-color: var(--accent-green);
}

.form-textarea {
  min-height: 82px;
  resize: vertical;
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mood-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.mood-btn.selected {
  border: 2px solid var(--bcff-red);
  background: var(--accent-primary-soft);
}

.mood-emoji {
  font-size: 1.3rem;
}

/* Crisis & Resource Directory Cards */
.resource-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-card.urgent {
  border: 2px solid var(--bcff-red);
  background: linear-gradient(180deg, rgba(191, 13, 24, 0.08) 0%, var(--bg-card) 100%);
}

.call-btn {
  background: var(--bcff-red);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}

/* Bottom Navigation Tab Bar (Clean 4-Tab Native Standard) */
.bottom-nav {
  position: sticky !important;
  bottom: 0 !important;
  left: 0 !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  background: var(--bg-glass) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid var(--border-hairline) !important;
  padding: 6px 8px calc(8px + var(--safe-bottom)) !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  z-index: 30 !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
  margin-top: auto;
}

@media (min-width: 600px) {
  .bottom-nav {
    display: grid !important;
  }
}

@media (min-width: 992px) {
  .bottom-nav {
    display: grid !important;
  }
}

.bottom-nav:has(#nav-admin[hidden]) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.nav-tab[hidden] {
  display: none !important;
}

.nav-tab {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 6px 4px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  border-radius: 10px !important;
  min-height: 46px !important;
  transition: all 0.15s ease !important;
  position: relative !important;
}

.nav-tab:hover {
  color: var(--text-primary) !important;
  background-color: var(--bg-card-hover) !important;
}

.nav-tab:active {
  transform: scale(0.94) !important;
}

.nav-tab.active {
  color: #1877f2 !important;
  font-weight: 700 !important;
  background: rgba(24, 119, 242, 0.08) !important;
}

[data-theme="dark"] .nav-tab.active {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-tab .nav-icon {
  font-size: 1.15rem !important;
  line-height: 1 !important;
  transition: transform 0.15s ease !important;
}

.nav-tab.active .nav-icon {
  transform: translateY(-1px) scale(1.05) !important;
}

.unread-pill {
  position: absolute;
  top: 2px;
  right: 10%;
  background: var(--bcff-red);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 999px;
}

/* Native <dialog> Modals (Sized to Fit Rectangular Smartphone Viewport) */
dialog.app-dialog {
  margin: auto;
  width: calc(100% - 20px);
  max-width: 440px;
  max-height: 88dvh;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: clip;
}

dialog.app-dialog::backdrop {
  background-color: rgba(5, 10, 18, 0.78);
  backdrop-filter: blur(6px);
}

/* Crisis Slide-Up Sheet on Mobile Viewports */
#crisisModal.app-dialog {
  border-top: 3px solid rgba(239, 68, 68, 0.65);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  max-width: 460px;
  width: 100%;
  margin-top: auto;
  margin-bottom: 0;
  animation: crisisSheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  #crisisModal.app-dialog {
    margin: auto;
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border-subtle);
  }
}

@keyframes crisisSheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-grab-bar {
  width: 42px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  margin: 6px auto 2px;
  display: block;
}

.dialog-inner {
  padding: 16px;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-close {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-white-10);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dialog-close:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.25);
}

.lesson-step-box {
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  border-left: 3px solid var(--accent-sage);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-entry {
  background: var(--bg-secondary);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.83rem;
}

/* =========================================================================
   CONSOLIDATED PROFILE & AMBASSADOR CARDS (TRAUMA-INFORMED IDENTITY)
   ========================================================================= */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.dot-online,
.status-dot.dot-on_watch,
.status-dot.dot-active {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}
.status-dot.dot-heavy_shift,
.status-dot.dot-quiet {
  background-color: #f59e0b;
}
.status-dot.dot-rough_waters {
  background-color: #f97316;
}
.status-dot.dot-in_bunker {
  background-color: #ef4444;
}

.profile-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-avatar-wrap .profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
}
.profile-avatar-wrap .avatar-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.clean-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-white-10);
  border-radius: 12px;
}

.clean-profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clean-profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.clean-profile-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.clean-profile-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.clean-profile-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

body.auth-view-active .bottom-nav,
body.auth-view-active .app-header {
  display: none !important;
}

.subtle-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 600;
}

.subtle-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(116, 168, 146, 0.08);
  color: var(--accent-sage);
  border: 1px solid rgba(116, 168, 146, 0.2);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* =========================================================================
   EXPANDABLE BIO WITH CLEAN READ MORE TOGGLE
   ========================================================================= */
.bio-expandable {
  margin-top: 6px;
}
.bio-expandable .bio-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}
.bio-expandable[data-expanded="true"] .bio-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.btn-read-more {
  background: none;
  border: none;
  color: var(--accent-sage);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.btn-read-more:hover {
  color: #a3b18a;
}

/* Secondary Disclaimers: Serene, Soft, Non-Distracting */
.secondary-disclaimer,
.non-clinical-notice {
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-white-10) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

/* Martini the Service Dog — Serene Warm Accent Cards */
.bcff-stripe-pink {
  flex: 1;
  background-color: var(--accent-sage);
  border-radius: 2px;
}

.martini-card {
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.martini-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.martini-accordion-frame {
  border: 1px solid var(--border-white-10) !important;
  background: var(--bg-card) !important;
}

.martini-header-pill {
  border-color: var(--border-white-10) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.martini-pill-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-white-10);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.martini-mascot-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.martini-mascot-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  flex-shrink: 0;
}

.badge-martini {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-white-10);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.btn-martini {
  background: rgba(116, 168, 146, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(116, 168, 146, 0.28);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  min-height: 36px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-martini:hover {
  background: rgba(116, 168, 146, 0.22);
  border-color: var(--accent-sage);
}

.peer-tile.martini-tile {
  border: 1px solid var(--border-white-10);
  background: var(--bg-card);
}

.peer-tile.martini-tile .peer-avatar {
  border-color: var(--border-white-10);
}

/* =========================================================================
   SMARTPHONE-FIRST APP BODY (Desktop Sidebar Disabled for Rectangular Phone Frame)
   ========================================================================= */
/* Responsive App Layout Body */
.app-layout-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.desktop-sidebar {
  display: none;
}

.desktop-nav-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.desktop-nav-btn[hidden] {
  display: none !important;
}

.desktop-nav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.desktop-nav-btn.active {
  background: var(--bcff-navy);
  color: #ffffff;
  border-color: var(--bcff-red);
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 6px;
  margin-bottom: 2px;
}

/* Red Accent Persistent Header Button: Anchoring & Support */
.anchoring-action-btn {
  background: linear-gradient(135deg, #bf0d18 0%, #9e0812 100%);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  min-height: 36px;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(191, 13, 24, 0.35);
  white-space: nowrap;
}

/* Sticky Daily Focus Banner at top of /feed */
.daily-focus-banner {
  background: linear-gradient(135deg, #041e42 0%, #0a2e63 65%, #7f1d1d 100%);
  color: #ffffff;
  border: 2px solid var(--martini-pink-bright);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

/* 4 Non-Verbal Safe Reactions Bar */
.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.reaction-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  min-height: 34px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.reaction-btn.active {
  background: var(--bcff-navy);
  color: #ffffff;
  border-color: var(--martini-pink-bright);
}

/* K9 Profile & Skills Box */
.k9-tag-box {
  background: var(--martini-pink-bg);
  border: 1.5px solid var(--martini-pink);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  width: 100%;
  margin-top: 4px;
  text-align: left;
}

.k9-skill-pill {
  display: inline-block;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  font-size: 0.67rem;
  font-weight: 700;
  margin: 2px 2px 0 0;
}

/* Deferred Below-the-Fold Rendering (modern-web-guidance: defer-rendering-heavy-content) */
.heavy-section-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 220px;
}

/* Moderation Queue Held Card */
.mod-held-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--bcff-red);
  border-left: 5px solid var(--bcff-red);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================================================================
   AUTHENTICATED ROLE BADGE PILLS
   ========================================================================= */
.role-status-pill {
  font-size: 0.62rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.role-status-pill.role-handler {
  background: #451a03;
  color: #fcd34d;
  border: 1px solid rgba(217, 119, 6, 0.5);
}

.role-status-pill.role-scout {
  background: #082f49;
  color: #7dd3fc;
  border: 1px solid rgba(2, 132, 199, 0.5);
}

.role-status-pill.role-admin {
  background: #450a0a;
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.5);
}


/* =========================================================================
   PROMINENT PAGE SWITCHER DROPDOWN MENU & DISTINCT PAGE BANNERS
   ========================================================================= */
.header-dropdown-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 12px 6px;
  background: transparent;
  border-top: none;
}

.page-dropdown-wrap {
  position: relative;
  min-width: 0;
}

.page-dropdown-trigger {
  width: 100%;
  min-height: 44px;
  background: linear-gradient(135deg, #0a2e63 0%, #041e42 100%);
  color: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  padding: 5px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.page-dropdown-trigger:hover,
.page-dropdown-trigger:focus-visible {
  border-color: #fde68a;
  background: linear-gradient(135deg, #103c7d 0%, #062852 100%);
}

.page-dropdown-kicker {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7dd3fc;
  line-height: 1.1;
}

.page-dropdown-current {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.page-dropdown-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 0.95rem;
  color: #fde68a;
  padding-left: 6px;
  font-weight: 900;
}

.cohort-dropdown-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 4px 8px;
  min-height: 44px;
  min-width: 0;
}

.cohort-dropdown-label {
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  line-height: 1.1;
}

.cohort-dropdown-select {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 0 0;
  outline: none;
  cursor: pointer;
  width: 100%;
  text-overflow: ellipsis;
}

.cohort-dropdown-select option {
  background: #041e42;
  color: #ffffff;
}

@media (max-width: 767px) {
  .cohort-dropdown-wrap {
    display: none !important;
  }
  .header-dropdown-bar {
    display: none !important;
  }
}

/* Popover Menu for Page Navigation */
.page-nav-popover {
  width: min(406px, calc(100vw - 20px));
  max-height: min(82vh, 620px);
  overflow-y: auto;
  margin: 62px auto auto;
  inset: 0;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(2, 16, 36, 0.75);
  z-index: 99999;
}

.page-nav-popover::backdrop {
  background: rgba(2, 16, 36, 0.55);
  backdrop-filter: blur(3px);
}

.page-nav-popover.fallback-open {
  display: block !important;
  position: fixed !important;
  top: 66px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 99999 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.page-nav-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.page-nav-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.page-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-nav-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.page-nav-option:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.page-nav-option.active {
  border: 2px solid var(--accent-primary);
  background: rgba(2, 132, 199, 0.12);
}

.page-nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: #ffffff;
}

.page-nav-icon.theme-grid {
  background: linear-gradient(135deg, #041e42, #1d4ed8);
}
.page-nav-icon.theme-feed {
  background: linear-gradient(135deg, #0f766e, #0284c7);
}
.page-nav-icon.theme-messages {
  background: linear-gradient(135deg, #065f46, #059669);
}
.page-nav-icon.theme-learn {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
}
.page-nav-icon.theme-wellness {
  background: linear-gradient(135deg, #1e1b4b, #6d28d9);
}
.page-nav-icon.theme-admin {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.page-nav-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.page-nav-text strong {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--text-primary);
}

.page-nav-text small {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

.page-nav-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  white-space: nowrap;
}

.page-nav-option.active .page-nav-badge {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.page-nav-popover-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.page-nav-util-btn {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.page-nav-util-btn.danger {
  color: var(--bcff-red);
  border-color: rgba(191, 13, 24, 0.45);
}

/* Serene, Calm Active Page Banner at Top of Viewport */
.active-page-banner {
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-white-10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, border-color 0.25s ease;
  margin-bottom: 8px;
}

.active-page-banner.page-theme-grid {
  border-left: 3px solid var(--accent-sage);
}

.active-page-banner.page-theme-feed {
  border-left: 3px solid #38bdf8;
}

.active-page-banner.page-theme-messages {
  border-left: 3px solid var(--accent-teal);
}

.active-page-banner.page-theme-learn {
  border-left: 3px solid #818cf8;
}

.active-page-banner.page-theme-wellness {
  border-left: 3px solid var(--accent-green);
}

.active-page-banner.page-theme-admin {
  border-left: 3px solid #f87171;
}

.active-page-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.active-page-banner-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.active-page-icon-pill {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.active-page-step-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.active-page-step-badge {
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.32);
  color: #fde68a;
  padding: 2px 7px;
  border-radius: 999px;
}

.active-page-filter-pill {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
}

.active-page-banner-title {
  font-size: 1.02rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  margin-top: 2px;
}

.active-page-banner-desc {
  display: none !important;
}

.active-page-switch-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.active-page-switch-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Directional Page Slide View Transitions (modern-web-guidance: directional-navigation-transitions) */
@keyframes slide-to-left {
  to {
    transform: translateX(-28%);
    opacity: 0;
  }
}
@keyframes slide-from-right {
  from {
    transform: translateX(28%);
    opacity: 0;
  }
}
@keyframes slide-to-right {
  to {
    transform: translateX(28%);
    opacity: 0;
  }
}
@keyframes slide-from-left {
  from {
    transform: translateX(-28%);
    opacity: 0;
  }
}

::view-transition-group(root) {
  animation-duration: 240ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html:active-view-transition-type(forward)::view-transition-old(root) {
  animation-name: slide-to-left;
}
html:active-view-transition-type(forward)::view-transition-new(root) {
  animation-name: slide-from-right;
}

html:active-view-transition-type(backward)::view-transition-old(root) {
  animation-name: slide-to-right;
}
html:active-view-transition-type(backward)::view-transition-new(root) {
  animation-name: slide-from-left;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) {
    animation-duration: 0s !important;
  }
}

/* Clean Expandable Accordions (<details class="clean-accordion">) for Decluttered Mobile Layout */
.clean-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clean-accordion {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.clean-accordion[open] {
  border-color: var(--accent-primary);
}

.clean-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  background: var(--bg-card);
}

.clean-accordion-summary::-webkit-details-marker {
  display: none;
}

.clean-accordion-summary:hover {
  background: var(--bg-card-hover);
}

.clean-accordion-tag {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 132, 199, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.clean-accordion[open] .clean-accordion-tag {
  background: var(--accent-primary);
  color: #ffffff;
}

.clean-accordion-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* Extra Breathing Room for Uncluttered Mobile Experience */
.main-content {
  gap: 14px;
  padding: 12px 12px 24px;
}

.tab-panel.active {
  gap: 14px;
}

.peer-grid {
  gap: 10px;
}

.peer-tile {
  padding: 12px 10px;
  gap: 5px;
}

.copyright-backdoor-trigger {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
  padding: 2px 3px;
  border-radius: 4px;
}

.copyright-backdoor-trigger:active {
  opacity: 0.7;
}

/* =========================================================================
   DESKTOP & TABLET RESPONSIVE SUITE (≥992px Viewports)
   Maintains pristine centered mobile-first shell matching vfr-team-hub
   ========================================================================= */
@media (min-width: 992px) {
  /* Enforce clean centered single-column body - NO sidebar */
  .app-layout-body {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .desktop-sidebar {
    display: none !important;
  }

  /* Main Content Area on Desktop */
  .main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 16px 14px 48px !important;
    gap: 16px;
  }

  /* Header & Dropdown Adjustments */
  .page-dropdown-wrap {
    display: none !important;
  }

  .header-dropdown-bar {
    display: none !important;
  }

  /* Page 1: Cohort & Handler Grid */
  .peer-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 12px !important;
  }

  /* Page 2: Safe Social Feed */
  #tab-feed.active {
    width: 100%;
  }

  /* Page 3: Mutual Comms & DMs */
  #tab-messages.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100%;
  }

  /* Page 4: Education Academy */
  #learnCoursesList {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100%;
  }

  /* Page 5: CBT-i & Wellness */
  #tab-wellness.active {
    width: 100%;
  }

  #tab-wellness .clean-accordion-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100%;
  }

  /* 10. Page 6: Admin Dashboard */
  .admin-telemetry-grid {
    gap: 12px !important;
  }

  .admin-telemetry-card {
    padding: 12px 14px !important;
  }

  /* 11. Modal Dialogs on Desktop */
  dialog.app-dialog {
    max-width: 620px !important;
    max-height: 82vh !important;
  }
}

/* Forced Colors / High Contrast Accessibility Support */
@media (forced-colors: active) {
  .card,
  .course-card,
  .resource-card,
  .peer-tile,
  .icon-btn,
  .track-pill,
  .martini-card,
  .reaction-btn,
  .mod-held-card,
  dialog.app-dialog {
    border: 2px solid CanvasText;
  }
  .track-pill.active,
  .btn-primary,
  .btn-teal,
  .btn-martini,
  .reaction-btn.active,
  .desktop-nav-btn.active {
    background: Highlight;
    color: HighlightText;
    border-color: HighlightText;
  }
}

/* =========================================================================
   VOICE DICTATION ACTIVE STATE
   ========================================================================= */
.link-btn.voice-listening,
.icon-btn.voice-listening {
  color: #ef4444 !important;
  font-weight: 900 !important;
  border-color: #ef4444 !important;
  animation: pulseDictate 1.2s infinite ease-in-out !important;
}

@keyframes pulseDictate {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.75; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================================
   CLINICIAN REPORT PRINT & PDF STYLES
   ========================================================================= */
.print-document-wrap {
  display: none;
}

@media print {
  @page {
    margin: 1.5cm;
    size: letter portrait;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  /* Hide app UI and all modals/toolbars */
  body > *:not(#clinicianPrintSection):not(#grantPrintSection),
  .app-header,
  .app-layout-body,
  .desktop-sidebar,
  .bottom-nav,
  .offline-banner,
  dialog,
  #offlineBanner {
    display: none !important;
  }

  #clinicianPrintSection,
  #grantPrintSection {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .print-header {
    border-bottom: 2px solid #041e42;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .print-title {
    font-size: 18pt;
    font-weight: 800;
    color: #041e42;
    margin: 0 0 4px 0;
  }

  .print-subtitle {
    font-size: 10pt;
    color: #475569;
    margin: 0;
  }

  .print-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
  }

  .print-meta-item {
    font-size: 9.5pt;
  }

  .print-meta-label {
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 8pt;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
  }

  .print-section {
    margin-bottom: 22px;
  }

  .print-section-title {
    font-size: 12pt;
    font-weight: 700;
    color: #041e42;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4px;
    margin-bottom: 10px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
    margin-top: 8px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    text-align: left;
  }

  .print-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
  }

  .print-disclaimer {
    margin-top: 30px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 8.5pt;
    color: #991b1b;
    line-height: 1.4;
  }
}

/* =========================================================================
   STEALTH PRIVACY OVERLAY / INSTANT BLINDER
   ========================================================================= */
.stealth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  user-select: none;
  cursor: pointer;
  padding: 20px;
}

.stealth-inner {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.stealth-time {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.05em;
  color: #38bdf8;
  line-height: 1.1;
}

.stealth-date {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 6px;
}

.stealth-status-card {
  margin-top: 28px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.stealth-chip {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 999px;
  margin-bottom: 8px;
}

.stealth-hint {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0;
}

[data-theme="redshift"] .stealth-overlay {
  background: #050102;
}

[data-theme="redshift"] .stealth-time {
  color: #f43f5e;
}

[data-theme="redshift"] .stealth-chip {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.15);
}

/* =========================================================================
   TACTICAL AMBIENT SOUNDSCAPES & K9 CHIPS
   ========================================================================= */
.soundscape-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.soundscape-pill {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.18s ease;
}

.soundscape-pill strong {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.soundscape-pill small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.soundscape-pill:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
}

.soundscape-pill.active {
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.12);
}

.soundscape-timer-pill {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.soundscape-timer-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.soundscape-timer-pill.active {
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.18);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

[data-theme="redshift"] .soundscape-timer-pill.active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.2);
  box-shadow: 0 0 0 1px #f43f5e;
}

[data-theme="redshift"] .soundscape-pill.active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
}

.k9-task-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.k9-task-chip:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.k9-task-chip.active {
  background: #d97706;
  color: #ffffff;
  border-color: #f59e0b;
}

[data-theme="redshift"] .k9-task-chip.active {
  background: #be123c;
  color: #fff1f2;
  border-color: #fda4af;
}

/* =========================================================================
   SUITE 1.8.0: ADA FLASHCARD, TRAINING LOGBOOK PRINT, DECOMPRESSION & BEACON
   ========================================================================= */
.ada-flashcard-body {
  background: #081325;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 18px;
  color: #f8fafc;
  font-family: inherit;
  transition: all 0.2s ease;
}

.ada-enlarged {
  font-size: 1.15rem !important;
  line-height: 1.65 !important;
}

.ada-enlarged .ada-q-box {
  font-size: 1.25rem !important;
  padding: 16px !important;
}

.ada-q-box {
  background: rgba(245, 158, 11, 0.14);
  border-left: 5px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
}

.ada-prohibit-box {
  background: rgba(239, 68, 68, 0.14);
  border-left: 5px solid #ef4444;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
}

.eow-step-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.eow-pacer-display {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3.5px solid #38bdf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  margin: 12px auto;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  transition: transform 3.8s ease-in-out;
}

.packing-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.packing-item-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.packing-item-row.checked span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.beacon-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  width: fit-content;
}

.beacon-on_watch {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.beacon-heavy_shift {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.beacon-rough_waters {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.beacon-in_bunker {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #trainingLogbookPrintModal,
  #trainingLogbookPrintModal * {
    visibility: visible !important;
  }
  #trainingLogbookPrintModal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    max-height: none !important;
    display: block !important;
  }
  #trainingLogbookPrintModal .dialog-inner {
    max-height: none !important;
    overflow: visible !important;
    padding: 24px !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .no-print {
    display: none !important;
  }
  .logbook-print-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 14px !important;
    font-size: 9.5pt !important;
    color: #0f172a !important;
  }
  .logbook-print-table th,
  .logbook-print-table td {
    border: 1px solid #94a3b8 !important;
    padding: 6px 8px !important;
    text-align: left !important;
  }
  .logbook-print-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
  }
}

/* =========================================================================
   COGNITIVE COMFORT & EASY READ MODE (Age, Low-Fatigue & Overwhelm Support)
   ========================================================================= */
body.cognitive-comfort {
  font-size: 112% !important;
  letter-spacing: 0.015em !important;
}

body.cognitive-comfort .card,
body.cognitive-comfort .course-card,
body.cognitive-comfort .lesson-step-box,
body.cognitive-comfort .log-entry {
  border-width: 2px !important;
  padding: 18px !important;
  line-height: 1.65 !important;
}

body.cognitive-comfort .card-title {
  font-size: 1.18rem !important;
  line-height: 1.4 !important;
}

body.cognitive-comfort .card-desc,
body.cognitive-comfort p,
body.cognitive-comfort li {
  font-size: 1rem !important;
  line-height: 1.7 !important;
}

body.cognitive-comfort .btn-primary,
body.cognitive-comfort .btn-teal,
body.cognitive-comfort .btn-outline,
body.cognitive-comfort .btn-secondary {
  min-height: 48px !important;
  font-size: 0.96rem !important;
  padding: 10px 18px !important;
  font-weight: 800 !important;
}

body.cognitive-comfort .badge {
  font-size: 0.82rem !important;
  padding: 4px 10px !important;
}

body.cognitive-comfort .desktop-nav-btn {
  min-height: 48px !important;
  font-size: 0.98rem !important;
  padding: 12px 14px !important;
}

body.cognitive-comfort .bottom-nav .nav-tab {
  padding: 8px 4px !important;
}

body.cognitive-comfort .bottom-nav .nav-tab span:last-child {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

body.cognitive-comfort .active-page-banner-title {
  font-size: 1.35rem !important;
}

body.cognitive-comfort .active-page-banner-desc {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

body.cognitive-comfort .icon-btn {
  min-width: 42px !important;
  min-height: 42px !important;
  font-size: 0.82rem !important;
}

/* Easy Read toggle button active state */
#toggleEasyReadBtn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

/* 1-Tap Training Duration Chips */
.duration-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.duration-chip {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.duration-chip:hover {
  border-color: #38bdf8;
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.08);
}

.duration-chip.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.4);
}

/* Page 4 Subnav Switcher */
.page4-subnav-btn {
  transition: all 0.18s ease;
}

.page4-subnav-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

body.cognitive-comfort .duration-chip {
  min-height: 40px !important;
  font-size: 0.88rem !important;
  padding: 6px 14px !important;
}

body.cognitive-comfort .page4-subnav-btn {
  min-height: 52px !important;
  font-size: 1.02rem !important;
}

/* Educational Course Multimedia & Lesson Step Builder */
.course-media-box {
  transition: border-color 0.2s ease;
}

.course-media-box video,
.course-media-box audio {
  outline: none;
}

.admin-step-row {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.admin-step-row:focus-within {
  border-color: var(--accent-primary) !important;
}

.admin-step-heading-input {
  font-weight: 700;
  font-size: 0.88rem;
}

.admin-step-body-input {
  font-size: 0.84rem;
  line-height: 1.5;
}

/* =========================================================================
   CONFIDENTIAL SELF-SCREENING HUB (SECONDARY PREVENTION)
   ========================================================================= */
.screener-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 580px) {
  .screener-tabs {
    grid-template-columns: 1fr;
  }
}

.screener-tab-btn {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.screener-tab-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.screener-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.screener-q-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .screener-q-card,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-q-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .screener-q-text,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-q-text {
  color: #041e42 !important;
}

[data-theme="light"] .screener-q-desc,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-q-desc {
  color: #334155 !important;
}

[data-theme="light"] .screener-rating-btn,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #041e42 !important;
}

[data-theme="light"] .screener-rating-btn .screener-rating-val,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn .screener-rating-val {
  color: #041e42 !important;
}

[data-theme="light"] .screener-rating-btn .screener-rating-lbl,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn .screener-rating-lbl {
  color: #475569 !important;
}

[data-theme="light"] .screener-rating-btn:hover,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn:hover {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .screener-rating-btn.active,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

[data-theme="light"] .screener-rating-btn.active .screener-rating-val,
[data-theme="light"] .screener-rating-btn.active .screener-rating-lbl,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn.active .screener-rating-val,
:root:not([data-theme="dark"]):not([data-theme="redshift"]) .screener-rating-btn.active .screener-rating-lbl {
  color: #ffffff !important;
}

/* Dark mode contrast */
[data-theme="dark"] .screener-q-card,
[data-theme="redshift"] .screener-q-card {
  background: rgba(15, 30, 56, 0.95) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .screener-q-text,
[data-theme="redshift"] .screener-q-text {
  color: #ffffff !important;
}

[data-theme="dark"] .screener-q-desc,
[data-theme="redshift"] .screener-q-desc {
  color: #93c5fd !important;
}

[data-theme="dark"] .screener-rating-btn,
[data-theme="redshift"] .screener-rating-btn {
  background: rgba(8, 20, 40, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .screener-rating-btn .screener-rating-val,
[data-theme="redshift"] .screener-rating-btn .screener-rating-val {
  color: #ffffff !important;
}

[data-theme="dark"] .screener-rating-btn .screener-rating-lbl,
[data-theme="redshift"] .screener-rating-btn .screener-rating-lbl {
  color: #cbd5e1 !important;
}

.screener-q-card:focus-within,
.screener-q-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

.screener-q-text {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.screener-q-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.45;
}

.screener-rating-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .screener-rating-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.screener-rating-btn {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.screener-rating-val {
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.screener-rating-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.2;
}

.screener-rating-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-soft);
}

.screener-rating-btn:hover .screener-rating-val,
.screener-rating-btn:hover .screener-rating-lbl {
  color: var(--accent-primary);
}

.screener-rating-btn.active {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.screener-rating-btn.active .screener-rating-val,
.screener-rating-btn.active .screener-rating-lbl {
  color: #ffffff !important;
}

.screener-result-box {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 2px solid;
  transition: all 0.2s ease;
}

.screener-result-green {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

.screener-result-yellow {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
}

.screener-result-red {
  background: rgba(191, 13, 24, 0.12);
  border-color: var(--bcff-red);
}

/* =========================================================================
   CROSS-DEVICE STATION SYNC & LIVE CLOUD INDICATOR (v2.0.6)
   ========================================================================= */
.cloud-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cloud-sync-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
}

.cloud-sync-btn.syncing #headerSyncIcon,
.sync-spin {
  display: inline-block;
  animation: spinSyncIcon 1s linear infinite;
}

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

#syncDeviceModal {
  max-width: 580px;
}

#syncQrCodeContainer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

#syncQrCodeContainer img {
  border-radius: 6px;
  display: block;
}

.sync-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.sync-status-dot.synced {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.sync-status-dot.syncing {
  background-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
  animation: pulseSyncDot 1s infinite alternate;
}

.sync-status-dot.error {
  background-color: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

@keyframes pulseSyncDot {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

#headerUserCallsign {
  max-width: 55px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  font-size: 11px;
}

@media (max-width: 600px) {
  #headerUserCallsign {
    max-width: 55px;
  }
}

/* =========================================================================
   TRAUMA-INFORMED 4-CARD MINIMALIST DASHBOARD & COHORT SILOING
   ========================================================================= */

/* Dynamic Cohort Unit Selector Rail */
.cohort-unit-selector-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(13, 59, 102, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cohort-unit-selector-rail::-webkit-scrollbar {
  display: none;
}

.unit-selector-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 4px;
}

.unit-badge-btn {
  background: rgba(13, 43, 94, 0.7);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.unit-badge-btn:hover {
  background: rgba(244, 211, 94, 0.18);
  color: #ffffff;
  border-color: var(--accent-gold);
}

.unit-badge-btn.active {
  background: var(--accent-teal);
  color: #f8fafc;
  border-color: var(--accent-sage);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* =========================================================================
   HERO OPERATIONS (MODULE A) & WHAT WE DELIVER (MODULE B) - UNIFIED IDENTITY
   ========================================================================= */
.hero-split-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
}

/* Module A: Hero Operations & Family Welcome Card */
.hero-operations-card {
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-3xl);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .hero-operations-card {
    padding: 36px 32px;
  }
}

.hero-eyebrow {
  color: var(--brand-crimson);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-headline {
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero-headline .text-crimson {
  color: var(--brand-crimson);
}

.hero-subtitle {
  font-size: clamp(0.90rem, 1.15vw, 1.02rem);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 22px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-pill-crimson {
  background: var(--brand-crimson);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(217, 4, 41, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-pill-crimson:hover {
  background: var(--brand-crimson-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 4, 41, 0.45);
}

.btn-pill-outline {
  background: #FFFFFF;
  color: var(--brand-navy) !important;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-pill-outline:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  transform: translateY(-1px);
}

.hero-guarantee-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  margin-top: 4px;
}

.hero-guarantee-note .pip-emerald {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

/* Module B: Dark Feature Panel (What We Deliver) */
.dark-feature-panel {
  background: linear-gradient(180deg, #111419 0%, #0F1115 60%, #0B0D11 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-3xl);
  padding: 24px 20px;
  color: #FFFFFF;
  box-shadow: var(--shadow-obsidian);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .dark-feature-panel {
    padding: 32px 28px;
  }
}

.dark-feature-eyebrow {
  color: var(--brand-crimson);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dark-feature-title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 20px;
}

.dark-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dark-feature-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.dark-feature-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dark-feature-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.dark-feature-sub {
  font-size: 0.82rem;
  color: #9CA3AF;
  line-height: 1.45;
  margin: 0;
}

/* =========================================================================
   MODULE C: INTERACTIVE K9 GEAR & SPONSORSHIP TIER SLIDER
   ========================================================================= */
.k9-sponsorship-module {
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-3xl);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .k9-sponsorship-module {
    padding: 32px 28px;
  }
}

.k9-sponsorship-header {
  margin-bottom: 18px;
}

.k9-sponsorship-title {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0F172A;
  margin: 0 0 8px;
}

.k9-sponsorship-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* 6 Tier Buttons Selector Bar */
.tier-pill-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

@media (min-width: 768px) {
  .tier-pill-selector {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
}

.tier-pill-btn {
  background: #F9FAFB;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-2xl);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tier-pill-btn:hover {
  border-color: #D1D5DB;
  background: #F3F4F6;
}

.tier-pill-btn.active {
  background: #0F1115;
  border-color: var(--brand-crimson);
  box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.4);
}

.tier-pill-amount {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.tier-pill-btn.active .tier-pill-amount {
  color: #FFFFFF;
}

.tier-pill-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tier-pill-btn.active .tier-pill-label {
  color: #FCA5A5;
}

/* Range Slider Control */
.tier-slider-wrapper {
  background: #F9FAFB;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-2xl);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.tier-slider-labels-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tier-slider-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tier-slider-active-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--brand-crimson);
  background: #FDF2F2;
  border: 1px solid #F8B4B4;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.tier-range-input {
  width: 100%;
  accent-color: var(--brand-crimson);
  cursor: pointer;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #E5E7EB;
  margin: 6px 0;
}

.tier-slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Dynamic Obsidian Feature Card for the Selected Tier */
.tier-dynamic-obsidian-card {
  background: linear-gradient(180deg, #111419 0%, #0F1115 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-3xl);
  padding: 22px 18px;
  color: #FFFFFF;
  box-shadow: var(--shadow-obsidian);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  box-sizing: border-box;
}

@media (min-width: 860px) {
  .tier-dynamic-obsidian-card {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    padding: 28px 26px;
  }
}

.tier-card-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tier-tag-pill {
  background: rgba(217, 4, 41, 0.2);
  color: #FCA5A5;
  border: 1px solid rgba(217, 4, 41, 0.5);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tier-tag-sub {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
}

.tier-card-heading {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.tier-card-desc {
  font-size: 0.85rem;
  color: #CBD5E1;
  line-height: 1.5;
  margin: 0 0 14px;
}

.tier-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.80rem;
  color: #9CA3AF;
  line-height: 1.4;
}

.tier-dynamic-side-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zero-overhead-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zero-overhead-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-crimson-bright);
}

.zero-overhead-text {
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.4;
  margin: 0;
}

.tier-breakdown-link {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s ease;
  padding: 4px;
}

.tier-breakdown-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Minimalist 4-Card Dashboard Grid */
.dashboard-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

@media (min-width: 840px) {
  .dashboard-hub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.dashboard-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-2xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elevated);
}

.hub-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.hub-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  border: 1px solid var(--border-hairline);
  background: #F9FAFB;
}

.hub-card-text {
  flex: 1;
}

.hub-card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-crimson);
  margin-bottom: 4px;
}

.hub-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0F172A;
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hub-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.hub-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.btn-calm-action {
  background: var(--brand-crimson);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 0.80rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(217, 4, 41, 0.25);
  text-decoration: none;
}

.btn-calm-action:hover {
  background: var(--brand-crimson-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.35);
}

.btn-calm-secondary {
  background: #FFFFFF;
  color: var(--brand-navy);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-calm-secondary:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

/* Progressive Disclosure Drawer inside cards */
.hub-card-drawer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 211, 94, 0.15);
  animation: fadeIn 0.25s ease-out;
}

/* Decompression Box Breathing Widget */
.box-breathing-box {
  background: rgba(10, 35, 75, 0.85);
  border: 1px solid rgba(244, 211, 94, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.breath-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-visual-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid var(--accent-sage);
  background: radial-gradient(circle, rgba(116, 168, 146, 0.2) 0%, rgba(10, 15, 24, 0) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease;
}

.breath-visual-circle.inhale {
  transform: scale(1.3);
  border-color: var(--accent-sage);
}

.breath-visual-circle.hold {
  transform: scale(1.3);
  border-color: var(--accent-teal);
}

.breath-visual-circle.exhale {
  transform: scale(0.85);
  border-color: #38bdf8;
}

.breath-instruction-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 6px;
}

.breath-timer-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-sage);
  font-variant-numeric: tabular-nums;
}

/* 5-4-3-2-1 Sensory Scan */
.sensory-scan-card {
  background: rgba(10, 35, 75, 0.85);
  border: 1px solid rgba(244, 211, 94, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

/* Skills Academy Chip Previews */
.academy-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.academy-chip {
  background: rgba(13, 59, 102, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.academy-chip:hover {
  background: rgba(13, 59, 102, 0.95);
  border-color: rgba(244, 211, 94, 0.4);
}

.chip-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-sage);
  background: rgba(116, 168, 146, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.academy-chip strong {
  display: block;
  font-size: 0.85rem;
  color: #ffffff;
}

.academy-chip span {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
}

/* Daily Anchor Quiet Box */
.daily-anchor-quiet-box {
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  border-left: 3px solid var(--accent-sage);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.anchor-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-sage);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.anchor-question {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  margin: 0 0 4px;
}

.anchor-subtext {
  font-size: 0.76rem;
  color: #94a3b8;
  margin: 0;
}

/* Accordion Toggle Button */
.btn-accordion-toggle {
  width: 100%;
  background: var(--bg-card);
  color: #e2e8f0;
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-accordion-toggle:hover {
  background: rgba(116, 168, 146, 0.12);
  border-color: var(--accent-sage);
  color: #ffffff;
}

.badge-calm-pill {
  background: rgba(116, 168, 146, 0.14);
  color: var(--accent-sage);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
}

/* VFR Technical Training Firewall Box */
.vfr-firewall-box {
  background: rgba(10, 35, 75, 0.85);
  border: 1px solid rgba(244, 211, 94, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}

/* Silent Non-Stress Indicators: Suppress alarming red unread dots */
.unread-badge, .unread-pill, .pulse-dot {
  display: none !important;
}

/* =========================================================================
   MULTI-BADGE COHORT SELECTION & TRAUMA-INFORMED PREFERENCES
   ========================================================================= */
.multi-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 620px) {
  .multi-badge-grid {
    grid-template-columns: 1fr;
  }
}

.badge-select-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.badge-select-card:hover {
  border-color: var(--accent-sage);
  background: rgba(116, 168, 146, 0.08);
}

.badge-select-card:has(input:checked) {
  border-color: var(--accent-sage);
  background: rgba(116, 168, 146, 0.14);
  box-shadow: 0 0 10px rgba(116, 168, 146, 0.15);
}

.badge-select-card input[type="checkbox"] {
  accent-color: var(--accent-sage);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.badge-card-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.badge-card-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.badge-card-content strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-primary);
  line-height: 1.25;
}

.badge-card-content small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 2px;
}

.preferences-toggle-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preferences-toggle-stack .checklist-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.user-multi-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-white-10);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.unit-role-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(116, 168, 146, 0.12);
  color: var(--accent-sage);
  border: 1px solid rgba(116, 168, 146, 0.25);
  margin-left: 6px;
}

/* Reduced Animations & Low Stimulation Support */
html.reduce-motion *,
body.reduce-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body.low-stimulation {
  --bg-primary: #0a192f;
  --bg-secondary: #0d2744;
  --border-subtle: rgba(148, 163, 184, 0.18);
  --text-muted: #94a3b8;
}

body.low-stimulation .badge-unread,
body.low-stimulation .notification-dot,
body.low-stimulation .alert-badge {
  background: rgba(100, 116, 139, 0.4) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  box-shadow: none !important;
}

body.low-stimulation button:focus-visible,
body.low-stimulation a:focus-visible,
body.low-stimulation input:focus-visible,
body.low-stimulation select:focus-visible,
body.low-stimulation textarea:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

/* =========================================================================
   MARTINI'S BIOFEEDBACK SANCTUARY: WEATHER TO SONGBIRDS
   ========================================================================= */
.biofeedback-sanctuary-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--martini-pink-soft);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(244, 114, 182, 0.05) 100%);
  padding: 16px;
  margin-bottom: 14px;
}

.biofeedback-mode-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.biofeedback-mode-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.biofeedback-mode-btn:hover {
  border-color: var(--martini-pink);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.biofeedback-mode-btn.active {
  border-color: var(--martini-pink);
  background: var(--martini-pink-bg);
  color: var(--martini-pink-text);
  box-shadow: 0 0 0 1px var(--martini-pink);
}

.biofeedback-orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  text-align: center;
}

.biofeedback-breath-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.25) 0%, rgba(56, 189, 248, 0.1) 70%, transparent 100%);
  border: 2.5px solid var(--martini-pink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 3.8s ease-in-out, border-color 0.5s ease, box-shadow 0.5s ease;
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.2);
  margin-bottom: 14px;
}

.biofeedback-breath-orb.inhale {
  transform: scale(1.35);
  border-color: #38bdf8;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.4);
}

.biofeedback-breath-orb.hold {
  transform: scale(1.35);
  border-color: #a855f7;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.4);
}

.biofeedback-breath-orb.exhale {
  transform: scale(0.85);
  border-color: var(--martini-pink);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.25);
}

.biofeedback-calm-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.biofeedback-calm-fill {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 50%, var(--martini-pink) 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bird-flock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--martini-pink-bg);
  color: var(--martini-pink-text);
  border: 1px solid var(--martini-pink-soft);
}

/* =========================================================================
   FLOATING HOME BUTTON, UNREAD NOTIFICATIONS, BOARD BADGE & PRIVATE COMMS
   ========================================================================= */
.floating-home-btn {
  position: fixed;
  bottom: calc(var(--bottom-nav-h, 60px) + env(safe-area-inset-bottom, 0px) + 14px);
  right: 14px;
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--accent-sage);
  border: 1px solid rgba(116, 168, 146, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  user-select: none;
}
.floating-home-btn:hover {
  background: rgba(22, 36, 58, 0.98);
  border-color: var(--accent-sage);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}
.floating-home-btn:active {
  transform: translateY(0) scale(0.96);
}
body.auth-view-active .floating-home-btn {
  display: none !important;
}

.nav-unread-dot {
  position: absolute;
  top: -3px;
  right: -7px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border: 1.5px solid #0f172a;
  border-radius: 50%;
  animation: pulseUnreadDot 2s infinite;
}
@keyframes pulseUnreadDot {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
  100% { transform: scale(1); opacity: 0.9; }
}

.incoming-msg-toast {
  position: fixed;
  top: calc(var(--app-header-h, 56px) + env(safe-area-inset-top, 0px) + 8px);
  left: 16px;
  right: 16px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(116, 168, 146, 0.5);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: toastSlideDown 0.3s ease-out;
}
@keyframes toastSlideDown {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.badge-board {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.5);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.private-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
}
.private-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--accent-sage);
  background: rgba(116, 168, 146, 0.12);
  border: 1px solid rgba(116, 168, 146, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 3px;
  font-weight: 600;
}
.dot-synced {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* =========================================================================
   CLEAN-SWEEP UI & ARCHITECTURE MAKEOVER STYLING (matching vfr-team-hub)
   ========================================================================= */

/* Top Subtle Patriotic Accent Bar */
.splash-patriotic-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to right, #0f172a, #1877f2, #f59e0b);
  z-index: 10;
}

.splash-container {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px 24px;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.splash-hero-section {
  margin-block: auto;
  padding-block: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.splash-logo-card {
  width: 100%;
  max-width: 260px;
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.splash-logo-card:active {
  transform: scale(0.98);
}

.splash-logo-img {
  width: auto;
  max-height: 110px;
  object-fit: contain;
}

.splash-motto-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 9999px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #1e293b;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.splash-quote-card {
  width: 100%;
  border-radius: 24px;
  background: linear-gradient(to bottom, #f8fafc, rgba(239, 246, 255, 0.4));
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.splash-quote-text {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.01em;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-quote-subtext {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
}

.splash-quote-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 4px;
}

.splash-quote-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quote-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #cbd5e1;
  transition: all 0.2s ease;
  cursor: pointer;
}

.quote-dot.active {
  width: 22px;
  background-color: #1877f2;
}

.splash-next-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.splash-next-quote-btn:hover {
  background: #f8fafc;
  color: #1877f2;
}

.splash-auth-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.splash-form {
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.splash-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
}

.splash-input {
  width: 100%;
  font-size: 13px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  color: #0f172a !important;
  box-sizing: border-box;
}

.splash-input:focus {
  outline: none;
  border-color: #1877f2 !important;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
}

.splash-btn-primary {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: #1877f2;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.splash-btn-primary:hover {
  background: #166fe5;
}

.splash-btn-primary:active {
  transform: scale(0.99);
}

.splash-switch-link {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
}

.splash-switch-link:hover {
  color: #475569;
}

.splash-hint-text {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  text-align: center;
  margin: 0;
}

.splash-footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.splash-footer-links {
  margin: 0;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.splash-footer-links a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
}

.splash-footer-links a:hover {
  color: #1877f2;
}

/* Admin Backdoor Top Active Banner */
.admin-backdoor-banner {
  background: #0f172a;
  color: #ffffff;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 35;
}

.admin-banner-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #fcd34d;
}

.admin-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-banner-btn-blue {
  padding: 4px 10px;
  border-radius: 8px;
  background: #1877f2;
  color: #ffffff;
  font-weight: 700;
  font-size: 10.5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-banner-btn-blue:hover {
  background: #166fe5;
}

.admin-banner-btn-dark {
  padding: 4px 8px;
  border-radius: 8px;
  background: #1e293b;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 10.5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-banner-btn-dark:hover {
  background: #334155;
}

/* =========================================================================
   STANDALONE SUB-APP & MDT MODE (?app=downshift, ?app=fieldguide, ?app=rollcall)
   ========================================================================= */
body.subapp-mode .bottom-nav {
  display: none !important;
}

body.subapp-mode .admin-backdoor-banner {
  display: none !important;
}

/* In downshift sub-app: focus directly on downshift suite and 4x4 pacer */
body.subapp-downshift #tab-wellness {
  padding-top: 10px;
}

body.subapp-downshift .app-clean-footer {
  display: none;
}

/* In rollcall sub-app: highlight the daily shift anchor card */
body.subapp-rollcall .hero-split-grid {
  display: none !important;
}

body.subapp-rollcall #hubCardRollCall {
  box-shadow: 0 0 0 2px var(--brand-crimson), var(--shadow-elevated) !important;
}

/* Clean Non-Profit Footer */
.app-clean-footer {
  padding: 20px 16px;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, 0.9);
  font-size: 10.5px;
  line-height: 1.5;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
}

.footer-copy {
  margin: 0;
  font-weight: 600;
  color: #64748b;
}

.footer-credits {
  margin: 0;
}

.footer-credits a,
.footer-ein a {
  color: #64748b;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.footer-credits a:hover,
.footer-ein a:hover {
  color: #1877f2;
}

.footer-ein {
  margin: 0;
  font-weight: 500;
  color: #64748b;
}

/* Agency Deployment & White-Label Customization Modal */
.agency-preset-quick-btn {
  width: 100%;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  transition: all 0.2s ease;
}

.agency-preset-quick-btn:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.04);
}

.agency-preset-quick-btn.active {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
  box-shadow: 0 0 0 1px #1877f2;
}

.agency-preset-quick-btn[data-agency-preset="county_sheriff"].active {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.08);
  box-shadow: 0 0 0 1px #d97706;
}

.agency-preset-quick-btn[data-agency-preset="municipal_police"].active {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
  box-shadow: 0 0 0 1px #1877f2;
}

.agency-preset-quick-btn[data-agency-preset="state_patrol"].active {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  box-shadow: 0 0 0 1px #0284c7;
}

.agency-preset-quick-btn[data-agency-preset="dispatch_psap"].active {
  border-color: #0d9488;
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 1px #0d9488;
}

.agency-preset-quick-btn[data-agency-preset="fire_ems"].active {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  box-shadow: 0 0 0 1px #dc2626;
}










