/* ============================================================
   pocketii — main.css
   Wireframe design system: tokens → base → layout → components
   ============================================================ */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
    /* ── Wireframe palette ── */
    --navy:        #0A0F1E;
    /* PocketII / Stitch primary */
    --indigo:      #135bec;
    --indigo-600:  #0f4bc4;
    --indigo-100:  #dbe8fd;
    --emerald:     #10B981;
    --emerald-100: #D1FAE5;
    --rose:        #F43F5E;
    --rose-100:    #FFE4E6;
    --amber:       #F59E0B;
    --amber-100:   #FEF3C7;
    --purple:      #8B5CF6;

    /* ── Slate scale ── */
    --s50:  #F8FAFC;
    --s100: #F1F5F9;
    --s200: #E2E8F0;
    --s300: #CBD5E1;
    --s400: #94A3B8;
    --s500: #64748B;
    --s600: #475569;
    --s700: #334155;
    --s800: #1E293B;
    --s900: #0F172A;

    /* ── Semantic aliases ── */
    --accent:         var(--indigo);
    --accent-hover:   var(--indigo-600);
    --accent-subtle:  rgba(19,91,236,0.10);
    --accent-glow:    0 0 0 3px rgba(19,91,236,0.22);
    --success:        var(--emerald);
    --success-subtle: rgba(16,185,129,0.12);
    --warning:        var(--amber);
    --warning-subtle: rgba(245,158,11,0.12);
    --danger:         var(--rose);
    --danger-subtle:  rgba(244,63,94,0.12);
    --info:           #38bdf8;
    --info-subtle:    rgba(56,189,248,0.12);

    /* ── Background / border / text (dark defaults) ── */
    --bg-base:        #0d0d14;
    --bg-surface:     #16161f;
    --bg-elevated:    #1e1e2a;
    --bg-hover:       #23232f;
    --border-subtle:  rgba(255,255,255,0.06);
    --border-muted:   rgba(255,255,255,0.12);
    --border-accent:  rgba(19,91,236,0.45);
    --text-primary:   #f0f0f5;
    --text-secondary: #9090a8;
    --text-muted:     #5a5a70;

    /* ── Typography ── */
    --font-sans: 'Manrope', 'Source Sans 3', system-ui, sans-serif;
    --font-display: 'Manrope', system-ui, sans-serif;
    --text-xs:   0.72rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semi:   600;
    --fw-bold:   700;

    /* ── Spacing ── */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;

    /* ── Radii ── */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   22px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-sm:   0 4px 12px rgba(15,23,42,0.08);
    --shadow-md:   0 12px 28px rgba(79,70,229,0.10);
    --shadow-lg:   0 24px 48px rgba(15,23,42,0.18);
    --shadow-card: 0 10px 24px rgba(79,70,229,0.08);

    /* ── Transitions ── */
    --transition: 0.18s ease;

    /* ── Bottom nav (mobile) ── */
    --bottom-nav-height: 72px;

    /* ── Legacy color aliases ── */
    --color-accent:           var(--accent);
    --color-accent-soft:      #E0E7FF;
    --color-accent-muted:     #c0c0c0;
    --color-bg:               var(--s50);
    --color-nav-hover:        var(--accent);
    --color-text-heading:     var(--s900);
    --color-text-body:        var(--s600);
    --color-button:           var(--accent);
    --color-button-text:      #fff;
    --color-button-hover:     var(--indigo-600);
    --color-border:           var(--s200);
    --color-dropzone-bg:      var(--s50);
    --color-dropzone-border:  var(--s200);
    --color-success-bg:       var(--emerald-100);
    --color-success-border:   var(--emerald);
    --color-error-bg:         var(--rose-100);
    --color-error-border:     var(--rose);
}

/* ── App-shell pages default to light palette; dark is explicit (theme.js adds .theme-dark) ── */
body.app-shell-page {
    --bg-base:        var(--s50);
    --bg-surface:     #ffffff;
    --bg-elevated:    #ffffff;
    --bg-hover:       var(--s50);
    --border-subtle:  var(--s200);
    --border-muted:   var(--s200);
    --text-primary:   var(--s900);
    --text-secondary: var(--s600);
    --text-muted:     var(--s500);
    --shadow-sm:      0 4px 12px rgba(15,23,42,0.08);
    --shadow-md:      0 12px 28px rgba(79,70,229,0.10);
    --shadow-lg:      0 24px 48px rgba(15,23,42,0.18);
    --shadow-card:    0 10px 24px rgba(79,70,229,0.08);
}

/* Dark mode inside app shell (otherwise .app-shell-page always forced light and overrode .theme-dark) */
body.app-shell-page.theme-dark {
    --bg-base:        #0d0d14;
    --bg-surface:     #16161f;
    --bg-elevated:    #1e1e2a;
    --bg-hover:       #23232f;
    --border-subtle:  rgba(255,255,255,0.06);
    --border-muted:   rgba(255,255,255,0.12);
    --text-primary:   #f0f0f5;
    --text-secondary: #9090a8;
    --text-muted:     #5a5a70;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.25);
    --shadow-md:      0 4px 14px rgba(0,0,0,0.35);
    --shadow-lg:      0 8px 30px rgba(0,0,0,0.45);
    --shadow-card:    0 1px 4px rgba(0,0,0,0.2);
}
html[data-theme="dark"] body.app-shell-page {
    --bg-base:        #0d0d14;
    --bg-surface:     #16161f;
    --bg-elevated:    #1e1e2a;
    --bg-hover:       #23232f;
    --border-subtle:  rgba(255,255,255,0.06);
    --border-muted:   rgba(255,255,255,0.12);
    --text-primary:   #f0f0f5;
    --text-secondary: #9090a8;
    --text-muted:     #5a5a70;
}

/* Tables inside app shell follow semantic tokens in dark mode */
body.app-shell-page.theme-dark th,
html[data-theme="dark"] body.app-shell-page th {
    background: var(--bg-hover);
    color: var(--text-muted);
    border-bottom-color: var(--border-subtle);
}
body.app-shell-page.theme-dark td,
html[data-theme="dark"] body.app-shell-page td {
    color: var(--text-secondary);
    border-bottom-color: var(--border-subtle);
}
body.app-shell-page.theme-dark tbody tr:hover td,
html[data-theme="dark"] body.app-shell-page tbody tr:hover td {
    background: var(--bg-hover);
}

/* ── Explicit light theme class ── */
body.theme-light,
[data-theme="light"] {
    --bg-base:        var(--s50);
    --bg-surface:     #ffffff;
    --bg-elevated:    #ffffff;
    --bg-hover:       var(--s50);
    --border-subtle:  var(--s200);
    --border-muted:   var(--s300);
    --text-primary:   var(--s900);
    --text-secondary: var(--s600);
    --text-muted:     var(--s500);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 30px rgba(0,0,0,0.10);
    --shadow-card:    0 1px 4px rgba(0,0,0,0.06);
}

/* ── 2. BASE RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    background-color: var(--bg-base);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 767px) { body { padding-bottom: 68px; } }
@media (max-width: 1023px) { body.app-shell-page { padding-bottom: 0; } }
strong { font-weight: var(--fw-bold); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { color: var(--text-primary); font-weight: var(--fw-bold); line-height: 1.3; margin-top: 0; }
.skip-to-content {
    position: absolute; left: -9999px; z-index: 9999;
    padding: var(--sp-3) var(--sp-4); background: var(--accent);
    color: #fff; font-weight: var(--fw-semi);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm); text-decoration: none;
}
.skip-to-content:focus { left: var(--sp-4); top: var(--sp-4); }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Loading skeletons */
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-line {
    height: 10px;
    border-radius: var(--radius-sm);
    max-width: 100%;
    background: linear-gradient(
        90deg,
        var(--s200) 0%,
        var(--s100) 50%,
        var(--s200) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-line--wide { width: 100%; }
.skeleton-line--medium { width: 66%; }
body.app-shell-page.theme-dark .skeleton-line,
html[data-theme="dark"] body.app-shell-page .skeleton-line {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.06) 0%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.06) 100%
    );
    background-size: 200% 100%;
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ── 3. APP SHELL ──────────────────────────────────────────── */
.app-shell { display: flex; height: 100dvh; min-height: 100dvh; overflow: hidden; }

/* Stitch / PocketII: light rail + dark rail in dark mode */
.sidebar {
    width: 256px; min-width: 256px;
    background: #ffffff;
    border-right: 1px solid #f0f2f5;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden; flex-shrink: 0;
}
html[data-theme="dark"] body.app-shell-page .sidebar,
body.app-shell-page.theme-dark .sidebar {
    background: #1a1a2e;
    border-right-color: #2d2d3d;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.12); border-radius: 2px; }
html[data-theme="dark"] body.app-shell-page .sidebar::-webkit-scrollbar-thumb,
body.app-shell-page.theme-dark .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

.sb-logo { padding: 24px 18px 16px; border-bottom: 1px solid #f0f2f5; flex-shrink: 0; }
html[data-theme="dark"] body.app-shell-page .sb-logo,
body.app-shell-page.theme-dark .sb-logo { border-bottom-color: #2d2d3d; }
.sb-logo-text {
    display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.03em;
    color: var(--indigo);
    -webkit-text-fill-color: unset;
    background: none;
    text-decoration: none; line-height: 1.2;
}
.sb-logo-sub { font-size: 11px; color: var(--s500); margin-top: 4px; }
html[data-theme="dark"] body.app-shell-page .sb-logo-sub,
body.app-shell-page.theme-dark .sb-logo-sub { color: rgba(255,255,255,0.38); }

.sb-nav { flex: 1; padding: 8px 0; overflow-y: auto; overflow-x: hidden; }
.sb-nav::-webkit-scrollbar { width: 0; }
.sb-section {
    padding: 14px 16px 4px; font-size: 10px; font-weight: 700;
    color: var(--s400); letter-spacing: 0.1em; text-transform: uppercase;
}
html[data-theme="dark"] body.app-shell-page .sb-section,
body.app-shell-page.theme-dark .sb-section { color: rgba(255,255,255,0.28); }
.sb-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin: 2px 8px; border-radius: 12px;
    font-size: 13px; font-weight: 500; color: var(--s600);
    cursor: pointer; transition: background var(--transition), color var(--transition), border-left-color var(--transition);
    text-decoration: none; border-left: 3px solid transparent;
}
.sb-link:hover { background: var(--s100); color: var(--s900); text-decoration: none; }
html[data-theme="dark"] body.app-shell-page .sb-link,
body.app-shell-page.theme-dark .sb-link { color: rgba(255,255,255,0.55); }
html[data-theme="dark"] body.app-shell-page .sb-link:hover,
body.app-shell-page.theme-dark .sb-link:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.92); }
.sb-link.active {
    background: rgba(19,91,236,0.10);
    color: var(--indigo);
    font-weight: 700;
    border-left-color: var(--indigo);
    box-shadow: none;
}
html[data-theme="dark"] body.app-shell-page .sb-link.active,
body.app-shell-page.theme-dark .sb-link.active {
    background: rgba(19,91,236,0.22);
    color: #fff;
    border-left-color: #6ba3ff;
    box-shadow: none;
}
.sb-link .icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.sb-link .icon .material-symbols-rounded { font-size: 18px; }
.sb-badge { margin-left: auto; background: var(--rose); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 10px; line-height: 1.4; flex-shrink: 0; }

