/* Shared industrial blue finish, loaded after all section styles. */
:root,:root[data-theme=dark]{--green:#91d3ff;--accent-hover:#b9e5ff;--soft:#172e43;--accent-ink:#071a2e;--blue-edge:#486e91;--blue-face:linear-gradient(155deg,#334f69 0%,#20374d 48%,#152839 100%)}
:root[data-theme=light]{--green:#1764ad;--soft:#e0f1ff;--accent-ink:#fff;--blue-edge:#8bb7da;--blue-face:linear-gradient(155deg,#f4fbff,#d7eafa 52%,#bcd8ef)}
:root body button,:root body .button{border-color:var(--blue-edge);background:var(--blue-face);color:var(--ink);border-radius:9px;box-shadow:inset 0 1px 0 #d7efff38,inset 0 -2px 0 #03182d55,0 3px 6px #0002;transition:filter .15s,box-shadow .15s}
:root body button:hover,:root body .button:hover{filter:brightness(1.13)}
:root body button:active:not(:disabled){box-shadow:inset 0 2px 4px #06172966}
:root body button.primary,:root body button[aria-pressed=true],:root body .audit-tabs button[aria-pressed=true],:root body nav button.active,:root body .mobile-dock button.active{background:linear-gradient(155deg,#b3e3ff 0%,#65b4ed 35%,#2878bc 100%);color:#071c30;border-color:#9cdaff;box-shadow:inset 0 1px 0 #fff9,inset 0 -3px 0 #13416f80,0 4px 12px #1689e52b}
:root body button:disabled{opacity:.45;filter:saturate(.4);cursor:not-allowed}
:root body button:focus-visible,:root body [data-tool-open]:focus-visible{outline:3px solid #60bfff;outline-offset:3px}
:root body .lucide{color:var(--green);filter:drop-shadow(0 1px 0 #e0f4ff70) drop-shadow(0 2px 1px #041c3680);flex-shrink:0}
:root body .primary .lucide,:root body [aria-pressed=true] .lucide{color:#123654}
.blue-section-icon{vertical-align:middle;filter:drop-shadow(0 2px 2px #0005);min-width:16px;min-height:16px}
.export-card>.blue-section-icon,.staff-audit-intro>.blue-section-icon,.card-icon>.blue-section-icon{width:48px!important;height:48px!important}
:root body .equipment-photo,:root body .equipment-open,:root body .tool-reference{background:transparent;box-shadow:none;filter:none}
:root body .equipment-photo{border:0;border-radius:0}
:root body .home-action{background:linear-gradient(145deg,#364b5a,#15232e);border-color:#88bedc}
:root body .task-summary,:root body .location-summary,:root body .inventory-key button,:root body .panel-bottom-link{box-shadow:none;background:linear-gradient(120deg,#77bdff09,transparent);border-color:var(--line)}
:root body .tool-reference{display:flex;align-items:center;gap:12px;text-align:left;padding:6px;min-width:0;max-width:100%;border:1px solid transparent;color:var(--ink)}
.tool-reference>span{min-width:0}.tool-reference strong,.tool-reference small{display:block;overflow-wrap:anywhere}.tool-reference small{font-size:11px;color:var(--muted);margin-top:4px}
[data-tool-open]{cursor:pointer;position:relative}[data-tool-open]:hover{outline:1px solid #78bfff70;outline-offset:-1px}
.tool-row>.tool-thumbnail,.tool-row>.tool-photo-empty{flex:0 0 60px;width:60px;height:60px;border-radius:10px}
.asset-list-photo{display:flex;align-items:center;gap:12px}.asset-list-photo>div{min-width:0}
.check-row>.tool-thumbnail,.check-row>.tool-photo-empty{flex:none;width:48px;height:48px}
.tool-photo-empty>.blue-section-icon{width:32px!important;height:32px!important}
.staff-audit-answer>.tool-thumbnail,.staff-audit-preview .tool-thumbnail{margin-right:10px}
.tool-reference-list{display:flex;flex-direction:column;gap:6px;list-style:none;padding:0}.tool-reference-list>li{display:flex;align-items:center;justify-content:space-between;gap:8px}
.movement-feed .tool-thumbnail,.activity-item .tool-thumbnail{width:42px;height:42px;flex:none}
@media(max-width:600px){.tool-row{flex-wrap:wrap}.tool-row>div:not(.tool-thumbnail){flex:1;min-width:150px}.tool-row>button{margin-left:auto}.tool-reference{width:100%}.check-row{gap:8px}.tool-reference .tool-thumbnail{width:44px;height:44px}}
@media print{:root body button,:root body .button{box-shadow:none!important;background:white!important;color:black!important}}


/* Show the actual label proportions without shrinking its preview. */
:root body .tool-qr-preview{padding:0}:root body .tool-qr-preview img{width:100%;height:auto;max-width:100%}

/* Shared surfaces and controls, including standalone account/login pages. */
:root,:root[data-theme=dark]{color-scheme:dark;--bg:#0b1118;--ink:#edf5ff;--muted:#abbfd0;--line:#30495e;--border:var(--line);--surface:#111c27;--surface-alt:#172634;--hover:#203447;--dark:#0d1721;--blue-panel:linear-gradient(145deg,#203448 0%,#142330 50%,#101c28 100%)}
:root[data-theme=light]{color-scheme:light;--bg:#edf5fc;--ink:#142e45;--muted:#49677e;--line:#aac7dc;--surface:#f7fbff;--surface-alt:#e1eff9;--hover:#d1e8f9;--dark:#142e45;--blue-panel:linear-gradient(145deg,#fff,#edf6ff 50%,#dcecf8)}
:root body .panel,:root body .modal,:root body .export-card,:root body .equipment-card,:root body .airtag-panel,:root body .tool-photo-gallery,:root body .staff-audit-question,:root body .loan-reminder-fields{background:var(--blue-panel);border-color:var(--line);box-shadow:inset 0 1px 0 #c6eaff20,0 4px 12px #0002;border-radius:12px}
:root body input,:root body select,:root body textarea{border-color:var(--line);color:var(--ink);background-color:var(--bg);accent-color:var(--green);border-radius:8px}
:root body input:focus-visible,:root body select:focus-visible,:root body textarea:focus-visible,:root body a:focus-visible,:root body summary:focus-visible{outline:2px solid #60bfff;outline-offset:3px}
:root body .audit-choices .chosen{background:var(--soft);border-color:var(--green);box-shadow:inset 0 1px 0 #c6eaff30}
:root body .audit-choices input{accent-color:var(--green)}
:root body .avatar,:root body .workspace-icon,:root body .brand-mark,:root body .nav-count{color:var(--green);background:var(--blue-face);border-color:var(--blue-edge)}
:root body .workspace,:root body .sidebar-bottom{color:var(--ink);border-color:var(--line)}
:root body .staff-audit-preview span,:root body .staff-audit-question small,:root body .staff-audit-answer small{color:var(--muted)}
:root body .sidebar{background:var(--surface);border-color:var(--line)}
:root body .sidebar nav button{color:var(--ink)}
:root body .gallery-main{color:var(--green)}
@media print{:root body .panel,:root body .modal{background:white!important;box-shadow:none!important}}

/* Inputs below 16px trigger iPhone focus zoom, hiding content behind fixed chrome. */
@media(max-width:850px){:root body input:not([type=checkbox]):not([type=radio]),:root body select,:root body textarea{font-size:16px!important}.personal-workspace .header-obrien{display:none}.personal-workspace .topbar{min-height:60px;height:auto;grid-template-rows:auto;padding-top:10px;padding-bottom:10px}}
.loan-dialog-open .mobile-dock{display:none!important}
:root body .loan-dialog-layer{position:fixed;inset:0 auto auto 0;width:100%;height:100dvh;z-index:200;align-items:flex-start;overflow:hidden;padding:12px}
:root body .loan-dialog-layer .lending-modal{max-height:100%;height:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding:20px;margin:auto}
@media(max-width:600px){:root body .loan-dialog-layer{padding:6px}:root body .loan-dialog-layer .lending-modal{padding:18px 16px;max-height:100%;width:100%}.lending-modal .form-footer{padding-bottom:env(safe-area-inset-bottom)}}

/* Reclaim screen space while typing, without changing the system keyboard. */
.keyboard-done{display:none!important}
.loan-options,.loan-search,.lending-modal details{border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin:10px 0}
.lending-modal summary,.loan-search summary{cursor:pointer;color:var(--green);font-weight:600;font-size:14px}
.lending-modal .loan-form-hint{font-size:13px;margin:8px 0;line-height:1.4}
.lending-modal .form-footer{margin-top:14px;padding-top:12px}
@media(max-width:850px){.editing-field .mobile-dock,.editing-field .topbar{display:none!important}.editing-field .keyboard-done{display:flex!important;position:fixed;right:10px;top:5px;z-index:250;min-height:32px;padding:6px 10px;font-size:12px}.editing-field .loan-dialog-layer{padding-top:42px!important}.editing-field main{scroll-padding-top:44px}.editing-field input,.editing-field textarea{scroll-margin-top:44px;scroll-margin-bottom:20px}.lending-modal .modal-head h2{font-size:19px}.lending-modal .modal-head button{padding:6px 10px;min-height:36px}.lending-modal label{margin:10px 0}.lending-modal input,.lending-modal textarea{padding:10px}.lending-modal .loan-reminder-fields{padding:10px}.mobile-dock button{min-height:44px!important;padding:5px 4px!important}}

/* Invoice filters stay readable beside the mobile dock. */
.invoice-register .toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.invoice-register .toolbar label,.invoice-register .row-actions label{display:flex;flex-direction:column;gap:8px;min-width:0}
.invoice-register .toolbar input,.invoice-register .toolbar select{width:100%;min-width:0}
@media(max-width:650px){.invoice-register .toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-register .invoice-fields{grid-template-columns:1fr}.invoice-register .row-actions{flex-wrap:wrap}.invoice-register .settings-card{padding:18px}}

/* Compact headers after removal of the company logo. */
:root .topbar{height:auto;min-height:76px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto}
:root .topbar .top-actions{grid-column:2}
@media(min-width:851px) and (max-width:1000px){:root .topbar{grid-template-columns:1fr}:root .topbar .top-actions{grid-column:1}}
@media(max-width:850px){:root .topbar{min-height:64px;grid-template-columns:34px minmax(0,1fr) auto;grid-template-rows:auto;padding:8px 14px}:root .topbar .top-actions{grid-column:3;grid-row:1}}

/* Scroll the whole side menu, including branding and workspace details. */
:root body .sidebar{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
:root body .sidebar nav{flex:0 0 auto;min-height:auto;overflow:visible}
:root body .page-home-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:7px 10px;font-size:13px;letter-spacing:0;text-transform:none}
:root body .page-home-button .navigation-icon{width:24px;height:24px}
:root body .page-home-button img{width:24px;height:24px;object-fit:contain}
:root body .page-footer{display:flex;align-items:center;flex-wrap:wrap;gap:16px}
@media(max-width:600px){:root .topbar{grid-template-columns:34px minmax(0,1fr);gap:6px}:root .topbar .breadcrumb{display:none}:root .topbar .top-actions{grid-column:2;gap:3px}:root .top-actions .page-home-button{padding:6px;font-size:12px}}

:root body .sidebar-close{display:none}
@media(max-width:850px){:root body .sidebar.mobile-open{touch-action:pan-y}:root body .sidebar-close{display:flex;align-self:flex-end;flex-shrink:0;min-width:44px;min-height:44px;margin-bottom:8px}}
/* Dedicated scanner is portalled to body so page scroll/transforms cannot offset it. */
:root body .camera-screen{position:fixed;inset:0;z-index:1000;width:100%;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:#07121b;color:#e7f5ff;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
:root body .camera-screen-head{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;padding:10px 16px;gap:12px}
:root body .camera-screen-head h2{font:600 18px Manrope,Arial,sans-serif;margin:0;color:#e7f5ff}
:root body .camera-screen-head button{min-width:44px;min-height:44px}
:root body .camera-screen-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;background:#000}
:root body .camera-screen .qr-viewfinder{width:100%;height:100%;border-radius:0;display:grid;place-items:center}
:root body .camera-screen #qr-reader{width:100%;height:100%;border:0!important;overflow:hidden}
:root body .camera-screen #qr-reader video{display:block;width:100%!important;height:100%!important;object-fit:contain}
:root body .camera-screen .qr-aim{width:min(64vw,240px,60vh);height:auto;max-height:none;aspect-ratio:1}
:root body .camera-screen-status{position:absolute;inset:0;display:grid;place-items:center;padding:28px;text-align:center;background:#07121bcc;color:#e7f5ff}
:root body .camera-screen-footer{flex:0 0 auto;max-height:45dvh;overflow:auto;padding:10px 16px;background:#101f2c}
:root body .camera-screen-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
:root body .camera-screen-footer .qr-camera-controls{padding:0 0 8px}
:root body .camera-screen-footer form{display:flex;align-items:end;gap:8px;margin-top:10px}
:root body .camera-screen-footer form label{flex:1;min-width:0}
:root body .camera-screen-footer input{width:100%;font-size:16px}
:root body .scan-result-overlay{align-items:center;justify-content:center;padding:12px;z-index:45}
:root body .scan-result{width:420px;max-width:100%;max-height:94dvh;overflow:auto;padding:16px;background:#101f2c;color:#e7f5ff;border:1px solid #5683a4;border-radius:18px}
:root body .scan-result header{display:flex;align-items:center;justify-content:space-between;gap:12px}
:root body .scan-result header button{min-width:44px;min-height:44px;font-size:24px}
:root body .scan-result .tool-photo{margin:10px 0}
:root body .scan-result .tool-photo img{width:100%;height:140px;object-fit:contain}
:root body .scan-result .tool-photo figcaption{display:none}
:root body .scan-result .tool-photo-missing{padding:18px;min-height:0}
:root body .scan-result h2{font:600 20px Manrope,Arial,sans-serif;margin:10px 0 6px;color:#e7f5ff}
:root body .scan-result p{margin:6px 0 12px;font-size:13px}
:root body .scan-result-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
:root body .scan-result-assign{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;margin:12px 0}
:root body .scan-result-assign small{grid-column:1/-1}
:root body .scan-result select{width:100%;font-size:16px}
:root body .scan-result footer{display:flex;justify-content:space-between;gap:8px;margin-top:14px}
:root body .checkout-screen{width:460px;padding:18px;max-height:94dvh}
:root body .checkout-screen .modal-head{margin-bottom:12px}
:root body .checkout-screen h2{font-size:21px}
:root body .checkout-screen form{display:grid;gap:12px;margin-top:14px}
:root body .checkout-screen label{font-size:14px}
:root body .checkout-screen select,:root body .checkout-screen input,:root body .checkout-screen textarea{width:100%;font-size:16px;min-height:42px}
:root body .checkout-screen .checkout-gps{border:1px solid #41647d;border-radius:10px;padding:10px}
:root body .checkout-screen .checkout-gps h3{font-size:14px;margin:0 0 6px}
:root body .checkout-screen iframe{width:100%;height:150px;border:0;border-radius:8px;margin:8px 0}
:root body .checkout-screen .form-footer{padding-top:12px;margin-top:0}
:root body .checkout-screen details label{margin-top:10px}
:root body .checkout-gps{touch-action:pan-y}
:root body .offline-status{margin:12px 18px;padding:14px 16px;border:1px solid #67c9ff;border-radius:14px;background:linear-gradient(135deg,#1b3b54,#102838);color:#e6f5ff;box-shadow:inset 0 1px 1px #a9e0ff44,0 4px 12px #0003}
:root body .offline-status p{font-size:13px;margin:6px 0;color:#c0dcec}
:root body .offline-status>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid #8ac8e333}
:root body .offline-status>div>span{flex:1;min-width:160px;font-size:14px}
:root body .offline-status>div>p{flex-basis:100%;color:#ffcbaf}
:root body .offline-status button{padding:8px 12px;min-height:40px;font-size:13px}

.condition-assistant {border:1px solid #6398b6;border-radius:14px;background:linear-gradient(145deg,#203e54,#102332);padding:16px;margin:12px 0;color:#e9f5ff}
.condition-assistant summary {cursor:pointer;font-weight:700;color:#9fdaff;font-size:18px}
.condition-assistant label {display:block;margin:12px 0}.condition-assistant textarea,.condition-assistant select {width:100%;font-size:16px}
.condition-assistant fieldset {border:0;padding:0;min-width:0}.condition-assistant button {margin:8px 8px 8px 0;white-space:normal}
.condition-photo-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.condition-photo-grid figure{margin:0}.condition-photo-grid img{width:100%;height:120px;object-fit:contain}
.condition-finding{padding:12px 0;border-top:1px solid #51748b}.condition-finding input {width:auto!important}.condition-evidence {padding:12px;margin:8px 0;border:1px solid #51748b;border-radius:10px}.condition-evidence a {display:inline-block;margin:5px;color:#83ccff}.condition-evidence img{display:block}.condition-assistant small{display:block}
/* One expandable subsection style across tool records, forms and account pages. */
:root body details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;min-height:48px;box-sizing:border-box;padding:13px 16px;margin:0;border:1px solid var(--blue-edge);border-radius:10px;background:var(--blue-face);color:var(--ink,#e7effc);font-family:inherit;font-size:16px;font-weight:600;line-height:1.35;box-shadow:inset 0 1px 0 #d7efff38,inset 0 -2px 0 #03182d55,0 3px 6px #0002}
:root body details>summary::-webkit-details-marker{display:none}
:root body details>summary::after{content:'›';font:600 25px/1 system-ui;flex-shrink:0;color:var(--green);transform:rotate(0deg)}
:root body details[open]>summary::after{transform:rotate(90deg)}
:root body details>summary:hover{filter:brightness(1.1)}
:root body details[open]>summary{margin-bottom:12px}
.tool-section{margin:12px 0;min-width:0}
.tool-section-content{padding:4px 2px 12px;min-width:0}
.tool-section-content>.panel{margin-top:0!important}
.my-tools-panel{padding:18px;max-width:900px}
.my-tools-list{margin:16px 0}
.my-tool-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:10px 0}
.my-tool-row>input{width:24px;height:24px;flex:0 0 24px;accent-color:#72caff}
:root body .my-tool-open{display:flex;align-items:center;gap:12px;text-align:left;min-width:0;flex:1;background:transparent;box-shadow:none;border:0;padding:8px}
.my-tool-open>span{min-width:0;overflow-wrap:anywhere}.my-tool-open small{display:block;margin-top:4px}
.my-tools-panel form label{display:block;margin:12px 0}.my-tools-panel form select,.my-tools-panel textarea{display:block;width:100%;margin-top:6px}
.my-tools-panel form input[type=checkbox]{width:22px;height:22px;vertical-align:middle;margin-right:8px}
.drawer>.drawer-actions,.drawer .drawer-actions{margin-top:10px;margin-bottom:16px}


:root body .voice-example-button{margin-top:8px;font-size:13px;padding:8px 12px}
:root body .voice-example-dialog{width:min(380px,calc(100vw - 32px));max-height:80dvh;overflow:auto;box-sizing:border-box;padding:20px;border:1px solid var(--blue-edge);border-radius:16px;background:var(--blue-face);color:var(--ink,#e7effc);box-shadow:0 16px 48px #0008}
:root body .voice-example-dialog::backdrop{background:#0009}
:root body .voice-example-dialog h3{font-size:18px;margin:0 0 12px}
:root body .voice-example-dialog p{font-size:14px;line-height:1.6;white-space:normal}

@media(max-width:850px){
 :root.editing-field body .overlay.modal-layer:not(.loan-dialog-layer){top:var(--editing-top,0px);bottom:auto;height:var(--editing-height,100dvh);padding:44px 8px 8px;align-items:flex-start;box-sizing:border-box}
 :root.editing-field body .modal-layer .modal{max-height:100%;min-height:0;overflow-y:auto;scroll-padding:48px 0 16px;box-sizing:border-box}
 :root.editing-field body .drawer{top:var(--editing-top,0px);bottom:auto;height:var(--editing-height,100dvh);max-height:var(--editing-height,100dvh);padding-top:44px;box-sizing:border-box;overflow-y:auto}
 :root.editing-field body textarea{max-height:calc(var(--editing-height,100dvh) - 140px);min-height:64px;overflow-y:auto;font-size:16px!important}
 :root.editing-field body .keyboard-done{top:calc(var(--editing-top,0px) + 5px)}
}
.tool-search-wrap{position:relative;flex:1;min-width:220px}
.tool-search-wrap .search{width:100%;box-sizing:border-box}
:root body .tool-search-wrap .search-mic{padding:8px;min-width:40px;min-height:40px;flex-shrink:0}
.tool-search-suggestions{position:absolute;top:100%;left:0;right:0;z-index:30;margin-top:5px;max-height:220px;overflow:auto;border:1px solid var(--blue-edge);border-radius:10px;background:var(--bg);box-shadow:0 8px 24px #0006}
.tool-search-suggestions [role=option]{padding:10px 14px;cursor:pointer;border-bottom:1px solid var(--line)}
.tool-search-suggestions [role=option]:hover,.tool-search-suggestions [aria-selected=true]{background:var(--blue-face)}
.tool-search-suggestions strong{display:block;font-size:14px;white-space:normal}.tool-search-suggestions p{padding:10px;font-size:13px}
@media(max-width:850px){.tool-search-wrap{min-width:0;flex-basis:100%}.tool-search-suggestions{max-height:min(200px,35dvh)}}
