/* Phone layout; desktop forms and print layouts retain their original structure. */
.mobile-language,.mobile-menu-shade{display:none}
@media screen and (max-width:700px){
 html{scroll-padding-top:82px;scroll-padding-bottom:90px}
 body{font-size:15px;line-height:1.45}.content{min-width:0;padding:12px 12px calc(90px + env(safe-area-inset-bottom))}
 input,select,textarea{font-size:16px!important;max-width:100%;min-height:46px}
 .grid{gap:12px}.grid label{margin-bottom:0}label label{margin-bottom:0}
 h1{font-size:24px;margin:0 0 16px}h2{font-size:20px}.header-row h1{margin:0}
 .header-row{flex-wrap:wrap}.header-row .btn{white-space:normal}.card{padding:16px;box-shadow:none}
 .topbar{display:none}.mobile-language{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}.mobile-language a{border:1px solid #64748b;padding:8px!important;font-size:14px}
 .mobile-bar{height:66px;padding:10px 16px}.mobile-bar button{min-height:44px}
 .sidebar.menu-open{position:fixed;top:66px;bottom:calc(64px + env(safe-area-inset-bottom));left:0;width:min(340px,90vw);z-index:1003;overflow-y:auto;padding:18px;gap:4px;overscroll-behavior:contain;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}
 .sidebar.menu-open>*{flex-shrink:0}.sidebar.menu-open>a{display:flex;align-items:center;min-height:44px;width:100%;padding:10px 12px}
 .sidebar.menu-open .mobile-language{align-items:center;flex-wrap:wrap}.sidebar.menu-open .mobile-language a{min-height:44px;display:flex;align-items:center}
 body.phone-menu-open{overflow:hidden}body.phone-menu-open .mobile-menu-shade{display:block;position:fixed;inset:66px 0 64px;background:#0007;z-index:1002;border:0;border-radius:0;width:100%}
 .mobile-bottom{padding:4px 4px calc(4px + env(safe-area-inset-bottom));min-height:64px;z-index:1004}
 .mobile-bottom a,.mobile-bottom button{font-family:inherit;font-size:12px;color:white;background:transparent;border:0;text-decoration:none;display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:8px;padding:8px 2px;font-weight:700}
 .mobile-bottom [aria-current=page]{background:#23405a}.phone-editing .mobile-bottom{display:none}
 .dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:16px}
 .dashboard-stats .stat-card{min-height:88px;padding:12px 8px}.stat-number{font-size:25px}.stat-label{font-size:12px;overflow-wrap:anywhere}
 .inventory-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
 .inventory-filters label:first-child{grid-column:1/-1}.inventory-filters label{font-size:14px}.inventory-filters>a{justify-content:center}
 .inventory-filters input{font-size:16px}.search-row{flex-wrap:wrap}.search-row input{min-width:160px}
 .table-scroll{max-height:none;overflow:visible;border-radius:0}
 .mobile-records,.mobile-records tbody{display:block;width:100%;min-width:0}.mobile-records thead{display:none}
 .mobile-records tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0;padding:14px;border:1px solid var(--border);border-radius:12px;background:#f8fbff}
 .mobile-records td{padding:0;border:0;min-width:0;overflow-wrap:anywhere}.mobile-records td::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:3px;font-weight:700}
 .mobile-records td:first-child,.mobile-records td:has(.actions-row),.mobile-records td[colspan]{grid-column:1/-1}
 .mobile-records td:first-child{font-weight:700}.mobile-records td[colspan]::before{display:none}
 .stock-table tr,#items-table tr{background:#f8fbff;border:1px solid var(--border);border-radius:12px;padding:14px;margin:12px 0;gap:12px}
 .stock-table td:last-child{grid-column:1/-1}.stock-table td:first-child{font-size:17px;line-height:1.4}
 #items-table td:first-child{font-size:12px;color:var(--muted)}#items-table .btn-small{min-width:44px}
 #ticket-form>.grid{grid-template-columns:1fr 1fr}#ticket-form>.grid>label{grid-column:1/-1}
 #ticket-form>.grid>label.phone-half{grid-column:auto;min-width:0}
 .ticket-extra{margin:16px 0;padding:12px;border:1px solid var(--border);border-radius:12px;background:#f8fbff}
 .ticket-extra summary{padding:0;min-height:28px}.ticket-extra .grid{margin-top:14px;grid-template-columns:1fr}
 .scanner-banner{gap:4px;padding:12px;margin-bottom:12px}.scanner-banner span{font-size:13px}
 .ticket-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ticket-form-actions .btn{width:100%;min-width:0!important}.ticket-form-actions .primary-action{font-size:14px}
 .ticket-form-actions>a{grid-column:1/-1}.summary-box{max-width:none;padding:14px}.summary-box p{margin:6px 0}
 .product-fields{gap:14px;margin:16px 0}.product-fields input[type=checkbox]{min-height:18px}
 #product-form>.btn{margin:0 4px 8px 0}.product-summary{display:grid;grid-template-columns:1fr 1fr}.product-summary span:first-child{grid-column:1/-1}
 .actions-row .btn{min-height:44px}.actions-row form{margin:0}.print-job .header-row{gap:8px}
}

.product-select,#select-all-products{width:18px!important;min-height:18px!important;height:18px;display:inline-block;vertical-align:middle}.import-preview{overflow-x:auto!important;max-width:100%}.import-preview table{min-width:650px}.btn.danger{background:#b42318;color:white}
@media screen and (max-width:700px){.import-preview table{min-width:0}.stock-table td:last-child .btn+.btn{margin-top:8px}}

.bulk-product-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}
.bulk-product-actions .check{display:inline-flex;align-items:center;gap:8px;margin:0;min-height:44px}
.bulk-product-actions input[type=checkbox]{margin:0;flex:0 0 18px}
.bulk-product-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;margin:0;min-height:44px}
.product-name-field{grid-column:1/-1}
@media screen and (max-width:600px){.bulk-product-actions{display:grid;grid-template-columns:1fr;gap:8px}.bulk-product-actions .btn{width:100%}}
