/* ============================================================
   BabyStats2 — "Snow Cosy" theme
   Frosted glass + drifting snow + warm hearth accents.
   Utility classes (Tailwind) keep doing layout; this file owns
   the visual identity and the dark-mode overrides.
   ============================================================ */

:root {
  color-scheme: light;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --ink-faint: #94a3b8;
  --frost: #f8fafc;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(203, 213, 225, 0.35);
  --ice-1: #7dd3fc;
  --ice-2: #38bdf8;
  --night-1: #1e3a8a;
  --night-2: #312e81;
  --cozy-1: #fbbf24;
  --cozy-2: #fb7185;
  --glow: rgba(251, 191, 36, 0.18);
}
.dark {
  color-scheme: dark;
  --ink: #e2e8f0;
  --ink-soft: #94a3b8;
  --ink-faint: #64748b;
  --frost: #0b1120;
  --glass: rgba(15, 23, 42, 0.72);
  --glass-border: rgba(71, 85, 105, 0.4);
  --ice-1: #155e9c;
  --ice-2: #1e6fbf;
  --night-1: #0b1f47;
  --night-2: #171f52;
  --cozy-1: #f59e0b;
  --cozy-2: #fb7185;
  --glow: rgba(245, 158, 11, 0.12);
}

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: 'Heebo', 'Rubik', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  /* layered winter sky: moonlight glow -> frost -> warm low glow */
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(186, 222, 255, 0.9) 0%, rgba(147, 197, 253, 0.35) 45%, transparent 70%),
    radial-gradient(140% 70% at 50% 118%, rgba(255, 215, 170, 0.22) 0%, rgba(255, 196, 152, 0.10) 40%, transparent 75%),
    linear-gradient(180deg, #eef5ff 0%, #f4f7fb 55%, #e9eff7 100%);
  background-attachment: fixed;
}
.dark body {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(70, 110, 180, 0.55) 0%, rgba(30, 58, 138, 0.25) 45%, transparent 70%),
    radial-gradient(140% 70% at 50% 118%, rgba(251, 146, 60, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #0d1526 0%, #0b1120 55%, #0f172a 100%);
  background-attachment: fixed;
}

/* ============================================================
   Snowfall overlay
   ============================================================ */
#snowfall {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}
.snowflake {
  position: absolute;
  top: -7vh;
  color: #fff;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
  will-change: transform, opacity;
  animation: snowfall-fall var(--dur, 12s) linear var(--delay, 0s) infinite;
}
@keyframes snowfall-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(var(--sway, 30px), 116vh, 0) rotate(var(--spin, 260deg)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #snowfall { display: none; }
}

/* ============================================================
   Display typography (Secular One = rounded Hebrew display font)
   ============================================================ */
.display-title {
  font-family: 'Secular One', 'Heebo', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ============================================================
   Frosted glass card
   ============================================================ */
.cosy-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.75rem;
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.18), 0 2px 8px -2px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* crisp glass sheen — a short reflection at the very top edge only,
   so it never washes over content on tall cards (add/settings pages) */
.cosy-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1.5rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 1.75rem 1.75rem 0 0;
  pointer-events: none;
}
.cosy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px -8px rgba(15, 23, 42, 0.24), 0 3px 10px -2px rgba(15, 23, 42, 0.12);
}
.dark .cosy-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(71, 85, 105, 0.45);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5);
}
.dark .cosy-card::before {
  background: linear-gradient(
    180deg,
    rgba(148, 163, 184, 0.12),
    rgba(148, 163, 184, 0) 70%
  );
}

/* Numeric highlight on cards (the "__..__" fields) */
.stat-value { color: var(--ink); font-weight: 800; }

