/* Shared screen contract for every portal. Keep after app.css; print rules stay independent. */
@media screen {
 :root{--action:#2453d4;--action-hover:#193fa8;--surface:#fff;--line:#d5deeb;--radius:12px;--control-radius:8px;--control-height:48px}
 .page-surface{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(20px,3vw,36px);margin:24px 0;min-height:260px;min-width:0}
 .page-surface .panel,.page-surface .stats article,.page-surface fieldset,.page-surface .report-scroll,.recovery-page .panel{background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
 .page-surface .panel{margin:0 0 28px;padding:0}
 .page-surface .panel:last-child{margin-bottom:0}
 .page-surface .panel+.panel{padding-top:24px;border-top:1px solid var(--line)}
 .page-surface .page-head,.page-surface .page-heading{margin:0 0 24px}
 .page-surface .panel-heading,.page-surface .filters{padding:0 0 20px}
 .page-surface .stats article{padding:16px 0;border-bottom:1px solid var(--line)}
 .page-surface .report-scroll{overflow:auto}
 .login-page{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:100svh;padding:28px 16px}
 .login-panel{display:block;width:100%;max-width:520px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(24px,4vw,40px)}
 .login-card{max-width:none}.login-card>.brand{margin-bottom:32px}.login-card h2{font-size:26px}
 .recovery-page,.error-page{width:calc(100% - 32px);max-width:700px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(24px,4vw,40px);margin:40px auto}
 .recovery-page .panel{padding:0;margin:0}
 /* Explicit controls: primary = commit, secondary = navigation, danger = destructive. */
 body button,body .button,body .text-link,body .pagination a{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:auto;max-width:100%;min-height:var(--control-height);padding:10px 20px;margin:4px 0;border:1px solid #a6b7d1;border-radius:var(--control-radius);background:#f1f5fc;color:#203d83;font:600 15px/1.8 "Noto Sans Myanmar","Myanmar MN",system-ui,sans-serif;text-decoration:none;text-align:center;white-space:normal;overflow-wrap:anywhere;cursor:pointer;box-shadow:0 1px 2px #17223b12}
 body .primary{background:var(--action);border-color:var(--action);color:#fff}
 body .danger{background:#fff0ef;border-color:#ba504a;color:#94221e}
 body button:not(:disabled):hover,body .button:hover,body .text-link:hover,body .pagination a:hover{background:#e1eafa;border-color:#607ca8;filter:none}
 body .primary:not(:disabled):hover{background:var(--action-hover);border-color:var(--action-hover);color:#fff}
 body .danger:not(:disabled):hover{background:#ffe0dd;border-color:#94221e}
 body button:active,body .button:active{box-shadow:inset 0 2px 3px #17223b22}
 body button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
 body button:focus-visible,body a:focus-visible{outline:3px solid #1d4ed8;outline-offset:3px;box-shadow:0 0 0 2px #fff}
 body .wide,.login-card .button{width:100%;justify-content:center}
 .topbar{gap:12px;padding:16px 0}.topbar .button{flex:0 1 auto;font-size:14px}
 .sidebar-bottom{flex-wrap:wrap}.sidebar-bottom form{margin:0}.sidebar-bottom .logout{background:#213251;color:#fff;border-color:#7285a4;font-size:13px;padding:8px 12px}
 .page-surface a:not(.button):not(.text-link):not(.nav-item):not(.brand){color:#234ab5;text-decoration:underline;text-underline-offset:3px}
 .owner-fields{grid-template-columns:minmax(0,1fr)}
 .page-surface .table-wrap{overflow:auto;max-width:100%}
 @media(max-width:700px){
  .main{padding:0 12px}.page-surface{margin:16px 0;padding:20px 16px}
  .page-surface button,.page-surface .button,.page-surface .text-link,.error-page button,.error-page .button,.recovery-page button{width:100%}
  .topbar .button{flex:1 1 auto}.topbar>span{flex-basis:100%}
  .page-surface .return-lines tr,.page-surface .cart-lines tr{border:0;border-radius:0;border-bottom:1px solid var(--line)}
 }
}

/* All portals: both scroll axes and full-width actions, including future pages. */
@media screen {
 html{overflow-x:auto;overflow-y:scroll;scrollbar-gutter:stable}
 body{overflow:visible}
 .main,.page-surface,.login-panel,.recovery-page,.error-page,.label-page{min-width:0;overflow:auto}
 .table-wrap,.report-scroll{overflow-x:auto;overflow-y:auto;max-width:100%;max-height:70vh}
 body button,body .button,body .text-link,body .pagination a{display:flex;width:100%;min-width:0;white-space:normal;justify-content:center}
 .topbar .button{flex:1 0 100%}
 .sidebar-bottom form,.mobile-nav form{width:100%}
 .page-surface td .button{min-width:140px}
}
