/* UNDURUV / SAVDO unified dashboard */
.dash-switch-head{display:flex;align-items:center;justify-content:center;gap:14px;margin:0 0 16px;padding:8px 10px;border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:var(--shadow)}
.dash-switch-kicker{font-weight:900;letter-spacing:.08em;font-size:13px}
.dash-mode-buttons{display:flex;gap:5px;background:var(--surface);padding:4px;border-radius:10px}
.dash-mode-buttons button{border:0;background:transparent;color:var(--muted);padding:7px 18px;border-radius:8px;min-height:34px;font-weight:800;cursor:pointer}
.dash-mode-buttons button.active{background:var(--red);color:#fff;box-shadow:0 4px 14px color-mix(in srgb,var(--red) 26%,transparent)}
.dashboard-hero{overflow:hidden}
.branch-pill{border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-weight:800;font-size:11px;white-space:nowrap}
.hero-layout{display:grid;grid-template-columns:minmax(250px,.72fr) minmax(0,2fr);gap:24px;align-items:center}
.hero-donut{display:grid;place-items:center;gap:12px}
.donut{position:relative;width:230px;aspect-ratio:1;border-radius:50%;background:conic-gradient(#347df0 calc(var(--donut)*1%),#16b875 0 75%,#e8eef6 0);display:grid;place-items:center}
.donut:after{content:"";position:absolute;inset:42px;border-radius:50%;background:var(--card)}
.donut-core{position:relative;z-index:1;text-align:center}.donut-core small{display:block;font-weight:800}.donut-core b{display:block;font-size:46px;line-height:1;margin-top:8px}
.donut-legend,.chart-legend{display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:11px;font-weight:800;color:var(--muted)}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.dot.sof{background:#347df0}.dot.coll{background:#16b875}.dot.naqd{background:#ff9b32}.dot.income{background:#347df0}.dot.debt{background:#16b875}
.hero-right{display:grid;gap:12px}.hero-metrics-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.hero-metrics-2{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.hero-metric{border:1px solid var(--line);border-radius:14px;padding:15px;background:var(--card);min-height:96px;min-width:0}.hero-metric small{display:block;color:var(--muted);font-weight:800}.hero-metric b{display:block;font-size:21px;margin:7px 0 2px;overflow-wrap:anywhere}.hero-metric span{font-size:10px;color:var(--muted)}
.hero-metric.sof{box-shadow:inset 3px 0 #347df0}.hero-metric.coll{box-shadow:inset 3px 0 #16b875}.hero-metric.naqd{box-shadow:inset 3px 0 #ff9b32}
.plan-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden}
.plan-strip>div{padding:10px 12px;border-right:1px solid var(--line)}.plan-strip>div:last-child{border-right:0}.plan-strip small{display:block;color:var(--muted);font-size:10px}.plan-strip b{font-size:15px}.danger-text{color:#dc263f!important}
.target-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.target-card{min-width:0}.target-pct{font-size:20px;font-weight:900;color:var(--red)}
.target-edit{display:flex;gap:8px;margin-top:12px}.target-edit input{min-width:0;flex:1}.target-edit button{white-space:nowrap}
.summary-pills{display:flex;gap:10px;flex-wrap:wrap}.summary-pills>span{min-width:160px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.summary-pills b{display:block;font-size:16px}.summary-pills small{color:var(--muted)}
.range-tabs{display:inline-flex;gap:4px;padding:4px;background:var(--surface);border-radius:12px;margin:10px 0}.range-tabs button{border:0;background:transparent;color:var(--muted);border-radius:9px;padding:7px 18px;min-height:34px;font-weight:800;cursor:pointer}.range-tabs button.active{background:#4b62f3;color:#fff;box-shadow:0 5px 14px #4b62f333}
.daily-chart{height:310px;display:flex;align-items:flex-end;gap:4px;overflow-x:auto;padding:42px 8px 4px;border-top:1px solid var(--line);margin-top:12px}
.chart-day{position:relative;flex:1 0 28px;min-width:28px;height:260px;border:0;background:transparent;padding:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;cursor:crosshair;color:var(--text)}
.chart-day:hover,.chart-day:focus{z-index:20;outline:none}.chart-count{position:absolute;top:0;font-size:9px;font-weight:900}.stack-bars{height:222px;width:100%;display:flex;flex-direction:column-reverse;justify-content:flex-start;align-items:stretch}.stack-bars i{display:block;width:100%;min-height:0}.bar-sof{background:#347df0}.bar-coll{background:#16b875}.bar-naqd{background:#ff9b32}
.dual-bars{height:222px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}.dual-bars i{display:block;width:42%;border-radius:3px 3px 0 0}.bar-income{background:#347df0}.bar-debt{background:#16b875}
.chart-date{height:25px;font-size:9px;font-weight:800;padding-top:6px}.chart-pop{display:none;position:absolute;left:50%;bottom:70px;transform:translateX(-50%);width:225px;background:#261d51;color:#fff;border-radius:13px;padding:12px;text-align:left;box-shadow:0 16px 35px #0005;z-index:99;pointer-events:none}
.chart-day:hover .chart-pop,.chart-day:focus .chart-pop{display:grid;gap:7px}.chart-pop>b{font-size:11px;margin-bottom:2px}.chart-pop>span{display:flex;align-items:center;gap:6px;font-size:10px}.chart-pop strong{margin-left:auto;font-size:10px}.chart-total{border-top:1px solid #ffffff33;padding-top:7px;margin-top:2px}
.flow-cards{grid-template-columns:repeat(4,1fr)}
.period-cell{min-width:210px;display:grid;gap:5px}.period-cell>div{display:flex;justify-content:space-between;gap:10px}.period-cell span{font-size:10px;color:var(--muted)}.period-cell b{font-size:11px}.metric-stack em{font-style:normal;font-size:9px;background:var(--greenbg);padding:2px 5px;border-radius:99px;margin-left:4px}
@media(max-width:1050px){.hero-layout{grid-template-columns:1fr}.hero-donut{padding:8px}.donut{width:205px}.target-grid{grid-template-columns:1fr}.flow-cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.dash-switch-head{justify-content:space-between;position:sticky;top:0;z-index:5}.dash-switch-kicker{font-size:11px}.dash-mode-buttons button{padding:6px 12px}.hero-metrics-3{grid-template-columns:1fr 1fr}.hero-metrics-3 .hero-metric:last-child{grid-column:1/-1}.hero-metrics-2{grid-template-columns:1fr}.donut{width:180px}.daily-chart{height:280px}.summary-pills>span{min-width:120px;flex:1}.flow-cards{grid-template-columns:1fr 1fr}.target-edit{flex-direction:column}}
@media(max-width:420px){.hero-metrics-3,.flow-cards{grid-template-columns:1fr}.hero-metrics-3 .hero-metric:last-child{grid-column:auto}}
/* 2026-09-27 mobile reference polish */
.dashboard-compact-controls{display:flex;gap:8px;align-items:center;margin:0 0 10px}
.dashboard-compact-controls input,.dashboard-compact-controls select,.dash-fixed-branch{height:42px;border:1px solid #d9e3ee;border-radius:13px;background:#fff;color:#102544;font-weight:800;padding:0 12px;min-width:0}
.dashboard-compact-controls input{flex:0 0 148px}.dashboard-compact-controls select,.dash-fixed-branch{flex:1}
.dashboard-analytics-filter{margin:0 0 12px;padding:10px 14px}.dashboard-analytics-filter summary{cursor:pointer;font-weight:800;color:var(--muted)}
.dashboard-reference .client-search-row{cursor:pointer}
@media(max-width:760px){
 body.dashboard-mode-active .main{background:#f4f7fb}
 body.dashboard-mode-active .topbar{background:#f4f7fb;border-color:#dce5ef;color:#102544;padding-bottom:8px}
 body.dashboard-mode-active .page-heading h2{font-size:30px;color:#102544}
 body.dashboard-mode-active .page-heading .muted,body.dashboard-mode-active .top-eyebrow{color:#738399}
 #view.dashboard-reference{background:#f4f7fb;color:#102544;padding-top:10px}
 #view.dashboard-reference .card{background:#fff;border:1px solid #d9e3ee;border-radius:24px;box-shadow:0 10px 30px #16345f0f;color:#102544}
 #view.dashboard-reference .muted{color:#748399}
 #view.dashboard-reference h3,#view.dashboard-reference b{color:#102544}
 #view.dashboard-reference .good{color:#12b76a!important}
 #view.dashboard-reference .danger-text{color:#e11d3f!important}
 #view.dashboard-reference .section-title h3:before{content:"▥";color:#e51d36;font-weight:900;margin-right:8px}
 .dashboard-compact-controls{position:sticky;top:0;z-index:8;background:#f4f7fb;padding:4px 0 8px;margin-bottom:6px}
 .dashboard-compact-controls input,.dashboard-compact-controls select,.dash-fixed-branch{height:46px;font-size:14px}
 .dash-switch-head{justify-content:space-between;background:#fff;border-color:#d9e3ee;border-radius:20px;padding:10px 12px;margin-bottom:16px}
 .dash-switch-kicker{color:#102544;font-size:12px}
 .dash-mode-buttons{background:#eef3f8}
 .dash-mode-buttons button{color:#677a91}
 .dash-mode-buttons button.active{background:#2fc0aa;color:#fff;box-shadow:0 8px 18px #2fc0aa38}
 .dashboard-hero{padding:18px 16px}
 .dashboard-hero .section-title{align-items:flex-start}
 .dashboard-hero .section-title h3{font-size:24px}
 .branch-pill{background:#fff;color:#102544;border-color:#d9e3ee}
 .hero-layout{gap:18px}.hero-donut{order:0}.hero-right{order:1}
 .donut{width:190px;background:conic-gradient(#347df0 calc(var(--donut)*1%),#16b875 0 75%,#edf2f7 0)}
 .donut:after{background:#fff}.donut-core b{font-size:42px;color:#102544}.donut-core small{color:#102544}
 .hero-metrics-3{grid-template-columns:1fr 1fr}.hero-metrics-3 .hero-metric:last-child{grid-column:1/2}
 .hero-metric{background:#fff;border-color:#d9e3ee;border-radius:18px;min-height:120px;padding:14px}
 .hero-metric b{font-size:21px;line-height:1.25}.hero-metric small,.hero-metric span{color:#748399}
 .hero-metric.sof{box-shadow:inset 0 3px #347df0}.hero-metric.coll{box-shadow:inset 0 3px #16b875}.hero-metric.naqd{box-shadow:inset 0 3px #ff9b32}
 .hero-metrics-2{grid-template-columns:1fr 1fr}.plan-strip{border-color:#d9e3ee;border-radius:16px;background:#fff}.plan-strip>div{border-color:#d9e3ee}
 .flow-cards{grid-template-columns:1fr 1fr}
 .target-grid{grid-template-columns:1fr}
 .summary-pills{display:grid;grid-template-columns:1fr;gap:10px;width:100%}.summary-pills>span{background:#fff;border-color:#d9e3ee;border-radius:18px;padding:18px 20px}.summary-pills b{font-size:24px;color:#102544}
 .range-tabs{display:grid;grid-template-columns:1fr 1fr;background:#eef3f8;width:100%;padding:5px}.range-tabs button{font-size:14px}.range-tabs button.active{background:#5360f3;color:#fff}
 .daily-chart{background:#fff;border-color:#e4eaf1;min-height:300px}.chart-pop{background:#281f55;border-radius:18px;width:min(250px,82vw);font-size:12px}
 .table-wrap{border:1px solid #e0e7ef;border-radius:18px;background:#fff}.table{color:#102544}.table th{background:#f6f8fb;color:#63758c}.table td{border-color:#e6ebf1}
 .dashboard-analytics-filter{background:#fff!important;border-radius:18px!important}.dashboard-analytics-filter summary{color:#63758c}
 .client-search-card{padding:12px!important}.client-search-card .searchline input{font-size:18px;min-height:54px;border-radius:16px}
 .client-search-results .client-search-row{touch-action:manipulation}.client-search-results .client-search-row:active{background:#eef8f6}
 body.dashboard-mode-active .app-footer{background:#f4f7fb;color:#7c8999}
}
@media(max-width:430px){
 .dashboard-compact-controls input{flex-basis:132px}
 .hero-metrics-3{grid-template-columns:1fr 1fr}.hero-metric b{font-size:19px}
 .flow-cards{grid-template-columns:1fr 1fr}
}