.sb-user { margin-top: auto; padding: 14px 12px; border-top: 1px solid #f0f2f5; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
html[data-theme="dark"] body.app-shell-page .sb-user,
body.app-shell-page.theme-dark .sb-user { border-top-color: #2d2d3d; }
.sb-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sb-user-name  { font-size: 12px; font-weight: 600; color: var(--s900); line-height: 1.3; }
html[data-theme="dark"] body.app-shell-page .sb-user-name,
body.app-shell-page.theme-dark .sb-user-name { color: #fff; }
.sb-user-email { font-size: 10px; color: var(--s500); line-height: 1.3; }
html[data-theme="dark"] body.app-shell-page .sb-user-email,
body.app-shell-page.theme-dark .sb-user-email { color: rgba(255,255,255,0.38); }
.sb-user-icon { margin-left: auto; color: var(--s400); font-size: 16px; cursor: pointer; text-decoration: none; transition: color var(--transition); }
html[data-theme="dark"] body.app-shell-page .sb-user-icon,
body.app-shell-page.theme-dark .sb-user-icon { color: rgba(255,255,255,0.30); }
.sb-user-icon:hover { color: var(--indigo); }
html[data-theme="dark"] body.app-shell-page .sb-user-icon:hover,
body.app-shell-page.theme-dark .sb-user-icon:hover { color: rgba(255,255,255,0.70); }

.app-main { flex: 1; overflow-y: auto; background: var(--bg-base); display: flex; flex-direction: column; min-width: 0; }
.app-main::-webkit-scrollbar { width: 6px; }
.app-main::-webkit-scrollbar-thumb { background: var(--border-muted); border-radius: 3px; }

.topbar {
    background: var(--bg-surface);
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 28px; display: flex; align-items: center; gap: 14px;
    flex-shrink: 0; position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
}
.topbar-greeting { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.topbar-date     { font-size: 12px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.topbar-bell {
    position: relative; cursor: pointer; padding: 8px; border-radius: 8px;
    background: var(--bg-hover); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition); text-decoration: none; font-size: 16px;
    font-family: inherit;
}
button.topbar-bell { border: none; margin: 0; }
.topbar-bell:hover { background: var(--border-subtle); color: var(--text-secondary); }
.topbar-bell .material-symbols-rounded { font-size: 18px; }
.topbar-badge { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; background: var(--rose); border-radius: 50%; border: 2px solid var(--bg-surface); }
.topbar-add-btn { margin-left: 0; }

.topbar--stitch {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    row-gap: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.65);
}
html[data-theme="dark"] body.app-shell-page .topbar--stitch,
body.app-shell-page.theme-dark .topbar--stitch {
    border-bottom-color: var(--border-subtle);
}
.topbar-lead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    min-width: 0;
}
.topbar-date--inline { margin-left: 0; }
.topbar-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    justify-content: flex-end;
}
.topbar-pill {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}
.topbar--stitch .topbar-lead { order: 1; }
.topbar--stitch .topbar-search { order: 2; }
.topbar--stitch .topbar-trail { order: 3; }
@media (max-width: 767px) {
    .topbar--stitch .topbar-trail {
        margin-left: 0;
        flex: 1 1 auto;
        justify-content: flex-end;
    }
    .topbar--stitch .topbar-search {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
    }
}

.topbar-search {
    flex: 1;
    min-width: 0;
    max-width: 28rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-hover);
}
.topbar-search .topbar-search-icon {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.topbar-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
    font-family: inherit;
}
.topbar-search input::placeholder { color: var(--text-muted); }

.content-area { padding: 24px 28px; flex: 1; }
.content-area--stitch {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    padding: 16px 0 24px;
}
@media (min-width: 1024px) {
    body.app-shell-page .content-area--stitch { padding: 20px 0 28px; }
}

/* ── 4. CONTAINER ──────────────────────────────────────────── */
.container { width: 92%; max-width: 1000px; margin: 0 auto; padding: var(--sp-5); }
.main-content { min-height: calc(100vh - 60px); padding: var(--sp-6) 0; background-color: var(--bg-base); }

