/* Screen-only compact phone layout. Printed label dimensions stay untouched. */
@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px){
 .content{padding:10px 10px max(12px,env(safe-area-inset-bottom));font-size:13px;min-width:0}
 .content>header{gap:8px;padding-bottom:8px;margin-bottom:8px;align-items:center}
 .content>header>div{flex:1;min-width:0}
 .content>header h1{font-size:20px;line-height:1.2;margin:2px 0;letter-spacing:-.025em}
 .content>header p{font-size:10px;line-height:1.3;margin:2px 0;overflow-wrap:anywhere}
 .content>header .eyebrow{font-size:8px;letter-spacing:.1em}
 .content #menu{width:36px;min-width:36px;min-height:36px;padding:7px;border-radius:9px}
 .content h2,.content .panel-head h2,.content .welcome h2,.content .backup-hero h2{font-size:17px;line-height:1.3;margin-top:0;margin-bottom:7px}
 .content h3{font-size:14px;line-height:1.35;margin:10px 0 6px}
 .content p{line-height:1.45}
 .content button,dialog button{font-size:12px;line-height:1.35;min-height:38px;padding:8px 10px;white-space:normal;overflow-wrap:anywhere;max-width:100%}
 .content input,.content select,.content textarea,dialog input,dialog select,dialog textarea{min-width:0;max-width:100%;font-size:13px;padding:8px;min-height:38px}
 .content input[type=checkbox],dialog input[type=checkbox]{min-height:19px;width:19px;height:19px;flex-shrink:0}
 .content label,dialog label{font-size:11px;gap:4px}
 .content .card{border-radius:10px}
 .grid{gap:7px;margin:8px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
 .metric{padding:11px 10px;min-height:0}
 .metric strong{font-size:21px;margin-top:5px;line-height:1.2}
 .metric span{font-size:10px;line-height:1.3}
 .welcome{margin:8px 0;gap:7px}.welcome p{margin:4px 0;font-size:12px}
 .toolbar,.content .panel-heading{gap:6px;margin:8px 0}
 .content .panel-heading>div{flex:1 1 180px}
 .content .panel-heading p,.section-description{font-size:11px;margin:4px 0 6px;line-height:1.4}
 .toolbar label,.toolbar:not(.filters) label{min-width:0;flex:1 1 125px;gap:4px}
 .toolbar>button{flex:1 1 90px}
 .toolbar.filters{padding:9px;gap:6px}
 .filters label:first-child{flex:1 1 100%}
 .filters label:not(:first-child){flex:1 1 110px}
 .filters select{min-width:0;width:100%}
 .workspace-actions{margin:0 0 8px;gap:6px}.workspace-actions button{min-height:36px;padding:7px 9px;font-size:11px}
 /* Combine Refresh and Notifications when the search/export tools are hidden. */
 .content:has(>.toolbar #export-csv[hidden]):has(>.toolbar:not(.filters)>label[hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;column-gap:6px}
 .content:has(>.toolbar #export-csv[hidden]):has(>.toolbar:not(.filters)>label[hidden])>*{grid-column:1/-1;min-width:0}
 .content:has(>.toolbar #export-csv[hidden]):has(>.toolbar:not(.filters)>label[hidden])>.toolbar:not(.filters){grid-column:1;margin:0 0 8px}
 .content:has(>.toolbar #export-csv[hidden]):has(>.toolbar:not(.filters)>label[hidden])>.workspace-actions{grid-column:2;align-self:end}
 .section-tabs{gap:4px;margin:7px 0;padding:4px;border-radius:9px}
 .section-tabs button{flex:1 1 95px;font-size:10px;padding:7px 5px;min-height:36px}
 .profile,.form-card,.order-summary,.message,.backup-hero,.revenue-panel{padding:12px;margin:8px 0}
 .profile p,.message p,.message-body,.backup-hero p{font-size:12px;line-height:1.45;margin:6px 0}
 .form-card label{margin:8px 0;gap:4px}
 .order-summary h2{font-size:19px}.order-total{font-size:22px}.order-summary dl{gap:8px;padding-top:10px;margin-top:10px}
 .notice{padding:8px 10px;margin:6px 0 8px;font-size:11px;line-height:1.4}
 .empty{padding:16px 10px;margin:8px 0;font-size:12px}
 .error:empty{min-height:0;margin:0}
 .chart-options{gap:6px}.chart-options label{flex:1 1 125px;min-width:0}
 .period-controls{gap:3px;padding:3px}.period-controls button{padding:6px 4px;font-size:10px;min-height:34px}
 .chart-foot{font-size:10px}#revenue-chart svg{min-height:0}
 table.premium-table tr{padding:7px 9px}
 table.premium-table td{padding:4px 0;font-size:12px;line-height:1.4;gap:7px;grid-template-columns:minmax(70px,.7fr) minmax(0,1.5fr)}
 table.premium-table td:before{font-size:10px;line-height:1.4}
 table.premium-table td button{min-height:36px;padding:7px 9px;font-size:11px}
 .catalogue-filters{padding:9px;gap:7px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .catalogue-pagination{padding:9px;gap:7px;font-size:11px}.catalogue-pagination .toolbar{gap:5px}
 .catalogue-pagination .toolbar label{flex-basis:110px}.catalogue-pagination .toolbar button{flex-basis:85px}
 .catalogue-pagination form{display:flex;gap:6px;align-items:end;flex-wrap:wrap}
 .support-shell{padding:10px 0}.support-shell article,.support-message,.support-columns>.card{padding:10px;margin:7px 0}
 .support-shell label{margin:8px 0}.support-summary-head,.support-message header{gap:6px}
 .support-coordinates{gap:8px}.support-status{font-size:10px;padding:4px 7px}.support-timeline li{padding-bottom:12px}
 .purchase-stock{padding:10px;margin-bottom:8px}.purchase-stock>label{margin:5px 0 7px}
 .purchase-dialog .toolbar button{flex-basis:90px}.purchase-add-result{gap:7px;padding:8px 0}.purchase-add-result>div{flex-basis:160px}
 .purchase-dialog form{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .po-heading{margin-bottom:7px}.purchase-order .po-heading h2{font-size:16px}.po-totals{margin-bottom:7px}
 .po-add,.po-filters{margin:6px 0}.po-footer{padding-top:7px;padding-bottom:max(7px,env(safe-area-inset-bottom))}
 .lw-types{gap:7px}.lw-types button{padding:10px}.lw-types button[aria-pressed=true]{padding:9px}
 .lw-types button strong{font-size:13px}.lw-types button small{font-size:11px;line-height:1.4}
 .lw-steps{margin:6px 0}.lw-body{gap:7px}.lw-footer{margin-top:8px;padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .lw-footer button{min-width:80px;min-height:38px}.lw-footer span{font-size:10px}
 .label-workflow-view .label-list-manager,.label-workflow-view .labels-settings,.label-workflow-view .label-model-library,.label-workflow-view #label-package-panel,#lw-preview .labels-preview,.lw-panel.card{padding:10px;margin-bottom:8px}
 .label-workflow-view .labels-settings label{margin-bottom:8px;font-size:11px}
 #label-workflow details{padding:8px;margin:7px 0}#label-workflow summary{font-size:12px}
 .label-workflow-view .label-list-manager .toolbar>label{flex-basis:145px}
 .lw-summary p,#pack-status{font-size:11px;line-height:1.4;margin:5px 0}
 #label-preview{margin-top:8px}.labels-preview p{margin:6px 0;font-size:11px}
 .model-form-grid{gap:7px}.model-checks{gap:7px}
 .barcode-camera,.barcode-camera.label-add-dialog,.purchase-work-dialog,dialog{padding:11px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}
 dialog h2,.modal-head h2{font-size:17px;line-height:1.3}
 #editor-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #editor-fields>label{margin:0;min-width:0}
 #editor-fields>label:has(input[name=name]),#editor-fields>label:has(input[type=email]),#editor-fields>label:has(input[type=password]){grid-column:1/-1}
 dialog fieldset{padding:9px}dialog textarea{min-height:90px}dialog .toolbar{margin:10px 0 0;gap:6px}
 .login-shell{padding:12px}.login-card{padding:23px 20px;border-radius:14px}
 .login-card .brand{margin-bottom:18px}.login-card h1{font-size:25px;margin-bottom:8px}
 .login-card p{margin-bottom:16px}.login-card label{margin-bottom:12px;gap:6px}
 .login-card button{min-height:42px;padding:10px}.login-card input{min-height:42px}
 .app aside{gap:10px;padding:16px 12px}.app #nav{gap:2px}.app #nav button,.app #nav a{min-height:38px;padding:8px 10px;font-size:12px}.nav-caption{padding-top:8px}
}
@media screen and (max-width:350px){.content{padding-left:8px;padding-right:8px}.content>header h1{font-size:19px}.po-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.section-tabs button{flex-basis:90px}.purchase-dialog form{grid-template-columns:1fr}}
@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px){
 .content .lw-steps button{font-size:10px;line-height:1.2;padding:6px 2px;min-height:46px;overflow-wrap:normal;word-break:normal}
 .label-page-heading h2{display:none}
}
