/* It's My Life — design system on top of Bootstrap 5.3. Plain CSS, no build step.
   Dark is the default theme; [data-bs-theme="light"] switches everything. */

/* ---------- Tokens ---------- */
:root {
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Space Grotesk", var(--font-sans);

    --violet: #8b5cf6; --indigo: #6366f1; --sky: #0ea5e9; --cyan: #06b6d4;
    --teal: #14b8a6; --emerald: #10b981; --lime: #84cc16; --amber: #f59e0b;
    --orange: #f97316; --rose: #f43f5e; --pink: #ec4899; --fuchsia: #d946ef;

    --good: #10b981; --warn: #f59e0b; --bad: #f43f5e;

    --grad-brand: linear-gradient(120deg, #8b5cf6 0%, #ec4899 45%, #f59e0b 100%);
    --grad-health: linear-gradient(120deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
    --grad-cool: linear-gradient(120deg, #6366f1 0%, #0ea5e9 100%);

    --radius: 1.1rem;
    --radius-sm: .7rem;
    --sidebar-w: 264px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-bs-theme="dark"] {
    --bg: #07070c;
    --bg-glow-1: rgba(139, 92, 246, .16);
    --bg-glow-2: rgba(16, 185, 129, .10);
    --bg-glow-3: rgba(236, 72, 153, .08);
    --surface: #0f0f18;
    --surface-2: #161622;
    --surface-3: #1e1e2d;
    --line: rgba(255, 255, 255, .07);
    --line-strong: rgba(255, 255, 255, .13);
    --ink: #f4f4f8;
    --ink-2: #a9a9bd;
    --ink-3: #6f6f86;
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, .7);
    --glass: rgba(10, 10, 16, .72);
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--ink);
    --bs-secondary-color: var(--ink-2);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--line-strong);
    --bs-emphasis-color: #fff;
    color-scheme: dark;
}

[data-bs-theme="light"] {
    --bg: #f5f5fa;
    --bg-glow-1: rgba(139, 92, 246, .10);
    --bg-glow-2: rgba(16, 185, 129, .08);
    --bg-glow-3: rgba(236, 72, 153, .06);
    --surface: #ffffff;
    --surface-2: #f3f3f8;
    --surface-3: #e9e9f2;
    --line: rgba(20, 20, 40, .07);
    --line-strong: rgba(20, 20, 40, .13);
    --ink: #14141f;
    --ink-2: #5b5b72;
    --ink-3: #8f8fa6;
    --shadow: 0 12px 34px -14px rgba(40, 30, 90, .22);
    --glass: rgba(255, 255, 255, .78);
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--ink);
    --bs-secondary-color: var(--ink-2);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--line-strong);
    color-scheme: light;
}