/* ── 5. PAGE STRUCTURE ─────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: 24px; flex-wrap: wrap; }
.page-title  { font-family: var(--font-display); font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 800; color: var(--text-primary); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
.page-meta   { font-size: var(--text-sm); color: var(--text-muted); margin: 4px 0 0 0; }
.page-back-link { font-size: var(--text-sm); color: var(--s500); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--sp-2); transition: color var(--transition); }
.page-back-link:hover { color: var(--s900); }
.page-back-wrap { margin: 0 0 var(--sp-3) 0; padding: 0; }
.page-back-wrap .page-back-link { margin-bottom: 0; }
.page-back-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--text-sm); color: var(--s500); text-decoration: none; padding: 0.35rem 0.75rem; border-radius: var(--radius-md); border: 1px solid var(--s200); background: transparent; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.page-back-btn:hover { color: var(--s900); border-color: var(--s300); background: var(--s50); }

/* Net worth tabs + shared card grids (budgets / goals) */
.nw-tabs {
    display: flex; gap: 4px; margin-bottom: 1.25rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--border-subtle);
}
.nw-tab {
    font-family: inherit; font-size: 13px; font-weight: 600;
    padding: 8px 16px; border: none; border-bottom: 2px solid transparent;
    margin-bottom: -1px; background: transparent; color: var(--text-muted); cursor: pointer;
    transition: color .12s, border-color .12s;
}
.nw-tab:hover { color: var(--s800); }
.nw-tab.nw-tab-active { color: var(--brand, #135bec); border-bottom-color: var(--brand, #135bec); }
.nw-tab-panel-hidden { display: none !important; }
.nw-section-title { font-size: 1rem; font-weight: 600; margin: 0 0 0.5rem 0; color: var(--text-primary); }
.nw-summary-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.nw-summary-table th, .nw-summary-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.budget-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* ── 6. CARDS ──────────────────────────────────────────────── */
.card { background: var(--bg-surface); border-radius: 1rem; border: 1px solid var(--border-subtle); padding: 1.375rem 1.25rem; box-shadow: var(--shadow-card); position: relative; }
body.app-shell-page .card {
    border-radius: 1rem;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(15, 23, 42, 0.03);
}
html[data-theme="dark"] body.app-shell-page .card,
body.app-shell-page.theme-dark .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.card-lg   { padding: 28px; }
.card-dark { background: linear-gradient(135deg, var(--navy) 0%, #1a1f3e 55%, #0f1929 100%); color: #fff; border-color: transparent; }
.welcome-section,
.card-section {
    padding: var(--sp-6); background-color: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: var(--sp-6);
}
.welcome-section h1, .welcome-section h2,
.card-section h1, .card-section h2 { font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--text-primary); margin-top: 0; }
.welcome-section .lead, .card-section .lead { font-size: var(--text-lg); line-height: 1.7; color: var(--text-secondary); margin: 0 0 var(--sp-5) 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.card-header h2 { margin: 0; font-size: var(--text-xl); }
.card-title { font-size: 14px; font-weight: 700; color: var(--s800); }

/* ── 7. STAT ROW ───────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-card); }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.stat-value  { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.stat-change { font-size: 11px; font-weight: 500; margin-top: 5px; }
.stat-change.up   { color: var(--emerald); }
.stat-change.down { color: var(--rose); }
.stat-change.warn { color: var(--amber); }

/* ── 8. BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: 0.7rem 1.15rem; font-size: var(--text-sm);
    font-family: var(--font-sans); font-weight: var(--fw-semi);
    text-align: center; border-radius: 8px; cursor: pointer;
    text-decoration: none; border: 1px solid transparent;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
    white-space: nowrap; line-height: 1.4; border-radius: 12px;
}
.btn:focus-visible { outline: none; box-shadow: var(--accent-glow); }
.btn + .btn { margin-left: var(--sp-2); }
.btn-primary { background-color: var(--indigo); color: #fff; border-color: var(--indigo); box-shadow: 0 10px 20px rgba(99,102,241,0.22); }
.btn-primary:hover { background-color: var(--indigo-600); border-color: var(--indigo-600); color: #fff; transform: translateY(-1px); box-shadow: 0 14px 26px rgba(99,102,241,0.26); }
.btn-secondary { background-color: var(--bg-surface); color: var(--text-secondary); border-color: var(--border-subtle); }
.btn-secondary:hover { background-color: var(--bg-hover); color: var(--text-primary); border-color: var(--border-muted); }
.btn-ghost { background: transparent; color: var(--s600); border: 1px solid var(--s200); }
.btn-ghost:hover { background: var(--s100); color: var(--s800); }
.btn-danger { background-color: var(--rose); color: #fff; border-color: var(--rose); }
.btn-danger:hover { background-color: #e0294e; border-color: #e0294e; color: #fff; }
.btn-emerald { background-color: var(--emerald); color: #fff; border-color: var(--emerald); }
.btn-emerald:hover { background-color: #0da271; border-color: #0da271; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-block-centered { justify-content: center; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: var(--text-base); }
.btn-link-reset { border: 0; background: transparent; cursor: pointer; font: inherit; color: inherit; padding: 0; }

/* ── 9. BADGES ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; vertical-align: middle; line-height: 1.4; background: var(--indigo-100,#e0e7ff); color: var(--indigo,#6366F1); }
.badge-indigo  { background: var(--indigo-100);  color: #4338CA; }
.badge-emerald { background: var(--emerald-100); color: #065F46; }
.badge-rose    { background: var(--rose-100);    color: #BE123C; }
.badge-amber   { background: var(--amber-100);   color: #92400E; }
.badge-slate   { background: var(--s100);        color: var(--s600); }
.badge-purple  { background: #EDE9FE;            color: #5B21B6; }
.badge-plaid   { background: rgba(0,31,63,0.4);  color: #93c5fd; border: 1px solid rgba(147,197,253,0.2); }
.tag-badge { display: inline-flex; align-items: center; margin-left: var(--sp-1); padding: 2px 8px; border-radius: var(--radius-full); background: var(--indigo-100); color: var(--indigo-600); font-size: var(--text-xs); font-weight: var(--fw-medium); border: 1px solid rgba(99,102,241,0.25); }
.notification-count { margin-left: var(--sp-1); min-width: 18px; padding: 2px 5px; border-radius: var(--radius-full); background: var(--rose); color: #fff; font-size: var(--text-xs); font-weight: var(--fw-bold); text-align: center; line-height: 1.4; }
.rec-badge { margin-left: 0; margin-right: var(--sp-1); }
.rec-badge-weekly  { background: var(--info-subtle);    color: #7dd3fc; border: 1px solid rgba(56,189,248,.35); }
.rec-badge-monthly { background: rgba(167,139,250,.16); color: #c4b5fd; border: 1px solid rgba(167,139,250,.35); }
.rec-badge-yearly  { background: var(--warning-subtle); color: #fde68a; border: 1px solid rgba(250,204,21,.35); }
.rec-badge-active  { background: var(--success-subtle); color: #065F46; border: 1px solid rgba(16,185,129,.35); }
.rec-badge-inactive{ background: rgba(148,163,184,.16); color: var(--s500); border: 1px solid rgba(148,163,184,.35); }

/* ── 10. PROGRESS BARS ─────────────────────────────────────── */
.progress-bar { height: 8px; background: var(--s100); border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 20px; transition: width 0.3s ease; background: var(--indigo); }
.progress-fill.green  { background: var(--emerald); }
.progress-fill.amber  { background: var(--amber); }
.progress-fill.red    { background: var(--rose); }
.progress-fill.indigo { background: var(--indigo); }
.progress-bar-wrap { width: 100%; height: 6px; background: var(--s200); border-radius: var(--radius-full); overflow: hidden; margin-top: var(--sp-2); }
.progress-bar-fill { height: 100%; border-radius: var(--radius-full); background: var(--emerald); transition: width 0.4s ease; }
.progress-bar-fill.warning { background: var(--amber); }
.progress-bar-fill.danger  { background: var(--rose); }

/* ── 11. FORMS ─────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-5); text-align: left; }
.form-group label { display: block; font-weight: var(--fw-medium); font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-2); }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--s700); margin-bottom: 6px; }
.form-input,
.form-control {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--s200);
    border-radius: 12px; font-family: inherit; font-size: 14px;
    color: var(--s900); background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition); line-height: 1.5;
}
.form-input::placeholder, .form-control::placeholder { color: var(--s400); }
.form-input:focus, .form-control:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-select,
select.form-input,
select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-height: 44px;
    border-radius: 10px;
    border: 1.5px solid var(--s200);
    background-color: var(--bg-surface, #fff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236366F1' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding: 10px 40px 10px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary, var(--s900));
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.form-select:hover,
select.form-input:hover,
select.form-control:hover { border-color: var(--s300); }
.form-select:focus,
select.form-input:focus,
select.form-control:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
body.theme-dark .form-select,
body.theme-dark select.form-input,
body.theme-dark select.form-control,
body.app-shell-page.theme-dark .form-select,
body.app-shell-page.theme-dark select.form-input,
body.app-shell-page.theme-dark select.form-control {
    background-color: var(--bg-elevated, #1e1e2a);
    color: var(--text-primary, #e5e7eb);
    border-color: var(--border-muted, rgba(255,255,255,0.12));
    color-scheme: dark;
}
body.app-shell-page.theme-dark .form-select option,
body.theme-dark .form-select option {
    background-color: var(--bg-elevated, #1e1e2a);
    color: var(--text-primary, #f0f0f5);
}
body.app-shell-page.theme-dark .form-label,
body.app-shell-page.theme-dark .form-group label {
    color: var(--text-secondary);
}
body.app-shell-page.theme-dark .form-hint {
    color: var(--text-muted);
}
.notifications-list--sheet {
    max-height: min(42dvh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
}
.form-hint     { font-size: 11px; color: var(--s400); margin-top: 4px; }
.form-optional { font-size: var(--text-xs); color: var(--s400); font-weight: var(--fw-normal); }
.form-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--s200); }
.form-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-page-card { background: #fff; border: 1px solid var(--s200); border-radius: 14px; padding: var(--sp-8); max-width: 520px; box-shadow: var(--shadow-card); }
.amount-input-wrap { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--s200); border-radius: 8px; overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); }
.amount-input-wrap:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.amount-currency-prefix { padding: 0 14px; color: var(--s500); font-size: var(--text-lg); font-weight: var(--fw-semi); border-right: 1px solid var(--s200); line-height: 1; user-select: none; background: var(--s50); align-self: stretch; display: flex; align-items: center; }
.amount-input { border: none !important; box-shadow: none !important; background: transparent !important; font-size: var(--text-2xl) !important; font-weight: var(--fw-bold) !important; padding: 0.65rem var(--sp-4) !important; flex: 1; min-width: 0; }
.amount-input:focus { outline: none; }
.inline-new-category { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.inline-new-category .form-control { flex: 1; min-width: 140px; }
.password-toggle-wrapper { position: relative; display: block; }
.password-toggle-wrapper .form-control { padding-right: 2.75rem; }
.password-toggle-wrapper .btn-password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px 8px; cursor: pointer; font-size: var(--text-xs); color: var(--s400); border-radius: var(--radius-sm); transition: color var(--transition); }
.password-toggle-wrapper .btn-password-toggle:hover { color: var(--s700); }

/* ── 12. TABLES ────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th { background: var(--s50); color: var(--s500); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--s200); }
td { padding: 13px 14px; border-bottom: 1px solid var(--s200); color: var(--s800); }
tbody tr:hover td { background: var(--s50); }
tbody tr:last-child td { border-bottom: none; }
.expense-item-emoji { margin-right: 6px; vertical-align: -0.12em; line-height: 1; display: inline-flex; }
.expense-item-emoji .material-symbols-rounded { font-size: 1.1rem; }
.budget-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--s200); }
.budget-table th, .budget-table td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--s200); font-size: var(--text-sm); }
.budget-table th { font-weight: var(--fw-semi); color: var(--s500); background: var(--s50); text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; }
.budget-table tr:last-child td { border-bottom: none; }
.budget-table tbody tr:hover td { background: var(--s50); }
.budget-table a { color: var(--s800); text-decoration: none; font-weight: var(--fw-medium); }
.budget-table a:hover { color: var(--indigo); }
.budget-table .btn-sm { margin-left: var(--sp-2); }
.rec-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: var(--sp-4);
    margin-top: var(--sp-2);
}
.rec-card {
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: var(--sp-4);
    background: var(--surface, #fff);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.rec-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.rec-card-symbol { font-weight: var(--fw-bold); font-size: 1.15rem; }
.rec-card-scores { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.rec-score-pill {
    border: 1px solid var(--border-subtle);
    background: var(--surface-alt, #f8fafc);
    border-radius: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-weight: var(--fw-semi);
    cursor: pointer;
    font-size: 0.9rem;
}
.rec-conf-pill { font-size: 0.75rem; color: var(--text-muted); }
.rec-card-why { font-size: 0.8125rem; margin: 0.25rem 0; line-height: 1.45; }
.rec-card-why-label { font-weight: var(--fw-semi); color: var(--text-muted); margin-right: 0.25rem; }
.rec-card-thesis { display: grid; gap: 0.35rem; margin: 0.35rem 0; font-size: 0.8125rem; line-height: 1.4; }
.rec-thesis-bull { padding: 0.35rem 0.5rem; border-radius: 0.35rem; background: rgba(56, 161, 105, 0.08); }
.rec-thesis-bear { padding: 0.35rem 0.5rem; border-radius: 0.35rem; background: rgba(229, 62, 62, 0.06); }
.rec-card-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0; }
.rec-data-badge { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.45rem; border-radius: 99px; background: var(--s100, #f1f5f9); color: var(--s600, #475569); }
.rec-action-queue-ul { list-style: none; margin: 0; padding: 0; }
.rec-action-queue-li { padding: 0.5rem 0; border-bottom: 1px solid var(--border-subtle); }
.rec-action-queue-li:last-child { border-bottom: none; }
.rec-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border-subtle); }
.rec-score-modal-disclaimer {
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--surface-alt, #f8fafc);
    border-left: 3px solid var(--text-muted);
    margin-bottom: 0.75rem;
}
.rec-score-modal-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem; }
.rec-score-modal-provenance { font-size: 0.75rem; margin-top: 0.5rem; }
.rec-table-wrap { overflow-x: auto; margin-top: var(--sp-2); }
.rec-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.rec-table th, .rec-table td { padding: var(--sp-2) var(--sp-3); text-align: left; border-bottom: 1px solid var(--border-subtle); }
.rec-table th { font-weight: var(--fw-semi); color: var(--text-muted); }
.rec-table .rec-symbol { font-weight: var(--fw-bold); }
.rec-table .rec-actions { white-space: nowrap; }
body.rec-page-volatile .rec-add-holding { display: none !important; }
.rec-surplus-waterfall-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-subtle); border-radius: 0.5rem; overflow: hidden; }
.rec-surplus-waterfall-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.rec-surplus-waterfall-row:last-child { border-bottom: none; }
.rec-surplus-waterfall-row--out { color: var(--text-muted); }
.rec-surplus-waterfall-row--result { font-weight: var(--fw-semi); background: var(--surface, #f8fafc); }
.rec-surplus-waterfall-label { flex: 1; min-width: 0; }
.rec-surplus-waterfall-amt { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rec-surplus-waterfall-summary--warn { color: #c53030; font-weight: var(--fw-medium); }
.rec-surplus-waterfall-summary--muted { opacity: 0.85; }
.rec-news-list { margin: 0; padding-left: 1.25rem; }
.rec-news-list li { margin-bottom: 0.25rem; }

/* ── 13. EXPENSE LIST ──────────────────────────────────────── */
.expenses-list-wrap { margin-bottom: var(--sp-4); }
.expense-date-group { margin-bottom: var(--sp-6); }
.expense-group-date { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; color: var(--s500); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 0 6px; border-bottom: 1px solid var(--s200); margin-bottom: var(--sp-3); }
.expense-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.expense-list li { background: #fff; border: 1px solid var(--s200); border-radius: 10px; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.expense-list li:hover { border-color: var(--s300); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.expense-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; color: inherit; }
.expense-item-link { color: inherit; text-decoration: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.expense-item-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--s100); }
.expense-item-name { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--s900); }
.expense-item-meta { font-size: var(--text-xs); color: var(--s500); margin-top: 2px; }
.expense-item-amount { flex-shrink: 0; font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--rose); }
.expense-item-amount.income { color: var(--emerald); }

/* ── 14. EXPENSE DETAIL ────────────────────────────────────── */
.expense-detail-dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-6); max-width: 420px; margin: var(--sp-4) 0; }
.expense-detail-dl dt { font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--s500); text-transform: uppercase; letter-spacing: 0.05em; }
.expense-detail-dl dd { margin: 0; color: var(--s800); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }

