/* CarSolutions Lager - internal warehouse program. Calm, dense, made for daily work. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #18202e;
  --ink-2: #4a5466;
  --muted: #7a8394;
  --line: #e3e6eb;
  --line-strong: #cfd4dc;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fc;
  --ok: #1d7a46;
  --ok-soft: #e4f4ea;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --side: #121a29;
  --side-ink: #c9d1de;
  --side-active: #ffffff;
  --radius: 8px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 13px; margin: 18px 0 8px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; color: #fff; font-weight: 650; }
.brand small { display: block; font-weight: 400; color: var(--side-ink); font-size: 11px; opacity: 0.8; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  color: var(--side-ink); padding: 8px 10px; border-radius: 6px; display: flex; gap: 10px; align-items: center;
}
.nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255,255,255,0.12); color: var(--side-active); font-weight: 600; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: 0.9; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; }
.side-foot .who { color: #fff; font-weight: 600; margin-bottom: 6px; }
.side-foot a { color: var(--side-ink); display: block; padding: 3px 0; white-space: nowrap; }

.main { padding: 22px 28px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .spacer { flex: 1; }
.crumb { font-size: 13px; margin-bottom: 4px; }

.grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.grid-loc { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }

/* ---------------------------------------------------------------- controls */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 9px; min-height: 34px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[readonly] { background: var(--bg); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: #fff;
  border-radius: 6px; padding: 7px 13px; min-height: 34px; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 28px; padding: 3px 9px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 260px; max-width: 420px; position: relative; }
