/* ==========================================================================
   Lifavera "Aurora" — design system (loaded after app.css; overrides it).
   Calm near-black canvas, frosted-glass surfaces, Apple system typography,
   one brand accent (mint → blue, from the tree-of-life logo), soft motion.
   ========================================================================== */
:root{
  --a-bg:#060709;
  --a-bg-2:#0b0c10;
  --a-glass:rgba(255,255,255,.045);
  --a-glass-2:rgba(255,255,255,.07);
  --a-glass-hi:rgba(255,255,255,.11);
  --a-hair:rgba(255,255,255,.075);
  --a-hair-2:rgba(255,255,255,.13);
  --a-text:#f5f5f7;
  --a-text-2:#a1a1aa;
  --a-text-3:#6e6e76;
  --a-mint:#8ff5d2;
  --a-teal:#45d6c4;
  --a-blue:#7cb6ff;
  --a-lav:#b7a6ff;
  --a-amber:#ffc58a;
  --a-red:#ff7b86;
  --a-aurora:linear-gradient(120deg,#9af7d9 0%,#56d9c8 45%,#7cb6ff 100%);
  --a-sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Inter,"Segoe UI",system-ui,sans-serif;
  --a-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue",Inter,system-ui,sans-serif;
  --a-serif:ui-serif,"New York","Iowan Old Style",Georgia,serif;
  --a-r-xl:28px;--a-r-lg:22px;--a-r-md:16px;--a-r-sm:12px;
  --a-ease:cubic-bezier(.22,1,.36,1);
  --a-spring:cubic-bezier(.34,1.56,.64,1);
  /* re-point every legacy token to the new palette */
  --lv-ink:var(--a-bg);--lv-surface:#101116;--lv-raised:#16171d;--lv-hair:var(--a-hair);--lv-hair-strong:var(--a-hair-2);
  --lv-text:var(--a-text);--lv-muted:var(--a-text-2);--lv-faint:var(--a-text-3);--lv-lumen:var(--a-mint);--lv-lumen-soft:rgba(143,245,210,.12);
  --lv-ember:var(--a-amber);--lv-orchid:var(--a-lav);--lv-serif:var(--a-serif);--lv-sans:var(--a-sans);
  --bg:var(--a-bg);--panel:#101116;--panel2:#16171d;--line:var(--a-hair);--text:var(--a-text);--muted:var(--a-text-2);
  --cyan:var(--a-mint);--violet:var(--a-lav);--green:#8fe6b8;--amber:var(--a-amber);--red:var(--a-red);
  --lp-mint:var(--a-mint);--lp-sky:var(--a-blue);--lp-violet:var(--a-lav);--lp-surface:#101116;
  --accent:var(--a-mint);
}

/* ---------- Canvas ---------- */
html body{
  background:var(--a-bg);color:var(--a-text);font-family:var(--a-sans);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:-.005em;
}
html body::before{ /* aurora: two slow, blurred light pools behind everything */
  content:"";position:fixed;inset:-20vmax;z-index:-1;pointer-events:none;
  background:
    radial-gradient(38vmax 28vmax at 18% 6%,rgba(86,217,200,.13),transparent 70%),
    radial-gradient(34vmax 26vmax at 88% 12%,rgba(124,182,255,.10),transparent 70%),
    radial-gradient(40vmax 30vmax at 60% 108%,rgba(183,166,255,.07),transparent 70%);
  animation:aDrift 28s ease-in-out infinite alternate;
}
@keyframes aDrift{to{transform:translate3d(-2vmax,1.5vmax,0) scale(1.04)}}
html body .app{background:transparent}
::selection{background:rgba(143,245,210,.28)}

/* ---------- Sidebar ---------- */
html body .side{
  background:rgba(10,11,14,.55);border-right:1px solid var(--a-hair);
  -webkit-backdrop-filter:saturate(1.6) blur(24px);backdrop-filter:saturate(1.6) blur(24px);
}
html body .brand strong{font-family:var(--a-serif);font-weight:500;font-size:22px;letter-spacing:-.01em;color:var(--a-text)}
html body .brand small{color:var(--a-text-3);font-size:11px;letter-spacing:0;text-transform:none}
html body .logo,html body .lif-gate-logo,html body .lif-dialog-mark{background:#0d0e12!important;border:1px solid var(--a-hair-2);box-shadow:0 6px 24px rgba(69,214,196,.12)}
html body .nav button{
  display:flex;align-items:center;gap:12px;border-radius:12px;padding:10px 12px;margin:1px 0;
  color:var(--a-text-2);font-weight:500;font-size:14.5px;background:transparent;border:0;
  transition:background .25s var(--a-ease),color .25s var(--a-ease);
}
html body .nav button b{display:grid;place-items:center;width:22px;height:22px;background:none;border:0;box-shadow:none;color:inherit}
html body .nav button:hover{background:var(--a-glass);color:var(--a-text)}
html body .nav button.active{background:var(--a-glass-2);color:var(--a-text);box-shadow:inset 0 0 0 1px var(--a-hair)}
html body .nav button.active b{color:var(--a-mint)}
html body .sidefoot{color:var(--a-text-3);letter-spacing:.06em}
.lv-ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* ---------- Header ---------- */
html body .top{align-items:flex-end}
html body .top .eyebrow,html body .top .pill{display:none}
html body #greeting{font-family:var(--a-serif);font-weight:500;font-size:clamp(34px,4.4vw,52px);letter-spacing:-.025em;line-height:1.05;color:var(--a-text)}
html body .date{color:var(--a-text-2);font-size:15px;margin-top:6px}

/* ---------- Cards: frosted glass ---------- */
html body .card,html body .well-snap-card,html body .day-timeline-card,html body .fin-card,html body .fin-panel,html body .fin-module{
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.03));
  border:1px solid var(--a-hair);border-radius:var(--a-r-lg);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 20px 50px -30px rgba(0,0,0,.8);
  -webkit-backdrop-filter:saturate(1.4) blur(20px);backdrop-filter:saturate(1.4) blur(20px);
  transition:transform .4s var(--a-ease),border-color .3s var(--a-ease),background .3s var(--a-ease);
}
@media (hover:hover) and (pointer:fine){
  html body .stat-card-action:hover,html body .overview-hydration-trigger:hover,html body .overview-focus-card:hover,html body .wellness-scenario-trigger:hover{transform:translateY(-2px);border-color:var(--a-hair-2)}
}
html body .cardhead h2,html body .card h2{font-family:var(--a-display);font-weight:650;font-size:19px;letter-spacing:-.02em;color:var(--a-text)}
html body .cardhead{margin-bottom:14px}
/* Fewer labels: static decorative tags are hidden; live counters stay, quietly. */
html body .cardhead .tag:not([id]):not(.keep),html body .day-timeline-head .tag:not([id]){display:none}
html body .tag{background:var(--a-glass-2);border:0;color:var(--a-text-2);font-weight:600;font-size:11px;letter-spacing:.02em;text-transform:none;border-radius:999px;padding:5px 10px}
html body .tag.keep{color:var(--a-mint);background:rgba(143,245,210,.1)}
html body .eyebrow,html body .fin-eyebrow,html body .lv-eyebrow{color:var(--a-text-3);font-size:11.5px;font-weight:600;letter-spacing:.06em}
html body .muted,html body .statfoot,html body .fin-note,html body .modal-hint{color:var(--a-text-2)}
html body .statlabel{color:var(--a-text-2);font-weight:500;letter-spacing:0;text-transform:none;font-size:13px}
html body .statval,html body .metric{font-family:var(--a-display);font-weight:600;letter-spacing:-.03em;color:var(--a-text)}
html body .statval.accent,html body .metric.accent,html body .accent{color:var(--a-mint)}
html body .notice,html body .insight{background:var(--a-glass);border:1px solid var(--a-hair);border-radius:var(--a-r-md);color:var(--a-text-2)}
html body .empty{color:var(--a-text-3)}

