/* LOGISCHAB Vehicles page. Uses the theme tokens from app.css; only the drawing colours are defined here. */
.vh {
  --vh-r: 20px;
  --vh-b: #3B3E42;                      /* vehicle body */
  --vh-b-line: rgba(255, 255, 255, .22);
  --vh-b2: #101113;                     /* chassis, dark parts */
  --vh-b2-line: rgba(255, 255, 255, .28);
  --vh-glass: #9FB4C4;
  --vh-hold: #17181A;                   /* open cargo space */
  --vh-tyre: #050506;
  --vh-rim: #6F7378;
  --vh-hull: #4A4E53;
  --vh-sea: rgba(110, 160, 190, .22);
  --vh-box: #C99A5E;                    /* cartons */
  --vh-box-line: #8A6230;
  --vh-pal: #7A5A30;
  --vh-ok: var(--st-done);
  display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 2.25rem); align-items: start;
}
[data-theme="light"] .vh {
  --vh-b: #FFFFFF;
  --vh-b-line: rgba(20, 21, 22, .22);
  --vh-b2: #2A2C2F;
  --vh-b2-line: transparent;
  --vh-glass: #2F3740;
  --vh-hold: #E4E4E1;
  --vh-tyre: #1B1C1E;
  --vh-rim: #D5D7DA;
  --vh-hull: #2A2C2F;
  --vh-sea: rgba(60, 110, 140, .16);
}

/* ---------- drawings ---------- */
.vh-art { display: block; width: 100%; height: auto; overflow: visible; }
.vh-art .b { fill: var(--vh-b); stroke: var(--vh-b-line); stroke-width: 1.5; }
.vh-art .b2 { fill: var(--vh-b2); stroke: var(--vh-b2-line); stroke-width: 1.5; }
.vh-art .gl { fill: var(--vh-glass); }
.vh-art .gl2 { fill: none; stroke: var(--vh-glass); stroke-width: 6; stroke-dasharray: 5 4; }
.vh-art .ln { fill: none; stroke: var(--vh-b-line); stroke-width: 2.5; stroke-linecap: round; }
.vh-art .net { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-dasharray: 3 7; stroke-linecap: round; }
.vh-art .hold { fill: var(--vh-hold); stroke: var(--line-2); stroke-width: 1; }
.vh-art .hull { fill: var(--vh-hull); stroke: var(--vh-b-line); stroke-width: 1.5; }
.vh-art .sea { fill: var(--vh-sea); }
.vh-art .wh circle { fill: var(--vh-tyre); stroke: var(--vh-b2-line); stroke-width: 1.5; }
.vh-art .wh .rim { fill: var(--vh-rim); stroke: none; }
.vh-art .wh .hub { fill: var(--vh-tyre); stroke: none; }
.vh-art .slot { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.vh-art .box, .vh-art .blk.uld { fill: var(--vh-box); stroke: var(--vh-box-line); stroke-width: 1; }
.vh-art .tape { fill: none; stroke: var(--vh-box-line); stroke-width: 1; opacity: .6; }
.vh-art .pal { fill: var(--vh-pal); }
.vh-art .teu { stroke: rgba(0, 0, 0, .35); stroke-width: .75; }
.vh-art .t0 { fill: #C4623A; } .vh-art .t1 { fill: #3F7CAC; } .vh-art .t2 { fill: #5E8F6B; } .vh-art .t3 { fill: #C9A23F; }
.vh-art.over .hold { stroke: var(--crit); stroke-width: 2.5; }

.vh-art .blk.new { animation: vh-in .22s cubic-bezier(.2, .8, .2, 1) backwards; transform-box: fill-box; transform-origin: 50% 100%; }
.drag .vh-art .blk.new { animation: none; }
@keyframes vh-in { from { opacity: 0; transform: translateY(-10px) scale(.92); } }

.vh-handle { cursor: ew-resize; touch-action: none; outline: none; }
.vh-handle line { stroke: var(--text); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .7; }
.vh-handle .hit { fill: transparent; }
.vh-handle .knob { fill: var(--surface-solid); stroke: var(--text); stroke-width: 1.5; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .3)); transition: r .15s; }
.vh-handle path { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vh-handle:hover .knob, .drag .vh-handle .knob { r: 20px; }
.vh-handle:focus-visible .knob { stroke: var(--accent); stroke-width: 4; }

/* ---------- vehicle list ---------- */
.vh-side { position: sticky; top: 4.6rem; max-height: calc(100vh - 5.6rem); display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1rem; }
.vh-side-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: 0 .25rem; }
.vh-side-head h2 { font-size: 1.05rem; font-weight: 500; }
.vh-list { list-style: none; margin: 0; padding: .25rem .7rem 1.5rem .25rem; overflow-x: hidden; display: grid; gap: .6rem; overflow-y: auto; scrollbar-width: thin; align-content: start; }
.vh-card {
  width: 100%; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: .8rem; text-align: left;
  padding: .7rem .8rem; border-radius: var(--vh-r); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 45%, transparent);
  color: var(--text); cursor: pointer; transition: background-color .15s, box-shadow .2s, transform .2s cubic-bezier(.2, .8, .2, 1), border-color .15s;
}
.vh-card:hover { background: var(--surface-solid); border-color: var(--line-2); }
.vh-card:active { transform: scale(.985); }
.vh-card[aria-pressed="true"] { background: var(--surface-solid); border-color: var(--line-2); box-shadow: var(--shadow-pop); transform: translateX(6px); }
.vh-thumb { display: grid; place-items: center; height: 54px; border-radius: 12px; background: var(--raise); overflow: hidden; padding: 0 4px; }
.vh-card-t { display: grid; gap: .1rem; min-width: 0; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vh-card-t b { font-size: .9rem; font-weight: 500; color: var(--text); line-height: 1.25; }
.vh-go { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); }
.vh-go::before { content: "+"; font-size: 1.05rem; line-height: 1; font-weight: 300; }
.vh-card[aria-pressed="true"] .vh-go { background: var(--text); border-color: var(--text); color: var(--bg); }
.vh-card[aria-pressed="true"] .vh-go::before { content: "✓"; font-size: .8rem; font-weight: 600; }

