/* premium.css — additive "premium app feel" polish.
 *
 * Loaded AFTER style.css (via partials/head.php), so these rules refine the
 * existing look without touching style.css. Same plum/mauve/gold palette —
 * just softer shadows, rounder corners, tactile buttons, a more app-like
 * bottom nav, and the AI insight card styling. Intentionally conservative:
 * shadows/radii/transitions only, no layout-breaking changes.
 */

/* Crisper text rendering app-wide. */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Cards: softer, layered elevation + a gentle desktop hover lift ── */
.card-section {
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

@media (hover: hover) and (min-width: 992px) {
  .card-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}

/* ── Buttons: smooth, tactile press everywhere ── */
.btn {
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn-accent:hover,
.btn-plum:hover {
  filter: brightness(1.03);
}

/* ── Inputs: refined accent focus ring ── */
.form-control-custom:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
}

/* ── Mobile bottom nav: frosted, rounded, with an active pill ──
   Higher specificity (body …) so these win over bottom-nav.php's inline
   <style>, which loads after this file. */
body .mobile-bottom-nav {
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 -6px 28px rgba(61, 32, 80, 0.12);
}

body .mbn-item i {
  padding: 4px 14px;
  border-radius: 13px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body .mbn-item.active i {
  background: var(--accent-pale);
  transform: translateY(-1px);
}

body .mbn-item:not(.mbn-primary):active i {
  transform: scale(0.9);
}

/* ── AI insight card (partials/ai-insight-card.php) ── */
.ai-insight-card {
  position: relative;
  border-radius: 18px;
  padding: 1.05rem 1.2rem 0.85rem;
  margin-bottom: 1.25rem;
  /* Plain card surface — no tint, no accent top-stripe — so it sits uniformly
     alongside every other card ("monotonous" per request). */
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: aiCardIn 0.4s ease both;
}

@keyframes aiCardIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.ai-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ai-insight-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--plum);
}

.ai-insight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
}

.ai-insight-refresh {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.ai-insight-refresh:hover {
  background: var(--accent-pale);
  color: var(--accent);
}

.ai-insight-refresh.is-spinning i {
  animation: aiRefreshSpin 0.8s linear;
}

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

.ai-insight-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.ai-insight-body p {
  margin: 0 0 0.6rem;
}

.ai-insight-body p:last-child {
  margin-bottom: 0;
}

.ai-insight-msg {
  color: var(--text-muted);
}

.ai-insight-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.15rem 0 0.4rem;
}

.ai-insight-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-pale);
  border-top-color: var(--accent);
  animation: aiSpin 0.7s linear infinite;
  flex: none;
}

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

.ai-insight-foot {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.ai-insight-card.is-empty {
  background: var(--white);
  box-shadow: var(--shadow);
}

.ai-insight-card.is-error .ai-insight-badge {
  background: var(--coral);
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Mockup-inspired styling (Daily Log reference): solid-indigo active pills,
   bigger bold stat numbers, clean white list-cards, and an indigo hero
   number. Additive overrides of existing classes — no markup changes.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Segmented pill tabs → solid-indigo active pill (like the mockup's
      Breakfast / Lunch / Dinner). Higher specificity beats section-tabs.php's
      inline <style>, which loads after this file. ── */
.section-tabs .section-tab {
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
}

.section-tabs .section-tab.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow);
}

/* Add-food picker tabs (Meal / Snack / Bar / Drink) → rounder, indigo active. */
.fp-tabs .fp-tab {
  border-radius: 999px;
}

.fp-tabs .fp-tab.active {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow);
}

/* Consistent blue gradient on the other flat-accent surfaces (primary
   buttons + the bottom-nav 'Describe' action) so blue is never a flat block. */
.btn-accent,
.mbn-primary .mbn-fab {
  background: var(--brand-grad) !important;
  border-color: transparent !important;
}

/* ── Nutrition mini-stats → cleaner cards, bigger bolder numbers ── */
.mini-stat {
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (min-width: 992px) {
  .mini-stat:hover {
    transform: translateY(-2px);
  }
}

.ms-val {
  font-size: 1.55rem;
}

/* ── Food entries → clean white list-cards with an indigo edge + hover
      lift, echoing the mockup's food rows ── */
.food-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 13px;
  padding: 0.65rem 0.8rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.food-entry:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.fe-name {
  font-size: 0.9rem;
}

/* ── Steps hero number → indigo pop like the mockup's "8,432" ── */
.steps-card-count {
  color: var(--accent);
}

/* ── Header profile avatar (top-right) ── */
.topbar-profile {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-pale);
  border: 2px solid #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar-profile:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.topbar-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-profile-initials {
  font-weight: 800;
  color: var(--plum);
  font-size: 1rem;
}