/* ---------- Buttons ---------- */
html body .btn{
  border-radius:999px;padding:10px 16px;font-weight:600;font-size:14px;letter-spacing:-.005em;
  background:var(--a-glass-2);border:1px solid var(--a-hair);color:var(--a-text);box-shadow:none;
  transition:transform .2s var(--a-spring),background .2s var(--a-ease),border-color .2s var(--a-ease),opacity .2s;
}
html body .btn:hover{background:var(--a-glass-hi);border-color:var(--a-hair-2)}
html body .btn:active{transform:scale(.96)}
html body .btn.primary,html body .fin-submit,html body .lif-gate-primary,html body .lif-dialog-btn.primary{
  background:var(--a-aurora);color:#04110e;border:0;box-shadow:0 8px 24px -10px rgba(86,217,200,.55),inset 0 1px 0 rgba(255,255,255,.35);
}
html body .btn.primary:hover{filter:brightness(1.06)}
html body .btn.danger,html body .btn.ghost.danger{color:var(--a-red);background:rgba(255,123,134,.08);border-color:rgba(255,123,134,.22)}
html body .btn.ghost{background:transparent}
html body button:focus-visible,html body .field:focus-visible,html body [role="button"]:focus-visible{outline:2px solid var(--a-mint);outline-offset:2px}

