/* Final layout: retain existing views and theme behaviour. */
html body #crmSidebar #sidebarDrawer .workspace-nav,html body #workspaceTabs{display:none!important}
html body #crmSidebar #sidebarDrawer .sidebar-view-list{margin:0!important;padding:0!important;border:0!important}
html body #crmSidebar #sidebarDrawer .sidebar-view-link{min-height:38px!important;height:auto!important;margin:2px 0!important;padding:9px 10px!important}
html body:is(.crm-day,.crm-night) #view-dashboard .stats .stat{min-height:96px!important;background:var(--ui-card)!important;border:1px solid var(--ui-line)!important;border-top:3px solid #209c89!important;box-shadow:none!important}
html body:is(.crm-day,.crm-night) #view-dashboard .stats .stat .value{font-size:25px!important;line-height:1.2!important}
html body:is(.crm-day,.crm-night) .content{background:var(--ui-bg)!important;background-image:none!important}
html{max-width:100%}body{min-width:0!important}*,*:before,*:after{box-sizing:border-box}
html body .shell{grid-template-columns:minmax(0,1fr)!important}
html body .content{min-width:0!important;padding:18px 18px 18px 222px!important}
html body .sidebar{width:200px!important;padding:10px 8px!important;overflow-y:auto!important}
html body .sidebar .nav-btn{padding:8px 10px!important;margin:1px 0!important;font-size:12px!important;min-height:34px!important}
html body .sidebar .menu-title{padding:8px 10px 4px!important;font-size:10px!important}
html body #view-dashboard{margin:0!important;padding:0!important;background:none!important;border-radius:0!important}
html body #view-dashboard:before{display:none!important}
html body #view-dashboard .dashboard-head{min-height:0!important;padding:0!important;margin:0 0 20px!important;gap:12px;flex-wrap:wrap}
html body #view-dashboard .dashboard-head h2{font-size:25px!important;letter-spacing:-.6px!important;text-shadow:none!important;color:var(--ui-text)!important}
html body #view-dashboard .dashboard-subtitle{color:var(--ui-muted)!important}
html body #view-dashboard .stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
html body #view-dashboard .stat,html body #view-dashboard .pro-panel{background:var(--ui-card)!important;border:1px solid var(--ui-line)!important;border-radius:14px!important;box-shadow:none!important;padding:16px!important;min-width:0!important}
html body #view-dashboard .stat .value{font-size:25px!important;color:var(--ui-text)!important;overflow-wrap:anywhere}
html body #view-dashboard .stat .label{font-size:12px!important;color:var(--ui-muted)!important;margin-bottom:10px}
html body #view-dashboard .pro-panel h3{color:var(--ui-text)!important;font-size:15px!important;margin:0 0 18px}
.final-filter{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.final-filter button,.final-expense-form button{border:1px solid var(--ui-line);background:var(--ui-card);color:var(--ui-text);padding:9px 13px;border-radius:8px;font-size:12px}
.final-filter button[aria-pressed=true]{background:#177d70;color:#fff;border-color:#177d70}
#directorCustomDates:not([hidden]){display:flex;flex-wrap:wrap;align-items:end;gap:8px;width:100%;margin-top:8px}
.final-filter label,.final-expense-form label{display:grid;gap:5px;font-size:12px;min-width:0}
.final-filter input,.final-expense-form input{padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-card);color:var(--ui-text);max-width:100%;min-width:0}
.final-note{font-size:12px;line-height:1.6;color:var(--ui-muted)}
.final-charts{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;margin:14px 0}
.final-donut-layout{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.final-donut{width:154px;height:154px;border-radius:50%;position:relative;flex:0 0 154px;display:grid;place-items:center}
.final-donut>div{width:112px;height:112px;border-radius:50%;background:var(--ui-card);display:flex;flex-direction:column;align-items:center;justify-content:center}
.final-donut b{font-size:28px}.final-donut span{font-size:11px;color:var(--ui-muted)}
.final-legend{display:flex;gap:8px;font-size:12px;align-items:center;margin:10px 0}.final-legend i{width:9px;height:9px;border-radius:50%}.final-legend b{margin-left:auto}
.final-expense-form{display:flex;gap:10px;flex-wrap:wrap;align-items:end;padding:16px 0}
#directorResults[aria-busy=true]{opacity:.55;pointer-events:none}
html body .view,html body .topbar>*{min-width:0;max-width:100%}
html body #view-dashboard .pro-row{grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,.6fr)) minmax(0,1.5fr) minmax(0,.6fr)!important;gap:10px!important}
html body #view-dashboard .pro-row>*{min-width:0;overflow-wrap:anywhere}
@media(max-width:800px){html body .shell{grid-template-columns:minmax(0,1fr)!important}html body #crmSidebar{width:100%!important;height:auto!important;position:relative!important;top:0!important;left:0!important;max-height:none!important}html body #sidebarDrawer{position:static!important;max-height:none!important}html body .content{padding:12px!important}.final-charts{grid-template-columns:minmax(0,1fr)}html body #view-dashboard .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.final-expense-form label{flex:1 1 150px}}
@media(max-width:480px){html body #view-dashboard .stat{padding:12px!important}html body #view-dashboard .stat .value{font-size:20px!important}html body #view-dashboard .pro-row{grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr))!important}}