/* ── Topbar premium gem (injected before the avatar by loader.php) ── */
.topbar-premium {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--gold-deep);
  background: rgba(245, 197, 24, 0.15);
  border: 1.5px solid rgba(245, 197, 24, 0.42);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.topbar-premium:hover {
  transform: translateY(-1px);
  background: rgba(245, 197, 24, 0.26);
  color: var(--gold-deep);
}

/* Active subscriber: a filled gold gem. */
.topbar-premium.is-premium {
  color: #5b3d00;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
  box-shadow: var(--shadow);
}

/* ── Date selector (week strip), moved below the header ── */
.date-select {
  padding: 0.9rem 1.5rem 0.25rem;
}

.date-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.date-nav-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--plum);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.date-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: var(--accent);
}

.date-nav-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

.date-select-center {
  text-align: center;
  line-height: 1.15;
}

.date-select-today {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.date-select-full {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--plum);
}

.date-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  /* overflow-x:auto makes overflow-y compute to auto too, which would clip
     the chips' translateY(-2px) hover lift at the top — so leave headroom. */
  padding-top: 6px;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

/* Scroll affordance: the strip's scrollbar is hidden, so fade the content at
   whichever edge has more days off-screen. JS toggles has-left / has-right on
   scroll so the fades also read as a position cue. Fades to the page bg
   (--white), which is what the transparent .date-select sits on. */
.date-strip-wrap {
  position: relative;
}
.date-strip-wrap::before,
.date-strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 2;
}
.date-strip-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--white, #fff), rgba(255, 255, 255, 0));
}
.date-strip-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--white, #fff), rgba(255, 255, 255, 0));
}
.date-strip-wrap.has-left::before { opacity: 1; }
.date-strip-wrap.has-right::after { opacity: 1; }
/* Dark theme: fade to a transparent form of the dark page bg (#1c1526) so the
   seam doesn't pick up a light tint interpolating toward transparent-white. */
