
/* Clariqo — Personal Finance */
:root {
  --bg:         #0F1117;
  --bg2:        #141820;
  --panel:      #191D27;
  --panel2:     #1E2230;
  --border:     #252B3A;
  --border2:    #2D3448;
  --text:       #E8ECF4;
  --text2:      #6B7694;
  --text3:      #454E66;
  --accent:     #2563EB;
  --accent2:    #1D4ED8;
  --accent-dim: rgba(37,99,235,0.12);
  --blue:       #2563EB;
  --blue-dim:   rgba(37,99,235,0.12);
  --amber:      #f59e0b;
  --amber-dim:  rgba(245,158,11,0.12);
  --red:        #ef4444;
  --red-dim:    rgba(239,68,68,0.12);
  --gradient:   linear-gradient(135deg,#2DD4BF,#2563EB);
  --radius:     10px;
  --radius-sm:  6px;
  --sidebar-w:  230px;
  --titlebar-h: 42px;
  --font:       'Inter', 'Segoe UI', system-ui, sans-serif;
}
body.light {
  --bg:#f0f4f8;--bg2:#e8edf3;--panel:#ffffff;--panel2:#f4f7fa;
  --border:#d1dbe8;--border2:#c0cdd9;--text:#1a2332;--text2:#5a6a7e;--text3:#8fa0b3;
  --accent-dim:rgba(37,99,235,0.1);--blue-dim:rgba(37,99,235,0.1);
  --amber-dim:rgba(245,158,11,0.1);--red-dim:rgba(239,68,68,0.1);
}
*{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;overflow:hidden;font-family:var(--font);background:var(--bg);color:var(--text);user-select:none;}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:3px;}

/* ── Title bar ───────────────────────────────────────────── */
:root {
  --titlebar-h: 42px;
}

/* ── Title bar ───────────────────────────────────────────── */
:root {
  --titlebar-h: 42px;
}

/* ── Title bar ───────────────────────────────────────────── */
.titlebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--titlebar-h);
    background: #0d1117;
    color: white;
    z-index: 9999;
    user-select: none;
}

.titlebar-left {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.titlebar-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.titlebar-center {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    pointer-events: auto;
}

/* Badge */
.dev-badge {
    position: relative;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;

    color: rgba(255,255,255,0.85);

    padding: 4px 12px;
    border-radius: 999px;

    background: rgba(255, 204, 0, 0.08);
    border: 1px solid rgba(255, 204, 0, 0.25);

    backdrop-filter: blur(6px);
    cursor: default;
}

/* Tooltip */
.dev-tooltip {
    position: absolute;
    top: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);

    min-width: 260px;
    max-width: 320px;

    padding: 10px 12px;
    border-radius: 10px;

    background: rgba(20, 24, 30, 0.95);
    color: rgba(255,255,255,0.9);

    font-size: 12px;
    line-height: 1.4;
    text-align: center;

    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);

    opacity: 0;
    pointer-events: none;

    transition: 
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* Tooltip arrow */
.dev-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);

    width: 10px;
    height: 10px;

    background: rgba(20, 24, 30, 0.95);
    border-left: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Contact us / report a bug topbar buttons */
.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    height: 32px;
    padding: 0 10px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: rgba(255,255,255,0.85);

    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.topbar-btn:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.topbar-btn:active {
    transform: scale(0.96);
}
/* Contact us / report a bug topbar buttons divider to the right of the sun/moon icon */
.topbar-divider {
    width: 1px;
    height: 18px;

    background: rgba(255,255,255,0.12);

    margin: 0 6px;
}
/* Update prompter button on top-bar */
.update-pill::before {
    content: "🔔";
    font-size: 11px;
}

.update-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
	
    position: relative;
    top: 7px;   /* adjust this */
	left: 6px; /* adjust this */

    height: 28px;
    padding: 0 12px;
    margin-right: 10px;

    border-radius: 999px;
    border: 1px solid rgba(247, 75, 45);

    background: rgba(37,99,235,0.08);
    color: var(--accent);

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}