/* ---------- Fields ---------- */
html body .field,html body .modal-input,html body .lif-dialog-input,html body .lif-gate input[type=text],html body .lif-gate input[type=email],html body .lif-gate input[type=password]{
  background:rgba(255,255,255,.04);border:1px solid var(--a-hair);border-radius:var(--a-r-sm);color:var(--a-text);
  font-family:var(--a-sans);transition:border-color .2s var(--a-ease),background .2s var(--a-ease),box-shadow .2s var(--a-ease);
}
html body .field:focus,html body .modal-input:focus,html body .lif-dialog-input:focus,html body .lif-gate input:focus{
  outline:none;border-color:rgba(143,245,210,.55);background:rgba(255,255,255,.06);box-shadow:0 0 0 4px rgba(143,245,210,.10)
}
html body .field::placeholder{color:var(--a-text-3)}

/* ---------- Lists: tasks & habits ---------- */
html body .task,html body .habit{border-radius:14px;border-color:var(--a-hair);background:rgba(255,255,255,.025);transition:background .25s var(--a-ease),transform .3s var(--a-ease)}
html body .task:hover,html body .habit:hover{background:rgba(255,255,255,.045)}
html body .check{border-radius:50%;border:1.6px solid var(--a-hair-2);transition:transform .3s var(--a-spring),background .2s,border-color .2s}
html body .task.done .check,html body .habit.done .check,html body .check.done,html body .check.on{background:var(--a-aurora);border-color:transparent;color:#04110e;transform:scale(1.04)}
html body .tasktitle{color:var(--a-text);font-weight:500}
html body .task.done .tasktitle{color:var(--a-text-3)}
html body .lif-suggestion{border-radius:999px;background:var(--a-glass);border:1px dashed var(--a-hair-2);color:var(--a-text-2)}
html body .lif-suggestion:hover{color:var(--a-text);border-color:rgba(143,245,210,.4)}

/* ---------- Home: "inelele zilei" ---------- */
html body .lv-today{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:clamp(18px,4vw,48px);align-items:center;padding:clamp(20px,3vw,32px);margin-bottom:16px;border-radius:var(--a-r-xl)}
.lv-rings{position:relative;aspect-ratio:1;width:100%;max-width:300px;margin:auto}
.lv-rings svg{width:100%;height:100%;transform:rotate(-90deg);overflow:visible}
.lv-ring-bg{fill:none;stroke:rgba(255,255,255,.06);stroke-width:12}
.lv-ring{fill:none;stroke-width:12;stroke-linecap:round;stroke-dasharray:0 100;transition:stroke-dasharray 1.4s var(--a-ease);filter:drop-shadow(0 0 6px rgba(143,245,210,.18))}
.lv-rings-center{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.lv-rings-center b{font-family:var(--a-display);font-size:clamp(24px,3vw,32px);font-weight:600;letter-spacing:-.04em;color:var(--a-text);line-height:1}
.lv-rings-center small{color:var(--a-text-3);font-size:10.5px;margin-top:3px;letter-spacing:.06em}
.lv-legend{display:flex;flex-direction:column;gap:2px;min-width:0}
.lv-legend-head h2{font-family:var(--a-display);font-size:22px!important;font-weight:650;letter-spacing:-.025em;margin:0 0 10px}
.lv-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 10px;border:0;border-radius:12px;background:transparent;color:var(--a-text);font:inherit;font-size:15px;text-align:left;cursor:pointer;transition:background .2s var(--a-ease)}
.lv-row:hover{background:var(--a-glass)}
.lv-row+.lv-row{box-shadow:0 -1px 0 var(--a-hair)}
.lv-row span{flex:1;color:var(--a-text-2)}
.lv-row b{font-family:var(--a-display);font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.lv-row::after{content:"›";color:var(--a-text-3);font-size:20px;line-height:1;margin-left:4px}
.lv-dot{width:10px;height:10px;border-radius:50%;flex:none}
.lv-dot-habits{background:linear-gradient(135deg,#8ff7d6,#3fd2c0)}
.lv-dot-water{background:linear-gradient(135deg,#9ccbff,#5b8dff)}
.lv-dot-sleep{background:linear-gradient(135deg,#d4c6ff,#9a7dff)}
.lv-dot-move{background:linear-gradient(135deg,#ffd29a,#ff9a6b)}
.lv-dot-tasks{background:transparent;box-shadow:inset 0 0 0 1.6px var(--a-text-3)}
/* the rings replace the old stat cards and the score card on Home */
html body #overview > .grid.stats{display:none}
html body #overview > .grid.dash > .card:first-child{display:none}
html body #overview > .grid.dash{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}

/* ---------- Companion & advice ---------- */
html body .companion-card{background:linear-gradient(135deg,rgba(143,245,210,.07),rgba(124,182,255,.05) 60%,rgba(255,255,255,.02))}
html body .companion-avatar{background:var(--a-aurora);color:#04110e;border:0}

/* ---------- Mobile: floating glass tab bar ---------- */
html body .mobile-dock{
  left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));border-radius:26px;
  background:rgba(22,23,28,.62);border:1px solid rgba(255,255,255,.10);
  -webkit-backdrop-filter:saturate(1.8) blur(28px);backdrop-filter:saturate(1.8) blur(28px);
  box-shadow:0 18px 40px -12px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.08);
}
html body .mobile-dock button{color:var(--a-text-3);background:transparent;border-radius:18px;transition:color .2s var(--a-ease),background .2s var(--a-ease)}
html body .mobile-dock button.active{color:var(--a-text);background:rgba(255,255,255,.08)}
html body .mobile-dock button.active .dock-icon{color:var(--a-mint)}
html body .mobile-dock .dock-icon{background:none!important;box-shadow:none!important;color:inherit;width:auto;height:auto}
html body .mobile-dock .dock-icon .lv-ico{width:23px;height:23px}
html body .mobile-dock button[data-mobile-page="assistant"] .dock-icon{color:var(--a-mint)}
html body .mobile-more{background:rgba(22,23,28,.8);border:1px solid rgba(255,255,255,.1);border-radius:22px;-webkit-backdrop-filter:saturate(1.8) blur(28px);backdrop-filter:saturate(1.8) blur(28px)}
html body .mobile-more button{display:flex;align-items:center;gap:12px;color:var(--a-text);border-radius:14px}
html body .mobile-more button .lv-ico{color:var(--a-text-2)}

/* ---------- Sheets, dialogs, calendar ---------- */
html body .lif-modal-backdrop,html body .modal-backdrop,html body .lif-dialog-backdrop,html body .lif-calendar-backdrop{background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
html body .lif-modal-sheet,html body .premium-modal,html body .lif-dialog,html body .lif-calendar{
  background:rgba(24,25,31,.86);border:1px solid rgba(255,255,255,.10);border-radius:var(--a-r-xl);
  -webkit-backdrop-filter:saturate(1.6) blur(30px);backdrop-filter:saturate(1.6) blur(30px);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.07);
  animation:aRise .45s var(--a-ease);
}
@keyframes aRise{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
html body .lif-dialog-btn{border-radius:999px;font-weight:600}

/* ---------- Entry screen ---------- */
html body .lif-gate{background:radial-gradient(60vmax 40vmax at 20% 0%,rgba(86,217,200,.14),transparent 70%),radial-gradient(50vmax 35vmax at 100% 10%,rgba(124,182,255,.12),transparent 70%),var(--a-bg)}
html body .lif-gate-card{background:rgba(20,21,26,.72);border:1px solid rgba(255,255,255,.09);border-radius:var(--a-r-xl);-webkit-backdrop-filter:saturate(1.6) blur(30px);backdrop-filter:saturate(1.6) blur(30px);box-shadow:0 40px 100px -40px rgba(0,0,0,.9),inset 0 1px 0 rgba(255,255,255,.07)}
html body .lif-gate-card h1{font-family:var(--a-serif);font-weight:500;letter-spacing:-.02em}
html body .lif-gate-brand b{font-family:var(--a-serif);font-weight:500;font-size:19px}
html body .lif-gate-tabs{background:rgba(255,255,255,.05);border-radius:12px}

/* ---------- Settings: calmer, iOS-like ---------- */
html body #settings .card{padding:22px}
html body #settings .card > p.muted{font-size:13px;line-height:1.55}

/* ---------- Finance accents ---------- */
html body .fin-pill{background:var(--a-glass-2);border:1px solid var(--a-hair);color:var(--a-text-2);border-radius:999px}
html body .fin-track,html body .well-snap-track,html body .bars{background:rgba(255,255,255,.06)}

/* ---------- Toast ---------- */
html body .toast{background:rgba(28,29,35,.9);border:1px solid rgba(255,255,255,.1);border-radius:999px;color:var(--a-text);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 18px 40px -16px rgba(0,0,0,.8)}

/* ---------- Motion: sections fade in ---------- */
html body .section.active{animation:aIn .5s var(--a-ease)}
@keyframes aIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- Phone layout ---------- */
@media (max-width:820px){
  html body .lv-today{grid-template-columns:1fr;text-align:left}
  .lv-rings{max-width:220px}
  .lv-legend-head{text-align:center}
  html body #greeting{font-size:36px}
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html body::before,html body .section.active,html body .lif-modal-sheet,html body .lif-dialog,html body .lif-calendar{animation:none}
  .lv-ring{transition:none}
}

/* quiet delete (×) on task/habit rows; clearer on hover */
.lv-del{width:30px;height:30px;flex:none;border-radius:50%;border:0;background:transparent;color:var(--a-text-3);font-size:20px;line-height:1;cursor:pointer;transition:background .2s var(--a-ease),color .2s var(--a-ease)}
.lv-del:hover{background:rgba(255,123,134,.12);color:var(--a-red)}

/* ---------- Refinements ---------- */
/* Assistant in the tab bar: same shape as the others, highlighted only by its icon */
html body .mobile-dock button[data-mobile-page="assistant"],
html body .mobile-dock button[data-mobile-page="assistant"].active,
html body .mobile-dock button[data-mobile-page="assistant"]:active{background:transparent;color:var(--a-text-2);transform:none;min-height:54px;border-radius:18px;box-shadow:none}
html body .mobile-dock button[data-mobile-page="assistant"].active{background:rgba(255,255,255,.08);color:var(--a-text)}
html body .mobile-dock button{font-size:10.5px;font-weight:550;min-height:54px}
html body .mobile-dock button.active{color:var(--a-text)}
/* The big greeting belongs to Home only; other pages start with their content */
html body:not(.lv-home) .top{display:none}
html body:not(.lv-home) .main > .section{padding-top:8px}
html body .notice{padding:12px 14px}
html body #settings .notice{background:transparent;border:0;padding:4px 0;color:var(--a-text-2)}
html body .lif-date-trigger{background:rgba(255,255,255,.04)!important;border:1px solid var(--a-hair)!important;border-radius:var(--a-r-sm);color:var(--a-text-2);box-shadow:none!important}
html body .lif-date-trigger:hover{border-color:var(--a-hair-2)!important}
html body .lif-date-icon{color:var(--a-mint);opacity:.85}
html body .lif-calendar-days button.selected,html body .lif-calendar-days button.today.selected{background:var(--a-aurora);color:#04110e}
@media (max-width:820px){
  html body #taskForm{flex-wrap:wrap}
  html body #taskForm #taskInput{flex:1 1 100%!important;min-width:0}
  html body #taskForm #taskPriority,html body #taskForm .task-time-create-trigger{flex:1 1 0}
}
