/* WAHL ToolPilot: deliberately scoped to .tp-app, without overriding the Cockpit. */
.tp-app{--tp-border:#e3e5e7;--tp-muted:#64717b;--tp-black:#171c21;--tp-surface:#f7f8f9;--tp-green:#1a6846;color:var(--tp-black);background:white;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.45;width:100%;min-height:420px;padding:clamp(15px,2.2vw,32px);box-sizing:border-box}
.tp-app *{box-sizing:border-box}.tp-app button,.tp-app input,.tp-app select,.tp-app textarea{font:inherit}.tp-app button{cursor:pointer;border:1px solid var(--tp-border);background:white;border-radius:9px;padding:11px 14px;color:var(--tp-black)}.tp-app button:focus-visible,.tp-app input:focus-visible,.tp-app select:focus-visible{outline:3px solid #8fbac4;outline-offset:2px}.tp-app button:hover{background:#f2f5f6}.tp-app button:disabled{cursor:wait;opacity:.55}
.tp-header{display:flex;align-items:start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--tp-border);padding-bottom:22px}.tp-header h1{font-size:clamp(26px,4vw,38px);letter-spacing:-1px;margin:5px 0 3px;line-height:1.1}.tp-header p{color:var(--tp-muted);margin:0}.tp-kicker{font-size:11px;font-weight:700;letter-spacing:1.3px;color:var(--tp-muted)}
.tp-nav{display:flex;overflow-x:auto;gap:6px;border-bottom:1px solid var(--tp-border);padding:15px 0;margin-bottom:17px;scrollbar-width:thin}.tp-nav button{white-space:nowrap;border:0;background:transparent;border-radius:6px;font-weight:600;color:#606e78;font-size:14px}.tp-nav button.active{color:#121619;background:#e9eef0}
.tp-content{max-width:1100px}.tp-list h3,.tp-form h3{font-size:17px;margin:0 0 14px}.tp-device{display:flex;justify-content:space-between;align-items:center;gap:14px;width:100%;text-align:left;margin:0 0 9px;background:var(--tp-card,white);border:1px solid var(--tp-border);padding:15px;box-shadow:0 1px 1px rgba(0,0,0,.015)}.tp-device strong{display:block;font-size:15px}.tp-device small{display:block;color:var(--tp-muted);font-size:12px;margin-top:4px}.tp-device-side{text-align:right;flex-shrink:0}.tp-status{display:inline-block;background:#edf1f4;border-radius:12px;font-size:12px;padding:4px 8px;font-weight:600}.tp-status.available{background:#e2f3e9;color:#17603d}.tp-status.issued{background:#fff0d8;color:#885200}.tp-status.maintenance{background:#fbe3e1;color:#ad3b36}.tp-status.retired{background:#e9e9e9;color:#606060}
.tp-empty{color:var(--tp-muted);padding:24px 4px}.tp-toolbar{display:flex;justify-content:flex-end;margin:8px 0 17px}.tp-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.tp-app button.tp-primary{background:#171c21;color:#fff;border-color:#171c21;font-weight:700}.tp-app button.tp-primary:hover{background:#303840}.tp-details{max-width:680px}.tp-details h2{font-size:23px;letter-spacing:-.4px;margin:16px 0 4px}.tp-back{border:0!important;padding:4px!important;color:var(--tp-muted)!important}.tp-meta{color:var(--tp-muted);font-size:13px;margin-bottom:18px}.tp-detailrow{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--tp-border);padding:12px 0}.tp-detailrow>span{color:var(--tp-muted)}.tp-detailrow>strong{text-align:right;max-width:65%;overflow-wrap:anywhere}
.tp-form{max-width:590px;background:var(--tp-surface);padding:20px;border-radius:12px;border:1px solid var(--tp-border);display:flex;flex-direction:column;gap:14px}.tp-form label,.tp-search label{font-weight:600;font-size:13px;display:flex;flex-direction:column;gap:7px}.tp-form input:not([type=checkbox]),.tp-form select,.tp-form textarea,.tp-search input{display:block;width:100%;border:1px solid #ccd2d6;border-radius:7px;padding:12px;background:white;color:var(--tp-black);font-weight:400;min-height:43px}.tp-form textarea{resize:vertical}.tp-form label.tp-inline{flex-direction:row;align-items:center}.tp-form input[type=checkbox]{width:20px;height:20px;accent-color:#1b6c4c}.tp-check{border:1px solid #d6dce0;border-radius:8px;padding:12px 14px;display:grid;gap:12px;background:white}.tp-check legend{padding:0 7px;font-size:13px;font-weight:700}.tp-check label{flex-direction:row;align-items:center;font-weight:400;font-size:14px}.tp-hint,.tp-optional{color:var(--tp-muted);font-size:12px;font-weight:400;margin:0}.tp-search{padding:15px;background:var(--tp-surface);border:1px solid var(--tp-border);border-radius:12px;margin-bottom:22px}.tp-search .tp-actions{margin-bottom:3px}.tp-success,.tp-error,.tp-warning{padding:11px 13px;border-radius:8px;border:1px solid #cddbd3;background:#f0f8f3;color:#164a2c;margin:0 0 14px}.tp-error,.tp-warning{color:#8c2a22;background:#fdf0ef;border-color:#f3ccc8}.tp-loading{font-size:13px;color:var(--tp-muted)}.tp-event{border-bottom:1px solid var(--tp-border);padding:12px 0}.tp-event strong{display:block}.tp-event small{display:block;color:var(--tp-muted)}.tp-event p{margin:5px 0}
@media(max-width:680px){.tp-app{padding:13px}.tp-header{padding-top:8px}.tp-nav{position:sticky;top:0;background:white;z-index:5}.tp-nav button{font-size:13px;padding:10px 8px}.tp-actions button{flex:1 1 120px}.tp-form{padding:14px}.tp-detailrow{font-size:13px}.tp-device{padding:12px!important}.tp-header h1{font-size:30px}}
.tp-register {max-width:760px}
.tp-register fieldset {border:1px solid var(--tp-border);border-radius:10px;padding:16px}
.tp-part {display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tp-register [role=alert]:empty,.tp-dossier [role=alert]:empty{display:none}
.tp-register [role=alert],.tp-dossier [role=alert]{color:#902a24}
.tp-cockpit .tp-details{max-width:880px}
.tp-detailrow ul {margin:0;padding-inline-start:18px}
.tp-dossier {margin-top:30px}
.tp-dossier section {padding:20px 0;border-top:1px solid var(--tp-border)}
.tp-dossier h3 {margin:0 0 12px}
.tp-dossier form {display:grid;gap:12px;max-width:500px;margin:12px 0}
.tp-dossier label {display:grid;gap:5px}
.tp-dossier summary {cursor:pointer}
.tp-device-photo {width:auto;max-width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px}
.tp-label {width:min(100%,340px);border:1px solid #888;padding:10px;margin:0 0 12px;background:#fff;color:#111}
.tp-label strong,.tp-label span{display:block;overflow-wrap:anywhere}
.tp-codes {display:flex;align-items:center}.tp-codes svg{width:72%;height:auto}.tp-codes img{width:28%;height:auto}
.tp-print-frame{width:1px;height:1px;position:fixed;left:-10000px;border:0}
.tp-timeline {list-style:none;margin:0;padding:0}
.tp-timeline li {display:grid;gap:4px;border-top:1px solid var(--tp-border);padding:12px 0}
.tp-timeline time,.tp-timeline span{font-size:13px;color:var(--tp-muted)}
.tp-timeline p{margin:0}.tp-timeline button{justify-self:start}
.tp-issue-note {margin:-4px 0 18px;padding-left:12px;color:#73342a}

.tp-project-matches {display:grid;gap:4px;margin-top:5px}
.tp-project-matches button {text-align:left;min-height:44px}
.tp-form [hidden] {display:none!important}
.tp-app .tp-danger {color:#9d2525;border-color:#ce9393;margin:8px 0}
.tp-project-matches strong {margin-right:6px}

.tp-unit-title,.tp-dossier-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.tp-unit-title h2{margin:6px 0 2px}
.tp-unit-title .tp-status{white-space:nowrap}
.tp-unit-overview{margin:14px 0}
.tp-unit-overview .tp-warning{margin-top:12px}
.tp-cockpit .tp-unit-overview:has([data-cover-photo]){display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px);gap:22px}
.tp-cockpit [data-cover-photo]{display:grid;place-items:center;min-height:100px;border-radius:12px;background:var(--tp-surface);color:var(--tp-muted);text-align:center;font-size:13px;padding:8px}
.tp-cockpit [data-cover-photo] img{max-height:150px}
.tp-dossier-heading h2{margin:0}
.tp-fold{padding:12px 0;border-bottom:1px solid var(--tp-border)}
.tp-fold summary{font-weight:600;cursor:pointer;min-height:30px;padding:5px 0}
.tp-details>.tp-actions{margin:10px 0 16px}
.tp-cockpit .tp-dossier{margin-top:18px}
.tp-app [hidden]{display:none!important}
.tp-app [data-form-error]{margin:0}
@media(max-width:600px){.tp-cockpit .tp-unit-overview:has([data-cover-photo]){grid-template-columns:1fr}.tp-cockpit [data-cover-photo]{min-height:48px}}

/* Cockpit inventory aligns the title, search and devices on a single content edge. */
.tp-cockpit {padding:clamp(16px,2vw,26px);min-height:0;overflow:visible}
.tp-cockpit .tp-content {max-width:none}
.tp-cockpit .tp-page-top {margin-bottom:16px}
.tp-cockpit .tp-module-id {display:inline-flex;align-items:center;gap:6px;color:#59636b;font-size:13px;font-weight:600}
.tp-module-id svg {width:17px;height:17px}
.tp-titlebar {position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:6px}
.tp-cockpit .tp-titlebar h1 {margin:0;color:var(--tp-black);font-size:clamp(22px,2.4vw,30px);line-height:1.2;letter-spacing:-.025em}
.tp-more-nav {position:relative;flex-shrink:0}
.tp-more-nav summary,.tp-cockpit button.tp-overview-back {display:inline-flex;align-items:center;gap:4px;padding:7px 9px;background:transparent;color:#4b555c;border:1px solid transparent;border-radius:6px;font-size:13px;cursor:pointer}
.tp-more-nav summary::-webkit-details-marker {display:none}
.tp-more-nav summary svg {width:16px;height:16px}
.tp-more-nav[open] summary,.tp-more-nav summary:hover {background:var(--tp-surface)}
.tp-more-nav summary:focus-visible {outline:2px solid var(--tp-black);outline-offset:2px}
.tp-more-nav nav {position:absolute;inset:auto 0 auto auto;z-index:9;display:grid;gap:2px;margin:3px 0 0;padding:5px;width:max-content;min-width:174px;max-width:85vw;height:auto;background:white;border:1px solid var(--tp-border);border-radius:8px;box-shadow:0 6px 20px #171c211c}
.tp-more-nav nav button {text-align:left;padding:8px 10px;border:0;background:transparent;border-radius:4px;font-size:14px}
.tp-stock-tools {display:flex;align-items:stretch;gap:10px;margin-bottom:18px}
.tp-stock-tools form {min-width:0;flex:1;margin:0}
.tp-stock-tools input {width:100%;height:100%;min-height:42px;margin:0;padding:9px 12px;border:1px solid #cdd2d6;border-radius:7px;background:white;font:inherit}
.tp-stock-tools .tp-primary {white-space:nowrap}
.tp-cockpit .tp-incident-link {margin:0 0 14px;padding:6px 10px;border:1px solid #e6c2bb;background:#fff5f2;color:#873321;font-size:14px}
.tp-stock-labels,.tp-cockpit .tp-stock-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(112px,.5fr);align-items:center;gap:12px;padding:10px 12px}
.tp-stock-labels {background:var(--tp-surface);border-block:1px solid var(--tp-border);font-size:12px;font-weight:600;color:#535d66}
.tp-cockpit .tp-stock-row {width:100%;margin:0;padding-block:13px;text-align:left;background:#fff;border:0;border-bottom:1px solid var(--tp-border);border-radius:0;box-shadow:none;line-height:1.4}
.tp-cockpit .tp-stock-row:hover {background:#f6f7f8}
.tp-stock-name strong,.tp-stock-name small,.tp-stock-state small {display:block;overflow-wrap:anywhere}
.tp-stock-row small {color:var(--tp-muted);font-size:12px;margin-top:3px}
.tp-stock-location {color:#414a52;font-size:14px;overflow-wrap:anywhere}
@media(max-width:650px){
 .tp-cockpit {padding:14px}
 .tp-stock-tools {flex-wrap:wrap;gap:8px}
 .tp-stock-tools form {flex:1 1 220px}
 .tp-stock-labels {display:none}
 .tp-cockpit .tp-stock-row {grid-template-columns:minmax(0,1fr) auto;padding-inline:0;gap:5px 10px}
 .tp-stock-state {grid-column:2;grid-row:1;text-align:right}
 .tp-stock-location {grid-column:1/-1;grid-row:2}
 .tp-stock .tp-stock-tools {margin-bottom:10px}
}

/* ToolPilot uses the fleet module's page spacing, navigation and table card. */
.tp-app.tp-cockpit {background:#e3e5e8;color:#191919;font:14px/1.45 Arial,Helvetica,sans-serif;padding:14px 12px 32px}
.tp-cockpit .tp-page-top {margin-bottom:14px}
.tp-cockpit .tp-titlebar {margin:0}
.tp-cockpit .tp-titlebar h1 {font-size:30px;line-height:1.2;letter-spacing:normal}
.tp-module-toolbar,.tp-primary-nav {display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tp-module-toolbar {justify-content:space-between;margin-top:14px}
.tp-primary-nav button,.tp-cockpit .tp-reload,.tp-module-toolbar .tp-more-nav summary {padding:9px 13px;border-radius:5px;border:1px solid #c9cbd0;background:#fff;color:#222;font-weight:600;font-size:14px}
.tp-primary-nav button[aria-current=page] {background:#191919;color:#fff;border-color:#191919}
.tp-primary-nav .tp-count {display:inline-block;margin-left:3px;min-width:21px;padding:1px 6px;text-align:center;border-radius:12px;background:#ab272b;color:white;font-size:12px;font-weight:700}
.tp-cockpit .tp-content:has(>:not(.tp-empty)) {background:#fff;border:1px solid #cdd0d4;border-radius:7px;padding:18px;min-width:0}
.tp-cockpit .tp-stock-tools {align-items:center;flex-wrap:wrap;margin-bottom:14px}
.tp-stock-tools form {flex:1 1 200px}
.tp-warehouse-filter {display:inline-flex;align-items:center;gap:8px;white-space:nowrap;min-height:40px;border:1px solid #c9cbd0;border-radius:5px;padding:6px 11px;cursor:pointer;font-weight:600}
.tp-app .tp-warehouse-filter input {width:16px;height:16px;min-height:0;margin:0;accent-color:currentColor}
.tp-warehouse-filter:has(:checked) {box-shadow:inset 0 0 0 1px currentColor}
.tp-field .tp-warehouse-filter {margin-bottom:10px}
.tp-cockpit .tp-stock-row,.tp-cockpit .tp-stock-row>span {min-width:0;white-space:normal;overflow-wrap:anywhere}
.tp-cockpit .tp-stock-row {line-height:1.45}
.tp-cockpit .tp-stock-location {display:block;line-height:1.45}
.tp-history-list {list-style:none;padding:0;margin:0}
.tp-history-list li {padding:0;margin:0;border-bottom:1px solid #e0e2e5}
.tp-history-entry summary {display:grid;grid-template-columns:14px 70px minmax(0,auto) minmax(0,1fr);align-items:baseline;gap:10px;padding:7px 3px;font-size:14px;cursor:pointer;list-style:none}
.tp-history-entry summary::-webkit-details-marker {display:none}
.tp-history-entry summary::before {content:'›';font-weight:700}
.tp-history-entry[open]>summary::before {transform:rotate(90deg);transform-origin:30% 50%}
.tp-history-entry summary time {font-variant-numeric:tabular-nums;color:#545b62;font-size:12px}
.tp-history-entry summary :is(strong,span) {min-width:0;overflow-wrap:anywhere}
.tp-history-body {padding:4px 12px 12px 26px;background:#f6f7f8}
.tp-history-body p {margin:4px 0;overflow-wrap:anywhere}
.tp-history-entry summary:hover {background:#f6f7f8}
.tp-history-older>summary {padding:10px 3px;font-weight:600;cursor:pointer}
@media(max-width:650px){
 .tp-app.tp-cockpit {padding:10px 4px 18px}
 .tp-cockpit .tp-content:has(>:not(.tp-empty)) {padding:10px}
 .tp-module-toolbar {gap:6px}
 .tp-history-entry summary {grid-template-columns:12px 60px minmax(0,1fr);gap:5px}
 .tp-history-entry summary span {grid-column:3}
}