/* ── 15. FILTER BAR ────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); background: #fff; border: 1px solid var(--s200); border-radius: 18px; padding: 16px 18px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.filter-bar-inputs { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.filter-input { width: auto; min-width: 120px; flex: 1; font-size: var(--text-sm); padding: 7px 11px; border: 1.5px solid var(--s200); border-radius: 7px; background: #fff; color: var(--s800); transition: border-color var(--transition); font-family: inherit; }
.filter-input:focus { outline: none; border-color: var(--indigo); }
.filter-bar-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

/* ── 16. PAGINATION ────────────────────────────────────────── */
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); margin-top: 24px; padding: var(--sp-4) 0; }
.pagination-info { font-size: var(--text-sm); color: var(--s500); min-width: 60px; text-align: center; }
.expenses-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ── 17. RESULTS / SUMMARY ─────────────────────────────────── */
.results-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: 12px; font-size: var(--text-sm); color: var(--s500); }
.summary-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.summary-list li { padding: var(--sp-2) 0; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); border-bottom: 1px solid var(--s200); font-size: var(--text-sm); }
.summary-list li:last-child { border-bottom: none; }
.summary-label { color: var(--s600); flex: 1; min-width: 0; }
.summary-over-budget { color: var(--rose); font-size: var(--text-xs); font-weight: var(--fw-semi); }
.expenses-summary { padding: var(--sp-4) 0; border-top: 1px solid var(--s200); }
.summary-tab.active { background-color: var(--indigo-100); color: var(--indigo-600); border-color: rgba(99,102,241,0.3); font-weight: var(--fw-semi); }

/* ── 18. SKELETON LOADERS ─────────────────────────────────── */
@keyframes skeleton-pulse {
    0%   { opacity: 0.45; }
    50%  { opacity: 0.85; }
    100% { opacity: 0.45; }
}
.page-skeleton { display: flex; flex-direction: column; gap: var(--sp-3); }
.skel-row { height: 56px; border-radius: 10px; background: var(--s200); animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skel-row--tall { height: 80px; }
.dashboard-loading { display: inline-block; min-width: 100px; height: 1.2rem; border-radius: var(--radius-sm); background: var(--s200); animation: skeleton-pulse 1.4s ease-in-out infinite; color: transparent; user-select: none; }
.dash-skeleton-row { height: 44px; border-radius: var(--radius-md); background: var(--s200); animation: skeleton-pulse 1.4s ease-in-out infinite; margin-bottom: var(--sp-2); }
.dash-skeleton-row:last-child { margin-bottom: 0; }

/* ── 19. NOTIFICATIONS ─────────────────────────────────────── */
.notif-item { display: flex; gap: 14px; padding: 16px; border-radius: 10px; margin-bottom: 8px; background: #fff; border: 1px solid var(--s200); box-shadow: var(--shadow-card); }
.notif-item.unread { background: #EEF2FF; border-color: #C7D2FE; border-left: 3px solid var(--indigo); }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: var(--s100); }
.notif-title { font-size: 13px; font-weight: 600; color: var(--s900); }
.notif-body  { font-size: 12px; color: var(--s500); margin-top: 3px; }
.notif-time  { font-size: 11px; color: var(--s400); margin-top: 4px; }
.notifications-dropdown { position: absolute; right: 0; top: calc(100% + var(--sp-2)); width: 320px; max-height: 380px; overflow-y: auto; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-lg); padding: var(--sp-3); z-index: 200; box-shadow: var(--shadow-lg); }
.notifications-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--s200); }
.notifications-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.notification-item { padding: var(--sp-3); border: 1px solid var(--s200); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.notification-item:hover { background: var(--s50); border-color: var(--s300); }
.notification-item.is-unread { border-color: var(--indigo); background: #EEF2FF; }
.notification-item-title { font-weight: var(--fw-semi); font-size: var(--text-sm); margin-bottom: var(--sp-1); color: var(--s900); }
.notification-item-body  { font-size: var(--text-sm); color: var(--s600); }
.notification-item-meta  { margin-top: var(--sp-1); font-size: var(--text-xs); color: var(--s400); }

/* ── 20. AUTH SCREENS ──────────────────────────────────────── */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-6) var(--sp-4); background: var(--s50); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.10); border: 1px solid var(--s200); }

