:root {
  /* Light "playful wellness" theme (ref IMG_0407): soft lavender, white cards,
     pastel purple/yellow/green accents, big radii, soft shadows. */
  --bg: #ECEAF6;
  --surface: #FFFFFF;
  --surface-2: #F4F2FC;
  --border: #E8E4F5;
  --text: #211F33;
  --muted: #918CA6;
  /* accents */
  --accent: #7C6CF5;            /* periwinkle purple — primary */
  --accent-2: #6A57F0;
  --accent-soft: #EEEBFD;
  --yellow: #F4BE3F; --yellow-soft: #FDF1D2;
  --green: #7FC85B;  --green-soft: #E7F5DC;
  --pink: #F77E94;   --pink-soft: #FDE4E9;
  --good: #5FB97C;
  --warn: #E89A45;
  --radius: 22px;
  --radius-sm: 16px;
  --shadow: 0 8px 24px rgba(86, 64, 160, 0.10);
  --shadow-sm: 0 3px 10px rgba(86, 64, 160, 0.07);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; }
.ic { width: 1em; height: 1em; vertical-align: -0.125em; stroke-width: 2.25; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 14px;
  background: var(--bg);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px;
}
.topbar-title { font-size: 24px; font-weight: 800; letter-spacing: 0.2px; }
.topbar-sub { grid-column: 1; font-size: 13px; color: var(--muted); margin-top: 2px; }
.sync-dot { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: background .3s; }
.sync-dot.ok { background: var(--green); }
.sync-dot.busy { background: var(--yellow); }
.sync-dot.err { background: var(--pink); }