/* ---------- main column ---------- */
.vh-main { display: grid; gap: 1.25rem; min-width: 0; }
.vh-main > * { min-width: 0; }
.vh-head { min-height: 5.2rem; }
.vh-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); font-weight: 300; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-head p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.vh-stage { position: relative; padding-top: 2.3rem; }
.vh-warn { position: absolute; inset: 0 0 auto; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; }
.vh-warn li { padding: .25rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 550; color: var(--crit); background: color-mix(in srgb, var(--crit) 12%, var(--surface-solid)); border: 1px solid color-mix(in srgb, var(--crit) 45%, transparent); }
.vh-hint { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; text-align: center; }

.vh-specs { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem 1.5rem; padding: 0 .25rem; }
.vh-specs dt { font-size: .74rem; color: var(--muted); }
.vh-specs dd { margin: .15rem 0 0; font-size: .95rem; font-variant-numeric: tabular-nums; min-height: 2.9em; }
.vh-specs .bad dd { color: var(--crit); font-weight: 600; }

.vh-panel, .vh-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--vh-r); box-shadow: var(--shadow); }
.vh-panel { padding: 1.1rem 1.25rem; }
.vh-panel h2 { font-size: .8rem; font-weight: 500; color: var(--muted); }
.vh-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 1rem; }
.vh-tech { display: grid; gap: .4rem; align-content: space-between; }
.vh-tech .b, .vh-tech .b2, .vh-tech .hull, .vh-tech .wh circle, .vh-tech .gl { fill: none; stroke: var(--muted); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.vh-tech .ln, .vh-tech .net { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vh-tech .wh .hub, .vh-tech .hold, .vh-tech .sea, .vh-tech .gl2 { display: none; }
.vh-tech .free { fill: var(--raise-2); }
.vh-tech .loaded { fill: var(--vh-ok); transition: width .25s cubic-bezier(.2, .8, .2, 1); }
.vh-measure { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vh-measure span::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 3px; margin-right: .4rem; background: var(--raise-2); border: 1px solid var(--line-2); }
.vh-measure .k-loaded { color: var(--text); }
.vh-measure .k-loaded::before { background: var(--vh-ok); border-color: transparent; }

.vh-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.vh-tile { position: relative; padding: 1rem 1.6rem 1rem 1.1rem; display: grid; align-content: start; gap: .1rem; min-height: 10.5rem; }
.vh-tile-n { font-size: .74rem; color: var(--muted); min-height: 2.3em; line-height: 1.15; }
.vh-tile-p { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 300; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.vh-tile-p small { font-size: .85rem; color: var(--muted); margin-left: .15rem; letter-spacing: 0; vertical-align: top; position: relative; top: .5em; }
.vh-tile-l { font-size: .74rem; color: var(--muted); }
.vh-tile-k { margin-top: .5rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.vh-meter { position: absolute; right: .85rem; top: 1rem; bottom: 1rem; width: 4px; border-radius: 4px; background: linear-gradient(to top, #4FC98A, #D8D04A 60%, #F0803C 85%, #E5484D); }
.vh-meter i { position: absolute; left: 50%; width: 12px; height: 12px; margin: 0 0 -6px -6px; border-radius: 50%; background: var(--surface-solid); border: 2px solid var(--text); transition: bottom .25s cubic-bezier(.2, .8, .2, 1); }

.vh-axles { display: grid; gap: .9rem; min-height: 15.5rem; align-content: start; }
.vh-panel-head { display: flex; align-items: center; gap: .6rem; }
.vh-tag { font-size: .72rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; background: var(--text); color: var(--bg); }
.vh-barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: baseline; }
.vh-bar-n { font-size: .9rem; }
.vh-bar-v { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.vh-track { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 8px; background: var(--raise-2); }
.vh-track i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: var(--vh-ok); transition: width .25s cubic-bezier(.2, .8, .2, 1), background-color .15s; }
.vh-track b { position: absolute; left: 80%; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--text); } /* the limit sits at 80 % of the track so an overload still shows */
.vh-barrow.near .vh-track i { background: var(--warn); }
.vh-barrow.bad .vh-track i { background: var(--crit); }
.vh-barrow.bad .vh-bar-v { color: var(--crit); font-weight: 600; }
.vh-note { margin: 0; font-size: .8rem; color: var(--muted); max-width: 75ch; }

/* ---------- load bar: under the picture, in the flow, so it never covers the figures below ---------- */
.vh-bar {
  justify-self: center; max-width: 100%;
  display: flex; align-items: flex-end; gap: .6rem .8rem; flex-wrap: wrap; justify-content: center;
  padding: .55rem 1rem .6rem 1.2rem; border-radius: 28px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-pop);
}
.vh-f { gap: .1rem; font-size: .72rem; }
.vh-f span { padding-left: .7rem; }
.vh-f input, .vh-f select { min-height: 36px; border-radius: 999px; padding: .25rem .8rem; width: 7.5rem; font-variant-numeric: tabular-nums; }
.vh-f-wide select { width: 15rem; max-width: 100%; }
.vh-check { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; font-size: .85rem; color: var(--text); cursor: pointer; }
.vh-check input { min-height: 0; width: 1.05rem; height: 1.05rem; padding: 0; accent-color: var(--text); }
.vh-check.off { color: var(--faint); cursor: not-allowed; }
.vh-bar .btn { min-height: 36px; }

@media (max-width: 900px) {
  .vh { grid-template-columns: minmax(0, 1fr); }
  .vh-side { position: static; max-height: none; }
  .vh-list { display: flex; overflow-x: auto; overflow-y: visible; padding-top: .5rem; padding-bottom: .9rem; scroll-snap-type: x proximity; }
  .vh-list { scrollbar-width: thin; }
  .vh-list li { flex: 0 0 16rem; scroll-snap-align: start; }
  .vh-card { grid-template-columns: 76px minmax(0, 1fr); }
  .vh-go { display: none; }
  .vh-card { height: 100%; }
  .vh-card[aria-pressed="true"] { transform: translateY(-3px); }
  .vh-head { min-height: 4.6rem; }
  .vh-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vh-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .vh-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vh-tiles { gap: .5rem; }
  .vh-tile { padding: .8rem 1.3rem .8rem .8rem; }
  .vh-meter { right: .55rem; }
  .vh-bar { border-radius: 20px; }
  .vh-f input { width: 6.5rem; }
  .vh-handle .knob, .vh-handle:hover .knob { r: 36px; }  /* the drawing is small on a phone: keep the handle a finger wide */
  .vh-handle .hit { r: 62px; }
  .vh-handle path { transform: scale(2); stroke-width: 1.4; }
}
@media (forced-colors: active) {
  .vh-card[aria-pressed="true"] { border: 2px solid Highlight; }
  .vh-art .blk, .vh-art .box { forced-color-adjust: none; }
}
@media print { .vh-side, .vh-bar, .vh-hint { display: none; } }

/* photo side views */
.vh-photo { display: block; max-width: 100%; max-height: 46px; width: auto; height: auto; object-fit: contain; }
.vh-art.photo { max-height: min(52vh, 460px); cursor: crosshair; touch-action: none; }
.vh-art.photo .hold { fill: none; stroke: none; }
.vh-art.photo .slot { stroke: rgba(20, 22, 24, .28); }
.vh-art.photo .blk { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.vh-prev { --vh-box: #C99A5E; --vh-box-line: #8A6230; --vh-pal: #7A5A30; }