:root[data-theme="dark"] .date-strip-wrap::before {
  background: linear-gradient(to right, var(--white, #1c1526), rgba(28, 21, 38, 0));
}
:root[data-theme="dark"] .date-strip-wrap::after {
  background: linear-gradient(to left, var(--white, #1c1526), rgba(28, 21, 38, 0));
}

.date-chip {
  flex: 1 0 auto;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 0.4rem;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--plum);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.date-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.date-chip-dow {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.date-chip-day {
  font-size: 1.15rem;
  font-weight: 800;
}

.date-chip.is-active {
  background: var(--brand-grad);
  border-color: transparent;
}

.date-chip.is-active .date-chip-dow,
.date-chip.is-active .date-chip-day {
  color: var(--on-brand, #fff);
}

.date-chip.is-future {
  opacity: 0.55;
}

.date-chip.is-future.is-active {
  opacity: 1;
}

.date-select-actions {
  text-align: center;
  margin-top: 0.35rem;
}

/* Touch targets: on touch devices, grow the tappable area of the small round
   icon buttons to the 44px comfortable minimum without changing their visual
   size — a centred, invisible hit-slop pseudo-element does the work. The date
   arrows (38px) and the drawer close button (30px) are both standalone, so an
   enlarged hit area can't overlap a neighbouring control. */
@media (hover: none) and (pointer: coarse) {
  .date-nav-btn,
  .sidebar-close-btn {
    position: relative;
  }
  .date-nav-btn::before,
  .sidebar-close-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
}

/* ── Per-item timeline AI one-liners (Progress page) ── */
.tl-ai {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--accent);
  font-style: italic;
  min-height: 1em;
}

.tl-ai::before {
  content: '\2728\00a0';
  font-style: normal;
}

/* ✨ */
.tl-ai.is-loading {
  color: var(--text-muted);
  font-style: normal;
  opacity: 0.7;
}

.tl-ai.is-loading::before {
  content: '';
}

/* ── Food Database cards → mockup style: colored icon tile, name + portion,
      prominent calories, and an expandable macro grid with Edit/Delete ── */
.food-db-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.6rem;
}

.food-db-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease;
}

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

.fdc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.fdc-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.fdc-icon.tone-meal {
  background: var(--yellow-light);
  color: var(--gold-deep);
}

.fdc-icon.tone-snack {
  background: var(--coral-light);
  color: var(--coral);
}

.fdc-icon.tone-bar {
  background: var(--plum-light);
  color: var(--plum);
}

.fdc-icon.tone-bev {
  background: var(--accent-pale);
  color: var(--accent);
}

.fdc-main {
  flex: 1;
  min-width: 0;
}

.fdc-name {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--plum);
  line-height: 1.2;
}

/* On desktop, keep the meal name to a single line (ellipsis) so long names
   don't make some cards taller and break the grid row heights. Full name is
   still available via the title tooltip. Mobile (stacked) keeps wrapping. */
@media (min-width: 992px) {
  .fdc-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.fdc-serving {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.fdc-cal {
  flex: none;
  text-align: right;
  line-height: 1.05;
}

.fdc-cal-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.fdc-cal-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fdc-chev {
  flex: none;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.food-db-card.expanded .fdc-chev {
  transform: rotate(180deg);
}

.fdc-details {
  display: none;
  padding: 0 1rem 1rem;
}

.food-db-card.expanded .fdc-details {
  display: block;
}

.fdc-macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.fdc-macro {
  background: var(--gray-bg);
  border-radius: 12px;
  padding: 0.55rem 0.4rem;
  text-align: center;
}

.fdc-macro .v {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--plum);
}

.fdc-macro .k {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 2px;
}

.fdc-notes {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.fdc-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.fdc-actions .btn {
  flex: 1;
}

/* ── Desktop: each food on ONE full-width line, no accordion ──
   Everything (icon, name/portion, macros, calories, edit/delete) sits inline
   in a single row. The details block is always shown, so the toggle/chevron
   do nothing here (mobile keeps the tap-to-expand accordion below 992px). */
@media (min-width: 992px) {
  .food-db-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .food-db-card {
    display: flex;
    align-items: center;
  }

  .fdc-toggle {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    cursor: default;
    padding: 0.7rem 0.5rem 0.7rem 1rem;
  }

  .fdc-chev {
    display: none;
  }

  /* Always visible + inline, regardless of the .expanded accordion state. */
  .fdc-details {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    flex: none;
    padding: 0.6rem 1rem 0.6rem 0;
  }

  .fdc-macro-grid {
    display: flex;
    gap: 0.4rem;
  }

  .fdc-macro {
    min-width: 54px;
    padding: 0.4rem 0.5rem;
  }

  /* Keep the row compact — drop Sodium + Weight chips (Weight duplicates the
     portion already shown under the name); the full set stays on mobile. */
  .fdc-macro:nth-child(n+5) {
    display: none;
  }

  .fdc-notes {
    display: none;
  }

  .fdc-actions {
    margin-top: 0;
    gap: 0.4rem;
    flex: none;
  }

  .fdc-actions .btn {
    flex: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Glassmorphism + bold borderless premium cards (global, all pages).
   A soft tinted page backdrop shows through frosted, translucent cards with
   strong depth. No coloured top/side accent borders — just bold glass cards.
   ═══════════════════════════════════════════════════════════════════════ */

/* Page background — its own token, kept a shade darker than the card surface
   in dark mode so cards don't vanish into the page. */
body {
  background: var(--page-bg) !important;
}

.main-content,
.content-area {
  background: transparent !important;
}

/* Uniform, app-style cards: one solid surface, NO border, one soft shadow.
   Every card looks identical — except .nutrition-today (see below). */
.card-section,
.ai-insight-card,
.health-alert-card,
.progress-stat-card,
.stat-card,
.mini-stat,
.food-db-card,
.steps-card-section,
.add-food-panel {
  background: var(--white) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: 18px !important;
  box-shadow: var(--shadow) !important;
}

/* Exception — the Nutrition Today card keeps a defined border so it reads as
   the primary summary card. */
.card-section.nutrition-today {
  border: 1px solid var(--border) !important;
}

/* Food database cards use a border instead of a shadow. */
.food-db-card {
  border: 1.5px solid var(--border) !important;
  box-shadow: none !important;
}

/* Inner metric tiles (Vitals "Metrics for…" + Progress stats) are inner cards,
   so they use a border rather than a floating shadow. They also fill their
   grid cell and centre their contents, so tiles in a row are always the same
   height and their numbers line up regardless of value/label length. */
.progress-stat-card {
  border: 1.5px solid var(--border) !important;
  box-shadow: none !important;
  height: 100%;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
/* Number + unit share one baseline, so the unit reads as a suffix rather than
   a subscript, and every tile's number sits at the same vertical centre. */
.progress-stat-card .psc-icon { margin-bottom: 0; }
.progress-stat-card .psc-val {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.progress-stat-card .psc-val .stat-unit {
  font-size: 0.72rem;
  font-weight: 600;
}
.progress-stat-card .psc-label { margin-top: 0; }

/* Drop the coloured 3px accent bar, but keep a real (visible) left border that
   matches the other three sides — a translucent-white border vanished on the
   light card, leaving the left edge open. */
.food-entry {
  border-left: 1px solid var(--border) !important;
}

.mini-stat.calories,
.mini-stat.protein,
.mini-stat.carbs,
.mini-stat.fat,
.mini-stat.fiber,
.mini-stat.sugar,
.mini-stat.sodium,
.mini-stat.cholesterol {
  border-top: 1px solid rgba(255, 255, 255, 0.55) !important;
}

/* Frosted top bar so the header reads as part of the glass system. */
.topbar {
  background: rgba(255, 255, 255, 0.55) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  /* Visible on the white body so the header is clearly separated from the
     content below (a white border here would be invisible). */
  border-bottom: 1px solid var(--border);
}

/* Nested/inner surfaces that sit ON a glass card should stay opaque-ish so
   text keeps its contrast (no double-frosting). */
.food-entry,
.fdc-macro,
.date-chip {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.date-chip {
  background: rgba(255, 255, 255, 0.9);
}

/* Action button relocated out of the header, into its own bar just below it. */
.page-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem 0;
}

@media (max-width: 575px) {
  .page-action-bar {
    padding: 0.75rem 1rem 0;
  }

  .page-action-bar .btn {
    flex: 1;
  }
}

/* No top/side accent strips on the AI card either — bold glass only. */
.ai-insight-card::before {
  content: none;
}

/* ── Reminders: robust row layout so Time / Text / toggle+buttons sit in
      clean columns and never crowd or overlap. (The base rule forces a single
      stacked column at every width.) Stacks only on small screens. ── */
.reminder-row {
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem !important;
}

.reminder-info {
  flex: 1 1 45%;
  min-width: 0;
}

.reminder-controls {
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .reminder-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .reminder-controls {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* Date bar: no card background/tint — the day chips sit directly on the page. */
.date-select {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Small month label on date chips (shows on the first chip of each month). */
.date-chip-mon {
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  line-height: 1;
  min-height: 0.68rem;
}

.date-chip.is-active .date-chip-mon {
  color: var(--on-brand, #fff);
  opacity: 0.9;
}

/* The date header ("Today / <date>") is clickable to open the date picker. */
.date-select-center {
  cursor: pointer;
  border-radius: 12px;
  padding: 2px 10px;
  transition: background 0.15s ease;
}

.date-select-center:hover {
  background: rgba(63, 55, 201, 0.06);
}

/* Little tooltip shown when a future day chip is tapped. */
.date-future-tip {
  position: fixed;
  transform: translateX(-50%);
  background: var(--plum, #3D2050);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.date-future-tip.is-visible {
  opacity: 1;
}

/* Taller charts (Weight Journey, Vitals) via a fixed-height box + Chart.js
   maintainAspectRatio:false, so graphs aren't squashed short. */
.chart-box {
  position: relative;
  height: 210px;
  width: 100%;
}

.chart-box-lg {
  height: 280px;
}

/* Reminders edit form: let the native time input shrink so it can't push into
   the adjacent Status toggle column (flexbox min-width:auto overflow). */
#reminderForm [class*="col-"] {
  min-width: 0;
}

#reminderForm .form-control-custom {
  min-width: 0;
  width: 100%;
}

/* Daily Log search → "fetch from AI" fallback card (unknown food estimate). */
.fp-ai-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: var(--card-bg, #fff);
}

.fp-ai-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fp-ai-serving {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.fp-ai-macros {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.fp-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.fp-ai-actions .btn {
  flex: 1 1 auto;
  white-space: nowrap;
}

/* AI food card — detailed nutrient grid + estimate badge (shared look for
   every AI result: Daily Log search + Discover). */
.fp-ai-nutgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 0.65rem 0 0.15rem;
}

.fp-ai-nut {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.45rem 0.2rem;
  background: var(--gray-bg, #f4f1f9);
  border-radius: 10px;
}

.fp-ai-nut-v {
  font-weight: 700;
  color: var(--plum);
  font-size: 0.9rem;
  line-height: 1.1;
}

.fp-ai-nut-v small {
  font-weight: 600;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: 1px;
}

.fp-ai-nut-l {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fp-ai-badge {
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0.55rem 0 0.1rem;
}

@media (max-width: 380px) {
  .fp-ai-nutgrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   "Flatten inner boxes" — inside a card, inner elements should read as clean
   flat surfaces (soft gray fills, no hard outlines) rather than boxes nested
   in boxes. Scoped to the Daily Log add-food area + the shared AI food card.
   ═══════════════════════════════════════════════════════════════════════ */

/* The "Add Food Item" panel sits directly on its card — drop the dashed
   outline + tint AND the inherited glass drop shadow so it's not a shadowed
   box within a box. */
.add-food-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  padding: 0;
}

/* Search field: flat gray fill instead of an outlined box. */
.afp-search-box {
  border: none;
  background: var(--gray-bg);
  box-shadow: none;
}

.afp-search-box .afp-search-clear {
  background: #fff;
}

/* Quick Add — Recent accordion: flat, borderless, gray surface. */
.afp-accordion .accordion-item {
  border: none;
  background: var(--gray-bg);
  border-radius: 12px;
  box-shadow: none;
}

.afp-accordion .accordion-button,
.afp-accordion .accordion-button:not(.collapsed) {
  background: transparent;
  box-shadow: none;
}

/* AI food estimate card: flat gray panel (no border/shadow); its nutrient
   tiles go white so they still read against the panel. */
.fp-ai-card {
  border: none;
  background: var(--gray-bg);
  box-shadow: none;
}

.fp-ai-card .fp-ai-nut {
  background: #fff;
}

/* Food Log empty-state ("Nothing logged yet"): flat gray, no shadow. */
.food-empty-day {
  box-shadow: none;
}

/* Nutrition Today tiles: drop the border + coloured top-accent so they read
   as flat surfaces, consistent with the other flattened inner boxes (no
   raised-"card"/glass look). */
.nutrient-card {
  border: none !important;
  background: var(--gray-bg) !important;
  box-shadow: none !important;
}

/* ── Dashboard welcome card ── premium, warm greeting + tip of the day. */
.welcome-card {
  position: relative;
  padding: 1.2rem 1.35rem 1.25rem;
  margin-bottom: 1.25rem;
  /* Brand purple→blue tint, 3-stop so the slow drift loops seamlessly.
     One palette across every time of day (see wc-* below). */
  background:
    linear-gradient(120deg, rgba(106, 17, 203, 0.16), rgba(37, 117, 252, 0.11) 50%, rgba(106, 17, 203, 0.16)),
    var(--white);
  background-size: 220% 220%;
  overflow: hidden;
  animation: welcomeIn 0.45s ease both, welcomeGradient 24s ease-in-out infinite;
}

/* Time-of-day variants all share the single brand gradient now — the drift
   animation stays, the palette stays on-brand instead of going warm. */
.welcome-card.wc-morning,
.welcome-card.wc-afternoon,
.welcome-card.wc-evening,
.welcome-card.wc-night {
  background:
    linear-gradient(120deg, rgba(106, 17, 203, 0.16), rgba(37, 117, 252, 0.11) 50%, rgba(106, 17, 203, 0.16)),
    var(--white);
}

/* Seamless, very slow gradient drift for a premium living-surface feel. */
@keyframes welcomeGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-card {
    animation: welcomeIn 0.45s ease both;
  }
}

/* Uniform card shape + elevation — every headline card (content cards, the
   welcome card, the AI insight card) shares the same radius and shadow so the
   layout reads consistent. */
.welcome-card,
.ai-insight-card {
  border-radius: 20px !important;
  border: 1px solid var(--accent-pale) !important;
  box-shadow: var(--shadow) !important;
}

@keyframes welcomeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.welcome-card::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 191, 0.16), transparent 70%);
  pointer-events: none;
}

.welcome-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-grad);
  color: var(--on-brand, #fff);
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow);
}

.welcome-hello {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--plum);
  margin-bottom: 0.15rem;
}

.welcome-message {
  /* Same style as the tip paragraph (.welcome-tip-text) below. */
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.welcome-tip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border);
}

.welcome-tip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.welcome-tip-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

/* Floating "add to log" action on the dashboard (icon only). Sits above the
   mobile bottom nav; drops to the corner on desktop where there's no nav. */
.log-fab {
  position: fixed;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  right: 1.5rem;
  z-index: 500;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.log-fab:hover,
.log-fab:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.log-fab:active {
  transform: translateY(0);
}

/* On phones the bottom nav already carries the marquee "Describe" FAB in its
   centre AND a Log tab — a second floating action bottom-right just competes
   with it (and overlapped card content in testing). So the quick-add FAB is
   desktop-only, where there's no bottom nav and it's a genuine shortcut. */
@media (max-width: 991px) {
  .log-fab { display: none; }
}
@media (min-width: 992px) {
  .log-fab {
    bottom: 1.75rem;
    right: 1.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   DARK MODE — toggled via data-theme="dark" on <html> (set by the no-flash
   script in head.php, flipped from the sidebar). Flips the surface/text
   tokens and re-skins the hardcoded glass surfaces. --plum-surface, --accent,
   --mauve, --coral, --gold stay put so brand/accent fills keep their identity.
   ═══════════════════════════════════════════════════════════════════════ */
:root[data-theme="dark"] {
  --page-bg: #0f0b17;
  /* page backdrop — darkest layer */
  --white: #1c1526;
  /* primary CARD surface — a shade above the page */
  --card-bg: #241d33;
  /* elevated inner surface (inputs, tiles) */
  --gray-bg: #241d33;
  --plum: #ece7f3;
  /* heading TEXT → light (dark fills use --plum-surface) */
  --plum-mid: #cdbfe0;
  --plum-light: #4a3b5e;
  --text: #ece7f3;
  --text-muted: #a99bb8;
  --border: rgba(255, 255, 255, 0.10);
  --accent-pale: #272149;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 14px 32px -8px rgba(0, 0, 0, 0.58);
  /* dark lavender for chips / badges / focus rings */
}

:root[data-theme="dark"] body {
  color: var(--text);
}

:root[data-theme="dark"] .auth-body {
  background: linear-gradient(160deg, #171021 0%, #0f0b17 55%, #1a1226 100%);
}

/* Glass cards → dark frosted. */
:root[data-theme="dark"] .card-section,
/* Card surface + border + shadow are all theme-aware tokens now, so the base
   card rule already handles dark mode — no separate dark override needed. */

/* Welcome card keeps its time-of-day gradient (it now sits over a dark base);
   just darken its border + shadow. */
:root[data-theme="dark"] .welcome-card {
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--shadow) !important;
}

/* Frosted top bar + bottom nav → dark glass. */
:root[data-theme="dark"] .topbar {
  background: rgba(30, 22, 42, 0.6) !important;
  /* Clearer separator so the header stands apart from the dark content. */
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

:root[data-theme="dark"] body .mobile-bottom-nav {
  background: rgba(26, 19, 36, 0.86);
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Inputs / selects / chat dock input. */
:root[data-theme="dark"] .form-control-custom,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .dock-input {
  background: #221a2e;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

:root[data-theme="dark"] .form-control-custom::placeholder,
:root[data-theme="dark"] .dock-input::placeholder {
  color: #7d708c;
}

/* Daily Log search + flattened inner boxes. */
:root[data-theme="dark"] .afp-search-box {
  background: #221a2e;
}

:root[data-theme="dark"] .afp-search-box .afp-search-clear {
  background: #2e2440;
  color: var(--text-muted);
}

:root[data-theme="dark"] .afp-accordion .accordion-item {
  background: #221a2e;
}

:root[data-theme="dark"] .afp-accordion .accordion-button {
  background: transparent;
  color: var(--text);
}

:root[data-theme="dark"] .accordion-button::after {
  filter: invert(1) brightness(1.6);
}

:root[data-theme="dark"] .fp-ai-card .fp-ai-nut {
  background: #2a2138;
}

/* btn-plum is a GOLD button — keep its label dark on gold. */
:root[data-theme="dark"] .btn-plum,
:root[data-theme="dark"] .btn-plum:hover,
:root[data-theme="dark"] .btn-plum:active {
  color: var(--plum-surface);
}

/* Food entries / list rows. */
:root[data-theme="dark"] .food-entry {
  border-left-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02);
}

/* Bootstrap text utilities default to dark ink (e.g. .text-muted on the
   Vitals "Sync setup" copy) — remap them to the theme's light tokens so
   they're readable on dark surfaces everywhere they're used. */
:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] .text-body-secondary {
  color: var(--text-muted) !important;
}

:root[data-theme="dark"] .text-body,
:root[data-theme="dark"] .text-dark {
  color: var(--text) !important;
}

/* Date bar: chips + prev/next buttons are hardcoded #fff — darken them
   (leaving the active chip's accent-blue alone). */
:root[data-theme="dark"] .date-chip:not(.is-active) {
  background: #241c30;
  border-color: rgba(255, 255, 255, 0.10);
}

:root[data-theme="dark"] .date-nav-btn {
  background: #241c30;
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

/* Diagnostics + settings rows read fine off the tokens; the error page is
   self-styled. Nothing else needed. */

/* ═══════════════════════════════════════════════════════════════════════
   CONSISTENCY PASS — uniform inputs, uniform full-width tab groups, a white
   sidebar in light mode, and a rounded mobile drawer.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Inputs: same height / border / colour everywhere (both themes). ── */
.form-control-custom,
.form-select {
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
}

:root[data-theme="dark"] .form-control-custom,
:root[data-theme="dark"] .form-select {
  background: #221a2e;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

/* ── 2. Tab groups all look like the Daily Log tabs, and go full width. ── */
.section-tabs,
.discover-mode-switch,
.fp-tabs {
  display: flex !important;
  width: 100% !important;
  gap: 0.3rem;
  padding: 0.28rem;
  margin-bottom: 1.1rem;
  background: var(--accent-pale);
  border: 0 !important;
  border-radius: 14px;
  flex-wrap: nowrap !important;
}

.section-tabs .section-tab,
.discover-mode-switch .discover-mode-btn,
.fp-tabs .fp-tab {
  flex: 1 1 0 !important;
  min-width: 0;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  border-radius: 10px !important;
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.5rem 0.5rem !important;
  box-shadow: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-tabs .section-tab.active,
.discover-mode-switch .discover-mode-btn.active,
.fp-tabs .fp-tab.active {
  background: var(--brand-grad) !important;
  color: #fff !important;
  box-shadow: var(--shadow) !important;
}

/* ── 3. White sidebar in LIGHT mode (dark mode keeps its dark sidebar). ── */
:root[data-theme="light"] .sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
}

:root[data-theme="light"] .sidebar-brand {
  border-bottom-color: var(--border);
}

:root[data-theme="light"] .brand-text {
  color: var(--plum);
}

:root[data-theme="light"] .brand-tagline {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-close-btn {
  background: var(--gray-bg);
  color: var(--plum);
}

:root[data-theme="light"] .sidebar-close-btn:hover {
  background: var(--accent-pale);
}

:root[data-theme="light"] .nav-section-label {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-nav .nav-link {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-nav .nav-link:hover {
  background: var(--gray-bg);
  color: var(--plum);
  border-left-color: transparent;
}

:root[data-theme="light"] .sidebar-nav .nav-link.active {
  background: var(--brand-grad);
  color: #fff;
  border-left-color: transparent;
}

:root[data-theme="light"] .sidebar-nav .nav-link.active i {
  color: #fff;
}

:root[data-theme="light"] .sidebar-version {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-profile {
  border-top-color: var(--border);
}

:root[data-theme="light"] .profile-name {
  color: var(--plum);
}

:root[data-theme="light"] .profile-sub {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-profile-chev {
  color: var(--text-muted);
}

/* Keep the premium upsell readable on the now-white sidebar. */
:root[data-theme="light"] .sidebar-premium-card {
  background: var(--brand-grad);
  border-color: transparent;
}

/* ── 4. Rounded mobile drawer. ── */
@media (max-width: 991.98px) {
  .sidebar {
    border-top-right-radius: 22px;
    border-bottom-right-radius: 22px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Adaptive text on the brand gradient. Everything that sits ON --brand-grad
   takes --on-brand, which is dark for light themes (Gold/Sky/Lavender) and
   white for dark ones (Teal/Ocean/Red). Centralised + !important so it wins
   over the older hard-coded #fff on these elements.
   ═══════════════════════════════════════════════════════════════════════ */
.btn-plum,
.btn-accent,
.section-tabs .section-tab.active,
.discover-mode-switch .discover-mode-btn.active,
.fp-tabs .fp-tab.active,
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link.active i,
.log-fab,
.log-fab:hover,
.log-fab:focus,
.badge-new,
.ai-insight-badge,
.prem-perk-icon,
.mbn-primary .mbn-fab,
.mbn-primary .mbn-fab i,
.prem-hero,
.sidebar-premium-card .spc-text strong,
.sidebar-premium-card .spc-text small,
.sidebar-premium-card .spc-icon,
.sidebar-premium-card .spc-arrow {
  color: var(--on-brand, #fff) !important;
}

/* Gradient-filled stat icons (background-clip:text) become the gradient itself,
   so on light themes reuse --accent for enough contrast on the white card. */
.psc-icon i {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════════════
   UI ELEVATION — depth, section-header icon chips and a shared tactile
   language across the tile family. Loaded last so it refines the uniform
   card system defined earlier in this file.
   ═══════════════════════════════════════════════════════════════════════ */

/* Subtle page tint (light mode only) so the white cards visibly float above
   the page instead of blending into a flat white sheet. The dark block above
   keeps its own near-black --page-bg. */
:root[data-theme="light"] {
  --page-bg: #f4f3f7;
}

/* Section-header icons become a soft accent chip — one consistent, authored
   look for every "<i> + label" header across the whole app. */
.section-label > i:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 9px;
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 0.9em;
  line-height: 1;
  margin-right: 0.55rem !important;
  vertical-align: -0.42em;
  flex: none;
}

/* Shared hover-lift + press-spring on the tile family so tapping anything
   feels alive and consistent (the dashboard stat cards already lift). */
@media (hover: hover) {
  .progress-stat-card,
  .food-db-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .progress-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-light) !important;
  }
  .food-db-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-light) !important;
  }
}
.stat-card:active,
.progress-stat-card:active,
.food-db-card:active { transform: scale(.985); }

/* Info/help cards ("How X works", "How this works") read as guidance, not
   data — a tinted surface + accent rail sets them apart from the data cards. */
.card-section.info-card {
  background: var(--accent-pale) !important;
  border: none !important;
  border-left: 3px solid var(--accent-light) !important;
  box-shadow: none !important;
}
.card-section.info-card .section-label > i:first-child {
  background: rgba(255, 255, 255, 0.5);
}
:root[data-theme="dark"] .card-section.info-card .section-label > i:first-child {
  background: rgba(255, 255, 255, 0.08);
}

/* Auth screens are the app's storefront — a soft branded backdrop, a lifted
   card and a gradient wordmark make the first impression feel premium. Shared
   by login / register / forgot-password (all use .auth-body + .auth-card). */
:root[data-theme="light"] .auth-body {
  background:
    radial-gradient(1100px 480px at 50% -12%, var(--accent-pale) 0%, transparent 62%),
    var(--page-bg) !important;
}
.auth-body .auth-card .card-section {
  border-radius: 22px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 1.6rem 1.4rem !important;
}
.auth-body .auth-brand img {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}
.auth-body .auth-brand span {
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Dark-mode glow — the data screens are at their best in the dark, where
   the accent rings and gradients can actually glow against the near-black
   surface. Light mode is untouched. ─────────────────────────────────────── */
:root[data-theme="dark"] .hr-fill {
  filter: drop-shadow(0 0 5px var(--accent-light));
}
:root[data-theme="dark"] .hero-ring.is-complete .hr-fill {
  filter: drop-shadow(0 0 9px var(--accent-light));
}
:root[data-theme="dark"] .calorie-ring circle:last-of-type {
  filter: drop-shadow(0 0 5px var(--mauve));
}
:root[data-theme="dark"] .th-streak,
:root[data-theme="dark"] .topbar-streak {
  box-shadow: 0 0 22px -4px var(--accent-light), var(--shadow);
}
:root[data-theme="dark"] .hero-ring-icon,
:root[data-theme="dark"] .stat-icon i,
:root[data-theme="dark"] .psc-icon i {
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.10));
}
:root[data-theme="dark"] .sprompt-flame .bi-fire {
  filter: drop-shadow(0 0 16px var(--accent-light));
}
/* Streak page flame + ring accents pick up the same glow. */
:root[data-theme="dark"] .streak-hero .bi-fire,
:root[data-theme="dark"] .streak-hero-top .bi-fire {
  filter: drop-shadow(0 0 14px var(--accent-light));
}
