/* Laptop sizing (761–1440 px wide, table view): tighter side padding, headings that wrap onto two lines,
   smaller boxes inside tables and cards, so wide tables fit without scrolling sideways.
   Phones and portrait tablets keep the tap-to-open cards (ip-compact.js); big screens keep the roomy look. */
@media screen and (min-width:761px) and (max-width:1440px){
  html:is(#zz#zz#zz#zz#zz#zz,*) .page table:not(.rpbill table):not(.pcmp) :is(thead th,tbody td,tfoot td){padding-left:7px!important;padding-right:7px!important}
  html:is(#zz#zz#zz#zz#zz#zz,*) .page table:not(.rpbill table):not(.pcmp) thead th{white-space:normal!important;font-size:10.5px!important;line-height:1.2!important;vertical-align:bottom}
  html:is(#zz#zz#zz#zz#zz#zz,*) .page table:not(.rpbill table):not(.pcmp) :is(tbody td,tfoot td) :is(input:not([type=checkbox]):not([type=radio]),select){font-size:12.5px!important;padding-top:3px!important;padding-bottom:3px!important;min-height:0!important}
  html:is(#zz#zz#zz#zz#zz#zz,*) .page .card{padding:14px!important}
  /* entry tables with a fixed minimum width (paper purchase, new sales order): columns shrink to their boxes instead */
  html:is(#zz#zz#zz#zz#zz#zz,*) :is(#rpItems,#n-items table){min-width:0!important}
  /* dashboard boxes side by side: status and "since" may wrap */
  html:is(#zz#zz#zz#zz#zz#zz,*) #page-dash table:not(.pcmp) tbody td{white-space:normal!important}
  html:is(#zz#zz#zz#zz#zz#zz,*) #page-dash table:not(.pcmp) tbody td .chip{white-space:normal!important}
  html:is(#zz#zz#zz#zz#zz#zz,*) #page-dash table:not(.pcmp) tbody td:first-child{max-width:170px;overflow-wrap:anywhere}
  html:is(#zz#zz#zz#zz#zz#zz,*) #rpItems td :is(select,input:not([type=checkbox])){min-width:0!important;width:100%!important;max-width:100%!important}
}
@media screen and (min-width:761px) and (max-width:1180px){
  html:is(#zz#zz#zz#zz#zz#zz,*) .page table:not(.rpbill table):not(.pcmp) :is(thead th,tbody td,tfoot td){padding-left:5px!important;padding-right:5px!important}
  html:is(#zz#zz#zz#zz#zz#zz,*) .page .card{padding:12px!important}
}
/* pre-press › die no. suggestions from the die list (label size first) */
.did .dsg{position:relative;display:inline-block}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl{position:absolute;z-index:60;top:calc(100% + 4px);left:0;width:min(360px,calc(100vw - 16px));max-height:300px;overflow-y:auto;overscroll-behavior:contain;background:#fff;color:var(--ink);border:1px solid var(--edge,rgba(110,125,160,.38));border-radius:12px;box-shadow:0 10px 28px rgba(15,23,42,.18);padding:4px;text-transform:none;letter-spacing:0;font-weight:400;text-align:left}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsghd{font-size:11.5px;color:var(--muted);padding:6px 8px 4px;font-weight:600}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;padding:8px;border-radius:9px;cursor:pointer;min-height:44px}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo:hover,html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo[aria-selected=true]{background:var(--accent-soft)}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo b{font-size:15px;color:var(--ink);padding:0}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgsz{font-size:13px;color:var(--ink);text-align:right;white-space:nowrap}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgsz em{font-style:normal;font-size:11px;font-weight:700;margin-left:6px;color:var(--muted)}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo.fit .dsgsz em{color:#16a34a}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgo.near .dsgsz em{color:var(--warn)}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgm{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;font-size:12px;color:var(--muted)}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsgm .chip{font-size:11px;padding:1px 8px}
html:is(#zz#zz#zz#zz#zz#zz,*) .dsgl .dsge{font-size:12.5px;color:var(--muted);padding:8px}
@media (prefers-color-scheme:dark){html:is(#zz#zz#zz#zz#zz#zz,*):not([data-theme="light"]) .dsgl{background:#1c1c1e;border-color:rgba(255,255,255,.16);box-shadow:0 10px 28px rgba(0,0,0,.5)}}
html:is(#zz#zz#zz#zz#zz#zz,*)[data-theme="dark"] .dsgl{background:#1c1c1e;border-color:rgba(255,255,255,.16);box-shadow:0 10px 28px rgba(0,0,0,.5)}