/* Shared mobile auth header (dark gradient top + white form below) */
.auth-mobile-header {
    background: linear-gradient(160deg,#0A0F1E,#1a1f3e);
    padding: 40px 24px 32px;
    text-align: center;
}
.auth-mobile-logo {
    font-size: 24px; font-weight: 800;
    background: linear-gradient(135deg,#6366F1,#10B981);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}
.auth-mobile-title { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.auth-mobile-sub   { font-size: 13px; color: rgba(255,255,255,0.5); margin: 0; }
.auth-mobile-body  { padding: 24px 20px 40px; background: #fff; }
.auth-mobile-oauth { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.auth-mobile-btn-google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px; border: 1.5px solid var(--s200); border-radius: 12px;
    background: #fff; font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--s700); text-decoration: none;
}
.auth-mobile-btn-apple {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px; border: none; border-radius: 12px;
    background: #000; font-family: inherit; font-size: 14px; font-weight: 600;
    color: #fff; text-decoration: none;
}
.auth-mobile-divider {
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
    font-size: 12px; color: var(--s400);
}
.auth-mobile-divider::before,
.auth-mobile-divider::after { content: ''; flex: 1; height: 1px; background: var(--s200); }
.auth-brand { text-align: center; margin-bottom: var(--sp-6); }
.auth-brand-logo { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, #6366F1, #10B981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.03em; }
.auth-title { font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--s900); margin: 0 0 var(--sp-1) 0; text-align: center; }
.auth-sub { font-size: var(--text-sm); color: var(--s500); text-align: center; margin: 0 0 var(--sp-6) 0; }
.auth-social { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.auth-social-btn { width: 100%; justify-content: center; gap: var(--sp-3); background: #fff; color: var(--s800); border: 1.5px solid var(--s200); padding: 0.65rem 1rem; font-size: var(--text-sm); border-radius: 8px; display: inline-flex; align-items: center; cursor: pointer; font-family: inherit; font-weight: var(--fw-medium); transition: background var(--transition), border-color var(--transition); }
.auth-social-btn:hover { background: var(--s50); color: var(--s900); border-color: var(--s300); }
.auth-divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; color: var(--s400); font-size: var(--text-xs); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--s200); }
.auth-alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); font-size: var(--text-sm); margin-bottom: var(--sp-4); border: 1px solid; }
.auth-alert--error   { background: var(--rose-100);    color: #BE123C; border-color: rgba(244,63,94,0.3); }
.auth-alert--success { background: var(--emerald-100); color: #065F46; border-color: rgba(16,185,129,0.3); }
.auth-submit-btn { width: 100%; justify-content: center; padding: 0.7rem; font-size: var(--text-base); margin-top: var(--sp-2); }
.auth-footer-text { text-align: center; font-size: var(--text-sm); color: var(--s500); margin-top: var(--sp-6); }
.auth-link { color: var(--indigo); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; color: var(--indigo-600); }
body.auth-page, body.welcome-page { background-color: var(--s50); color: var(--s900); }
body.auth-page .navbar-nav { display: none; }
body.auth-page .message-success { color: var(--emerald); }
body.auth-page .message-error   { color: var(--rose); }

/* ── 21. MOBILE BOTTOM NAV ─────────────────────────────────── */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: rgba(255,255,255,0.95); border-top: 1px solid var(--s200); padding: var(--sp-2) 0 calc(var(--sp-2) + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 28px rgba(15,23,42,0.10); backdrop-filter: blur(12px); }
body.theme-dark .bottom-nav { background: var(--bg-elevated); border-top-color: var(--border-subtle); }
.bottom-nav-items { display: flex; width: 100%; list-style: none; margin: 0; padding: 0; justify-content: space-around; align-items: center; }
.bottom-nav-item { flex: 1; }
.bottom-nav-item-fab { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.bottom-nav-link { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 8px; text-decoration: none; color: var(--s400); font-size: 10px; font-weight: var(--fw-medium); border-radius: var(--radius-sm); transition: color var(--transition); }
.bottom-nav-link:hover, .bottom-nav-link.active { color: var(--indigo); }
.bottom-nav-icon { font-size: 20px; line-height: 1; }
.bottom-nav-icon .material-symbols-rounded { font-size: 20px; }
.bottom-nav-fab,
.m-fab { width: 52px; height: 52px; background: var(--indigo); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; box-shadow: 0 4px 16px rgba(99,102,241,0.45); margin-bottom: 8px; cursor: pointer; text-decoration: none; flex-shrink: 0; transition: opacity var(--transition); border: none; font-family: inherit; }
.bottom-nav-fab:hover, .m-fab:hover { color: #fff; opacity: 0.92; }

/* FAB menu (three options: Add Expense, Add Budget, Link Bank) */
.fab-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.fab-menu { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; min-width: 160px; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--sp-2); z-index: 210; display: none; }
body.theme-dark .fab-menu { background: var(--bg-elevated); border-color: var(--border-subtle); }
.fab-menu.fab-menu-open { display: block; }
.fab-menu-item { display: block; padding: var(--sp-3) var(--sp-4); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--s800); text-decoration: none; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.fab-menu-item:hover { background: var(--s100); color: var(--indigo); }
.fab-menu-item:not(:last-child) { margin-bottom: 2px; }
.fab-backdrop { position: fixed; inset: 0; z-index: 199; background: transparent; }

/* ── 22. PUBLIC NAVBAR ─────────────────────────────────────── */
.navbar { background-color: rgba(255,255,255,0.86); border-bottom: 1px solid var(--border-subtle); padding: var(--sp-3) 0; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.navbar-left { display: flex; align-items: center; gap: var(--sp-3); }
.navbar-brand { font-weight: var(--fw-bold); font-size: var(--text-xl); color: var(--text-primary); text-decoration: none; letter-spacing: -0.01em; }
.navbar-brand span.brand-dot { color: var(--accent); }
.navbar-brand:hover { color: var(--accent); }
.navbar-nav { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.navbar-nav .nav-link { padding: var(--sp-2) var(--sp-3); color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: var(--fw-medium); transition: background var(--transition), color var(--transition); white-space: nowrap; }
.navbar-nav .nav-link:hover { color: var(--text-primary); background-color: var(--bg-hover); }
.navbar-nav .nav-link.active { color: var(--accent) !important; background-color: var(--accent-subtle); font-weight: var(--fw-semi); }
.action-sheet-title { letter-spacing: -0.01em; }
.action-sheet-item { border-radius: 14px; }

/* Shared desktop auth grids */
@media (min-width: 769px) {
    .auth-login-desktop,
    .auth-register-desktop {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 100vh;
    }
}
.navbar-hamburger { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border-muted); border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; transition: background var(--transition), color var(--transition); }
.navbar-hamburger:hover { background-color: var(--bg-hover); color: var(--text-primary); }
.hamburger-icon { display: block; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }

/* ── 23. FILTERS PANEL ─────────────────────────────────────── */
.navbar-filters-panel { background-color: var(--bg-elevated); border-bottom: 1px solid var(--border-subtle); padding: var(--sp-5) 0; box-shadow: var(--shadow-md); }
@media (max-width: 1023px) {
    body.app-shell-page .navbar-filters-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 300; overflow-y: auto; border-bottom: none; box-shadow: var(--shadow-lg); }
}
.navbar-panel-section { margin-top: var(--sp-4); }
.navbar-panel-section:first-child { margin-top: 0; }
.navbar-panel-heading { font-size: var(--text-base); margin: 0 0 var(--sp-3) 0; color: var(--text-primary); font-weight: var(--fw-semi); }
.navbar-panel-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.navbar-panel-links li { margin: 0; }
.navbar-panel-links a { display: block; padding: var(--sp-2) var(--sp-4); color: var(--text-secondary); background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); text-decoration: none; font-size: var(--text-sm); font-weight: var(--fw-medium); transition: background var(--transition), color var(--transition); }
.navbar-panel-links a:hover { background: var(--bg-hover); color: var(--text-primary); }
.navbar-filter-form { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.navbar-filter-form .form-group { margin: 0; }
.navbar-filter-form .form-control { width: auto; min-width: 9rem; }
.navbar-filter-form label { display: block; font-size: var(--text-xs); margin-bottom: var(--sp-1); color: var(--text-muted); font-weight: var(--fw-medium); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── 24. KPI / DASHBOARD ───────────────────────────────────── */
.kpi-card { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-lg); padding: var(--sp-5); position: relative; overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); }
.kpi-card:hover { border-color: var(--s300); box-shadow: var(--shadow-md); }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--indigo); opacity: 0; transition: opacity var(--transition); }
.kpi-card:hover::before { opacity: 1; }
.kpi-label { font-size: var(--text-xs); font-weight: var(--fw-semi); color: var(--s500); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 var(--sp-2) 0; }
.kpi-value { font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--s900); margin: 0; line-height: 1.2; }
.kpi-trend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--text-xs); font-weight: var(--fw-semi); margin-top: var(--sp-2); padding: 2px 7px; border-radius: var(--radius-full); }
.kpi-trend.up      { color: var(--emerald); background: var(--emerald-100); }
.kpi-trend.down    { color: var(--rose);    background: var(--rose-100); }
.kpi-trend.neutral { color: var(--s500);    background: var(--s100); }
.kpi-sparkline { margin-top: var(--sp-3); height: 50px; }
.dashboard-kpi-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: var(--sp-6); }
.dashboard-charts-grid { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-6); }
@media (min-width: 768px) { .dashboard-charts-grid { grid-template-columns: repeat(2, 1fr); } }
.trends-charts-grid { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
@media (min-width: 768px) { .trends-charts-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-header { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.dash-title { font-size: var(--text-2xl); font-weight: var(--fw-bold); margin: 0; line-height: 1.1; }
.dash-subtitle { font-size: var(--text-sm); color: var(--s500); margin: 4px 0 0 0; }
.dash-currency-select { width: auto; min-width: 80px; margin-left: auto; }
.dash-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4); background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-xl); padding: var(--sp-6) var(--sp-8); margin-bottom: var(--sp-4); box-shadow: var(--shadow-card); }
.dash-hero-inner { display: flex; flex-direction: column; gap: var(--sp-2); }
.dash-hero-label { font-size: var(--text-xs); font-weight: var(--fw-semi); color: var(--s500); text-transform: uppercase; letter-spacing: 0.08em; }
.dash-hero-value { font-size: 2.8rem; font-weight: var(--fw-bold); color: var(--s900); margin: 0; line-height: 1; letter-spacing: -0.02em; }
.dash-quick-actions { display: flex; gap: var(--sp-3); flex-shrink: 0; }
.dash-kpi-row { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-lg); margin-bottom: var(--sp-6); overflow: hidden; box-shadow: var(--shadow-card); }
.dash-kpi { flex: 1; display: flex; flex-direction: column; padding: var(--sp-4) var(--sp-5); gap: 4px; }
.dash-kpi-divider { width: 1px; background: var(--s200); flex-shrink: 0; margin: var(--sp-3) 0; }
.dash-kpi-label { font-size: var(--text-xs); font-weight: var(--fw-semi); color: var(--s500); text-transform: uppercase; letter-spacing: 0.07em; }
.dash-kpi-value { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--s900); line-height: 1.2; }
.dash-main-grid { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-4); }
@media (min-width: 768px) { .dash-main-grid { grid-template-columns: 1fr 380px; } }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.dash-card-title { font-size: var(--text-sm); font-weight: var(--fw-semi); color: var(--s500); text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.dash-budget-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.dash-budget-item { display: flex; flex-direction: column; gap: 6px; }
.dash-budget-meta { display: flex; justify-content: space-between; align-items: center; }
.dash-budget-name { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--s900); }
.dash-budget-status { font-size: var(--text-xs); font-weight: var(--fw-semi); color: var(--s500); }
.dash-budget-status.over { color: var(--rose); }
.dash-budget-amounts { font-size: var(--text-xs); color: var(--s500); }

/* ── 25. CHARTS / MODALS ───────────────────────────────────── */
.chart-container { position: relative; width: 100%; min-height: 200px; }
.chart-container--sparkline { min-height: 50px; }
.chart-container .empty-chart-message { display: flex; align-items: center; justify-content: center; height: 140px; color: var(--s500); font-size: var(--text-sm); }
.modal-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--sp-4); overflow: auto; -webkit-overflow-scrolling: touch; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-card { position: relative; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius-lg); padding: var(--sp-6); max-width: 24rem; width: 100%; max-height: calc(100dvh - 2 * var(--sp-4)); overflow: auto; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow-lg); }
.modal-title { margin: 0 0 var(--sp-4) 0; font-size: var(--text-xl); color: var(--s900); }
body.theme-dark .modal-card { background: var(--bg-elevated); border-color: var(--border-subtle); }
body.theme-dark .modal-title { color: var(--text-primary); }

/* ── 25b. ACTION SHEETS (FAB / MORE) ───────────────────────── */
/* Hidden by default; shown when JS adds .active */
.action-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 900;
}
.action-sheet-overlay.active { display: block; }

.action-sheet {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 901;
    background: #fff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -12px 36px rgba(0,0,0,0.18);
    padding: 10px 16px 14px;
    max-height: min(70dvh, 560px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
body.theme-dark .action-sheet { background: var(--bg-elevated); }
.action-sheet.active { display: block; }

.action-sheet-handle {
    width: 44px;
    height: 4px;
    background: var(--s200);
    border-radius: 999px;
    margin: 6px auto 10px;
}
.action-sheet-title {
    text-align: center;
    font-weight: 700;
    color: var(--s800);
    margin: 0 0 10px 0;
}
.action-sheet-items { display: flex; flex-direction: column; gap: 8px; }
.action-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    background: var(--s50);
    border: 1px solid var(--s200);
    color: var(--s900);
}
.action-sheet-item:hover { background: var(--s100); }
.action-sheet-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.action-sheet-icon .material-symbols-rounded { font-size: 18px; }
.action-sheet-icon--accent { background: var(--accent-subtle); color: var(--accent); }
.action-sheet-icon--success { background: var(--success-subtle); color: var(--success); }
.action-sheet-icon--warning { background: var(--warning-subtle); color: var(--warning); }
.action-sheet-icon--danger { background: var(--danger-subtle); color: var(--danger); }
.action-sheet-icon--info { background: var(--info-subtle); color: var(--info); }
.action-sheet-icon--neutral { background: var(--s200); color: var(--s600); }
body.app-shell-page.theme-dark .action-sheet-icon--neutral,
html[data-theme="dark"] body.app-shell-page .action-sheet-icon--neutral {
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.action-sheet-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.action-sheet-item-label { font-weight: 700; font-size: 13px; color: var(--s900); }
.action-sheet-item-desc { font-size: 12px; color: var(--s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-sheet-cancel {
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--s200);
    background: #fff;
    font-weight: 700;
    color: var(--s700);
    cursor: pointer;
}
.action-sheet-cancel:hover { background: var(--s50); }
body.theme-dark .action-sheet-cancel { background: var(--bg-elevated); border-color: var(--border-subtle); color: var(--text-primary); }

/* ── 26. HOLDINGS ──────────────────────────────────────────── */
.holdings-list { margin-top: var(--sp-2); }
.holdings-items { list-style: none; margin: 0; padding: 0; }
.holding-item { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--s200); border-radius: var(--radius-md); margin-bottom: var(--sp-2); background: #fff; }
.holding-symbol { font-weight: var(--fw-bold); font-size: var(--text-lg); color: var(--s900); min-width: 4rem; }
.holding-details { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }
.holding-qty, .holding-notes { font-size: var(--text-sm); color: var(--s500); }
.holding-value { font-weight: var(--fw-semi); color: var(--s800); }
.holding-delete { font-size: var(--text-xs); }

/* ── 27. EMPTY STATE / FEEDBACK ─────────────────────────────── */
.empty-state { padding: var(--sp-8) var(--sp-6); text-align: center; color: var(--s500); background: var(--s50); border: 1px dashed var(--s300); border-radius: var(--radius-lg); font-size: var(--text-sm); }
.note { background-color: rgba(56,189,248,0.10); color: var(--s700); padding: var(--sp-3) var(--sp-4); border-left: 3px solid var(--info); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: var(--sp-4) 0; font-size: var(--text-sm); }
.message-error   { color: var(--rose);    font-size: var(--text-sm); margin-top: var(--sp-2); }
.message-success { color: var(--emerald); font-size: var(--text-sm); margin-top: var(--sp-2); }
.highlight-correct   { background-color: var(--emerald-100) !important; border: 1px solid var(--emerald) !important; }
.highlight-incorrect { background-color: var(--rose-100)    !important; border: 1px solid var(--rose) !important; }
.onboarding-banner { background: var(--indigo-100); border-bottom: 1px solid rgba(99,102,241,0.20); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); }
.onboarding-banner p { margin: 0; color: var(--s800); font-size: var(--text-sm); }
.region-drop-zone { border: 2px dashed var(--s300); padding: var(--sp-4); border-radius: var(--radius-md); background-color: var(--s50); margin-bottom: var(--sp-5); transition: border-color var(--transition), background var(--transition); }
.region-drop-zone:hover { border-color: var(--indigo); background-color: var(--indigo-100); }

/* ── 28. UTILITIES ─────────────────────────────────────────── */
.text-sm { font-size: 0.875rem; }
.preferences-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 0.75rem; }
.rec-pagination { margin-top: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.rec-pagination-info { color: var(--s500); font-size: var(--text-sm); }
.rec-score-btn { background: none; border: none; color: var(--indigo); cursor: pointer; font: inherit; font-weight: var(--fw-semi); padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.rec-score-btn:hover { color: var(--indigo-600); }
.rec-score-hint { font-weight: normal; color: var(--s500); font-size: var(--text-xs); }
.rec-score-breakdown-desc { margin-bottom: var(--sp-3); color: var(--s600); font-size: var(--text-sm); }
.rec-score-breakdown-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.rec-score-breakdown-table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--s200); }
.rec-score-breakdown-table tr td:first-child { color: var(--s500); }

/* ── 29. VISIBILITY RULES ──────────────────────────────────── */
body.app-shell-page .navbar-public,
body.app-shell-page .main-content-public { display: none !important; }
body.app-shell-page .onboarding-banner   { display: none; }
@media (min-width: 1024px) { body.app-shell-page .bottom-nav { display: none !important; } }
@media (max-width: 1023px) {
    .app-shell .sidebar { display: none; }
    .app-main { margin-left: 0; }
    body.app-shell-page .bottom-nav { display: flex !important; }
    body.app-shell-page .app-main { padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px)); }
    /* Mobile content layout */
    body.app-shell-page .topbar { padding: 12px 16px; }
    body.app-shell-page .content-area { padding: 16px; }
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dashboard-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-main-grid { grid-template-columns: 1fr; }
    .dash-hero { padding: var(--sp-5); }
    .form-page-card { padding: var(--sp-5); }
    .form-actions .btn { min-height: 44px; }
}