/* A "tone" sets --tone for any component inside it. */
.tone-violet { --tone: var(--violet); --tone-rgb: 139, 92, 246; }
.tone-indigo { --tone: var(--indigo); --tone-rgb: 99, 102, 241; }
.tone-sky { --tone: var(--sky); --tone-rgb: 14, 165, 233; }
.tone-cyan { --tone: var(--cyan); --tone-rgb: 6, 182, 212; }
.tone-teal { --tone: var(--teal); --tone-rgb: 20, 184, 166; }
.tone-emerald { --tone: var(--emerald); --tone-rgb: 16, 185, 129; }
.tone-lime { --tone: var(--lime); --tone-rgb: 132, 204, 22; }
.tone-amber { --tone: var(--amber); --tone-rgb: 245, 158, 11; }
.tone-orange { --tone: var(--orange); --tone-rgb: 249, 115, 22; }
.tone-rose { --tone: var(--rose); --tone-rgb: 244, 63, 94; }
.tone-pink { --tone: var(--pink); --tone-rgb: 236, 72, 153; }
.tone-fuchsia { --tone: var(--fuchsia); --tone-rgb: 217, 70, 239; }

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
}
body.has-aurora::before {
    content: "";
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% -8%, var(--bg-glow-1), transparent 60%),
        radial-gradient(700px 480px at 100% 10%, var(--bg-glow-2), transparent 60%),
        radial-gradient(800px 600px at 60% 110%, var(--bg-glow-3), transparent 60%);
}
h1, h2, h3, h4, .display-font { font-family: var(--font-display); letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
p a:hover, .form-text a:hover, .small a:hover { text-decoration: underline; }
.text-ink-2 { color: var(--ink-2) !important; }
.text-ink-3 { color: var(--ink-3) !important; }
.text-good { color: var(--good) !important; }
.text-bad { color: var(--bad) !important; }
.text-warn { color: var(--warn) !important; }
.text-tone { color: var(--tone) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.small-caps { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.grad-text {
    background: var(--grad-brand);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.grad-text-health { background: var(--grad-health); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(139, 92, 246, .35); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1.25rem .9rem;
    background: var(--surface);
    border-right: 1px solid var(--line);
    z-index: 1030;
}
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 2rem;
    background: var(--glass);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.content { padding: 1.75rem 2rem 3rem; max-width: 1280px; }

.brand {
    display: flex; align-items: center; gap: .6rem;
    padding: .25rem .5rem 1rem; text-decoration: none;
    font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
}
.brand-mark {
    width: 36px; height: 36px; border-radius: 11px;
    display: grid; place-items: center; color: #fff;
    background: var(--grad-brand);
    box-shadow: 0 6px 20px -6px rgba(236, 72, 153, .6);
}
.nav-section { padding: 1rem .6rem .35rem; }
.side-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .6rem; border-radius: .8rem;
    color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link.active { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.side-link .chip-icon { width: 30px; height: 30px; font-size: .95rem; border-radius: 9px; }
.side-link.locked { opacity: .5; }
.side-link .badge-soon {
    margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .15rem .45rem; border-radius: 999px; background: var(--surface-3); color: var(--ink-3);
}
.sidebar-footer { margin-top: auto; }

.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-grid; place-items: center;
    font-weight: 700; font-size: .8rem; color: #fff;
    background: var(--grad-brand);
}

/* Mobile: sidebar hides, a glassy bottom bar takes over. */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .topbar { padding: .75rem 1rem; }
    .content { padding: 1.1rem 1rem 6.5rem; }
    .bottom-nav {
        display: flex; justify-content: space-around;
        position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 1030;
        padding: .45rem; border-radius: 1.3rem;
        background: var(--glass);
        backdrop-filter: saturate(160%) blur(16px);
        -webkit-backdrop-filter: saturate(160%) blur(16px);
        border: 1px solid var(--line-strong);
        box-shadow: var(--shadow);
    }
    .bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem;
        padding: .4rem 0; border-radius: 1rem; text-decoration: none;
        font-size: .68rem; font-weight: 600; color: var(--ink-3);
    }
    .bottom-nav a i { font-size: 1.25rem; }
    .bottom-nav a.active { color: var(--ink); background: var(--surface-2); }
}

/* ---------- Surfaces ---------- */
.card-x {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}
.card-x.pad { padding: 1.35rem; }
.card-x.hover { transition: transform .25s var(--ease), border-color .25s var(--ease); }
.card-x.hover:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card-x .card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin: 0; }
.card-x.toned { border-color: rgba(var(--tone-rgb), .28); }
.card-x.toned::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(600px 200px at 0% 0%, rgba(var(--tone-rgb), .12), transparent 60%);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }

.chip-icon {
    width: 42px; height: 42px; flex: none;
    display: inline-grid; place-items: center;
    border-radius: 13px; font-size: 1.15rem;
    color: var(--tone, var(--violet));
    background: rgba(var(--tone-rgb, 139, 92, 246), .15);
    box-shadow: inset 0 0 0 1px rgba(var(--tone-rgb, 139, 92, 246), .22);
}
.chip-icon.solid { color: #fff; background: var(--tone); box-shadow: 0 8px 20px -8px rgba(var(--tone-rgb), .8); }

.pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700;
    background: rgba(var(--tone-rgb, 139, 92, 246), .14);
    color: var(--tone, var(--violet));
}
.pill.good { --tone: var(--good); --tone-rgb: 16, 185, 129; }
.pill.bad { --tone: var(--bad); --tone-rgb: 244, 63, 94; }
.pill.warn { --tone: var(--warn); --tone-rgb: 245, 158, 11; }
.pill.muted { background: var(--surface-3); color: var(--ink-2); }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--ink-2); }

