/* MyFinance Pro: plan chrome, toggles, dashboard + category insights, analytics page, dialogs. */
:root { --pro: #6d28d9; --pro-soft: #f3efff; --pro-grad: linear-gradient(135deg,#7c3aed 0%,#4f46e5 55%,#0ea5e9 100%); --good: #047857; --bad: #be123c; }

.compass-panel { min-width: 0; grid-column: 1 / -1; }
.compass-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 18px; margin-bottom: 8px; border: 1px solid #ddd6fe; border-radius: 14px; background: linear-gradient(115deg,#faf8ff,#f0fdfa); box-shadow: 0 3px 12px #4c1d9508; }
.compass-range label { display: grid; gap: 4px; font-size: 11px; font-weight: 700; color: #475569; }
.compass-range label[hidden] { display: none; }
.compass-range select, .compass-range input { min-height: 36px; max-width: 100%; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; font: inherit; font-size: 13px; }
.compass-range-status { flex-basis: 100%; margin: 0; font-size: 12px; color: #475569; }
@media (max-width: 480px) {
  .compass-range { padding: 12px; }
  .compass-range label { flex: 1 1 120px; min-width: 0; }
}

/* Plan chrome */
.pro-nav-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .8px; color: #fff; background: var(--pro-grad); }
.pro-nav-badge.is-free { background: #24364f; color: #c7d2e2; }
.pro-nav-badge.is-trial { background: linear-gradient(135deg,#f59e0b,#f97316); }
.pro-lock { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; flex-shrink: 0; }
.plan-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #2c4262; background: linear-gradient(135deg,#1a2c47,#152338); color: #e2e8f0; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.plan-chip:hover { border-color: #8b5cf6; transform: translateY(-1px); }
.plan-chip > span:last-child { display: grid; line-height: 1.25; }
.plan-chip strong { font-size: 13px; color: #fff; }
.plan-chip small { font-size: 11.5px; color: #a3b3c9; }
.plan-chip-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--pro-grad); color: #fff; flex-shrink: 0; }
.plan-chip.is-free .plan-chip-icon { background: #2a3e5c; }
.plan-chip.is-trial .plan-chip-icon { background: linear-gradient(135deg,#f59e0b,#f97316); }
.plan-chip-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan-chip-icon .pro-lock { width: 14px; height: 14px; }

/* Tags, switches, segmented control */
.pro-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 6px; background: var(--pro-soft); color: var(--pro); font-size: 9.5px; font-weight: 800; letter-spacing: .7px; }
.pro-tag.is-locked { background: #eef2f7; color: #64748b; }
.pro-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pro-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px 4px 6px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.pro-switch:hover { border-color: #a78bfa; }
.pro-switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .18s; }
.pro-switch-track span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0f172a40; transition: transform .18s; }
.pro-switch[aria-checked="true"] .pro-switch-track { background: var(--pro-grad); }
.pro-switch[aria-checked="true"] .pro-switch-track span { transform: translateX(14px); }
.pro-switch.is-locked { color: var(--text-secondary); }
.pro-segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: #eef2f7; border: 1px solid var(--divider); }
.pro-segmented button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.pro-segmented button[aria-pressed="true"] { background: #fff; color: var(--text-primary); box-shadow: 0 1px 3px #0f172a1f; }
.pro-toolbar .btn svg, .pro-header-actions .btn svg, .pro-export-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pro-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pro-filter-tools { display: flex; align-items: flex-end; margin-left: auto; }
.pro-export-btn { align-self: flex-end; gap: 6px; }

/* Dashboard summary + card extras */
.pro-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: var(--divider); border-bottom: 1px solid var(--divider); }
#mtd-spending-section > .pro-summary { margin: 0; }
.pro-summary > div { display: grid; gap: 2px; padding: 16px 24px; background: linear-gradient(180deg,#fff,#fbfaff); min-width: 0; }
.pro-summary span, .pro-kpi-row span, .pro-mini-stats span, .pro-forecast-head span { color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.pro-summary strong { font-size: 22px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.pro-summary strong em { font-style: normal; color: var(--text-secondary); font-size: 15px; }
.pro-summary small, .pro-kpi-row small { color: var(--text-secondary); font-size: 12px; }
strong.is-name { font-size: 17px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-up, small.is-up { color: var(--bad) !important; }
.is-down, small.is-down { color: var(--good) !important; }
.pro-card-extra { display: grid; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--divider); }
.pro-delta { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pro-delta em { font-style: normal; font-weight: 500; color: var(--text-secondary); }
.pro-delta.is-up { color: var(--bad); } .pro-delta.is-down { color: var(--good); } .pro-delta.is-flat, .pro-delta.is-new { color: var(--text-secondary); }
.pro-budget { display: grid; gap: 5px; }
.pro-budget-meta { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.pro-budget-meta strong { color: var(--text-primary); font-size: 13px; }
.pro-budget-meta em { margin-left: auto; font-style: normal; font-weight: 700; font-size: 11px; color: var(--good); }
.pro-budget.is-risk .pro-budget-meta em { color: #b45309; } .pro-budget.is-over .pro-budget-meta em { color: var(--bad); }
.pro-budget-bar { position: relative; height: 8px; border-radius: 999px; background: #e9eef5; }
.pro-budget-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg,#34d399,#059669); }
.pro-budget.is-risk .pro-budget-bar i { background: linear-gradient(90deg,#fbbf24,#f59e0b); }
.pro-budget.is-over .pro-budget-bar i { background: linear-gradient(90deg,#fb7185,#e11d48); }
.pro-budget-bar b { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; border-radius: 2px; background: #0f172a; opacity: .55; }
.pro-inline-error { margin: 12px 24px 0 !important; color: var(--bad); font-size: 13px; }

/* Pie view */
.pro-pie { display: grid; grid-template-columns: minmax(200px,280px) minmax(0,1fr); gap: 32px; align-items: center; padding: 8px 4px; }
.pro-pie-chart { max-width: 280px; width: 100%; margin: 0 auto; }
.pro-donut { width: 100%; height: auto; display: block; }
.pro-donut .track { fill: none; stroke: #eef2f7; }
.pro-donut .slice { fill: none; transition: opacity .15s; }
.pro-donut:hover .slice { opacity: .55; } .pro-donut .slice:hover { opacity: 1; }
.pro-donut .donut-label { fill: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.pro-donut .donut-value { fill: var(--text-primary); font-size: 24px; font-weight: 750; }
.pro-pie-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 8px; }
.pro-pie-legend button { display: grid; grid-template-columns: 12px minmax(0,1fr) auto 44px; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: var(--text-primary); text-align: left; cursor: pointer; }
.pro-pie-legend button:not([disabled]):hover { border-color: #a78bfa; background: #fbfaff; }
.pro-pie-legend button[disabled] { cursor: default; color: var(--text-secondary); }
.pro-pie-legend i { width: 12px; height: 12px; border-radius: 4px; }
.pro-pie-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-pie-legend strong { font-variant-numeric: tabular-nums; }
.pro-pie-legend em { font-style: normal; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }

/* Categories page insights */
.pro-insight-panel { margin-bottom: 18px; padding: 0; overflow: hidden; }
.pro-insight-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: linear-gradient(120deg,#f6f3ff,#f8fafc 60%); border-bottom: 1px solid var(--divider); }
.pro-insight-head .eyebrow { color: var(--pro); margin-bottom: 4px; }
.pro-insight-head h2 { margin: 0; font-size: 18px; }
.pro-kpi-row { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1px; background: var(--divider); }
.pro-kpi-row > div { display: grid; gap: 3px; padding: 16px 20px; background: #fff; min-width: 0; }
.pro-kpi-row strong { font-size: 21px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.pro-mix { padding: 16px 24px 18px; border-top: 1px solid var(--divider); }
.pro-mix-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: #eef2f7; }
.pro-mix-bar i { min-width: 3px; }
.pro-mix-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-secondary); }
.pro-mix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pro-mix-legend i { width: 9px; height: 9px; border-radius: 3px; }
.pro-mix-legend strong { color: var(--text-primary); }
.pro-cat-extra { display: grid; gap: 10px; padding: 0 18px 16px; }
.pro-cat-trend { display: grid; gap: 6px; min-width: 0; padding: 12px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--divider); }
.pro-cat-trend-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12px; font-weight: 700; color: var(--text-primary); }
.pro-cat-trend-heading small { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.pro-category-line { display: block; width: 100%; height: auto; overflow: visible; }
.pro-category-line polyline { fill: none; stroke: #397d83; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pro-category-line circle { fill: #397d83; stroke: #f8fafc; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pro-category-line .trend-average { stroke: #64748b; stroke-opacity: .65; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.pro-cat-trend-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.pro-cat-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.pro-cat-stats > span { display: grid; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pro-cat-stats small { font-size: 10.5px; font-weight: 600; color: var(--text-secondary); letter-spacing: .3px; text-transform: uppercase; }
.pro-cat-extra .pro-cat-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pro-cat-note { font-size: 12px; color: var(--text-secondary); }
.pro-signal { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef2f7; color: #475569; white-space: nowrap; }
.pro-signal::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pro-signal.is-above { background: #fff1f2; color: var(--bad); }
.pro-signal.is-below { background: #ecfdf5; color: var(--good); }
.pro-signal.is-new { background: var(--pro-soft); color: var(--pro); }

/* Analytics page */
.analytics-content { display: grid; gap: 20px; min-width: 0; }
.analytics-content > *, .pro-card-body > * { min-width: 0; }
.pro-scroll-hint { display: none; }
.pro-chart-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.pro-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }
.pro-kpi { position: relative; display: grid; gap: 3px; padding: 16px 18px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 2px #0f172a0d, 0 8px 20px -10px #0f172a1f; overflow: hidden; min-width: 0; }
.pro-kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pro-grad); }
.pro-kpi > span { color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-kpi strong { font-size: 24px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.pro-kpi small { color: var(--text-secondary); font-size: 12px; min-height: 18px; }
.pro-spark { width: 100%; height: 30px; margin-top: 6px; display: block; }
.pro-spark polygon { fill: #8b5cf61a; } .pro-spark polyline { fill: none; stroke: #7c3aed; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; } .pro-spark circle { fill: #7c3aed; }
.pro-spark.is-up polyline { stroke: var(--bad); } .pro-spark.is-up polygon { fill: #e11d4814; } .pro-spark.is-up circle { fill: var(--bad); }
.pro-spark.is-down polyline { stroke: #059669; } .pro-spark.is-down polygon { fill: #05966914; } .pro-spark.is-down circle { fill: #059669; }
.pro-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.pro-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-width: 0; }
.pro-card.span-2 { grid-column: span 2; } .pro-card.span-3 { grid-column: 1 / -1; }
.pro-card > header { padding: 18px 22px 14px; background: #f8fafc; border-bottom: 1px solid var(--divider); }
.pro-card > header h2 { margin: 0; font-size: 16px; letter-spacing: -.2px; }
.pro-card > header p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12.5px; }
.pro-card-body { display: grid; gap: 14px; padding: 18px 22px 20px; flex: 1; align-content: start; min-width: 0; }
.pro-chart { width: 100%; height: auto; display: block; overflow: visible; }
.pro-chart .grid { stroke: #e7ecf3; stroke-width: 1; } .pro-chart .grid.zero { stroke: #94a3b8; }
.pro-chart .axis { fill: #7b8aa0; font-size: 11px; }
.pro-chart .bar { fill: #c4b5fd; } .pro-chart .bar.is-current { fill: #7c3aed; }
.pro-chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.pro-chart .line.primary { stroke: #7c3aed; } .pro-chart .area.primary { fill: #7c3aed17; } .pro-chart .dot.primary { fill: #7c3aed; stroke: #fff; stroke-width: 2; }
.pro-chart .line.danger { stroke: var(--bad); } .pro-chart .area.danger { fill: #e11d4814; } .pro-chart .dot.danger { fill: var(--bad); stroke: #fff; stroke-width: 2; }
.pro-chart .line.dashed { stroke-dasharray: 6 5; }
.pro-chart .line.muted-line { stroke: #94a3b8; stroke-width: 1.8; }
.pro-chart .line.sma { stroke: #f59e0b; } .pro-chart .line.income { stroke: #10b981; stroke-dasharray: 2 5; }
.pro-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12px; color: var(--text-secondary); }
.pro-legend > span:not(.pro-move)::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; background: #7c3aed; }
.pro-legend .dashed::before { background: repeating-linear-gradient(90deg,#7c3aed 0 5px,transparent 5px 8px) !important; }
.pro-legend .muted-line::before { background: #94a3b8 !important; } .pro-legend .sma::before { background: #f59e0b !important; } .pro-legend .income::before { background: #10b981 !important; }
.pro-legend .bar::before { height: 10px !important; width: 10px !important; background: #c4b5fd !important; }
.pro-legend .pro-move { margin-left: auto; }
.pro-move { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pro-move.is-bad { color: var(--bad); } .pro-move.is-good { color: var(--good); } .pro-move.is-flat { color: var(--text-secondary); }
.pro-forecast-head, .pro-mini-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.pro-forecast-head > div, .pro-mini-stats > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--divider); min-width: 0; }
.pro-forecast-head strong, .pro-mini-stats strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.pro-mini-stats strong.is-bad { color: var(--bad); } .pro-mini-stats strong.is-good { color: var(--good); }
.pro-card:not(.span-2):not(.span-3) .pro-mini-stats { grid-template-columns: 1fr 1fr; }
.pro-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.pro-table th, .pro-table td { padding: 10px 12px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: middle; }
.pro-table tbody tr:nth-child(even) { background: #fafbfd; }
.pro-table tbody tr:hover { background: #f6f3ff; }
.pro-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pro-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.pro-table thead button { border: 0; background: none; padding: 0; font: inherit; font-size: 11px; font-weight: 750; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.pro-table thead th[aria-sort="ascending"] button, .pro-table thead th[aria-sort="descending"] button { color: var(--pro); }
.pro-table td small { display: block; }
.pro-cat-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--text-primary); text-align: left; cursor: pointer; }
.pro-cat-link:hover span { color: var(--pro); text-decoration: underline; }
.pro-cat-link .pro-spark { width: 84px; height: 24px; margin: 0; flex-shrink: 0; }
.pro-budget-chip { font-size: 11px; font-weight: 700; color: var(--good); } .pro-budget-chip.is-risk { color: #b45309; } .pro-budget-chip.is-over { color: var(--bad); }
.pro-share { display: inline-block; width: 46px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.pro-share i { display: block; height: 100%; background: linear-gradient(90deg,#a78bfa,#7c3aed); }
.pro-vol { font-size: 12px; color: var(--text-secondary); }
.pro-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pro-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); min-width: 0; }
.pro-list li:last-child { border-bottom: 0; }
.pro-list li > div:first-child, .pro-merchant { flex: 1; min-width: 0; }
.pro-list strong { font-size: 13.5px; }
.pro-list small { display: block; color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-list .num { text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; display: grid; justify-items: end; }
.pro-list li.is-inactive { opacity: .55; }
.pro-list.is-wrap small { white-space: normal; }
.pro-list.is-scroll { max-height: 236px; overflow-y: auto; margin-right: -10px; padding-right: 10px; scrollbar-width: thin; }
.pro-list.is-scroll.is-tall { max-height: 400px; }
/* Analytics tabs and Spending Compass */
.pro-compass { display: grid; gap: 20px; }
.pro-tabs { display: flex; gap: 4px; margin: 0 0 4px; border-bottom: 1px solid var(--divider); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pro-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 2px solid transparent; color: var(--text-secondary); font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; }
.pro-tab:hover { color: var(--text-primary); }
.pro-tab.is-active { color: var(--pro); border-bottom-color: var(--pro); }
.pro-tab-badge { padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: var(--good); font-size: 11.5px; font-weight: 700; }
.pro-tab-help { align-self: center; margin-left: auto; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--divider); background: #fff; color: var(--pro); font-size: 12.5px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.pro-tab-help:hover { background: var(--pro-soft); }
.pro-mf-hint { margin: 10px 0 0; font-size: 13px; color: #92400e; }
.pro-signal.is-inline { background: #eef2f7; color: #475569; }
.pro-mf-chip { padding: 3px 10px; border-radius: 999px; background: var(--pro-soft); color: var(--pro); font-weight: 700; font-size: 12px; }
.pro-mf-chip.is-empty { background: #fffbeb; color: #92400e; }
.pro-mf-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0 0; padding: 12px; border-radius: 12px; background: #f8fafc; }
.pro-mf-form[hidden] { display: none; }
.pro-mf-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.pro-mf-form select { min-width: 130px; }
.pro-mf-form-actions { display: flex; gap: 8px; margin-left: auto; }
.pro-compass-hero { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); gap: 28px; padding: 26px 28px; background: linear-gradient(135deg,#faf7ff 0%,#f0f9ff 100%); border: 1px solid #e9e3fb; }
.pro-hero-eyebrow { margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--pro); }
.pro-hero-figure { display: block; font-size: 40px; line-height: 1.1; letter-spacing: -1px; color: var(--good); }
.pro-hero-figure.is-small { font-size: 24px; color: var(--text-primary); }
.pro-hero-sub { margin: 8px 0 16px; max-width: 560px; font-size: 14.5px; color: var(--text-secondary); }
.pro-hero-household { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.pro-hero-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: plan; }
.pro-hero-plan li { counter-increment: plan; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--divider); }
.pro-hero-plan li > span { display: grid; gap: 2px; } .pro-hero-plan li b::before { content: counter(plan) ". "; color: var(--pro); }
.pro-hero-plan small { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.pro-hero-plan strong { font-size: 18px; color: var(--good); white-space: nowrap; }
.pro-hero-clear { margin: 0; padding: 14px; border-radius: 12px; background: #ecfdf5; color: var(--good); font-weight: 650; }
.pro-insights { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; }
.pro-insight { padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--divider); border-top: 4px solid var(--pro); }
.pro-insight.tone-bad { border-top-color: #e11d48; } .pro-insight.tone-warn { border-top-color: #f59e0b; } .pro-insight.tone-good { border-top-color: #10b981; }
.pro-insight strong { display: block; font-size: 28px; line-height: 1.1; letter-spacing: -.5px; color: var(--text-primary); }
.pro-insight.tone-bad strong { color: var(--bad); } .pro-insight.tone-good strong { color: var(--good); }
.pro-insight h3 { margin: 8px 0 4px; font-size: 14.5px; } .pro-insight p { margin: 0; font-size: 13px; color: var(--text-secondary); }
.pro-card > header p b { color: var(--text-primary); } .pro-card > header p b.tone-good { color: var(--good); } .pro-card > header p b.tone-bad { color: var(--bad); }
.pro-sankey, .pro-venn { display: block; width: 100%; height: auto; overflow: visible; }
.pro-sankey { max-width: 1040px; margin: 0 auto; }
.pro-venn-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 28px; align-items: center; }
.pro-venn-layout .pro-venn { max-width: 640px; margin: 0 auto; }
.pro-venn-read h4 { margin: 0 0 12px; font-size: 15px; color: #122138; }
.pro-venn-group { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border-left: 4px solid #94a3b8; }
.pro-venn-group.tone-act { background: #fff1f2; border-left-color: #e11d48; }
.pro-venn-group.tone-watch { background: #fffbeb; border-left-color: #f59e0b; }
.pro-venn-group-head { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.pro-venn-group-head span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #52637a; }
.pro-venn-group.tone-act .pro-venn-group-head span { color: #be123c; }
.pro-venn-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pro-venn-group li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pro-venn-group li span { color: #52637a; font-size: 12.5px; text-align: right; }
.pro-sankey-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pro-sankey-wrap .pro-sankey { min-width: 680px; }
.pro-sk-band { opacity: .34; transition: opacity .18s; } .pro-sk-band:hover { opacity: .7; }
.pro-sk-block { filter: drop-shadow(0 1px 2px rgba(15,23,42,.12)); }
.pro-sk-head { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; fill: #94a3b8; }
.pro-sk-in { font-size: 13.5px; font-weight: 700; fill: #fff; }
.pro-sk-in-sub { font-size: 12.5px; font-weight: 500; fill: rgba(255,255,255,.86); font-variant-numeric: tabular-nums; }
.pro-sk-label { font-size: 13px; font-weight: 650; fill: #122138; } .pro-sk-label.is-bad { fill: #be123c; }
.pro-sk-value { font-weight: 600; fill: #334155; font-variant-numeric: tabular-nums; }
.pro-sk-pct { font-size: 11.5px; font-weight: 500; fill: #94a3b8; }
.pro-sk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 12.5px; color: #52637a; }
.pro-sk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pro-sk-legend i { width: 10px; height: 10px; border-radius: 3px; }
.pro-sk-legend .pro-sk-hint { color: #94a3b8; }
.pro-venn circle { stroke-width: 1.5; }
.pro-venn-a { fill: rgba(225,29,72,.12); stroke: #e11d48; } .pro-venn-b { fill: rgba(245,158,11,.13); stroke: #f59e0b; } .pro-venn-c { fill: rgba(124,58,237,.11); stroke: #7c3aed; }
.pro-venn-set { font-size: 15px; font-weight: 800; fill: #52637a; }
.pro-venn-name { font-size: 17px; font-weight: 700; fill: #122138; } .pro-venn-name.is-act { fill: #be123c; } .pro-venn-name.is-more { font-size: 13px; font-weight: 600; fill: #52637a; }
.pro-venn-tag { font-size: 12px; font-weight: 800; letter-spacing: .1em; fill: #be123c; }
.pro-venn-clear { margin: 6px 0 0; font-size: 13px; color: var(--good); }
.pro-venn-clear svg, .pro-hero-clear svg { width: 15px; height: 15px; vertical-align: -2px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pro-range-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-secondary); }
.pro-range-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pro-range-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; }
.pro-range-legend i.is-band { width: 22px; border-radius: 4px; background: #ddd6fe; } .pro-range-legend i.is-median { width: 2px; height: 14px; border-radius: 0; background: #6d28d9; }
.pro-range-legend i.is-latest { width: 14px; height: 14px; background: #f59e0b; border: 2px solid #fff; box-shadow: 0 0 0 1px #f59e0b; }
.pro-range-legend i.is-typical { border-radius: 2px; transform: rotate(45deg); background: #0f172a; }
.pro-range-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pro-range-row { display: grid; grid-template-columns: 140px minmax(0,1fr) 250px; gap: 18px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.pro-range-row:last-child { border-bottom: 0; }
.pro-range-name, .pro-range-note { display: grid; gap: 2px; font-size: 13.5px; } .pro-range-name small, .pro-range-note small { font-size: 12px; color: var(--text-secondary); }
.pro-range-note b.tone-bad { color: var(--bad); } .pro-range-note b.tone-warn { color: #b45309; } .pro-range-note b.tone-good { color: var(--good); }
.pro-range-track { position: relative; height: 30px; border-radius: 8px; background: #f8fafc; }
.pro-range-track > * { position: absolute; top: 50%; transform: translate(-50%,-50%); }
.pro-range-band { height: 14px; border-radius: 7px; background: #ddd6fe; transform: translateY(-50%); }
.pro-range-median { width: 2px; height: 20px; background: #6d28d9; }
.pro-range-track i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; opacity: .75; }
.pro-range-typical { width: 10px; height: 10px; border-radius: 2px; background: #0f172a; transform: translate(-50%,-50%) rotate(45deg); }
.pro-range-latest { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15,23,42,.3); z-index: 1; }
.pro-range-latest.tone-bad { background: #e11d48; } .pro-range-latest.tone-warn { background: #f59e0b; } .pro-range-latest.tone-good { background: #10b981; }
.pro-mf-details { padding: 0; overflow: hidden; }
.pro-mf-details > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 16px 22px; cursor: pointer; font-weight: 700; }
.pro-mf-details > summary small { font-weight: 500; font-size: 12.5px; color: var(--text-secondary); }
.pro-mf-details-body { display: grid; gap: 12px; padding: 0 22px 20px; }
/* Hot and cold months heatmap */
.pro-heat-lede, .pro-bubble-detail { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.pro-heat-lede b, .pro-bubble-detail b { color: var(--text-primary); }
.pro-heatmap { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pro-heatmap th { font-weight: 600; color: var(--text-secondary); text-align: center; white-space: nowrap; }
.pro-heatmap thead th small { display: block; font-size: 10px; font-weight: 500; opacity: .7; }
.pro-heatmap tbody th { text-align: left; color: var(--text-primary); padding-right: 8px; }
.pro-heatmap tbody th small { margin-left: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.pro-heatmap td.num { text-align: right; color: var(--text-secondary); padding-left: 8px; }
.pro-heat-cell { min-width: 44px; height: 32px; padding: 0 4px; text-align: center; border-radius: 6px; background-clip: padding-box; box-shadow: inset 0 0 0 1px rgba(148,163,184,.18); color: var(--text-primary); }
.pro-heat-cell.is-strong { color: #fff; font-weight: 700; }
.pro-heat-total th, .pro-heat-total td { border-top: 1px solid var(--border); font-weight: 700; }
.pro-heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.pro-heat-legend span { margin: 0 6px; }
.pro-heat-legend i { width: 22px; height: 12px; border-radius: 3px; }
.pro-heat-legend i.is-neutral { box-shadow: inset 0 0 0 1px rgba(148,163,184,.4); }
/* Who gets your money: draggable merchant bubbles */
.pro-bubble-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; }
.pro-seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.pro-seg > span { margin-right: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.pro-seg button { border: 1px solid var(--border); background: transparent; color: var(--text-primary); padding: 5px 12px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.pro-seg button[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.pro-bubbles { position: relative; height: 440px; margin-bottom: 12px; border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #16213a 0%, #0b1220 70%); user-select: none; }
.pro-bubble { --r: 20; --rgb: 148,163,184; --k: .3; position: absolute; left: 0; top: 0; width: calc(var(--r) * 2px); height: calc(var(--r) * 2px); padding: 0 calc(var(--r) * .18px); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; touch-action: none; cursor: grab; color: #fff; font: inherit; text-align: center;
  border: 2px solid rgba(var(--rgb), calc(.45 + .55 * var(--k)));
  background: radial-gradient(circle at 50% 30%, rgba(var(--rgb), calc(.2 + .45 * var(--k))), rgba(var(--rgb), calc(.05 + .12 * var(--k))) 72%);
  box-shadow: 0 0 calc(4px + 18px * var(--k)) rgba(var(--rgb), calc(.2 + .5 * var(--k))), inset 0 0 calc(6px + 12px * var(--k)) rgba(var(--rgb), .3);
  transition: width .35s ease, height .35s ease, border-color .35s ease, box-shadow .35s ease; will-change: transform; animation: pro-bubble-in .5s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes pro-bubble-in { from { scale: 0; opacity: 0; } }
.pro-bubble b { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; line-height: 1.08; font-size: calc((var(--r) * .22px + 4px) * var(--fit, 1)); font-weight: 700; letter-spacing: .01em; }
.pro-bubble small { font-size: calc(var(--r) * .16px + 5px); font-weight: 600; opacity: .9; }
.pro-bubble.is-tiny b, .pro-bubble.is-tiny small { display: none; }
.pro-bubble:hover, .pro-bubble:focus-visible, .pro-bubble.is-selected { border-color: #fff; outline: none; z-index: 2; }
.pro-bubble.is-dragging { cursor: grabbing; z-index: 3; transition: none; }
.pro-bubble-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-secondary); }
.pro-bubble-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pro-bubble-legend i { width: 12px; height: 12px; border-radius: 50%; background: rgba(var(--rgb), .55); box-shadow: 0 0 0 2px rgba(var(--rgb), .9); }
.pro-bubble-note { font-style: italic; }
@media (prefers-reduced-motion: reduce) { .pro-bubble { transition: none; animation: none; } }
@media (max-width: 900px) { .pro-compass-hero { grid-template-columns: 1fr; padding: 20px; } .pro-hero-figure { font-size: 32px; } .pro-range-row { grid-template-columns: 1fr; gap: 6px; } .pro-bubbles { height: 360px; } .pro-venn-layout { grid-template-columns: 1fr; } }
.pro-mf-table th small, .pro-mf-table td small { display: block; font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.pro-mf-table th[scope="row"] small { max-width: 240px; white-space: normal; }

@media (max-width: 1100px) { .pro-list.is-scroll, .pro-list.is-scroll.is-tall { max-height: none; } }
.pro-merchant { display: grid; gap: 6px; } .pro-merchant .pro-share { width: 100%; margin: 0; }
.pro-rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--pro-soft); color: var(--pro); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.pro-weekdays { display: grid; grid-template-columns: repeat(7,1fr); gap: 10px; align-items: end; height: 170px; }
.pro-weekday { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; text-align: center; }
.pro-weekday span { align-self: end; border-radius: 8px 8px 3px 3px; background: #ddd6fe; }
.pro-weekday.is-peak span { background: var(--pro-grad); }
.pro-weekday small { color: var(--text-secondary); font-size: 11.5px; font-weight: 650; }
.pro-weekday-table { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.pro-weekday-table li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 13px; color: var(--text-secondary); }
.pro-weekday-table li:last-child { border-bottom: 0; }
.pro-weekday-table strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.pro-empty { margin: 0; color: var(--text-secondary); font-size: 13px; padding: 12px 0; }
.pro-empty.is-good { display: flex; gap: 8px; align-items: center; color: var(--good); font-weight: 600; }
.pro-empty svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }
div.pro-empty.panel { padding: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pro-banner { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; }
.pro-footnote { margin: 0; color: var(--text-secondary); font-size: 12px; }
.pro-loading { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.pro-loading span, .pro-skeleton { height: 160px; border-radius: 16px; background: linear-gradient(90deg,#eef2f7 25%,#f8fafc 50%,#eef2f7 75%); background-size: 200% 100%; animation: pro-shimmer 1.3s infinite linear; }
.pro-skeleton { height: 34px; border-radius: 8px; }
@keyframes pro-shimmer { to { background-position: -200% 0; } }

/* Locked preview */
.pro-locked { position: relative; min-height: 560px; }
.pro-locked-preview { display: grid; gap: 20px; filter: blur(5px) saturate(.8); opacity: .55; pointer-events: none; user-select: none; }
.pro-locked-preview .pro-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.pro-locked-preview .pro-grid { grid-template-columns: 2fr 1fr; }
.pro-locked-cta { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); width: min(560px,calc(100% - 24px)); padding: 32px; text-align: center; border-radius: 20px; box-shadow: 0 30px 60px -20px #1e1b4b55, 0 0 0 1px #ddd6fe; }
.pro-locked-cta .eyebrow { color: var(--pro); margin: 14px 0 6px; }
.pro-locked-cta h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.5px; }
.pro-locked-features { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.pro-locked-features li { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-secondary); }
.pro-locked-features li span { display: grid; }
.pro-locked-features strong { color: var(--text-primary); font-size: 13px; }
.pro-locked-features svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--pro); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pro-locked-cta .btn { min-width: 240px; }
.pro-hero-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--pro-grad); color: #fff; box-shadow: 0 10px 24px -8px #6d28d9aa; }
.pro-hero-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pro-locked-cta .btn-primary, .pro-dialog .btn-primary { background: var(--pro-grad); border-color: transparent; color: #fff; }

/* Upgrade + budget dialogs */
.editor.pro-dialog { width: min(680px,94vw); padding: 0; overflow: auto; }
.pro-hero { position: relative; padding: 30px 32px 26px; color: #fff; background: radial-gradient(circle at 85% 0%,#38bdf855,transparent 45%), linear-gradient(135deg,#1e1b4b,#4c1d95 55%,#312e81); }
.pro-hero .pro-hero-mark { background: #ffffff1f; box-shadow: none; }
.pro-hero .eyebrow { color: #c4b5fd; margin: 16px 0 6px; }
.pro-hero h2 { margin: 0; font-size: 24px; letter-spacing: -.5px; color: #fff; max-width: 480px; }
.pro-reason { margin: 8px 0 0; color: #ddd6fe; font-size: 13.5px; }
.pro-price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.pro-price strong { font-size: 34px; letter-spacing: -1px; }
.pro-price span { color: #c4b5fd; }
.pro-price em { margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: #ffffff1f; font-style: normal; font-size: 12px; font-weight: 650; }
.pro-feature-grid { list-style: none; margin: 0; padding: 24px 32px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.pro-feature-grid li { display: flex; gap: 12px; }
.pro-feature-grid li > span:last-child { display: grid; gap: 2px; }
.pro-feature-grid strong { font-size: 13.5px; }
.pro-feature-grid small { color: var(--text-secondary); font-size: 12.5px; line-height: 1.45; }
.pro-feature-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pro-soft); color: var(--pro); flex-shrink: 0; }
.pro-feature-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pro-dialog-foot { display: grid; gap: 14px; padding: 18px 32px 26px; }
.pro-status { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--divider); color: var(--text-secondary); font-size: 13px; }
.pro-status svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pro-status.is-pro { background: #ecfdf5; border-color: #a7f3d0; color: var(--good); }
.pro-status.is-trial { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pro-status.is-locked { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.pro-status .pro-lock { width: 16px; height: 16px; }
.pro-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.editor.budget-dialog { width: min(720px,94vw); padding: 0; }
.editor.budget-dialog[open] { display: flex; flex-direction: column; }
.budget-form { display: flex !important; flex-direction: column; gap: 0 !important; max-height: 88vh; }
.budget-head { display: flex; justify-content: space-between; gap: 20px; padding: 24px 28px 18px; border-bottom: 1px solid var(--divider); }
.budget-head .eyebrow { color: var(--pro); margin-bottom: 4px; }
.budget-head h2 { margin: 0 0 6px; }
.budget-head p.muted { margin: 0; font-size: 13px; }
.budget-total { display: grid; align-content: start; justify-items: end; padding: 10px 14px; border-radius: 12px; background: var(--pro-soft); flex-shrink: 0; }
.budget-total small { color: var(--pro); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.budget-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.budget-list { overflow: auto; padding: 6px 28px; }
.budget-row { display: grid; grid-template-columns: minmax(0,1fr) auto 150px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); }
.budget-row:last-child { border-bottom: 0; }
.budget-name { display: grid; min-width: 0; }
.budget-name small { color: var(--text-secondary); font-size: 12px; }
.editor .budget-input { display: flex !important; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.budget-input:focus-within { border-color: #8b5cf6; box-shadow: 0 0 0 3px #8b5cf62b; }
.budget-input span { color: var(--text-secondary); }
.budget-input input { width: 100%; min-height: 38px; border: 0 !important; outline: 0; background: transparent; font: inherit; box-shadow: none !important; padding: 0 !important; text-align: right; }
#budget-error { margin: 0; padding: 0 28px; color: var(--bad); font-size: 13px; }
#budget-error:empty { display: none; }
.budget-form .pro-actions { padding: 16px 28px 22px; border-top: 1px solid var(--divider); }
.budget-loading { padding: 40px; text-align: center; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 1280px) { .pro-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); } .pro-kpi-row { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 1100px) {
  .pro-grid { grid-template-columns: 1fr 1fr; } .pro-card.span-2 { grid-column: 1 / -1; }
  .pro-summary { grid-template-columns: 1fr 1fr; }
  .pro-pie { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .pro-grid, .pro-loading, .pro-locked-preview .pro-grid { grid-template-columns: minmax(0,1fr); } .pro-card.span-2, .pro-card.span-3 { grid-column: auto; }
  .pro-kpis, .pro-kpi-row, .pro-locked-preview .pro-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-forecast-head, .pro-mini-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-card > header, .pro-card-body { padding: 16px; }
  .pro-kpi { padding: 14px 12px 10px; }
  .pro-kpi > span { white-space: normal; overflow: visible; }
  .pro-kpi small, .pro-kpi strong, .pro-card > header, .pro-mini-stats strong, .pro-forecast-head strong { overflow-wrap: anywhere; }
  .pro-insights { grid-template-columns: minmax(0,1fr); }
  .pro-hero-plan li, .pro-venn-group li { flex-wrap: wrap; }
  .pro-mf-form label { flex: 1 1 130px; min-width: 0; }
  .pro-mf-form select { min-width: 0; max-width: 100%; }
  .pro-mf-form-actions { margin-left: 0; flex-wrap: wrap; }
  .pro-tabs { flex-wrap: wrap; }
  .pro-tab { padding: 10px; white-space: normal; }
  .pro-tab-help { margin: 0 0 8px 10px; }
  #analytics-view .table-scroll, .pro-sankey-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .pro-scroll-hint { display: block; margin: 0; color: var(--text-secondary); font-size: 12px; }
  .pro-chart-scroll .pro-chart { min-width: 560px; }
  .pro-sankey-wrap .pro-sankey { min-width: 960px; }
  #analytics-view .table-scroll tbody th[scope="row"], .pro-heatmap tbody th { position: sticky; left: 0; z-index: 1; background: #fff; }
  .pro-seg button, .compass-range select, .compass-range input, .compass-range .btn { min-height: 44px; }
  .pro-header-actions { width: 100%; } .pro-header-actions .btn { flex: 1 1 auto; }
  .pro-summary > div { padding: 14px 16px; }
  .pro-filter-tools { margin-left: 0; }
  .pro-feature-grid, .pro-locked-features { grid-template-columns: 1fr; }
  .pro-hero, .pro-feature-grid, .pro-dialog-foot { padding-left: 20px; padding-right: 20px; }
  .budget-head { flex-direction: column; padding: 20px; } .budget-total { justify-items: start; }
  .budget-list { padding: 4px 20px; } .budget-form .pro-actions { padding: 14px 20px 18px; }
  .budget-row { grid-template-columns: minmax(0,1fr) 120px; } .budget-row > .link-button, .budget-row > span:nth-child(2) { grid-row: 2; justify-self: start; padding: 0; }
  .pro-locked-cta { top: 16px; padding: 24px 20px; }
}
@media (max-width: 480px) {
  .pro-cat-link .pro-spark, .pro-cat-link svg { display: none; }
  .pro-summary, .pro-kpis, .pro-kpi-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-summary strong, .pro-kpi strong { font-size: 19px; }
  .pro-toolbar { width: 100%; } .pro-toolbar .btn { margin-left: auto; }
  .pro-pie-legend { grid-template-columns: 1fr; }
  .pro-weekdays { gap: 6px; height: 140px; }
  .pro-price strong { font-size: 28px; }
  .pro-hero h2 { font-size: 20px; }
}
@media (max-width: 359px) {
  .pro-kpis, .pro-kpi-row, .pro-summary, .pro-locked-preview .pro-kpis { grid-template-columns: minmax(0,1fr); }
  .pro-forecast-head, .pro-mini-stats { grid-template-columns: minmax(0,1fr); }
}
