/* Screen-only layout adjustments. Printed documents keep their existing format. */
@media screen and (max-width:1100px){
 .app-content,.workspace-page,.workspace-page fieldset{min-width:0;max-width:100%;box-sizing:border-box}
 #page-invoices #ivEditor{min-inline-size:0;width:100%;padding:0;border:0}
 #page-invoices .iv-layout{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}
 #page-invoices .iv-layout>*,#page-invoices .iv-box,#page-invoices .iv-pair,#page-invoices .iv-pair>*{min-width:0;max-width:100%;box-sizing:border-box}
 #page-invoices .iv-scroll{min-width:0;max-width:100%;overflow-x:auto}
 .workspace-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.workspace-page select,.workspace-page textarea,.un-global-search input,dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea{font-size:16px!important;min-height:44px;box-sizing:border-box;max-width:100%}
 .workspace-page button,.workspace-page summary,.topbar button,dialog button{min-height:44px;touch-action:manipulation}
 .workspace-page .scroll,.workspace-page .iv-scroll,.workspace-page .po-scroll,.official-letter-table-wrap{max-width:100%;min-width:0;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 dialog{max-width:calc(100vw - 24px);box-sizing:border-box}
}
@media screen and (max-width:600px){
 .workspace-page .section-heading{flex-wrap:wrap;gap:10px}
 .workspace-page .section-heading>div{min-width:0}
 #page-invoices .iv-box{padding:12px}
 #page-invoices .iv-pair{grid-template-columns:minmax(0,1fr)}
 #page-invoices .iv-box h3{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
 #page-invoices .iv-sum{gap:12px;align-items:flex-start;overflow-wrap:anywhere}
 #page-invoices .iv-sum b{flex-shrink:0}
 #page-invoices .iv-actions{display:flex;flex-wrap:wrap;gap:8px}
 #page-invoices .iv-actions>button{flex:1 1 140px;margin:0}
 .workspace-page table.un-mobile-data-table{display:block!important;min-width:0!important;width:100%!important;border-collapse:separate!important;table-layout:auto!important;background:transparent!important}
 .workspace-page table.un-mobile-data-table>thead{display:none!important}
 .workspace-page table.un-mobile-data-table>tbody{display:flex!important;flex-direction:column;gap:12px;width:100%}
 .workspace-page table.un-mobile-data-table>tbody>tr{display:block!important;width:100%;min-width:0;background:#fff!important;border:1px solid #cddfe9;border-radius:10px;padding:8px;box-sizing:border-box}
 .workspace-page table.un-mobile-data-table>tbody>tr[hidden]{display:none!important}
 .workspace-page table.un-mobile-data-table>tbody>tr>td[data-mobile-label]{display:grid!important;grid-template-columns:minmax(85px,35%) minmax(0,1fr);gap:9px;align-items:center;min-width:0!important;width:100%!important;max-width:100%;padding:9px 4px!important;border:0;border-bottom:1px solid #e4edf2;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;text-align:start!important;font-size:14px!important;background:transparent!important}
 .workspace-page table.un-mobile-data-table>tbody>tr>td[data-mobile-label]::before{content:attr(data-mobile-label);font-size:12px;color:#526f81;font-weight:600;overflow-wrap:anywhere}
 .workspace-page table.un-mobile-data-table>tbody>tr>td:last-child{border-bottom:0}
 .workspace-page table.un-mobile-data-table td>*{min-width:0;max-width:100%;box-sizing:border-box}
 .workspace-page table.un-mobile-data-table td input,.workspace-page table.un-mobile-data-table td select,.workspace-page table.un-mobile-data-table td textarea{width:100%!important;min-width:0!important}
 .workspace-page table.un-mobile-data-table td button{max-width:100%;white-space:normal;overflow-wrap:anywhere;margin:3px!important}
 #page-inspections .un-project-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 #page-inspections .un-project-card-actions>button{width:100%!important;min-width:0;min-height:44px;white-space:normal}
 #page-inspections .un-project-card-actions>.un-action-primary,#page-inspections .un-project-card-more,#page-inspections .un-project-card-states{grid-column:1/-1}
 #page-inspections .un-project-card-extra{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 #page-inspections .un-project-card-extra button{width:100%!important;white-space:normal;min-width:0}
 #page-inspections .un-project-card-head{gap:8px;padding:12px!important}
 #page-inspections .un-project-card-head h3{font-size:14px;line-height:1.6}
 #page-inspections .un-project-card-meta{font-size:12px;line-height:1.7}
 #unMyTasks input,#unEmployeeLevels input{font-size:16px!important;min-height:44px}
}
@media screen and (max-width:600px){
 .workspace-page table.un-mobile-data-table>tbody>tr>td[data-mobile-buttons]{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
 .workspace-page table.un-mobile-data-table>tbody>tr>td[data-mobile-buttons]::before{flex-basis:100%}
}
@media screen and (min-width:601px) and (max-width:1100px){
 #page-po .po-table{min-width:0!important;width:100%;table-layout:fixed}
 #page-po .po-table th,#page-po .po-table td{overflow-wrap:anywhere;white-space:normal;min-width:0}
 #page-po .po-table input,#page-po .po-table select{min-width:0!important;width:100%;box-sizing:border-box}
}
