:root {
  /* Airy Botanical Daylight Canvas */
  --bg-canvas: #f3f7f2;
  --bg-canvas-tint: #e6efe4;
  --surface-white: #ffffff;
  --surface-cream: #fafbf7;
  --surface-sage: #edf4ec;
  --border-soft: #d8e5d6;

  /* Text Hierarchy */
  --ink-primary: #141d18;
  --ink-secondary: #4c5d54;
  --ink-muted: #708077;

  /* Nixtio Botanical Forest Hero & Bioluminescent Emerald */
  --forest-deep: #13251b;
  --forest-mid: #1d3c2b;
  --emerald: #2b9a5b;
  --emerald-bright: #49c983;
  --emerald-soft: rgba(43, 154, 91, 0.12);

  /* Clinical Spectrum & Bento Palette */
  --coral: #e14e3a;
  --amber: #e2911d;
  --lime: #94bd42;
  --cerulean: #3b82be;
  --violet: #6f42c1;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;

  --shadow-airy: 0 14px 36px rgba(20, 38, 28, 0.06);
  --shadow-hero: 0 22px 48px rgba(19, 37, 27, 0.22);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(73, 201, 131, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 88% 15%, rgba(169, 209, 174, 0.25) 0%, transparent 45%),
    linear-gradient(170deg, var(--bg-canvas) 0%, var(--bg-canvas-tint) 100%);
  background-attachment: fixed;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px 84px 22px;
}

/* Focus Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
label:focus-visible {
  outline: 2.5px solid var(--emerald);
  outline-offset: 2px;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-airy);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--forest-mid), var(--forest-deep));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(19, 37, 27, 0.16);
}

.brand-copy h1 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.brand-copy p {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Segmented Pill Navigation */
.pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-sage);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
}

.nav-pill {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-pill:hover {
  color: var(--ink-primary);
}

.nav-pill.active {
  background: var(--forest-deep);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(19, 37, 27, 0.18);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-soft {
  background: var(--surface-sage);
  color: var(--forest-mid);
  border: 1px solid var(--border-soft);
}

.chip-sage {
  background: #dfece0;
  color: var(--forest-deep);
}

.chip-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #e6f4ea;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.chip-button {
  background: #ffffff;
  color: var(--ink-primary);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.chip-button:hover {
  background: var(--surface-sage);
  border-color: var(--emerald);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 5px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--emerald);
}

.avatar-md {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(73, 201, 131, 0.75);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--emerald);
}

.user-pill-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-pill-name {
  font-size: 12px;
  font-weight: 700;
}

.user-pill-email {
  font-size: 10px;
  color: var(--ink-muted);
}

/* ================================================================ */
/* PRE-AUTH SIGN-IN STAGE & POST-LOGIN ONBOARDING                   */
/* ================================================================ */
.auth-stage {
  display: flex;
  justify-content: center;
  padding: 18px 0 28px 0;
}

.auth-panel-centered {
  width: 100%;
  max-width: 500px;
}

.onboarding-stage-shell {
  max-width: 780px;
  margin: 10px auto 32px auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-user-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-airy);
}

.onboard-greeting {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink-primary);
}

.onboard-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.onboarding-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-airy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.onboarding-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.onboarding-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.step-pill {
  border: 1px solid var(--border-soft);
  background: var(--surface-cream);
  color: var(--ink-secondary);
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.step-pill.active {
  background: var(--forest-deep);
  color: #ffffff;
  border-color: var(--forest-deep);
}

.step-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.onboarding-stage {
  min-height: 310px;
}

.slide-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.badge-emerald {
  background: rgba(43, 154, 91, 0.12);
  color: #1c7443;
}

.badge-sage {
  background: #e1ede2;
  color: #2c5c39;
}

.badge-amber {
  background: rgba(226, 145, 29, 0.15);
  color: #9e5d06;
}

.badge-danger {
  background: rgba(225, 78, 58, 0.14);
  color: #b42c1a;
}

.slide h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.slide-lead {
  color: var(--ink-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.feature-icon,
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-sage);
  color: var(--forest-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.feature-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.feature-item p {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.onboarding-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.dot-group {
  display: flex;
  gap: 7px;
}

.pager-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #cddbc9;
  transition: width 0.2s ease, background 0.2s ease;
}

.pager-dot.active {
  width: 22px;
  background: var(--emerald);
}

.onboarding-arrows {
  display: flex;
  gap: 8px;
}

/* Right Auth Card */
.auth-panel {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-airy);
  display: flex;
  flex-direction: column;
}

.auth-aura {
  padding: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 75% 20%, rgba(73, 201, 131, 0.45) 0%, transparent 58%),
    radial-gradient(circle at 15% 90%, rgba(43, 154, 91, 0.35) 0%, transparent 55%),
    linear-gradient(155deg, #122219 0%, #1d3a29 100%);
}

.aura-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 600;
  color: #d4f4de;
  margin-bottom: 12px;
}

.auth-aura h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.auth-aura p {
  font-size: 13.5px;
  color: rgba(236, 247, 239, 0.82);
}

.auth-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #ffffff;
  color: #1f2937;
  border: 1.5px solid #cbd9c9;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 38, 28, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-google:hover {
  transform: translateY(-1px);
  border-color: var(--emerald);
  box-shadow: 0 10px 24px rgba(43, 154, 91, 0.15);
}

