/* CPGCBL EMD R19.14.0 – approved compact white shell across MAIN modules.
 * Scope is #mainShell, never #workFormStandalone, login or work-form.html.
 * Theme A (light) gets the white surface; B/C palettes retain their semantics.
 * CSS-only: no event handling, Worker, D1, R2, OCR, Save or Work Form mutation.
 */
body.r107-ui[data-theme="light"] #mainShell {
 --bg:#ffffff; --panel:#ffffff; --panel2:#fbfdff; --panel3:#f1f7fd;
 --emd-r15-bg:#ffffff; --emd-r15-surface:#ffffff;
 --emd-r15-pill:#f8fbff; --emd-r15-shadow:0 1px 3px #17314b0a;
 --dw-bg:#ffffff; --dw-card:#ffffff; --dw-card-2:#fbfdff;
}
body.r107-ui[data-theme="light"] #mainShell .main,
body.r107-ui[data-theme="light"] #mainShell #content {
 background:#ffffff!important;
 background-image:none!important;
}
/* Shell and main content: use more of the available horizontal real estate. */
body.r107-ui #mainShell #content{
 padding:6px 9px 15px!important;
 margin:0!important;
 max-width:none!important;
 min-width:0!important;
}
body.r107-ui #mainShell .top{min-height:56px!important;padding:7px 12px!important;gap:6px!important;}
body.r107-ui #mainShell .side #mainNav .navbtn{min-height:35px!important;}
/* MAIN pages (all non-Daily Work routes; Work Form is excluded by r15 scope). */
body.r107-ui.emd-r15-design #mainShell #content :is(.r5-shell,.r5-grid,.r5-split,.r115-report,.r4-chart-grid,.r4-workspaces,.r115-monthly,.r79-bearing-kpis){
 gap:5px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-hero,.r5-hero,.home-hero,.hero,.r105-hero,.r115-hero,.page-hero){
 min-height:58px!important;padding:8px 12px!important;margin-bottom:5px!important;
 border-radius:9px!important;gap:6px 11px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-hero,.r5-hero,.home-hero,.hero,.r105-hero,.r115-hero,.page-hero) :is(h1,h2){
 font-size:clamp(18px,1.6vw,23px)!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-kpi-grid,.r5-kpis,.r79-bearing-kpis,.r712-kpi-row,.r105-kpis,.r115-kpis,.grid4,.grid5,.admin-stat-grid){
 gap:5px!important;margin:0 0 5px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-kpi,.r5-kpi,.r712-kpi-tile,.r105-kpis article,.r115-kpi,.kpi,.parity-kpi,.mini-stat,.r5-status-card){
 min-height:63px!important;padding:8px 10px!important;border-radius:8px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.card,.r5-card,.r79-panel-card,.r105-card,.r115-card,.r4-detail-card,.r79-stock-card){
 padding:9px 11px!important;margin-top:0!important;margin-bottom:5px!important;
 border-radius:9px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-section-head,.r5-card-head,.r79-section-head,.table-head,.r105-card-head,.compact-admin-head,.r115-block-head){
 margin-bottom:5px!important;gap:5px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-tabs,.r5-tabs,.r4-filterbar,.r5-filter,.r115-filterbar,.r105-tabs){
 gap:5px!important;margin-bottom:5px!important;padding:5px 7px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-filterbar,.r5-filter,.r115-filterbar) :is(input,select,button){
 min-height:31px;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.tablewrap,.r5-tablewrap,.r5-table-wrap,.r115-table-scroll){
 margin-top:4px!important;margin-bottom:4px!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r4-asset-table,.r5-table,.r115-table,.table) :is(th,td){
 padding:7px 9px!important;font-size:11px!important;line-height:1.38!important;
}
body.r107-ui.emd-r15-design #mainShell #content :is(.r5-card,.r115-card,.r79-panel-card){
 box-shadow:0 1px 4px #112a4509!important;
}
/* Administration and Reports have their own layout systems; only their spacing is adjusted. */
body.r107-ui.emd-r15-design #mainShell #content .r115-report{gap:5px!important;}
body.r107-ui.emd-r15-design #mainShell #content .r115-report .r115-card{padding:9px 11px!important;}
body.r107-ui.emd-r15-design #mainShell #content .r115-kpis{gap:5px!important;}
body.r107-ui.emd-r15-design #mainShell #content .r115-monthly{gap:6px!important;}
body.r107-ui.emd-r15-design #mainShell #content .r115-table-scroll{max-height:540px;}
body.r107-ui.emd-r15-design #mainShell #content :is(.r105-admin-grid,.r105-admin-panels,.r105-admin-section,.r19-admin-layout){gap:5px!important;}
/* Daily Work: preserve its working 5+5 KPI layout, WR cards, interactions and art. */
body.r107-ui #mainShell #content .r114-dashboard{gap:4px!important;--dw-radius:10px;}
body.r107-ui[data-theme="light"] #mainShell #content .r114-dashboard{--dw-bg:#fff;--dw-card:#fff;--dw-card-2:#fbfdff;}
body.r107-ui #mainShell #content .r114-dashboard .r114-hero{
 min-height:100px!important;padding:10px 15px!important;margin:0!important;gap:8px!important;border-radius:10px!important;
}
body.r107-ui #mainShell #content .r114-dashboard .r114-hero h1{font-size:clamp(20px,2.15vw,30px)!important;margin:5px 0 4px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-filters{padding:6px 9px 5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-filter-grid{gap:5px 7px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-control{height:32px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-date-actions .r114-btn{min-height:32px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-quickbar{margin-top:5px!important;gap:4px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-quick{min-height:22px!important;padding:3px 8px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-kpis{gap:4px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-kpi{min-height:68px!important;padding:8px 9px!important;gap:7px!important;border-radius:9px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-main-panels{gap:4px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-panel{padding:8px 9px!important;border-radius:9px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-panel-head{margin-bottom:5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-donut-row{min-height:101px!important;margin-top:5px!important;gap:6px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-today-stats{gap:5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-today-stat{min-height:77px!important;padding:7px 8px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r1911-wr{margin:0!important;padding:8px 10px!important;border-radius:10px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r1911-header{margin-bottom:5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r1911-cards{gap:5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r1911-flow-head{margin:5px 1px 3px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r1911-legend{margin-top:4px!important;gap:8px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-register{padding:8px 10px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-register-title{margin-bottom:5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-table th{padding:7px 8px!important;font-size:9.5px!important;}
body.r107-ui #mainShell #content .r114-dashboard .r114-table td{padding:6px 8px!important;font-size:10px!important;line-height:1.3!important;}
body.r107-ui #mainShell #content .r114-dashboard .r19138-hours-card{margin-top:5px!important;padding:7px 8px!important;}
/* Respect touch targets and visual hierarchy on mobile. */
@media(max-width:900px){
 body.r107-ui #mainShell #content{padding:6px 7px 12px!important;}
 body.r107-ui #mainShell #content .r114-dashboard .r114-kpi{min-height:71px!important;}
}
@media(max-width:620px){
 body.r107-ui #mainShell #content{padding:5px 6px 11px!important;}
 body.r107-ui #mainShell #content .r114-dashboard .r114-control{height:35px!important;}
 body.r107-ui #mainShell #content .r114-dashboard .r114-quick{min-height:28px!important;}
 body.r107-ui #mainShell #content .r114-dashboard .r114-today-stat{min-height:76px!important;}
 body.r107-ui.emd-r15-design #mainShell #content :is(.r4-hero,.r5-hero,.r115-hero,.page-hero){padding:9px 10px!important;}
}
@media(prefers-reduced-motion:reduce){
 body.r107-ui #mainShell #content :is(.r114-kpi,.r1911-card,.r5-kpi,.r4-kpi){transition:none!important;}
}
