/* Navo Loading app. Layout follows Navo Carbon / Maps Platform: sidebar left, 3D stage right. DS tokens from navo-ds.css. */
:root { --side-w: 460px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font-sans, Switzer, system-ui, sans-serif); color: var(--text-primary); background: var(--bg-sunken); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, select, input { font-family: inherit; }
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--bg-base); border-right: 1px solid var(--border-default); z-index: 5; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
.side-head > div { flex: 1; }
.brand-mark { flex: none; height: 28px; width: auto; }
.brand-title { font-family: var(--font-display, Ranade, serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--text-tertiary); }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-track); color: var(--text-secondary); cursor: pointer; display: grid; place-items: center; flex: none; }
.side-scroll { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.side-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 20px; font-size: 12px; color: var(--text-tertiary); border-top: 1px solid var(--border-default); }
.side-foot b { color: var(--text-secondary); font-weight: 600; }
.side-foot a { color: var(--link); text-decoration: none; }

/* stepper */
.steps { display: flex; gap: 4px; margin: 0 20px; padding: 4px; border-radius: 999px; background: var(--bg-track); }
.step { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 999px; background: none; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; }
.step b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-base); color: var(--text-tertiary); font-size: 12px; font-weight: 600; }
.step.active { background: var(--bg-base); color: var(--text-primary); box-shadow: var(--shadow-1); }
.step.active b { background: var(--accent); color: #fff; }
.step.done b { background: var(--accent-wash); color: var(--accent); }
.step[disabled] { opacity: .5; cursor: default; }

.pane { display: flex; flex-direction: column; gap: 12px; }
.label { font-size: 12px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hint { margin: 0; font-size: 12px; color: var(--text-tertiary); min-height: 16px; line-height: 1.5; }
.hint.err { color: var(--badge-error-text); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: var(--bg-track); color: var(--text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; }
.seg button.on { background: var(--accent-wash); color: var(--accent); border-color: var(--accent-wash-border); }

.eq-list { display: flex; flex-direction: column; gap: 8px; }
.eq { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-base); text-align: left; cursor: pointer; color: var(--text-primary); }
.eq:hover { border-color: var(--border-strong); }
.eq.on { border-color: var(--accent); background: var(--accent-wash); }
.eq svg { width: 52px; height: 30px; color: var(--text-tertiary); }
.eq.on svg { color: var(--accent); }
.eq b { display: block; font-size: 14px; font-weight: 600; }
.eq small { display: block; color: var(--text-tertiary); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.eq .code { font-size: 12px; color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* cargo lines */
.units { display: flex; gap: 6px; }
.units select { height: 30px; padding: 0 10px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-base); color: var(--text-primary); font-size: 12px; }
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { border: 1px solid var(--border-default); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-base); }
.line-head { display: flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.line-head input { flex: 1; min-width: 0; height: 32px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--text-primary); outline: none; padding: 0; }
.line-head select { height: 30px; padding: 0 8px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-base); color: var(--text-secondary); font-size: 12px; }
.x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--text-tertiary); cursor: pointer; font-size: 18px; line-height: 1; }
.x:hover { background: var(--bg-track); color: var(--text-primary); }
.dims { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dims label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
.dims input { width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-base); color: var(--text-primary); font-size: 13px; font-variant-numeric: tabular-nums; outline: none; }
.dims input:focus, .line-head select:focus, .units select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.flags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-secondary); }
.flags label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.flags input { accent-color: var(--accent); }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.totals b { color: var(--text-primary); font-weight: 600; }

/* buttons */
.btn-primary, .btn-secondary, .btn-tertiary { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-accent-hover); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--bg-base); color: var(--text-primary); box-shadow: var(--shadow-surface-rest); }
.btn-secondary:hover { box-shadow: var(--shadow-surface-hover); }
.btn-tertiary { background: var(--bg-track); color: var(--text-primary); }
.sm { height: 32px; padding: 0 14px; font-size: 12px; }

