/* Route explorer: compact nodes remain stable; product details live beside them. */
.route-workspace{--route-edge:var(--miha-edge);--route-ink:var(--miha-ink);--route-muted:var(--miha-muted);color:var(--route-ink);min-width:0}
.route-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 12px}.route-toolbar h2{font-size:17px;margin:0;line-height:1.6}.route-toolbar p{font-size:12px;color:var(--route-muted);margin:3px 0 0}
.route-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.route-view-switch{display:flex;padding:3px;border:1px solid var(--route-edge);border-radius:var(--ui-control-radius);background:#edf3f6}.route-view-switch button{min-height:44px;padding:8px 12px;font-size:12px;background:transparent;border:0;box-shadow:none;border-radius:9px;color:var(--route-muted)}.route-view-switch [aria-pressed=true]{background:white;color:var(--route-ink);box-shadow:0 2px 5px #1539470c}
.route-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}.route-layout.has-selection{grid-template-columns:minmax(0,1fr) 286px}.route-primary{min-width:0}.route-inspector-empty{display:none}
.route-canvas-wrap{border:1px solid var(--route-edge);border-radius:var(--ui-panel-radius);overflow:hidden;background:#f6f9fc}.route-canvas-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--route-edge);padding:5px 12px;background:#ffffff9c;backdrop-filter:blur(16px);font-size:12px;color:var(--route-muted)}.route-canvas-tools>div{display:flex;align-items:center;gap:2px}.route-canvas-tools button{min-width:44px;min-height:44px;padding:6px 9px;border:0;background:transparent;box-shadow:none;border-radius:8px;font-size:13px;color:var(--route-ink)}.route-canvas-tools output{font-size:12px;min-width:42px;text-align:center;font-variant-numeric:tabular-nums}
.route-canvas{max-width:100%;max-height:580px;min-height:200px;overflow:auto;overscroll-behavior:contain;background-image:radial-gradient(#bfcfdc 0.65px,transparent .65px);background-size:18px 18px;scrollbar-width:thin;scrollbar-color:#a6bdca transparent;touch-action:pan-x pan-y;direction:rtl}.route-stage{position:relative;min-width:100%;min-height:200px}.route-graph{position:absolute;top:0;right:0;transform-origin:top right;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:64px;padding:22px 18px 30px;box-sizing:border-box;min-height:360px}.route-column{position:relative;z-index:1;display:grid;gap:14px;min-width:0;align-content:start}.route-column h3{font-size:12px;color:var(--route-muted);margin:0 0 2px;line-height:1.8;font-weight:650}
.route-node{display:flex;flex-direction:column;align-items:stretch;width:100%;text-align:start;background:#fff;border:1px solid #ccd9e5;border-radius:var(--ui-control-radius);padding:12px;box-shadow:0 3px 9px #16394a08;color:var(--route-ink);cursor:pointer;min-width:0;transition:border-color 160ms,box-shadow 160ms,opacity 160ms}.route-node:hover{border-color:var(--miha-blue);box-shadow:0 5px 14px #264e7520}.route-node.is-selected{border-color:var(--miha-blue);background:#f4f8ff;box-shadow:0 4px 14px #315c8b24}.route-node.is-muted{opacity:.42}.route-node-heading{display:flex;gap:8px;align-items:center;min-width:0}.route-node-heading strong{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.route-node-heading svg{width:19px;height:19px;flex:none;color:var(--miha-blue)}.route-node-heading svg:last-child{width:14px;margin-inline-start:auto;color:var(--route-muted)}.route-node.is-receipt .route-node-heading>svg:first-child{color:#13746c}.route-node.is-load .route-node-heading>svg:first-child{color:#976220}.route-node-subtitle{font-size:12px;line-height:1.7;color:var(--route-muted);margin-top:5px;overflow-wrap:anywhere}.route-node-count{display:flex;gap:6px;align-items:baseline;font-size:12px;margin-top:10px}.route-node-count b{font-size:18px;line-height:1.4;font-variant-numeric:tabular-nums;font-weight:700}.route-node-state{font-size:12px;color:var(--route-muted);margin-top:4px;line-height:1.8}.route-node-state.is-prepared{color:#835515}.route-node-state.is-dispatched{color:#365daf}.route-node-state.is-arrived{color:#247453}
.route-wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;color:#56919d;overflow:visible}.route-wire{fill:none;stroke:currentColor;stroke-width:1.6}.route-wires rect{fill:#f5f9fc;stroke:#d4e1e8;stroke-width:1}.route-wires text{fill:#365e70;font-family:inherit;font-size:12px;font-variant-numeric:tabular-nums}.route-wires .is-muted{opacity:.18}.route-wires .is-connected{opacity:.9}
.route-inspector:has(header){border:1px solid var(--route-edge);border-radius:var(--ui-panel-radius);background:#fff;max-height:630px;overflow:auto;overscroll-behavior:contain;padding:14px;scrollbar-width:thin;scroll-margin-top:80px}.route-inspector>header{display:flex;align-items:start;gap:8px;justify-content:space-between}.route-inspector h3{font-size:16px;line-height:1.7;margin:0;overflow-wrap:anywhere}.route-inspector header p{font-size:12px;color:var(--route-muted);margin:2px 0 0}.route-inspector header button{min-width:44px;height:44px;display:grid;place-items:center;padding:8px;border:0;background:#f1f5f8;box-shadow:none}.route-inspector header svg{width:18px}.route-inspector-note{font-size:12px;line-height:1.9;color:var(--route-muted);margin:12px 0}.route-inspector-facts{display:grid;grid-template-columns:1fr 1fr;margin:0;border-block:1px solid var(--route-edge)}.route-inspector-facts>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 4px;font-size:12px}.route-inspector-facts dt{color:var(--route-muted)}.route-inspector-facts dd{margin:0;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}.route-inspector-actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:10px}.route-inspector-actions>button{font-size:12px;min-height:44px}.route-items summary{font-size:12px;font-weight:650;min-height:44px;display:flex;align-items:center;cursor:pointer}.route-items article{display:grid;gap:3px;padding:9px 0;border-top:1px solid var(--route-edge);font-size:12px;line-height:1.7}.route-items article strong{font-size:13px;overflow-wrap:anywhere}.route-items article span,.route-items article small{font-size:12px;color:var(--route-muted)}
.route-paths{display:none;gap:12px}.route-path{padding:14px;border:1px solid var(--route-edge);border-radius:var(--ui-panel-radius);background:#fff}.route-path header{display:flex;justify-content:space-between;align-items:center;gap:10px}.route-path header strong{font-size:15px}.route-path header>span{font-size:12px;font-variant-numeric:tabular-nums}.route-path>p{font-size:12px;margin:5px 0 12px;color:var(--route-muted)}.route-source-list{display:flex;flex-wrap:wrap;gap:8px}.route-source-list button{flex:1;display:flex;align-items:center;gap:7px;min-width:100px;min-height:44px;padding:8px;background:#f0f7f5;border:1px solid #d8e8e2;border-radius:var(--ui-control-radius);font-size:12px;color:#245f53;box-shadow:none}.route-source-list b{margin-inline-start:auto;font-variant-numeric:tabular-nums}.route-source-list svg{width:17px;height:17px}.route-path-link{height:18px;width:1px;background:#91b5b4;margin-inline:auto}.route-path-target{display:flex;align-items:center;gap:10px;width:100%;text-align:start;padding:10px;background:#faf7f1;border:1px solid #e8decc;border-radius:var(--ui-control-radius);box-shadow:none;color:var(--route-ink);min-height:62px}.route-path-target>svg{width:21px;height:21px;flex:none;color:#936126}.route-path-target>svg:last-child{width:16px;margin-inline-start:auto}.route-path-target strong{font-size:13px;display:block}.route-path-target small{font-size:12px;display:block;margin-top:3px;color:#795827}.route-free{padding:12px 0}.route-free h3{font-size:14px;margin:0}.route-free>p{font-size:12px;color:var(--route-muted);margin:4px 0 10px;line-height:1.9}.route-free>button{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;text-align:start;background:transparent;border:0;border-bottom:1px solid var(--route-edge);border-radius:0;box-shadow:none;padding:8px 2px;font-size:13px}.route-free button small{display:block;font-size:12px;color:var(--route-muted)}.route-free button b{margin-inline-start:auto;font-variant-numeric:tabular-nums}.route-free button svg{width:16px}
[data-map-mode=paths] .route-paths{display:grid}[data-map-mode=paths] .route-canvas-wrap{display:none}.route-caption,.route-empty{font-size:12px;line-height:1.9;color:var(--route-muted);margin:12px 0 0}.route-workspace :focus-visible{outline:2px solid var(--miha-blue);outline-offset:3px}.route-workspace ::selection{background:#d9e8ff;color:#193c72}.route-workspace button{cursor:pointer}
.workspace[data-page=warehouse] .head{margin-bottom:16px}.wh-workspace .wh-filters{margin-bottom:12px}.wh-workspace .wh-tabs{padding-block:12px}
@media(max-width:1000px){.route-layout.has-selection{grid-template-columns:minmax(0,1fr)}.route-inspector:has(header){max-height:500px}.route-inspector-facts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.route-toolbar{align-items:stretch;flex-direction:column;gap:9px}.route-toolbar h2{font-size:16px}.route-controls{justify-content:space-between}.route-view-switch{flex:1}.route-view-switch button{flex:1}.route-canvas-tools{flex-wrap:wrap;padding:6px 8px}.route-canvas-tools>span{width:100%}.route-canvas-tools>div{width:100%;justify-content:space-between}.route-canvas{max-height:430px}.route-inspector:has(header){padding:12px}.route-inspector-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.route-caption{font-size:12px}.wh-workspace{padding:12px}.wh-summary{gap:6px 16px}.wh-summary>span{font-size:12px}.wh-tabs button{min-height:44px}.route-layout{gap:10px}}
@media(prefers-reduced-motion:reduce){.route-node{transition:none}.route-canvas{scroll-behavior:auto}}
@media(prefers-reduced-transparency:reduce){.route-canvas-tools{background:#fff;backdrop-filter:none}}

@media(max-width:360px){body:has(.wh-workspace) .head{display:flex;flex-direction:column;align-items:stretch;gap:10px}body:has(.wh-workspace) .head-actions{justify-content:flex-start}body:has(.wh-workspace) .page-title h1{white-space:nowrap}}

.route-source-list button>span{min-width:0;overflow-wrap:anywhere}.route-source-list button small{display:block;margin-top:3px;font-size:12px;line-height:1.65;color:var(--miha-muted);font-weight:400}

.route-paths [data-map="select"][aria-pressed="true"]{outline:2px solid var(--miha-blue);outline-offset:2px;background:var(--miha-blue-soft,#edf3fc);color:var(--miha-blue)}
/* Company-owned lots are separate from customer balances. */
.wh-summary{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}
.wh-own-row{grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center}
.wh-own-balance{display:flex;flex-direction:column;gap:4px;font-size:12px}
.wh-own-balance strong{font-size:16px;font-variant-numeric:tabular-nums}
.wh-own-history{grid-column:1/-1;font-size:12px;border-top:1px solid var(--miha-edge);padding-top:8px}
.wh-own-history summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--miha-muted)}
.wh-own-history p{padding:8px 0;margin:0;border-top:1px solid var(--miha-edge)}
@media(max-width:600px){.wh-own-row{grid-template-columns:minmax(0,1fr) auto}.wh-own-row>.wh-product{grid-column:1/-1}.wh-own-row>button{justify-self:end}.wh-tabs{overflow-x:auto;flex-wrap:nowrap}.wh-tabs button{white-space:nowrap;flex:none}}
