/* Shared touch layer for phones, touch monitors and hybrid mouse/touch devices.
   app.js keeps .touch-ui enabled while a touch-capable pointer is available or used. */
.sidebar-scrim{display:none;border:0;padding:0;background:transparent}

.touch-ui body{font-size:14px}
.touch-ui button,.touch-ui a,.touch-ui summary,.touch-ui input,.touch-ui select,.touch-ui textarea{touch-action:manipulation}
.touch-ui .btn{min-height:48px;padding:11px 16px;font-size:14px}
.touch-ui .btn.small,.touch-ui .btn.square,.touch-ui .icon-button{min-width:46px;min-height:46px}
.touch-ui .btn.square{width:46px;padding:10px}
.touch-ui .icon-button{width:46px;height:46px}
.touch-ui .field input,.touch-ui .field select,.touch-ui .field textarea,.touch-ui .search input,
.touch-ui .mapping-account-label select,.touch-ui .mapping-table select,.touch-ui .bundle-add select,
.touch-ui .bundle-add input,.touch-ui .shipment-items input,.touch-ui .order-pagination select{min-height:46px;font-size:15px;padding:10px 12px}
.touch-ui input[type=checkbox],.touch-ui input[type=radio]{width:22px;height:22px;accent-color:var(--primary);flex:0 0 auto}
.touch-ui .check-line,.touch-ui .check-label,.touch-ui .radio-row label,.touch-ui .toggle-row{min-height:46px;display:flex;align-items:center;gap:10px}
.touch-ui .switch{width:46px;height:28px}
.touch-ui .switch span{border-radius:16px}
.touch-ui .switch span:after{width:22px;height:22px}
.touch-ui .switch input:checked+span:after{left:21px}
.touch-ui .side-link{min-height:52px;height:52px;padding-block:10px}
.touch-ui .side-sub{min-height:46px;padding-top:13px!important;padding-bottom:13px!important}
.touch-ui .side-bottom{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.touch-ui .tab,.touch-ui .admin-subnav a,.touch-ui .subnav a{min-height:48px;display:inline-flex;align-items:center}
.touch-ui .status-item{min-height:46px;padding:8px}
.touch-ui .status-count{padding:7px 9px}
.touch-ui .row-actions{gap:8px;flex-wrap:wrap}
.touch-ui .bulk-buttons{gap:9px}
.touch-ui .bulk-buttons .btn{min-height:44px;padding:10px 14px;font-size:13px}
.touch-ui .table-wrap,.touch-ui .tabs,.touch-ui .admin-subnav{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-gutter:stable}
.touch-ui th{padding-top:15px;padding-bottom:15px}
.touch-ui td,.touch-ui .products-table td,.touch-ui .orders-table td{padding-top:12px;padding-bottom:12px}
.touch-ui .orders-table input[type=checkbox],.touch-ui .products-table input[type=checkbox]{width:22px;height:22px}
.touch-ui .order-link,.touch-ui .text-button,.touch-ui .table-sort,.touch-ui .th-sort{min-height:44px;display:inline-flex;align-items:center;padding-block:8px}
.touch-ui .pagination-buttons button{min-width:46px;min-height:46px;padding:10px 14px}
.touch-ui .product-tools,.touch-ui .table-toolbar,.touch-ui .mapping-toolbar,.touch-ui .order-pagination{gap:14px;flex-wrap:wrap}
.touch-ui .add-menu>summary,.touch-ui .order-action-menu>summary{min-height:46px}
.touch-ui .add-menu-list a,.touch-ui .order-action-list button{min-height:46px;padding:12px 14px;font-size:14px}
.touch-ui .provider,.touch-ui .admin-module,.touch-ui .admin-feature,.touch-ui .dashboard-summary a{min-height:46px}
.touch-ui dialog{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.touch-ui dialog .dialog-heading{position:sticky;top:0;z-index:2;background:var(--surface,#fff)}
.touch-ui dialog .form-footer{position:sticky;bottom:0;z-index:2;background:var(--surface,#fff)}
.touch-ui #toast{bottom:max(22px,env(safe-area-inset-bottom));font-size:14px;padding:15px 20px}
.touch-ui :focus-visible{outline-width:3px;outline-offset:3px}

@media(hover:none){
  a:hover{text-decoration:none}
  .admin-module:hover{border-color:var(--border);box-shadow:0 1px 5px #302a4510}
}

@media(max-width:1180px){
  .touch-ui body.expanded .sidebar{width:260px;box-shadow:12px 0 36px #0005}
  .touch-ui body.expanded .workspace{margin-left:50px}
  .touch-ui body.expanded .side-top{justify-content:space-between;padding:0 12px}
  .touch-ui body.expanded .side-logo,.touch-ui body.expanded .side-label{display:block}
  .touch-ui body.expanded .side-sub{display:flex;align-items:center;color:var(--sidebar-text);background:#302c3d;padding-left:48px!important}
  .touch-ui body.expanded .side-bottom{justify-content:flex-start;padding-left:8px}
  .touch-ui body.expanded .sidebar-scrim{display:block;position:fixed;inset:0;z-index:19;background:#17142155}
}

@media(max-width:900px){
  .touch-ui .header-right .search{display:none}
  .touch-ui .header{gap:10px;padding-inline:14px}
  .touch-ui .main{padding-inline:12px}
  .touch-ui .page-top{align-items:flex-start;flex-wrap:wrap}
  .touch-ui .page-top>.actions,.touch-ui .card-head .actions{width:100%}
  .touch-ui .form-grid{grid-template-columns:1fr}
  .touch-ui .field.full{grid-column:auto}
}

@media(orientation:landscape) and (max-height:820px){
  .touch-ui .header{height:58px}
  .touch-ui .main{padding-top:14px}
  .touch-ui .side-top{height:58px}
  .touch-ui dialog{max-height:calc(100dvh - 12px)}
}
/* Phone layouts share the same data, permissions and actions as the desktop panel. */
.mobile-menu-toggle,.mobile-status-toggle,.mobile-order-search,.mobile-device-nav{display:none}
@media(max-width:760px){
  html,body{max-width:100%;overflow-x:clip}
  body{font-size:14px}
  body .workspace,body.expanded .workspace{margin-left:0}
  body .sidebar{width:260px;max-width:85vw;transform:translateX(-100%);visibility:hidden;overflow-y:auto;transition:transform .15s;z-index:30}
  body.expanded .sidebar{transform:translateX(0);visibility:visible}
  body.expanded .sidebar .side-children{display:block}
  body .side-top{justify-content:space-between;padding:0 12px;min-height:58px}
  body .side-logo,body .side-label{display:block}
  body .side-sub{display:flex;align-items:center;min-height:44px;padding:10px 20px 10px 48px;background:#302c3d;color:var(--sidebar-text)}
  body .side-link{min-height:48px;height:auto}
  body .mobile-device-nav{display:flex}
  body .side-bottom{position:sticky;bottom:0;background:var(--sidebar);justify-content:flex-start;padding:12px 10px max(12px,env(safe-area-inset-bottom));gap:12px}
  body.expanded .sidebar-scrim{display:block;position:fixed;inset:0;z-index:29;background:#17142155}
  body .header{height:60px;margin:0;padding:6px 10px;gap:8px;top:0;max-width:100%}
  body .mobile-menu-toggle{display:inline-flex;width:44px;min-width:44px;height:44px;border:1px solid var(--border)}
  body .header h1{font-size:16px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body .header-separator,body .header .breadcrumbs,body .header .search,body .header .language{display:none}
  body .header-right{gap:6px;margin-left:auto;flex:0 0 auto}
  body .header .mobile-link{min-height:44px;padding:8px;font-size:12px;display:inline-flex;align-items:center}
  body .header .mobile-link[href='#mobile']{display:none}
  body .header .profile{width:44px;height:44px;max-width:none;justify-content:center}
  body .main{padding:12px 8px calc(24px + env(safe-area-inset-bottom));min-width:0}
  body .btn,body .text-button,body .icon-button,body summary.btn{min-height:44px}
  body .field input,body .field select,body .field textarea,body .search input,body .bulk-label input,body .bulk-label select{font-size:16px;min-height:44px}
  body .orders-layout,body .order-card-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  body .status-panel{position:static;min-height:0;height:auto;max-height:none;margin:0}
  body .status-panel .card-head{min-height:52px;padding:4px 12px}
  body .mobile-status-toggle{display:inline-flex;margin-left:auto;padding:8px 14px}
  body .status-config-link{margin-left:6px;width:44px;height:44px}
  body .status-panel .status-list{display:none}
  body .status-panel.statuses-open .status-list{display:block;max-height:min(360px,50dvh);overflow:auto;padding:6px 10px}
  body .status-panel .status-item{min-height:44px;padding:8px;font-size:14px;width:100%}
  body .status-panel .status-group{display:flex;min-height:36px}
  body .order-filter-card .card-head{padding:12px;gap:10px;display:flex;flex-direction:column;align-items:stretch}
  body .order-filter-card .card-head .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:0}
  body .order-filter-card .card-head .actions>a{grid-column:1/-1}
  body .order-filter-card .card-head .btn{white-space:normal;text-align:center;font-size:12px;justify-content:center}
  body .mobile-order-search{display:flex;gap:8px;padding:0 12px 12px}
  body .mobile-order-search input{width:100%;min-width:0;min-height:46px;border:1px solid var(--border);border-radius:4px;padding:10px 12px;background:var(--surface);font:inherit;font-size:16px}
  body .mobile-order-search .btn{width:48px;flex:0 0 48px;justify-content:center;padding:8px}
  body .order-tools{padding:12px}
  body .order-records{gap:8px;margin-bottom:12px;font-size:12px}
  body .bulk-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
  body .bulk-buttons .btn{min-width:0;min-height:44px;padding:8px 4px;font-size:12px;white-space:normal;justify-content:center}
  body .selection-tools{margin:0 12px 10px;padding:6px;gap:6px;display:grid;grid-template-columns:1fr 1fr}
  body .selection-tools button{min-width:0;min-height:44px;white-space:normal;flex:auto;padding:7px;font-size:11px}
  body .order-table-wrap{padding:0 10px 10px;overflow:visible}
  body .orders-table{display:block;width:100%;min-width:0;table-layout:auto}
  body .orders-table thead,body .orders-table tbody{display:block}
  body .orders-table thead tr{display:flex;min-height:48px;align-items:center}
  body .orders-table thead th:first-child{display:flex;align-items:center;width:100%;padding:8px 2px;gap:12px;border:0}
  body .orders-table thead th:first-child:after{content:'Zaznacz stronę';font-size:13px;font-weight:400}
  body .orders-table thead th:not(:first-child){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;border:0}
  body .orders-table tbody tr{display:block;position:relative;width:100%;padding:12px;margin-bottom:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}
  body .orders-table td{display:block;width:100%;padding:5px 0;min-width:0;white-space:normal;overflow-wrap:anywhere}
  body .orders-table td:is(.col-date,.col-products,.col-delivery,.col-buyer,.col-amount){width:100%}
  body .orders-table tbody td:first-child{position:absolute;top:14px;left:12px;width:28px;padding:0}
  body .orders-table .col-order{padding:0 42px 8px 36px;width:100%}
  body .orders-table .order-link{font-size:16px;font-weight:600;min-height:44px;padding:0;display:flex;align-items:center}
  body .orders-table .order-external-number{font-size:11px;color:var(--muted);line-height:1.5}
  body .order-filter-card #collect-status{grid-column:1/-1;width:100%;min-height:48px;justify-content:center;font-size:16px}
  body .orders-table .order-account-name,body .orders-table .order-platform-name{display:inline;font-size:12px;color:var(--muted)}
  body .orders-table .order-platform-name:before{content:' · '}
  body .orders-table .order-platform-name:after{content:'';display:block}
  body .orders-table .col-date{font-size:12px;color:var(--muted);border-bottom:1px solid var(--border);padding-bottom:10px;margin-bottom:8px}
  body .orders-table td[data-label]:not(.col-date):before{content:attr(data-label);display:block;font-size:11px;font-weight:600;color:var(--muted);margin:2px 0 4px}
  body .orders-table .line-item{display:flex;gap:10px;align-items:flex-start;margin:8px 0 12px;font-size:14px;line-height:1.5}
  body .orders-table .line-item>div{min-width:0;flex:1}
  body .orders-table .product-photo{width:62px;height:80px;flex:0 0 62px}
  body .orders-table .col-amount{font-size:18px;font-weight:650;padding-top:8px}
  body .orders-table tbody td:last-child{position:absolute;top:12px;right:12px;width:44px;padding:0}
  body .orders-table .btn.square{height:44px;width:44px;min-width:44px;padding:10px}
  body .orders-table input[type=checkbox]{width:22px;height:22px;margin:0}
  body .order-pagination{padding:12px;flex-direction:column;align-items:stretch}
  body .pagination-buttons{gap:4px;justify-content:flex-start;width:100%;font-size:12px}
  body .pagination-buttons button{min-width:40px;min-height:44px;padding:8px}
  body .page-jump{margin:4px 0 0;width:100%}
  body .order-card-heading{display:flex;flex-direction:column;align-items:stretch;padding:14px}
  body .order-card-heading h2{font-size:18px;overflow-wrap:anywhere}
  body .order-card-heading .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;width:100%}
  body .order-card-heading #card-picking{order:-1;grid-column:1/-1;min-height:48px;font-size:16px}
  body .order-card-heading .btn{min-width:0;justify-content:center;padding:8px 4px;font-size:12px}
  body .custom-action-bar{display:flex;flex-wrap:wrap;padding:10px;gap:8px;margin:0}
  body .custom-action-wrap{flex:1 1 140px;min-width:0}
  html.touch-ui body .custom-action-button{min-height:52px;width:100%;font-size:16px;padding:10px}
  body .order-detail-card>.tabs{overflow:auto;gap:0;scrollbar-width:thin}
  body .order-detail-card>.tabs .tab{min-height:46px;white-space:nowrap;flex:0 0 auto}
  body .order-properties{grid-template-columns:minmax(0,1fr);gap:4px}
  body .order-properties dd{margin:0 0 12px;overflow-wrap:anywhere}
  body .order-info-grid,body .order-address-grid{grid-template-columns:1fr;gap:10px}
  body .order-totals{flex-wrap:wrap;gap:8px}
  body dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 24px);margin:auto;padding:0;overflow:auto;overscroll-behavior:contain}
  body dialog .dialog-heading{padding:14px;position:sticky;top:0;z-index:2;background:var(--surface)}
  body dialog .dialog-body{padding:16px}
  body dialog .dialog-heading h2{font-size:17px}
  body dialog .form-footer{padding:12px;display:flex;flex-wrap:wrap;position:sticky;bottom:0;background:var(--surface);z-index:2;gap:8px}
  body .receipt-thanks{padding:24px 18px}
  body .picking-shell{height:100dvh;max-width:100vw;overflow:hidden;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
  body .picking-order-strip{padding:6px;gap:6px;min-height:66px}
  body .picking-order:has(.picking-order-deadline){min-width:144px;max-width:180px;min-height:54px;padding:6px}
  body .picking-session-controls{flex-direction:column;gap:2px;align-items:stretch}
  body .picking-session-controls strong{text-align:center;font-size:11px}
  body .picking-session-controls .btn{min-height:44px;padding:7px 10px;font-size:12px}
  body .picking-main{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:30px;overflow-x:hidden}
  body .picking-summary-line{padding:10px 8px;min-width:0}
  body .picking-order-tools{display:none}
  body .picking-order-meta{font-size:13px;gap:5px;line-height:1.6;overflow-wrap:anywhere}
  body .picking-summary-right{width:100%;min-width:0;align-items:stretch}
  body .picking-summary-actions{width:100%;gap:8px;display:grid;grid-template-columns:1.2fr 1fr}
  body .picking-comment-button,body .picking-order-link{min-width:0;min-height:46px;font-size:13px;padding:9px}
  body .picking-summary-right .picking-dispatch-deadline{font-size:14px;max-width:100%;white-space:normal;align-self:flex-end;gap:7px;flex-wrap:wrap}
  body .picking-delivery-line{font-size:13px;line-height:1.6}
  body .picking-product{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:12px;padding:10px}
  body .picking-product-data{width:100%;min-width:0;align-items:flex-start;gap:10px}
  body .picking-product-copy{flex:1;min-width:0}
  body .picking-product .product-photo{width:78px;height:104px;flex:0 0 78px}
  body .picking-product h2{font-size:16px;line-height:1.4;margin-bottom:8px}
  body .picking-product-tags{gap:5px;display:flex;flex-direction:column;align-items:flex-start}
  body .picking-product-tags span{font-size:12px;min-height:29px;padding:4px 7px;max-width:100%;overflow-wrap:anywhere}
  body .picking-replace{font-size:13px;min-height:44px;align-items:center}
  body .picking-quantity-actions{width:100%;gap:8px;justify-content:space-between}
  body .picking-quantity{flex:1;justify-content:center;min-width:0}
  body .picking-action,body .picking-quantity button{width:46px;min-width:46px;height:52px;padding:8px}
  body .picking-quantity label{min-width:76px;font-size:22px}
  body .picking-quantity input{font-size:22px;width:38px}
  body .picking-quantity label{flex:1;min-width:68px;max-width:110px}
  body .picking-scan-area form{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:8px}
  body .picking-scan-area label{grid-column:1/-1}
  body .picking-scan-area input{width:100%;min-width:0;min-height:46px;font-size:16px}
  body .picking-scan-area .btn{min-width:0;padding:8px;font-size:13px}
  body .picking-footer{flex:0 0 auto;min-height:86px;padding:24px 8px max(8px,env(safe-area-inset-bottom));gap:8px}
  body .picking-footer .picking-sync{top:3px;white-space:nowrap;max-width:calc(100% - 16px);overflow:hidden;text-overflow:ellipsis}
  body .picking-footer button{min-height:52px;font-size:16px}
  body .picking-comment-text{font-size:17px}
  body .bulk-shipping-summary{padding:4px 12px 20px}
  body .bulk-shipping-summary label{display:flex;flex-wrap:wrap;gap:8px;width:100%}
  body .bulk-shipping-summary input{width:100%;min-width:0;min-height:44px;font-size:16px}
  body .bulk-shipping-shortcuts .btn{font-size:20px;padding:12px 18px;min-height:52px}
  body .shipment-columns,body .shipment-form-columns,body .form-grid{grid-template-columns:minmax(0,1fr)}
  body .form-footer .btn,body .form-footer a{min-height:44px;white-space:normal}
  body .footer{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;padding:0}
}
@media(max-width:360px){
  body .header h1{font-size:14px}
  body .header .mobile-link{font-size:11px;padding:5px}
  body .picking-product .product-photo{width:64px;flex-basis:64px;height:86px}
  body .picking-quantity-actions{gap:4px}
  body .picking-action,body .picking-quantity button{width:44px;min-width:44px}
  body .picking-quantity label{min-width:68px}
}
@media(max-width:760px){
  body .picking-order-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px}
  body .picking-order-meta i{display:none}
  body .picking-order-meta>span:first-child{grid-row:2;grid-column:1;font-size:12px}
  body .picking-order-meta>span:nth-child(3){grid-row:1;grid-column:1/-1;font-size:15px;font-weight:600}
  body .picking-order-meta>a{grid-row:2;grid-column:2}
  body .picking-order-meta>span:last-child{grid-row:3;grid-column:1/-1;font-size:12px;color:var(--muted)}
}
@media(min-width:761px) and (max-width:1100px){
  body .picking-summary-line{flex-wrap:wrap;min-width:0}
  body .picking-summary-right{margin-left:auto}
  body .picking-product-data{width:100%;min-width:0}
  body .picking-product-tags{overflow-wrap:anywhere}
  body .order-card-heading{flex-wrap:wrap}
}
@media(max-width:1100px){
  html.touch-ui body.expanded .workspace{margin-left:0}
  html.touch-ui body.expanded .sidebar-scrim{z-index:29}
  html.touch-ui body .header{padding:6px 10px;gap:8px}
  html.touch-ui body .field input,html.touch-ui body .field select,html.touch-ui body .field textarea{font-size:16px;min-height:46px}
  body .order-list-card:not(.has-order-selection) .bulk-buttons,body .order-list-card:not(.has-order-selection) .selection-tools{display:none}
  body .custom-action-bar .custom-action-control{flex:1 1 140px;min-width:0}
  body .receipt-thanks>div{padding:28px 18px}
  body .receipt-thanks h2{font-size:21px}
  body .detail-products table{display:block;min-width:0;width:100%}
  body .detail-products table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  body .detail-products table tbody{display:block}
  body .detail-products table tr{display:grid;position:relative;grid-template-columns:72px minmax(0,1fr);gap:8px 12px;border:1px solid var(--border);border-radius:7px;padding:12px;margin:0 0 12px;background:var(--surface)}
  body .detail-products table td{display:block;padding:0;min-width:0;width:auto;white-space:normal;overflow-wrap:anywhere}
  body .detail-products .detail-position{position:absolute;top:6px;left:6px;font-size:10px;color:var(--muted)}
  body .detail-products .detail-photo{grid-column:1;grid-row:1;align-self:start;padding-top:7px}
  body .detail-products .detail-name{grid-column:1/-1;grid-row:1;min-width:0;max-width:none;padding-top:7px;font-size:15px;line-height:1.5}
  body .detail-products .has-photo-column .detail-name{grid-column:2}
  body .detail-products .product-photo{width:64px;height:88px}
  body .detail-products .detail-code{grid-column:1/-1;min-width:0;font-size:12px}
  body .detail-products td[data-label]:before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:600}
  body .detail-products .detail-code:before{display:block;margin-bottom:4px}
  body .detail-products td:is(.detail-quantity,.detail-vat,.detail-price,.detail-total){grid-column:1/-1;display:flex;justify-content:space-between;gap:10px;font-size:14px}
  body .detail-products .detail-total[data-label]{border-top:1px solid var(--border);padding-top:8px;font-weight:650;font-size:16px}
  body .detail-products td:empty{display:none}
  body .shipment-details-columns{grid-template-columns:minmax(0,1fr)}
  body .shipment-dimensions{flex-wrap:wrap}
}

/* Shared controls also cover administration views loaded after this stylesheet. */
.touch-ui body button:not(:where(.sidebar-scrim)){min-width:44px;min-height:44px}
.touch-ui body :is(.btn,.profile,.status-config-link,.order-label-link,.picking-replace){touch-action:manipulation}
.touch-ui body :is(.profile,.status-config-link){min-width:44px;min-height:44px}
.touch-ui body .profile{max-width:190px}
.touch-ui body :is(.order-label-link,.picking-replace){display:inline-flex;align-items:center;min-height:44px}
.touch-ui body :is(input:not([type]),input[type=text],input[type=search],input[type=password],input[type=email],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=datetime-local],input[type=time],select,textarea){min-height:44px;font-size:16px}
.touch-ui body :is(input,select,textarea):focus{scroll-margin-block:90px}
.touch-ui body select:not([multiple]){padding-block:8px}
.touch-ui body input[type=range]{min-height:44px;touch-action:auto}
.touch-ui body input[type=color]{min-width:44px;min-height:44px}
.touch-ui body input[type=file]::file-selector-button{min-height:44px;padding:8px 12px;margin-right:10px}

/* The label is the hit area; the familiar checkbox itself stays compact. */
.touch-ui body label:has(>input:is([type=checkbox],[type=radio])):not(.switch):not(.tag-color-choice){min-height:44px;display:inline-flex;align-items:center;gap:10px;cursor:pointer}
.touch-ui body :is(.check-line,.check-label,.column-options label,.picking-setting>label,.picking-checks label,.shipment-sizes label,.custom-print-device){min-height:44px;align-items:center;gap:10px}
.touch-ui body .touch-choice{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;padding:0;vertical-align:middle;flex-shrink:0;touch-action:manipulation}
.touch-ui body .touch-choice input{width:22px;height:22px;min-height:0;min-width:0;margin:0;flex:none}
.touch-ui body .radio-row{height:auto;min-height:44px;flex-wrap:wrap;row-gap:8px}
.touch-ui body .tag-color-choice{min-height:44px;padding-block:4px}
.touch-ui body .switch{width:48px;height:44px;min-height:44px;min-width:48px}
.touch-ui body .switch span{inset:8px 0}
.touch-ui body .switch input{inset:0;width:100%;height:100%;margin:0}
.touch-ui body .switch input:checked+span:after{left:23px}

.touch-ui body :is(.address-card,.pickup-address,.customer-replies,.print-station,.print-history,.order-note-empty)>summary{min-height:44px;align-content:center;touch-action:manipulation}
.touch-ui body .order-note-empty>summary{display:inline-flex;align-items:center}
.touch-ui body .status-menu-options button{min-height:48px;padding:12px 16px;font-size:16px}
.touch-ui body .status-menu-search input{min-height:48px;font-size:16px}
.touch-ui body .status-menu-options{scroll-padding-block:8px;-webkit-overflow-scrolling:touch}
.touch-ui body :is(.add-menu-list,.order-action-list){max-height:60dvh;overflow-y:auto;overscroll-behavior-y:contain}
.touch-ui body :is(.add-menu-list a,.order-action-list button){min-height:44px;white-space:normal}
.touch-ui body :is(.picking-order,.picking-comment-button,.picking-order-link,.picking-order-comment,.picking-customer-message){min-height:48px}
.touch-ui body :is(.picking-footer button,.picking-action,.picking-quantity button){min-height:52px}
.touch-ui body .picking-quantity input{font-size:inherit}
.touch-ui body :is(.picking-scan-area input,.packing-scan input){min-height:48px}
.touch-ui body .custom-action-button:not(.custom-action-large){min-height:48px}
.touch-ui body :is(#collect-status,#card-picking,.form-footer>.btn[type=submit]){min-height:48px}

/* Keep long forms and their actions reachable while the on-screen keyboard is open. */
.touch-ui body dialog{max-height:calc(100dvh - 24px);scroll-padding-block:90px;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.touch-ui body dialog .dialog-heading{gap:12px}
.touch-ui body dialog .dialog-heading h2{min-width:0;overflow-wrap:anywhere}
.touch-ui body dialog .dialog-heading .icon-button{flex-shrink:0}
.touch-ui body dialog .form-footer{gap:8px;flex-wrap:wrap;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.touch-ui body dialog .form-footer .btn{white-space:normal}
.touch-ui body :is(.tabs,.admin-subnav,.picking-order-strip){scroll-padding-inline:12px}
.touch-ui body :is(button,a,summary,input,select,textarea):focus-visible{outline:3px solid var(--primary,#5867dd);outline-offset:3px}

@media(max-width:1100px){
  .touch-ui body .header .profile{max-width:44px}
  .touch-ui body .orders-table tbody td:first-child:has(.touch-choice){width:44px;top:12px}
  .touch-ui body .orders-table tbody tr:has(.touch-choice) .col-order{padding-left:56px}
  .touch-ui body .pagination-buttons{flex-wrap:wrap}
  .touch-ui body .pagination-buttons button{min-width:44px}
}
@media(hover:none){
  .touch-ui .custom-action-button:hover{transform:none}
}
@media(max-height:480px){
  .touch-ui body dialog{max-height:calc(100dvh - 12px);scroll-padding-block:12px}
  .touch-ui body dialog :is(.dialog-heading,.form-footer){position:static}
}

/* A touch monitor can open every section explicitly, without hovering. */
.touch-ui body .sidebar{height:100dvh;max-height:100dvh}
.touch-ui body.expanded .sidebar .side-children{display:block}
.touch-ui body .sidebar .side-nav{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-padding-block:12px;-webkit-overflow-scrolling:touch}
.touch-ui body .sidebar :is(.side-top,.side-bottom){flex-shrink:0;background:var(--sidebar);z-index:2}
.touch-ui body .sidebar .side-bottom{position:sticky;bottom:0}

/* Only mobile employee navigation is simplified; desktop role visibility stays unchanged. */
@media(max-width:1100px){
 body.employee-ui [data-mobile-admin-only]{display:none!important}
}

@media(max-width:1100px){
  body .picking-remove-line{min-height:44px;white-space:normal;max-width:100%;margin-right:8px}
}