.btn-google:disabled {
  opacity: 0.65;
  cursor: wait;
}

.oauth-hint {
  background: rgba(226, 145, 29, 0.1);
  border: 1px solid rgba(226, 145, 29, 0.35);
  color: #7c4704;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
}

.oauth-hint p {
  margin-top: 4px;
  line-height: 1.45;
}

.field-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.field-group input,
.field-group select,
.marker-inputs input,
.marker-inputs select,
.input-btn-row input {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-cream);
  color: var(--ink-primary);
  font-size: 13px;
}

/* Common Buttons */
.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border-soft);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-soft-emerald {
  background: var(--surface-sage);
  color: var(--forest-deep);
  border: 1px solid #c5dac2;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease;
}

.btn-soft-emerald:hover {
  background: #dcecd9;
}

.btn-forest {
  background: var(--forest-deep);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-forest:hover {
  background: var(--forest-mid);
}

.btn-danger-soft {
  background: rgba(225, 78, 58, 0.1);
  color: #b42c1a;
  border: 1px solid rgba(225, 78, 58, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.btn-danger-soft:hover {
  background: rgba(225, 78, 58, 0.18);
  border-color: rgba(225, 78, 58, 0.45);
}

.btn-danger-lg {
  padding: 9px 18px;
  font-size: 13px;
}

.btn-danger {
  background: #c93422;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease;
}

.btn-danger:hover {
  background: #a82515;
}

.btn-danger:disabled,
.btn-danger-soft:disabled {
  opacity: 0.65;
  cursor: wait;
}

.full-w {
  width: 100%;
}

/* ================================================================ */
/* SECTION 1: TODAY (HERO AURA + BENTO SHORTCUTS)                   */
/* ================================================================ */
.today-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

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

.hero-bio-card {
  border-radius: 30px;
  padding: 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 34%, rgba(73, 201, 131, 0.42) 0%, rgba(43, 154, 91, 0.18) 38%, transparent 70%),
    linear-gradient(175deg, #14271d 0%, #17201b 100%);
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
}

.bio-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bio-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bio-greeting {
  font-size: 15px;
  font-weight: 700;
}

.bio-subline {
  font-size: 11.5px;
  color: rgba(226, 243, 232, 0.72);
}

.circle-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circle-icon-btn.dark {
  border-color: var(--border-soft);
  background: var(--surface-cream);
  color: var(--ink-primary);
}

.bio-center {
  text-align: center;
  padding: 22px 0 14px 0;
}

.bio-label {
  display: block;
  font-size: 13px;
  color: rgba(235, 248, 239, 0.84);
  font-weight: 500;
}

.bio-score {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin: 4px 0 10px 0;
}

.bio-delta-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(132, 190, 141, 0.45);
  color: #dff7e7;
  font-size: 12px;
  font-weight: 600;
}

/* Signature Nixtio White Tick Ruler */
.tick-ruler {
  height: 18px;
  margin: 8px auto 18px auto;
  max-width: 360px;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.75) 0px,
    rgba(255, 255, 255, 0.75) 1px,
    transparent 1px,
    transparent 12px
  );
  mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
}

.next-meal-dock {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px;
}

.next-meal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.next-meal-head h3 {
  font-size: 17px;
  font-weight: 750;
}

.next-meal-head p {
  font-size: 12px;
  color: rgba(235, 248, 239, 0.72);
}

.meal-slot-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cuisine-dock-block {
  margin-bottom: 16px;
}

.dock-sub-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: rgba(226, 243, 232, 0.72);
  margin-bottom: 7px;
}

.cuisine-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.slot-pill,
.cuisine-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 27, 20, 0.45);
  color: rgba(240, 250, 243, 0.85);
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cuisine-pill {
  padding: 6px 11px;
  font-size: 11.5px;
}

