*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #F8FAFC; color: #0F172A; min-height: 100vh; }
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 230px; background: #0F766E; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: transform 0.25s ease; }
.app.sidebar-collapsed .sidebar { transform: translateX(-230px); }
.app.sidebar-collapsed .main { margin-left: 0; }
/* Toggle button — always visible, floats at top-left */
.sidebar-toggle { position: fixed; top: 14px; left: 14px; z-index: 200; background: rgba(255,255,255,0.92); border: 1px solid rgba(255,255,255,0.3); color: #0F766E; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: left 0.25s ease, background 0.15s; user-select: none; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.sidebar-toggle:hover { background: #fff; color: #0D6560; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.app:not(.sidebar-collapsed) .sidebar-toggle { left: 188px; }
.sidebar-logo { padding: 20px 22px 16px; border-bottom: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; }
.sidebar-logo svg { display: block; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px 22px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.55); font-weight: 700; cursor: pointer; user-select: none; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 22px; cursor: pointer; font-size: 0.9rem; color: rgba(255,255,255,0.8); transition: all 0.15s; border-left: 3px solid transparent; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.18); border-left-color: #2DD4BF; font-weight: 600; }
.nav-item .icon { font-size: 1rem; width: 18px; text-align: center; }
/* Sub-section header inside a nav group */
.nav-subsection { padding: 8px 22px 3px 26px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.45); font-weight: 700; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4px; padding-top: 4px; }
/* Indented child items under a sub-section */
.nav-item.sub { padding-left: 34px; font-size: 0.85rem; }
/* Collapsible nav groups — CSS drives visibility, JS only toggles the class */
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: #2DD4BF; flex-shrink: 0; transition: background 0.2s; }
.nav-group.collapsed .nav-group-items { display: none; }
.nav-group.collapsed > .nav-section .nav-dot { background: rgba(255,255,255,0.3); }
.nav-subgroup.collapsed .nav-subgroup-items { display: none; }
.nav-subgroup.collapsed > .nav-subsection .nav-dot { background: rgba(255,255,255,0.3); }
.sidebar-footer { padding: 14px 22px; font-size: 0.72rem; color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.12); }

