:root{font-family:Inter,Arial,sans-serif;color:#243044;background:#f5f6f8;font-synthesis:none;--blue:#2563eb;--border:#e1e5eb;--muted:#6b7280}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;background:white;border:1px solid #d7dee8;border-radius:6px;color:#374151;min-height:38px;padding:8px 12px;font-size:13px;font-weight:600}button:hover{background:#f0f5ff;border-color:#a5bbed}button:disabled{cursor:not-allowed;opacity:.5}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.danger{color:#b42318}button.link{border:0;background:transparent;color:var(--blue);padding:5px 7px}button.small{font-size:12px;min-height:32px;padding:5px 9px}header{background:white;border-top:3px solid var(--blue);border-bottom:1px solid var(--border);padding:0 28px;display:flex;align-items:center;gap:30px;min-height:78px}.brand{min-width:242px}.brand-top{display:flex;align-items:center;gap:10px}.brand strong{font-size:23px;letter-spacing:1px}.brand small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.brand select{max-width:190px;background:var(--blue);color:white;font-weight:700;font-size:11px;letter-spacing:.5px;border:0;padding:7px;border-radius:4px}nav{display:flex;gap:3px;align-self:stretch;align-items:stretch;overflow-x:auto}nav button{border:0;background:transparent;border-radius:0;white-space:nowrap;text-transform:uppercase;font-size:11px;letter-spacing:.7px;padding:18px 12px;border-bottom:2px solid transparent}nav button.active{color:var(--blue);border-bottom-color:var(--blue)}.local-note{font-size:11px;padding:9px 28px;background:#edf3ff;color:#47628e;border-bottom:1px solid #dce7fb}main{max-width:1360px;margin:auto;padding:30px 28px 80px}h1{font-size:24px;letter-spacing:-.5px;margin:0 0 8px}h2{font-size:16px;margin:0}h3{font-size:14px;margin:0}p{color:var(--muted);line-height:1.6;font-size:13px;margin:6px 0 16px}.page-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:24px}.actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.card{background:white;border:1px solid var(--border);border-radius:9px;margin-bottom:22px;box-shadow:0 1px 2px #11182704;overflow:hidden}.card-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:17px 18px;border-bottom:1px solid var(--border)}.card-body{padding:20px}.muted,small{color:var(--muted);font-size:12px}.subtext{display:block;font-size:11px;color:var(--muted);margin-top:5px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{font-size:11px;letter-spacing:.3px;text-align:left;color:var(--muted);font-weight:600;background:#fafbfc;padding:13px 16px}td{padding:13px 16px;border-top:1px solid #edf0f4;vertical-align:middle}td:first-child{font-weight:500}tbody tr:hover{background:#fafcff}.empty{padding:30px;text-align:center;color:var(--muted);font-size:13px}.badge{display:inline-block;white-space:nowrap;padding:5px 8px;border-radius:5px;background:#f0f3f7;font-size:11px;font-weight:600;color:#536174}.badge.blue{background:#eaf1ff;color:#2563eb}.badge.green{background:#edf8f0;color:#24814a}.badge.amber{background:#fff5dd;color:#916118}.badge.red{background:#fff0ee;color:#b42318}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}.stat{background:white;border:1px solid var(--border);border-radius:8px;padding:19px}.stat strong{display:block;font-size:27px;color:#243044;margin-bottom:6px}.stat span{font-size:12px;color:var(--muted)}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-bottom:18px}.toolbar input[type=search]{flex:1;min-width:180px}.toolbar button.active,.toggle.active{background:#eaf1ff;color:#2563eb;border-color:#a5bbed}input,select,textarea{border:1px solid #d7dee8;border-radius:6px;padding:10px 11px;background:white;color:#243044;max-width:100%;font-size:13px}input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue)}input[type=file]{width:100%}textarea{resize:vertical;min-height:75px}label.field{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;margin-bottom:16px}label.check{display:flex;align-items:center;gap:9px;font-size:13px;margin-bottom:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid .wide{grid-column:1/-1}dialog{border:1px solid var(--border);border-radius:12px;width:min(620px,calc(100vw - 24px));padding:0;box-shadow:0 20px 80px #15233a33;max-height:92dvh;color:#243044}dialog::backdrop{background:#17253c66}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:19px 22px;border-bottom:1px solid var(--border)}.modal-body{padding:22px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.error{background:#fff0ee;color:#a12720;padding:10px;border-radius:6px;font-size:13px;margin-bottom:12px}.error:empty{display:none}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#243044;color:white;padding:12px 20px;border-radius:8px;box-shadow:0 6px 20px #0002;z-index:50;font-size:13px;display:none;max-width:90vw}.warning{background:#fff9e9;border:1px solid #f0dfac;padding:15px;border-radius:8px;font-size:13px;color:#846116;margin:16px 0}.subnav{display:flex;gap:10px;margin-bottom:24px;border-bottom:1px solid var(--border);padding-bottom:12px}.back{margin-bottom:14px}.field-row{padding:18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:16px}.field-row.issue{background:#fff8f5}.field-row.ok{background:#f5fbf7}.field-row .name{font-size:14px;line-height:1.4}.field-row .answer{display:flex;gap:7px;flex-shrink:0}.field-row textarea{width:100%;margin-top:10px}.field-row .details{flex:1}.sticky-bottom{position:sticky;bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:white;padding:18px;border:1px solid var(--border);border-radius:9px;box-shadow:0 4px 24px #24304415}.signature{background:#fff;border:1px dashed #b6c3d6;width:100%;height:160px;touch-action:none;border-radius:7px}.signature-image{max-width:320px;width:100%;background:white}.progress{height:6px;overflow:hidden;background:#e6edf8;border-radius:5px;margin:15px 0}.progress progress{width:100%;height:6px;display:block;accent-color:var(--blue)}.split{display:grid;grid-template-columns:1.3fr 1fr;gap:22px}.print-only{display:none}.route-link{color:var(--blue);text-decoration:none;font-weight:600}.route-link:hover{text-decoration:underline}.scan-input{font-size:20px;width:100%;padding:18px;margin:12px 0}.notice{font-size:13px;border-left:3px solid var(--blue);padding:12px 16px;background:#edf3ff;margin:15px 0}code{font-family:monospace;background:#f2f5f8;padding:2px 4px}.spaced{margin-top:20px}a{color:var(--blue)}
@media(max-width:1000px){header{flex-direction:column;align-items:stretch;gap:10px;padding:15px 18px 0}.brand{min-width:0}.brand-top{justify-content:space-between}nav button{padding:14px 12px}main{padding:22px 16px 65px}.local-note{padding:8px 18px}.stats{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}.page-head{flex-wrap:wrap}}@media(max-width:560px){h1{font-size:22px}.grid{grid-template-columns:1fr}.grid .wide{grid-column:auto}.card-head{align-items:flex-start;flex-wrap:wrap}.field-row{align-items:flex-start;flex-wrap:wrap}.field-row .answer{width:100%}.field-row .answer button{flex:1;min-height:44px}.sticky-bottom{flex-wrap:wrap}.sticky-bottom button{width:100%}.toolbar select{width:100%}.brand select{max-width:220px}td,th{padding:12px}.stat{padding:15px}.modal-body{padding:16px}.actions button{min-height:40px}.subnav{overflow:auto}.subnav button{white-space:nowrap}}
#qr{max-width:230px;margin:15px auto}#qr svg{width:100%;height:auto}
@media print{header,.local-note,.toolbar,.subnav,.no-print,.actions,.back,#toast,.sticky-bottom{display:none!important}body{background:white}main{max-width:none;padding:0}button{display:none!important}.card{box-shadow:none;break-inside:auto;border:0}.card-head{padding-left:0}.print-only{display:block}table{font-size:10px}td,th{padding:7px}h1{font-size:20px}.signature-image{width:220px}body:has(dialog[open]) main{display:none}dialog[open]{position:static;width:100%;max-height:none;border:0;box-shadow:none}dialog::backdrop{display:none}}

.crew-member{border:1px solid #dbe3ee;border-radius:10px;padding:16px;margin:16px 0}.crew-member legend{font-weight:600;padding:0 6px}

.anomaly-controls{padding:12px;background:#fff7ed;border-radius:8px;margin:12px 0}.repair-confirmed{padding:12px;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:8px;margin:12px 0}.repair-confirmed p{margin:6px 0;font-size:13px}

dialog:has([name="include0"]){width:min(1180px,calc(100vw - 24px))}dialog:has([name="include0"]) table{min-width:900px}dialog:has([name="include0"]) td:nth-child(2){min-width:300px}dialog:has([name="include0"]) td:nth-child(3){width:100px}

.import-section{margin:26px 0}.import-section>h3{padding:14px;background:#173b64;color:white;border-radius:6px}.import-pocket{border:1px solid #dbe3ed;border-radius:8px;padding:16px;margin:12px 0}.import-pocket summary{font-weight:700;cursor:pointer;margin-bottom:16px}

#label-sheets{display:flex;flex-wrap:wrap;gap:3mm;overflow:auto;padding:4mm;background:#edf1f5}.barcode-label{flex:none;background:white;line-height:0;break-inside:avoid}.barcode-label svg{display:block}#label-error{color:#a12720}@media print{dialog.barcode-label-dialog .modal-head,dialog.barcode-label-dialog .modal-body>*:not(#label-sheets){display:none!important}dialog.barcode-label-dialog .modal-body{padding:0}dialog.barcode-label-dialog #label-sheets{padding:0;overflow:visible;background:white}dialog.barcode-label-dialog{margin:0;padding:0;max-width:none;width:100%}}
.excel-import-dialog{width:min(1450px,calc(100vw - 24px))}.excel-import-dialog table{min-width:1150px}.excel-import-dialog td{min-width:130px}.excel-import-dialog td:nth-child(2){min-width:210px}
.bag-red>.card-head{background:#ffe0e0;border-left:8px solid #c62828}.bag-yellow>.card-head{background:#fff4b3;border-left:8px solid #b58800}.bag-orange>.card-head{background:#ffe4c7;border-left:8px solid #d96800}.bag-blue>.card-head{background:#d9f2ff;border-left:8px solid #087bb5}.bag-purple>.card-head{background:#f0ddff;border-left:8px solid #7b32a8}.refill-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #dbe3ed}.refill-row small{display:block;margin-top:6px}.refill-quantity{display:flex;gap:6px;align-items:center}.refill-quantity input{width:75px;text-align:center}.refill-quantity button{min-width:44px;min-height:44px;font-size:22px}@media(max-width:550px){.refill-row{flex-wrap:wrap}.refill-quantity{margin-left:auto}}
.frequent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.frequent-button{display:flex;flex-direction:column;gap:8px;text-align:left;min-height:115px;padding:16px}.frequent-button small{font-weight:normal}.frequent-button.bag-red{background:#ffe0e0;border-left:6px solid #c62828}.frequent-button.bag-yellow{background:#fff4b3;border-left:6px solid #b58800}.frequent-button.bag-orange{background:#ffe4c7;border-left:6px solid #d96800}.frequent-button.bag-blue{background:#d9f2ff;border-left:6px solid #087bb5}.frequent-button.bag-purple{background:#f0ddff;border-left:6px solid #7b32a8}

.brand-identity{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:9px 0}.org-logos{display:flex;align-items:center;gap:8px}.org-logo{display:block;width:auto;height:auto;max-width:90px;max-height:54px;object-fit:contain}.org-logo-editor{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:14px 0 24px}.org-logo-editor section{min-width:0;border:1px solid var(--border);border-radius:8px;padding:12px}.org-logo-editor input{width:100%}.org-logo-preview{display:flex;align-items:center;justify-content:center;min-height:86px;margin:10px 0;padding:8px;background:#f5f6f8;border-radius:6px;color:var(--muted);font-size:12px}.org-logo-preview img{max-width:100%;max-height:100px;object-fit:contain}@media(max-width:1000px){.brand-identity{flex-wrap:wrap}.brand-identity .brand{flex:1;min-width:240px}.org-logo{max-width:80px;max-height:48px}}@media(max-width:560px){.org-logo-editor{grid-template-columns:1fr}.brand-identity .brand{min-width:0;flex-basis:100%}.brand select{max-width:calc(100vw - 130px)}}

.warehouse-product-link{text-align:left;white-space:normal;font-weight:600;text-decoration:underline;text-underline-offset:3px}

tr.warehouse-expiry-red>td{background:#ffe0e0}tr.warehouse-expiry-yellow>td{background:#fff4b3}tr.warehouse-expiry-red:hover>td{background:#ffd2d2}tr.warehouse-expiry-yellow:hover>td{background:#ffed8c}

.warehouse-panel-buttons{display:flex;gap:12px;margin:0 0 24px;flex-wrap:wrap}.warehouse-panel-buttons button{min-width:150px;padding:16px 28px;font-size:16px;font-weight:600}

[data-product-camera][hidden]{display:none}[data-product-camera] video{display:block;width:100%;max-height:300px;background:#111;border-radius:8px;margin:12px 0}

.warehouse-subnav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding-bottom:14px;border-bottom:1px solid var(--border)}
@media print{.warehouse-subnav{display:none!important}}

tr.medical-revision-failed>td{background:#ffe0e0}tr.medical-revision-failed:hover>td{background:#ffd2d2}

tr.fleet-available>td{background:#dcfce7}tr.fleet-available:hover>td{background:#bbf7d0}

.settings-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;margin:24px 0}.settings-tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:10px;padding:24px;min-height:125px;background:white;border:1px solid #dce2eb;border-radius:12px}.settings-tile strong{font-size:1.12rem}.settings-tile span{font-weight:400;color:#596579;line-height:1.5}.settings-tile:hover{background:#f1f6ff;border-color:#3b72c4}

/* Warehouse hub: summaries first, one workspace at a time. */
.warehouse-summary .stat{text-align:left;cursor:pointer;min-width:0}
.warehouse-tiles{margin:18px 0;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.warehouse-tiles .settings-tile{min-height:110px;text-align:left}
.warehouse-tiles .settings-tile strong{font-size:1.15rem}
.warehouse-more-title{margin-top:28px}

.order-row-waiting>td{background:#fff0f0!important}.order-row-ordered>td{background:#fff6cf!important}.order-row-received>td{background:#e4f5e9!important}.order-status-flags{display:flex;flex-wrap:wrap;gap:6px}.order-status-flags button{font-size:.85rem}.order-status-flags [aria-checked="true"]{font-weight:750;border:2px solid currentColor}

.order-product-summary + .order-product-summary{margin-top:8px}

.global-back-bar{margin:0 0 16px}.global-back-bar button,.dialog-back-button{font-weight:700;min-height:42px}.dialog-back-button{margin:14px 20px 0}

.warehouse-hub-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start;margin-top:20px}
.warehouse-sidebar{padding:20px;background:#fff;border:1px solid #dce2eb;border-radius:14px}
.warehouse-sidebar h2{font-size:1.1rem;margin:0 0 10px}.warehouse-sidebar p{font-size:.9rem;color:#596579;line-height:1.5}
.warehouse-sidebar-links{display:flex;flex-direction:column;gap:10px;margin-top:16px}.warehouse-sidebar-links button{width:100%;text-align:left;min-height:46px;padding:12px 14px}
.warehouse-hub-main{min-width:0}.warehouse-hub-main .warehouse-summary{margin-top:0}
@media(max-width:700px){.warehouse-hub-layout{grid-template-columns:minmax(0,1fr);gap:16px}.warehouse-sidebar{padding:16px}}

.warehouse-button-icon{width:30px;height:30px;flex-shrink:0;color:#17648a}
.warehouse-tiles .warehouse-tile-title{display:flex;align-items:center;gap:12px;color:#18394d;font-weight:700}
.warehouse-sidebar-links button{display:flex;align-items:center;gap:10px}.warehouse-sidebar-links .warehouse-button-icon{width:24px;height:24px}

.warehouse-sidebar-links button.primary .warehouse-button-icon{color:inherit}
.warehouse-sidebar-links hr{width:100%;border:0;border-top:1px solid #dce2eb;margin:8px 0}

.warehouse-button-image{display:inline-block;width:78px;height:92px;flex-shrink:0;background-image:url('/button-illustrations-v1.png');background-size:400% 300%;background-repeat:no-repeat}
.warehouse-sidebar-links .warehouse-button-image{width:48px;height:58px}
.warehouse-sidebar-links button{padding:8px;gap:8px}.warehouse-tiles .warehouse-tile-title{gap:12px}
.warehouse-sidebar-links button.primary .warehouse-button-image{background-color:#fff;border-radius:8px}

.warehouse-list{display:grid;gap:14px;margin-top:18px}.warehouse-list-entry{display:flex;align-items:center;gap:18px;padding:18px 22px;background:white;border:1px solid #dbe3eb;border-radius:14px;color:#153c4b;text-decoration:none;box-shadow:0 2px 8px #142d4608}.warehouse-list-entry:hover{background:#f0f7fb;border-color:#75a7be}.warehouse-list-entry:focus-visible{outline:3px solid #2563eb;outline-offset:3px}.warehouse-list-entry strong{display:block;font-size:20px;line-height:1.3}.warehouse-list-entry small{display:block;margin-top:7px}.warehouse-list-entry .warehouse-button-image{width:60px;height:72px}.warehouse-entry-arrow{margin-left:auto;font-size:26px}@media(max-width:560px){.warehouse-list-entry{padding:14px;gap:12px}.warehouse-list-entry strong{font-size:18px}}
.medical-inventory-layout td,.medical-inventory-layout th{padding:12px 8px}.medical-inventory-layout td{font-size:12px}.medical-inventory-layout td button{font-size:12px;padding:7px 9px}

.warehouse-sidebar-links button.check-register-alert{background:#b42318;color:#fff;border:2px solid #b42318;animation:check-alert-pulse 1.8s ease-in-out infinite}.check-register-alert .warehouse-button-image{background-color:#fff;border-radius:8px}
@keyframes check-alert-pulse{0%,100%{box-shadow:0 0 0 0 rgba(180,35,24,.1);background:#b42318}50%{box-shadow:0 0 0 5px rgba(180,35,24,.23);background:#7a1710}}
@media(prefers-reduced-motion:reduce){.warehouse-sidebar-links button.check-register-alert{animation:none}}

.issue-row-action{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.issue-row-action .warehouse-button-image{width:36px;height:40px;flex:0 0 36px}