/* Hover */
.update-pill:hover {
    background: rgba(37,99,235,0.18);
    border-color: rgba(37,99,235,0.6);
    transform: translateY(-1px);
}

/* Glow + pulse animation */
.glow-pulse {
    animation: updatePulse 2.6s ease-in-out infinite;
}

/* Pulse keyframes */
@keyframes updatePulse {
    0% {
        box-shadow: 0 0 0 rgba(37,99,235,0.0);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 12px rgba(37,99,235,0.35);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 rgba(37,99,235,0.0);
        transform: scale(1);
    }
}

/* Icon base */
.btn-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    position: relative;
}

/* Contact (envelope icon) */
.contact-icon {
    border: 1.5px solid currentColor;
    border-radius: 3px;
}

.contact-icon::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: 3px;
    height: 0;
    border-top: 1.5px solid currentColor;
    transform: skewY(-20deg);
}

/* Bug icon */
.bug-icon {
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.bug-icon::before,
.bug-icon::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 6px;
    background: currentColor;
    top: 2px;
}

.bug-icon::before {
    left: -3px;
}

.bug-icon::after {
    right: -3px;
}

/* Hover trigger */
.dev-badge:hover .dev-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Link styling */
.dev-tooltip a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 500;
}

.dev-tooltip a:hover {
    text-decoration: underline;
}

.titlebar-controls {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    position: relative;
    width: 20px;
    height: 20px;
    display: block;
}

.sun,
.moon {
    position: absolute;
    inset: 0;
    margin: auto;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

/* Sun */
.sun {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f5c542;
    box-shadow:
        0 0 0 0 rgba(245,197,66,0.35),
        0 -11px 0 -7px #f5c542,
        0 11px 0 -7px #f5c542,
        11px 0 0 -7px #f5c542,
        -11px 0 0 -7px #f5c542,
        8px 8px 0 -7px #f5c542,
        -8px 8px 0 -7px #f5c542,
        8px -8px 0 -7px #f5c542,
        -8px -8px 0 -7px #f5c542;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Moon */
.moon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dbe7ff;
    box-shadow: 0 0 6px rgba(219,231,255,0.4);
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}

/* Light mode state */
body.light .sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}

body.light .moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body:not(.light) .sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body:not(.light) .moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.win-btn {
    width: 46px;
    height: var(--titlebar-h);
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.win-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.close-btn:hover {
    background: #e81123;
}

#app-shell {
    display: flex;
    height: 100vh;
    padding-top: var(--titlebar-h);
}

/* ── App shell ───────────────────────────────────────────── */
#app-shell{display:flex;height:100vh;padding-top:var(--titlebar-h);}

/* ── Sidebar ─────────────────────────────────────────────── */
#sidebar{width:var(--sidebar-w);min-width:var(--sidebar-w);background:var(--bg2);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100%;overflow-y:auto;overflow-x:hidden;}
.sidebar-logo{padding:12px 14px 10px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px;}
.sidebar-logo img.logo-bird{height:26px;}
.sidebar-logo img.logo-text{height:14px;}
.sidebar-period-badge{margin:8px 8px 0;background:var(--accent-dim);border:1px solid rgba(37,99,235,0.2);border-radius:var(--radius-sm);padding:7px 10px;cursor:pointer;transition:border-color 0.15s;}
.sidebar-period-badge:hover{border-color:var(--accent);}
.sidebar-period-badge .period-label{font-size:10px;color:var(--text2);margin-bottom:2px;}
.sidebar-period-badge .period-name{color:var(--accent);font-weight:600;font-size:12px;}