/* Main */
.main { margin-left: 230px; flex: 1; padding: 28px 32px; transition: margin-left 0.25s ease; }
.page { display: none; }
.page.active { display: block; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p { color: #666; margin-top: 4px; font-size: 0.9rem; }

/* Summary cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 28px; }
.card { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05); }
.card-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #888; font-weight: 600; }
.card-value { font-size: 1.75rem; font-weight: 700; margin-top: 5px; }
.card-value.green{color:#10B981} .card-value.red{color:#EF4444} .card-value.purple{color:#0F766E} .card-value.amber{color:#f59e0b}
.card-value.net-balance { font-size: 2.6rem; letter-spacing: -1.5px; }
.card-sub { font-size: 0.78rem; color: #aaa; margin-top: 3px; }

/* Panels */
.panel { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 22px; }
.panel-title { font-size: 0.98rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 13px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: #555; }
.form-group input, .form-group select { padding: 9px 11px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 0.9rem; color: #0F172A; background: #fafafa; transition: border-color 0.15s; outline: none; }
.form-group input:focus, .form-group select:focus { border-color: #0F766E; background: #fff; }
.form-group .hint { font-size: 0.72rem; color: #aaa; margin-top: 2px; }
.form-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.btn { padding: 9px 20px; border: none; border-radius: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: #0F766E; color: #fff; } .btn-primary:hover { background: #0D6560; }
.btn-sm-danger { background: #fee2e2; color: #dc2626; font-size: 0.75rem; padding: 4px 10px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-sm-danger:hover { background: #fca5a5; }
.btn-sm-ghost { background: #f3f4f6; color: #555; font-size: 0.75rem; padding: 4px 10px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-sm-ghost:hover { background: #e5e7eb; }
.btn-export { background: transparent; color: var(--teal); border: 1px solid var(--teal); font-size: 0.75rem; padding: 4px 12px; border-radius: 20px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-export:hover { background: var(--teal); color: #fff; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; padding: 9px 13px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: #888; border-bottom: 2px solid #F1F5F9; font-weight: 700; }
td { padding: 11px 13px; border-bottom: 1px solid #F1F5F9; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.empty-state { text-align: center; padding: 36px 0; color: #bbb; font-size: 0.9rem; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-income  { background: #D1FAE5; color: #059669; }
.badge-expense { background: #fee2e2; color: #dc2626; }
.badge-freq    { background: #CCFBF1; color: #0F766E; }
.badge-oneoff  { background: #fef9c3; color: #a16207; }
.badge-active  { background: #CCFBF1; color: #0F766E; }
.badge-upcoming{ background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-expired { background: #f3f4f6; color: #9ca3af; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #E2E8F0; margin-bottom: 20px; }
.tab { padding: 8px 18px; font-size: 0.88rem; font-weight: 600; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: #0F766E; border-bottom-color: #0F766E; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Type toggle */
.type-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.toggle-btn { padding: 7px 18px; border-radius: 8px; border: 1.5px solid #e5e7eb; background: #fff; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: #888; transition: all 0.15s; }
.toggle-btn.income.active  { background: #D1FAE5; border-color: #10B981; color: #059669; }
.toggle-btn.expense.active { background: #fee2e2; border-color: #EF4444; color: #dc2626; }

/* Cashflow table */
.cf-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cf-table th { padding: 9px 11px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.4px; color: #888; background: #F8FAFC; font-weight: 700; border-bottom: 2px solid #E2E8F0; text-align: right; white-space: nowrap; }
.cf-table th:first-child { text-align: left; }
.cf-table td { padding: 9px 11px; border-bottom: 1px solid #F1F5F9; text-align: right; white-space: nowrap; }
.cf-table td:first-child { text-align: left; font-weight: 600; }
.cf-table tr:hover td { background: #F0FDFA; }
.cf-table tr.cf-past td { opacity: 0.5; }
.cf-positive { color: #059669; font-weight: 700; background: rgba(16,185,129,0.08); border-radius: 5px; padding: 2px 6px; }
.cf-negative { color: #dc2626; font-weight: 700; background: rgba(239,68,68,0.08); border-radius: 5px; padding: 2px 6px; }
.cf-zero     { color: #aaa; }
.cf-oneoff-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-left: 4px; vertical-align: middle; cursor: help; }
.zero-pct-tag { font-size: 0.65rem; font-weight: 700; color: #0F766E; background: #CCFBF1; border-radius: 4px; padding: 1px 4px; margin-left: 4px; }

/* ── Recurring — active months picker ── */
.rec-months-section { margin: 14px 0 4px; }
.rec-months-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
.rec-months-toggle-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: #0F766E; cursor: pointer; }
.month-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.month-btn { width: 44px; padding: 5px 0; border: 1.5px solid #e5e7eb; border-radius: 7px; background: #f3f4f6; color: #9ca3af; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.12s; }
.month-btn.active { background: #0F766E; border-color: #0F766E; color: #fff; }
.month-btn:not(.active):hover { border-color: #0F766E; color: #0F766E; }
.rec-months-badge { font-size: 0.7rem; color: #0F766E; background: #CCFBF1; border-radius: 4px; padding: 1px 6px; margin-top: 3px; display: inline-block; font-weight: 600; }
html[data-theme="dark"] .rec-months-toggle-label { color: #cbd5e1; }
html[data-theme="dark"] .month-btn { background: #1e293b; border-color: #334155; color: #475569; }
html[data-theme="dark"] .month-btn.active { background: #0F766E; border-color: #0F766E; color: #fff; }
html[data-theme="dark"] .month-btn:not(.active):hover { border-color: #2DD4BF; color: #2DD4BF; }
html[data-theme="dark"] .rec-months-badge { background: rgba(45,212,191,0.15); color: #2DD4BF; }

/* ── Credit card utilisation bar (card list + cashflow tracker) ── */
.cc-util-bar-wrap { height: 5px; background: #e5e7eb; border-radius: 3px; margin-top: 5px; overflow: hidden; min-width: 70px; }
.cc-util-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.cc-util-bar-green  { background: #10B981; }
.cc-util-bar-amber  { background: #f59e0b; }
.cc-util-bar-red    { background: #ef4444; }
.cc-util-label { font-size: 0.68rem; color: #9ca3af; margin-top: 2px; }
html[data-theme="dark"] .cc-util-bar-wrap { background: #334155; }
html[data-theme="dark"] .cc-util-label { color: #64748b; }

/* Bar chart */
.bar-chart { margin: 16px 0 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bar-label { width: 80px; font-size: 0.75rem; color: #666; flex-shrink: 0; text-align: right; }
.bar-track { flex: 1; height: 20px; background: #F1F5F9; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; }
.bar-fill.pos { background: linear-gradient(90deg,#10B981,#34D399); }
.bar-fill.neg { background: linear-gradient(90deg,#EF4444,#f87171); }
.bar-value { width: 90px; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }

/* Saved card items */
.card-list-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border: 1.5px solid #e5e7eb; border-radius: 10px; margin-bottom: 10px; background: #fafafa; flex-wrap: wrap; gap: 10px; }
.card-list-item .card-name { font-weight: 700; font-size: 0.95rem; }
.card-list-item .card-meta { font-size: 0.78rem; color: #888; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-list-item .card-balance { font-weight: 700; color: #dc2626; font-size: 1.05rem; }

/* Deal list items */
.deal-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 20px; border: 1.5px solid #e5e7eb; border-radius: 12px; margin-bottom: 12px; background: #fafafa; flex-wrap: wrap; gap: 12px; }
.deal-item.active-deal  { border-color: #5EEAD4; background: #F0FDFA; }
.deal-item.upcoming-deal{ border-color: #93c5fd; background: #eff6ff; }
.deal-item.expired-deal { opacity: 0.6; }
.deal-card-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.deal-meta { font-size: 0.82rem; color: #666; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.deal-amount { font-size: 1.1rem; font-weight: 700; color: #0F766E; }
.deal-progress { margin-top: 8px; }
.progress-bar-track { height: 6px; background: #e5e7eb; border-radius: 3px; margin-top: 4px; }
.progress-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#10B981,#34D399); transition: width 0.3s; }

/* Calculator result boxes */
.result-box { background: #F0FDFA; border: 1.5px solid #99F6E4; border-radius: 10px; padding: 16px 18px; margin-top: 16px; }
.result-box h3 { font-size: 0.85rem; color: #0F766E; margin-bottom: 10px; font-weight: 700; }
.result-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.88rem; border-bottom: 1px solid #CCFBF1; }
.result-row:last-child { border-bottom: none; font-weight: 700; }
.result-row .val { font-weight: 600; color: #134E48; }
.payoff-table { margin-top: 12px; max-height: 240px; overflow-y: auto; }
.payoff-table table th, .payoff-table table td { padding: 6px 9px; font-size: 0.8rem; }

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: #e5e7eb; }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot { position: absolute; left: -19px; top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.tl-dot.income { background: #10B981; } .tl-dot.expense { background: #EF4444; }
.tl-date { font-size: 0.72rem; color: #aaa; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.tl-content { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1.5px solid #F1F5F9; border-radius: 8px; padding: 9px 13px; margin-top: 4px; }
.tl-name { font-weight: 600; font-size: 0.88rem; }
.tl-cat  { font-size: 0.75rem; color: #aaa; }
.tl-amount.income  { color: #059669; font-weight: 700; }
.tl-amount.expense { color: #dc2626; font-weight: 700; }

.section-divider { border: none; border-top: 2px solid #E2E8F0; margin: 22px 0; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 700px) { .calc-grid { grid-template-columns: 1fr; } }
.no-cards-notice { background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 10px; padding: 16px 18px; font-size: 0.88rem; color: #92400e; }

#toast { position: fixed; bottom: 24px; right: 24px; background: #0F172A; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 0.88rem; font-weight: 500; opacity: 0; transform: translateY(10px); transition: all 0.25s; z-index: 9999; pointer-events: none; }
#toast.show { opacity: 1; transform: translateY(0); }
::-webkit-scrollbar { width: 5px; height: 5px; } ::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

/* Card transaction inline edit */
.cct-edit-input { padding: 5px 8px; border: 1.5px solid #0F766E; border-radius: 6px; font-size: 0.84rem; width: 100%; background: #fff; outline: none; box-sizing: border-box; }
.cct-edit-input:focus { border-color: #0D6560; }
.badge-card { background: #CCFBF1; color: #0F766E; }

/* ── Landing overlay ── */
#landing-overlay { position: fixed; inset: 0; z-index: 10000; background: #0e0e1a; color: #fff; overflow-y: auto; display: flex; flex-direction: column; }
#landing-overlay.hidden { display: none; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 40px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.lp-logo { display: flex; align-items: center; }
.lp-logo svg { display: block; }
.lp-nav-cta { background: #0F766E; color: #fff; border: none; padding: 9px 20px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.lp-nav-cta:hover { background: #0D6560; }
.lp-hero { text-align: center; padding: 80px 24px 60px; max-width: 720px; margin: 0 auto; }
.lp-hero-badge { display: inline-block; background: rgba(15,118,110,0.2); color: #2DD4BF; border: 1px solid rgba(15,118,110,0.4); border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 14px; margin-bottom: 24px; }
.lp-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 20px; }
.lp-hero h1 span { color: #2DD4BF; }
.lp-hero p { font-size: 1.1rem; color: #9ca3af; line-height: 1.7; margin-bottom: 36px; max-width: 540px; margin-left: auto; margin-right: auto; }
.lp-cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-btn-primary { background: #0F766E; color: #fff; border: none; padding: 14px 32px; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.lp-btn-primary:hover { background: #0D6560; transform: translateY(-1px); }
.lp-btn-secondary { background: transparent; color: #9ca3af; border: 1.5px solid rgba(255,255,255,0.15); padding: 14px 28px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.lp-btn-secondary:hover { border-color: rgba(255,255,255,0.35); color: #fff; }
.lp-privacy-note { margin-top: 16px; font-size: 0.8rem; color: #6b7280; }
.lp-features { padding: 60px 24px; max-width: 1000px; margin: 0 auto; width: 100%; }
.lp-features h2 { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.lp-features .lp-subtitle { text-align: center; color: #9ca3af; margin-bottom: 48px; font-size: 1rem; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lp-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 28px 24px; transition: border-color 0.2s; }
.lp-card:hover { border-color: rgba(15,118,110,0.5); }
.lp-card-icon { font-size: 1.8rem; margin-bottom: 14px; }
.lp-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.lp-card p { font-size: 0.88rem; color: #9ca3af; line-height: 1.6; }
.lp-trust { background: rgba(15,118,110,0.07); border-top: 1px solid rgba(15,118,110,0.15); border-bottom: 1px solid rgba(15,118,110,0.15); padding: 60px 24px; text-align: center; }
.lp-trust h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; }
.lp-trust p { color: #9ca3af; max-width: 520px; margin: 0 auto 32px; line-height: 1.7; }
.lp-trust-pills { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-pill { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 30px; padding: 8px 18px; font-size: 0.82rem; font-weight: 600; color: #d1d5db; }
.lp-final-cta { text-align: center; padding: 80px 24px; }
.lp-final-cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.lp-final-cta p { color: #9ca3af; margin-bottom: 32px; font-size: 1rem; }
.lp-footer { text-align: center; padding: 20px 24px 32px; color: #4b5563; font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.06); }
/* Nav tour link */
.lp-nav-tour { color: #9ca3af; font-size: 0.88rem; text-decoration: none; font-weight: 500; transition: color 0.15s; }
.lp-nav-tour:hover { color: #2DD4BF; }
/* Hero links row */
.lp-hero-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.lp-btn-tour { display: inline-flex; align-items: center; color: #2DD4BF; font-size: 1rem; font-weight: 600; text-decoration: none; padding: 14px 24px; border-radius: 10px; border: 1.5px solid rgba(45,212,191,0.35); transition: border-color 0.15s, background 0.15s; }
.lp-btn-tour:hover { border-color: #2DD4BF; background: rgba(45,212,191,0.06); }
/* How it works */
.lp-how { padding: 70px 24px; max-width: 960px; margin: 0 auto; text-align: center; }
.lp-how h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.lp-steps { display: flex; align-items: flex-start; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }
.lp-step { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 32px 28px; flex: 1; min-width: 220px; max-width: 280px; text-align: left; }
.lp-step-num { width: 36px; height: 36px; background: #0F766E; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 18px; }
.lp-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.lp-step p { font-size: 0.87rem; color: #9ca3af; line-height: 1.65; }
.lp-step-arrow { color: #374151; font-size: 1.5rem; padding-top: 60px; flex-shrink: 0; }
/* FAQ */
.lp-faq { padding: 70px 24px; max-width: 900px; margin: 0 auto; }
.lp-faq h2 { font-size: 1.75rem; font-weight: 800; text-align: center; margin-bottom: 48px; }
.lp-faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }
.lp-faq-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 24px 22px; }
.lp-faq-item h3 { font-size: 0.97rem; font-weight: 700; margin-bottom: 10px; color: #e5e7eb; }
.lp-faq-item p { font-size: 0.87rem; color: #9ca3af; line-height: 1.65; }
/* Dashboard KPI cards */
.card-kpi-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 4px; }
.card-kpi-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.dash-trend { font-size: 0.72rem; font-weight: 600; }

/* Info panel (e.g. "How interest-free deals work") */
.panel-info { background: #f8f9fb; box-shadow: none; border: 1.5px solid #e5e7eb; }
.panel-info-title { color: #555; }
.panel-info-body { font-size: 0.85rem; color: #666; line-height: 1.6; }
html[data-theme="dark"] .panel-info { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .panel-info-title { color: #94a3b8; }
html[data-theme="dark"] .panel-info-body { color: #94a3b8; }

/* Dark mode toggle button */
.dark-toggle { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 0.78rem; font-weight: 600; width: 100%; transition: background 0.15s; }
.dark-toggle:hover { background: rgba(255,255,255,0.18); color: #fff; }
.footer-link { color: rgba(255,255,255,0.4); text-decoration: underline; }
.footer-link:hover { color: rgba(255,255,255,0.7); }

/* ── Dark Mode ── */
html[data-theme="dark"] body { background: #0F172A; color: #E2E8F0; }
html[data-theme="dark"] .page-header p { color: #94a3b8; }
html[data-theme="dark"] .card { background: #1E293B; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
html[data-theme="dark"] .card-label { color: #64748b; }
html[data-theme="dark"] .card-sub { color: #64748b; }
html[data-theme="dark"] .panel { background: #1E293B; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
html[data-theme="dark"] .form-group label { color: #94a3b8; }
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select { background: #0F172A; border-color: #334155; color: #E2E8F0; color-scheme: dark; }
html[data-theme="dark"] .cct-edit-input { color-scheme: dark; }
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group select:focus { background: #1E293B; border-color: #0F766E; }
html[data-theme="dark"] th { color: #64748b; border-bottom-color: #334155; }
html[data-theme="dark"] td { border-bottom-color: #1E293B; }
html[data-theme="dark"] tr:hover td { background: rgba(255,255,255,0.04); }
html[data-theme="dark"] .empty-state { color: #475569; }
html[data-theme="dark"] .cf-table th { background: #1E293B; color: #64748b; border-bottom-color: #334155; }
html[data-theme="dark"] .cf-table td { border-bottom-color: #1E293B; }
html[data-theme="dark"] .cf-table tr:hover td { background: rgba(45,212,191,0.05); }
html[data-theme="dark"] .tabs { border-bottom-color: #334155; }
html[data-theme="dark"] .tab { color: #64748b; }
html[data-theme="dark"] .toggle-btn { background: #1E293B; border-color: #334155; color: #94a3b8; }
html[data-theme="dark"] .bar-track { background: #334155; }
html[data-theme="dark"] .bar-label { color: #94a3b8; }
html[data-theme="dark"] .bar-value { color: #E2E8F0; }
html[data-theme="dark"] .card-list-item { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .card-list-item .card-meta { color: #64748b; }
html[data-theme="dark"] .deal-item { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .deal-item.active-deal { background: rgba(15,118,110,0.2); border-color: #0F766E; }
html[data-theme="dark"] .deal-item.upcoming-deal { background: rgba(29,78,216,0.15); border-color: #3b82f6; }
html[data-theme="dark"] .deal-meta { color: #94a3b8; }
html[data-theme="dark"] .result-box { background: rgba(15,118,110,0.12); border-color: #0F766E; }
html[data-theme="dark"] .result-box h3 { color: #2DD4BF; }
html[data-theme="dark"] .result-row { border-bottom-color: rgba(15,118,110,0.25); }
html[data-theme="dark"] .result-row .val { color: #2DD4BF; }
html[data-theme="dark"] .progress-bar-track { background: #334155; }
html[data-theme="dark"] .timeline::before { background: #334155; }
html[data-theme="dark"] .tl-dot { border-color: #1E293B; }
html[data-theme="dark"] .tl-content { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .tl-date { color: #64748b; }
html[data-theme="dark"] .tl-cat { color: #64748b; }
html[data-theme="dark"] .section-divider { border-top-color: #334155; }
html[data-theme="dark"] .btn-sm-ghost { background: #334155; color: #94a3b8; }
html[data-theme="dark"] .btn-sm-ghost:hover { background: #475569; color: #E2E8F0; }
html[data-theme="dark"] .btn-export { color: var(--teal); border-color: var(--teal); }
html[data-theme="dark"] .btn-export:hover { background: var(--teal); color: #0f172a; }
html[data-theme="dark"] .no-cards-notice { background: rgba(251,191,36,0.08); border-color: #92400e; color: #fbbf24; }
html[data-theme="dark"] .cct-edit-input { background: #0F172A; color: #E2E8F0; border-color: #0F766E; }
html[data-theme="dark"] .sidebar-toggle { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .sidebar-toggle:hover { background: #334155; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; }

/* Semantic colour utilities — used by JS template strings so dark mode can override them */
.text-income      { color: #16a34a; font-weight: 600; }
.text-expense     { color: #dc2626; font-weight: 600; }
.text-muted       { color: #888; }
.text-muted-sm    { color: #888; font-size: 0.82rem; }
.text-cc          { color: #7c3aed; }
.value-pos        { color: #0F766E; }
.value-neg        { color: #dc2626; }
.text-paid-off    { color: #16a34a; font-weight: 600; }
.text-deal-active { color: #065f46; font-weight: 600; }
.dash-trend-pos   { color: #10B981; }
.dash-trend-neg   { color: #ef4444; }
html[data-theme="dark"] .text-income      { color: #10B981; }
html[data-theme="dark"] .text-expense     { color: #f87171; }
html[data-theme="dark"] .text-muted       { color: #64748b; }
html[data-theme="dark"] .text-muted-sm    { color: #64748b; }
html[data-theme="dark"] .text-cc          { color: #a78bfa; }
html[data-theme="dark"] .value-pos        { color: #2DD4BF; }
html[data-theme="dark"] .value-neg        { color: #f87171; }
html[data-theme="dark"] .text-paid-off    { color: #34D399; }
html[data-theme="dark"] .text-deal-active { color: #34D399; }
html[data-theme="dark"] .dash-trend-pos   { color: #10B981; }
html[data-theme="dark"] .dash-trend-neg   { color: #f87171; }

/* ── Auth box (landing page) ── */
.lp-auth-box { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px; padding: 28px 32px; max-width: 420px; margin: 0 auto 16px; display: flex; flex-direction: column; gap: 14px; }
.btn-google-signin { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 20px; background: #fff; color: #1f2937; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.btn-google-signin:hover { background: #f3f4f6; box-shadow: 0 3px 10px rgba(0,0,0,0.22); }
.btn-github-signin { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 20px; background: #24292e; color: #fff; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.28); }
.btn-github-signin:hover { background: #1a1e22; box-shadow: 0 3px 10px rgba(0,0,0,0.35); }
.lp-auth-divider { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.35); font-size: 0.82rem; }
.lp-auth-divider::before, .lp-auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.14); }
.btn-continue-guest { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; padding: 10px 20px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.15s; width: 100%; }
.btn-continue-guest:hover { color: #fff; border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); }
.lp-auth-note { font-size: 0.78rem; color: rgba(255,255,255,0.4); text-align: center; }
.lp-email-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.lp-email-form-header { font-size: 0.78rem; color: rgba(255,255,255,0.5); text-align: center; margin-bottom: 2px; }
.lp-input { width: 100%; padding: 10px 13px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 9px; color: #fff; font-size: 0.9rem; outline: none; transition: border-color 0.15s; }
.lp-input::placeholder { color: rgba(255,255,255,0.35); }
.lp-input:focus { border-color: #2DD4BF; background: rgba(255,255,255,0.1); }
.btn-email-auth { width: 100%; padding: 11px; background: #0F766E; color: #fff; border: none; border-radius: 10px; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-email-auth:hover { background: #0D6560; }
.lp-auth-mode-toggle { font-size: 0.78rem; color: rgba(255,255,255,0.45); text-align: center; margin: 0; }
.btn-link { background: none; border: none; color: #2DD4BF; font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.btn-link:hover { color: #5eead4; }
.lp-auth-error { font-size: 0.78rem; color: #f87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); border-radius: 7px; padding: 8px 12px; text-align: center; }
.lp-auth-confirm { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; text-align: center; }
.lp-auth-confirm p { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 600; margin: 0; }
.lp-auth-confirm .lp-auth-note { color: rgba(255,255,255,0.45); }

/* ── Migration banner ── */
.migration-banner { display: none; align-items: center; gap: 14px; flex-wrap: wrap; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; font-size: 0.88rem; color: #92400e; }

/* ── Top-right account menu ── */
.account-menu { position: fixed; top: 12px; right: 20px; z-index: 150; }
.account-menu-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.92); border: 1px solid #e5e7eb; border-radius: 22px; padding: 5px 14px 5px 6px; cursor: pointer; font-size: 0.82rem; font-weight: 600; color: #374151; box-shadow: 0 1px 4px rgba(0,0,0,0.1); transition: all 0.15s; user-select: none; }
.account-menu-btn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.14); }
.account-menu-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.account-menu-avatar-placeholder { width: 26px; height: 26px; border-radius: 50%; background: #0F766E; color: #fff; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.account-menu-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.13); min-width: 200px; overflow: hidden; display: none; }
.account-menu-dropdown.open { display: block; }
.account-menu-header { padding: 12px 16px 10px; border-bottom: 1px solid #f1f5f9; }
.account-menu-name { font-size: 0.85rem; font-weight: 700; color: #111827; }
.account-menu-email { font-size: 0.72rem; color: #9ca3af; margin-top: 1px; }
.account-menu-item { display: flex; align-items: center; gap: 9px; padding: 10px 16px; font-size: 0.85rem; color: #374151; cursor: pointer; transition: background 0.12s; }
.account-menu-item:hover { background: #f9fafb; }
.account-menu-item.danger { color: #dc2626; }
.account-menu-item.danger:hover { background: #fef2f2; }
.account-menu-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }
.account-menu-item-soon { display: flex; align-items: center; gap: 9px; padding: 10px 16px; font-size: 0.85rem; color: #9ca3af; cursor: default; }
.account-menu-soon-badge { font-size: 0.65rem; background: #f3f4f6; color: #9ca3af; border-radius: 4px; padding: 1px 5px; font-weight: 600; }
.account-menu-currency { padding: 10px 16px; }
.account-menu-currency-label { font-size: 0.78rem; color: #9ca3af; margin-bottom: 7px; }
.account-menu-currency-options { display: flex; gap: 6px; }
.currency-btn { flex: 1; padding: 5px 0; border: 1.5px solid #e5e7eb; border-radius: 7px; background: #f9fafb; color: #374151; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.currency-btn:hover { background: #f3f4f6; border-color: #0F766E; color: #0F766E; }
.currency-btn.active { background: #0F766E; border-color: #0F766E; color: #fff; }
html[data-theme="dark"] .account-menu-currency-label { color: #475569; }
html[data-theme="dark"] .currency-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .currency-btn:hover { border-color: #2DD4BF; color: #2DD4BF; }
html[data-theme="dark"] .currency-btn.active { background: #0F766E; border-color: #0F766E; color: #fff; }
html[data-theme="dark"] .account-menu-btn { background: rgba(30,41,59,0.95); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
html[data-theme="dark"] .account-menu-dropdown { background: #1e293b; border-color: rgba(255,255,255,0.1); }
html[data-theme="dark"] .account-menu-header { border-bottom-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .account-menu-name { color: #f1f5f9; }
html[data-theme="dark"] .account-menu-item { color: #cbd5e1; }
html[data-theme="dark"] .account-menu-item:hover { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] .account-menu-item.danger { color: #f87171; }
html[data-theme="dark"] .account-menu-item.danger:hover { background: rgba(248,113,113,0.1); }
html[data-theme="dark"] .account-menu-divider { background: rgba(255,255,255,0.08); }
html[data-theme="dark"] .account-menu-item-soon { color: #475569; }

/* ── Guest sign-in button (top-right, shown when not signed in) ── */
#guest-signin-btn { position: fixed; top: 12px; right: 20px; z-index: 150; }
.btn-guest-signin { background: transparent; border: 1.5px solid #2DD4BF; color: #2DD4BF; border-radius: 20px; padding: 6px 18px; font-size: 0.83rem; font-weight: 600; cursor: pointer; transition: background 0.15s; letter-spacing: 0.01em; }
.btn-guest-signin:hover { background: rgba(45,212,191,0.12); }
html[data-theme="dark"] .btn-guest-signin { border-color: #2DD4BF; color: #2DD4BF; }
html[data-theme="dark"] .btn-guest-signin:hover { background: rgba(45,212,191,0.15); }

/* ── Accounts page ── */
.acc-account-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border, #e5e7eb); gap: 12px; }
.acc-account-item:last-child { border-bottom: none; }
.acc-account-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.acc-account-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-account-sub { font-size: 0.78rem; color: #888; }
.acc-account-balance { font-size: 1.15rem; font-weight: 700; color: #0F766E; white-space: nowrap; }
.acc-rate-badge { font-size: 0.68rem; font-weight: 600; background: rgba(45,212,191,0.15); color: #0F766E; border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
html[data-theme="dark"] .acc-account-item { border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .acc-account-sub { color: #64748b; }
html[data-theme="dark"] .acc-account-balance { color: #2DD4BF; }
html[data-theme="dark"] .acc-rate-badge { background: rgba(45,212,191,0.12); color: #2DD4BF; }

/* ── Sidebar user-info (remove sign-out, just show name when signed in) ── */
.user-profile { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: rgba(255,255,255,0.65); }
