/* Shared screen layout. Fiscal pages and printable documents do not load this file. */
@media screen {
 .page-shell {box-sizing:border-box;width:calc(100% - clamp(16px,3vw,64px));max-width:1680px}
 .page-shell :where(form,fieldset,section,article,.data-grid,.toolbar,.actions,.form-actions) {min-width:0;box-sizing:border-box}
 .page-shell :where(h1,h2,h3,p,label,legend,.alert,td,small) {overflow-wrap:anywhere}
 .page-shell .data-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
 .page-shell .data-grid .span-4 {grid-column:1/-1}
 .page-shell .data-grid label {min-width:0}
 .page-shell :where(input,select,textarea) {box-sizing:border-box;max-width:100%;min-width:0}
 .page-shell .actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px;white-space:normal}
 .page-shell .actions form {max-width:100%;min-width:0}
 .page-shell :where(.button,button) {white-space:normal;overflow-wrap:anywhere}
 .page-shell .form-section {overflow:visible}
 .page-shell .table-card {min-width:0;max-width:100%;overscroll-behavior-x:contain}
 .page-shell .pager {display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center}
 .page-shell :where(.form-grid,.module-grid)>* {min-width:0}
 .page-shell .form-actions {flex-wrap:wrap;position:static;padding-bottom:max(14px,env(safe-area-inset-bottom))}
 .topbar .brand {min-width:0;flex-shrink:1}
 .topbar .brand-mark-provided {max-width:100%}
 .topbar .brand-mark-provided img {object-fit:contain;max-width:100%}
 .topbar .user-area {flex-shrink:0}
 .module-nav-inner {max-width:100%;overscroll-behavior-x:contain}
 @media(min-width:761px) and (max-width:1100px){
  .page-shell .data-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-shell .data-grid .span-4 {grid-column:1/-1}
  .page-shell .page-heading {align-items:flex-start;gap:16px}
  .page-shell .page-heading>.actions {max-width:100%;justify-content:flex-start}
  .page-shell .toolbar {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-shell .toolbar > :first-child {grid-column:1/-1}
 }
 @media(max-width:760px){
  .topbar {gap:8px;padding-inline:max(8px,env(safe-area-inset-left))}
  .topbar .brand {flex:1}
  .topbar .brand-mark-provided {width:100%;max-width:min(280px,calc(100vw - 142px))}
  .module-nav {top:var(--m7-header-height,58px);max-height:calc(100dvh - var(--m7-header-height,58px));padding-bottom:max(16px,env(safe-area-inset-bottom))}
  .page-shell .page-heading {min-width:0}
  .page-shell .page-heading > div {min-width:0;max-width:100%}
  .page-shell .page-heading>.actions {max-width:100%}
  .page-shell .data-grid {grid-template-columns:minmax(0,1fr)!important}
  .page-shell .data-grid .span-2,.page-shell .data-grid .span-4 {grid-column:1/-1!important}
  .page-shell .data-grid input[type="checkbox"],.page-shell .data-grid input[type="radio"] {width:20px;min-width:20px;min-height:20px;flex:none}
  .page-shell :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {font-size:16px!important}
  .page-shell .form-actions {position:static;display:flex;gap:10px}
  .page-shell .form-actions > * {flex:1 1 140px;min-height:44px}
  .page-shell .table-card:has(.mobile-records),.page-shell .table-card:has(.responsive-entry-table) {overflow:visible}
  .page-shell .mobile-records td > * {min-width:0;max-width:100%}
  .page-shell .mobile-records td .actions {justify-content:flex-start}
  .page-shell .mobile-records button,.page-shell .mobile-records a.button {min-height:40px}
  .page-shell .table-card:not(:has(.mobile-records)):not(:has(.responsive-entry-table)) {overflow-x:auto}
  .page-shell .table-card:not(:has(.mobile-records)):not(:has(.responsive-entry-table)) table {min-width:640px}
  .page-shell .table-card:has(#sale-items) table {min-width:0}
  .page-shell .table-card:has(#sale-items):after {display:none}
 }
 @media(max-width:380px){
  .page-shell .mobile-records tbody td {grid-template-columns:minmax(0,1fr);gap:4px}
  .page-shell .module-grid {grid-template-columns:minmax(0,1fr)}
 }
 @media(max-height:600px){
  .page-shell .form-actions {position:static}
  .topbar {position:relative}
 }
}