/* Snapshot strip */
#sb-snapshot{margin:6px 8px 0;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;}
.sb-snap-row{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;border-bottom:1px solid var(--border);cursor:pointer;transition:background 0.15s;position:relative;}
.sb-snap-row:last-child{border-bottom:none;}
.sb-snap-row:hover{background:var(--panel2);}
.sb-snap-label{font-size:10px;color:var(--text3);text-transform:uppercase;letter-spacing:0.4px;}
.sb-snap-val{font-size:12px;font-weight:700;color:var(--text);}
.sb-snap-val.green{color:var(--accent);}
.sb-snap-val.blue{color:var(--blue);}
.sb-snap-val.amber{color:var(--amber);}
.sb-snap-val.red{color:var(--red);}

/* Tooltip */
.snap-tooltip{position:fixed;background:var(--panel2);border:1px solid var(--border2);border-radius:var(--radius);padding:12px 14px;min-width:200px;max-width:260px;z-index:8000;pointer-events:none;opacity:0;transform:translateX(-6px);transition:opacity 0.18s ease,transform 0.18s ease;font-size:12px;box-shadow:0 8px 24px rgba(0,0,0,0.4);}
.snap-tooltip.visible{opacity:1;transform:translateX(0);}
.stt-title{font-size:10px;font-weight:700;color:var(--text2);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:8px;}
.stt-row{display:flex;justify-content:space-between;padding:3px 0;border-bottom:1px solid var(--border);}
.stt-row:last-child{border-bottom:none;}
.stt-l{color:var(--text2);}
.stt-r{font-weight:600;}

/* Nav */
.nav-section-label{font-size:10px;font-weight:600;color:var(--text3);padding:12px 14px 4px;letter-spacing:0.8px;text-transform:uppercase;}
.nav-item{display:flex;align-items:center;gap:9px;padding:8px 12px;margin:1px 6px;border-radius:var(--radius-sm);font-size:13px;color:var(--text2);cursor:pointer;transition:all 0.15s;text-decoration:none;border:none;background:none;width:calc(100% - 12px);text-align:left;}
.nav-item:hover{background:rgba(37,99,235,0.12);color:var(--text);}
.nav-item.active{background:var(--gradient);color:#fff;font-weight:600;}
.nav-item .nav-icon{font-size:14px;width:18px;text-align:center;flex-shrink:0;}
.sidebar-bottom{margin-top:auto;padding:10px 8px 14px;border-top:1px solid var(--border);}
.sidebar-bottom select{width:100%;background:var(--panel);border:1px solid var(--border2);color:var(--text);padding:6px 8px;border-radius:var(--radius-sm);font-size:12px;cursor:pointer;margin-bottom:6px;font-family:var(--font);}

/* ── Main ────────────────────────────────────────────────── */
#main{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%;}
#topbar{display:flex;align-items:center;justify-content:space-between;padding:0 22px;height:48px;border-bottom:1px solid var(--border);background:var(--bg2);flex-shrink:0;}
.topbar-title{font-size:15px;font-weight:600;}
.topbar-actions{display:flex;align-items:center;gap:10px;}
#content-area{flex:1;overflow-y:auto;padding:18px 22px;position:relative;}

/* Page transition */
.tab-content{animation:fadeSlideIn 0.2s ease;}
@keyframes fadeSlideIn{from{opacity:0;transform:translateY(5px);}to{opacity:1;transform:translateY(0);}}

/* ── Splash ──────────────────────────────────────────────── */
#splash-screen,#loading-screen,#setup-screen{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:3000;}
#splash-screen{background:#0F1117;}
#loading-screen,#setup-screen{background:var(--bg);}
.splash-logo{height:72px;margin-bottom:14px;animation:splashPop 0.4s ease;}
.splash-name{font-size:20px;font-weight:700;color:white;margin-bottom:3px;}
.splash-ver{font-size:11px;color:rgba(255,255,255,0.35);margin-bottom:28px;}
.splash-bar-wrap{width:260px;height:3px;background:rgba(255,255,255,0.1);border-radius:2px;overflow:hidden;}
.splash-bar{height:100%;background:var(--accent);border-radius:2px;width:0;transition:width 0.08s linear;}
.splash-status{font-size:11px;color:rgba(255,255,255,0.3);margin-top:8px;}
.splash-update{margin-top:24px;background:var(--accent-dim);border:1px solid rgba(37,99,235,0.3);border-radius:var(--radius);padding:16px 24px;text-align:center;width:340px;max-width:90vw;animation:fadeSlideIn 0.3s ease;}
.splash-update .upd-t{color:var(--accent);font-weight:700;font-size:13px;margin-bottom:4px;}
.splash-update .upd-s{color:var(--text2);font-size:12px;margin-bottom:10px;}
@keyframes splashPop{from{opacity:0;transform:scale(0.85);}to{opacity:1;transform:scale(1);}}

/* ── Setup ───────────────────────────────────────────────── */
.setup-card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:34px;width:460px;max-width:95vw;}
.setup-card h1{font-size:19px;font-weight:700;margin-bottom:4px;}
.setup-card p{color:var(--text2);font-size:13px;margin-bottom:18px;}

