/* Spendly redesign — design tokens + components.
   Everything is scoped under .sp-* classes so existing (Bootstrap) screens are untouched
   until each redesign phase moves them over. */

:root {
    --sp-navy: #0f172a;
    --sp-navy-2: #1e293b;
    --sp-slate-600: #475569;
    --sp-slate-500: #64748b;
    --sp-slate-400: #94a3b8;
    --sp-slate-300: #cbd5e1;
    --sp-slate-200: #e2e8f0;
    --sp-slate-100: #f1f5f9;
    --sp-slate-50: #f8fafc;
    --sp-bg: #eef1f5;
    --sp-card: #ffffff;
    --sp-green: #10b981;
    --sp-green-ink: #06281c;
    --sp-green-700: #15803d;
    --sp-green-600: #16a34a;
    --sp-green-link: #059669;
    --sp-green-tint: #dcfce7;
    --sp-green-ring: #86efac;
    --sp-rose: #e11d48;
    --sp-rose-700: #be123c;
    --sp-rose-tint: #fee2e2;
    --sp-rose-ring: #fda4af;
    --sp-amber: #d97706;
    --sp-amber-ink: #92400e;
    --sp-amber-tint: #fffbeb;
    --sp-amber-line: #fde68a;
    --sp-indigo: #4f46e5;
    --sp-indigo-tint: #eef2ff;
    --sp-font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---------- Auth / gate layout (Phase 1) ---------- */
.sp-auth {
    min-height: 100vh;
    background: var(--sp-bg);
    font-family: var(--sp-font);
    color: var(--sp-navy);
    display: flex;
    justify-content: center;
}
.sp-auth * { box-sizing: border-box; }
.sp-auth-col { width: 100%; max-width: 420px; display: flex; flex-direction: column; }
.sp-auth-head {
    background: var(--sp-navy);
    border-radius: 0 0 34px 34px;
    padding: 64px 24px 58px; /* design: 46px status-bar area + 18px */
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.sp-auth-logo { border-radius: 20px; box-shadow: 0 12px 28px -10px rgba(16, 185, 129, .6); }
.sp-auth-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 16px; }
.sp-auth-tagline { font-size: 13px; color: var(--sp-slate-300); font-weight: 500; line-height: 1.5; margin-top: 6px; max-width: 260px; }
.sp-auth-icon {
    width: 68px; height: 68px; border-radius: 20px;
    background: var(--sp-green); color: var(--sp-green-ink);
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    box-shadow: 0 12px 28px -10px rgba(16, 185, 129, .6);
}
.sp-card {
    margin: -36px 16px 0;
    background: var(--sp-card);
    border-radius: 26px;
    padding: 18px 18px 20px;
    box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .35);
}
.sp-auth-foot { display: flex; justify-content: center; padding: 18px 16px 26px; }
/* Wider screens: show the sign-in screens inside the design's phone frame on its dark page,
   so the navy header runs edge to edge like the design instead of floating on light grey. */
@media (min-width: 520px) {
    .sp-auth { background: radial-gradient(140% 100% at 50% 0%, #24262e 0%, #16181d 60%, #111317 100%); align-items: center; padding: 16px; }
    .sp-auth-col { max-width: 390px; background: var(--sp-bg); border-radius: 40px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); min-height: min(760px, calc(100vh - 32px)); }
}
.sp-auth-foot-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--sp-slate-500); cursor: pointer; background: none; border: none; font-family: inherit; }
.sp-auth-foot-link strong { color: var(--sp-navy); font-weight: 700; }

/* Full-screen loading (signing in, checking cloud) */
.sp-loading {
    min-height: 100vh; background: var(--sp-navy); color: #fff; font-family: var(--sp-font);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
}
.sp-loading-title { font-size: 15px; font-weight: 800; }
.sp-loading-sub { font-size: 12px; color: var(--sp-slate-400); font-weight: 600; margin-top: -8px; }
.sp-spin { font-size: 20px; color: var(--sp-green); }

.sp-form { font-family: var(--sp-font); color: var(--sp-navy); }
.sp-form * { box-sizing: border-box; }

/* Segmented tabs */
.sp-tabs { display: flex; background: var(--sp-slate-100); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.sp-tab {
    flex: 1; text-align: center; padding: 10px 0; border-radius: 11px; font-size: 13px; font-weight: 800;
    cursor: pointer; background: transparent; color: var(--sp-slate-500); border: none; font-family: inherit;
}
.sp-tab.is-active { background: #fff; color: var(--sp-navy); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

/* Fields */
.sp-label { font-size: 11px; font-weight: 800; color: var(--sp-slate-500); letter-spacing: .05em; margin: 0 2px 6px; text-transform: uppercase; }
.sp-field {
    display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px;
    background: var(--sp-slate-100); border-radius: 14px; margin-bottom: 12px;
}
.sp-field.is-ok { box-shadow: inset 0 0 0 2px var(--sp-green-ring); }
.sp-field.is-bad { box-shadow: inset 0 0 0 2px var(--sp-rose-ring); }
.sp-field > i.sp-field-icon { color: var(--sp-slate-400); font-size: 13px; width: 14px; text-align: center; flex-shrink: 0; }
.sp-field input {
    flex: 1; min-width: 0; border: none; background: transparent; outline: none;
    font-size: 14px; font-weight: 600; color: var(--sp-navy); font-family: inherit; color-scheme: light;
}
/* Edge/IE draw their own reveal/clear buttons inside password/text inputs — we have our own eye toggle */
.sp-field input::-ms-reveal, .sp-field input::-ms-clear { display: none; }
.sp-field-eye { color: var(--sp-slate-400); font-size: 13px; cursor: pointer; padding: 6px; background: none; border: none; }
.sp-input {
    width: 100%; height: 50px; border: none; background: var(--sp-slate-100); border-radius: 14px; padding: 0 14px;
    font-size: 14px; font-weight: 600; color: var(--sp-navy); outline: none; font-family: inherit; color-scheme: light;
}
.sp-textarea {
    width: 100%; border: none; background: var(--sp-slate-100); border-radius: 14px; padding: 12px 14px;
    font-size: 14px; font-weight: 600; color: var(--sp-navy); outline: none; font-family: inherit; resize: none; line-height: 1.45; color-scheme: light;
}
.sp-hint { font-size: 10px; color: var(--sp-slate-400); font-weight: 600; }

/* Buttons */
.sp-btn {
    width: 100%; height: 52px; border: none; border-radius: 16px; font-size: 15px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit;
}
.sp-btn:disabled { opacity: .6; cursor: default; }
.sp-btn-primary { background: var(--sp-green); color: var(--sp-green-ink); box-shadow: 0 10px 20px -10px rgba(16, 185, 129, .7); }
.sp-btn-dark { background: var(--sp-navy); color: #fff; }
.sp-btn-soft { background: var(--sp-slate-100); color: var(--sp-navy); font-size: 13px; font-weight: 700; height: 48px; border-radius: 14px; }
.sp-btn-dark.sp-btn-sm { font-size: 13px; height: 48px; border-radius: 14px; }
.sp-btn-row { display: flex; gap: 8px; width: 100%; }
.sp-link { font-size: 12px; font-weight: 700; color: var(--sp-green-link); cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.sp-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--sp-slate-500); cursor: pointer; margin-bottom: 12px; background: none; border: none; padding: 0; font-family: inherit; }
.sp-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; }
.sp-divider::before, .sp-divider::after { content: ''; flex: 1; height: 1px; background: var(--sp-slate-200); }
.sp-divider span { font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-social button {
    height: 48px; border: 1px solid var(--sp-slate-200); border-radius: 14px; background: #fff; color: var(--sp-navy);
    font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit;
}
.sp-social button:disabled { opacity: .6; cursor: default; }

/* Checkbox row (Remember me, TOFU confirm) */
.sp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--sp-slate-500); cursor: pointer; user-select: none; }
.sp-check input { width: 16px; height: 16px; accent-color: var(--sp-green); cursor: pointer; }

/* Alerts */
.sp-alert { border-radius: 12px; padding: 9px 12px; font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; line-height: 1.45; }
.sp-alert > i { margin-top: 2px; flex-shrink: 0; }
.sp-alert-err { background: var(--sp-rose-tint); color: var(--sp-rose-700); }
.sp-alert-ok { background: var(--sp-green-tint); color: var(--sp-green-700); }
.sp-alert-warn { background: var(--sp-amber-tint); color: var(--sp-amber-ink); border: 1px solid var(--sp-amber-line); }
.sp-alert-info { background: var(--sp-indigo-tint); color: var(--sp-indigo); }