/* Hero banner at the top of module homes. */
.hero {
    position: relative; overflow: hidden;
    border-radius: calc(var(--radius) + .2rem);
    padding: 1.6rem 1.6rem;
    color: #fff;
    background: var(--grad-health);
    box-shadow: 0 20px 50px -20px rgba(16, 185, 129, .55);
}
.hero.hero-brand { background: var(--grad-brand); box-shadow: 0 20px 50px -20px rgba(236, 72, 153, .5); }
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    background: rgba(255, 255, 255, .14);
}
.hero::before { width: 280px; height: 280px; right: -80px; top: -120px; }
.hero::after { width: 180px; height: 180px; right: 120px; bottom: -110px; background: rgba(255, 255, 255, .09); }
.hero h1, .hero h2 { color: #fff; }
.hero .hero-sub { color: rgba(255, 255, 255, .85); }
.hero .btn-light { font-weight: 700; }

/* ---------- Stats ---------- */
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat .label { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.stat .value { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .78rem; color: var(--ink-2); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.stat-tile {
    padding: 1rem 1.1rem; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--line);
    position: relative; overflow: hidden;
}
.stat-tile::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--tone, var(--violet));
}

/* Progress ring (SVG) */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: url(#ring-grad); transition: stroke-dashoffset 1s var(--ease); stroke-linecap: round; }
.ring .ring-label { position: absolute; text-align: center; line-height: 1.1; }
.ring .ring-label .num { font-size: 1.35rem; font-weight: 700; }

/* ---------- Habits checklist ---------- */
.habit {
    display: flex; align-items: center; gap: .85rem;
    width: 100%; text-align: left;
    padding: .8rem .95rem; border-radius: 1rem;
    background: var(--surface-2); border: 1px solid var(--line);
    color: var(--ink);
    transition: transform .15s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
    min-height: 60px;
}
.habit:hover { border-color: rgba(var(--tone-rgb), .45); }
.habit:active { transform: scale(.985); }
.habit .tick {
    width: 30px; height: 30px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    border: 2px solid rgba(var(--tone-rgb), .55);
    color: transparent; font-size: 1rem;
    transition: all .25s var(--ease);
}
.habit .habit-name { font-weight: 600; }
.habit .habit-meta { font-size: .76rem; color: var(--ink-3); }
.habit.done { background: rgba(var(--tone-rgb), .12); border-color: rgba(var(--tone-rgb), .4); }
.habit.done .tick { background: var(--tone); border-color: var(--tone); color: #fff; animation: pop .35s var(--ease); box-shadow: 0 0 0 6px rgba(var(--tone-rgb), .18); }
.habit.done .habit-name { text-decoration: line-through; text-decoration-color: rgba(var(--tone-rgb), .8); text-decoration-thickness: 2px; }
.streak {
    margin-left: auto; display: inline-flex; align-items: center; gap: .25rem;
    font-size: .78rem; font-weight: 700; color: var(--ink-3); white-space: nowrap;
}
.streak.hot { color: var(--orange); }
.streak.hot i { filter: drop-shadow(0 0 6px rgba(249, 115, 22, .7)); }

@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .5s var(--ease) both; }
.fade-up:nth-child(2) { animation-delay: .05s; } .fade-up:nth-child(3) { animation-delay: .1s; }
.fade-up:nth-child(4) { animation-delay: .15s; } .fade-up:nth-child(5) { animation-delay: .2s; }

/* ---------- Habit grid (heatmap) ---------- */
.heat { overflow-x: auto; padding-bottom: .25rem; }
.heat table { border-collapse: separate; border-spacing: 3px; }
.heat th { font-size: .66rem; font-weight: 600; color: var(--ink-3); text-align: center; white-space: nowrap; }
.heat td.name { padding-right: .75rem; white-space: nowrap; font-size: .85rem; font-weight: 600; }
.heat .cell, .heat-legend .cell { width: 16px; height: 16px; border-radius: 5px; background: var(--surface-3); }
.heat .cell.done, .heat-legend .cell.done { background: var(--tone); box-shadow: 0 0 10px -2px rgba(var(--tone-rgb), .7); }
.heat .cell.missed, .heat-legend .cell.missed { background: rgba(244, 63, 94, .16); box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .28); }
.heat .cell.open, .heat-legend .cell.open { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(var(--tone-rgb), .6); }
.heat .cell.off, .heat-legend .cell.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.heat-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: var(--ink-3); }
.heat-legend .cell { display: inline-block; vertical-align: -3px; margin-right: .3rem; }