/* ── Cards ───────────────────────────────────────────────── */
.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:12px;}
.card-title{display:inline-flex;align-items:center;font-size:10px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:0.8px;margin-bottom:12px;background:var(--accent-dim);border:1px solid rgba(37,99,235,0.2);padding:3px 10px;border-radius:20px;}

/* ── Stat grid ───────────────────────────────────────────── */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:14px;}
.stat-card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:13px 15px;transition:border-color 0.15s,transform 0.15s;cursor:default;}
.stat-card:hover{border-color:var(--border2);transform:translateY(-1px);}
.stat-label{font-size:10px;color:var(--text2);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:5px;}
.stat-val{font-size:20px;font-weight:700;}
.stat-card.green .stat-val{color:var(--accent);}
.stat-card.red .stat-val{color:var(--red);}
.stat-card.amber .stat-val{color:var(--amber);}
.stat-card.blue .stat-val{color:var(--blue);}

/* ── Layouts ─────────────────────────────────────────────── */
.two-col{display:grid;grid-template-columns:1fr 2fr;gap:12px;align-items:start;}
.two-col-equal{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.three-col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}

/* ── Forms ───────────────────────────────────────────────── */
.form-group{margin-bottom:9px;}
.form-label{display:block;font-size:11px;color:var(--text2);margin-bottom:4px;font-weight:500;}
.form-row{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;}
input[type="text"],input[type="number"],input[type="date"],select,textarea{background:var(--bg);border:1px solid var(--border2);color:var(--text);padding:7px 10px;border-radius:var(--radius-sm);font-size:13px;font-family:var(--font);width:100%;transition:border-color 0.15s,box-shadow 0.15s;}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,0.1);}
input::placeholder{color:var(--text3);}
select option{background:var(--panel);}
body.light input,body.light select,body.light textarea{background:#fff;}

/* ── Buttons ─────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border-radius:var(--radius-sm);font-size:13px;font-weight:500;cursor:pointer;border:none;font-family:var(--font);transition:all 0.15s;white-space:nowrap;}
.btn-primary{background:var(--gradient);color:#fff;}
.btn-primary:hover{background:linear-gradient(135deg,#2DC47A,#1D4ED8);transform:translateY(-1px);}
.btn-secondary{background:var(--panel2);color:var(--text);border:1px solid var(--border2);}
.btn-secondary:hover{border-color:var(--text3);background:var(--border);}
.btn-danger{background:var(--red-dim);color:var(--red);border:1px solid rgba(239,68,68,0.2);}
.btn-danger:hover{background:rgba(239,68,68,0.25);}
.btn-amber{background:var(--amber-dim);color:var(--amber);border:1px solid rgba(245,158,11,0.2);}
.btn-sm{padding:4px 9px;font-size:12px;}
.btn-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px;}

/* ── Tables ──────────────────────────────────────────────── */
.table-scroll{max-height:280px;overflow-y:auto;}
.table-wrap{overflow-x:auto;}
.data-table{width:100%;border-collapse:collapse;font-size:13px;}
.data-table th{text-align:left;padding:7px 10px;color:var(--text2);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--panel);z-index:1;}
.data-table td{padding:8px 10px;border-bottom:1px solid var(--border);}
.data-table tr:last-child td{border-bottom:none;}
.data-table tbody tr{transition:background 0.1s;}
.data-table tbody tr:hover{background:var(--panel2);}
.data-table .amount{text-align:right;font-weight:600;font-family:monospace;}
.green{color:var(--accent);}.red{color:var(--red);}.amber{color:var(--amber);}.blue{color:var(--blue);}

