:root{--bg: #0f172a;--panel-bg: #1e293b;--panel-bg-2: #172033;--border: #334155;--text: #e2e8f0;--muted: #94a3b8;--accent: #38bdf8;--success: #4ade80;--warning: #fbbf24;--error: #f87171;--heat-0: #1a2740;--heat-1: #1e3a5f;--heat-2: #1c5385;--heat-3: #1670ab;--heat-4: #0e8fd6;--heat-5: #38bdf8}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.app{display:flex;flex-direction:column;height:100vh;height:100dvh}.app-header{padding:env(safe-area-inset-top,12px) 16px 8px;border-bottom:1px solid var(--border)}.app-header h1{font-size:1.25rem;margin:0}.app-banner{margin:0;padding:8px 16px}.app-main{flex:1;min-height:0;padding:12px 16px 24px;overflow-y:auto}.panel{background:var(--panel-bg);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:16px;display:flex;flex-direction:column;gap:10px}form.panel>button[type=submit]{align-self:flex-start}.panel h2,.panel h3{margin:0 0 4px}.row-between{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.inline-with-action{display:flex;align-items:center;gap:8px}.stat-row{display:flex;gap:16px;flex-wrap:wrap}.stat{flex:1;min-width:128px}.stat-label{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.stat-value{font-size:1.15rem;font-weight:600;white-space:nowrap}.stat-warning .stat-value{color:var(--warning)}.stat-excluded{cursor:pointer;border-radius:8px;padding:6px 8px;margin:-6px -8px}.stat-excluded:hover{background:#94a3b814}.stat-excluded .stat-value{display:flex;align-items:center;gap:6px}.excluded-chevron{font-size:.7rem;transition:transform .15s ease}.stat-excluded[aria-expanded=true] .excluded-chevron{transform:rotate(180deg)}.excluded-row{padding:10px 0;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.excluded-row:last-child{border-bottom:none}.excluded-rule{display:inline-block;margin-top:4px;font-size:.78rem;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#0b1220;border:1px solid var(--border);border-radius:999px;padding:2px 8px}.excluded-side{text-align:right;flex-shrink:0}table.grid{width:100%;border-collapse:collapse;font-size:.9rem}table.grid th,table.grid td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--border)}table.grid th{color:var(--muted);font-weight:500;font-size:.75rem;text-transform:uppercase}.align-right{text-align:right}.expand-row{border-bottom:1px solid var(--border)}.expand-row:last-child{border-bottom:none}.expand-toggle{width:100%;display:flex;align-items:center;gap:8px;background:none;color:var(--text);font-weight:500;padding:10px 0;border:none;border-radius:0;text-align:left}.expand-icon{width:20px;flex-shrink:0;color:var(--accent);font-weight:700;text-align:center}.expand-label{flex:1}.expand-total{font-weight:600}.section-toggle{width:100%;display:flex;align-items:center;gap:8px;background:none;color:var(--text);border:none;padding:0;text-align:left}.section-toggle-label{flex:1;margin:0}.section-body{display:flex;flex-direction:column;gap:4px}.expand-children{padding:0 0 8px 20px;border-left:1px solid var(--border);margin-left:6px}.txn-row{padding:8px 0;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:8px}.txn-row:last-child{border-bottom:none}.txn-row-editing{padding:8px 0;display:flex;flex-direction:column;gap:8px;border-bottom:1px solid var(--border)}.txn-row-actions{display:flex;align-items:center;gap:12px}.txn-amount-negative{color:var(--error)}.txn-amount-positive{color:var(--success)}.muted{color:var(--muted)}.error{color:var(--error)}.success{color:var(--success)}input,select,button{font-size:1rem;padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:#0b1220;color:var(--text)}label{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:var(--muted)}button{background:var(--accent);color:#0b1220;border:none;font-weight:600;cursor:pointer;min-height:44px}button:disabled{opacity:.6;cursor:default}button.btn-secondary{background:transparent;color:var(--text);border:1px solid var(--border);font-weight:500}button.btn-secondary:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}button.btn-danger{background:transparent;color:var(--error);border:1px solid var(--error);font-weight:500}button.btn-compact{min-height:34px;padding:6px 10px;font-size:.85rem}.category-select{display:flex;flex-direction:column;gap:6px}.category-select-row{display:flex;gap:8px;flex-wrap:wrap}.category-select-row select{flex:1;min-width:140px}.category-select-links{display:flex;gap:16px;flex-wrap:wrap}.link-button{align-self:flex-start;background:none;border:none;color:var(--accent);font-weight:500;font-size:.85rem;padding:4px 0;min-height:auto}.filter-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.filter-row input[type=search],.filter-row input[type=text]{flex:2;min-width:160px}.filter-row select{flex:1;min-width:140px}table.grid th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}table.grid th.sortable:hover{color:var(--text)}.sort-arrow{margin-left:4px}.review-row{border:1px solid var(--border);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:8px}.review-row-header{display:flex;align-items:flex-start;gap:10px}.bulk-select-checkbox{width:20px;height:20px;min-height:auto;flex-shrink:0;margin-top:2px}.checkbox-row{flex-direction:row;align-items:center;gap:8px}.checkbox-row input{width:auto;min-height:auto}.pattern-input{width:100%}.import-actions{display:flex;gap:12px;flex-wrap:wrap}.import-results{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px;font-size:.9rem}.dup-row{border:1px solid var(--border);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}.dup-header{display:flex;justify-content:space-between;font-weight:600}.dup-diff{display:flex;flex-direction:column;gap:4px}.dup-diff-line{display:flex;gap:8px;align-items:baseline}.dup-diff-label{flex-shrink:0;width:62px;font-size:.7rem;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}.dup-diff-old{color:var(--muted);text-decoration:line-through}.dup-diff-new{color:var(--success)}.review-row-divider{width:100%;border:none;border-top:1px solid var(--border);margin:4px 0}.health-idle{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.health-status-ok{display:flex;align-items:center;gap:8px;color:var(--success);font-weight:600}.health-status-issues{display:flex;align-items:center;gap:8px;color:var(--error);font-weight:600}.health-check-icon{font-size:1.1rem}.health-timestamp{font-size:.78rem;color:var(--muted)}.health-issue-group{border:1px solid var(--border);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}.health-issue-title{font-weight:600;display:flex;justify-content:space-between}.health-issue-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px;font-size:.88rem}.health-issue-list li{padding:8px 0 0;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:6px}.health-issue-list li:first-child{border-top:none;padding-top:0}.health-issue-actions{display:flex;justify-content:flex-end}.health-admin-note{font-size:.82rem;color:var(--muted);font-style:italic}.health-check-row{border:1px solid var(--border);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.health-check-row-header{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:left;cursor:pointer}.health-check-row-header:disabled{cursor:default}.health-check-chevron{color:var(--muted);font-size:.8rem;width:1em;text-align:center}.health-check-findings{display:flex;flex-direction:column;gap:8px;padding-top:4px}.txn-list-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border);padding:10px 0}.txn-list-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;text-align:left;background:none;border:none;color:inherit;font:inherit;font-weight:400;padding:0;min-height:auto;cursor:pointer}.txn-list-cat{font-size:.8rem;color:var(--muted)}.txn-list-amount{font-weight:600;white-space:nowrap}.txn-editor{gap:12px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.tab-bar{display:flex;border-top:1px solid var(--border);background:var(--panel-bg);padding-bottom:env(safe-area-inset-bottom,0)}.tab{flex:1;background:transparent;color:var(--muted);border-radius:0;font-weight:500;padding:12px 4px}.tab.active{color:var(--accent)}.back-to-top{position:fixed;right:16px;bottom:calc(76px + env(safe-area-inset-bottom,0));z-index:30;width:48px;height:48px;min-height:48px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.4rem;line-height:1;box-shadow:0 2px 10px #00000073}.view-toggle{display:inline-flex;background:#0b1220;border:1px solid var(--border);border-radius:999px;padding:3px;gap:2px}.view-toggle button{border:none;background:transparent;color:var(--muted);font-size:.85rem;font-weight:600;padding:7px 18px;min-height:auto;border-radius:999px}.view-toggle button.active{background:var(--accent);color:#0b1220}.chart-legend{display:flex;gap:16px;font-size:.78rem;color:var(--muted)}.legend-item{display:flex;align-items:center;gap:6px}.legend-swatch{width:10px;height:10px;border-radius:3px}.legend-swatch-income{background:var(--success)}.legend-swatch-expense{background:var(--error)}.chart-scroll{overflow-x:auto}.bar-chart{display:flex;align-items:flex-end;gap:14px;min-width:480px;height:180px;padding-top:8px;border-bottom:1px solid var(--border)}.bar-group{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:3px;height:100%;cursor:pointer;border-radius:6px 6px 0 0}.bar-group:hover{background:#38bdf814}.bar{width:12px;border-radius:3px 3px 0 0}.bar-income{background:var(--success)}.bar-expense{background:var(--error)}.month-labels{display:flex;gap:14px;min-width:480px;margin-top:6px}.month-label{flex:1;text-align:center;font-size:.72rem;color:var(--muted);cursor:pointer;border-radius:6px;padding:3px 0}.month-label:hover{color:var(--accent);font-weight:700}.table-caption{font-size:.78rem;color:var(--muted);margin:0}.cmp-scroll{overflow-x:auto}table.cmp{border-collapse:collapse;font-size:.82rem;min-width:560px;width:100%}table.cmp th,table.cmp td{padding:8px 10px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}table.cmp th.category-col,table.cmp td.category-col{text-align:left;font-variant-numeric:normal;position:sticky;left:0;background:var(--panel-bg)}table.cmp thead th{color:var(--muted);font-weight:500;font-size:.72rem;text-transform:uppercase;letter-spacing:.03em;border-bottom:1px solid var(--border);padding-bottom:10px;cursor:pointer}table.cmp thead th.category-col{cursor:default}table.cmp thead th.month-col:hover{color:var(--accent)}table.cmp tbody tr+tr td{border-top:1px solid var(--panel-bg-2)}table.cmp td.heat{color:var(--text);border-radius:4px;cursor:pointer}table.cmp td.heat:hover{outline:2px solid var(--accent);outline-offset:-2px}table.cmp td.ytd-col{font-weight:700;color:var(--text);border-left:1px solid var(--border)}.trip-summary-row{padding:10px 0;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;border-radius:8px}.trip-summary-row:last-child{border-bottom:none}.trip-summary-row:hover{background:#94a3b80f}.trip-summary-title{font-weight:600}.trip-summary-meta{color:var(--muted);font-size:.82rem;margin-top:2px}.trip-summary-total{font-weight:700;white-space:nowrap;flex-shrink:0}.trip-summary-chevron{color:var(--muted);font-size:.7rem;margin-left:8px;transition:transform .15s ease}.trip-summary-row[aria-expanded=true] .trip-summary-chevron{transform:rotate(180deg)}.trip-summary-right{display:flex;align-items:center;position:relative;flex-shrink:0}.kebab-btn{background:none;border:none;color:var(--muted);font-size:1.2rem;line-height:1;padding:4px 6px;margin-left:4px;min-height:auto;cursor:pointer}.kebab-btn:hover{color:var(--text)}.kebab-menu{position:absolute;top:calc(100% + 4px);right:0;background:var(--panel-bg-2);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px #0006;min-width:130px;z-index:5;overflow:hidden}.kebab-menu button{display:block;width:100%;text-align:left;background:none;border:none;color:var(--text);font-size:.85rem;font-weight:500;padding:11px 14px;min-height:auto;cursor:pointer}.kebab-menu button:not(:last-child){border-bottom:1px solid var(--border)}.kebab-menu button.danger{color:var(--error)}.kebab-menu button:hover{background:#94a3b814}.trip-detail{padding:4px 0 14px;border-bottom:1px solid var(--border)}.rule-actions{display:flex;align-items:center;gap:6px}.status-pill{border:none;border-radius:999px;padding:4px 12px;font-size:.78rem;font-weight:600;min-height:auto;cursor:pointer}.status-pill-active{background:#4ade8029;color:var(--success)}.status-pill-inactive{background:#94a3b824;color:var(--muted)}.group-pill{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:#38bdf824;color:var(--accent);font-size:.72rem;font-weight:600;vertical-align:middle}.trip-txn-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0 6px 10px;font-size:.88rem}.trip-txn-row .muted{font-size:.8rem}.pick-or-type-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pick-or-type-row input{flex:1;min-width:140px}.pick-or-type-row .trip-year-input{flex:0 0 80px;min-width:0}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#02060f99;z-index:40;opacity:0;transition:opacity .2s ease}.sheet-backdrop.show{opacity:1}.sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;background:var(--panel-bg);border:1px solid var(--border);border-bottom:none;border-radius:18px 18px 0 0;max-height:90vh;max-height:90dvh;display:flex;flex-direction:column;box-shadow:0 -8px 30px #00000080;transform:translateY(100%);transition:transform .24s ease;padding-bottom:env(safe-area-inset-bottom,0)}.sheet.show{transform:translateY(0)}.sheet-grip{width:36px;height:4px;border-radius:2px;background:var(--border);margin:8px auto 0;flex-shrink:0}.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px 12px;border-bottom:1px solid var(--border);flex-shrink:0}.sheet-close{width:32px;height:32px;min-height:auto;border-radius:50%;background:#94a3b81f;color:var(--text);font-size:1rem;display:flex;align-items:center;justify-content:center;padding:0;flex-shrink:0}.sheet-title{font-weight:700;font-size:.95rem;text-align:center;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-title .sub{display:block;font-weight:400;font-size:.75rem;color:var(--muted);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-save{padding:8px 16px;min-height:auto;flex-shrink:0}.sheet-body{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:10px}.sheet-spacer{width:32px;flex-shrink:0}.group-row{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;border:none;padding:10px 2px;text-align:left;min-height:auto;cursor:pointer;color:var(--text)}.group-row.year{font-size:1rem;font-weight:700;border-bottom:1px solid var(--border)}.group-row.month{font-size:.88rem;font-weight:600;background:var(--bg);border-radius:8px;padding:9px 12px;margin-top:8px}.group-count{color:var(--muted);font-weight:400;font-size:.82rem;margin-left:6px}.group-chevron{color:var(--muted);font-size:.7rem;transition:transform .15s ease}.group-row[aria-expanded=true] .group-chevron{transform:rotate(180deg)}.month-body{padding:4px 4px 4px 10px}.year-body{padding-left:2px}.day-heading{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:12px 0 6px}.history-row{border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px;margin-bottom:8px}.history-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.history-file{font-weight:700;font-size:.9rem;word-break:break-word}.history-when{font-size:.75rem;color:var(--muted);margin-top:2px}.history-detail{font-size:.85rem;color:var(--muted)}.status-pill-imported{background:#4ade8029;color:var(--success);cursor:default}.status-pill-warning{background:#fbbf2429;color:#fbbf24;cursor:default}.status-pill-failed{background:#f8717129;color:var(--error);cursor:default}.callout{border-radius:8px;padding:10px 12px;font-size:.83rem;line-height:1.45;display:flex;flex-direction:column;gap:8px}.callout-warning{background:#fbbf241a;border:1px solid rgba(251,191,36,.35);color:#fde68a}.callout-failed{background:#f871711a;border:1px solid rgba(248,113,113,.35);color:#fecaca}.callout-lede{font-weight:700}.callout-detail{color:inherit;opacity:.85;font-weight:400}.review-note{font-size:.8rem;color:var(--muted);line-height:1.4}.issue-row{border:1px solid var(--border);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:6px}.issue-row.dismissed{opacity:.6}.issue-row-date{font-weight:700;font-size:.85rem}.issue-row-snippet{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:.76rem;color:var(--muted);background:var(--bg);border-radius:6px;padding:8px;line-height:1.5;word-break:break-word}.issue-row-actions{display:flex;gap:8px}.issue-row-status{font-size:.78rem;font-weight:600}.issue-row-status.resolved{color:var(--success)}.issue-row-status.dismissed-label{color:var(--muted)}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;max-height:min(56vh,34rem);overflow-y:auto;overscroll-behavior:contain}.file-row{display:flex;align-items:flex-start;gap:12px;padding:11px 0;border-top:1px solid var(--border)}.file-row input[type=checkbox]{width:20px;height:20px;margin:2px 0 0;flex-shrink:0;accent-color:var(--accent)}.file-row-main{flex-grow:1;min-width:0}.file-row-name{display:block;flex-direction:unset;font-size:.9rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 0;cursor:pointer}.file-row-detail{font-size:.78rem;margin-top:2px;line-height:1.45;white-space:normal}.file-status{flex-shrink:0;padding:3px 9px;border-radius:999px;border:1px solid var(--border);color:var(--muted);font-size:.7rem;font-weight:600;white-space:nowrap}.file-status-new{background:#0e7490;border-color:#0e7490;color:#ecfeff}.file-status-failed{border-color:var(--error);color:var(--error)}.file-status-unknown{border-color:var(--warning);color:var(--warning)}.file-list-hint{font-size:.78rem;line-height:1.5;margin:0}.warning{color:var(--warning)}.view-toggle-compact{align-self:flex-start}.view-toggle-compact button{font-size:.78rem;padding:6px 14px}.btn-block{width:100%;min-height:48px}.import-actionbar{position:sticky;bottom:0;background:var(--bg);padding:8px 0 12px;padding-bottom:max(12px,env(safe-area-inset-bottom,12px))}.import-section{margin-bottom:16px}.import-section>.panel{padding-bottom:72px}.file-status-check{border-color:var(--warning);color:var(--warning)}.flag-pill{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:#fbbf2429;color:var(--warning);font-size:.72rem;font-weight:600;vertical-align:middle}.flag-box{border:1px solid var(--warning);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--panel-bg-2)}.flag-box p{margin:0;font-size:.9rem;line-height:1.45}.flag-box code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#0b1220;padding:1px 5px;border-radius:4px}.flag-box code .dup-matches{list-style:none;padding:10px;margin:0;background:#0b1220;border-radius:8px;display:flex;flex-direction:column;gap:7px;font-size:.78rem}.flag-box code .dup-matches li{display:flex;gap:10px;align-items:baseline}.flag-box code .dup-match-desc{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flag-box code .dup-match-amount{flex-shrink:0;font-variant-numeric:tabular-nums}.flag-box code .dup-verdict-hint{margin:0;font-size:.78rem;line-height:1.5}.flag-box code .run-report{background:var(--panel-bg-2);border:1px solid var(--border);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}.flag-box code .run-report-title{margin:0;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.flag-box code .run-report-summary{margin:0;font-size:.9rem;font-weight:600}.flag-box code .result-row{padding:2px 0 2px 10px;border-left:2px solid var(--border);display:flex;flex-direction:column;gap:2px}.flag-box code .result-row-name{font-size:.85rem;font-weight:600;color:var(--text);overflow-wrap:anywhere}.flag-box code .result-row-detail{font-size:.8rem;line-height:1.45;color:var(--muted)}.flag-box code .result-row-ok{border-left-color:var(--success)}.flag-box code .result-row-bad{border-left-color:var(--error)}.flag-box code .result-row-warn{border-left-color:var(--warning)}.flag-box code .result-row-neutral{border-left-color:var(--border)}.flag-box code .dup-verdict{padding:10px 0 10px 12px;gap:8px}.flag-box code .file-list-head{border-top:1px solid var(--border);padding-top:12px}