.bar-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--tone, var(--violet)); transition: width 1s var(--ease); }

/* ---------- Forms & buttons ---------- */
.form-control, .form-select {
    background-color: var(--surface-2); border-color: var(--line-strong); color: var(--ink);
    border-radius: .8rem; padding: .62rem .85rem;
}
.form-control:focus, .form-select:focus {
    background-color: var(--surface-2); color: var(--ink);
    border-color: rgba(139, 92, 246, .7);
    box-shadow: 0 0 0 .22rem rgba(139, 92, 246, .22);
}
.form-control::placeholder { color: var(--ink-3); }
.form-label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.form-text { color: var(--ink-3); }
.form-check-input { background-color: var(--surface-3); border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }
.input-group-text { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-2); border-radius: .8rem; }

.btn { border-radius: .8rem; font-weight: 600; padding: .55rem 1rem; }
.btn-sm { border-radius: .6rem; padding: .35rem .7rem; }
.btn-lg { border-radius: 1rem; padding: .8rem 1.35rem; }
.btn-grad {
    color: #fff; border: 0;
    background: var(--grad-brand); background-size: 160% 100%;
    box-shadow: 0 10px 26px -10px rgba(236, 72, 153, .75);
    transition: background-position .5s var(--ease), transform .15s var(--ease), box-shadow .3s;
}
.btn-grad:hover { color: #fff; background-position: 100% 0; box-shadow: 0 14px 30px -10px rgba(236, 72, 153, .9); }
.btn-grad:active { transform: scale(.98); }
.btn-health { color: #fff; border: 0; background: var(--grad-health); box-shadow: 0 10px 26px -10px rgba(16, 185, 129, .75); }
.btn-health:hover { color: #fff; filter: brightness(1.08); }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost { background: transparent; border: 0; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: .8rem; }

/* Colour and icon pickers */
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch {
    width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--tone);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; transition: box-shadow .2s, transform .15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tone); }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: .35rem; }
.icon-pick button {
    height: 40px; border-radius: .7rem; border: 1px solid var(--line); background: var(--surface-2);
    color: var(--ink-2); font-size: 1.05rem;
}
.icon-pick button.on { color: #fff; background: var(--tone); border-color: var(--tone); }
.day-toggle { display: flex; gap: .3rem; flex-wrap: wrap; }
.day-toggle button {
    width: 40px; height: 36px; border-radius: .65rem; border: 1px solid var(--line-strong);
    background: var(--surface-2); color: var(--ink-2); font-size: .78rem; font-weight: 700;
}
.day-toggle button.on { background: var(--tone, var(--violet)); border-color: transparent; color: #fff; }

/* Segmented control (range presets, unit switch) */
.seg { display: inline-flex; padding: .25rem; gap: .2rem; border-radius: .9rem; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg a, .seg button {
    border: 0; background: transparent; color: var(--ink-2); text-decoration: none;
    padding: .35rem .75rem; border-radius: .65rem; font-size: .82rem; font-weight: 700;
}
.seg a.on, .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line); }

/* ---------- Tables & lists ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); margin: 0; }
.table > :not(caption) > * > * { padding: .75rem .6rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.list-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

/* ---------- Dropdowns, modals, toasts ---------- */
.dropdown-menu {
    --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--line-strong);
    --bs-dropdown-link-color: var(--ink); --bs-dropdown-link-hover-bg: var(--surface-2);
    --bs-dropdown-link-active-bg: var(--surface-3); --bs-dropdown-link-active-color: var(--ink);
    border-radius: 1rem; padding: .4rem; box-shadow: var(--shadow);
}
.dropdown-item { border-radius: .6rem; padding: .5rem .7rem; font-weight: 500; }
.modal-content { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 1.3rem; box-shadow: var(--shadow); }
.modal-header, .modal-footer { border-color: var(--line); }
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 991.98px) { .toast-stack { bottom: 6rem; left: 1rem; } }
.toast-x {
    display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-radius: 1rem;
    background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
    font-weight: 600; font-size: .9rem; animation: fadeUp .35s var(--ease) both;
}
.alert { border-radius: 1rem; border: 1px solid var(--line-strong); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--ink-2); }
.empty .empty-icon {
    width: 64px; height: 64px; margin: 0 auto .9rem; border-radius: 20px;
    display: grid; place-items: center; font-size: 1.7rem;
    color: var(--tone, var(--violet)); background: rgba(var(--tone-rgb, 139, 92, 246), .13);
}
.empty h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: .3rem; }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 320px; }
@media (max-width: 575.98px) { .chart-box { height: 240px; } }
.sparkline { display: block; width: 100%; height: 56px; }