/* ── Progress ────────────────────────────────────────────── */
.progress-bar{height:5px;background:var(--border2);border-radius:3px;overflow:hidden;margin:4px 0;}
.progress-fill{height:100%;border-radius:3px;transition:width 0.4s ease;}
.progress-fill.green{background:var(--accent);}
.progress-fill.amber{background:var(--amber);}
.progress-fill.red{background:var(--red);}
.progress-fill.blue{background:var(--blue);}

/* ── Cat rows ────────────────────────────────────────────── */
.cat-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);transition:background 0.12s;border-radius:var(--radius-sm);}
.cat-row:hover{background:var(--panel2);}
.cat-row:last-child{border-bottom:none;}
.cat-name{flex:1;font-size:13px;font-weight:500;}

/* ── Badges ──────────────────────────────────────────────── */
.badge{display:inline-block;padding:2px 7px;border-radius:20px;font-size:10px;font-weight:600;}
.badge-green{background:var(--accent-dim);color:var(--accent);}
.badge-red{background:var(--red-dim);color:var(--red);}
.badge-amber{background:var(--amber-dim);color:var(--amber);}
.badge-blue{background:var(--blue-dim);color:var(--blue);}
.badge-grey{background:var(--border);color:var(--text2);}
.paid-badge{display:flex;align-items:center;gap:4px;color:var(--accent);font-size:11px;font-weight:600;margin-top:4px;}

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.65);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:500;padding:20px;animation:fadeIn 0.15s ease;}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
.modal{background:var(--panel);border:1px solid var(--border2);border-radius:14px;padding:24px;width:100%;max-height:90vh;overflow-y:auto;animation:modalIn 0.18s ease;}
@keyframes modalIn{from{opacity:0;transform:scale(0.96) translateY(6px);}to{opacity:1;transform:scale(1) translateY(0);}}
.modal h3{font-size:15px;font-weight:700;margin-bottom:3px;}
.modal .modal-sub{font-size:13px;color:var(--text2);margin-bottom:16px;}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;}
.modal-sm{max-width:400px;}.modal-md{max-width:520px;}.modal-lg{max-width:700px;}.modal-xl{max-width:840px;}