.toolbar .search input { padding-left: 32px; }
.toolbar .search svg { position: absolute; left: 9px; top: 9px; width: 16px; height: 16px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.tag { white-space: nowrap; display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 1px; }
.tag.blue { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.notice { border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.notice.warn { background: var(--warn-soft); color: #5c3700; }
.notice.info { background: var(--accent-soft); color: #173f7a; }
.notice.bad { background: var(--danger-soft); color: #7a1610; }

/* ---------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 650; color: var(--muted); background: #fafbfc; position: sticky; top: 0; z-index: 1; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: #f7f9fc; }
tbody tr.sel { background: var(--accent-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.thumb { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; background: var(--bg); border: 1px solid var(--line); display: block; }
.thumb.none { display: grid; place-items: center; color: var(--line-strong); }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--muted); }
.qty-low { color: var(--danger); font-weight: 700; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- product images */
.images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: grab; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.img-tile.main { grid-column: span 3; aspect-ratio: 4 / 3; }
.img-tile.main img { object-fit: contain; background: #fff; }
.img-tile .badge { position: absolute; left: 6px; top: 6px; }
.img-tile .del {
  position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(17, 24, 39, 0.72); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0;
}
.img-tile:hover .del, .img-tile:focus-within .del { opacity: 1; }
.img-tile.dragging { opacity: 0.4; }
.img-tile.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 18px 12px; text-align: center;
  color: var(--muted); margin-top: 10px; cursor: pointer; font-size: 13px;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop strong { color: var(--ink); }

.preview-pn { font-size: 12px; margin-top: 4px; }
.preview-pn b { font-family: var(--mono); font-weight: 600; }

.sticky-save {
  position: sticky; bottom: 0; background: linear-gradient(to top, var(--panel) 75%, rgba(255,255,255,0));
  padding: 14px 0 2px; margin-top: 8px; display: flex; gap: 8px; align-items: center;
}

/* ---------------------------------------------------------------- location list */
.loc-list { display: flex; flex-direction: column; }
.loc-item { padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.loc-item:last-child { border-bottom: none; }
.loc-item:hover { background: #f7f9fc; }
.loc-item.on { background: var(--accent-soft); }
.loc-code { font-family: var(--mono); font-weight: 700; font-size: 12px; background: var(--ink); color: #fff; border-radius: 5px; padding: 2px 6px; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; }
.login .brand { color: var(--ink); padding: 0 0 18px; font-size: 17px; }
.login .brand small { color: var(--muted); }

/* ---------------------------------------------------------------- modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--panel); border-radius: 10px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.modal .card-head { position: sticky; top: 0; background: var(--panel); }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.x { border: none; background: none; cursor: pointer; padding: 4px; color: var(--muted); font-size: 20px; line-height: 1; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast-item { background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 7px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.toast-item.bad { background: var(--danger); }

pre.log { background: #0f1724; color: #d6deeb; padding: 12px; border-radius: 6px; font: 12px/1.5 var(--mono); max-height: 320px; overflow: auto; white-space: pre-wrap; margin: 0; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 4px 0 12px; }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- labels (print) */
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  body.printing { background: #fff; }
}
.label {
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; color: #000;
  font-family: Arial, sans-serif; page-break-inside: avoid; break-inside: avoid;
}
.label .l-title { font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .l-sub { line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.label .l-code { font-family: Consolas, monospace; text-align: center; letter-spacing: 0.04em; }
.label svg { width: 100%; display: block; }

/* 62 x 29 mm - one label per page (Brother DK-11209 and similar) */
.labels-62x29 .label { width: 62mm; height: 29mm; padding: 1.5mm 3mm; page-break-after: always; break-after: page; }
.labels-62x29 .l-title { font-size: 11pt; }
.labels-62x29 .l-sub { font-size: 7pt; }
.labels-62x29 svg { height: 10mm; }
.labels-62x29 .l-code { font-size: 7pt; }

/* A4 sheet, 3 x 8 labels of 70 x 37 mm */
.labels-a4 { display: grid; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37mm; }
.labels-a4 .label { width: 70mm; height: 37mm; padding: 3mm 4mm; }
.labels-a4 .l-title { font-size: 13pt; }
.labels-a4 .l-sub { font-size: 8pt; }
.labels-a4 svg { height: 13mm; }
.labels-a4 .l-code { font-size: 8pt; }

/* On-screen label preview inside the print dialog */
.label-preview { background: var(--bg); border-radius: 6px; padding: 12px; display: flex; justify-content: center; overflow: hidden; }
.label-preview .label { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.label-preview .labels-a4 { display: block; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid-2, .grid-loc { grid-template-columns: 1fr; }
}
.menu-btn, .side-title { display: none; }
.side-menu { display: contents; }
@media (max-width: 760px) {
  /* Phone: a slim bar at the top, the menu opens as a list under it. */
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; z-index: 40; height: 52px; flex-direction: row; align-items: center; gap: 10px; padding: 0 6px 0 14px; }
  .brand { display: none; }
  .side-title { display: block; flex: 1; min-width: 0; color: #fff; font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; border: none; background: none; color: #fff; border-radius: 8px; cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; }
  .side-menu { display: none; }
  body.menu-open .side-menu {
    display: flex; flex-direction: column; position: fixed; top: 52px; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--side); padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  body.menu-open { overflow: hidden; }
  .nav a { padding: 12px 12px; font-size: 16px; }
  .nav svg { width: 20px; height: 20px; }
  .side-foot { margin-top: 12px; font-size: 15px; }
  .side-foot a { padding: 8px 0; }
  .main { padding: 14px 12px 90px; }
  .hide-sm { display: none; }
  /* 16 px stops iOS from zooming in when a field gets focus. */
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=date], select, textarea { font-size: 16px; min-height: 40px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  .card { padding: 14px; }
  .modal-bg { padding: 8px; align-items: end; }
  .modal { max-height: calc(100vh - 16px); }
  .page-head h1 { font-size: 19px; }
  /* New order: customer, then the parts, then car and payment. */
  .new-order > div { display: contents; }
  .new-order .card + .card { margin-top: 0; }
  .new-order .o-cust { order: 1; } .new-order .o-lines { order: 2; } .new-order .o-car { order: 3; } .new-order .o-pay { order: 4; }
}

/* ---------------------------------------------------------------- inside the iPhone app */
.scan-fab { display: none; }
html.in-app .scan-fab {
  display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 45; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  background: var(--accent); color: #fff; border: none; border-radius: 28px; padding: 0 18px 0 14px; height: 52px;
  font-weight: 650; font-size: 15px; box-shadow: 0 6px 18px rgba(31,95,191,0.45); cursor: pointer;
}
html.in-app .scan-fab svg { width: 24px; height: 24px; }
html.in-app .scan-fab.field { background: var(--ok); box-shadow: 0 6px 18px rgba(29,122,70,0.45); }
html.in-app body.menu-open .scan-fab { display: none; }
html.in-app #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
html.in-app .side-foot .ver { display: block; }

/* ---------------------------------------------------------------- 0.2.0: kinds, parts lists */
.seg { display: inline-flex; background: #e9ecf1; border-radius: 8px; padding: 3px; gap: 2px; margin-bottom: 12px; }
.seg button { border: none; background: none; padding: 6px 16px; border-radius: 6px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.picker { position: relative; flex: 1 1 320px; max-width: 460px; }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(17,24,39,0.15); max-height: 320px; overflow: auto; padding: 4px;
}
.picker-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 7px 9px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.picker-item:hover, .picker-item.on { background: var(--accent-soft); }
.picker-item.create { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; display: flex; align-items: center; gap: 4px; }
.picker-item.create svg { width: 15px; height: 15px; }
.picker-static { margin-top: 8px; max-height: 300px; overflow: auto; }
.qty-input { width: 64px !important; min-height: 28px !important; padding: 3px 6px !important; text-align: right; }
.neg { color: var(--danger); }
tr.inherited td { color: var(--ink-2); background: #fafbfc; }

/* ---------------------------------------------------------------- 0.3.0: supplier invoices */
.inv-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.inv-pdf { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.inv-pdf iframe { width: 100%; height: calc(100vh - 90px); min-height: 480px; border: none; border-radius: 4px; background: #525659; }
.inv-pdf a { display: inline-flex; align-items: center; gap: 4px; }
.inv-pdf a svg { width: 14px; height: 14px; }
.inv-side { min-width: 0; }
.inv-side .card + .card { margin-top: 16px; }
.inv-actions { margin-top: 16px; }
details.pay { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 12px; }
details.pay summary { cursor: pointer; font-size: 13px; font-weight: 600; }
ul.tight { margin: 4px 0 0; padding-left: 18px; }
ul.tight li { margin: 2px 0; }
.num-input { text-align: right; font-variant-numeric: tabular-nums; }
input[type=date] { width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; min-height: 34px; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: var(--ink-2); }
select.compact { min-height: 28px; padding: 3px 6px; width: auto; font-size: 13px; }
table.inv-lines td { vertical-align: top; }
table.inv-lines .part-cell { min-width: 220px; width: 40%; }
.part-cell .picker { max-width: none; }
.linked { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.linked .cell-sub { flex-basis: 100%; }
.linked .x { font-size: 16px; padding: 0 2px; }
.link-btn { margin-top: 6px; }
.btn-link { border: none; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 12px; }
.btn-link:hover { text-decoration: underline; }
@media (max-width: 1100px) {
  .inv-grid { grid-template-columns: 1fr; }
  .inv-pdf { position: static; }
  .inv-pdf iframe { height: 70vh; }
}

/* ---------------------------------------------------------------- 0.3.1: supplier templates */
.flow-choice { display: grid; gap: 8px; }
.flow-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.flow-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.flow-opt input { margin-top: 3px; accent-color: var(--accent); }
.flow-opt .cell-sub { font-weight: 400; }
.notice.new-supplier { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
div.field.group { margin-bottom: 12px; }
div.field.group > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }

/* ---------------------------------------------------------------- 0.4.0: payments, settings, bookkeeper page */
.grid-settings { max-width: 640px; }
.bk { max-width: 1000px; margin: 0 auto; padding: 28px 20px 60px; }
.bk-steps { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); }
.bk-steps li { margin: 3px 0; }
.bk .brand { display: flex; align-items: center; gap: 10px; } .bk .brand svg { width: 30px; height: 30px; flex: none; }
.grid-settings .card + .card { margin-top: 16px; }
.label-preview .lbl-page { box-shadow: 0 1px 4px rgba(0,0,0,0.15); flex: none; }
.label-preview .lbl-page .label { box-shadow: none; background: transparent; }

/* ---- racks (reoler) ---- */
.racks { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.rack { flex: 0 1 360px; min-width: 280px; border-left: 6px solid #2f6fd0; border-right: 6px solid #2f6fd0; padding: 0 8px 2px; background: #fafbfc; }
.rack-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
.shelf { display: flex; gap: 4px; align-items: flex-end; border-bottom: 6px solid #2f6fd0; padding: 6px 0 3px 18px; margin-bottom: 8px; position: relative; }
.shelf-no { position: absolute; left: 0; bottom: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.shelf-tools { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px 18px; }
.slot { min-width: 0; height: 60px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; padding: 3px 6px; font: inherit; font-size: 12px;
  line-height: 1.25; cursor: pointer; overflow: hidden; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; color: var(--ink-2); }
.slot.small { flex: 1 1 0; }
.slot.big { flex: 1.5 1 0; }
.shelf.has-big .slot { height: 70px; }
.slot .code { font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: 12px; }
.slot .what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.empty .what { color: var(--muted); }
.slot.k-Sortiment { background: var(--accent-soft); border-color: #9bbbe9; }
.slot.k-Sortiment .code, .slot.k-Sortiment .what { color: var(--accent); }
.slot.k-IkkeLager { background: transparent; border-style: dashed; color: var(--muted); justify-content: center; text-align: center; cursor: default; }
/* No box on this place: just the gap (in edit mode a faint outline to click). */
.slot.k-Tom { background: transparent; border: 1px dashed transparent; color: var(--muted); justify-content: center; text-align: center; cursor: default; }
.racks.editing .slot.k-Tom, .slot.k-Tom.open { border-color: var(--line-strong); cursor: pointer; }
.slot:hover:not(.k-IkkeLager):not(.k-Tom) { border-color: var(--accent); }
.slot.hit { background: var(--warn-soft); border: 2px solid #e0a030; }
.slot.hit .code, .slot.hit .what { color: var(--warn); }
.slot.open { outline: 3px solid var(--accent); outline-offset: 1px; }
.seg button.tab-hit { box-shadow: inset 0 -3px 0 #e0a030; }
.drawer-wrap { overflow-x: auto; }
.drawer { display: grid; gap: 5px; background: #2b2f36; padding: 8px; border-radius: 8px; width: max-content; max-width: 100%; }
.drawer .ax { font-size: 11px; color: #c9d1de; display: flex; align-items: center; justify-content: center; }
.drawer .cell-free { border: 1px dashed #6b7280; border-radius: 4px; background: transparent; cursor: pointer; }
.drawer .cell-free:hover { background: rgba(255,255,255,0.08); }
.cup { border: 2px solid #e2722f; background: #fdeee4; border-radius: 6px; padding: 3px 5px; font: inherit; font-size: 11px; line-height: 1.2; text-align: left;
  color: #6b2e0e; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cup b { font-family: var(--mono); font-size: 12px; }
.cup span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cup .n { color: #9a4a1c; }
.cup.full { background: #fbd9c3; }
.cup.hit { background: var(--warn-soft); border-color: #e0a030; }
.cup.open { outline: 3px solid #7fb0ff; outline-offset: 1px; }
.hit-list { display: flex; flex-direction: column; gap: 4px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fffaf0; align-items: flex-start; }
.hit-row { display: flex; gap: 12px; align-items: baseline; border: none; background: none; font: inherit; cursor: pointer; padding: 3px 0; text-align: left; color: var(--ink); }
.hit-row:hover { color: var(--accent); }
.strong { font-weight: 700; }

/* ---- QR labels (sheet and old 62x29 layouts; the label printer layouts come from labelCss) ---- */
.label.qr { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 3mm; }
.label.qr svg.qr { height: 100%; width: auto; aspect-ratio: 1; flex: none; display: block; }
.label.qr .l-text { min-width: 0; flex: 1; }
.label.qr .l-title { white-space: normal; overflow-wrap: anywhere; }
.label.qr .l-code { display: none; }

/* ---- packing photos / parcels ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: var(--bg); border: 1px solid var(--line); }
.section-title { font-size: 15px; margin: 18px 0 8px; color: var(--ink-2); }

/* ---- pick lists (new order) ---- */
.pick-list { display: flex; flex-direction: column; margin-top: 6px; }
.pick-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; text-align: left; border: none; border-bottom: 1px solid var(--line);
  background: none; padding: 8px 4px; font: inherit; cursor: pointer; color: var(--ink); }
.pick-row:hover { background: var(--accent-soft); }

/* ---------------------------------------------------------------- 0.7.2: choose labels on the racks */
.lbl-pick { display: flex; flex-direction: column; gap: 12px; }
.lp-rack { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.lp-rack > .lp-group { align-self: flex-start; font-weight: 650; }
.lp-shelf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lp-shelf .lp-group { min-width: 74px; }
.lp-box { font-size: 13px; }