/* ---------- Guest (auth) layout ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
    position: relative; overflow: hidden; padding: 3rem; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    background: #0b0714;
}
.auth-art .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .9; }
.auth-art .b1 { width: 420px; height: 420px; background: #8b5cf6; top: -120px; left: -80px; }
.auth-art .b2 { width: 360px; height: 360px; background: #ec4899; bottom: -100px; right: -60px; }
.auth-art .b3 { width: 300px; height: 300px; background: #10b981; top: 40%; left: 40%; opacity: .55; }
.auth-art > * { position: relative; }
.auth-art .quote { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 700; line-height: 1.15; max-width: 30rem; }
.auth-panel { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Landing ---------- */
.land-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; }
.land-hero { padding: 4.5rem 0 3rem; text-align: center; }
.land-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; }
.land-hero .lead { color: var(--ink-2); max-width: 40rem; margin: 1.25rem auto 2rem; font-size: 1.15rem; }
.module-card { padding: 1.4rem; height: 100%; }
.module-card .chip-icon { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 16px; }
.mock {
    border-radius: 1.5rem; padding: 1rem; margin-top: 3rem;
    background: var(--surface); border: 1px solid var(--line-strong);
    box-shadow: 0 40px 120px -40px rgba(139, 92, 246, .55);
}

/* ---------- Shared report page ---------- */
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.share-brand img { max-height: 40px; max-width: 180px; object-fit: contain; }
.share-foot { text-align: center; padding: 2.5rem 0; color: var(--ink-3); font-size: .85rem; }

/* ---------- Admin console ---------- */
.admin-shell { --grad-admin: linear-gradient(135deg, #f43f5e 0%, #f97316 55%, #f59e0b 100%); }
.admin-shell .sidebar.admin-sidebar,
.admin-offcanvas {
    background:
        radial-gradient(380px 260px at 0% 0%, rgba(244, 63, 94, .14), transparent 70%),
        var(--surface);
}
.admin-mark { background: var(--grad-admin); box-shadow: 0 6px 20px -6px rgba(244, 63, 94, .7); }
.admin-avatar { background: var(--grad-admin); }
.admin-tag { font-family: var(--font-sans); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose); margin-top: .2rem; }
.admin-shell .side-link.active { box-shadow: inset 3px 0 0 var(--rose), inset 0 0 0 1px var(--line); }
.count-badge {
    min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px;
    display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800;
    color: #fff; background: var(--grad-admin);
}
.admin-search { position: relative; width: min(360px, 40vw); }
.admin-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .85rem; }
.admin-search .form-control { padding-left: 2.1rem; border-radius: 999px; }
.offcanvas { --bs-offcanvas-bg: var(--surface); --bs-offcanvas-color: var(--ink); border-color: var(--line) !important; }
.admin-offcanvas { padding: 1.1rem .9rem; }
.admin-offcanvas .sidebar-footer { margin-top: auto; }
.hero.hero-admin { background: var(--grad-admin); box-shadow: 0 20px 50px -20px rgba(244, 63, 94, .55); }
.kpi { display: flex; gap: .9rem; align-items: center; padding: 1.1rem 1.2rem; }
.kpi .chip-icon { width: 46px; height: 46px; font-size: 1.25rem; }
.kpi .kpi-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-label { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.kpi .kpi-sub { font-size: .76rem; color: var(--ink-2); }
.todo-item { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: .9rem; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.todo-item + .todo-item { margin-top: .5rem; }
.todo-item:hover { border-color: rgba(var(--tone-rgb), .5); color: var(--ink); }
.health-row { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.health-row:last-child { border-bottom: 0; }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