/* ── Misc ────────────────────────────────────────────────── */
.debt-card,.card-entry{background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius);padding:13px 15px;margin-bottom:9px;transition:border-color 0.15s;}
.debt-card:hover,.card-entry:hover{border-color:var(--border2);}
.debt-name{font-size:14px;font-weight:600;margin-bottom:7px;}
.debt-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:9px;}
.dm-label{font-size:10px;color:var(--text3);text-transform:uppercase;margin-bottom:2px;}
.dm-val{font-size:13px;font-weight:600;}
.savings-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);transition:background 0.12s;}
.savings-row:hover{background:var(--panel2);}
.savings-row:last-child{border-bottom:none;}
.savings-name{font-size:13px;font-weight:500;flex:1;}
.savings-bal{font-size:13px;font-weight:700;color:var(--accent);min-width:75px;text-align:right;}
.transfer-item{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px;transition:background 0.12s;}
.transfer-item:hover{background:var(--panel2);}
.transfer-item:last-child{border-bottom:none;}
.transfer-type{color:var(--text2);font-size:11px;}
.transfer-amount{font-weight:600;color:var(--accent);}
.period-bar{display:flex;align-items:center;gap:14px;padding:9px 12px;background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:14px;font-size:13px;flex-wrap:wrap;}
.period-bar .pb-item{color:var(--text2);}
.period-bar .pb-item span{color:var(--text);font-weight:500;}
.locked-badge{margin-left:auto;background:var(--amber-dim);color:var(--amber);padding:2px 8px;border-radius:20px;font-size:10px;font-weight:600;}
#toast-container{position:fixed;bottom:18px;right:18px;z-index:9999;display:flex;flex-direction:column;gap:7px;pointer-events:none;}
.toast{background:var(--panel2);border:1px solid var(--border2);border-radius:var(--radius-sm);padding:9px 14px;font-size:13px;min-width:200px;animation:slideIn 0.2s ease;pointer-events:all;}
.toast.success{border-left:3px solid var(--accent);}
.toast.error{border-left:3px solid var(--red);}
@keyframes slideIn{from{opacity:0;transform:translateX(16px);}to{opacity:1;transform:translateX(0);}}
.empty-state{text-align:center;padding:22px 16px;color:var(--text2);font-size:13px;}
.empty-icon{font-size:22px;margin-bottom:6px;}
.muted{color:var(--text2);}.small{font-size:12px;}.bold{font-weight:600;}.mono{font-family:monospace;}
.flex{display:flex;align-items:center;gap:8px;}.flex-between{display:flex;align-items:center;justify-content:space-between;}
.mt-4{margin-top:4px;}.mt-8{margin-top:8px;}.mt-12{margin-top:12px;}.mt-16{margin-top:16px;}
.mb-4{margin-bottom:4px;}.mb-8{margin-bottom:8px;}.mb-12{margin-bottom:12px;}
.hidden{display:none!important;}.w-full{width:100%;}
.input-sm{width:90px!important;}.input-md{width:150px!important;}
.sep{height:1px;background:var(--border);margin:12px 0;}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.section-title{font-size:14px;font-weight:600;}

/* ── Resize Grips──────────────────────────────────────── */
#resize-grip {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    z-index: 10000;
    cursor: nwse-resize;
    background: transparent;
}

#resize-grip::before {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255,255,255,0.35);
    border-bottom: 2px solid rgba(255,255,255,0.35);
}
/* ── Allocation cards (joint budget) ─────────────────────────────── */
.alloc-card{background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;margin-bottom:10px;}
.alloc-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.alloc-name{font-size:13px;font-weight:600;color:var(--text);}
.alloc-remain{font-size:13px;font-weight:700;}
.alloc-meta{display:flex;justify-content:space-between;align-items:flex-end;margin-top:6px;flex-wrap:wrap;gap:8px;}
.alloc-inputs{display:flex;align-items:flex-end;gap:6px;}
.alloc-field{display:flex;flex-direction:column;gap:2px;}
.alloc-label{font-size:10px;color:var(--text3);text-transform:uppercase;letter-spacing:0.4px;}
.alloc-input{width:80px;padding:5px 7px;font-size:12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--panel);color:var(--text);font-family:var(--font);}
.alloc-share{width:56px;}

/* ── Category chips ──────────────────────────────────────────────── */
.cat-chips{display:flex;flex-wrap:wrap;gap:6px;min-height:28px;}
.cat-chip{display:inline-flex;align-items:center;gap:5px;background:var(--accent-dim);border:1px solid rgba(37,99,235,0.3);color:var(--accent);border-radius:20px;padding:3px 10px 3px 12px;font-size:12px;font-weight:500;}
.cat-chip button{background:none;border:none;cursor:pointer;color:var(--accent);font-size:13px;line-height:1;padding:0;opacity:0.7;transition:opacity 0.15s;}
.cat-chip button:hover{opacity:1;}