.slot-pill:hover,
.cuisine-pill:hover {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.slot-pill.active,
.cuisine-pill.active {
  background: #ffffff;
  color: var(--forest-deep);
  border-color: #ffffff;
}

.btn-mint-cta {
  width: 100%;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 14px 12px 22px;
  background: linear-gradient(135deg, #e7f6ea 0%, #c1e7cb 100%);
  color: var(--forest-deep);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.btn-mint-cta:hover {
  transform: translateY(-1px);
}

.btn-mint-cta:disabled {
  opacity: 0.7;
  cursor: wait;
}

.arrow-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--forest-deep);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Bento Cards */
.today-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .bento-pair {
    grid-template-columns: 1fr;
  }
}

.bento-tile {
  border: none;
  border-radius: 26px;
  padding: 20px;
  text-align: left;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  box-shadow: var(--shadow-airy);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bento-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(20, 38, 28, 0.14);
}

.bento-wide {
  min-height: 126px;
}

.bento-sage {
  background: linear-gradient(150deg, #86b88b 0%, #3d714a 100%);
}

.bento-amber {
  background: linear-gradient(150deg, #f09e27 0%, #bc6106 100%);
}

.bento-olive {
  background: linear-gradient(150deg, #648f60 0%, #315335 100%);
}

.bento-crimson {
  background: linear-gradient(150deg, #c63632 0%, #7f1417 100%);
}

.bento-cerulean {
  background: linear-gradient(150deg, #74b7ea 0%, #3078b7 100%);
}

.bento-art {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.bento-kicker {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.bento-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-top: 2px;
}

.bento-sub {
  font-size: 12px;
  opacity: 0.88;
  margin: 4px 0 14px 0;
}

.bento-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-primary);
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 750;
}

.bento-row-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.calm-note-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 15px 18px;
}

.calm-note-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.calm-note-head code {
  color: var(--emerald);
  font-size: 11px;
}

.calm-note-card p {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Recommended Meal Sheet */
.meal-result {
  display: none;
  margin-top: 22px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-airy);
  animation: fadeUp 0.24s ease;
}

.meal-result.show {
  display: block;
}

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

.allergen-banner {
  background: rgba(43, 154, 91, 0.1);
  border: 1px solid rgba(43, 154, 91, 0.3);
  color: #18643a;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.meal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.meal-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--emerald);
  font-weight: 700;
}

.meal-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 3px 0 6px 0;
}

.meal-header p {
  font-size: 14px;
  color: var(--ink-secondary);
}

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

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .macro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.macro-box {
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.macro-label {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.macro-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--forest-deep);
}

.meal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .meal-columns {
    grid-template-columns: 1fr;
  }
}

.meal-columns h3,
.meal-result h3 {
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 8px;
}

.ingredients-list {
  list-style-position: inside;
  color: var(--ink-secondary);
  font-size: 13.5px;
  line-height: 1.8;
}

.consensus-text {
  color: var(--ink-secondary);
  font-size: 13.5px;
  line-height: 1.65;
}

.clinical-card {
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  margin-bottom: 10px;
}

.clinical-card h4 {
  font-size: 14px;
  font-weight: 750;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.clinical-card p {
  font-size: 13px;
  color: var(--ink-secondary);
}

.topping-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-sage);
  color: var(--forest-mid);
  font-size: 12px;
  font-weight: 700;
}

/* ================================================================ */
/* SECTION 2: BLOOD LAB (INSPIRED BY SCREEN 1 CREAM/SAGE SHEET)     */
/* ================================================================ */
.blood-sheet {
  border-radius: 30px;
  padding: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(164, 198, 165, 0.5) 0%, transparent 46%),
    linear-gradient(175deg, #fbfcf8 0%, #edf4eb 100%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-airy);
}

.blood-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.blood-sheet-head h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}

.blood-narrative {
  max-width: 680px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.biomarker-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.marker-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 18px;
}

.marker-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.marker-name {
  font-size: 14px;
  font-weight: 700;
}

.marker-vn {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.marker-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 12px 0;
}

