/* Shared phone and tablet behaviour for every Anvomed workspace. */
.app-update-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 30px;background:var(--accent-soft);border-bottom:1px solid var(--line);color:var(--ink)}
.app-update-notice p{margin:0;font-size:.875rem;line-height:1.5}.app-update-notice .btn{flex-shrink:0}
#closeNavigation{display:none}
.shell,.delivery-shell,main,.panel,.panel-head>div,.business-pharmacy-row>div{min-width:0}
.table-wrap,.hub-sheet-scroll{max-width:100%}
.panel-head,.form-actions,.order-section-heading{flex-wrap:wrap}
.business-attention-row>div:first-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:960px){
 #sidebar{width:min(86vw,320px)!important;z-index:30;transform:translateX(-100%);padding:calc(18px + env(safe-area-inset-top,0px)) 16px calc(18px + env(safe-area-inset-bottom,0px))!important;max-height:100dvh;overflow-y:auto;overscroll-behavior-y:contain}
 #sidebar.open{transform:translateX(0)}
 #sidebar .brand{padding-right:42px!important}#sidebar .brand-mark{width:32px;height:37px}#sidebar .anvomed-wordmark{width:7.5rem}
 #closeNavigation{display:flex;align-items:center;justify-content:center;position:absolute;right:12px;top:calc(14px + env(safe-area-inset-top,0px));width:44px;height:44px;color:#dce7f4;background:#ffffff0b;border:1px solid #ffffff20;border-radius:8px;font-size:1.75rem}
 .shell{margin-left:0!important}.mobile{display:inline-flex}
 .navigation-open{overflow:hidden}.navigation-open .navigation-backdrop{display:block;position:fixed;inset:0;background:#071c2b70;backdrop-filter:blur(3px);z-index:20;border:0;padding:0}
 #nav a,#nav details>summary{min-height:44px!important}#nav details a{margin-left:8px!important}
 .topbar{position:relative;flex-wrap:wrap;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px))!important;gap:8px 12px!important;align-items:center}
 #menuToggle{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:10px;border:1px solid var(--line);border-radius:8px}
 .topbar-context{flex:1;min-width:0}.topbar-context .crumb{display:flex;align-items:flex-start;flex-direction:column;gap:3px!important}
 .topbar-context .crumb>span:first-of-type,.topbar-context>.workspace-organisation{display:none}
 .topbar-context #portalCrumb{font-size:.9375rem;line-height:1.4;padding:0;margin:0;overflow-wrap:anywhere}
 .topbar-context .workspace-clock{font-size:.75rem;line-height:1.4;margin-top:2px}
 .group-wordmark .anvomed-wordmark{width:6.8rem}.group-wordmark .anvomed-header-mark{width:1.15rem;height:1.35rem}
 .topbar .top-actions{width:100%;justify-content:flex-start;margin:2px 0 0!important;gap:4px!important;flex-wrap:wrap}
 .top-actions .ghost{min-width:44px;min-height:44px!important;padding:10px!important}
 .top-actions .ghost>span{display:none}.top-actions #logout>span,.top-actions #passwordChangeCount{display:inline}
 .top-actions #logout{margin-left:auto;padding-inline:12px!important}.top-actions .brand-avatar{display:none}
 .top-actions .ui-icon{width:18px!important;height:18px!important}
 main{scroll-margin-top:12px;padding:20px max(16px,env(safe-area-inset-right,0px)) 24px max(16px,env(safe-area-inset-left,0px))!important}
 .btn,.btn.small,.row-action,.icon-btn{min-height:44px!important;touch-action:manipulation}
 .row-action{display:inline-flex;align-items:center;white-space:normal;line-height:1.4}.row-buttons .row-action{white-space:normal}
 input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:44px;max-width:100%;min-width:0}
 input[type=date],input[type=month]{width:100%;-webkit-appearance:none;text-align:left}
 .hub-scope label,.delivery-scope label{min-width:0;max-width:100%}
 .hub-scope input,.hub-scope select{width:100%}
 .panel-head{align-items:flex-start;gap:12px}.panel-head>div{width:100%}.panel-head .row-buttons{justify-content:flex-start}
 .toolbar{padding:14px 16px!important;flex-wrap:wrap}.toolbar>select{flex:1 1 150px;min-width:0}.toolbar .search{flex-basis:100%;min-width:0}
 .page-heading>.row-buttons{justify-content:flex-start!important;max-width:100%}.page-heading>.row-buttons .btn{white-space:normal}
 .business-attention-row{flex-direction:column;align-items:stretch;gap:10px}.business-attention-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;text-align:left}
 .business-period-strip>div{min-width:0}.business-coverage{white-space:normal}
 .business-pharmacy-row .hub-pharmacy-name{min-width:0}.business-pharmacy-row h3{overflow-wrap:anywhere}
 .business-year-figures strong{overflow-wrap:anywhere}
 .footer{padding:18px max(16px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))!important;gap:8px}
 .delivery-shell{padding:calc(16px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))}
 .delivery-shell #main{padding:0!important}.delivery-shell .footer{padding-inline:0!important}.delivery-topbar-actions .btn{min-height:44px!important}
 .delivery-row .delivery-card-actions .btn{white-space:normal}.delivery-row .delivery-details{min-width:0}.delivery-row .delivery-details strong{overflow-wrap:anywhere}
 .app-update-notice{flex-wrap:wrap;padding:12px 16px;gap:8px}.app-update-notice .btn{margin-left:auto}
 dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto}.dialog-head,.dialog-body{padding:18px!important}
 .dialog-head .icon-btn{flex-shrink:0}.form-actions{gap:10px}.form-actions .btn{flex:1 1 auto;justify-content:center;white-space:normal}
 .login-screen{min-height:100svh;padding:calc(20px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
 .login-card{padding:28px 24px}.login-brand{margin-bottom:28px}.login-foot{gap:16px}.login-foot a{min-height:44px;display:flex;align-items:center;max-width:48%}
}
@media(max-width:960px){
 /* Keep product, pack, supplier, price and quantity together on a phone. */
 .table-wrap:has(>.mobile-product-table){max-height:none;overflow:visible;scrollbar-gutter:auto;scroll-padding:0}
 .mobile-product-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto}
 .mobile-product-table thead{display:block!important;position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .mobile-product-table tbody{display:block;width:100%}
 .mobile-product-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:18px;border-bottom:1px solid var(--line);min-width:0;background:var(--surface)}
 .mobile-product-table tbody tr:last-child{border-bottom:0}
 .table-wrap .mobile-product-table tbody td{display:block;position:static!important;min-width:0!important;max-width:none!important;width:auto!important;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;text-align:left;overflow-wrap:anywhere}
 .mobile-product-table tbody td:first-child,.mobile-product-table tbody td[colspan],.mobile-product-table tbody td.notes-cell,.mobile-product-table tbody td.medtronic-comparisons,.mobile-product-table tbody td:last-child{grid-column:1/-1}
 .mobile-product-table tbody td:not(:first-child):not([colspan])::before{content:attr(data-label);display:block;font-size:.8125rem;font-weight:600;color:var(--muted);margin-bottom:6px;line-height:1.5}
 .mobile-product-table .product-name{font-size:var(--medicine-font,1rem)!important;max-width:100%;white-space:normal}
 .mobile-product-table button.product-name{min-height:44px;line-height:1.5}.mobile-product-table td small{display:block;white-space:normal}
 .mobile-product-table .supplier-brand{white-space:normal;max-width:100%}.mobile-product-table .input-qty,.mobile-product-table .quantity-input{width:88px;min-height:44px}
 .mobile-product-table .empty{padding:16px 0!important}.mobile-product-table .order-selected-row{box-shadow:inset 3px 0 var(--accent)}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat{min-width:0}.stat-number{overflow-wrap:anywhere}
 .hub-duty-grid,.hub-temperature-form,.form-grid{grid-template-columns:1fr!important}.form-grid>.full{grid-column:auto}
 .business-review-figures>div{flex-wrap:wrap;gap:6px}.business-review-figures dd{margin-left:auto;overflow-wrap:anywhere}
 .medtronic-order-actions{flex-wrap:wrap}.medtronic-order-actions .btn{white-space:normal}
}
@media(max-width:420px){
 .business-metrics{grid-template-columns:minmax(0,1fr)!important}.business-metrics .hub-overview-metric{min-height:0;padding:16px 18px!important}.business-metrics .hub-overview-metric>strong{margin:7px 0}
 .business-pharmacy-row{grid-template-columns:minmax(0,1fr)!important}.business-pharmacy-row .hub-pharmacy-name{grid-column:auto}
 .business-overview .hub-group-performance-totals{grid-template-columns:1fr 1fr}.business-overview .hub-group-performance-totals>a{border-bottom:1px solid var(--line)}
 .business-overview .hub-overview-delivery-figures{gap:16px}.business-chart-row{grid-template-columns:30px minmax(16px,1fr) minmax(84px,auto);padding-inline:0}
 .top-actions #staffPortalLink{order:5}.top-actions #logout{order:6}.top-actions #passwordNotice{order:4}
 .mobile-product-table tbody tr{grid-template-columns:minmax(0,1fr)}.mobile-product-table tbody td{grid-column:auto!important}
 .delivery-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-row{grid-template-columns:minmax(0,1fr)}
 .delivery-row .delivery-card-actions{flex-wrap:wrap}.delivery-row .delivery-location{flex-wrap:wrap}
 .hub-scope label,.delivery-scope label{flex-basis:100%}.login-card{padding:26px 20px}
}
@media(prefers-reduced-motion:reduce){#sidebar,.navigation-backdrop{transition:none!important;animation:none!important}}
[data-motion=reduced] #sidebar,[data-motion=reduced] .navigation-backdrop{transition:none!important;animation:none!important}
