/* Screen-only phone layouts. The approved paper templates are independent. */
.mobile-dock,#mobile-drawer-shade{display:none}
@media screen and (max-width:800px){
 html,body{overscroll-behavior-y:none}
 #app .workspace{min-width:0;padding-bottom:76px}
 #app .main{padding:16px 12px 20px;min-width:0}
 #app .topbar{position:sticky;top:0;z-index:25;height:58px;background:#fff;border-bottom:1px solid #e3eaf0}
 #app .topbar .crumb,#app .topbar>.spacer{display:none}
 #app .topbar .ws-global-trigger{flex:1;min-width:0;height:40px}
 #app .language-toggle{min-width:54px;padding:8px 5px}
 #app .btn,#dialog-root .btn{min-height:42px}
 #app .icon-only,#dialog-root .icon-only{min-width:42px}
 #app .page-heading{gap:12px;margin-bottom:17px}
 #app .page-heading h1{font-size:23px;line-height:1.3}
 #app .page-heading .actions{flex-wrap:wrap;gap:7px}
 #app .panel,#app .toolbar{min-width:0}
 #app .toolbar{gap:10px;padding:12px}
 #app .toolbar label{min-width:130px}
 #app input,#app select,#app textarea,#dialog-root input,#dialog-root select,#dialog-root textarea{font-size:16px;min-height:43px}
 #app .access-field input{font-size:16px}
 #app .ws-customer-picker summary,#app .ws-picker-options button{min-height:44px;font-size:14px}
 #app .ws-picker-menu{max-width:calc(100vw - 36px)}
 #app .sales-analytics form.sa-toolbar input,#app .sales-analytics form.sa-toolbar select{font-size:16px;min-height:44px}
 #app .sales-analytics form.sa-toolbar>.btn,#app .sales-analytics .sa-presets>button,#app .sales-analytics .sa-compare-control>div>button,#app .sales-analytics .sa-panel>header button.btn,#app .sales-analytics .sa-kpi button.sa-kpi-link,#app .report-center-tabs>button[data-action]{min-height:44px}
 #app .sales-analytics .sa-kpi button.sa-kpi-link{padding:7px 8px;font-size:12px}
 #app .hr-workspace input:not([type="checkbox"]):not([type="radio"]),#app .hr-workspace select{font-size:16px;min-height:44px}
 #app .hr-workspace .ht-presets>button,#app .hr-workspace .ht-table-switch>button,#app .hr-workspace .ht-filters .btn,#app .hr-workspace .hr-tabs>button,#app .hr-workspace .hr-source{min-height:44px;font-size:12px}
 #app .hr-workspace .ht-chart-legend label,#app .hr-workspace .ht-coverage summary{min-height:44px;display:flex;align-items:center}
 #app .hr-workspace input[type="checkbox"],#app .hr-workspace input[type="radio"]{width:18px;height:18px;min-height:18px;flex-shrink:0}
 #app .table-wrap{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
 #app .table-wrap>table{min-width:620px}
 #app .account-report-table{min-width:700px}
 #app .report-directory{grid-template-columns:1fr 1fr;gap:8px}
 #app .report-card{min-width:0;padding:12px 9px;gap:8px}
 #app .report-card-icon{width:29px;height:29px;flex:0 0 29px}
 #app .report-card strong{font-size:12px;line-height:1.45}
 #app .report-card small{font-size:10px;line-height:1.45}
 #app .ws-report-arrow{display:none}
 #app .pager{padding:12px;gap:10px;flex-wrap:wrap}
 #app .ws-status-tabs,#app .tabs{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;padding-bottom:6px}
 #app .mobile-dock{display:flex;position:fixed;inset:auto 0 0;z-index:28;background:#fff;border-top:1px solid #e3eaf0;padding:6px 6px calc(5px + env(safe-area-inset-bottom));gap:3px;box-shadow:0 -4px 18px #142f4606}
 #app .mobile-dock>a,#app .mobile-dock>button{flex:1;min-width:0;min-height:54px;border:0;border-radius:10px;background:transparent;color:#6b7f8f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font:700 11px Tajawal,sans-serif;text-decoration:none}
 #app .mobile-dock .icon{width:21px;height:21px}
 #app .mobile-dock .active{background:#faf1e9;color:#9e5628}
 #app #mobile-drawer-shade:not([hidden]){display:block;position:fixed;inset:0;background:#10253666;border:0;z-index:45}
 #app .sidebar{padding-top:20px;padding-bottom:20px;width:246px;max-width:80vw}
 #app .sidebar .nav a{min-height:46px}
 #app .app-credit{font-size:10px;margin-bottom:8px}
 .vg-native #app .workspace{padding-bottom:0}
 .vg-native #app .mobile-dock{display:none}
 #dialog-root .modal-overlay{padding:0;align-items:flex-end}
 #dialog-root .modal{width:100%;max-height:94dvh;border-radius:18px 18px 0 0}
 #dialog-root .modal-header{padding:13px 16px}
 #dialog-root .modal-header h2{font-size:18px}
 #dialog-root .modal-body{padding:16px}
 #dialog-root .modal-footer{padding:12px 16px;gap:8px;flex-wrap:wrap}
 #dialog-root .doc-lines{min-width:760px}
 #dialog-root .document-table{min-width:720px}
 #toast{left:12px;right:12px;bottom:84px;max-width:none}
 .vg-native #toast{bottom:16px}
}
@media screen and (max-width:440px){
 #app .ws-kpi>strong{font-size:21px}
 #app .report-metrics{grid-template-columns:1fr 1fr}
 #app .report-metrics strong{font-size:20px}
 #app .toolbar label{flex-basis:calc(50% - 8px);min-width:0}
 #app .toolbar label:has(select[name="customer_id"]),#app .toolbar .ws-customer-filter{flex-basis:100%}
 #app .page-heading .actions .btn{font-size:12px}
}
