/* Laget for Zebra TC-skannere: smal skjerm, store trykkflater, høy kontrast. */
:root {
  --bg: #eef1f4;
  --card: #ffffff;
  --ink: #1a2433;
  --muted: #5d6877;
  --line: #d6dce3;
  --primary: #1f5fae;
  --primary-ink: #ffffff;
  --good: #23824a;
  --mid: #b7791f;
  --low: #c0392b;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .6rem; background: var(--ink); color: #fff;
}
.topbar-title { flex: 1; min-width: 0; }
#title { font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .muted { color: #b9c3cf; font-size: .82rem; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; cursor: pointer;
}
.icon-btn:disabled { opacity: .3; }
.icon-btn[hidden] { display: none; }

.scanbar { display: flex; gap: .4rem; padding: .5rem .6rem; background: #dfe4ea; position: sticky; top: 60px; z-index: 4; }
.scanbar input { flex: 1; min-width: 0; }

input {
  font: inherit; padding: .65rem .7rem; border: 2px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus { outline: none; border-color: var(--primary); }

.btn {
  font: inherit; font-weight: 600; min-height: 44px; padding: .5rem .85rem;
  border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.block { display: flex; width: 100%; margin-top: .5rem; }
.btn.left { justify-content: space-between; text-align: left; }
.btn.sm { min-height: 36px; min-width: 36px; padding: 0 .5rem; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; }
.btn small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.btn-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.btn-row.wide .btn { flex: 1 1 auto; padding: .5rem .55rem; white-space: nowrap; }

main { padding: .6rem; max-width: 560px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: .55rem; }
.card { background: var(--card); border-radius: var(--radius); padding: .75rem; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .4rem 0; }
.kpis div { display: flex; flex-direction: column; }
.kpis b { font-size: 1.45rem; }
.kpis span { font-size: .78rem; color: var(--muted); }

.route-no { font-weight: 700; font-size: 1.2rem; }

.chip {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px;
  color: var(--c, var(--muted)); border: 1.5px solid var(--c, var(--line)); vertical-align: middle;
}
.chip.lock { --c: #444; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: baseline; }

.carrier-row { display: grid; grid-template-columns: 44px 1fr auto; gap: .6rem; align-items: center; padding: .5rem .6rem; }
.carrier-row .stops { font-size: .85rem; margin-top: .15rem; }
.row-top { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

.pct { font-weight: 800; font-size: 1.3rem; text-align: right; }
.pct small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); }
.pct.good { color: var(--good); }
.pct.mid { color: var(--mid); }
.pct.low { color: var(--low); }
.pct.over { color: #fff; background: var(--low); border-radius: 6px; padding: 0 .3rem; }
.pct.big { font-size: 2.2rem; text-align: left; }

.carrier-hero { display: grid; grid-template-columns: 130px 1fr; gap: .7rem; align-items: center; }
.hero-stats dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: .4rem 0 0; font-size: .9rem; }
.hero-stats dt { color: var(--muted); }
.hero-stats dd { margin: 0; font-weight: 600; }
.warn { margin-top: .5rem; padding: .4rem .5rem; background: #fde8e6; color: var(--low); border-radius: 6px; font-weight: 600; font-size: .9rem; }
.svg-lbl { font: 700 13px system-ui, sans-serif; fill: #fff; }

.level-head { display: flex; justify-content: space-between; gap: .5rem; }
.items { list-style: none; margin: .4rem 0 0; padding: 0; }
.items li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem 0; border-top: 1px solid #eef1f4; }
.item-name small { display: block; color: var(--muted); font-size: .75rem; }
.qty { display: flex; align-items: center; gap: .45rem; }
.qty b { min-width: 1.5rem; text-align: center; }

.summary .btn.block { margin-top: .7rem; }
.bigdiff { display: flex; justify-content: center; align-items: baseline; gap: .8rem; font-size: 2.6rem; }
.bigdiff span { color: var(--muted); font-size: 1.6rem; }
.bigdiff .ok { color: var(--good); }
.field.inline { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .9rem; }
.stepper { display: flex; align-items: center; gap: .5rem; }
.stepper b { min-width: 1.2rem; text-align: center; font-size: 1.1rem; }

.move-head { display: flex; gap: .55rem; align-items: center; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.move-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: .4rem; align-items: center; margin: .5rem 0 .35rem; font-size: .88rem; }
.arrow { font-size: 1.3rem; color: var(--muted); }

dialog#sheet {
  border: 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 14px 14px 0 0;
  max-height: 88vh;
}
dialog#sheet::backdrop { background: rgba(10, 18, 28, .55); }
.sheet-inner { padding: 1rem .8rem 1.2rem; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.preset { flex-direction: column; align-items: flex-start; min-height: 58px; }
.dims { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .4rem; }
.custom-item > input { margin-top: .2rem; }
.target { align-items: center; }
.target small { font-size: .78rem; }

#toast {
  position: fixed; left: 50%; bottom: 1rem; transform: translate(-50%, 150%);
  background: var(--ink); color: #fff; padding: .65rem 1rem; border-radius: 8px;
  max-width: calc(100% - 2rem); transition: transform .2s ease; z-index: 20; font-weight: 600;
}
#toast.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---------- 3D-tegning ---------- */
.iso { display: block; width: 100%; height: auto; }
.hero-svg .iso { max-height: 430px; margin: 0 auto; }
.mini .iso { width: 56px; height: 84px; }
.iso-num { font: 700 64px system-ui, sans-serif; fill: #1a2433; }
.iso .slot circle { fill: #fff; stroke: #9aa5b1; stroke-width: 6; }
.iso .slot text { font: 700 58px system-ui, sans-serif; fill: #5d6877; }
.iso .slot.on circle { fill: var(--primary); stroke: var(--primary); }
.iso .slot.on text { fill: #fff; }
.iso .slot[data-action] { cursor: pointer; }
.iso .slot[data-action]:hover circle, .iso .slot[data-action]:focus circle { stroke: var(--primary); stroke-width: 10; }
.iso .slot:focus { outline: none; }

.carrier-hero { display: block; background: linear-gradient(#f7f9fb, #e9edf2); }
.carrier-row { grid-template-columns: 56px 1fr auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .4rem; text-align: center; }
.stat-grid div { display: flex; flex-direction: column; }
.stat-grid b { font-size: 1.2rem; }
.stat-grid b.good { color: var(--good); } .stat-grid b.mid { color: var(--mid); }
.stat-grid b.low { color: var(--low); } .stat-grid b.over { color: var(--low); }
.stat-grid span { font-size: .7rem; color: var(--muted); line-height: 1.2; }

.customers { list-style: none; margin: 0; padding: 0; }
.customers li { display: flex; gap: .2rem; align-items: baseline; padding: .3rem 0; border-top: 1px solid #eef1f4; }
.customers li:first-child { border-top: 0; }
.customers .small { word-break: break-all; }

.section.overflow { border-color: var(--low); }
.sel-row { justify-content: space-between; }
.sel-row.selected { background: #e8f0fb; margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; }
.check { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.row-text { min-width: 0; }
.row-text small { display: block; color: var(--muted); font-size: .76rem; }
.row-text small.contents { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.crate-ico { width: 26px; height: 16px; border-radius: 3px; flex: none; position: relative;
  background: #eef1f4; border: 2px solid #9aa6b2; }
.crate-ico.gilde::after { content: ''; position: absolute; left: 3px; right: 3px; top: 5px; height: 3px; background: #d42a2f; }
.crate-ico.grey { background: #8d99a6; border-color: #5d6876; }

.kind-list { display: flex; flex-direction: column; gap: .4rem; }
.btn.kind { justify-content: flex-start; text-align: left; gap: .7rem; }

.has-actionbar { padding-bottom: 5rem; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: .4rem; align-items: center; padding: .55rem .6rem calc(.55rem + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.2);
}
.actionbar .sel-info { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.actionbar .sel-info span { font-size: .8rem; color: #b9c3cf; }
.actionbar .btn.ghost { color: #fff; }

/* ---------- Kameravalg, glidebryter for skillebrett ---------- */
.seg { display: flex; background: #dfe4ea; border-radius: 9px; padding: 3px; gap: 3px; margin-bottom: .4rem; }
.seg button { flex: 1; font: inherit; font-weight: 600; font-size: .9rem; min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

.hero-svg.with-slider { display: grid; grid-template-columns: 1fr 78px; align-items: stretch; gap: .1rem; }

/* Fader: hvit, firkantet skyveknapp som på et stereoanlegg */
.fader { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.fader:focus-visible { box-shadow: 0 0 0 3px var(--primary); }
.fader-track {
  position: absolute; left: 50%; width: 12px; margin-left: -6px; border-radius: 6px;
  background: linear-gradient(90deg, #11161d, #2a323d 50%, #11161d);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.7);
}
@media (prefers-reduced-motion: reduce) { .fader-knob { transition: none; } }
.ab-hint { font-size: .82rem; color: #cfd8e3; }
#toast { display: flex; align-items: center; gap: .8rem; }
.toast-undo { font: inherit; font-weight: 700; color: #9cc3ff; background: none; border: 0; padding: .35rem .2rem; min-height: 36px; cursor: pointer; }
.shelf-ctl.on { border-color: var(--primary); background: #eef4fc; }
.shelf-ctl .grow, .customers .grow { flex: 1; min-width: 0; }
.shelf-ctl .hint { margin-top: .15rem; }
.ctl-btns { display: flex; gap: .3rem; }
.btn.sq { width: 46px; padding: 0; font-size: 1.1rem; }
.level-head { align-items: center; }

.actionbar { flex-direction: column; align-items: stretch; gap: .45rem; }
.ab-top { display: flex; align-items: center; justify-content: space-between; }
.ab-top .sel-info { flex-direction: row; gap: .6rem; align-items: baseline; }
.ab-btns { display: flex; gap: .4rem; }
.ab-btns .btn { flex: 1 1 auto; padding: .5rem .5rem; white-space: nowrap; }
.has-actionbar { padding-bottom: 8rem; }
.iso .slot.sel circle { stroke: var(--primary); stroke-width: 12; }
.iso .slot.sel:not(.on) text { fill: var(--primary); }

.shelf-ctl { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; padding: .5rem .6rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.shelf-ctl .bad { color: var(--low); font-weight: 600; }
.shelf-ctl .btn { white-space: nowrap; }

.num-badge { flex: none; min-width: 28px; height: 28px; padding: 0 .3rem; border-radius: 6px; display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; color: #1a2433; border: 1.5px solid rgba(0,0,0,.35); }
.row-text .dot { margin-left: .35rem; }

/* Hakkvelger i bunnlinja: legg valgte varer på et hakk med ett trykk */
.ab-slots { display: flex; align-items: center; gap: 4px; }
.ab-slots span { font-size: .8rem; color: #cfd8e3; margin-right: 2px; white-space: nowrap; }
.slot-chip { flex: 1 1 0; min-width: 0; height: 40px; padding: 0; border-radius: 6px; font: inherit; font-weight: 700; font-size: .95rem;
  border: 2px dashed #6f7c8c; background: transparent; color: #fff; cursor: pointer; }
.slot-chip[data-action="place-floor"] { flex: 1.6 1 0; font-size: .8rem; border-style: solid; }
.slot-chip.on { border-style: solid; border-color: #fff; background: #fff; color: var(--ink); }
.slot-chip:active { background: var(--primary); border-color: var(--primary); color: #fff; }
body.ab-open #toast { bottom: 9.5rem; }
#toast:not(.show) { visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
/* Under flytting ligger Avbryt/Bekreft fast nederst, så de alltid kan nås */
.shelf-ctl.moving { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; border-radius: 0;
  border: 0; border-top: 3px solid var(--primary); background: #fff; box-shadow: 0 -6px 18px rgba(0,0,0,.18);
  padding: .7rem .75rem calc(.7rem + env(safe-area-inset-bottom)); }

/* ---------- Container-skjerm for håndterminal: alt viktig på første skjermbilde ---------- */
body.view-carrier .scanbar { display: none; }
.carrier-view { gap: .5rem; }
.carrier-hero { background: linear-gradient(#f7f9fb, #e9edf2); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .35rem .45rem; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .2rem 0 .3rem; }
.hero-stats { font-size: .85rem; color: var(--muted); }
.hero-stats b { font-size: 1.15rem; color: var(--ink); }
.hero-stats b.good { color: var(--good); } .hero-stats b.mid { color: var(--mid); }
.hero-stats b.low, .hero-stats b.over { color: var(--low); }
.cam-btn { flex: none; min-height: 40px; padding: 0 1rem; border-radius: 20px; border: 1px solid #c3cbd4; background: #fff;
  font: inherit; font-weight: 600; font-size: .85rem; color: var(--ink); cursor: pointer; }
.hero-svg .iso { max-height: 330px; }
.hero-svg.with-slider { grid-template-columns: 1fr 84px; gap: 0; }
.iso .slot circle, .iso .slot text { visibility: hidden; }
.iso .slot line { stroke-width: 4; }
.iso .slot.on line { stroke: #8fb1e6; }
.iso .slot.sel line { stroke: var(--primary); stroke-dasharray: none; stroke-width: 8; }

/* Skinne med ett stopp per hakk */
.fader { cursor: pointer; touch-action: none; outline: none; border-radius: 10px; }
.fader:focus-visible { box-shadow: 0 0 0 3px var(--primary); }
.fader-track { position: absolute; left: 24px; width: 10px; margin: 0; border-radius: 5px; background: #cfd6de; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.rail-stop { position: absolute; left: 0; right: 0; height: 0; pointer-events: none; }
.rail-stop::before { content: ''; position: absolute; left: 18px; width: 22px; top: -1.5px; height: 3px; background: #9aa5b1; border-radius: 2px; }
.rail-stop span { position: absolute; left: 46px; top: -10px; font: 700 14px/20px system-ui, sans-serif; color: #7a8594; }
.rail-stop.on::before { top: -3px; height: 6px; background: var(--primary); }
.rail-stop.on span { color: var(--primary); }
.rail-stop.off { opacity: .3; }
/* Håndtaket: merkelapp med hakknummer som peker mot hakket i tegningen */
.fader-knob { position: absolute; left: 12px; width: 66px; height: 42px; margin: -21px 0 0 0; border: 0; border-radius: 8px;
  background: var(--ink); color: #fff; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: top .12s ease-out; pointer-events: none; }
.fader-knob::before { content: ''; position: absolute; left: -9px; top: 50%; margin-top: -10px;
  border-style: solid; border-width: 10px 10px 10px 0; border-color: transparent var(--ink) transparent transparent; }
.fader-knob b { font-size: 1.35rem; line-height: 1; }
.fader-knob i { font-style: normal; font-size: 1.1rem; width: auto; height: auto; background: none; }
.fader-knob.has { background: var(--primary); }
.fader-knob.has::before { border-right-color: var(--primary); }
.fader.moving .fader-knob { background: #d97a00; }
.fader.moving .fader-knob::before { border-right-color: #d97a00; }
.fader.grabbing .fader-knob { transition: none; transform: scale(1.06); box-shadow: 0 6px 14px rgba(0,0,0,.35); }

/* Kompakt linje under bildet */
.shelf-ctl { flex-direction: row; align-items: center; gap: .4rem; padding: .35rem .45rem; margin: .35rem 0 0; }
.ctl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ctl-text .small { font-size: .8rem; }
.shelf-ctl > .btn { min-height: 48px; padding: 0 .9rem; }
.shelf-ctl.moving { flex-direction: column; align-items: stretch; gap: .5rem; }
.shelf-ctl.moving .ctl-btns .btn { flex: 1; min-height: 50px; }

/* Nivåer som kan åpnes og lukkes */
details.level { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 .7rem; }
details.level.overflow { border-color: var(--low); }
details.level > summary { list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 52px; cursor: pointer; font-weight: 700; }
details.level > summary::-webkit-details-marker { display: none; }
details.level > summary::after { content: '▾'; flex: none; color: var(--muted); font-size: 1.1rem; }
details.level[open] > summary::after { content: '▴'; }
.lv-name { flex: none; }
.lv-info { flex: 1; min-width: 0; color: var(--muted); font-weight: 400; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-bad { flex: none; color: var(--low); font-size: .8rem; font-weight: 700; }
details.level .btn.block { margin: 0 0 .3rem; min-height: 44px; }
details.level .items { margin: 0 0 .5rem; }

/* Brett valgt: tekst over, tre knapper under */
.shelf-ctl.stacked { flex-direction: column; align-items: stretch; gap: .35rem; }
.shelf-ctl.stacked .ctl-btns { display: flex; gap: .35rem; }
.shelf-ctl.stacked .ctl-btns .btn { flex: 1; min-height: 48px; padding: 0 .4rem; }
.sheet-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 1rem 0 .4rem; }
.sheet-inner .bad { color: var(--low); font-weight: 700; }
.sheet-inner p.small { margin: .25rem 0 .7rem; }

/* ---------- Kundeetiketter til venstre for bildet (små, plass til 5) ---------- */
.hero-svg.with-slider { grid-template-columns: 72px minmax(0, 1fr) 70px; }
.hero-svg.no-slider { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
.cust-labels { display: flex; flex-direction: column; gap: 5px; padding-top: 4px; max-height: 330px; overflow-y: auto; }
.cust-label { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 1px;
  width: 100%; min-height: 54px; padding: 3px 4px 3px 8px; border: 1px solid #b9c2cc; border-radius: 3px; background: #fff;
  font: inherit; color: #1a2433; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.cust-label::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #1ba1e2; }
.cl-top { display: flex; justify-content: space-between; align-items: center; gap: 2px; }
.cl-lev { font-size: 15px; line-height: 1; }
.cl-lv { font-size: 9px; font-weight: 700; color: #4a5563; background: #e6ebf1; border-radius: 3px; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-name { font-size: 10px; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-bar { display: block; height: 8px; margin-top: 1px; }
.cl-sscc { display: block; white-space: nowrap; text-align: right; margin-top: 1px; font: 600 9px/1.1 ui-monospace, Consolas, monospace; color: #1a2433; letter-spacing: 0; }
.cl-sscc b { font-size: 11px; font-weight: 800; }
.cl-bar svg { display: block; width: 100%; height: 8px; fill: #1a2433; }
.cust-label.on { border: 2px solid var(--primary); padding: 2px 3px 2px 7px; background: #eef4fc; }
.cust-label.dim { opacity: .55; }
.slot-chip.blocked { opacity: .35; border-style: dotted; }
.iso .faded { opacity: .14; }

/* ---------- Én innholdsliste ---------- */
.list-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .2rem .7rem .4rem; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 50px; }
.list-head > div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.list-head .btn { min-height: 44px; }
.lv-tag { display: inline-block; margin-left: .35rem; padding: 0 .3rem; border-radius: 4px; background: #e6ebf1; color: #4a5563; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.empty-hint { margin: .2rem 0 .6rem; }

/* Container-skjermen: ingen topplinje – tilbake gjøres med terminalens egen tilbakeknapp */
body.view-carrier .topbar { display: none; }
.hero-top .hero-stats { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.hero-top .cam-btn:not(.undo-btn) { padding: 0 .75rem; }
.undo-btn { padding: 0; width: 40px; font-size: 1.2rem; }
.undo-btn:disabled { opacity: .35; }

/* Bekreft-knappen nederst på container-skjermen */
.confirm-btn { flex: 1; min-height: 52px; font-size: 1.05rem; }
.confirm-btn.done { background: #e6f4ea; border-color: #8cc79e; color: #1e6b3a; }
.chip.lock { --c: #1e6b3a; }

/* Etikettene plasseres ut for kundens varer (top settes i layoutLabels) */
.hero-svg .cust-labels { position: relative; display: block; max-height: none; overflow: visible; padding: 0; align-self: stretch; }
.hero-svg .cust-labels .cust-label { position: absolute; left: 0; right: 0; top: 0; }

/* ---------- Knapper som på jobbskanneren: flate, lysegrå, svart tekst ---------- */
.btn, .btn.primary, .cam-btn, .shelf-ctl .btn, .shelf-ctl .btn.primary {
  background: #e4e4e4; border: 1px solid #e4e4e4; border-radius: 4px; color: #111; font-weight: 500; box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn:active, .cam-btn:active, .slot-chip:active { background: #c9c9c9; border-color: #c9c9c9; color: #111; }
.btn small { color: #555; }
.confirm-btn { min-height: 62px; }
.confirm-btn.done { background: #e6f4ea; border-color: #8cc79e; color: #1e6b3a; }
.slot-chip { background: #e4e4e4; border: 2px solid #e4e4e4; border-radius: 4px; color: #111; }
.slot-chip.on { background: #e4e4e4; border-color: #1f5fae; color: #111; }
.slot-chip.blocked { border: 2px dotted #888; }

/* ---------- Hovedskjerm uten scrolling ---------- */
body.view-main { overflow: hidden; padding: 0; }
body.view-main #view { height: 100vh; height: 100dvh; margin: 0 auto; padding: 6px; box-sizing: border-box; }
.carrier-fixed { display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 0; }
.carrier-fixed > .hero-top { flex: none; }
.carrier-fixed > .hero-svg { flex: 1 1 0; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.carrier-fixed > .hero-svg.with-slider, .carrier-fixed > .hero-svg.no-slider { display: grid; }
.carrier-fixed > .hero-svg > svg.iso, .carrier-fixed > .hero-svg .iso { width: 100%; height: 100%; max-height: 100%; min-height: 0; }
.carrier-fixed .cust-labels { min-height: 0; }
.cust-labels.tight .cl-bar { display: none; }
.cust-labels.tight .cust-label { min-height: 0; padding-top: 1px; padding-bottom: 1px; }
.cust-labels.tight .cl-name { -webkit-line-clamp: 1; }
.carrier-fixed .shelf-ctl, .carrier-fixed .shelf-ctl.moving { position: static; display: block; flex: none; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; }
.ctl-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 4px 4px; white-space: nowrap; font-size: .9rem; }
.shelf-ctl.moving .ctl-line { color: #a85f00; }
.ctl-line .bad { color: var(--low); font-weight: 700; }
.main-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shelf-ctl.moving .main-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 110px; }
.main-grid .btn, .carrier-fixed .shelf-ctl .main-grid .btn { min-height: 52px; height: 100%; padding: 2px 4px; font-size: .95rem; line-height: 1.15; white-space: normal; flex: none; }

/* ---------- Egne sider: Slå sammen og Varer ---------- */
.page-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; font-size: 1.05rem; }
.page-title small { font-weight: 400; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.merge-page { display: flex; flex-direction: column; gap: 6px; }
.scan-hint { margin: 0; color: var(--muted); }
.merge-list { display: flex; flex-direction: column; gap: 6px; min-height: 282px; }
.merge-list .btn.block { margin: 0; min-height: 66px; }
.page-back { min-height: 52px; }
.carrier-fixed > .hero-svg.with-slider { padding-right: 14px; grid-template-columns: 72px minmax(0, 1fr) 62px; }
.merge-page { height: 100%; min-height: 0; }
