/* Original order/panels retained. Only browser sizing/spacing is compacted. */
@media(min-width:1000px){.workspace:is([data-screen=payroll-l],[data-screen=dashboard],[data-screen=reports]) main{display:flex;flex-direction:column;overflow:hidden;padding:10px 14px}.workspace:is([data-screen=payroll-l],[data-screen=dashboard],[data-screen=reports]) #screen{flex:1;display:flex;flex-direction:column;min-height:0;margin:0}.payroll-l-screen,.numbered-screen{flex:1;min-height:0}}
.pl-toolbar{flex-shrink:0}.pl-toolbar label{display:flex;align-items:center;gap:7px}.pl-toolbar input{padding:5px;margin:0;min-height:30px;font-size:12px}.pl-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:1;min-height:0}.pl-card{padding:7px;gap:4px;overflow:auto}.pl-card>select{margin:0;min-height:30px}.pl-card>.business-footnote{font-size:10px;min-height:25px}.pl-days{min-height:0}.pl-days table{table-layout:fixed;width:100%}.pl-days th,.pl-days td{padding:5px 1px;text-align:center;white-space:normal;font-size:10px}.pl-days th:first-child{width:13%}.pl-days th:nth-child(2),.pl-days th:nth-child(4){width:15%}.pl-days input{width:100%;min-width:0;min-height:27px;margin:0;padding:3px 0;text-align:center;font-size:12px}.pl-days input::-webkit-inner-spin-button{appearance:none}.pl-summary{display:flex;flex-direction:column;gap:4px;background:#f3f7f5;padding:6px}.pl-summary>div,.pl-summary>label{display:flex;justify-content:space-between;align-items:center;font-size:11px}.pl-summary strong{font-size:14px}.pl-summary label{margin:0}.pl-summary input{max-width:100px;min-height:28px;padding:3px 5px;margin:0}.pl-net{color:#ad3434}.pl-net strong{font-size:21px}.pl-card>button{font-size:10px;padding:6px 2px;min-height:30px;margin-top:auto}.pl-combined{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid var(--line);padding:7px 12px}.pl-combined>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.pl-combined span,.pl-combined small{font-size:11px}.pl-combined strong{font-size:24px}.pl-combined button{font-size:11px;padding:7px}.pl-footer .primary{margin-left:auto}.report-filters{display:flex;gap:7px;flex-wrap:wrap;align-items:end;padding:8px;background:#fff;border:1px solid var(--line);border-radius:6px}.report-filters label{flex:1;min-width:95px;margin:0;font-size:11px}.report-filters input,.report-filters select{min-height:30px;margin-top:4px;font-size:12px;padding:5px 7px}.report-filter-actions{display:flex;gap:4px;flex-wrap:wrap}.report-filter-actions button,.numbered-screen button{min-height:30px;font-size:11px;padding:6px 9px}.report-summary{display:flex;gap:6px;flex-shrink:0}.report-summary>section{flex:1;min-width:0;padding:7px}.report-summary h2{font-size:10px}.report-summary strong{font-size:19px}.numbered-screen>.ledger-table{flex:1;min-height:70px}.numbered-screen .ledger-table th,.numbered-screen .ledger-table td{font-size:11px;padding:6px 7px;text-align:center}.numbered-screen .pager{flex-shrink:0}.reports-menu{max-width:670px;padding:14px;gap:7px}.reports-menu p{margin:4px 0;font-size:12px}.reports-menu button{text-align:left;align-self:flex-start;font-size:12px;padding:9px 12px}.simulation-warning{background:#fff3cd;color:#7a4b00;font-weight:600;margin:0;padding:8px;font-size:13px}.simulation-total{text-align:right;font-size:23px}.numbered-screen:has(#simulation-table-slot){overflow:auto}.numbered-screen:has(#simulation-table-slot) #simulation-table-slot{flex:1;min-height:200px;overflow:auto}.priority-products{max-height:50vh;overflow:auto;margin-top:12px}.priority-products label{display:flex;align-items:center;gap:9px;font-size:12px;padding:4px}.priority-products label[hidden]{display:none}.priority-products input{width:auto;margin:0}.dashboard-body{overflow:auto;min-height:0;display:flex;flex-direction:column;gap:9px;padding-right:4px}.dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.dashboard-metrics .business-panel{padding:9px;gap:3px}.dashboard-metrics h2{font-size:11px}.dashboard-value{font-size:25px}.dashboard-metrics small{font-size:12px;color:#647c70}.dashboard-chart{flex-shrink:0}.dashboard-chart svg{display:block;width:100%;max-height:280px;min-height:210px}.dashboard-chart svg text{font:10px Arial,sans-serif;fill:#526d60}.dashboard-chart details{font-size:11px}.dashboard-body .negative{color:#ad3434}.dashboard-body table{width:100%}.report-preview{max-height:65vh;overflow:auto}.numbered-report-print{font:12px Arial,sans-serif;color:#172b24;background:white}.numbered-report-print h1,.numbered-report-print h2,.numbered-report-print>p{text-align:center}.numbered-report-print .ledger-table{overflow:visible;max-height:none}.numbered-report-print table{width:100%;border-collapse:collapse;min-width:0}.numbered-report-print th,.numbered-report-print td{font-size:10px;text-align:center;padding:5px;border-bottom:1px solid #ddd;white-space:normal}
@media(max-width:1100px){.pl-cards{grid-template-columns:repeat(2,minmax(0,1fr));overflow:auto}.pl-card{min-height:480px}.payroll-l-screen{overflow:auto}.report-summary{flex-wrap:wrap}.report-summary>section{min-width:130px}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@page numbered-report{size:A4 landscape;margin:12mm}
/* Total and all batch controls share one desktop row. Small screens can wrap. */
.pl-combined { gap: 8px; }
.pl-combined > div:first-child { min-width: 0; flex: 1; gap: 8px; }
.pl-combined .pl-footer { flex: 0 0 auto; flex-wrap: nowrap; gap: 5px; }
.pl-combined button { white-space: nowrap; font-size: 10px; padding: 6px 7px; min-height: 30px; }
.pl-combined small { font-size: 10px; }
@media(max-width:999px){.pl-combined{flex-wrap:wrap}.pl-combined>div:first-child{flex-basis:100%}.pl-combined .pl-footer{flex-wrap:wrap}}
/* Compact the seven day rows without removing any original field. */
.pl-days td{padding:1px}.pl-days th{padding:3px 1px}.pl-days input{min-height:22px;padding:2px 0;line-height:1.2}.pl-card>.business-footnote{min-height:17px}.pl-summary{gap:3px;padding:4px;line-height:1.2}.pl-summary input{min-height:24px}.pl-summary strong{font-size:13px}.pl-summary .pl-net strong{font-size:20px}.pl-card>button{min-height:28px}.report-summary section:has(h2:first-child)>strong{overflow-wrap:anywhere}.report-summary>section:last-child:has(h2:first-child){min-width:0}
.business-dialog:has(#pl-loan-entry){height:90vh;display:flex;flex-direction:column;gap:6px;overflow:hidden}.business-dialog:has(#pl-loan-entry)>h2,.business-dialog:has(#pl-loan-entry)>p{margin:0}.business-dialog:has(#pl-loan-entry)>form{flex-shrink:0}.business-dialog:has(#pl-loan-entry)>.ledger-table{flex:1;min-height:50px;max-height:none}.business-dialog:has(#pl-loan-entry)>.dialog-actions{margin-top:4px;padding-top:7px;flex-shrink:0}
@media print{body.numbered-printing #print-area{page:numbered-report}.numbered-report-print tr{break-inside:avoid}.numbered-report-print thead{display:table-header-group}.numbered-report-print .ledger-table{overflow:visible}.numbered-report-print th{background:#e6efea;print-color-adjust:exact}}
/* Four period rows, six metrics in the user's requested order. */
.dashboard-summary-scroll{flex-shrink:0;overflow-x:auto}
.dashboard-metrics{display:flex;flex-direction:column;gap:5px;min-width:720px}
.dashboard-period{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.dashboard-metrics .business-panel{min-width:0;padding:8px 7px;gap:4px;border-radius:4px}
.dashboard-metrics h2{font-size:10px;line-height:1.3;min-height:26px;margin:0;overflow-wrap:normal}
.dashboard-metrics .dashboard-value{font-size:clamp(16px,1.5vw,23px);line-height:1.25;overflow-wrap:anywhere}
/* V157's layout-only change: reserve the combined/footer row and scroll only
   the flexible employee area when the four original cards must reflow. */
@media screen and (min-width:1000px){
 .payroll-l-screen{overflow:hidden}
 .pl-cards{overflow:auto;align-items:start;grid-auto-rows:minmax(min-content,1fr)}
 .pl-card{overflow:visible;min-height:0}
 .pl-combined,.pl-toolbar,#pl-status{flex-shrink:0}
 .pl-combined{flex-wrap:wrap}
}
@media screen and (max-width:1100px) and (min-width:1000px){.pl-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen and (max-width:650px){.pl-cards{grid-template-columns:minmax(0,1fr)}}