/* ── 30. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .content-area { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .page-title { font-size: 20px; }
    .form-page-card { padding: var(--sp-5); border-radius: var(--radius-md); }
    .form-row-two { grid-template-columns: 1fr !important; }
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .navbar-nav { display: none; }
    .bottom-nav { display: flex; }
    /* Hide desktop-only sidebar columns on mobile */
    .m-sidebar-hide { display: none !important; }
    /* Force single col on all 2-col desktop grids */
    .add-expense-layout,
    .add-income-layout,
    .net-worth-two-col,
    .profile-two-col,
    .integrations-two-col,
    .link-bank-two-col,
    .settings-two-col { grid-template-columns: 1fr !important; }
    /* Budget cards: prevent overflow */
    .budget-cards-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 599px) {
    .filter-bar { flex-direction: column; }
    .filter-bar-inputs { width: 100%; }
    .filter-input { flex: 1 1 100%; }
    .filter-bar-actions { width: 100%; }
    .filter-bar-actions .btn { flex: 1; justify-content: center; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .dash-hero { padding: var(--sp-5); flex-direction: column; align-items: flex-start; }
    .dash-hero-value { font-size: 2.2rem; }
    .dash-kpi { padding: var(--sp-3) var(--sp-4); }
    .dash-kpi-value { font-size: var(--text-lg); }
    .dash-quick-actions { width: 100%; }
    .dash-quick-actions .btn { flex: 1; justify-content: center; }
}

/* ── 31. MOBILE APP SCREENS (≤1023px) ──────────────────────── */
/* Wireframe-accurate mobile layout for all 24 app screens      */

/* ── Dashboard mobile hero card ── */
.m-balance-hero {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 24px 20px 20px;
    margin-bottom: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}
.m-balance-hero::before { display: none; }
.m-balance-label { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 6px; }
.m-balance-value { font-size: 34px; font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.02em; }
.m-balance-chips { display: flex; gap: 10px; }
.m-balance-chip { display: flex; flex-direction: column; gap: 2px; }
.m-balance-chip-label { font-size: 10px; color: rgba(255, 255, 255, 0.45); font-weight: 500; }
.m-balance-chip-val  { font-size: 14px; font-weight: 700; }
.m-balance-chip-val.income  { color: #34d399; }
.m-balance-chip-val.expense { color: #f87171; }
.m-balance-chip-spaced { margin-left: 20px; }
.m-loading-item { padding: 20px; text-align: center; color: var(--s400); font-size: 13px; }
.m-loading-copy { font-size: 13px; color: var(--s400); }
.m-section-header-spaced { margin-top: 16px; }
.m-card-spaced { margin-top: 16px; }
.m-quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Mobile 2-col KPI row ── */
.m-kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.m-kpi-card { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 14px 14px 12px; box-shadow: var(--shadow-card); }
.m-kpi-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.m-kpi-value { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.m-kpi-sub   { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

/* ── Mobile section header ── */
.m-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-section-title  { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.m-section-link   { font-size: 12px; font-weight: 600; color: var(--indigo); text-decoration: none; }

/* ── Mobile transaction item (wireframe .m-txn-item) ── */
.m-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.m-txn-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 12px 14px;
    text-decoration: none; color: inherit;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.m-txn-item:hover { border-color: var(--s300); box-shadow: var(--shadow-sm); }
.m-txn-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; background: var(--s100);
}
.m-txn-icon.expense { background: rgba(244,63,94,0.10); }
.m-txn-icon.income  { background: rgba(16,185,129,0.10); }
.m-txn-icon.recurring { background: rgba(99,102,241,0.10); }
.m-txn-body { flex: 1; min-width: 0; }
.m-txn-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-txn-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.m-txn-right { flex-shrink: 0; text-align: right; }
.m-txn-amount { font-size: 15px; font-weight: 700; }
.m-txn-amount.negative { color: var(--rose); }
.m-txn-amount.positive { color: var(--emerald); }
.m-txn-date   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ── Mobile card wrapper ── */
.m-card { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-card); margin-bottom: 12px; }
.m-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.m-card-title  { font-size: 14px; font-weight: 700; color: var(--text-primary); }

/* ── Mobile form: single-column full-width ── */
@media (max-width: 1023px) {
    /* Kill the 2-col grids that overflow */
    .m-form-grid { display: flex !important; flex-direction: column !important; gap: 0 !important; }
    .m-sidebar-hide { display: none !important; }

    /* Dashboard: hide desktop 2-col layout, show mobile cards */
    .m-dash-desktop { display: none !important; }
    .m-dash-mobile  { display: block !important; }

    /* Stat row: 2 cols max on mobile */
    .stat-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

    /* Content grids: force single column */
    .grid-2col-desktop { grid-template-columns: 1fr !important; }

    /* Budget cards: fix minmax overflow */
    .budget-cards-grid { grid-template-columns: 1fr !important; }

    /* Goals cards: fix minmax overflow */
    .goals-cards-grid { grid-template-columns: 1fr !important; }

    /* Tables: make scrollable on mobile */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Form 2-col rows: stack on mobile */
    .form-row-two { grid-template-columns: 1fr !important; }

    /* Page header actions: wrap */
    .page-header { flex-wrap: wrap; }

    /* Filter bar: stack vertically on small screens */
    .filter-bar { flex-direction: column; }
    .filter-bar-inputs { flex-direction: column; width: 100%; }
    .filter-input { width: 100% !important; min-width: unset !important; }
    .filter-bar-actions { width: 100%; display: flex; gap: 8px; }
    .filter-bar-actions .btn { flex: 1; justify-content: center; }
}

/* ── Mobile dashboard layout blocks ── */
.m-dash-mobile { display: none; }
@media (max-width: 1023px) {
    .m-dash-mobile { display: block; }
}

/* ── Mobile period tab strip ── */
.m-period-tabs {
    display: flex; gap: 6px; overflow-x: auto;
    padding-bottom: 4px; margin-bottom: 14px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.m-period-tabs::-webkit-scrollbar { display: none; }
.m-period-tab {
    flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    background: var(--bg-elevated); border: 1.5px solid var(--border-subtle);
    color: var(--text-secondary); transition: background var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.m-period-tab.active { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ── Mobile recurring item card ── */
.m-rec-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 8px;
}
.m-rec-body { flex: 1; min-width: 0; }
.m-rec-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.m-rec-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.m-rec-right { flex-shrink: 0; text-align: right; }
.m-rec-amount { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.m-rec-freq   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.m-rec-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Mobile budget / goal progress card ── */
.m-progress-card {
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 14px; padding: 16px; box-shadow: var(--shadow-card);
    margin-bottom: 10px;
}
.m-progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.m-progress-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.m-progress-pct  { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.m-progress-amounts { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.m-progress-spent { color: var(--rose); font-weight: 600; }
.m-progress-limit { color: var(--text-muted); }

/* ── Mobile net worth / investment dark summary card ── */
.m-net-hero {
    background: linear-gradient(160deg, #0A0F1E, #1a1f3e);
    border-radius: 20px; padding: 24px 20px; margin-bottom: 16px; color: #fff;
}
.m-net-hero-label { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.m-net-hero-value { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 14px; }
.m-net-hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-net-hero-item { display: flex; flex-direction: column; gap: 3px; }
.m-net-hero-item-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.07em; }
.m-net-hero-item-val { font-size: 16px; font-weight: 700; }
.m-net-hero-item-val.assets { color: #34d399; }
.m-net-hero-item-val.liabilities { color: #f87171; }

/* ── Mobile asset/liability row ── */
.m-asset-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 8px;
}
.m-asset-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: var(--s100); }
.m-asset-body { flex: 1; min-width: 0; }
.m-asset-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.m-asset-type { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.m-asset-value { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.m-asset-value.asset   { color: var(--emerald); }
.m-asset-value.liability { color: var(--rose); }

/* ── Mobile profile / settings single-col ── */
@media (max-width: 1023px) {
    .profile-two-col { grid-template-columns: 1fr !important; }
    .settings-two-col { grid-template-columns: 1fr !important; }
    .integrations-two-col { grid-template-columns: 1fr !important; }
    .link-bank-two-col { grid-template-columns: 1fr !important; }
    .net-worth-two-col { grid-template-columns: 1fr !important; }
    .add-expense-layout { grid-template-columns: 1fr !important; }
    .add-income-layout  { grid-template-columns: 1fr !important; }
}

/* ── Mobile notification row ── */
.m-notif-item {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 8px;
}
.m-notif-item.unread { background: #EEF2FF; border-color: #C7D2FE; border-left: 3px solid var(--indigo); }
.m-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); flex-shrink: 0; margin-top: 5px; }
.m-notif-body { flex: 1; min-width: 0; }
.m-notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.m-notif-text  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.m-notif-time  { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ── Mobile member / session row ── */
.m-member-item, .m-session-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 8px;
}
.m-member-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.m-member-body { flex: 1; min-width: 0; }
.m-member-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.m-member-role { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.m-session-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--s100); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.m-session-body { flex: 1; min-width: 0; }
.m-session-device { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.m-session-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Mobile saved-view / integration row ── */
.m-row-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 14px;
    box-shadow: var(--shadow-card); margin-bottom: 8px;
}
.m-row-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--s100); }
.m-row-body { flex: 1; min-width: 0; }
.m-row-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.m-row-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Mobile link bank search + list ── */
.m-search-bar { display: flex; align-items: center; gap: 8px; background: var(--bg-elevated); border: 1.5px solid var(--border-subtle); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.m-search-icon { font-size: 16px; color: var(--text-secondary); flex-shrink: 0; }
.m-search-input { flex: 1; border: none; outline: none; font-size: 14px; color: var(--text-primary); background: transparent; font-family: inherit; }
.m-search-input::placeholder { color: var(--text-secondary); }

/* Desktop dashboard editorial alignment */
.dash-editorial-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}
/* Stitch dashboard_v5: dark balance hero */
.dash-balance-anchor {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    padding: 2rem 1.75rem;
    color: #fff;
    background: #0f172a;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}
.dash-balance-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}
.dash-balance-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0;
    font-weight: 800;
    color: #fff;
}
.dash-balance-trend {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #4ade80;
}
.dash-balance-glow {
    position: absolute;
    right: -40px;
    bottom: -36px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(19, 91, 236, 0.18);
    filter: blur(36px);
    pointer-events: none;
}
.dash-side-kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.dash-side-kpi {
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
}
.dash-side-kpi-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.dash-side-kpi-value {
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-primary);
}
.dash-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.dash-main-column,
.dash-side-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.dash-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.dash-section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.dash-section-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--indigo);
    text-decoration: none;
}
.dash-quick-card {
    background: var(--s50);
    border-color: var(--s100);
}
.dash-quick-actions-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.table-right { text-align: right; }
.table-loading-row {
    color: var(--s400);
    text-align: center;
    padding: 24px;
}
.table-loading-copy {
    color: var(--s400);
    font-size: 13px;
}
@media (max-width: 1023px) {
    .dash-editorial-grid,
    .dash-main-layout {
        grid-template-columns: 1fr;
    }
}

/* Auth editorial alignment */
.auth-split-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}
.auth-split-left {
    background: linear-gradient(160deg,#0A0F1E,#1a1f3e);
    padding: 48px;
    display: flex;
    flex-direction: column;
}
.auth-brand-wordmark {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg,#6366F1,#10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 48px;
}
.auth-split-left-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-split-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.auth-split-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 36px;
    line-height: 1.6;
}
.auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.auth-feature-copy-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.auth-feature-copy-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}
.auth-split-footer {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
}
.auth-split-right {
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow-y: auto;
}
.auth-panel {
    width: 100%;
    max-width: 380px;
}
.auth-panel-compact {
    max-width: 360px;
}
.auth-panel-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--s900);
    margin-bottom: 6px;
}
.auth-panel-sub {
    font-size: 13px;
    color: var(--s500);
    margin-bottom: 24px;
}
.auth-social-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.auth-social-row-two {
    flex-direction: row;
    margin-bottom: 20px;
}
.auth-oauth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.auth-oauth-btn.google {
    border: 1.5px solid var(--s200);
    background: #fff;
    color: var(--s700);
}
.auth-oauth-btn.apple {
    border: none;
    background: #000;
    color: #fff;
}
.auth-divider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.auth-divider-row::before,
.auth-divider-row::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--s200);
}
.auth-divider-row span {
    font-size: 12px;
    color: var(--s400);
}