/* result */
.card { background: var(--bg-base); border: 1px solid var(--border-subtle-line); border-radius: var(--r-card, 24px); padding: 20px; box-shadow: var(--shadow-surface-rest); }
.card h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.big { font-family: var(--font-display, Ranade, serif); font-size: 38px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.big small { font-size: 16px; color: var(--text-secondary); font-weight: 500; margin-left: 4px; }
.sub { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.meter span { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.meter span b { color: var(--text-primary); }
.bar { height: 8px; border-radius: 999px; background: var(--bg-track); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.kv dt { color: var(--text-tertiary); } .kv dd { margin: 0; text-align: right; }
.mini-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--badge-neutral-bg); color: var(--badge-neutral-text); }
.mini-badge.success { background: var(--badge-success-bg); color: var(--badge-success-text); }
.mini-badge.warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.mini-badge.error { background: var(--badge-error-bg); color: var(--badge-error-text); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.legend-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--divider); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.legend-row:first-of-type { border-top: 0; }
.legend-row small { display: block; color: var(--text-tertiary); font-size: 12px; }
.legend-row.dim { opacity: .45; }
.alt { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--divider); }
.alt:first-of-type { border-top: 0; }
.alt.best b { color: var(--accent); }
.alt small { color: var(--text-tertiary); }
.issues { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.issues li { padding-left: 14px; position: relative; }
.issues li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); }
.issues li.blk::before { background: var(--badge-error-text); }
.issues li.wrn::before { background: var(--badge-warning-text); }
.checks { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checks div { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.checks small { display: block; color: var(--text-tertiary); font-size: 12px; }
.ck { width: 16px; height: 16px; margin-top: 2px; }
.ck.pass { color: var(--badge-success-text); } .ck.warn { color: var(--badge-warning-text); } .ck.fail { color: var(--badge-error-text); } .ck.na { color: var(--text-tertiary); }
details.card > summary { cursor: pointer; list-style: none; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); font-weight: 600; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 12px; }
.seqlist { display: flex; flex-direction: column; font-size: 13px; font-variant-numeric: tabular-nums; }
.seqlist div { display: grid; grid-template-columns: 28px 14px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--divider); }
.seqlist div:first-child { border-top: 0; }
.seqlist small { color: var(--text-tertiary); }
.note { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; margin: 0; }
.tab-num { font-variant-numeric: tabular-nums; }

/* stage */
.stage { position: relative; min-width: 0; background: var(--bg-sunken); }
#view { position: absolute; inset: 0; }
#view canvas { display: block; outline: none; }
.stage-top { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: var(--bg-base); box-shadow: var(--shadow-surface-rest); }
.stage-top button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.stage-top button.on { background: var(--accent-wash); color: var(--accent); }
.stage-tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-base); box-shadow: var(--shadow-surface-rest); }
.tool { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; }
.tool.on, .tool:hover { background: var(--bg-track); color: var(--text-primary); }
.stage-play { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: min(560px, calc(100% - 32px)); padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--bg-base); box-shadow: var(--shadow-surface-hover); }
.stage-play input { flex: 1; accent-color: var(--accent); }
.stage-play span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; min-width: 92px; text-align: right; }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 12px; }
.stage-empty h2 { margin: 8px 0 0; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.015em; max-width: 520px; }
.stage-empty p { margin: 0 0 8px; color: var(--text-secondary); max-width: 460px; line-height: 1.5; }
.stage-empty img { height: 56px; width: auto; }
.tip { position: absolute; pointer-events: none; z-index: 10; padding: 8px 12px; border-radius: var(--r-float, 12px); background: var(--bg-raised); box-shadow: var(--shadow-surface-hover); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tip b { font-weight: 600; }

.ovl { position: fixed; inset: 0; background: rgba(11,13,16,.4); display: grid; place-items: center; z-index: 100; }
.ovl-card { background: var(--bg-base); border-radius: var(--r-modal, 20px); padding: 28px; max-width: 420px; box-shadow: var(--shadow-ovl); }
.ovl-card h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; }
.ovl-card p { color: var(--text-secondary); margin: 0 0 18px; line-height: 1.5; }
.ovl-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: sp .8s linear infinite; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .side { border-right: 0; order: 2; } .stage { order: 1; height: 56vh; } .side-scroll { overflow: visible; }
  .stage-empty h2 { font-size: 24px; }
  .dims { grid-template-columns: repeat(3, 1fr); }
}
.v2d-wrap { position: absolute; inset: 0; overflow: auto; padding: 72px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.v2d { margin: 0; background: var(--bg-base); border-radius: var(--r-card, 24px); padding: 16px 20px 20px; box-shadow: var(--shadow-surface-rest); }
.v2d figcaption { font-size: 12px; color: var(--text-tertiary); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.v2d svg { width: 100%; height: auto; display: block; }
.stage-empty h2 { text-wrap: balance; }

.seg.sub { margin-top: 8px; }
.seg.sub button { height: 28px; padding: 0 12px; }
.eq.off { cursor: default; opacity: .55; }
.eq.off:hover { border-color: var(--border-default); }

/* 6 equipment tabs in one row (Stefan 27.10) */
#cats { flex-wrap: nowrap; gap: 4px; }
#cats button { flex: 1 1 auto; min-width: 0; padding: 0 8px; white-space: nowrap; }