/* ── Setup wizard card ───────────────────────────────────────────── */
.setup-card{width:480px;max-width:95vw;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:32px 36px;}
.setup-card h1{font-size:22px;font-weight:700;margin:0 0 4px;}
.setup-card p{font-size:13px;color:var(--text2);margin:0 0 18px;}

/* ── Card entry (cards section) ─────────────────────────────────── */
.card-entry{background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;margin-bottom:10px;}

/* ── Amber dim for warnings ──────────────────────────────────────── */
.amber-dim{background:rgba(245,158,11,0.08);}
[style*="amber-dim"]{background:rgba(245,158,11,0.08);}

/* ── Premium lock overlay ─────────────────────────────────────────── */
.premium-locked{position:absolute;inset:0;z-index:10;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);background:rgba(13,17,23,0.55);border-radius:inherit;display:flex;align-items:center;justify-content:center;}
.premium-full-tab{position:absolute;inset:0;z-index:10;background:var(--bg);border-radius:0;display:flex;align-items:center;justify-content:center;}
.premium-overlay{text-align:center;padding:24px;max-width:320px;}
.premium-lock-icon{font-size:36px;margin-bottom:10px;}
.premium-lock-text{font-size:15px;font-weight:700;color:var(--text);margin-bottom:6px;}
.premium-lock-sub{font-size:12px;color:var(--text2);line-height:1.6;margin-bottom:16px;}

/* ── Card title tooltips ─────────────────────────────────────────── */
.card-title[data-tip]{position:relative;cursor:default;}
.card-title[data-tip]::after{
  content:attr(data-tip);
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  width:240px;
  background:var(--panel2);
  border:1px solid var(--border2);
  border-radius:var(--radius-sm);
  padding:8px 11px;
  font-size:11px;
  font-weight:400;
  color:var(--text2);
  letter-spacing:0;
  text-transform:none;
  line-height:1.6;
  white-space:normal;
  pointer-events:none;
  opacity:0;
  transform:translateY(-4px);
  transition:opacity 0.15s ease,transform 0.15s ease;
  z-index:200;
  box-shadow:0 4px 16px rgba(0,0,0,0.35);
}
.card-title[data-tip]:hover::after{opacity:1;transform:translateY(0);}


/* ── Theme picker ────────────────────────────────────────────────── */
.theme-picker{display:flex;gap:10px;flex-wrap:wrap;padding:4px 0;}
.theme-swatch{display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer;padding:6px 10px;border-radius:var(--radius-sm);border:1px solid var(--border);transition:all 0.15s;background:var(--panel2);}
.theme-swatch:hover{border-color:var(--border2);background:var(--panel);}
.theme-swatch.active{border-color:var(--accent);background:var(--accent-dim);}

/* ── Version pill ────────────────────────────────────────────────── */
.version-pill{border:none;border-radius:20px;padding:3px 12px;font-size:10px;font-weight:700;letter-spacing:0.8px;text-transform:uppercase;font-family:var(--font);cursor:pointer;transition:all 0.15s;}
.version-pill-free{background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.3);color:#ef4444;}
.version-pill-free:hover{background:rgba(239,68,68,0.2);}
.version-pill-premium{background:var(--accent-dim);border:1px solid rgba(37,99,235,0.3);color:var(--accent);cursor:default;}

/* ── Premium benefit cards ───────────────────────────────────────── */
.premium-benefit{display:flex;align-items:flex-start;gap:10px;background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;}
.benefit-icon{font-size:20px;flex-shrink:0;margin-top:1px;}
.benefit-title{font-size:12px;font-weight:600;color:var(--text);margin-bottom:2px;}
.benefit-desc{font-size:11px;color:var(--text2);}