/* Cross-page layout consistency utilities */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.icon-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.section-block {
    margin-top: 20px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.section-title-sm {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.muted {
    color: var(--text-muted);
}
.text-small {
    font-size: 0.875rem;
}
.text-xs {
    font-size: 0.75rem;
}
.grid-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.profile-two-col.grid-two-col {
    grid-template-columns: 2fr 1fr;
}
.form-stack {
    display: grid;
    gap: 16px;
}
.max-w-sm { max-width: 360px; }
.max-w-md { max-width: 480px; }
.max-w-lg { max-width: 680px; }
.w-auto { width: auto; }
.hr-subtle {
    border: 0;
    border-top: 1px solid var(--s200);
    margin: 24px 0;
}
.danger-title {
    color: var(--rose);
}
.btn-danger-ghost {
    background: transparent;
    border: 1px solid var(--rose);
    color: var(--rose);
}
.btn-danger-ghost:hover {
    background: rgba(244,63,94,0.08);
}
.stack-gap-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-gap-md { display: flex; flex-direction: column; gap: 12px; }
.row-gap-md { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-gap-sm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1023px) {
    .grid-two-col { grid-template-columns: 1fr; }
}

/* ── WIREFRAME DESIGN SYSTEM ────────────────────────────────── */

/* --brand token (matches wireframe #2563EB, close to --indigo) */
:root { --brand: var(--indigo); --brand-50: #EFF6FF; --brand-light: #DBEAFE; --brand-dark: var(--indigo-600); }
body.app-shell-page { --brand: var(--indigo); }

/* ── Balance Hero ───────────────────────────────────────────── */
.balance-hero {
    background: linear-gradient(135deg, #1E3A8A, var(--brand, #2563EB));
    border-radius: 16px; padding: 28px; color: #fff;
    position: relative; overflow: hidden; margin-bottom: 24px;
}
.balance-hero::after {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 200px; height: 200px; background: rgba(255,255,255,0.05); border-radius: 50%;
}
.balance-hero .balance-label {
    font-size: 11px; font-weight: 600; opacity: .7;
    letter-spacing: .04em; text-transform: uppercase;
}
.balance-hero .balance-amount {
    font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 8px 0;
}
.balance-hero .balance-meta { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.balance-hero .balance-meta-item { font-size: 12px; opacity: .75; }
.balance-hero .balance-meta-item strong { display: block; font-size: 16px; font-weight: 700; opacity: 1; }

/* ── AI Insight Card ────────────────────────────────────────── */
.ai-insight-card {
    background: linear-gradient(135deg, #F0F9FF, #EFF6FF);
    border: 1px solid #BFDBFE; border-radius: 12px; padding: 16px;
}
.ai-insight-card .ai-label {
    font-size: 10px; font-weight: 700; color: var(--brand, #2563EB);
    letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px;
}
.ai-insight-card .ai-text {
    font-size: 13px; color: var(--s700, #334155); line-height: 1.5;
}
.ai-insight-card .ai-conf-row {
    margin-top: 10px; display: flex; align-items: center; gap: 8px;
}
.ai-insight-card .ai-conf-label { font-size: 10px; color: var(--s400); font-weight: 500; }
.ai-insight-card .ai-conf-bar {
    flex: 1; height: 4px; background: var(--s200); border-radius: 99px; overflow: hidden;
}
.ai-insight-card .ai-conf-fill { height: 100%; background: var(--brand, #2563EB); border-radius: 99px; }
.ai-insight-card .ai-conf-pct { font-size: 10px; font-weight: 700; color: var(--brand, #2563EB); }

/* Dark mode AI card */
body.app-shell-page.theme-dark .ai-insight-card,
html[data-theme="dark"] body.app-shell-page .ai-insight-card {
    background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.25);
}
body.app-shell-page.theme-dark .ai-insight-card .ai-text,
html[data-theme="dark"] body.app-shell-page .ai-insight-card .ai-text { color: var(--text-secondary); }

/* ── Budget Card ────────────────────────────────────────────── */
.budget-card {
    background: var(--bg-surface); border-radius: 12px;
    border: 1px solid var(--border-subtle); padding: 16px;
}
.budget-card .budget-cat {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .04em;
}
.budget-card .budget-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 2px 0 10px; }
.budget-card .budget-amounts { display: flex; justify-content: space-between; margin-bottom: 6px; }
.budget-card .budget-spent { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.budget-card .budget-limit { font-size: 12px; color: var(--text-muted); }
.budget-card .budget-remaining { font-size: 11px; font-weight: 600; margin-top: 6px; }

/* ── Goal Card ──────────────────────────────────────────────── */
.goal-card {
    background: var(--bg-surface); border-radius: 12px;
    border: 1px solid var(--border-subtle); padding: 16px 20px;
}
.goal-card .goal-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; margin-bottom: 10px; flex-shrink: 0;
}
.goal-card .goal-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.goal-card .goal-target { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.goal-card .goal-progress-meta { display: flex; justify-content: space-between; margin: 10px 0 6px; }
.goal-card .goal-current { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.goal-card .goal-pct { font-size: 12px; font-weight: 700; color: var(--brand, #2563EB); }

/* ── Thin progress bar (wireframe .progress + .progress-bar variant) ── */
.progress {
    height: 6px; background: var(--s100); border-radius: 99px; overflow: hidden;
}
.progress .progress-bar {
    height: 100%; border-radius: 99px; transition: width 0.3s ease;
}
.progress-green  { background: var(--emerald, #10B981); }
.progress-blue   { background: var(--brand, #2563EB); }
.progress-amber  { background: var(--amber, #F59E0B); }
.progress-red    { background: var(--rose, #EF4444); }
.progress-purple { background: var(--purple, #8B5CF6); }

/* ── Transaction item (desktop with icon bubble) ─────────────── */
.txn-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--border-subtle);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.txn-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.txn-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.txn-amount { margin-left: auto; text-align: right; }
.txn-amount-val { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.txn-amount-val.debit  { color: var(--rose); }
.txn-amount-val.credit { color: var(--emerald); }
.txn-amount-date { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

/* ── Grid utilities ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ── Flex utilities ─────────────────────────────────────────── */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }

/* ── Text utilities ─────────────────────────────────────────── */
.text-success { color: var(--emerald); }
.text-danger  { color: var(--rose); }
.text-brand   { color: var(--brand); }
.text-muted-sm { font-size: 11px; color: var(--text-muted); }

/* ── Divider ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-subtle); margin: 16px 0; }

/* ── Spacing utilities ──────────────────────────────────────── */
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

/* ── Dashboard chart controls ───────────────────────────────── */
.dash-chart-type-group { display: flex; gap: 3px; }
.dash-ct-btn {
    padding: 4px 9px; border: 1.5px solid var(--border-subtle);
    background: var(--bg-surface); font-size: 10px; font-weight: 600;
    color: var(--text-muted); cursor: pointer; border-radius: 5px;
    font-family: inherit; transition: all .12s;
}
.dash-ct-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.dash-ct-btn.active { background: var(--s800); color: #fff; border-color: var(--s800); }

/* ── WIREFRAME UI — Period selector & chart type toggle ─────── */
.inv-period-bar,
.inv-chart-type-bar { display: flex; gap: 0.25rem; }

.inv-period-btn,
.inv-chart-type-btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 99px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: transparent;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.inv-period-btn:hover,
.inv-chart-type-btn:hover {
    background: var(--s100, #f1f5f9);
    color: var(--s800, #1e293b);
}
.inv-period-btn--active,
.inv-chart-type-btn--active {
    background: var(--indigo, #135bec);
    color: #fff;
    border-color: var(--indigo, #135bec);
}

/* ── Risk profile chips (recommendations) ───────────────────── */
.rec-risk-chip {
    padding: 0.3rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 99px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: transparent;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rec-risk-chip:hover { background: var(--s100, #f1f5f9); }
.rec-risk-chip--active {
    background: var(--indigo, #135bec);
    color: #fff;
    border-color: var(--indigo, #135bec);
}

/* ── Confidence bar (replaces rec-conf-pill) ────────────────── */
.rec-conf-bar-wrap { width: 100%; }
.rec-conf-pill { display: none; } /* hide old text pill now replaced by bar */

/* ── Wireframe AI card (insights page) ──────────────────────── */
.ai-card {
    background: linear-gradient(135deg, #F0F9FF, #EFF6FF);
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 16px 18px;
}
.ai-card-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--brand, #2563EB);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.ai-card-text { font-size: 13px; color: var(--s700); line-height: 1.5; }
.ai-card-confidence {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-conf-label  { font-size: 10px; color: var(--s400); font-weight: 500; }
.ai-conf-bar    { flex: 1; height: 4px; background: var(--s200); border-radius: 99px; overflow: hidden; }
.ai-conf-fill   { height: 100%; background: var(--brand, #2563EB); border-radius: 99px; }
.ai-conf-pct    { font-size: 10px; font-weight: 700; color: var(--brand, #2563EB); }

/* ── Period selector buttons (insights / shared) ────────────── */
.period-group { display: flex; gap: 4px; }
.period-btn {
    padding: 4px 10px;
    border: 1.5px solid var(--border-subtle, #e2e8f0);
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    color: var(--s600);
    cursor: pointer;
    font-family: inherit;
    transition: background .12s, color .12s;
}
.period-btn:hover:not(.active) { background: var(--s50); }
.period-btn.active { background: var(--brand, #2563EB); color: #fff; border-color: var(--brand, #2563EB); }

/* ── Tab bar buttons ────────────────────────────────────────── */
.tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--s500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    transition: color .12s, border-color .12s;
}
.tab-btn:hover { color: var(--s800); }
.tab-btn--active { color: var(--brand, #135bec); border-bottom-color: var(--brand, #135bec); }

/* ── Settings item list (wireframe pattern) ─────────────────── */
.settings-section       { margin-bottom: 24px; }
.settings-section-title {
    font-size: 11px; font-weight: 700; color: var(--s400);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 6px; padding: 0 4px;
}
.settings-item {
    display: flex; align-items: center; padding: 12px 16px;
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-bottom: none; cursor: pointer; transition: background .12s;
}
.settings-item:first-child  { border-radius: 12px 12px 0 0; }
.settings-item:last-child   { border-radius: 0 0 12px 12px; border-bottom: 1px solid var(--border-subtle); }
.settings-item:only-child   { border-radius: 12px; border-bottom: 1px solid var(--border-subtle); }
.settings-item:hover        { background: var(--s50); }
.settings-item-icon  { width: 32px; height: 32px; border-radius: 8px; background: var(--s100); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.settings-item-label { font-size: 13px; font-weight: 500; color: var(--s800); margin-left: 12px; }
.settings-item-value { font-size: 12px; color: var(--s400); margin-left: auto; }
.settings-item-arrow { font-size: 16px; color: var(--s300); margin-left: 6px; }

/* ── Reports KPI grid ───────────────────────────────────────── */
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .report-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .report-kpi-grid { grid-template-columns: 1fr; }
}

/* ── Loading skeletons ──────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-container-low, #f8fafc) 25%,
        var(--border-subtle, #e2e8f0) 50%,
        var(--surface-container-low, #f8fafc) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 6px;
    display: block;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text    { height: 0.9rem; margin-bottom: 6px; }
.skeleton-text--sm { height: 0.7rem; }
.skeleton-text--lg { height: 1.4rem; }
.skeleton-circle  { border-radius: 50%; }

/* ── Global toast notification ──────────────────────────────── */
#global-toast {
    position: fixed;
    bottom: 84px;   /* sits above bottom-nav on mobile */
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--s900, #0f172a);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#global-toast.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
#global-toast.toast--success { background: var(--color-emerald-dark, #15803d); }
#global-toast.toast--error   { background: var(--color-rose-dark, #dc2626); }
#global-toast.toast--warning { background: var(--color-amber-dark, #d97706); }
@media (min-width: 768px) {
    #global-toast { bottom: 24px; }
}

/* ── SHAP attribution bars ──────────────────────────────────── */
.shap-section { margin-bottom: 1.25rem; }
.shap-section-title { font-size: 0.75rem; font-weight: 700; color: var(--s400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.shap-section-hint  { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.shap-bar-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.shap-bar-label { width: 130px; flex-shrink: 0; font-size: 0.8125rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shap-bar-track { flex: 1; height: 8px; background: var(--border-subtle, #e2e8f0); border-radius: 99px; overflow: hidden; }
.shap-bar-fill  { height: 100%; border-radius: 99px; transition: width 0.45s ease; min-width: 3px; }
.shap-bar-fill--pos  { background: var(--brand, #135bec); }
.shap-bar-fill--neg  { background: var(--color-rose, #e53e3e); }
.shap-bar-fill--zero { background: var(--border, #cbd5e1); }
.shap-bar-value { width: 52px; flex-shrink: 0; text-align: right; font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

/* ── Risk Profile Wizard ────────────────────────────────────── */
.rp-step-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--border, #e2e8f0); flex-shrink: 0; transition: background 0.2s;
}
.rp-step-dot.rp-step-active { background: var(--brand, #135bec); }
.rp-step-dot.rp-step-done   { background: var(--color-emerald, #38a169); }
.rp-step-line { flex: 1; height: 2px; background: var(--border, #e2e8f0); }
.rp-choice-group {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem;
}
.rp-choice-card {
    display: flex; flex-direction: column; gap: 4px; padding: 1rem;
    border: 1.5px solid var(--border, #e2e8f0); border-radius: 10px; cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s; user-select: none; position: relative;
}
.rp-choice-card:hover { border-color: var(--brand, #135bec); }
.rp-choice-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rp-choice-card:has(input:checked) {
    border-color: var(--brand, #135bec);
    box-shadow: 0 0 0 3px rgba(19,91,236,0.15);
    background: rgba(19,91,236,0.04);
}
.rp-choice-icon { font-size: 1.5rem; }
.rp-choice-label { font-weight: 600; font-size: 0.9375rem; }
.rp-choice-hint  { font-size: 0.8125rem; color: var(--text-muted); }
.rp-checkbox-group {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem;
}
.rp-check-card {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--border, #e2e8f0); border-radius: 8px; cursor: pointer;
    font-size: 0.875rem; transition: border-color 0.15s;
}
.rp-check-card:hover { border-color: var(--brand, #135bec); }
.rp-check-card:has(input:checked) {
    border-color: var(--brand, #135bec);
    background: rgba(19,91,236,0.05);
}

/* ── Empty states (inline) ──────────────────────────────────── */
.empty-state-inline {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 2.5rem 1.5rem; text-align: center; color: var(--text-muted);
    gap: 0.5rem;
}
.empty-state-inline .empty-icon {
    font-size: 2.5rem; opacity: 0.45; margin-bottom: 0.25rem;
}
.empty-state-inline .empty-title {
    font-size: 1rem; font-weight: 600; color: var(--text-secondary);
}
.empty-state-inline .empty-body {
    font-size: 0.875rem; max-width: 320px; line-height: 1.5;
}

/* ── TLH / Stress-test cards ────────────────────────────────── */
.tlh-card {
    padding: 0.875rem 1rem; border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px; display: flex; flex-direction: column; gap: 0.35rem;
    background: var(--bg-surface, #fff);
}
.tlh-card--wash { border-left: 3px solid var(--color-amber, #ecc94b); }
.stress-card {
    padding: 0.875rem 1rem; border-radius: 10px; border: 1px solid var(--border, #e2e8f0);
}
.stress-card--up   { border-left: 3px solid var(--color-emerald, #38a169); }
.stress-card--down { border-left: 3px solid var(--color-danger, #ef4444); }
.stress-card--flat { border-left: 3px solid var(--color-amber, #ecc94b); }

/* ── Onboarding flow ────────────────────────────────────────── */
.onboard-step { display: none; }
.onboard-step--active { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding: 2rem 1rem; }
.onboard-dots { display: flex; gap: 8px; justify-content: center; margin-top: 1.5rem; }
.onboard-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border, #e2e8f0); transition: background 0.2s; }
.onboard-dot--active { background: var(--brand, #135bec); }
.onboard-dot--done   { background: var(--color-emerald, #38a169); }
.onboard-icon { font-size: 3rem; }
