/* Chart-first study: scoped to Home. The rest of the planner remains unchanged. */
#homeView{
 --chart-line:#cfdae0;
 --chart-paper:#fff;
 --chart-ink:#1b303a;
 --chart-muted:#526872;
 --chart-slate:#eaf0f4;
 --chart-blue:#e5eff4;
 --chart-mint:#e7f1ed;
 --chart-warm:#f6ede0;
 --chart-mark:#24675e;
 --chart-category0:#5b9b8a;--chart-category1:#779db6;--chart-category2:#d3ad74;
 --chart-category3:#b98391;--chart-category4:#9ba8b2;
}
html[data-theme="dark"] #homeView{
 --chart-line:#455764;
 --chart-paper:#182731;
 --chart-ink:#e5edf0;
 --chart-muted:#b9cbd6;
 --chart-slate:#263946;
 --chart-blue:#253c4b;
 --chart-mint:#24403c;
 --chart-warm:#41372b;
 --chart-mark:#9bdbcf;
 --chart-category0:#83bbaa;--chart-category1:#8cacbf;--chart-category2:#e0ba82;
 --chart-category3:#c792a2;--chart-category4:#9dabb7;
}
#homeView .chartDashboard{display:grid;gap:12px;min-width:0;color:var(--chart-ink)}
#homeView .chartDashboardIntro{display:flex;justify-content:space-between;align-items:baseline;gap:12px;border-top:1px solid var(--chart-line);padding:7px 0 1px}
#homeView .chartDashboardIntro h2{margin:0;font-size:1.19rem;letter-spacing:-.02em}
#homeView .chartDashboardIntro>span{color:var(--chart-muted);font-size:.82rem;white-space:nowrap}
#homeView .chartDashboardCards{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;min-width:0}
#homeView .chartDashboardCards>[data-dashboard-card]{flex:1 1 100%;min-width:0}
#homeView .chartDashboardCards>.chartPanel--calendar{flex-basis:calc((100% - 20px)*.27)}
#homeView .chartDashboardCards>.chartPanel--allocation{flex-basis:calc((100% - 20px)*.43)}
#homeView .chartDashboardCards>.chartPanel--summary{flex-basis:calc((100% - 20px)*.30)}
#homeView .chartDashboardCards>:is(.chartPanel--cash,.chartPanel--pattern){flex-basis:calc((100% - 10px)*.5)}
#homeView .dashboardActions{flex-wrap:wrap}
#homeView #dashboardOrderStatus{margin:0;font-size:.86rem}
#homeView #dashboardOrderStatus:empty{display:none}
#homeView .chartPanel{min-width:0;border:1px solid var(--chart-line);background:var(--chart-paper);display:flex;flex-direction:column}
#homeView .chartPanelHeading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:46px;padding:6px 9px;border-bottom:1px solid var(--chart-line);background:var(--chart-slate)}
#homeView .chartPanel--calendar .chartPanelHeading,#homeView .chartPanel--cash .chartPanelHeading{background:var(--chart-blue)}
#homeView .chartPanel--summary .chartPanelHeading,#homeView .chartPanel--ledger .chartPanelHeading{background:var(--chart-mint)}
#homeView .chartPanel--pattern .chartPanelHeading{background:var(--chart-warm)}
#homeView .chartPanelHeading h3{margin:0;font-size:.98rem;line-height:1.25;letter-spacing:-.015em}
#homeView .chartPanelKicker{display:block;margin:0 0 2px;color:var(--chart-muted);font-size:.69rem;font-weight:650;text-transform:uppercase;letter-spacing:.075em}
#homeView .chartRoute{min-height:30px;padding:4px 7px;border:1px solid var(--chart-line);border-radius:2px;background:var(--chart-paper);color:var(--chart-ink);font-size:.75rem;font-weight:630;white-space:nowrap}
#homeView .chartRoute:hover{border-color:var(--chart-mark);color:var(--chart-mark)}
#homeView .chartPanelNote{margin:auto 0 0;padding:6px 9px;border-top:1px solid var(--chart-line);color:var(--chart-muted);font-size:.75rem;line-height:1.4}
#homeView .chartCalendar{padding:5px 8px 4px}
#homeView :is(.chartCalendarWeekdays,.chartCalendarDates){display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;text-align:center}
#homeView .chartCalendarWeekdays span{line-height:24px;font-size:.72rem;color:var(--chart-muted);font-weight:600}
#homeView .chartDay{
 position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:25px;
 border:1px solid transparent;border-radius:2px;background:var(--chart-paper);padding:1px 0 5px;font-size:.8rem;color:var(--chart-ink);font-variant-numeric:tabular-nums
}
#homeView .chartDay[aria-current="date"]{background:var(--chart-mint)!important;border-color:var(--chart-mark)!important;color:var(--chart-ink)!important;font-weight:700}
#homeView .chartDay:hover,#homeView .chartDay:focus-visible{border-color:var(--chart-mark)!important}
#homeView .chartDay>i,#homeView .chartCalendarKey>i{width:4px;height:4px;border-radius:50%;background:var(--chart-mark);display:inline-block}
#homeView .chartDay>i{position:absolute;bottom:3px;left:calc(50% - 2px)}
#homeView .chartCalendarKey{border-top:1px solid var(--chart-line);margin:5px 0 0;padding:6px 0 0;font-size:.73rem;color:var(--chart-muted);line-height:1.4}
#homeView .chartCalendarKey>i{margin:0 3px 2px 0}
#homeView .chartCalendarKey>span{white-space:nowrap}
#homeView .chartDonutBody{display:grid;grid-template-columns:minmax(86px,128px) minmax(0,1fr);gap:7px;align-items:center;flex:1;padding:8px}
#homeView .chartDonut{width:100%;height:auto;min-width:0;overflow:visible}
#homeView .chartDonut :is(.chartDonutTrack,.chartDonutSlice){fill:none;stroke-width:16}
#homeView .chartDonutTrack{stroke:var(--chart-slate)}
#homeView .chartDonutAmount{font-family:inherit;fill:var(--chart-ink);font-weight:700;font-size:14px;font-variant-numeric:tabular-nums}
#homeView .chartDonutNote{font-family:inherit;fill:var(--chart-muted);font-size:10px}
#homeView .chartPart0{--chart-part:var(--chart-category0)}
#homeView .chartPart1{--chart-part:var(--chart-category1)}
#homeView .chartPart2{--chart-part:var(--chart-category2)}
#homeView .chartPart3{--chart-part:var(--chart-category3)}
#homeView .chartPart4{--chart-part:var(--chart-category4)}
#homeView .chartDonutSlice{stroke:var(--chart-part)}
#homeView .chartAllocationLegend{list-style:none;padding:0;margin:0}
#homeView .chartAllocationLegend li{display:grid;grid-template-columns:7px minmax(0,1fr) auto auto;gap:5px;align-items:baseline;padding:5px 0;border-bottom:1px solid var(--chart-line);min-width:0;font-size:.77rem}
#homeView .chartAllocationLegend li:last-child{border-bottom:0}
#homeView .chartAllocationLegend li>i{width:7px;height:7px;background:var(--chart-part)}
#homeView .chartAllocationLegend li>span{overflow-wrap:anywhere;line-height:1.25}
#homeView .chartAllocationLegend li>strong{font-size:.75rem;font-weight:660;white-space:nowrap;font-variant-numeric:tabular-nums}
#homeView .chartAllocationLegend li>small{color:var(--chart-muted);text-align:right;font-size:.69rem;white-space:nowrap}
#homeView .chartSummaryList{display:grid;gap:0;margin:0;flex:1;align-content:center}
#homeView .chartSummaryList>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 9px;border-bottom:1px solid var(--chart-line)}
#homeView .chartSummaryList>div:last-child{border-bottom:0}
#homeView .chartSummaryList dt{font-size:.82rem;font-weight:600;min-width:0}
#homeView .chartSummaryList dt>small{display:block;color:var(--chart-muted);font-size:.71rem;font-weight:400;line-height:1.35;margin-top:1px}
#homeView .chartSummaryList dd{margin:0;text-align:right;white-space:nowrap;font-size:1.03rem;font-weight:650;font-variant-numeric:tabular-nums}
#homeView .chartSummaryList>.chartSummaryEmphasis{background:var(--chart-mint)}
#homeView .chartSummaryEmphasis dd{color:var(--chart-mark);font-size:1.19rem}
#homeView .chartBarsBody{padding:7px 8px 6px;flex:1}
#homeView .chartBarLegend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 14px;margin-bottom:3px;color:var(--chart-muted);font-size:.77rem}
#homeView .chartBarLegend span{white-space:nowrap}
#homeView .chartBarLegend i{display:inline-block;width:9px;height:9px;margin-right:5px}
#homeView .chartBarA{fill:var(--chart-category0);background:var(--chart-category0)}
#homeView .chartBarB{fill:var(--chart-category1);background:var(--chart-category1)}
#homeView .chartPanel--pattern .chartBarB{fill:var(--chart-category2);background:var(--chart-category2)}
#homeView .chartBars{display:block;width:100%;max-height:154px}
#homeView .chartGuide{stroke:var(--chart-line);stroke-width:1;vector-effect:non-scaling-stroke}
#homeView .chartTick{fill:var(--chart-muted);font:11px system-ui,sans-serif}
#homeView .chartValues{font-size:.8rem;margin-top:3px}
#homeView .chartValues>summary{cursor:pointer;width:fit-content;font-weight:600;color:var(--chart-ink)}
#homeView .chartValues[open]>summary{margin-bottom:5px}
#homeView .chartMoreBills{padding:5px 9px}
#homeView .chartTableScroll{max-width:100%;overflow-x:auto}
#homeView .chartTableScroll table{width:100%;border-collapse:collapse}
#homeView .chartTableScroll :is(th,td){padding:5px 8px;font-size:.83rem;border-bottom:1px solid var(--chart-line);text-align:left;line-height:1.3}
#homeView .chartTableScroll tbody th{background:transparent!important;color:var(--chart-ink)!important;font-weight:600}
#homeView .chartTableScroll :is(th,td):nth-child(3){text-align:right;font-variant-numeric:tabular-nums}
#homeView .chartTableScroll tbody :is(th,td)>small{display:block;color:var(--chart-muted);font-weight:400;font-size:.72rem;line-height:1.4}
#homeView .chartTableScroll thead th{background:var(--chart-slate)!important;color:var(--chart-ink)!important;white-space:nowrap}
#homeView .chartBillsTable thead th:last-child{min-width:82px}
#homeView .chartEmpty{padding:7px 9px;margin:0;font-size:.85rem}
#homeView .chartBankPosition{border:1px solid var(--chart-line);background:var(--chart-paper)}
#homeView .chartBankPosition>summary{cursor:pointer;padding:9px 10px;background:var(--chart-blue);color:var(--chart-ink);font-size:.96rem;font-weight:700}
#homeView .chartBankPosition[open]>summary{border-bottom:1px solid var(--chart-line)}
#homeView .chartBankDetail{padding:6px 8px 8px}
#homeView .chartBankDetail>.dashboardViewToggle{width:max-content;margin:4px 0}
#homeView .chartDashboardCards>.panel{margin:0;border:1px solid var(--chart-line);border-radius:0;background:var(--chart-paper)}
#homeView .chartDashboardCards>.panel>.sectionhead{padding:8px 10px;border-bottom:1px solid var(--chart-line);background:var(--chart-mint);color:var(--chart-ink)}
#homeView .chartDashboardCards>.panel>.sectionhead :is(h2,p){margin:0}
#homeView .chartDashboardCards>.panel>.sectionhead h2{font-size:.98rem}
#homeView .chartDashboardCards>.panel>.sectionhead p{color:var(--chart-muted)}
#homeView .chartDashboardCards>.panel .dashboardDue{padding:0}
#homeView .chartDashboardCards>.panel .dashboardDue>p{margin:0;padding:8px 10px}
#dashboardOrderDialog{width:min(31rem,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto;background:var(--pp-surface);color:var(--pp-ink)}
#dashboardOrderForm{display:grid;gap:10px;padding:14px}
#dashboardOrderForm :is(h2,p){margin:0}
#dashboardOrderForm p{font-size:.88rem;line-height:1.4}
#dashboardOrderList{list-style:none;margin:0;padding:0;border-top:1px solid var(--pp-line)}
#dashboardOrderList li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 0;border-bottom:1px solid var(--pp-line);font-size:.92rem}
#dashboardOrderList li>span{min-width:0;overflow-wrap:anywhere}
#dashboardOrderList li>div,.dashboardOrderActions>div{display:flex;flex:0 0 auto;align-items:center;gap:5px}
#dashboardOrderList button{min-width:48px;min-height:32px;padding:3px 8px;font-size:.88rem}
.dashboardOrderActions{display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:wrap}
#dashboardOrderAnnouncement{color:var(--pp-ink)}
#dashboardOrderAnnouncement:empty{display:none}
@media(max-width:1200px) and (min-width:701px){
 #homeView .chartDonutBody{grid-template-columns:minmax(72px,91px) minmax(0,1fr)}
 #homeView .chartAllocationLegend li{grid-template-columns:7px minmax(0,1fr) auto}
 #homeView .chartAllocationLegend li>small{grid-column:3}
}
@media(max-width:970px){
 #homeView .chartDashboardCards>:is(.chartPanel--calendar,.chartPanel--allocation){flex-basis:calc((100% - 10px)*.5)}
 #homeView .chartDashboardCards>.chartPanel--summary{flex-basis:100%}
 #homeView .chartSummaryList{grid-template-columns:repeat(auto-fit,minmax(115px,1fr))}
 #homeView .chartSummaryList>div{border-bottom:0;border-right:1px solid var(--chart-line);grid-template-columns:1fr;gap:2px}
 #homeView .chartSummaryList dd{text-align:left}
}
@media(max-width:700px){
 #homeView .chartDashboardCards{gap:8px}
 #homeView .chartDashboardCards>[data-dashboard-card]{flex-basis:100%}
 #homeView #arrangeDashboard,#dashboardOrderList button,.dashboardOrderActions button{min-height:44px}
 #homeView .chartDashboard{gap:8px}
 #homeView .chartDashboardIntro>span{white-space:normal;text-align:right}
 #homeView .chartRoute{min-height:44px}
 #homeView .chartCalendarWeekdays span{line-height:25px}
 #homeView .chartDay{min-height:40px}
 #homeView .chartCalendarDates{gap:0}
 #homeView .chartDonutBody{grid-template-columns:minmax(95px,120px) minmax(0,1fr)}
 #homeView .chartAllocationLegend li>strong{font-size:.79rem}
 #homeView .chartSummaryList{grid-template-columns:minmax(0,1fr)}
 #homeView .chartSummaryList>div{grid-template-columns:minmax(0,1fr) auto;gap:9px;border-right:0;border-bottom:1px solid var(--chart-line)}
 #homeView .chartSummaryList dd{text-align:right}
 #homeView .chartValues>summary,#homeView .chartBankPosition>summary{min-height:44px;padding-block:10px}
 #homeView .chartTableScroll :is(th,td){padding-inline:6px}
 #homeView .chartBillsTable td:nth-child(3){white-space:nowrap}
}
