.wm-tools{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.wm-tools label{display:block;min-width:150px}.wm-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin:16px 0}.wm-cards .panel{margin:0}.wm-cards strong{display:block;font-size:22px;margin:12px 0}.wm-cards small{display:block}.wm-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.wm-tabs [aria-pressed=true]{background:#ffedf0!important;border-color:#d52546!important;color:#a31f3b!important}.wm-warning{background:#fff7e6;border-left:4px solid #d39722;padding:14px;border-radius:5px}.wm-table{max-width:100%;overflow:auto}.wm-table table{width:100%;border-collapse:collapse;font-size:13px}.wm-table th,.wm-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #dfe4ee;vertical-align:top;min-width:75px}.wm-table td small{display:block;margin-top:5px;color:#64748b}.wm-job{white-space:nowrap}.wm-actions{display:flex;gap:10px;flex-wrap:wrap}.wm-bars>div{display:grid;grid-template-columns:minmax(120px,1fr) 2fr 95px;gap:12px;align-items:center;margin:12px 0}.wm-bars>div>div{height:14px;border-radius:6px;background:#edf0f5;overflow:hidden}.wm-bars i{display:block;height:100%;background:#c84860}.wm-bars b{font-size:12px;text-align:right}.wm-trend{display:flex;gap:14px;align-items:end;overflow-x:auto;padding:20px 0}.wm-trend>div{min-width:80px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:end;height:150px}.wm-trend b,.wm-trend small{font-size:11px;white-space:nowrap}.wm-trend i{display:block;background:#c94c63;width:32px;margin:8px 0;border-radius:4px 4px 0 0}#wm-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px}#wm-settings label{display:block}#wm-opportunity input{max-width:190px}.wm-source small{overflow-wrap:anywhere}@media(max-width:600px){.wm-cards{grid-template-columns:1fr 1fr}.wm-cards strong{font-size:18px}.wm-tools>*{flex:1;min-width:0}.wm-tools label{min-width:130px}.wm-tabs button{flex:1 1 45%;font-size:12px}.wm-bars>div{grid-template-columns:1fr 1fr 75px;gap:8px;font-size:12px}#wm-settings{grid-template-columns:1fr}}
@media(max-width:600px){#wm-tools{display:grid;grid-template-columns:1fr 1fr;align-items:end}#wm-tools label{grid-column:1/-1;width:100%;min-width:0}#wm-tools input,#wm-tools select{width:100%;min-width:0}#wm-tools button{width:100%;min-height:52px;padding:9px;font-size:12px;line-height:1.4;white-space:normal}}

@media print{
 @page{size:A4 landscape;margin:12mm;@bottom-left{content:"AWTuning Portal - Monthly performance";font:9px Arial;color:#667085}@bottom-right{content:counter(page)" / "counter(pages);font:9px Arial;color:#667085}}
 body.portal-admin:has(#wm-result){padding-left:0!important;background:white!important;font:10px/1.4 'Segoe UI',Arial,sans-serif}
 body:has(#wm-result) #portal-sidebar,body:has(#wm-result)>header,body:has(#wm-result) #portal-footer,body:has(#wm-result) #portal-skip,body:has(#wm-result) #toast,body:has(#wm-result) #portal-nav-backdrop,body:has(#wm-result) #app>button,#wm-tools,.wm-tabs,.wm-actions,.wm-tools,.wm-settings-panel,.wm-history,#wm-result details:has(tbody:empty){display:none!important}
 body.portal-admin:has(#wm-result) #app{margin:0!important;padding:0!important;max-width:none!important}
 #wm-result .wm-view.hidden{display:block!important}
 #wm-result .wm-view{break-before:page}
 #wm-result h2{font-size:18px}#wm-result h3{font-size:14px}#wm-result h2,#wm-result h3,#wm-result summary{break-after:avoid}
 body.portal-admin #wm-result .panel{padding:14px;margin:10px 0;border-radius:8px;box-shadow:none!important;break-inside:avoid}
 body.portal-admin #wm-result .panel:has(.wm-table){break-inside:auto}
 #wm-result .wm-cards{grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0;break-inside:avoid}
 body.portal-admin #wm-result .wm-cards .panel{margin:0;padding:12px;min-height:0}
 #wm-result .wm-cards strong{font-size:16px;margin:6px 0}
 #wm-result .wm-table{overflow:visible}#wm-result .wm-table table{font-size:9px}
 #wm-result .wm-table th,#wm-result .wm-table td{padding:4px;min-width:0;overflow-wrap:anywhere}
 #wm-result .wm-table button{font-size:8px!important;padding:3px!important;min-height:0!important}
 #wm-result .wm-table thead{display:table-header-group}
 #wm-result .wm-trend{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;overflow:visible}
 #wm-result .wm-trend>div{min-width:0;height:130px}#wm-result .wm-trend b,#wm-result .wm-trend small{font-size:8px}
 #wm-trend-metric{display:none}#wm-result a[href]:after{content:none!important}
 #wm-activity .wm-cards{grid-template-columns:repeat(5,1fr)}
 body.portal-admin #wm-result #wm-activity .panel:has(.wm-table),body.portal-admin #wm-result #wm-trends .panel{break-inside:avoid}
}