/* Headings inside a card */
.sp-card-title { font-size: 18px; font-weight: 800; color: var(--sp-navy); }
.sp-card-sub { font-size: 13px; color: var(--sp-slate-500); font-weight: 500; line-height: 1.5; margin: 4px 0 16px; }
.sp-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sp-tile { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.sp-tile-indigo { background: var(--sp-indigo-tint); color: var(--sp-indigo); }
.sp-tile-green { background: var(--sp-green-tint); color: var(--sp-green-600); }
.sp-card-head-title { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-card-head-sub { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; }
.sp-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px 4px; }
.sp-done-tile { width: 56px; height: 56px; border-radius: 18px; background: var(--sp-green-tint); color: var(--sp-green-600); display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* Topic chips (Contact us) */
.sp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.sp-chip { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer; background: #fff; color: var(--sp-slate-600); border: 1px solid var(--sp-slate-200); font-family: inherit; }
.sp-chip.is-active { background: var(--sp-navy); color: #fff; border-color: var(--sp-navy); }

/* Selectable option rows (storage picker) */
.sp-options { background: var(--sp-slate-50); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.sp-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-family: inherit; }
.sp-option + .sp-option { border-top: 1px solid var(--sp-slate-200); }
.sp-option:disabled { cursor: default; opacity: .55; }
.sp-option-tile { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sp-option-label { font-size: 14px; font-weight: 700; color: var(--sp-navy); }
.sp-option-sub { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); }
.sp-option-check { margin-left: auto; font-size: 18px; }

/* Summary box (cloud restore) */
.sp-stat { background: var(--sp-green-tint); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.sp-stat-title { font-size: 13px; font-weight: 800; color: var(--sp-green-700); }
.sp-stat-sub { font-size: 12px; font-weight: 600; color: var(--sp-green-600); margin-top: 2px; }
.sp-footnote { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; text-align: center; margin-top: 10px; }

/* ---------- App shell (Phase 0) ---------- */
/* Overrides the legacy .mobile-app frame: design background + font, phone-width column. */
.mobile-app.sp-shell { max-width: 440px; background: var(--sp-bg); font-family: var(--sp-font); box-shadow: 0 0 0 1px rgba(15, 23, 42, .04); }
.sp-shell .app-content { padding-bottom: 110px; }
body:has(.sp-shell) { background: #e3e7ee; }

.sp-top {
    position: sticky; top: 0; z-index: 900; background: var(--sp-bg);
    display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px;
}
.sp-viewbar {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 14px;
    padding: 6px 8px 6px 6px; cursor: pointer; border: none; font-family: inherit; text-align: left;
}
.sp-viewbar.is-shared { background: #eef2ff; }
.sp-viewbar-avatars { display: flex; flex-shrink: 0; }
.sp-av {
    width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; border: 2px solid #fff; flex-shrink: 0;
}
.sp-av + .sp-av { margin-left: -8px; }
.sp-viewbar.is-shared .sp-av { border-color: #eef2ff; }
.sp-viewbar-kicker { font-size: 10px; font-weight: 700; color: var(--sp-green); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-viewbar-label { font-size: 12px; font-weight: 800; color: var(--sp-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-viewbar-change { font-size: 11px; font-weight: 800; color: var(--sp-green); display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.sp-viewbar.is-shared .sp-viewbar-kicker, .sp-viewbar.is-shared .sp-viewbar-change { color: var(--sp-indigo); }
.sp-iconbtn {
    position: relative; width: 38px; height: 38px; border-radius: 12px; background: #fff; border: none; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: var(--sp-slate-500); font-size: 15px; cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.sp-iconbtn-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--sp-rose); border: 2px solid #fff; }
.sp-iconbtn-count {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--sp-rose); color: #fff;
    font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--sp-bg);
}
.sp-avatar-btn {
    width: 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--sp-navy); border: none; flex-shrink: 0;
    font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.sp-avatar-btn.is-open { background: var(--sp-navy); color: #fff; box-shadow: 0 0 0 3px #10b98155; }

/* Floating dock (design: 300 x 64, raised green + in the middle) */
.sp-dock {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 950;
    width: 300px; max-width: calc(100% - 32px); height: 64px; background: #fff; border-radius: 24px;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .28);
    display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-family: var(--sp-font);
}
.sp-dock-group { display: flex; gap: 6px; }
.sp-dock-item {
    min-width: 46px; height: 46px; border-radius: 14px; border: none; background: transparent; color: var(--sp-slate-400);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; font-family: inherit; padding: 0 4px;
}
.sp-dock-item i { font-size: 17px; }
.sp-dock-item span { font-size: 9px; font-weight: 800; color: var(--sp-green); }
.sp-dock-item.is-active { color: var(--sp-green); background: #10b98118; }
.sp-dock-plus {
    width: 56px; height: 56px; border-radius: 19px; background: var(--sp-green); color: var(--sp-green-ink); font-size: 22px; cursor: pointer;
    transform: translateY(-14px); box-shadow: 0 12px 24px -6px #10b981cc; border: 4px solid var(--sp-bg); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; padding: 0;
}

/* Bottom sheets */
.sp-scrim { position: fixed; inset: 0; z-index: 1050; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; justify-content: center; font-family: var(--sp-font); }
.sp-scrim.is-danger { background: rgba(15, 23, 42, .55); }
.sp-sheet {
    width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; background: var(--sp-bg); color: var(--sp-navy);
    border-radius: 28px 28px 0 0; padding: 12px 20px 22px; box-sizing: border-box;
}
.sp-sheet * { box-sizing: border-box; }
.sp-sheet-grab { width: 40px; height: 5px; border-radius: 999px; background: var(--sp-slate-300); margin: 0 auto 14px; }
.sp-sheet-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.sp-sheet-title { font-size: 17px; font-weight: 800; color: var(--sp-navy); }
.sp-sheet-sub { font-size: 12px; font-weight: 600; color: var(--sp-slate-500); margin-bottom: 14px; line-height: 1.45; }
.sp-sheet-close { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; border: none; background: #fff; color: var(--sp-slate-500); cursor: pointer; flex-shrink: 0; }
.sp-sheet-foot { display: flex; gap: 8px; margin-top: 14px; }
.sp-sheet-foot .sp-btn { height: 50px; font-size: 14px; }
.sp-btn-cancel { flex: 1; background: #fff; color: var(--sp-slate-500); }
.sp-btn-grow { flex: 1.6; }

/* White card of rows (settings lists, profile, form rows) */
.sp-rowcard { background: #fff; border-radius: 18px; padding: 2px 14px; margin-bottom: 12px; }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; min-height: 44px; }
.sp-row + .sp-row { border-top: 1px solid var(--sp-slate-100); }
.sp-row-label { font-size: 13px; font-weight: 600; color: var(--sp-slate-500); }
.sp-row-value { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--sp-navy); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sp-row-main { flex: 1; min-width: 0; }
.sp-row-title { font-size: 14px; font-weight: 700; color: var(--sp-navy); }
.sp-row-sub { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); }
.sp-row-input { margin-left: auto; border: none; outline: none; background: transparent; text-align: right; font-size: 14px; font-weight: 700; color: var(--sp-navy); font-family: inherit; min-width: 0; flex: 1; color-scheme: light; }
.sp-row-btn { border: none; background: none; color: var(--sp-slate-400); cursor: pointer; font-size: 13px; padding: 4px; }
.sp-section-label { font-size: 11px; font-weight: 800; color: var(--sp-slate-500); letter-spacing: .06em; text-transform: uppercase; margin: 14px 4px 8px; }

/* Toggle switch */
.sp-switch { width: 40px; height: 22px; border-radius: 11px; border: none; background: var(--sp-slate-200); cursor: pointer; padding: 2px; flex-shrink: 0; }
.sp-switch span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transition: transform .15s; }
.sp-switch.is-on { background: var(--sp-green); }
.sp-switch.is-on span { transform: translateX(18px); }

/* Pop-up messages (replace the old full-width banners) */
.sp-toasts { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.sp-toast {
    display: flex; align-items: center; gap: 10px; background: var(--sp-navy); color: #fff; border-radius: 16px; padding: 10px 10px 10px 10px;
    font-family: var(--sp-font); box-shadow: 0 12px 24px -14px rgba(15, 23, 42, .6);
}
.sp-toast-tile { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.sp-toast-ok .sp-toast-tile { background: #10b98126; color: #34d399; }
.sp-toast-warn .sp-toast-tile { background: #f59e0b26; color: #fbbf24; }
.sp-toast-err .sp-toast-tile { background: #e11d4833; color: #fb7185; }
.sp-toast-info .sp-toast-tile { background: #6366f133; color: #a5b4fc; }
.sp-toast-body { flex: 1; min-width: 0; }
.sp-toast-title { font-size: 12px; font-weight: 800; }
.sp-toast-text { font-size: 11px; font-weight: 600; color: var(--sp-slate-300); line-height: 1.4; }
.sp-toast-action { border: none; background: #ffffff1a; color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; padding: 7px 10px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.sp-toast-x { border: none; background: none; color: var(--sp-slate-400); cursor: pointer; padding: 4px 6px; font-size: 12px; }

/* Secondary-screen back bar */
.sp-backbar { display: flex; align-items: center; gap: 8px; padding: 6px 16px 0; font-family: var(--sp-font); }
.sp-backbtn { width: 36px; height: 36px; border-radius: 12px; border: none; background: #fff; color: var(--sp-navy); cursor: pointer; font-size: 14px; }
.sp-backbar-title { font-size: 13px; font-weight: 700; color: var(--sp-slate-500); }

/* More screen */
.sp-page { padding: 4px 20px 0; font-family: var(--sp-font); color: var(--sp-navy); }
.sp-page-kicker { font-size: 13px; color: var(--sp-slate-500); font-weight: 600; }
.sp-page-title { margin: 2px 0 14px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--sp-navy); }
.sp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-tileitem {
    background: #fff; border-radius: 18px; border: none; padding: 14px 8px 12px; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sp-tileitem-icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.sp-tileitem-label { font-size: 12px; font-weight: 700; color: var(--sp-navy); }

/* Quick-add sheet actions */
/* Design: three cards side by side — icon tile on top, label + subtitle centred below */
.sp-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-bottom: 6px; }
.sp-quick-item { background: #fff; border: none; border-radius: 18px; padding: 16px 8px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; cursor: pointer; font-family: inherit; }
.sp-quick-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.sp-quick-label { font-size: 14px; font-weight: 800; color: var(--sp-navy); }
.sp-quick-sub { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; margin-top: 2px; }

/* Inline confirm (destructive actions) */
.sp-confirm { background: #fff1f2; border: 1px solid #fecdd3; border-radius: 14px; padding: 12px; margin-top: 8px; }
.sp-confirm-text { display: flex; gap: 8px; font-size: 12px; font-weight: 700; color: #9f1239; line-height: 1.45; }
.sp-confirm-btns { display: flex; gap: 8px; margin-top: 10px; }
.sp-confirm-btns button { flex: 1; height: 40px; border-radius: 12px; border: none; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; }
.sp-confirm-keep { background: #fff; color: var(--sp-slate-600); }
.sp-confirm-go { background: var(--sp-rose); color: #fff; }

/* ---------- Shared list / form pieces (Phase 2) ---------- */
.sp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sp-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 800; color: var(--sp-navy); letter-spacing: -.02em; }
.sp-head-kicker { font-size: 13px; color: var(--sp-slate-500); font-weight: 600; }
.sp-filterbtn { position: relative; width: 42px; height: 42px; border-radius: 14px; background: var(--sp-navy); border: none; color: #fff; cursor: pointer; flex-shrink: 0; }
.sp-filterbtn-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; border-radius: 999px; background: var(--sp-green); color: var(--sp-green-ink); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--sp-bg); padding: 0 3px; }
.sp-hero { background: var(--sp-navy); border-radius: 20px; padding: 16px 18px; color: #fff; margin-bottom: 12px; }
.sp-hero-label { font-size: 12px; color: var(--sp-slate-400); font-weight: 600; }
.sp-hero-value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.sp-hero-pills { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.sp-hero-pill { background: #ffffff14; color: var(--sp-slate-300); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
.sp-hero-pill.is-green { background: #10b98122; color: #34d399; }
.sp-search { display: flex; align-items: center; background: #fff; border-radius: 14px; margin-bottom: 10px; }
.sp-search i { padding: 10px 12px; color: var(--sp-slate-400); }
.sp-search input { flex: 1; min-width: 0; border: none; padding: 10px 12px 10px 0; font-size: 14px; outline: none; background: none; color: var(--sp-navy); font-family: inherit; color-scheme: light; }
.sp-pillrow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 12px; padding: 0 20px; }
.sp-pillrow::-webkit-scrollbar { display: none; }
.sp-pill { background: #fff; color: var(--sp-slate-600); font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap; border: none; font-family: inherit; }
.sp-pill.is-active { background: var(--sp-navy); color: #fff; }
.sp-activechips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.sp-activechip { display: inline-flex; align-items: center; gap: 6px; background: #10b98118; color: #047857; font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px; cursor: pointer; border: none; font-family: inherit; }
.sp-clearlink { font-size: 11px; font-weight: 700; color: var(--sp-slate-500); cursor: pointer; padding: 5px 4px; background: none; border: none; font-family: inherit; }
.sp-resultlabel { font-size: 12px; color: var(--sp-slate-400); font-weight: 600; margin: 0 4px 8px; }
.sp-group { margin-bottom: 12px; }
.sp-group-head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 6px; }
.sp-group-label { font-size: 11px; font-weight: 800; color: var(--sp-slate-500); text-transform: uppercase; letter-spacing: .06em; }
.sp-group-total { font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-listcard { background: #fff; border-radius: 18px; overflow: hidden; }
.sp-item + .sp-item { border-top: 1px solid var(--sp-slate-100); }
.sp-item-row { display: flex; align-items: center; gap: 11px; padding: 10px 13px; cursor: pointer; width: 100%; background: #fff; border: none; font-family: inherit; text-align: left; }
.sp-item-row.is-open { background: var(--sp-slate-50); }
.sp-cattile { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.sp-item-main { flex: 1; min-width: 0; }
.sp-item-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-item-title > span:first-child { font-weight: 700; font-size: 13px; color: var(--sp-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-item-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; min-width: 0; }
.sp-item-sub { font-size: 11px; color: var(--sp-slate-400); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-item-tags { color: #6366f1; font-weight: 700; }
.sp-paybadge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.sp-paybadge.is-cash { background: var(--sp-green-tint); color: var(--sp-green-700); }
.sp-paybadge.is-card { background: #dbeafe; color: #1d4ed8; }
.sp-paybadge.is-unlinked { background: #eef2ff; color: #4f46e5; }
.sp-sheetchip-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #4f46e5; color: #fff; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.sp-item-right { text-align: right; flex-shrink: 0; }
.sp-item-amount { font-weight: 800; font-size: 14px; color: var(--sp-navy); }
.sp-item-right-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; }
.sp-ownerchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 2px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.sp-ownerchip-dot { width: 14px; height: 14px; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.sp-minibadge { font-size: 10px; color: var(--sp-slate-400); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.sp-cfbtn { width: 22px; height: 22px; border-radius: 7px; background: #e0e7ff; color: var(--sp-indigo); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; flex-shrink: 0; border: none; }
.sp-cfbtn.is-open { background: var(--sp-indigo); color: #fff; }
.sp-rowactions { display: flex; gap: 6px; padding: 0 13px 10px 58px; background: var(--sp-slate-50); }
.sp-rowaction { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 9px; background: #fff; color: var(--sp-navy); font-size: 11px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; }
.sp-rowaction.is-indigo { color: #6366f1; }
.sp-rowaction.is-danger { background: var(--sp-rose-tint); color: var(--sp-rose); }
.sp-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 12px; }
.sp-more-btn { width: 100%; height: 48px; border: none; border-radius: 16px; background: #fff; color: var(--sp-navy); font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .3); font-family: inherit; }
.sp-empty { padding: 32px 16px; text-align: center; color: var(--sp-slate-400); background: #fff; border-radius: 18px; font-size: 13px; font-weight: 600; }
.sp-empty i { font-size: 26px; opacity: .5; margin-bottom: 8px; display: block; }

/* Inline sync-conflict compare panel */
.sp-cf { margin: 0 13px 10px; background: var(--sp-indigo-tint); border-radius: 14px; padding: 11px 12px; }
.sp-cf-head { display: flex; align-items: center; gap: 8px; }
.sp-cf-title { font-size: 12px; font-weight: 800; color: #312e81; }
.sp-cf-when { font-size: 11px; color: #6366f1; font-weight: 600; }
.sp-cf-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; }
.sp-cf-cols { margin-top: 10px; font-size: 10px; font-weight: 800; color: #6366f1; letter-spacing: .04em; }
.sp-cf-row { padding: 7px 0; border-top: 1px solid #e0e7ff; margin-top: 5px; }
.sp-cf-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cf-label { font-size: 11px; font-weight: 700; color: var(--sp-slate-500); }
.sp-cf-local { font-size: 12px; font-weight: 700; color: var(--sp-navy); }
.sp-cf-cloud { font-size: 12px; font-weight: 800; color: #4338ca; }
.sp-cf-btns { display: flex; gap: 6px; margin-top: 10px; }
.sp-cf-btns button { flex: 1; height: 36px; border: none; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sp-cf-keep { background: #fff; color: var(--sp-navy); }
.sp-cf-cloudbtn { background: var(--sp-indigo); color: #fff; font-weight: 800 !important; }

/* Sheet chips (filters) and radio options */
.sp-chipgrid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sp-sheetchip { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--sp-slate-600); font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 14px; cursor: pointer; border: none; font-family: inherit; }
.sp-sheetchip.is-active { background: var(--sp-navy); color: #fff; }
.sp-sheetchip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.sp-labelrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.sp-labelrow span:first-child { font-size: 12px; font-weight: 700; color: var(--sp-slate-500); text-transform: uppercase; letter-spacing: .06em; }
.sp-labelrow span + span { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; }
.sp-radio { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 11px 14px; cursor: pointer; border: 2px solid transparent; width: 100%; font-family: inherit; text-align: left; }
.sp-radio.is-on { border-color: var(--sp-green); }
.sp-radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--sp-slate-300); flex-shrink: 0; margin-left: auto; }
.sp-radio.is-on .sp-radio-dot { border: 6px solid var(--sp-green); }
.sp-delcard { background: #fff; border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sp-notebox { font-size: 12px; color: #b45309; background: #fef3c7; font-weight: 600; border-radius: 12px; padding: 9px 12px; margin-top: 8px; }
.sp-btn-danger { background: var(--sp-rose); color: #fff; }
.sp-btn-white { background: #fff; color: var(--sp-navy); }

/* Pinned save button — hides the dock while shown */
.sp-cta-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 960; width: min(400px, calc(100% - 40px)); }
.sp-cta { width: 100%; height: 54px; border: none; border-radius: 18px; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sp-font); background: var(--sp-green); color: var(--sp-green-ink); box-shadow: 0 16px 30px -10px #10b981aa; }
.sp-cta.is-dark { background: var(--sp-navy); color: #fff; box-shadow: 0 16px 30px -12px rgba(15, 23, 42, .5); }
.sp-cta:disabled { background: var(--sp-slate-300); color: #fff; box-shadow: none; cursor: default; }
body:has(.sp-cta-wrap:not(.is-above-dock)) .sp-dock { display: none; }

/* Add / edit expense form */
.sp-formhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-formhead h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--sp-navy); }
.sp-amounthero { background: var(--sp-navy); border-radius: 24px; padding: 20px; text-align: center; color: #fff; }
.sp-amounthero-row { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-top: 4px; line-height: 1.1; }
.sp-amounthero-sym { font-size: 32px; font-weight: 800; color: var(--sp-slate-500); }
.sp-amounthero input { width: 180px; max-width: 240px; min-width: 4ch; padding: 0; margin: 0; background: none; border: none; color: #fff; font-family: inherit; font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; outline: none; text-align: left; color-scheme: dark; -moz-appearance: textfield; }
.sp-amounthero input::placeholder { color: #475569; }
.sp-curchips { display: flex; justify-content: center; gap: 5px; margin-top: 12px; flex-wrap: wrap; }
.sp-curchip { background: #ffffff14; color: var(--sp-slate-300); font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; cursor: pointer; border: none; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; }
.sp-curchip.is-active { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-formlabel { margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--sp-slate-500); text-transform: uppercase; letter-spacing: .06em; }
.sp-catchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.sp-catchip { background: #fff; color: var(--sp-slate-600); font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 14px; display: flex; align-items: center; gap: 7px; cursor: pointer; border: none; font-family: inherit; }
.sp-catchip.is-active { background: var(--sp-navy); color: #fff; }
.sp-catchip.is-bad { box-shadow: inset 0 0 0 2px var(--sp-rose-ring); }
.sp-formcard { margin-top: 16px; background: #fff; border-radius: 18px; padding: 4px 16px; }
.sp-formrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; }
.sp-formrow + .sp-formrow, .sp-formrow + .sp-formblock, .sp-formblock + .sp-formrow { border-top: 1px solid var(--sp-slate-100); }
.sp-formrow > span:first-child { font-size: 14px; color: var(--sp-slate-500); font-weight: 600; white-space: nowrap; }
.sp-formrow.is-bad > span:first-child { color: var(--sp-rose); }
.sp-formrow input, .sp-formrow select { border: none; font-size: 14px; color: var(--sp-navy); font-weight: 700; text-align: right; background: none; outline: none; font-family: inherit; min-width: 0; color-scheme: light; }
.sp-formrow select { max-width: 190px; direction: ltr; }
.sp-formblock { padding: 11px 0; }
.sp-seg { background: #e2e8ef; border-radius: 14px; padding: 4px; display: flex; margin-top: 9px; }
.sp-seg > button { flex: 1; text-align: center; white-space: nowrap; font-size: 13px; font-weight: 700; padding: 9px 4px; border-radius: 11px; cursor: pointer; background: transparent; color: var(--sp-slate-500); border: none; font-family: inherit; }
.sp-seg > button.is-active { background: #fff; color: var(--sp-navy); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.sp-seg.is-light { background: var(--sp-slate-100); border-radius: 12px; padding: 3px; margin-top: 0; }
.sp-seg.is-light > button { font-size: 12px; padding: 8px 2px; border-radius: 9px; }
.sp-bankrows { background: #fff; border-radius: 16px; padding: 2px 14px; margin-top: 10px; }
.sp-bankrow { display: flex; align-items: center; gap: 11px; padding: 11px 0; cursor: pointer; width: 100%; background: none; border: none; font-family: inherit; text-align: left; }
.sp-bankrow + .sp-bankrow { border-top: 1px solid var(--sp-slate-100); }
.sp-badge-primary { font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: #10b98118; color: #047857; }
.sp-tiles2 { margin-top: 12px; display: flex; gap: 10px; }
.sp-toggletile { flex: 1; background: #fff; border-radius: 16px; padding: 13px; display: flex; align-items: center; gap: 9px; cursor: pointer; border: none; font-family: inherit; text-align: left; }
.sp-toggletile.is-on { box-shadow: 0 0 0 2px var(--sp-navy); }
.sp-panel { margin-top: 12px; background: #fff; border-radius: 20px; padding: 15px; }
.sp-panel-label { font-size: 12px; font-weight: 700; color: var(--sp-slate-500); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.sp-endtabs { display: flex; gap: 8px; }
.sp-endtab { flex: 1; text-align: center; font-size: 13px; font-weight: 700; padding: 9px 6px; border-radius: 12px; cursor: pointer; background: var(--sp-slate-100); color: var(--sp-slate-600); border: none; font-family: inherit; }
.sp-endtab.is-active { background: var(--sp-navy); color: #fff; }
.sp-infobox { margin-top: 12px; background: var(--sp-green-tint); border-radius: 14px; padding: 11px 13px; }
.sp-infobox-row { display: flex; align-items: center; gap: 9px; }
.sp-infobox-icon { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--sp-green-600); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.sp-infobox-kicker { font-size: 11px; font-weight: 700; color: var(--sp-green-600); }
.sp-infobox-value { font-size: 14px; font-weight: 800; color: var(--sp-navy); }
.sp-infobox-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-left: 41px; }
.sp-infobox-dates span { background: #fff; color: var(--sp-slate-600); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; }
.sp-infobox-foot { font-size: 11px; font-weight: 600; color: var(--sp-green-600); margin-top: 8px; padding-left: 41px; }
.sp-personchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; background: var(--sp-slate-100); color: var(--sp-slate-600); border: none; font-family: inherit; }
.sp-personchip.is-on { background: var(--sp-navy); color: #fff; }
.sp-personchip.is-fixed { cursor: default; }
.sp-personchip-av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: #fff; color: var(--sp-slate-500); }
.sp-personchip.is-on .sp-personchip-av { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-splitrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.sp-splitrow + .sp-splitrow { border-top: 1px solid var(--sp-slate-100); }
/* Per-share payment (Card / bank + account, or Cash) under each split participant. */
.sp-sharepay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 10px 40px; border-bottom: 1px solid var(--sp-slate-100); }
.sp-sharepay:last-child { border-bottom: none; }
.sp-sharepay-seg { flex: 0 0 auto; min-width: 170px; }
.sp-sharepay-seg > button { padding: 6px 8px; font-size: 11px; }
.sp-sharepay-seg > button i { margin-right: 5px; font-size: 10px; }
.sp-sharepay-acct { flex: 1 1 140px; min-width: 0; border: none; background: var(--sp-slate-50); border-radius: 10px; padding: 7px 9px; font-size: 12px; font-weight: 700; color: var(--sp-navy); font-family: inherit; color-scheme: light; }
.sp-splitinput { display: flex; align-items: center; background: var(--sp-slate-50); border-radius: 10px; padding: 0 9px; }
.sp-splitinput span { font-size: 12px; color: var(--sp-slate-400); font-weight: 700; }
.sp-splitinput input { width: 70px; border: none; background: none; padding: 8px 2px; font-size: 13px; font-weight: 800; color: var(--sp-navy); outline: none; text-align: right; font-family: inherit; color-scheme: light; }
.sp-splitsum { margin-top: 10px; border-radius: 14px; padding: 11px 13px; }
.sp-splitsum-bar { height: 6px; background: #ffffff99; border-radius: 999px; margin-top: 8px; overflow: hidden; }
.sp-tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--sp-slate-50); border-radius: 12px; padding: 7px 8px; }
.sp-tagchip { display: inline-flex; align-items: center; gap: 6px; background: var(--sp-navy); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 6px 5px 9px; border-radius: 9px; }
.sp-tagchip button { width: 16px; height: 16px; border-radius: 5px; background: rgba(255, 255, 255, .18); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; cursor: pointer; border: none; padding: 0; }
.sp-tagbox input { flex: 1; min-width: 90px; border: none; background: none; outline: none; font-size: 13px; font-weight: 600; color: var(--sp-navy); padding: 5px 2px; font-family: inherit; color-scheme: light; }
.sp-tagadd { font-size: 12px; font-weight: 800; color: #047857; background: #10b98122; padding: 5px 9px; border-radius: 9px; cursor: pointer; border: none; font-family: inherit; }
.sp-tagsugg { font-size: 12px; font-weight: 600; color: var(--sp-slate-600); background: #fff; border: 1px dashed var(--sp-slate-300); padding: 4px 9px; border-radius: 9px; cursor: pointer; font-family: inherit; }
.sp-saved { background: #fff; border-radius: 22px; text-align: center; padding: 40px 16px; }
.sp-saved i { font-size: 44px; color: var(--sp-green); margin-bottom: 12px; display: block; }
.sp-currow { display: flex; align-items: center; gap: 12px; padding: 11px 0; cursor: pointer; width: 100%; background: none; border: none; font-family: inherit; text-align: left; }
.sp-currow + .sp-currow { border-top: 1px solid var(--sp-slate-100); }
.sp-cursym { width: 36px; height: 36px; border-radius: 11px; background: var(--sp-slate-100); color: var(--sp-navy); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }

@media print {
    .sp-top, .sp-dock, .sp-toasts, .sp-backbar, .sp-cta-wrap { display: none !important; }
}

/* ---------- Summary (Phase 4) ---------- */
.sp-periodbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sp-periodseg { flex: 1; min-width: 0; background: #e2e8ef; }
.sp-periodseg > button { padding: 6px 2px; }
.sp-sumcatbtn { position: relative; width: 34px; height: 30px; border-radius: 10px; border: none; background: #fff; color: var(--sp-slate-600); cursor: pointer; flex-shrink: 0; font-size: 12px; }
.sp-sumcatbtn.is-active { background: var(--sp-navy); color: #fff; }
.sp-sumcatbtn .sp-filterbtn-count { top: -6px; right: -6px; min-width: 17px; height: 17px; font-size: 9px; }
.sp-rangechip { display: flex; align-items: center; gap: 8px; width: 100%; background: #fff; border: none; border-radius: 12px; padding: 8px 12px; margin: -4px 0 12px; cursor: pointer; font-family: inherit; text-align: left; }
.sp-rangechip > i:first-child { color: var(--sp-green); font-size: 12px; }
.sp-rangechip-label { flex: 1; font-size: 12px; font-weight: 800; color: var(--sp-navy); }
.sp-rangechip-count { font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-sumhero { border-radius: 22px; margin-bottom: 14px; }
.sp-sumhero .sp-hero-value { font-size: 28px; margin-top: 1px; }
.sp-sumhero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sp-sumhero-io { text-align: right; font-size: 11px; line-height: 1.7; font-weight: 700; white-space: nowrap; }
.sp-sumhero .sp-hero-pills { gap: 6px; }

.sp-attn { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 14px; padding: 0 20px; }
.sp-attn::-webkit-scrollbar { display: none; }
.sp-attn-item { flex-shrink: 0; display: flex; align-items: center; gap: 9px; border-radius: 14px; padding: 9px 12px; cursor: pointer; font-family: inherit; text-align: left; background: var(--sp-amber-tint); border: 1px solid var(--sp-amber-line); --attn-ink: var(--sp-amber); }
.sp-attn-item.is-over { background: #fef2f2; border-color: #fecaca; --attn-ink: var(--sp-rose); }
.sp-attn-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--attn-ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sp-attn-title { display: block; font-size: 12px; font-weight: 800; color: var(--sp-navy); white-space: nowrap; }
.sp-attn-sub { display: block; font-size: 11px; font-weight: 700; color: var(--attn-ink); white-space: nowrap; }

.sp-chartcard { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.sp-chartcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sp-chartcard-kicker { font-size: 11px; color: var(--sp-slate-400); font-weight: 800; letter-spacing: .04em; }
.sp-chartcard-range { font-size: 13px; color: var(--sp-slate-500); font-weight: 600; margin-top: 3px; }
.sp-miniseg { display: flex; background: var(--sp-slate-100); border-radius: 10px; padding: 3px; flex-shrink: 0; }
.sp-miniseg > button { background: transparent; color: var(--sp-slate-500); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 8px; cursor: pointer; border: none; font-family: inherit; }
.sp-miniseg > button.is-active { background: #fff; color: var(--sp-navy); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.sp-miniseg > button:disabled { color: var(--sp-slate-300); cursor: not-allowed; }
.sp-bars { display: flex; align-items: flex-end; margin-top: 16px; min-height: 130px; }
.sp-bars-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.sp-bars-pair { display: flex; align-items: flex-end; }
.sp-bars-bar { display: flex; flex-direction: column; align-items: center; }
.sp-bars-bar > span { font-size: 8px; font-weight: 800; margin-bottom: 2px; white-space: nowrap; }
.sp-bars-bar > div { border-radius: 4px; }
.sp-bars-label { color: var(--sp-slate-400); margin-top: 5px; font-weight: 600; white-space: nowrap; letter-spacing: -.02em; }
.sp-bars-sub { font-size: 9px; color: var(--sp-slate-400); font-weight: 600; white-space: nowrap; }
.sp-legend { display: flex; gap: 11px; margin-top: 12px; flex-wrap: wrap; align-items: center; font-size: 10px; }
.sp-legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--sp-slate-500); font-weight: 600; }
.sp-legend-item > span { width: 8px; height: 8px; border-radius: 3px; }
.sp-legend-sep { width: 1px; height: 10px; background: var(--sp-slate-200); }
.sp-legend-kicker { color: var(--sp-slate-400); font-weight: 700; }
.sp-chartnote { margin-top: 10px; background: var(--sp-slate-50); border-radius: 10px; padding: 8px 10px; display: flex; align-items: center; gap: 7px; }
.sp-chartnote > i { color: var(--sp-slate-400); font-size: 11px; }
.sp-chartnote > span { flex: 1; font-size: 11px; color: var(--sp-slate-500); font-weight: 600; }
.sp-chartnote > button { font-size: 11px; font-weight: 800; color: var(--sp-green); background: none; border: none; cursor: pointer; white-space: nowrap; font-family: inherit; padding: 0; }

.sp-pcard { background: #fff; border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.sp-pcard-head { display: block; width: 100%; padding: 13px 15px; cursor: pointer; background: none; border: none; text-align: left; font-family: inherit; color: inherit; }
.sp-pcard-titlerow { display: flex; align-items: baseline; gap: 6px; }
.sp-pcard-title { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-pcard-sub { font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-pcard-titlerow > i { margin-left: auto; color: var(--sp-slate-300); font-size: 12px; align-self: center; }
.sp-pcard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.sp-pcard-k { font-size: 10px; font-weight: 700; color: var(--sp-slate-400); letter-spacing: .04em; }
.sp-pcard-v { font-size: 14px; font-weight: 800; color: #334155; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pcard-rate { font-size: 10px; font-weight: 700; }
.sp-pcard-budget { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sp-pcard-budget > span { font-size: 10px; font-weight: 700; color: var(--sp-slate-400); white-space: nowrap; }
.sp-bar { flex: 1; display: block; height: 5px; background: var(--sp-slate-100); border-radius: 999px; overflow: hidden; }
.sp-bar.is-thin { height: 4px; background: #eef2f6; }
.sp-bar > div, .sp-bar > span { display: block; height: 100%; border-radius: 999px; }
.sp-tree { background: var(--sp-slate-50); border-top: 1px solid var(--sp-slate-100); padding: 6px 12px 10px; }
.sp-tree-empty { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); padding: 10px 2px 2px; }
.sp-tree-cat { background: #fff; border-radius: 14px; margin-top: 6px; overflow: hidden; }
.sp-tree-cathead { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px; cursor: pointer; background: none; border: none; text-align: left; font-family: inherit; color: inherit; }
.sp-tree-icon { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.sp-tree-main { flex: 1; min-width: 0; display: block; }
.sp-tree-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sp-tree-name { font-size: 13px; font-weight: 700; color: var(--sp-navy); }
.sp-tree-amt { font-size: 12px; font-weight: 700; color: var(--sp-navy); white-space: nowrap; }
.sp-tree-barrow { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sp-tree-pct { font-size: 10px; font-weight: 700; width: 32px; text-align: right; flex-shrink: 0; }
.sp-tree-left { display: block; font-size: 10px; font-weight: 700; margin-top: 5px; }
.sp-tree-chev { color: var(--sp-slate-300); font-size: 11px; flex-shrink: 0; align-self: center; }
.sp-tree-subs { padding: 0 12px 8px 52px; border-top: 1px solid var(--sp-slate-100); }
.sp-tree-sub { padding: 8px 0; border-bottom: 1px solid var(--sp-slate-100); }
.sp-tree-sub:last-child { border-bottom: none; }
.sp-tree-subname { font-size: 12px; font-weight: 600; color: #334155; }
.sp-tree-subamt { font-size: 11px; font-weight: 700; color: var(--sp-slate-600); white-space: nowrap; }
.sp-tree-sub .sp-tree-barrow { margin-top: 5px; }

.sp-rangepresets { display: flex; gap: 6px; margin-bottom: 12px; }
.sp-rangepresets > button { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 8px 4px; border-radius: 11px; cursor: pointer; background: #fff; color: var(--sp-slate-600); border: none; font-family: inherit; }
.sp-rangepresets > button.is-active { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-rangeends { display: flex; gap: 8px; margin-bottom: 12px; }
.sp-rangeends > button { flex: 1; border-radius: 16px; padding: 10px 13px; cursor: pointer; background: #fff; color: var(--sp-navy); border: none; text-align: left; font-family: inherit; font-size: 16px; font-weight: 800; }
.sp-rangeends > button > span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--sp-slate-400); margin-bottom: 2px; }
.sp-rangeends > button.is-active { background: var(--sp-navy); color: #fff; }
.sp-rangeends > button.is-active > span { color: #34d399; }
.sp-rangecal { background: #fff; border-radius: 18px; padding: 12px; }
.sp-rangecal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sp-rangecal-head > span { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-rangecal-head > button { width: 32px; height: 32px; border-radius: 10px; background: var(--sp-slate-100); color: var(--sp-navy); border: none; cursor: pointer; font-size: 11px; }
.sp-rangecal-head > button:disabled { color: var(--sp-slate-300); cursor: default; }
.sp-rangecal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sp-rangecal-grid > button { text-align: center; padding: 10px 0; border-radius: 11px; font-size: 13px; font-weight: 700; cursor: pointer; background: var(--sp-slate-50); color: #334155; border: none; font-family: inherit; }
.sp-rangecal-grid > button.is-inside { background: #10b98122; color: #047857; }
.sp-rangecal-grid > button.is-edge { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-rangecal-grid > button:disabled { color: var(--sp-slate-300); cursor: default; }
.sp-sheet-reset { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--sp-rose); background: none; border: none; cursor: pointer; padding: 2px 0; font-family: inherit; align-self: center; }
.sp-rangesum { font-size: 12px; color: var(--sp-slate-500); font-weight: 700; text-align: center; margin-top: 10px; }

/* Transfer / reconciliation tables kept from the old Summary until the Accounts phase. */
.sp-mm { background: #fff; border-radius: 18px; margin: 4px 0 14px; overflow: hidden; }
.sp-mm-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; }
.sp-mm-head > i { color: var(--sp-slate-300); font-size: 12px; }
.sp-mm-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--sp-indigo-tint); color: var(--sp-indigo); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.sp-mm-main { flex: 1; min-width: 0; }
.sp-mm-title { display: block; font-size: 14px; font-weight: 800; color: var(--sp-navy); }
.sp-mm-sub { display: block; font-size: 11px; font-weight: 600; color: var(--sp-slate-400); }
.sp-mm-body { padding: 0 14px 12px; border-top: 1px solid var(--sp-slate-100); }
.sp-mm-body h5 { font-size: 13px; font-weight: 800; color: var(--sp-navy); margin: 12px 0 6px; }
.sp-mm-body > div:first-child { margin-top: 0 !important; }

/* ---------- Scheduled (Phase 5) ---------- */
.sp-cta-wrap.is-above-dock { bottom: 96px; }
.sp-sched { padding-bottom: 90px; }
.sp-stattiles { display: flex; gap: 10px; margin-bottom: 12px; }
.sp-stattile { flex: 1; min-width: 0; background: #fff; border-radius: 16px; padding: 13px 14px; }
.sp-stattile-head { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; color: var(--sp-slate-500); letter-spacing: .04em; white-space: nowrap; }
.sp-stattile-head > span { width: 24px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.sp-stattile-value { font-size: 20px; font-weight: 800; color: var(--sp-navy); margin-top: 7px; }
.sp-stattile-sub { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; }

.sp-schedcard { background: #fff; border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.sp-schedrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; cursor: pointer; background: none; border: none; text-align: left; font-family: inherit; color: inherit; }
.sp-schedicon { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sp-schedmain { flex: 1; min-width: 0; display: block; }
.sp-schedtitle { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-schedtitle > span:first-child { font-size: 14px; font-weight: 700; color: var(--sp-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-schedmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--sp-slate-400); margin-top: 3px; }
.sp-schedremind { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; color: #6366f1; font-size: 11px; font-weight: 700; }
.sp-schedremind i { font-size: 10px; }
.sp-schedend { display: block; font-size: 11px; font-weight: 700; color: var(--sp-slate-400); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-schedright { text-align: right; flex-shrink: 0; display: block; }
.sp-schedamt { display: block; font-size: 15px; font-weight: 800; color: var(--sp-navy); white-space: nowrap; }
.sp-schedsub { display: block; font-size: 11px; color: var(--sp-slate-400); font-weight: 600; margin-top: 3px; }
.sp-schedopen { background: var(--sp-slate-50); border-top: 1px solid var(--sp-slate-100); padding: 6px 8px 8px; }
.sp-schednote { font-size: 12px; font-weight: 600; color: var(--sp-slate-500); padding: 6px 8px 2px; }
.sp-kindtag { display: inline-flex; align-items: center; font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; flex-shrink: 0; white-space: nowrap; }
.sp-kindtag.is-paused { background: var(--sp-slate-100); color: var(--sp-slate-500); }

.sp-actbar { display: flex; gap: 2px; }
.sp-actbar-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 0 7px; border-radius: 12px; cursor: pointer; background: none; border: none; font-family: inherit; }
.sp-actbar-item:hover { background: #fff; }
.sp-actbar-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.sp-actbar-icon.is-green { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-actbar-icon.is-slate { background: var(--sp-slate-100); color: var(--sp-navy); }
.sp-actbar-icon.is-amber { background: #fef3c7; color: #b45309; }
.sp-actbar-icon.is-blue { background: #dbeafe; color: #1d4ed8; }
.sp-actbar-icon.is-rose { background: var(--sp-rose-tint); color: var(--sp-rose); }
.sp-actbar-label { font-size: 10px; font-weight: 700; color: var(--sp-slate-600); white-space: nowrap; }

.sp-debtpills { display: flex; gap: 8px; margin-bottom: 12px; }
.sp-debtpills > button { flex: 1; min-width: 0; text-align: center; font-size: 12px; font-weight: 700; padding: 9px 6px; border-radius: 12px; cursor: pointer; background: #fff; color: var(--sp-slate-600); border: none; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-debtpills > button.is-active { background: var(--sp-navy); color: #fff; }
.sp-showsettled { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 4px 0 10px; padding: 9px; border-radius: 12px; border: none; background: none; color: var(--sp-slate-500); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sp-showsettled i { font-size: 10px; }

.sp-sheethead { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.sp-sheethead-icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.sp-sheethead-sub { font-size: 12px; color: var(--sp-slate-500); font-weight: 600; }
.sp-sheet-q { font-size: 13px; font-weight: 700; color: var(--sp-navy); margin: 2px 2px 10px; }
.sp-sheet-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sp-sheet-actions .sp-btn { height: 50px; font-size: 14px; gap: 8px; }
.sp-sheet-actions .sp-btn-row .sp-btn { flex: 1; }
.sp-formrow > b { font-size: 14px; font-weight: 700; color: var(--sp-navy); text-align: right; }
.sp-formblock-label { font-size: 14px; color: var(--sp-slate-500); font-weight: 600; }
.sp-moneyin { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-moneyin > span { color: var(--sp-slate-400); font-weight: 800; font-size: 15px; }
.sp-moneyin input { width: 110px; font-size: 16px !important; font-weight: 800 !important; }
.sp-rowpick { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; font-size: 14px; font-weight: 800; color: var(--sp-navy); cursor: pointer; font-family: inherit; padding: 0; }
.sp-rowpick i { font-size: 11px; }
.sp-lockedval { display: inline-flex; align-items: center; gap: 8px; }
.sp-lockedval > i { color: var(--sp-slate-300); font-size: 11px; }
.sp-remind-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sp-remind-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--sp-navy); }
.sp-remind-head > span:first-child i { color: #6366f1; }
.sp-remind-when { font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-remind-chips { display: flex; gap: 6px; margin-top: 10px; }
.sp-remind-chips > button { flex: 1; min-width: 0; padding: 9px 0; border-radius: 12px; background: var(--sp-slate-50); border: 1px solid var(--sp-slate-200); color: var(--sp-slate-600); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sp-remind-chips > button.is-active { background: var(--sp-indigo-tint); border-color: #a5b4fc; color: var(--sp-indigo); }

/* ---------- Categories (Phase 6) ---------- */
.sp-cathero { border-radius: 22px; padding: 18px; margin-bottom: 12px; }
.sp-cathero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sp-cathero-cur { display: inline-flex; align-items: center; gap: 5px; background: #ffffff14; color: var(--sp-slate-300); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.sp-cathero-cur i { font-size: 9px; }
.sp-cathero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.sp-cathero-foot > span { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; line-height: 1.45; }
.sp-cathero-reset { display: inline-flex; align-items: center; gap: 6px; background: #e11d4826; color: #fb7185; border: none; border-radius: 10px; padding: 7px 11px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; white-space: nowrap; }
.sp-cathero-confirm { margin-top: 12px; background: #ffffff10; border: 1px solid #fb718555; border-radius: 14px; padding: 11px 12px; }
.sp-cathero-confirm-title { font-size: 13px; font-weight: 800; color: #fff; }
.sp-cathero-confirm-text { font-size: 11px; font-weight: 600; color: var(--sp-slate-300); margin-top: 3px; line-height: 1.45; }
.sp-cathero-confirm .sp-btn-row .sp-btn { flex: 1; }

.sp-catcard { background: #fff; border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.sp-catrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; cursor: pointer; background: none; border: none; text-align: left; font-family: inherit; color: inherit; }
.sp-catchev { color: var(--sp-slate-300); font-size: 12px; flex-shrink: 0; }
.sp-catopen { background: var(--sp-slate-50); border-top: 1px solid var(--sp-slate-100); padding: 4px 12px 12px; }
.sp-catlabel { font-size: 11px; font-weight: 800; color: var(--sp-slate-500); letter-spacing: .06em; text-transform: uppercase; margin: 12px 2px 8px; }
.sp-catbox { background: #fff; border-radius: 14px; padding: 12px; }
.sp-catbox-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-catbox-row > span { font-size: 13px; font-weight: 600; color: var(--sp-slate-500); }
.sp-catbox-row > b { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-budgetin { display: inline-flex; align-items: center; gap: 4px; background: var(--sp-slate-100); border-radius: 10px; padding: 6px 10px; flex-shrink: 0; }
.sp-budgetin > span { color: var(--sp-slate-400); font-weight: 800; font-size: 13px; }
.sp-budgetin input { width: 52px; border: none; background: transparent; outline: none; text-align: right; font-size: 14px; font-weight: 800; color: var(--sp-navy); font-family: inherit; color-scheme: light; }
.sp-budgetin input:disabled { color: var(--sp-slate-400); }

.sp-sublist { background: #fff; border-radius: 14px; padding: 2px 12px 10px; }
.sp-subrow { padding: 9px 0; border-bottom: 1px solid var(--sp-slate-100); }
.sp-subrow .sp-confirm { margin-top: 8px; }
.sp-subview { display: flex; align-items: center; gap: 8px; }
.sp-subname { flex: 1; min-width: 0; }
.sp-subname > div { font-size: 14px; font-weight: 700; color: var(--sp-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-subname > span { font-size: 11px; font-weight: 600; color: var(--sp-slate-400); }
.sp-subbtn { width: 32px; height: 32px; border-radius: 10px; border: none; background: var(--sp-slate-100); color: var(--sp-navy); cursor: pointer; font-size: 12px; flex-shrink: 0; }
.sp-subbtn.is-danger { color: var(--sp-rose); }
.sp-subedit { display: flex; align-items: center; gap: 6px; }
.sp-subedit input { flex: 1; min-width: 0; border: 1px solid var(--sp-slate-200); border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 700; color: var(--sp-navy); font-family: inherit; outline: none; background: #fff; color-scheme: light; }
.sp-subedit button { border: none; border-radius: 10px; padding: 8px 10px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; }
.sp-subedit-cancel { background: var(--sp-slate-100); color: var(--sp-slate-600); }
.sp-subedit-save { background: var(--sp-green); color: var(--sp-green-ink); }
.sp-subadd { display: flex; gap: 8px; margin-top: 10px; }
.sp-subadd input { flex: 1; min-width: 0; border: none; background: var(--sp-slate-50); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--sp-navy); font-family: inherit; outline: none; color-scheme: light; }
.sp-subadd button { border: none; background: var(--sp-navy); color: #fff; border-radius: 12px; padding: 0 14px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; }
.sp-subadd-card { background: #fff; border-radius: 16px; padding: 4px 12px 12px; }
.sp-subadd-card .sp-subadd { margin-top: 8px; }
.sp-subchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sp-subchips > span { display: inline-flex; align-items: center; gap: 6px; background: var(--sp-slate-100); color: var(--sp-navy); font-size: 12px; font-weight: 700; padding: 5px 6px 5px 10px; border-radius: 999px; }
.sp-subchips button { border: none; background: none; color: var(--sp-slate-400); cursor: pointer; font-size: 10px; padding: 0 2px; }
.sp-suberror { font-size: 11px; font-weight: 700; color: var(--sp-rose); margin-top: 6px; }
.sp-blocked { display: flex; gap: 7px; align-items: flex-start; background: var(--sp-slate-100); color: var(--sp-slate-600); font-size: 11px; font-weight: 600; border-radius: 10px; padding: 8px 10px; margin-top: 8px; line-height: 1.45; }
.sp-blocked i { margin-top: 2px; color: var(--sp-slate-400); }
.sp-icongrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; background: #fff; border-radius: 16px; padding: 10px; margin-top: 8px; }
.sp-icongrid > button { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.sp-icongrid > button.is-active { border-color: var(--sp-navy); }
.sp-catpage { padding-bottom: 90px; }
.sp-subview .sp-budgetin { padding: 6px 8px; }

/* ---------- Goals (Phase 7) ---------- */
.sp-goalspage { padding-bottom: 90px; }
.sp-goalform { background: #fff; border-radius: 20px; padding: 14px 16px 16px; margin-bottom: 14px; }
.sp-goalform-title { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-goalform .sp-formrow + .sp-formrow, .sp-goalform .sp-formrow + .sp-formblock, .sp-goalform .sp-formblock + .sp-formrow { border-top: 1px solid var(--sp-slate-100); }
.sp-formrow-hint { display: block; font-size: 11px; font-weight: 600; color: var(--sp-slate-400); white-space: normal; }
.sp-curchips.is-light { justify-content: flex-end; margin-top: 0; }
.sp-curchips.is-light .sp-curchip { background: var(--sp-slate-100); color: var(--sp-slate-600); }
.sp-curchips.is-light .sp-curchip.is-active { background: var(--sp-navy); color: #fff; }
.sp-goalcard { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.sp-goalhead { display: flex; align-items: center; gap: 12px; }
.sp-goalemoji { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.sp-goalmain { flex: 1; min-width: 0; }
.sp-goalamts { font-size: 13px; font-weight: 700; color: var(--sp-slate-400); margin-top: 2px; }
.sp-goalbadges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; align-self: flex-start; }
.sp-goalcur { background: var(--sp-slate-50); color: var(--sp-navy); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; }
.sp-goalpct { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; }
.sp-goalmeta { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); margin-top: 8px; }
.sp-goalnote { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; font-weight: 600; color: var(--sp-slate-500); margin-top: 6px; line-height: 1.4; }
.sp-goalnote i { color: var(--sp-slate-400); margin-top: 2px; font-size: 10px; }
.sp-goalactions { display: flex; gap: 6px; margin-top: 12px; }
.sp-goalactions input { flex: 1; min-width: 0; border: none; background: var(--sp-slate-50); border-radius: 12px; padding: 0 10px; height: 42px; font-size: 13px; font-weight: 600; color: var(--sp-navy); font-family: inherit; outline: none; color-scheme: light; }
.sp-goaladd { border: none; color: #fff; border-radius: 12px; padding: 0 14px; height: 42px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; }

/* ---------- Net Worth (Phase 8) ---------- */
.sp-nwpage { padding-bottom: 40px; }
.sp-nwhero { background: linear-gradient(135deg, #0f172a, #1e293b); border-radius: 22px; padding: 18px; color: #fff; margin-bottom: 12px; }
.sp-nwhero-label { font-size: 12px; color: var(--sp-slate-400); font-weight: 600; margin-bottom: 4px; }
.sp-nwhero-empty { font-size: 13px; color: var(--sp-slate-300); font-weight: 600; padding: 8px 0 12px; }
.sp-nwhero-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.sp-nwhero-row.is-wallet { border-top: 1px solid #ffffff1a; margin-top: 6px; padding-top: 14px; }
.sp-nwhero-cc { width: 34px; height: 34px; border-radius: 11px; background: #ffffff14; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
/* Country row: always two lines (name / ▲▼), code tile and net total span both. */
.sp-nwhero-crow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 11px; row-gap: 3px; align-items: center; padding: 10px 0; }
.sp-nwhero-crow + .sp-nwhero-crow { border-top: 1px solid rgba(148, 163, 184, .2); }
.sp-nwhero-crow .sp-nwhero-cc { grid-row: 1 / span 2; }
.sp-nwhero-crow .sp-nwhero-name { font-size: 13px; font-weight: 700; }
.sp-nwhero-crow .sp-nwhero-val { grid-row: 1 / span 2; grid-column: 3; font-size: 19px; letter-spacing: -.02em; }
.sp-nwhero-crow .sp-nwhero-sub { grid-column: 2; flex-wrap: nowrap; gap: 8px; font-size: 10px; margin-top: 0; white-space: nowrap; overflow: hidden; }
.sp-nwhero-wallet { margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(148, 163, 184, .2); }
.sp-nwhero-walhead { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0; background: none; border: none; color: inherit; font-family: inherit; cursor: pointer; text-align: left; }
.sp-nwhero-walname { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; }
.sp-nwhero-walval { font-size: 17px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.sp-nwhero-walrows { margin: 10px 0 0 45px; display: flex; flex-direction: column; gap: 6px; }
.sp-nwhero-walrows > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; }
.sp-nwhero-walrows span { color: var(--sp-slate-400); }
.sp-nwhero-walrows b { font-weight: 800; white-space: nowrap; }
.sp-nwhero-main { flex: 1; min-width: 0; }
.sp-nwhero-name { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-nwhero-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; font-weight: 700; margin-top: 2px; }
.sp-nwhero-val { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin-left: auto; text-align: right; white-space: nowrap; flex-shrink: 0; }
.sp-nwhero-note { display: flex; gap: 6px; align-items: flex-start; font-size: 10px; color: var(--sp-slate-400); font-weight: 600; margin-top: 8px; }
.sp-nwgroup { background: #fff; border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.sp-nwgroup-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 15px 10px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.sp-nwchev { width: 32px; height: 32px; border-radius: 10px; background: var(--sp-slate-50); color: var(--sp-slate-400); display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.sp-nwtotals { margin: 0 15px 14px; background: var(--sp-slate-50); border-radius: 12px; padding: 4px 12px; }
.sp-nwtotals > div { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; }
.sp-nwtotals > div + div { border-top: 1px solid var(--sp-slate-100); }
.sp-nwtotals b { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-nwcc { font-size: 10px; font-weight: 800; color: var(--sp-slate-500); border: 1px solid var(--sp-slate-200); background: #fff; border-radius: 7px; padding: 2px 6px; }
.sp-nwitems { border-top: 1px solid var(--sp-slate-100); padding: 0 15px; }
.sp-nwitem + .sp-nwitem { border-top: 1px solid var(--sp-slate-100); }
.sp-nwitem-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.sp-nwitem-main { flex: 1; min-width: 0; display: block; }
.sp-nwitem-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-nwitem-row .sp-schedright { display: flex; flex-direction: column; align-items: flex-end; }
.sp-nwitem-open { padding: 0 0 12px; }
.sp-nwnote { background: var(--sp-slate-50); border-radius: 10px; padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--sp-slate-600); margin-bottom: 8px; }
.sp-nwdetail { font-size: 12px; font-weight: 600; color: var(--sp-slate-500); line-height: 1.55; margin-bottom: 8px; }
.sp-nwdetail b { color: var(--sp-navy); font-weight: 800; }
.sp-nwitem-open .sp-actbar { background: var(--sp-slate-50); border-radius: 12px; padding: 4px; }
.sp-nwtiles { display: flex; gap: 8px; margin-top: 12px; }
.sp-nwtiles > div { flex: 1; min-width: 0; background: #fff; border-radius: 14px; padding: 10px 12px; }
.sp-nwtiles span { display: block; font-size: 11px; font-weight: 700; color: var(--sp-slate-500); }
.sp-nwtiles b { display: block; font-size: 15px; font-weight: 800; color: var(--sp-navy); margin-top: 2px; }
.sp-fullselect { width: 100%; margin-top: 8px; border: 1px solid var(--sp-slate-200); border-radius: 12px; background: var(--sp-slate-50); padding: 11px 12px; font-size: 14px; font-weight: 700; color: var(--sp-navy); font-family: inherit; color-scheme: light; }
.sp-toggleline { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 16px; padding: 12px 14px; margin-top: 12px; }
.sp-linkbtn { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--sp-green-link); font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; padding: 2px 4px 6px; }
.sp-nwitem-metaline { display: block; font-size: 12px; font-weight: 600; color: var(--sp-slate-400); margin-top: 3px; }
.sp-nwitem-main .sp-schedtitle .sp-ownerchip { flex-shrink: 0; }
.sp-schedpay { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--sp-slate-500); margin-top: 3px; }
.sp-schedpay i { font-size: 10px; color: var(--sp-slate-400); }

/* ---------- Accounts (Phase 9) ---------- */
.sp-acctpage { padding-bottom: 90px; }
.sp-acctform-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sp-checkrow { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--sp-slate-50); border: none; border-radius: 14px; padding: 12px; margin-top: 10px; cursor: pointer; text-align: left; font-family: inherit; }
.sp-checkbox { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--sp-slate-300); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 11px; }
.sp-checkbox.is-on { background: var(--sp-green); border-color: var(--sp-green); }
.sp-checkbox.is-on.is-danger { background: var(--sp-rose); border-color: var(--sp-rose); }
.sp-acctlist { background: #fff; border-radius: 18px; padding: 0 15px; }
.sp-acctitem + .sp-acctitem { border-top: 1px solid var(--sp-slate-100); }
.sp-acctrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.sp-setprimary { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--sp-green-600); cursor: pointer; }
.sp-mvcard { background: #fff; border-radius: 18px; padding: 12px 15px; margin-bottom: 10px; }
.sp-mvcard-head { display: flex; align-items: center; gap: 10px; }
.sp-mvcard-title { flex: 1; font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-mvcard-total { font-size: 14px; font-weight: 800; color: var(--sp-navy); white-space: nowrap; }
.sp-mvrows { border-top: 1px solid var(--sp-slate-100); margin-top: 10px; }
.sp-mvrow { padding: 10px 0; }
.sp-mvrow + .sp-mvrow { border-top: 1px solid var(--sp-slate-100); }
.sp-mvrow .sp-confirm { margin-top: 8px; }
.sp-mvrow-line { display: flex; align-items: center; gap: 8px; }
.sp-mvrow-main { flex: 1; min-width: 0; }
.sp-mvrow-meta { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); margin-top: 2px; }
.sp-mvrow-amt { font-size: 14px; font-weight: 800; color: var(--sp-slate-600); white-space: nowrap; }
.sp-mvrow-btn { width: 30px; height: 30px; border: none; background: none; color: var(--sp-slate-300); cursor: pointer; border-radius: 8px; font-size: 12px; flex-shrink: 0; }
.sp-mvrow-btn:hover { background: var(--sp-slate-50); color: var(--sp-slate-500); }
.sp-xferbox { background: #fff; border-radius: 18px; padding: 12px 14px; margin-top: 10px; }
.sp-xferbox-k { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--sp-slate-400); }
.sp-xferbox-from { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--sp-navy); }
.sp-xferbox-from b { font-weight: 800; }
.sp-xferbox-arrow { display: flex; justify-content: center; color: var(--sp-slate-300); padding: 8px 0 6px; font-size: 12px; }
.sp-moneyin select { font-size: 12px !important; font-weight: 700; color: var(--sp-slate-500); max-width: 72px; }

/* ---- Phase 10: Bulk Upload ---- */
.sp-drop { background: #fff; border: 2px dashed var(--sp-slate-300); border-radius: 22px; padding: 22px 16px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.sp-drop.is-over { border-color: var(--sp-green); background: var(--sp-green-tint); }
.sp-drop.is-busy { opacity: .6; cursor: default; }
.sp-drop-tile { width: 52px; height: 52px; border-radius: 16px; background: var(--sp-green-tint); color: var(--sp-green-700); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px; }
.sp-drop-title { font-size: 15px; font-weight: 800; color: var(--sp-navy); word-break: break-word; }
.sp-drop-sub { font-size: 12px; font-weight: 600; color: var(--sp-slate-400); margin-top: 2px; }
.sp-drop-link { border: none; background: none; color: var(--sp-green); font-weight: 800; font-size: 13px; margin-top: 12px; cursor: pointer; font-family: inherit; display: inline-flex; gap: 6px; align-items: center; }
.sp-drop-cols { font-size: 11px; font-weight: 600; color: var(--sp-slate-400); margin-top: 6px; line-height: 1.45; }
.sp-up-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 16px 4px 10px; }
.sp-up-pills { display: flex; gap: 6px; }
.sp-up-pills > button { border: none; background: #fff; color: var(--sp-slate-500); font-weight: 700; font-size: 12px; padding: 6px 11px; border-radius: 10px; cursor: pointer; font-family: inherit; }
.sp-up-pills > button.is-on { background: var(--sp-navy); color: #fff; }
.sp-up-pills > button:disabled { opacity: .5; cursor: default; }
.sp-up-errdl { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff1f2; border: 1.5px dashed var(--sp-rose-ring); border-radius: 16px; padding: 11px 14px; margin-bottom: 10px; cursor: pointer; font-family: inherit; }
.sp-up-errdl-title { display: block; font-size: 13px; font-weight: 800; color: var(--sp-rose-700); }
.sp-up-errdl-sub { display: block; font-size: 11px; font-weight: 600; color: var(--sp-rose); }
.sp-up-row { display: flex; align-items: center; gap: 11px; background: #fff; border-radius: 16px; padding: 11px 14px; margin-bottom: 8px; }
.sp-up-row.is-bad { background: #fff1f2; }
.sp-up-row.is-skip { background: var(--sp-slate-100); }
.sp-up-icon { font-size: 17px; flex-shrink: 0; }
.sp-up-row.is-ok .sp-up-icon, .sp-up-row.is-ok .sp-up-status { color: var(--sp-green-700); }
.sp-up-row.is-bad .sp-up-icon, .sp-up-row.is-bad .sp-up-status { color: var(--sp-rose); }
.sp-up-row.is-skip .sp-up-icon, .sp-up-row.is-skip .sp-up-status { color: var(--sp-slate-500); }
.sp-up-status { font-size: 12px; font-weight: 800; text-align: right; flex-shrink: 0; max-width: 42%; }
.sp-up-errtext { font-size: 11px; font-weight: 700; color: var(--sp-rose-700); margin-top: 2px; line-height: 1.4; }
.sp-up-pager { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--sp-slate-500); margin: 6px 2px 0; }
.sp-up-pager > button { border: none; background: #fff; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 12px; color: var(--sp-navy); cursor: pointer; font-family: inherit; display: inline-flex; gap: 6px; align-items: center; }
.sp-up-pager > button:disabled { opacity: .45; cursor: default; }

/* ---- Phase 10: Export ---- */
.sp-ex-formats { display: flex; gap: 10px; }
.sp-ex-format { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 2px solid transparent; border-radius: 18px; padding: 14px; cursor: pointer; font-family: inherit; text-align: left; }
.sp-ex-format.is-on { border-color: var(--sp-green); }
.sp-ex-format .sp-tile { margin-bottom: 10px; }
.sp-ex-format-title { font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-ex-list { padding: 2px 14px; }
.sp-ex-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; min-height: 50px; border: none; background: none; text-align: left; cursor: pointer; font-family: inherit; }
.sp-ex-opt + .sp-ex-opt { border-top: 1px solid var(--sp-slate-100); }
.sp-ex-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sp-slate-300); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: transparent; }
.sp-ex-opt.is-on .sp-ex-check { background: var(--sp-green); border-color: var(--sp-green); color: #fff; }
.sp-ex-dates { display: flex; gap: 10px; padding: 4px 0 12px; border-top: 1px solid var(--sp-slate-100); padding-top: 10px; }
.sp-ex-dates > label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; color: var(--sp-slate-500); text-transform: uppercase; letter-spacing: .04em; }
.sp-ex-dates input { border: none; background: var(--sp-slate-100); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700; color: var(--sp-navy); font-family: inherit; min-width: 0; width: 100%; color-scheme: light; }
.sp-ex-note { font-size: 11px; font-weight: 600; color: var(--sp-slate-400); margin: -4px 4px 12px; line-height: 1.45; }
.sp-ex-summary { display: flex; align-items: center; gap: 10px; background: var(--sp-navy); color: #e2e8f0; border-radius: 14px; padding: 13px 16px; font-size: 13px; font-weight: 700; margin-top: 12px; }
.sp-ex-summary > i { color: #34d399; font-size: 16px; }
.sp-ex-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 970; width: min(400px, calc(100% - 40px)); }
.sp-uppage, .sp-expage { padding-bottom: 90px; }
.sp-drop-req { color: var(--sp-slate-500); font-weight: 800; }

/* ---- Phase 11: More / Settings ---- */
.sp-morepage { padding-bottom: 110px; }
.sp-defcurgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sp-defcur { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fff; border: none; border-radius: 16px; padding: 11px 4px; cursor: pointer; font-family: inherit; color: var(--sp-slate-600); min-width: 0; }
.sp-defcur-sym { font-size: 17px; font-weight: 800; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-defcur-code { font-size: 11px; font-weight: 800; }
.sp-defcur.is-on { background: var(--sp-navy); color: #fff; }
.sp-defcur.is-add { background: transparent; border: 2px dashed var(--sp-slate-300); color: var(--sp-slate-500); }
.sp-currow .sp-tile { font-size: 12px; }
.sp-mini-btn { width: 32px; height: 32px; border-radius: 10px; border: none; background: var(--sp-slate-100); color: var(--sp-slate-600); cursor: pointer; flex-shrink: 0; font-size: 12px; }
.sp-mini-btn.is-danger { color: var(--sp-slate-400); }
.sp-mini-btn.is-danger:hover { color: var(--sp-rose); }
.sp-peoplecard .sp-row { gap: 8px; }
.sp-addrow { width: 100%; background: none; border: none; border-top: 1px solid var(--sp-slate-100); cursor: pointer; font-family: inherit; text-align: left; }
.sp-addrow-tile { width: 36px; height: 36px; border-radius: 11px; border: 2px dashed var(--sp-slate-300); color: var(--sp-slate-500); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sp-addrow-label { font-size: 14px; font-weight: 800; color: var(--sp-green); }
.sp-setsec { background: #fff; border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.sp-setsec-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.sp-setsec-title { flex: 1; font-size: 15px; font-weight: 800; color: var(--sp-navy); }
.sp-setsec-chev { color: var(--sp-slate-300); font-size: 12px; }
.sp-setsec-body { background: #f8fafc; border-top: 1px solid var(--sp-slate-100); padding: 12px; }
.sp-setsec-body .sp-rowcard:last-child { margin-bottom: 0; }
.sp-setsec-body > .sp-btn { margin: 0; }
.sp-soft-btn { border: none; background: var(--sp-slate-100); color: var(--sp-navy); font-weight: 800; font-size: 13px; border-radius: 12px; padding: 9px 13px; cursor: pointer; font-family: inherit; flex-shrink: 0; display: inline-flex; gap: 6px; align-items: center; }
.sp-soft-btn.is-danger { background: #fff1f2; color: var(--sp-rose); }
.sp-soft-btn:disabled { opacity: .45; cursor: default; }
.sp-dark-btn { border: none; background: var(--sp-navy); color: #fff; font-weight: 800; font-size: 13px; border-radius: 12px; padding: 10px 14px; cursor: pointer; font-family: inherit; flex-shrink: 0; display: inline-flex; gap: 7px; align-items: center; }
.sp-dark-btn:disabled { opacity: .6; }
.sp-keepchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sp-keepchips > button { border: none; background: var(--sp-slate-100); color: var(--sp-slate-600); font-weight: 800; font-size: 12px; border-radius: 10px; padding: 9px 2px; cursor: pointer; font-family: inherit; }
.sp-keepchips > button.is-on { background: var(--sp-navy); color: #fff; }
.sp-restore { border-top: 1px solid var(--sp-slate-100); padding: 10px 0 12px; }
.sp-restore .sp-btn { margin-top: 4px; }
.sp-filepick { display: flex; align-items: center; gap: 10px; background: var(--sp-slate-100); border-radius: 12px; padding: 11px 12px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--sp-navy); margin: 0; }
.sp-filepick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sp-filepick > i { color: var(--sp-slate-500); }
.sp-backlist { margin-top: 12px; }
.sp-backlist-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 600; color: var(--sp-slate-500); padding: 5px 0; border-top: 1px solid var(--sp-slate-100); }
.sp-backlist-row > span:first-child { word-break: break-all; }
.sp-backlist-row > span:last-child { white-space: nowrap; }
.sp-hero-pill.is-red { background: #e11d4826; color: #fb7185; }

/* Amount row + currency chips (Add Income layout), shared by add / edit forms */
.sp-amtblock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sp-amtblock-label { font-size: 14px; color: var(--sp-slate-500); font-weight: 600; white-space: nowrap; }
.sp-amtblock.is-bad .sp-amtblock-label { color: var(--sp-rose); }
.sp-amtblock .sp-curchips.is-light { margin-top: 9px; }
.sp-formrow .sp-curchips.is-light { margin-top: 0; }
.sp-amounthero input::-webkit-outer-spin-button, .sp-amounthero input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-amtblock input { border: none; background: none; outline: none; padding: 0; text-align: right; color: var(--sp-navy); font-family: inherit; color-scheme: light; -moz-appearance: textfield; }
.sp-amtblock input::-webkit-outer-spin-button, .sp-amtblock input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-nwhero-cash { padding: 10px 0 2px; border-top: 1px solid rgba(148, 163, 184, .2); }
.sp-nwhero-cash .sp-nwhero-row { padding: 0; gap: 11px; }
.sp-nwhero-cash .sp-nwhero-name { font-size: 13px; font-weight: 700; }
.sp-nwhero-cash .sp-nwhero-sub { font-size: 10px; }
.sp-nwhero-cashlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sp-nwhero-cashval { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 6px 9px; }
.sp-nwhero-cashval.is-neg { background: rgba(244, 63, 94, .14); }
.sp-nwhero-cashcode { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 800; letter-spacing: .06em; color: var(--sp-slate-400); flex-shrink: 0; }
.sp-nwhero-cashcode i { font-size: 8px; }
.sp-nwhero-cashamt { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; }
.sp-nwhero-cashval.is-neg .sp-nwhero-cashcode { color: #fda4af; }
.sp-nwhero-cashval.is-neg .sp-nwhero-cashamt { color: #fb7185; }
/* Handoff v3: Net Worth Asset Growth card */
.sp-growth { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 16px; }
.sp-growth-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sp-growth-kicker { font-size: 11px; color: var(--sp-slate-400); font-weight: 800; letter-spacing: .04em; }
.sp-growth-total { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; }
.sp-growth-sub { font-size: 11px; color: var(--sp-slate-500); font-weight: 700; margin-top: 1px; }
.sp-growth-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 12px; }
.sp-growth-chips::-webkit-scrollbar { display: none; }
.sp-growth-chip { flex-shrink: 0; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; border: none; font-family: inherit; background: var(--sp-slate-100); color: #475569; }
.sp-growth-chip.is-active { background: var(--sp-navy); color: #fff; }
.sp-growth-bars { display: flex; gap: 6px; margin-top: 14px; }
.sp-growth-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.sp-growth-up, .sp-growth-down { width: 100%; display: flex; flex-direction: column; align-items: center; }
.sp-growth-up { justify-content: flex-end; }
.sp-growth-down { justify-content: flex-start; }
.sp-growth-bar { display: block; width: 70%; max-width: 26px; }
.sp-growth-bar.is-up { border-radius: 5px 5px 2px 2px; }
.sp-growth-bar.is-down { border-radius: 2px 2px 5px 5px; }
.sp-growth-amt { font-size: 9px; font-weight: 800; white-space: nowrap; letter-spacing: -.02em; margin: 3px 0; }
.sp-growth-base { display: block; width: 100%; height: 1px; background: var(--sp-slate-200); }
.sp-growth-label { font-size: 11px; font-weight: 800; color: var(--sp-slate-400); margin-top: 6px; }
.sp-growth-plabel { font-size: 9px; font-weight: 700; color: var(--sp-slate-400); }
.sp-growth-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sp-slate-100); font-size: 11px; font-weight: 700; color: var(--sp-slate-400); }
.sp-growth-sheetcard { background: #fff; border-radius: 18px; padding: 4px 14px; }
.sp-growth-line { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--sp-slate-100); }
.sp-growth-line .sp-tile { width: 34px; height: 34px; border-radius: 10px; }
.sp-growth-line b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.sp-growth-net { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 14px; font-weight: 800; color: var(--sp-navy); }
.sp-growth-net b { font-size: 17px; font-weight: 800; }
.sp-growth-asset { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; font-size: 13px; font-weight: 700; color: var(--sp-navy); }
.sp-growth-asset + .sp-growth-asset { border-top: 1px solid var(--sp-slate-100); }
.sp-growth-asset span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-growth-asset b { font-weight: 800; white-space: nowrap; }
/* Handoff v3: value line in an expanded asset row */
.sp-nwspark { background: var(--sp-slate-50); border-radius: 12px; padding: 10px 12px 8px; margin-bottom: 9px; }
.sp-nwspark svg { width: 100%; height: 44px; display: block; overflow: visible; }
.sp-nwspark-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 10px; font-weight: 700; color: var(--sp-slate-400); }
/* Handoff v3: Summary Invested row */
.sp-suminv { margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(148, 163, 184, .2); }
.sp-suminv-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; background: none; border: none; color: inherit; font-family: inherit; cursor: pointer; text-align: left; }
.sp-suminv-icon { width: 30px; height: 30px; border-radius: 10px; background: rgba(125, 211, 252, .14); color: #7dd3fc; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sp-suminv-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.sp-suminv-title { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sp-suminv-sub { font-size: 10px; color: var(--sp-slate-400); font-weight: 700; white-space: nowrap; }
.sp-suminv-total { font-size: 15px; font-weight: 800; color: #7dd3fc; white-space: nowrap; }
.sp-suminv-rows { margin: 10px 0 0 40px; display: flex; flex-direction: column; gap: 8px; }
.sp-suminv-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sp-suminv-name { min-width: 0; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-suminv-meta { font-size: 10px; color: var(--sp-slate-400); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.sp-suminv-rows b { font-size: 12px; font-weight: 800; white-space: nowrap; }
/* Handoff v3: Add Expense split across categories */
.sp-catsplit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.sp-catsplit-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #475569; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.sp-miniswitch { display: inline-block; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; position: relative; flex-shrink: 0; transition: background .15s; }
.sp-miniswitch > span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: left .15s; }
.sp-miniswitch.is-on { background: #10b981; }
.sp-miniswitch.is-on > span { left: 16px; }
.sp-catsplit { background: #fff; border-radius: 18px; padding: 4px 14px 12px; margin-top: 9px; }
.sp-catsplit-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--sp-slate-100); }
.sp-catsplit-sel { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-catsplit-sel select { border: none; background: none; outline: none; padding: 0; margin: 0; width: 100%; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--sp-navy); cursor: pointer; }
.sp-catsplit-sel select.is-sub { font-size: 12px; font-weight: 600; color: var(--sp-slate-500); }
.sp-catsplit-amt { display: flex; align-items: center; gap: 3px; background: var(--sp-slate-50); border-radius: 10px; padding: 7px 9px; flex-shrink: 0; }
.sp-catsplit-amt span { font-size: 13px; font-weight: 700; color: var(--sp-slate-400); }
.sp-catsplit-amt input { width: 62px; border: none; background: none; outline: none; padding: 0; font-family: inherit; font-size: 14px; font-weight: 800; color: var(--sp-navy); text-align: right; -moz-appearance: textfield; }
.sp-catsplit-amt input::-webkit-outer-spin-button, .sp-catsplit-amt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-catsplit-x { width: 28px; height: 28px; border-radius: 9px; border: none; background: none; color: var(--sp-slate-400); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-size: 12px; }
.sp-catsplit-x:hover { background: #fee2e2; color: #e11d48; }
.sp-catsplit-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.sp-catsplit-add { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #047857; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.sp-catsplit-rem { font-size: 12px; font-weight: 700; color: #b45309; background: #fef3c7; padding: 5px 9px; border-radius: 9px; white-space: nowrap; }
.sp-catsplit-rem.is-ok { color: #047857; background: #dcfce7; }
.sp-catsplit-rem.is-over { color: #be123c; background: #fee2e2; }
.sp-catsplit-fill { font-size: 12px; font-weight: 800; color: #fff; background: var(--sp-navy); padding: 5px 9px; border-radius: 9px; border: none; cursor: pointer; font-family: inherit; }
.sp-catsplit-hint { font-size: 11px; color: var(--sp-slate-400); font-weight: 600; margin-top: 9px; line-height: 1.45; }