/* ============================================================
   Icon tiles on summary cards (cozy warm gradients)
   ============================================================ */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  box-shadow: 0 6px 14px -4px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.tile-cyan   { background: linear-gradient(135deg, #a5f3fc, #22d3ee); }
.tile-amber  { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.tile-emerald{ background: linear-gradient(135deg, #a7f3d0, #34d399); }
.tile-violet { background: linear-gradient(135deg, #ddd6fe, #a78bfa); }
.tile-pink   { background: linear-gradient(135deg, #fbcfe8, #f472b6); }
.tile-indigo { background: linear-gradient(135deg, #c7d2fe, #818cf8); }
.dark .icon-tile { box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.55); }

/* ============================================================
   Buttons / pills
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, filter 0.2s;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }

/* warm hearth CTA (submit / add) */
.btn-warm {
  background: linear-gradient(135deg, #fbbf24 0%, #fb7185 100%);
  color: #fff;
  box-shadow: 0 8px 18px -6px var(--glow), 0 2px 6px -2px rgba(15, 23, 42, 0.3);
}
.btn-warm:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* icy secondary */
.btn-ice {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}
.btn-ice:hover { background: rgba(255, 255, 255, 0.32); }

/* danger */
.btn-danger {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(244, 63, 94, 0.4);
}
.btn-danger:hover { filter: brightness(1.05); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }

/* translucent frosted nav bar so it blends with the sky instead of
   reading as a solid white stripe */
.nav-glass {
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 9999px;
  box-shadow: 0 10px 22px -10px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.dark .nav-glass {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(100, 116, 139, 0.45);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(148, 163, 184, 0.25);
}

/* ============================================================
   Tab pills (pilltab + add-page type tabs)
   ============================================================ */
.pilltab {
  border-radius: 9999px;
  font-weight: 800;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: transparent;
}
.pilltab:hover { background: rgba(125, 211, 252, 0.18); color: var(--ink); }
.pilltab.active {
  background: linear-gradient(135deg, #bae6fd, #7cc4fa);
  color: #0f2b46;
  box-shadow: 0 6px 14px -4px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.dark .pilltab {
  color: #94a3b8;
}
.dark .pilltab:hover { background: rgba(46, 90, 146, 0.35); color: #e2e8f0; }
.dark .pilltab.active {
  background: linear-gradient(135deg, #1f5f9e, #2460c4);
  color: #eaf6ff;
  box-shadow: 0 6px 14px -4px rgba(56, 189, 248, 0.35);
}

/* ============================================================
   Frosted inputs / selects
   ============================================================ */
.cosy-input {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 0.9rem;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  font-weight: 700;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cosy-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
  background: rgba(255, 255, 255, 0.95);
}
.dark .cosy-input:focus { background: rgba(30, 41, 59, 0.95); }
select.cosy-input { appearance: auto; }
input[type="checkbox"] { accent-color: #38bdf8; }
.dark input[type="checkbox"] { accent-color: #3b82f6; }

/* ============================================================
   Chips (quick qty buttons, pref rows, event rows)
   ============================================================ */
.chip {
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.7));
  color: var(--ink-soft);
  font-weight: 700;
  border: 1px solid rgba(226, 232, 240, 0.5);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -3px rgba(15, 23, 42, 0.2); }
/* active highlight toggled by app.js (highlightBtns) — beats the chip gradient */
.chip.bg-blue-500 { background: #3b82f6; color: #fff; box-shadow: 0 4px 10px -3px rgba(59, 130, 246, 0.5); }
.chip.bg-pink-500 { background: #ec4899; color: #fff; box-shadow: 0 4px 10px -3px rgba(236, 72, 153, 0.5); }
.dark .chip.bg-blue-500 { background: #2563eb; color: #fff; }
.dark .chip.bg-pink-500 { background: #db2777; color: #fff; }
.dark .chip {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.8));
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.5);
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.7rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(241, 245, 249, 0.65));
  border: 1px solid rgba(226, 232, 240, 0.45);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.event-row:hover {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.9), rgba(254, 226, 226, 0.7));
  border-color: rgba(248, 113, 113, 0.4);
}
.dark .event-row {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.6));
  border-color: rgba(51, 65, 85, 0.5);
}
.dark .event-row:hover {
  background: linear-gradient(180deg, rgba(69, 26, 44, 0.6), rgba(30, 41, 59, 0.7));
  border-color: rgba(248, 113, 113, 0.35);
}

/* settings prefs label switcher (built by app.js) */
.pref-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.9rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.15s;
}
.pref-label:hover { background: rgba(190, 230, 253, 0.25); }
.dark .pref-label:hover { background: rgba(46, 90, 146, 0.3); }

/* admin panel status chip (error state) */
.admin-error {
  background: linear-gradient(135deg, #fecaca, #f87171);
  color: #7f1d1d;
  border: 1px solid rgba(248, 113, 113, 0.6);
  border-radius: 9999px;
}
.dark .admin-error {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.7), rgba(30, 41, 59, 0.6));
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

/* role badges */
.badge-owner, .badge-member {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  line-height: 1;
  white-space: nowrap;
}
.badge-owner {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #78350f;
  border: 1px solid rgba(245, 158, 11, 0.5);
}
.badge-member {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0f2b46;
  border: 1px solid rgba(125, 211, 252, 0.4);
}
.dark .badge-owner {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.6), rgba(30, 41, 59, 0.6));
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.dark .badge-member {
  background: linear-gradient(135deg, rgba(15, 43, 84, 0.6), rgba(30, 41, 59, 0.6));
  color: #bae6fd;
  border-color: rgba(125, 211, 252, 0.4);
}

/* ============================================================
   Metric badges (chart legends)
   ============================================================ */
.metric-badge {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.75));
  color: var(--ink-soft);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
}
.dark .metric-badge {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.8));
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.5);
}

/* icon-accented side bars for summary cards */
.accent-side { border-inline-start-width: 0; }

/* ============================================================
   Recent-event filter buttons
   ============================================================ */
.recent-filter-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.7));
  border: 1px solid rgba(226, 232, 240, 0.5);
  color: var(--ink-faint);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.recent-filter-btn:hover { transform: translateY(-1px); }
.recent-filter-btn.active {
  background: linear-gradient(135deg, #e0f2fe, #7cc4fa);
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.55), 0 4px 10px -3px rgba(14, 165, 233, 0.4);
  color: #0f2b46;
}
.dark .recent-filter-btn {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.75));
  border-color: rgba(71, 85, 105, 0.5);
  color: #94a3b8;
}
.dark .recent-filter-btn.active {
  background: linear-gradient(135deg, #134f86, #1f5f9e);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
  color: #eaf6ff;
}

/* ============================================================
   Progress bars (co-op + bottle timer)
   ============================================================ */
.bar-track {
  background: rgba(203, 213, 225, 0.55);
  border-radius: 9999px;
}
.dark .bar-track { background: rgba(51, 65, 85, 0.7); }
.bar-tamar { background: linear-gradient(90deg, #f472b6, #f43f5e); }
.bar-barak { background: linear-gradient(90deg, #60a5fa, #22d3ee); }
.bar-active   { background: linear-gradient(90deg, #38bdf8, #7dd3fc); }
.bar-expired  { background: linear-gradient(90deg, #f87171, #fca5a5); }
.bar-idle     { background: rgba(148, 163, 184, 0.6); }

/* ============================================================
   Bottle timer states (set dynamically by app.js)
   ============================================================ */
.timer-idle {
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.4);
  box-shadow: 0 8px 18px -6px rgba(15, 23, 42, 0.14);
}
.timer-active {
  background: linear-gradient(135deg, rgba(224, 246, 252, 0.95), rgba(186, 230, 253, 0.7));
  border: 1px solid rgba(125, 211, 252, 0.55);
  box-shadow: 0 10px 22px -6px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.timer-expired {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(254, 226, 226, 0.75));
  border: 1px solid rgba(248, 113, 113, 0.55);
  box-shadow: 0 10px 22px -6px rgba(244, 63, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.dark .timer-idle { background: rgba(15, 23, 42, 0.7); border-color: rgba(71, 85, 105, 0.45); }
.dark .timer-active { background: linear-gradient(135deg, rgba(21, 62, 107, 0.9), rgba(15, 43, 84, 0.75)); }
.dark .timer-expired { background: linear-gradient(135deg, rgba(96, 27, 54, 0.85), rgba(30, 41, 59, 0.7)); }

/* daily task mini-cards (vitamin D / sterilization) */
.task-done {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(209, 250, 229, 0.65));
  border: 1px solid rgba(110, 231, 183, 0.5);
  border-radius: 1rem;
  box-shadow: 0 6px 14px -5px rgba(52, 211, 153, 0.35);
}
.task-todo {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(251, 232, 186, 0.7));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 1rem;
  box-shadow: 0 6px 14px -5px rgba(245, 158, 11, 0.3);
}
.dark .task-done { background: linear-gradient(135deg, rgba(6, 78, 59, 0.6), rgba(15, 23, 42, 0.7)); border-color: rgba(110, 231, 183, 0.4); }
.dark .task-todo { background: linear-gradient(135deg, rgba(120, 53, 15, 0.55), rgba(15, 23, 42, 0.7)); border-color: rgba(245, 158, 11, 0.4); }

/* ============================================================
   Top toolbar — logged-in user + quick actions (sticky night glass)
   ============================================================ */
.top-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.6rem 1.1rem;
  background: linear-gradient(180deg, rgba(9, 16, 38, 0.82), rgba(26, 44, 84, 0.6));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(125, 155, 225, 0.3);
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.5);
}
.dark .top-toolbar {
  background: linear-gradient(180deg, rgba(4, 9, 22, 0.9), rgba(15, 23, 42, 0.7));
  border-bottom-color: rgba(71, 85, 105, 0.5);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem 0.35rem 0.55rem;
  backdrop-filter: blur(8px);
  cursor: default;
}
.dark .user-chip { border-color: rgba(100, 116, 139, 0.45); }

.user-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7cc4fa, #f472b6);
  box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.4);
}
.user-avatar-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.user-name { color: #fff; font-weight: 700; font-size: 0.82rem; }
.user-email { color: rgba(190, 225, 253, 0.9); font-size: 0.68rem; }
.dark .user-email { color: rgba(148, 163, 184, 0.9); }

/* Toolbar action icons on the night glass */
.top-toolbar .btn-ice {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.dark .top-toolbar .btn-ice { border-color: rgba(148, 163, 184, 0.4); }

/* ============================================================
   Google sign-in button (keeps the cozy look, brand wordmark)
   ============================================================ */
.btn-google {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  color: #1e293b;
  border: 1px solid rgba(203, 213, 225, 0.6);
  box-shadow: 0 8px 18px -6px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.25); }
.dark .btn-google {
  background: linear-gradient(180deg, #263449, #1e293b);
  color: #e2e8f0;
  border-color: rgba(71, 85, 105, 0.5);
}
.google-word { font-family: 'Rubik', 'Heebo', sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.g-blue   { color: #4285F4; }  /* G */
.g-red    { color: #EA4335; }  /* o */
.g-yellow { color: #FBBC05; }  /* o */
.g-blue2  { color: #4285F4; }  /* g */
.g-green  { color: #34A853; }  /* l */
.g-red2   { color: #EA4335; }  /* e */

/* "or" divider between Google and email/password */
.divider-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.divider-line::before,
.divider-line::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(203, 213, 225, 0.55), transparent);
}
.dark .divider-line::before,
.dark .divider-line::after {
  background: linear-gradient(90deg, transparent, rgba(71, 85, 105, 0.6), transparent);
}

/* ============================================================
   Header — snow dome with hanging flakes + warm welcome
   ============================================================ */
.snow-header {
  position: relative;
  background:
    radial-gradient(70% 90% at 85% 0%, rgba(147, 197, 253, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, var(--night-1) 0%, #2455a8 55%, #3b6fc4 100%);
  border-radius: 0 0 3rem 3rem;
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.4), inset 0 -12px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  overflow: hidden;
}
/* soft frost settling along the header's base — a smooth gradient,
   no hard tiled band */
.snow-header::before {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -24px;
  height: 56px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(222, 238, 252, 0.28) 30%,
    rgba(236, 246, 255, 0.6) 60%,
    rgba(248, 251, 253, 0.92) 100%
  );
  border-radius: 4.5rem 4.5rem 0 0;
  filter: blur(0.6px);
  opacity: 0.9;
  pointer-events: none;
}
.snow-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(15% 60% at 12% 8%, rgba(255, 255, 255, 0.12) 0%, transparent 70%),
    radial-gradient(12% 50% at 90% 12%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.flake-inner {
  position: absolute;
  top: 0;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
  animation: header-float var(--d, 5s) ease-in-out var(--delay, 0s) infinite alternate;
  pointer-events: none;
}
@keyframes header-float {
  from { transform: translateY(0) translateX(0); }
  to   { transform: translateY(8px) translateX(var(--sway, 6px)); }
}
.header-title {
  color: #fff;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(15, 23, 42, 0.45);
}
.header-date { color: rgba(190, 228, 253, 0.95); }
.dark .snow-header::before { opacity: 0.5; }

/* ============================================================
   Delete banner
   ============================================================ */
.cosy-banner {
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(12px);
  border-top: 3px solid #f87171;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
}
.dark .cosy-banner { background: rgba(2, 6, 23, 0.97); }

/* ============================================================
   Footer — snowy night
   ============================================================ */
.cosy-footer {
  background: linear-gradient(180deg, #101b36 0%, #0b1120 100%);
  color: rgba(148, 163, 184, 0.9);
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================================
   Thin cozy scrollbars
   ============================================================ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.5), rgba(148, 163, 184, 0.5));
  border-radius: 9999px;
}
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Light-mode retheme of leftover slate utilities (keeps the
   old rounded chips/rows cosy in light mode too)
   ============================================================ */
.bg-white { background: rgba(255, 255, 255, 0.9); }
.bg-slate-50  { background: rgba(248, 250, 252, 0.6); }
.bg-slate-100 { background: rgba(226, 232, 240, 0.7); }
.bg-slate-200 { background: rgba(203, 213, 225, 0.6); }
.border-slate-100 { border-color: rgba(203, 213, 225, 0.4); }
.border-slate-200 { border-color: rgba(148, 163, 184, 0.4); }
.border-slate-150 { border-color: rgba(203, 213, 225, 0.45); }
.text-slate-500, .text-slate-600, .text-slate-650 { color: var(--ink-soft); }
.text-slate-700, .text-slate-800, .text-slate-850 { color: var(--ink); }
.text-slate-400 { color: var(--ink-faint); }

/* ============================================================
   Dark-mode overrides for leftover utilities
   ============================================================ */
.dark .bg-white { background: rgba(30, 41, 59, 0.9); }
.dark .bg-slate-50  { background: rgba(30, 41, 59, 0.7); }
.dark .bg-slate-100 { background: rgba(51, 65, 85, 0.8); }
.dark .bg-slate-200 { background: rgba(71, 85, 105, 0.7); }
.dark .bg-slate-300 { background: rgba(100, 116, 139, 0.7); }
.dark .border-slate-100 { border-color: rgba(51, 65, 85, 0.6); }
.dark .border-slate-200 { border-color: rgba(71, 85, 105, 0.6); }
.dark .border-slate-700 { border-color: rgba(51, 65, 85, 0.6); }

/* tinted tiles & text set by index.html for form sections keep working in dark */
.dark .bg-blue-50\/50, .dark .bg-blue-50 { background: rgba(30, 58, 138, 0.35); }
.dark .bg-pink-50\/50, .dark .bg-pink-50 { background: rgba(131, 24, 67, 0.35); }
.dark .bg-amber-50 { background: rgba(120, 53, 15, 0.5); }
.dark .bg-indigo-50 { background: #1e1b4b; }
.dark .bg-teal-50 { background: #042f2e; }
.dark .bg-orange-500\/5 { background: rgba(245, 158, 11, 0.08); }
.dark .bg-emerald-50, .dark .bg-emerald-50\/50 { background: rgba(6, 78, 59, 0.5); }
.dark .bg-red-50, .dark .bg-red-50\/50 { background: rgba(127, 29, 29, 0.5); }
.dark .text-blue-600 { color: #93c5fd; }
.dark .text-blue-500 { color: #60a5fa; }
.dark .text-blue-900 { color: #bfdbfe; }
.dark .text-cyan-600 { color: #67e8f9; }
.dark .text-indigo-600, .dark .text-indigo-700, .dark .text-indigo-800, .dark .text-indigo-850 { color: #a5b4fc; }
.dark .text-pink-600, .dark .text-pink-700, .dark .text-pink-800, .dark .text-pink-900 { color: #f9a8d4; }
.dark .text-emerald-600, .dark .text-emerald-700, .dark .text-emerald-800 { color: #6ee7b7; }
.dark .text-amber-600, .dark .text-amber-700, .dark .text-amber-850, .dark .text-amber-900 { color: #fcd34d; }
.dark .text-violet-600 { color: #c4b5fd; }
.dark .text-orange-600 { color: #fdba74; }
.dark .text-teal-500 { color: #2dd4bf; }
.dark .text-teal-600, .dark .text-teal-850 { color: #5eead4; }
.dark .text-red-600 { color: #f87171; }
.dark .text-red-900 { color: #fca5a5; }
.dark .text-red-300 { color: #fecaca; }
.dark .border-blue-100 { border-color: #1e3a8a; }
.dark .border-red-500 { border-color: #ef4444; }
.dark .border-red-200 { border-color: #7f1d1d; }
.dark .border-emerald-100 { border-color: #064e3b; }
.dark .border-amber-100 { border-color: #78350f; }
.dark .from-pink-50 { --tw-gradient-from: #500724; }
.dark .to-pink-100 { --tw-gradient-to: #831843; }
.dark .from-indigo-50 { --tw-gradient-from: #1e1b4b; }
.dark .to-violet-100 { --tw-gradient-to: #4c1d95; }

/* keep chart canvases crisp */
canvas { display: block; }