.content { padding: 6px 18px 104px; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-h { font-size: 16px; color: var(--text); margin: 22px 0 12px; font-weight: 800; letter-spacing: .2px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* Hero card (ref "Daily challenge") */
.hero {
  background: var(--accent); color: #fff; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: grid; gap: 6px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero h3 { margin: 0; font-size: 22px; font-weight: 800; max-width: 70%; line-height: 1.2; }
.hero .hero-sub { font-size: 13px; opacity: .9; max-width: 75%; }
.hero .hero-pill { justify-self: start; margin-top: 8px; background: rgba(255,255,255,.2); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* Quick actions */
.quick-actions { display: grid; gap: 12px; margin-top: 14px; }
.quick-btn {
  width: 100%; padding: 16px; border-radius: var(--radius-sm); border: none;
  background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; text-align: left;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.quick-btn .ic { flex: 0 0 auto; width: 42px; height: 42px; padding: 11px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.quick-btn:nth-child(2) .ic { background: var(--green-soft); color: var(--green); }
.quick-btn:nth-child(3) .ic { background: var(--yellow-soft); color: var(--yellow); }
.quick-btn.primary { background: var(--accent); color: #fff; }
.quick-btn.primary .ic { background: rgba(255,255,255,.22); color: #fff; }
.quick-btn:active { transform: scale(.99); }

/* Cards */
.card-list { display: grid; gap: 12px; }
.card { background: var(--surface); border: none; border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); }
.card.tappable:active { transform: scale(.995); }
.card-title { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* type icon chip in a tinted circle */
.tcircle { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tcircle .ic { font-size: 17px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.badge.type { background: var(--accent-soft); color: var(--accent-2); }
.badge .ic { font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; margin: 3px 5px 3px 0; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.chip.selectable.on { background: var(--accent); color: #fff; }

/* Buttons */
.link-btn { background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 700; padding: 6px; display: inline-flex; align-items: center; gap: 5px; }
.back-btn { background: none; border: none; color: var(--accent); font-size: 15px; padding: 6px 0; margin-bottom: 4px; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.wide-btn { width: 100%; text-align: left; padding: 15px; background: var(--surface); border: none; border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); }
.wide-btn .ic { width: 38px; height: 38px; padding: 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.wide-btn:last-child { margin-bottom: 0; }

/* Filters */
.filters { display: flex; gap: 9px; overflow-x: auto; padding: 4px 0 12px; }
.filters select, .filters input { flex: 0 0 auto; background: var(--surface); border: none; box-shadow: var(--shadow-sm); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-family: inherit; }

/* Timeline */
.timeline { display: grid; gap: 0; }
.tl-item { position: relative; padding: 0 0 16px 26px; border-left: 2px solid var(--border); margin-left: 8px; }
.tl-item:last-child { border-left-color: transparent; }
.tl-dot { position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.tl-num { font-size: 12.5px; color: var(--accent-2); font-weight: 800; }
.tl-card { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; margin-top: 6px; display: grid; gap: 7px; box-shadow: var(--shadow-sm); }
.tl-card .mood-line { display: flex; align-items: center; gap: 8px; }
.tl-card .mood-line .ic { color: var(--accent); font-size: 18px; }

/* Metric tiles — 2-col grid (ref dashboard tiles) */
.metric-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-card { background: var(--surface); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); display: grid; gap: 8px; }
.metric-card .mhead { display: flex; align-items: center; justify-content: space-between; }
.metric-ic { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.metric-ic .ic { font-size: 18px; }
.metric-card:nth-child(3n+2) .metric-ic { background: var(--green-soft); color: var(--green); }
.metric-card:nth-child(3n+3) .metric-ic { background: var(--yellow-soft); color: var(--yellow); }
.metric-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 23px; font-weight: 800; line-height: 1; }
.metric-unit { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric-delta { font-size: 12px; font-weight: 700; }
.metric-delta.good { color: var(--good); }
.metric-delta.bad { color: var(--warn); }
.metric-goal { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.chart { width: 100%; height: 46px; display: block; margin-top: 2px; }
.chart.big { height: 120px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .area { fill: var(--accent-soft); }
.chart .dot { fill: var(--accent); }
.chart .goal { stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.chart text { fill: var(--muted); font-size: 9px; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.photo-thumb { position: relative; }
.photo-thumb .kind { position: absolute; bottom: 5px; left: 5px; font-size: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 6px; border-radius: 6px; }

/* Forms */
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 13.5px; color: var(--text); font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; background: var(--surface-2); border: 1.5px solid transparent; color: var(--text); border-radius: 14px; padding: 13px; font-size: 16px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field textarea { min-height: 84px; resize: vertical; }
.mood-row { display: flex; gap: 9px; }
.mood-row button { flex: 1; padding: 13px 0; background: var(--surface-2); border: 1.5px solid transparent; border-radius: 16px; color: var(--muted); }
.mood-row button .ic { font-size: 24px; }
.mood-row button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.inline-add input { flex: 1; }
.inline-add button { padding: 0 16px; background: var(--accent-soft); border: none; border-radius: 14px; color: var(--accent); font-weight: 700; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.btn-primary { flex: 1; padding: 15px; background: var(--accent); color: #fff; border: none; border-radius: 16px; font-size: 16px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ghost { padding: 15px 20px; background: var(--surface-2); color: var(--text); border: none; border-radius: 16px; font-size: 16px; font-weight: 700; }

/* Bottom nav */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--border); padding-bottom: var(--safe-bottom); box-shadow: 0 -4px 20px rgba(86,64,160,.06); }
.nav-item { background: none; border: none; color: var(--muted); font-size: 11px; display: grid; justify-items: center; gap: 3px; padding: 11px 0 9px; font-weight: 600; }
.nav-item .ic { font-size: 22px; }
.nav-item.active { color: var(--accent); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(40,30,70,.4); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 18px 18px calc(22px + var(--safe-bottom)); animation: slideup .24s ease; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head span { font-size: 19px; font-weight: 800; }
.modal-close { background: var(--surface-2); border: none; color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* Toast */
.toast { position: fixed; bottom: calc(88px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); background: var(--text); border: none; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); }

.empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ===== Restructured IA components ===== */

/* App header (greeting) */
.apphead { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top,0px) + 14px) 2px 10px; }
.greeting { font-size: 26px; font-weight: 800; letter-spacing: .2px; }
.subdate { font-size: 13px; color: var(--muted); margin-top: 2px; }
.apphead .sync-dot { position: static; }

/* Hero with progress ring */
.hero { display: flex; align-items: center; gap: 16px; }
.hero .hero-text { display: grid; gap: 5px; }
.hero h3 { max-width: none; }
.ring { flex: 0 0 auto; }
.ring-track { fill: none; stroke: rgba(255,255,255,.25); }
.ring-fill { fill: none; stroke: #fff; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring-label { fill: #fff; font-weight: 800; font-size: 16px; text-anchor: middle; }

/* Week strip */
.week-strip { display: flex; justify-content: space-between; gap: 6px; margin: 14px 0 4px; }
.wk-day { flex: 1; display: grid; justify-items: center; gap: 6px; padding: 8px 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.wk-day .wk-dow { font-size: 11px; color: var(--muted); font-weight: 700; }
.wk-day .wk-num { font-size: 15px; font-weight: 700; }
.wk-day .wk-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.wk-day.has .wk-dot { background: var(--green); }
.wk-day.today { background: var(--accent); }
.wk-day.today .wk-dow, .wk-day.today .wk-num { color: #fff; }
.wk-day.today.has .wk-dot { background: #fff; }

/* Mood check-in row */
.mood-check { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); margin-top: 12px; }
.mood-check .mc-q { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.mc-row { display: flex; justify-content: space-between; gap: 8px; }
.mc-btn { flex: 1; aspect-ratio: 1; border: none; border-radius: 14px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.mc-btn .ic { font-size: 24px; }
.mc-btn.on { background: var(--accent); color: #fff; }

/* Stat tiles row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); display: grid; gap: 3px; }
.stat-tile .st-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.stat-tile:nth-child(2) .st-ic { background: var(--green-soft); color: var(--green); }
.stat-tile:nth-child(3) .st-ic { background: var(--yellow-soft); color: var(--yellow); }
.stat-tile .st-val { font-size: 21px; font-weight: 800; line-height: 1; }
.stat-tile .st-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Segmented control */
.segmented { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin: 6px 0 16px; }
.seg-btn { flex: 1; border: none; background: none; color: var(--muted); font-weight: 700; font-size: 13.5px; padding: 9px 0; border-radius: 11px; }
.seg-btn.on { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }

/* KPI row (profile) */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.kpi { background: var(--surface); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm); }
.kpi .k-val { font-size: 22px; font-weight: 800; }
.kpi .k-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Profile head */
.profile-head { display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top,0px) + 16px) 2px 14px; }
.avatar { width: 58px; height: 58px; border-radius: 20px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.profile-head .p-name { font-size: 22px; font-weight: 800; }
.profile-head .p-sub { font-size: 13px; color: var(--muted); }

/* Settings list */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-row { width: 100%; background: none; border: none; display: flex; align-items: center; gap: 13px; padding: 15px 16px; color: var(--text); font-size: 15px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row:active { background: var(--surface-2); }
.list-row .lr-ic { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.list-row .lr-ic .ic { font-size: 18px; }
.list-row .lr-grow { flex: 1; }
.list-row .lr-chev { color: var(--muted); }
.list-row .lr-val { color: var(--muted); font-weight: 600; font-size: 13px; }

/* Add row (e.g. New plan) */
.add-row { width: 100%; margin-top: 12px; padding: 15px; border: 2px dashed var(--border); background: none; border-radius: var(--radius); color: var(--accent); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Plan progress bar */
.pbar { height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.pbar > span { display: block; height: 100%; background: var(--accent); }

/* Bottom nav with FAB */
.bottomnav { grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr; align-items: end; }
.fab { justify-self: center; align-self: center; transform: translateY(-14px); width: 56px; height: 56px; border-radius: 20px; background: var(--accent); color: #fff; border: none; box-shadow: 0 8px 20px rgba(124,108,245,.45); display: inline-flex; align-items: center; justify-content: center; }
.fab .ic { font-size: 26px; }
.fab:active { transform: translateY(-14px) scale(.95); }

/* Log bottom-sheet options */
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border: none; border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 15px; }
.sheet-opt .so-ic { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.sheet-opt:nth-child(2) .so-ic { background: var(--green-soft); color: var(--green); }
.sheet-opt:nth-child(3) .so-ic { background: var(--yellow-soft); color: var(--yellow); }
.sheet-opt:nth-child(4) .so-ic { background: var(--pink-soft); color: var(--pink); }
.sheet-opt .so-ic .ic { font-size: 22px; }

/* Metric detail */
.md-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.md-ic { width: 48px; height: 48px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.md-ic .ic { font-size: 22px; }
.md-big { font-size: 34px; font-weight: 800; line-height: 1; }
.reading-row { display: flex; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--border); font-size: 14px; }
.reading-row:last-child { border-bottom: none; }

/* ============================================================= */
/* AURORA theme (chosen) — vibrant gradient system + polish      */
/* ============================================================= */
:root{
  --bg:#F3F3FB; --surface:#FFFFFF; --surface-2:#ECEBFA; --border:#E5E3F6;
  --text:#191833; --muted:#8784A6;
  --accent:#6D5DF6; --accent-2:#5847E0; --accent-soft:#E9E6FE;
  --grad-1:linear-gradient(135deg,#6D5DF6,#9B6BF0);
  --grad-2:linear-gradient(135deg,#10C8A8,#37D98E);
  --grad-3:linear-gradient(135deg,#FF9A3D,#FFC24D);
  --grad-4:linear-gradient(135deg,#3D8BFF,#5BC0F8);
  --grad-5:linear-gradient(135deg,#F45BA0,#FF8AC0);
  --shadow:0 14px 30px rgba(95,70,200,.16); --shadow-sm:0 6px 16px rgba(95,70,200,.10);
}
body{ background:radial-gradient(120% 60% at 100% 0%, #ECEAFE 0%, #F3F3FB 55%) fixed; }

/* Hero — animated aurora gradient + layered illustration */
.hero{ background:linear-gradient(135deg,#6D5DF6 0%,#A05BF0 50%,#F45BA0 100%); background-size:180% 180%; animation:heroflow 14s ease infinite; box-shadow:0 18px 38px rgba(140,80,200,.32); }
@keyframes heroflow{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
.hero::after{ background:radial-gradient(circle,rgba(255,255,255,.28),transparent 70%); width:180px;height:180px; right:-40px;top:-50px; }
.hero::before{ content:""; position:absolute; left:-30px; bottom:-50px; width:130px;height:130px;border-radius:50%; background:radial-gradient(circle,rgba(255,255,255,.16),transparent 70%); }
.hero-art{ position:absolute; right:10px; top:50%; transform:translateY(-50%); opacity:.5; pointer-events:none; }

/* FAB — gradient + soft pulse */
.fab{ background:linear-gradient(135deg,#6D5DF6,#F45BA0); box-shadow:0 12px 26px rgba(150,80,200,.5); animation:fabpulse 2.8s ease-in-out infinite; }
@keyframes fabpulse{0%,100%{box-shadow:0 12px 26px rgba(150,80,200,.45)}50%{box-shadow:0 12px 34px rgba(150,80,200,.7)}}
.fab:active{ transform:translateY(-14px) scale(.94); animation:none; }

.mc-btn.on{ background:linear-gradient(135deg,#6D5DF6,#A05BF0); color:#fff; }
.wk-day.today{ background:linear-gradient(135deg,#6D5DF6,#A05BF0); } .wk-day.has .wk-dot{ background:#13C2A8; }
.avatar{ background:linear-gradient(135deg,#6D5DF6,#F45BA0); }

/* Gradient dashboard tiles (white text) */
.stat-tile,.metric-card,.kpi{ color:#fff; border:none; }
.stat-tile .st-lbl,.metric-label,.metric-unit,.metric-goal,.k-lbl,.metric-delta{ color:rgba(255,255,255,.9); }
.stat-tile .st-val,.metric-value,.k-val{ color:#fff; }
.st-ic,.metric-ic{ background:rgba(255,255,255,.24)!important; color:#fff!important; }
.stat-tile:nth-child(1),.kpi:nth-child(1){ background:var(--grad-1); }
.stat-tile:nth-child(2),.kpi:nth-child(2){ background:var(--grad-2); }
.stat-tile:nth-child(3),.kpi:nth-child(3){ background:var(--grad-3); }
.metric-card:nth-child(4n+1){ background:var(--grad-1); }
.metric-card:nth-child(4n+2){ background:var(--grad-2); }
.metric-card:nth-child(4n+3){ background:var(--grad-4); }
.metric-card:nth-child(4n+4){ background:var(--grad-5); }
.metric-card .chart .line,.stat-tile .chart .line{ stroke:#fff; }
.metric-card .chart .area{ fill:rgba(255,255,255,.20); }
.metric-card .chart .dot{ fill:#fff; } .metric-card .chart .goal{ stroke:rgba(255,255,255,.75); }

/* keep content cards readable (white) but lift depth */
.card,.tl-card,.mood-check,.list,.wk-day,.quick-btn,.modal,.segmented{ color:var(--text); }
.card-title{ color:var(--text); }

/* Entrance micro-animation (staggered) */
.stat-row > *,.metric-cards > *,.kpi-row > *,.card-list > *{ animation:popin .4s cubic-bezier(.2,.7,.3,1) both; }
.stat-row > *:nth-child(2),.metric-cards > *:nth-child(2),.card-list > *:nth-child(2){ animation-delay:.05s; }
.stat-row > *:nth-child(3),.metric-cards > *:nth-child(3),.card-list > *:nth-child(3){ animation-delay:.1s; }
.metric-cards > *:nth-child(4),.card-list > *:nth-child(4){ animation-delay:.15s; }
.card-list > *:nth-child(n+5){ animation-delay:.2s; }
@keyframes popin{ from{opacity:0; transform:translateY(10px) scale(.98);} to{opacity:1; transform:none;} }

/* metric detail big number stays on light */
.md-big{ color:var(--text); }