.marker-number {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.marker-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* Signature Multi-Zone Spectrum Range Bar */
.spectrum-bar {
  position: relative;
  height: 14px;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 28fr 22fr 16fr 22fr 12fr;
  gap: 2px;
  overflow: visible;
  margin-bottom: 8px;
}

.spec-seg {
  height: 100%;
  border-radius: 3px;
}

.spec-coral { background: #e86246; }
.spec-amber { background: #df9a26; }
.spec-lime { background: #9bc34b; }
.spec-emerald { background: #2f9e5a; }
.spec-violet { background: #7648b8; }

.spectrum-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--forest-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.marker-meta-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
}

.badge-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 800;
}

.status-optimal,
.status-normal {
  background: rgba(43, 154, 91, 0.14);
  color: #196b3d;
}

.status-low {
  background: rgba(226, 145, 29, 0.16);
  color: #8f5305;
}

.status-high {
  background: rgba(225, 78, 58, 0.14);
  color: #aa2514;
}

.blood-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 780px) {
  .blood-actions-grid {
    grid-template-columns: 1fr;
  }
}

.pdf-upload-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed #b9ceb7;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.dropzone:hover {
  border-color: var(--emerald);
  background: #ffffff;
}

.dropzone-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.dropzone-title {
  font-size: 15px;
  font-weight: 750;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.dropzone-consent {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 10px 12px;
}

.manual-marker-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px;
}

.manual-marker-card h3 {
  font-size: 15px;
  font-weight: 750;
}

.manual-marker-card p {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.marker-inputs {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 8px;
}

@media (max-width: 520px) {
  .marker-inputs {
    grid-template-columns: 1fr;
  }
}

/* ================================================================ */
/* SECTION 3: INSIGHTS BENTO GRID (INSPIRED BY SCREEN 3)            */
/* ================================================================ */
.insights-shell {
  background: #17201b;
  color: #ffffff;
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--shadow-hero);
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.insights-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.insights-header p {
  font-size: 13.5px;
  color: rgba(236, 247, 239, 0.74);
}

.insights-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .insights-bento-grid {
    grid-template-columns: 1fr;
  }
}

.insight-span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .insight-span-2 {
    grid-column: span 1;
  }
}

.insight-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 4px 0 12px 0;
}

.insight-big-val {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

/* ================================================================ */
/* SECTION 4: CIRCLE & VAULT                                        */
/* ================================================================ */
.circle-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .circle-grid {
    grid-template-columns: 1fr;
  }
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.airy-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow-airy);
}

.airy-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.airy-card-head h2,
.vault-card h3 {
  font-size: 18px;
  font-weight: 800;
}

.airy-card-head p {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.group-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-sage);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.inline-action-pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.input-btn-row {
  display: flex;
  gap: 8px;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.member-item.active {
  border-color: var(--emerald);
  background: #eff7f0;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-info img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.member-meta h4 {
  font-size: 14px;
  font-weight: 700;
}

.member-meta p {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.muted-empty {
  font-size: 13px;
  color: var(--ink-muted);
  padding: 8px 0;
}

.profile-summary-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.profile-name {
  font-size: 16px;
  font-weight: 750;
}

.profile-email {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.profile-token {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.profile-token code {
  color: var(--emerald);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-list {
  list-style: none;
  margin: 12px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.vault-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Status Banners */
.status-banner {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.status-banner.show {
  display: block;
}

.status-banner.error {
  background: rgba(225, 78, 58, 0.12);
  border: 1px solid rgba(225, 78, 58, 0.32);
  color: #a1200f;
}

.status-banner.success {
  background: rgba(43, 154, 91, 0.12);
  border: 1px solid rgba(43, 154, 91, 0.32);
  color: #166037;
}

/* Mobile Bottom Nav - Translucent Liquid Glass Pill */
.bottom-nav {
  display: none !important;
}

@media (max-width: 780px) {
  .app-shell {
    padding-bottom: 112px;
  }

  .pill-nav {
    display: none !important;
  }

  .bottom-nav.authenticated {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.56) 0%, rgba(235, 245, 236, 0.36) 100%);
    backdrop-filter: blur(24px) saturate(185%);
    -webkit-backdrop-filter: blur(24px) saturate(185%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-full);
    padding: 6px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(19, 37, 27, 0.08),
      0 18px 40px rgba(19, 37, 27, 0.16);
    z-index: 40;
  }

  .bottom-nav-item {
    border: none;
    background: transparent;
    color: rgba(20, 29, 24, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 4px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .bottom-nav-item.active {
    background: rgba(19, 37, 27, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      0 4px 14px rgba(19, 37, 27, 0.22);
  }
}

/* Native Dialog Modals */
.airy-dialog {
  margin: auto;
  max-width: 580px;
  width: calc(100% - 32px);
  border: 1px solid var(--border-soft);
  border-radius: 26px;
  padding: 0;
  background: #ffffff;
  color: var(--ink-primary);
  box-shadow: 0 28px 64px rgba(19, 37, 27, 0.25);
}

.airy-dialog::backdrop {
  background: rgba(19, 37, 27, 0.45);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  padding: 26px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.dialog-head h2 {
  font-size: 20px;
  font-weight: 800;
}

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-block {
  background: var(--surface-cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 15px;
}

.guide-block p {
  font-size: 13px;
  color: var(--ink-secondary);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(20, 38, 28, 0.25);
  border-top-color: var(--forest-deep);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

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