/* Global shell: readable controls, compact desktop navigation, mobile menu. */
.workspace,.workspace main,.topbar,.topbar-actions,.workspace-title,.grid>*{min-width:0}
.workspace main{max-width:1450px}
.sidebar{width:210px;padding:14px 12px}
.workspace.signed{margin-left:210px}
.brand-panel{height:75px;margin:0 8px 14px;flex-shrink:0}
.brand-panel img{width:100px;height:65px}
.sidebar-caption{font-size:10px;line-height:1.5;margin-bottom:10px}
.side-nav{gap:3px;min-height:0;flex-shrink:1;overflow-y:auto;overscroll-behavior:contain}
.side-nav a{min-height:34px;padding:7px 11px;font-size:13px;gap:10px;flex-shrink:0;line-height:1.4}
.side-nav a span{font-size:17px;width:18px;flex-shrink:0}
.sidebar-bottom{padding:12px 11px 0;flex-shrink:0}
.sidebar-bottom span{font-size:12px}.sidebar-bottom small{font-size:11px;line-height:1.4}
.topbar{min-height:68px;padding:12px 24px;gap:14px}
.topbar-actions{gap:12px}.topbar-actions a{font-size:12px}.website-link{padding:7px 10px}
.workspace-footer{padding:10px 24px;min-height:36px}
.cockpit-menu-toggle{display:none}
.cockpit-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.cockpit-table-scroll:focus-visible{outline:2px solid #742c3c;outline-offset:3px}
input,select,textarea{max-width:100%}
button,.btn,a{touch-action:manipulation}
@media(min-width:901px) and (max-height:760px){
 .sidebar{padding:10px 10px}.brand-panel{height:56px;margin-bottom:10px}.brand-panel img{height:49px;width:85px}
 .sidebar-caption{margin-bottom:7px;font-size:9px}.side-nav{gap:2px}.side-nav a{padding:5px 10px;min-height:30px;font-size:12px}
 .sidebar-bottom{padding-top:8px}.sidebar-bottom small{font-size:10px}
 .topbar{min-height:60px;padding:9px 24px}.workspace-footer{min-height:30px;padding:7px 24px}
}
/* Home only: two compact bands rather than tall stacks of KPI cards. */
.cockpit-home{padding:clamp(14px,2.5vh,26px) 24px!important}
.cockpit-home .welcome-row{margin-bottom:clamp(10px,2vh,20px);gap:18px}
.cockpit-home .welcome-row h1{font-size:clamp(25px,3vw,32px);margin:3px 0;line-height:1.2}
.cockpit-home .eyebrow{font-size:10px}
.cockpit-home .dashboard-intro{font-size:13px;margin:4px 0 0;line-height:1.5}
.cockpit-home .npm-brand-card{padding:3px 10px}
.cockpit-home .npm-brand-card img{width:140px;height:72px}
.cockpit-home .dashboard-section{margin:clamp(10px,2vh,20px) 0 0}
.cockpit-home .section-heading{margin-bottom:10px;gap:10px}
.cockpit-home .section-heading h2{font-size:17px;line-height:1.4}
.cockpit-home .section-heading>span{font-size:11px}
.cockpit-home .kpi-grid{gap:12px}
.cockpit-home .kpi-card{min-height:0;padding:clamp(12px,2vh,20px);border-radius:14px}
.cockpit-home .kpi-heading{margin-bottom:10px}
.cockpit-home .kpi-icon{width:30px;height:30px;font-size:18px;border-radius:9px}
.cockpit-home .kpi-label{font-size:12px;line-height:1.4}
.cockpit-home .kpi-value{font-size:clamp(29px,4.5vh,40px);margin:5px 0 10px;letter-spacing:-1px}
.cockpit-home .kpi-value.money{font-size:clamp(23px,2.2vw,32px);overflow-wrap:anywhere}
.cockpit-home .kpi-value small{font-size:16px}
.cockpit-home .kpi-breakdown{gap:4px;padding-top:8px;font-size:10px}
.cockpit-home .kpi-status{padding-top:8px;font-size:11px}
.cockpit-home .kpi-note{font-size:11px;line-height:1.4;margin-bottom:10px}
.cockpit-home .kpi-link{font-size:11px;line-height:1.4}
@media(min-width:901px){
 .cockpit-home .activity-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .cockpit-home .tracking-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .cockpit-home .kpi-card{min-height:clamp(155px,25vh,205px)}
 .cockpit-home .tracking{min-height:clamp(145px,24vh,195px)}
}
@media(min-width:901px) and (max-height:680px){
 .cockpit-home{padding:12px 20px!important}
 .cockpit-home .welcome-row{margin-bottom:8px}.cockpit-home .welcome-row h1{font-size:26px}
 .cockpit-home .npm-brand-card img{width:112px;height:55px}
 .cockpit-home .dashboard-section{margin-top:10px}.cockpit-home .section-heading{margin-bottom:7px}
 .cockpit-home .kpi-card{padding:12px;min-height:150px}.cockpit-home .tracking{min-height:145px}
 .cockpit-home .kpi-heading{margin-bottom:7px}.cockpit-home .kpi-value{font-size:30px;margin:4px 0 7px}
 .cockpit-home .kpi-icon{height:26px;width:26px;font-size:16px}.cockpit-home .kpi-breakdown{padding-top:6px}
}
/* Tablets and phones: keep useful type sizes and use a collapsible navigation. */
@media(max-width:900px){
 .sidebar{position:relative;inset:auto;width:100%;padding:10px 18px;display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:8px 14px}
 .brand-panel{width:100px;height:48px;margin:0;grid-column:1;grid-row:1}
 .brand-panel img{height:42px;width:75px}
 .sidebar-caption,.sidebar-bottom{display:none}
 .cockpit-menu-toggle{display:none;justify-self:end;grid-column:2;grid-row:1;min-height:44px;margin:0;background:#39373b;color:#fff;border:1px solid #6b5b63}
 html.cockpit-menu-ready .cockpit-menu-toggle{display:block}
 .side-nav{grid-column:1/-1;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px;overflow:visible}
 html.cockpit-menu-ready .side-nav{display:none}
 html.cockpit-menu-ready .sidebar.menu-open .side-nav{display:flex}
 .side-nav a{min-height:44px;padding:9px 12px;font-size:14px}
 .side-nav a span{display:inline;font-size:17px}
 .workspace.signed{margin-left:0}
 .workspace{min-height:calc(100svh - 68px)}
 .topbar{padding:12px 18px;min-height:68px;align-items:center;flex-direction:row}
 .workspace-kicker{font-size:10px}.workspace-title b{font-size:14px}.workspace-title{min-width:0}
 .topbar-actions{gap:6px 10px;justify-content:flex-end}.topbar-actions a{font-size:12px}
 .workspace main{padding:20px 18px 28px}
 .workspace-footer{padding:10px 18px}
 .cockpit-home .activity-grid,.cockpit-home .tracking-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cockpit-home .tracking:last-child{grid-column:1/-1}
 .cockpit-home .kpi-card{min-height:155px;padding:15px}
 .cockpit-home .kpi-value.money{font-size:29px}
 .cockpit-home .kpi-label{font-size:13px}
 .cockpit-home .kpi-note,.cockpit-home .kpi-link,.cockpit-home .kpi-breakdown{font-size:12px}
 .card,fieldset{min-width:0;max-width:100%}
 .actions,.heading,.detail-heading{flex-wrap:wrap}
 .ai-layout{grid-template-columns:1fr!important}
 .ai-main,.ai-sidebar{min-width:0;max-width:100%}
}
@media(max-width:600px){
 .topbar{align-items:flex-start;gap:8px;flex-direction:column;padding:10px 16px}
 .topbar-actions{justify-content:flex-start;gap:6px 10px}
 .topbar-actions a{min-height:32px;display:inline-flex;align-items:center}
 .website-link{padding:4px 8px}
 .cockpit-home{padding:16px!important}
 .cockpit-home .welcome-row{align-items:center;gap:10px}
 .cockpit-home .welcome-row h1{font-size:24px}
 .cockpit-home .dashboard-intro{font-size:12px}
 .cockpit-home .npm-brand-card img{width:85px;height:55px}
 .cockpit-home .section-heading h2{font-size:16px}
 .cockpit-home .section-heading>span{font-size:10px}
 .cockpit-home .kpi-grid{gap:10px}
 .cockpit-home .kpi-card{min-height:165px;padding:12px}
 .cockpit-home .tracking:last-child{grid-column:1/-1;min-height:150px}
 .cockpit-home .kpi-label{font-size:12px}
 .cockpit-home .kpi-value.money{font-size:25px}
 .cockpit-home .kpi-breakdown>span{flex-wrap:wrap;gap:2px 6px}
 .cockpit-home .kpi-breakdown{font-size:11px}
 .cockpit-home .kpi-link{font-size:11px}
 .grid,.home-modules,.drilldown-grid{grid-template-columns:minmax(0,1fr)}
 input,select,textarea{font-size:16px}
 .ai-scope{grid-template-columns:1fr!important}
}
@media(max-width:360px){
 .cockpit-home .activity-grid,.cockpit-home .tracking-grid{grid-template-columns:minmax(0,1fr)}
 .cockpit-home .kpi-card{min-height:145px}
 .cockpit-home .kpi-breakdown>span{flex-wrap:nowrap}
 .cockpit-home .npm-brand-card{display:none}
}
@media print{.cockpit-menu-toggle{display:none!important}.workspace.signed{margin:0}.cockpit-table-scroll{overflow:visible}}
@media(min-width:901px) and (max-height:620px){
 .cockpit-home .kpi-card{padding:10px;min-height:140px}
 .cockpit-home .kpi-value{margin-bottom:5px}.cockpit-home .kpi-heading{margin-bottom:5px}
 .cockpit-home .section-heading{margin-bottom:5px}.cockpit-home .dashboard-section{margin-top:8px}
}
