/* ==========================================================================
   Flipper back office (staff preview)
   Builds on site.css tokens: ink / paper / orange / blue / board / amber
   ========================================================================== */

body.admin { --banner-h: 34px; background: var(--paper); }
body.admin::before { opacity: .2; }
body.admin { scroll-padding-top: 120px; }
body.admin [hidden] { display: none !important; }

/* ---------- Preview banner ---------- */
.adm-banner {
  position: sticky; top: 0; z-index: 70;
  height: var(--banner-h);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 16px;
  background: var(--amber) repeating-linear-gradient(-45deg, rgba(2, 15, 29,.07) 0 8px, transparent 8px 16px);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  font: 600 13px/1 var(--f-body);
  white-space: nowrap; overflow: hidden;
}
.adm-banner b { font: 800 17px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; padding-top: 2px; }
.adm-banner .short { display: none; }
@media (max-width: 560px) { .adm-banner .long { display: none; } .adm-banner .short { display: inline; } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100dvh - var(--banner-h)); }
.rail {
  position: sticky; top: var(--banner-h);
  height: calc(100dvh - var(--banner-h));
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; gap: 22px;
  padding: 24px 16px 18px;
  z-index: 50;
}
.rail-top { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.rail .brand { display: block; width: 196px; height: auto; margin: 0 auto 4px; }
.rail .brand-logo { position: static; display: block; width: 100%; height: auto; transform: none; transition: translate .45s var(--ease-spring); }
.rail .brand:hover .brand-logo { translate: 0 -2px; }
.rail-tag { font: 800 18px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--amber); }
.rail-public--top { display: none; }

.rail-nav { display: flex; flex-direction: column; gap: 3px; }
.rail-nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  color: #e6d7b8; text-decoration: none;
  font: 600 15px/1 var(--f-body);
  transition: background-color .2s, color .2s;
}
.rail-nav a:hover { background: #10273f; color: var(--paper); }
.rail-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); }
.rail-nav svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: #2a3c4f; color: var(--paper);
  font: 700 12px/22px var(--f-body); text-align: center;
  transition: transform .35s var(--ease-spring);
}
.badge:empty { display: none; }
.badge--amber { background: var(--amber); color: var(--ink); }
.rail-nav a[aria-current="page"] .badge:not(.badge--amber) { background: var(--ink); color: var(--paper); }
.badge.bump { animation: bump .5s var(--ease-spring); }

.rail-foot { margin-top: auto; display: grid; gap: 14px; }
.rail-today { background: var(--board); border-radius: 14px; padding: 12px; box-shadow: 0 0 0 1px #020f1d, inset 0 1px 0 rgba(255,255,255,.05); }
.rail-label { display: block; font: 800 14px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: #708297; margin-bottom: 9px; }
.rt-flaps { display: grid; gap: 4px; }
.rt-flaps .fc { --fw: 16px; --fh: 25px; }
.rt-flaps .flaps { --fgap: 2px; }
.rail-public { color: #e6d7b8; text-decoration: none; font: 600 14px/1 var(--f-body); padding: 4px 8px; }
.rail-public:hover { color: var(--orange); }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid #132e4b; font: 600 14px/1.2 var(--f-body); }
.rail-user small { display: block; font-weight: 500; color: #708297; font-size: 12px; margin-top: 2px; }
.rail-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font: 800 17px/1 var(--f-gothic); padding-top: 2px; }

@media (max-width: 999px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail {
    min-width: 0;
    position: sticky; top: var(--banner-h); height: auto;
    flex-direction: column; gap: 8px;
    padding: 10px 0 0;
    border-bottom: 2px solid var(--ink);
  }
  .rail-top { flex-direction: row; align-items: center; gap: 12px; padding: 0 16px; }
  .rail .brand { width: 96px; margin: 0; }
  .rail-tag { font-size: 16px; }
  .rail-public--top { display: inline-block; margin-left: auto; padding: 8px 0; }
  .rail-nav {
    flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none;
    padding: 0 12px 10px;
    scroll-snap-type: x proximity;
  }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-nav a { flex: 0 0 auto; padding: 9px 12px; font-size: 14px; scroll-snap-align: start; }
  .rail-nav svg { width: 17px; height: 17px; }
  .rail-nav .badge { margin-left: 2px; }
  .rail-foot { display: none; }
}

/* ---------- Main + views ---------- */
.adm-main { padding: 34px clamp(16px, 3.2vw, 48px) 96px; min-width: 0; }
.view { max-width: 1240px; margin: 0 auto; }
.view:not([hidden]) { animation: view-in .5s var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.view-head .kicker { margin-bottom: 12px; }
.view-title { font: 800 clamp(40px, 5vw, 72px)/.92 var(--f-display); letter-spacing: -.035em; margin: 0; outline: none; }
.view-sub { margin: 12px 0 0; color: var(--ink-2); max-width: 44em; font-size: 16px; }
@media (max-width: 999px) { .adm-main { padding-top: 24px; } }

.panel {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 0 0 1.5px var(--ink);
  padding: 20px;
  min-width: 0;
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-title { font: 800 21px/1.05 var(--f-display); letter-spacing: -.02em; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.panel-sub { font-size: 14px; color: var(--ink-3); margin: 0 0 16px; }
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: 600 14px/1.2 var(--f-body); color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.link-btn:hover { color: var(--orange-deep); }
.mini-label { font: 800 17px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); margin: 18px 0 8px; }
small { font-weight: 500; }

/* ---------- Dashboard ---------- */
.today-board { padding: 14px 16px 12px; min-width: 260px; }
.today-board .board-plate { padding: 0 2px 10px; }
.tb-rows { display: grid; gap: 5px; }
.tb-rows .fc { --fw: 22px; --fh: 34px; }
.tb-next { margin: 10px 2px 0; font: 600 13px/1.3 var(--f-body); color: #c2b59c; }
.tb-next b { color: var(--amber); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.kpi-label { font: 600 15px/1.25 var(--f-body); margin: 0; }
.kpi-label small { display: block; color: var(--ink-3); font-size: 13px; }
.kpi-num { margin: 14px 0 10px; min-height: 44px; }
.kpi-num .fc { --fw: 27px; --fh: 44px; }
.kpi-num .flaps { --fgap: 3px; }
.kpi-delta { margin: 0 0 8px; font: 600 13px/1.3 var(--f-body); color: var(--ink-2); }
.kpi-delta b { color: var(--blue-deep); }
.kpi-delta b.down { color: var(--orange-deep); }
.spark { width: 100%; height: 44px; margin-top: auto; overflow: visible; }

.stack { display: flex; gap: 3px; height: 14px; margin: 4px 0 10px; }
.stack span { display: block; height: 100%; border-radius: 4px; flex: 0 0 auto; width: 0; transition: width 1s var(--ease-out); }
.stack-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.stack-legend li { display: flex; align-items: center; gap: 8px; }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.stack-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

.chart-panel { margin-bottom: 16px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font: 600 13px/1 var(--f-body); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chart-wrap { position: relative; margin-top: 4px; touch-action: pan-y; }
.chart { display: block; width: 100%; height: 280px; overflow: visible; }
.chart text { font: 500 11px var(--f-body); fill: var(--ink-3); }
.chart .lbl-strong { font: 800 15px var(--f-gothic); text-transform: uppercase; fill: var(--blue-deep); letter-spacing: .02em; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-today { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 3 5; stroke-linecap: round; opacity: .45; }
.chart .area { fill: rgba(9, 33, 55, .06); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .sat { fill: rgba(9, 99, 181, .11); }
.chart .dot { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; }
.chart .hover-rule { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .last-lbl { font: 800 15px var(--f-gothic); fill: var(--ink); text-transform: uppercase; letter-spacing: .02em; }
.chart-tip {
  position: absolute; left: 0; top: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); border-radius: 10px; padding: 9px 12px 8px;
  font: 500 13px/1.4 var(--f-body); white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
  box-shadow: 0 10px 24px -10px rgba(2, 15, 29,.5);
}
.chart-tip b { display: block; font: 800 17px/1.1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--amber); }

.dash-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-side { display: grid; gap: 16px; }
@media (max-width: 900px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.35;
}
.activity li:last-child { border-bottom: 0; }
.activity li.is-new { animation: act-in .6s var(--ease-spring) both; }
@keyframes act-in { from { opacity: 0; transform: translateX(-16px); background: #fdedc6; } }
.act-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--f-gothic); padding-top: 1px; background: var(--paper-2); }
.act-ico.k-sale { background: var(--orange); }
.act-ico.k-add { background: var(--blue); color: var(--white); }
.act-ico.k-ch { background: var(--ink); color: var(--paper); }
.act-ico.k-todo { background: var(--amber); }
.activity time { font: 600 12px/1 var(--f-body); color: var(--ink-3); white-space: nowrap; }
.activity strong { font-weight: 700; }

.todo-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.todo-list li {
  display: grid; grid-template-columns: auto 44px minmax(0, 1fr); gap: 12px; align-items: center;
  background: var(--white); border-radius: 12px; padding: 8px 10px; box-shadow: 0 0 0 1.5px var(--ink);
  transition: opacity .35s, transform .35s var(--ease-out);
}
.todo-list li.is-done { opacity: 0; transform: translateX(30px); }
.todo-list li.is-new { animation: act-in .6s var(--ease-spring) both; }
.todo-list img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.todo-list .td-name { font: 600 14px/1.25 var(--f-body); }
.todo-list .td-sub { font-size: 12px; color: var(--ink-3); }
.todo-list input { width: 22px; height: 22px; accent-color: var(--ink); cursor: pointer; }
.todo-list .td-empty { display: block; box-shadow: none; background: transparent; padding: 6px 0; color: var(--ink-3); font-size: 14px; }

.mini-pallets { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.mini-pallets li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.mini-pallets .mp-id { font: 800 26px/1 var(--f-gothic); }
.mini-pallets .mp-bar { height: 10px; border-radius: 5px; background: var(--paper-2); position: relative; overflow: hidden; }
.mini-pallets .mp-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--blue); width: 0; transition: width 1s var(--ease-out); }
.mini-pallets .mp-bar span.neg { background: var(--orange); }
.mini-pallets .mp-roi { font: italic 800 18px/1 var(--f-sign); text-align: right; }

/* ---------- Intake ---------- */
.intake-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; align-items: start; }
@media (max-width: 1080px) { .intake-grid { grid-template-columns: minmax(0, 1fr); } }
.scan-col { position: sticky; top: calc(var(--banner-h) + 24px); }
@media (max-width: 1080px) { .scan-col { position: static; } }

.scanner {
  position: relative; aspect-ratio: 16 / 10;
  background: var(--board) radial-gradient(ellipse at 50% 40%, #0f243b, #03101d 70%);
  border-radius: 18px; overflow: hidden;
  display: grid; place-items: center;
  color: var(--flap-ink);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.scanner.is-cam video { display: block; }
.scanner.is-cam .sc-idle { display: none; }
.sc-c { position: absolute; width: 34px; height: 34px; border: 3px solid var(--amber); z-index: 3; }
.sc-c--tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.sc-c--tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.sc-c--bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.sc-c--br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.sc-idle { text-align: center; display: grid; gap: 8px; padding: 0 30px; }
.sc-idle .gothic { font-size: clamp(32px, 4vw, 46px); }
.sc-idle small { color: #8191a4; font-size: 13px; }
.scan-line {
  position: absolute; left: 7%; right: 7%; top: 14%; height: 2px; z-index: 4;
  background: var(--orange); border-radius: 2px;
  box-shadow: 0 0 14px 3px rgba(197, 45, 51, .65), 0 0 2px 1px #f0a9a8;
  animation: scan-sweep 2.4s ease-in-out infinite alternate;
  opacity: .9;
}
.scanner.is-fast .scan-line { animation-duration: .45s; }
@keyframes scan-sweep { to { top: 86%; } }
.scanner.is-hit::after { content: ""; position: absolute; inset: 0; z-index: 5; background: rgba(255, 255, 255, .55); animation: hit-flash .45s ease-out forwards; }
@keyframes hit-flash { to { opacity: 0; } }
.sc-code {
  position: relative; z-index: 2;
  background: var(--white); color: var(--ink);
  padding: 16px 20px 10px; border-radius: 6px;
  width: min(66%, 320px);
  transform: rotate(-2deg);
  box-shadow: 0 18px 40px -12px rgba(2, 15, 29,.7);
  animation: code-in .5s var(--ease-spring) both;
}
.sc-code svg { width: 100%; height: 76px; display: block; fill: var(--ink); }
.sc-code p { margin: 6px 0 0; text-align: center; font: 600 14px/1 var(--f-body); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
@keyframes code-in { from { transform: translateY(30px) rotate(6deg) scale(.9); opacity: 0; } }
.sc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: .85; }
.scanner.is-matching .sc-photo { filter: saturate(.6) contrast(1.05); }
.scanner.is-matching::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background-image: radial-gradient(circle, rgba(244, 172, 41,.9) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  animation: dots 1.2s linear infinite;
  mix-blend-mode: screen;
}
@keyframes dots { to { background-position: 22px 22px; } }

.scan-ctrl { margin-top: 14px; }
.cam-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cam-note { margin: 0 0 4px; padding: 10px 12px; background: var(--paper-2); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.upc-row { display: flex; gap: 8px; margin-top: 12px; }
.upc-row .input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.upc-row .btn { flex: 0 0 auto; }
.samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sample-bc {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  background: var(--white); border: 0; box-shadow: 0 0 0 1.5px var(--ink); border-radius: 10px;
  padding: 10px 12px 8px; cursor: pointer; text-align: left;
  transition: transform .25s var(--ease-spring), box-shadow .2s;
}
.sample-bc:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 0 0 0 1.5px var(--ink), 4px 5px 0 var(--ink); }
.sample-bc svg { width: 100%; height: 30px; fill: var(--ink); display: block; }
.sample-bc .sb-num { font: 600 11px/1 var(--f-body); letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.sample-bc .sb-name { font: 600 13px/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.alt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
@media (max-width: 460px) { .alt-row { grid-template-columns: 1fr; } }
.alt-btn {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed var(--ink); background: transparent; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; text-align: left;
  font: 600 14px/1.2 var(--f-body);
  transition: background-color .2s, border-style .2s;
}
.alt-btn:hover, .alt-btn[aria-expanded="true"] { background: var(--white); border-style: solid; }
.alt-btn svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.sheet {
  margin-top: 10px; padding: 16px; border-radius: 14px;
  background: var(--white); box-shadow: 0 0 0 1.5px var(--ink);
  animation: view-in .4s var(--ease-out) both;
}
.sheet-title { font: 800 22px/1 var(--f-gothic); text-transform: uppercase; margin: 0 0 6px; }
.sheet .form-note { font-size: 13.5px; color: var(--ink-2); }
.sheet-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input, .file-link input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-link { position: relative; display: inline-block; }
.file-btn:focus-within, .file-link:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }

.matches { display: grid; gap: 8px; margin-top: 12px; }
.match {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--line-strong);
  animation: act-in .5s var(--ease-spring) both;
}
.match:first-child { box-shadow: 0 0 0 2px var(--blue); }
.match img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.match .m-name { font: 600 14px/1.25 var(--f-body); }
.match .m-conf { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.match .m-conf i { display: block; height: 5px; border-radius: 3px; background: var(--blue); width: 60px; }
.match .m-conf i span { display: block; height: 100%; }

.manifest-out { margin-top: 12px; }
.mf-meta { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.mf-meta b { color: var(--ink); }
.mf-scroll { overflow-x: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-strong); }
.mf-table { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap; }
.mf-table th { text-align: left; background: var(--ink); color: var(--paper); font: 800 14px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; padding: 8px 10px 6px; }
.mf-table td { padding: 7px 10px; border-top: 1px solid var(--line); }
.mf-table tr { animation: act-in .4s var(--ease-out) both; }
.mf-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* item form */
.item-form { padding: 22px; }
.if-head { display: grid; gap: 10px; margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; min-height: 0; }
.steps li { display: flex; gap: 10px; align-items: center; animation: act-in .35s var(--ease-out) both; }
.st-ico { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-3); flex: 0 0 auto; display: grid; place-items: center; color: var(--white); font: 700 11px/1 var(--f-body); }
.steps li.is-busy .st-ico { border-color: var(--blue); border-top-color: transparent; animation: spin .7s linear infinite; }
.steps li.is-done .st-ico { background: var(--blue); border-color: var(--blue); }
.steps li.is-done .st-ico::before { content: "✓"; }
.steps li.is-fail .st-ico { background: var(--orange); border-color: var(--orange); color: #fff; }
.steps li.is-fail .st-ico::before { content: "!"; }
.steps small { color: var(--ink-3); }
@keyframes spin { to { transform: rotate(360deg); } }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label small, .rule-label small { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
textarea.input { min-height: 0; resize: vertical; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%23041426' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.money-input { position: relative; }
.money-input::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--ink-3); pointer-events: none; }
.money-input .input { padding-left: 28px; font-variant-numeric: tabular-nums; }
.input.is-filled { animation: filled 1.4s ease-out; }
@keyframes filled { 0%, 30% { background-color: #fdedc6; } 100% { background-color: var(--white); } }
.input.is-invalid { box-shadow: 0 0 0 4px rgba(197, 45, 51, .35); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px/1.2 var(--f-body); margin-top: 6px; cursor: pointer; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--blue); }

.photo-slot { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.photo-slot .ph {
  width: 112px; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: var(--paper-2) repeating-linear-gradient(-45deg, transparent 0 8px, rgba(9, 33, 55,.05) 8px 16px);
  box-shadow: 0 0 0 1.5px var(--ink);
  display: grid; place-items: center; text-align: center;
  font: 600 12px/1.2 var(--f-body); color: var(--ink-3);
  perspective: 400px;
}
.photo-slot .ph img { width: 100%; height: 100%; object-fit: cover; animation: photo-in .6s var(--ease-spring) both; }
@keyframes photo-in { from { transform: rotateY(80deg) scale(.9); opacity: 0; } }
.ps-label { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.ps-label b { color: var(--ink); }

.chk-set { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chk-set legend { font: 600 14px/1.2 var(--f-body); margin-bottom: 8px; padding: 0; }
.chk {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px 8px 10px;
  font: 600 14px/1.2 var(--f-body); cursor: pointer; background: var(--white);
}
.chk:has(input:disabled) { cursor: default; background: var(--paper-2); }
.chk input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.chk small { color: var(--ink-3); }
.form-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1.5px solid var(--line); }
.form-msg { flex: 1 1 200px; margin: 0; font-weight: 600; color: var(--ink-2); }
.form-msg.is-error { color: var(--orange-deep); }

.fly { position: fixed; z-index: 200; pointer-events: none; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 2px var(--ink), 6px 8px 0 var(--ink); }

/* ---------- Inventory ---------- */
.rules { display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 1100px) { .rules { grid-template-columns: 1fr 1fr; } .rule--example { grid-column: 1 / -1; } }
@media (max-width: 640px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.rule { display: flex; flex-direction: column; }
.rule-label { display: block; font: 600 15px/1.3 var(--f-body); margin: 0; }
.rule-label small { display: block; margin: 2px 0 0; font-size: 13px; }
.rule-val { font: italic 800 clamp(56px, 5.4vw, 72px)/1 var(--f-sign); letter-spacing: -.02em; margin: 14px 0 6px; display: flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.rule-val small { font-size: .42em; margin-left: 4px; }
.rule--price .rule-val { color: var(--orange-deep); }
.rule--floor .rule-val { color: var(--blue); }
.range { --c: var(--orange); --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; cursor: pointer; margin: 0; }
.rule--floor .range { --c: var(--blue); }
.range:focus { outline: none; }
.range:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.range::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(to right, var(--c) 0 var(--p), var(--paper-2) var(--p)); box-shadow: inset 0 0 0 1.5px var(--ink); }
.range::-moz-range-track { height: 10px; border-radius: 5px; background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.range::-moz-range-progress { height: 10px; border-radius: 5px; background: var(--c); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); box-shadow: 2px 3px 0 var(--ink); transition: transform .2s var(--ease-spring); }
.range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); box-shadow: 2px 3px 0 var(--ink); }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range-scale { display: flex; justify-content: space-between; font: 600 12px/1 var(--f-body); color: var(--ink-3); margin-top: 2px; }

.ex-bar { position: relative; height: 96px; margin: 12px 6px 6px; }
.ex-track { position: absolute; left: 0; right: 0; top: 44px; height: 4px; background: var(--ink); border-radius: 2px; }
.ex-track::before, .ex-track::after { content: ""; position: absolute; top: -6px; width: 2px; height: 16px; background: var(--ink); }
.ex-track::before { left: 0; } .ex-track::after { right: 0; }
.ex-end { position: absolute; right: 0; top: 22px; font: 600 12px/1 var(--f-body); color: var(--ink-3); transform: translateX(25%); }
.ex-mark { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left .45s var(--ease-spring); }
.ex-mark b { font: italic 800 22px/1 var(--f-sign); white-space: nowrap; }
.ex-mark i { font: 800 14px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; font-style: normal; white-space: nowrap; }
.ex-mark::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); flex: 0 0 auto; }
.ex-mark--price { top: 0; height: 53px; justify-content: flex-end; }
.ex-mark--price i { margin: 1px 0 2px; }
.ex-mark--price b, .ex-mark--price i { color: var(--orange-deep); }
.ex-mark--price::after { background: var(--orange); }
.ex-mark--floor { top: 39px; }
.ex-mark--floor::after { order: -1; margin-bottom: 3px; }
.ex-mark--floor b, .ex-mark--floor i { color: var(--blue); }
.ex-mark--floor::after { background: var(--blue); }
.ex-text { font-size: 14px; color: var(--ink-2); margin: 4px 0 6px; }
.ex-text.is-warn { color: var(--orange-deep); font-weight: 600; }
.rule--example .form-note { margin-top: auto; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.search .input { padding-left: 40px; min-height: 44px; }
.inv-cat { width: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
@media (max-width: 640px) { .search { max-width: none; flex-basis: 100%; } .toolbar .chips { order: 3; } }

.inv-panel { padding: 6px 8px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
  font: 800 16px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink-3); text-align: left; padding: 14px 10px 10px; border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.inv-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.inv-table tr:last-child td { border-bottom: 0; }
.inv-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-table tbody tr { transition: background-color .3s; }
.inv-table tbody tr:hover { background: rgba(9, 33, 55, .03); }
.inv-table tr.is-new { animation: newrow 2.6s ease-out; }
@keyframes newrow { 0%, 45% { background: #fdedc6; } 100% { background: transparent; } }
.inv-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 1.5px var(--ink); display: block; }
.c-thumb { width: 64px; }
.lot { font: 800 19px/1 var(--f-gothic); letter-spacing: .02em; white-space: nowrap; }
.i-name { font-weight: 600; line-height: 1.3; }
.i-cond { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.c-msrp .v { color: var(--ink-3); }
.num-btn {
  border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  padding: 6px 8px; margin: -6px -8px; font: 700 15px/1 var(--f-body); font-variant-numeric: tabular-nums;
  position: relative; transition: background-color .2s, color .2s;
}
.num-btn:hover { background: var(--paper-2); }
.c-price .num-btn { color: var(--orange-deep); }
.c-floor .num-btn { color: var(--blue); }
.num-btn.is-over::after { content: ""; position: absolute; top: 2px; right: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--white); }
.num-btn.ticking { background: #fdedc6; }
.c-price .num-btn.is-sold { color: var(--ink-2); cursor: default; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 6px 10px 4px;
  font: 800 15px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.pill--listed { background: var(--ink); color: var(--paper); }
.pill--sold { background: var(--orange); color: #fff; }
.pill--auction { background: var(--blue); color: var(--white); }

.ch-dots { display: flex; gap: 4px; }
.ch-dot {
  width: 28px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font: 800 15px/1 var(--f-gothic); padding-top: 2px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background-color .3s, color .3s;
}
.ch-dot.s-live, .ch-dot.s-posting { background: var(--ink); color: var(--paper); }
.ch-dot.s-posting { animation: blink 1s steps(2) infinite; }
.ch-dot.s-sold { background: var(--orange); }
.ch-dot.s-auction { background: var(--blue); color: var(--white); box-shadow: none; }
.ch-dot.s-todo { background: var(--amber); }
.ch-dot.s-removed, .ch-dot.s-off, .ch-dot.s-removing { color: #909eaf; box-shadow: inset 0 0 0 1.5px #d8c9ab; text-decoration: line-through; }
.c-ch { white-space: nowrap; }

.note-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer;
  display: grid; place-items: center; position: relative;
  transition: background-color .2s, transform .25s var(--ease-spring);
}
.note-btn:hover { background: var(--ink); color: var(--paper); transform: rotate(-6deg); }
.note-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note-btn.has-note::after { content: ""; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--white); }
.inv-empty { text-align: center; color: var(--ink-3); padding: 28px; margin: 0; }

@media (max-width: 860px) {
  .inv-panel { padding: 0; background: transparent; box-shadow: none; }
  .inv-table thead { display: none; }
  .inv-table, .inv-table tbody { display: block; }
  .inv-table tbody { display: grid; gap: 10px; }
  .inv-table tbody tr {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name name name notes"
      "thumb lot lot status status"
      "msrp msrp price floor ch";
    gap: 6px 10px; align-items: center;
    background: var(--white); border-radius: 14px; box-shadow: 0 0 0 1.5px var(--ink);
    padding: 12px;
  }
  .inv-table tbody tr[hidden] { display: none; }
  .inv-table td { padding: 0; border: 0; }
  .inv-table td.c-thumb { grid-area: thumb; align-self: start; width: auto; }
  .inv-table td.c-name { grid-area: name; }
  .inv-table td.c-lot { grid-area: lot; }
  .inv-table td.c-status { grid-area: status; justify-self: end; }
  .inv-table td.c-msrp { grid-area: msrp; }
  .inv-table td.c-price { grid-area: price; }
  .inv-table td.c-floor { grid-area: floor; }
  .inv-table td.c-ch { grid-area: ch; justify-self: end; }
  .inv-table td.c-notes { grid-area: notes; align-self: start; }
  .inv-table td.c-msrp, .inv-table td.c-price, .inv-table td.c-floor { text-align: left; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
  .inv-table td.c-ch { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; align-self: stretch; display: flex; align-items: center; }
  .inv-table td[data-label]::before { content: attr(data-label); display: block; font: 800 13px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); margin-bottom: 4px; }
  .num-btn { margin: 0 -8px; }
  .inv-thumb { width: 56px; height: 56px; }
  .ch-dot { width: 24px; height: 22px; font-size: 14px; }
}

/* popover */
.pop {
  position: absolute; z-index: 150; width: 272px;
  background: var(--white); border-radius: 14px; padding: 14px;
  box-shadow: 0 0 0 1.5px var(--ink), 5px 6px 0 var(--ink);
  animation: pop-in .3s var(--ease-spring) both;
}
@keyframes pop-in { from { transform: translateY(-6px) scale(.96); opacity: 0; } }
.pop-title { font: 600 14px/1.3 var(--f-body); margin: 0 0 10px; }
.pop-title small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pop-row { display: flex; align-items: center; gap: 8px; }
.pop-row .input { min-height: 42px; width: 90px; font-variant-numeric: tabular-nums; }
.pop-row span { font-weight: 700; }
.pop-calc { margin-left: auto; font: italic 800 22px/1 var(--f-sign); }
.pop-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }

/* note drawer */
.nd-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-bottom: 1.5px solid var(--line); align-items: center; }
.nd-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--ink); }
.nd-item .lot { font-size: 20px; }
.nd-item .i-name { font-size: 16px; margin-top: 4px; }
.nd-form { padding: 18px 20px; display: grid; gap: 10px; }

/* ---------- Channels ---------- */
.ch-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 900px) { .ch-top { grid-template-columns: minmax(0, 1fr); } }
.how { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 12px; }
.how li { counter-increment: how; position: relative; padding: 4px 0 0 46px; min-height: 30px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 800 18px/1 var(--f-gothic); padding-top: 2px; }
.how b { color: var(--ink); }
.todo-card { background: #fdf3dc repeating-linear-gradient(-45deg, transparent 0 10px, rgba(244, 172, 41,.12) 10px 20px); border-radius: 16px; box-shadow: 0 0 0 1.5px var(--ink); padding: 20px; }
.todo-count { min-width: 30px; height: 30px; border-radius: 15px; padding: 0 8px; background: var(--amber); box-shadow: 0 0 0 1.5px var(--ink); display: inline-grid; place-items: center; font: 800 20px/1 var(--f-gothic); padding-top: 2px; }
.todo-count.bump { animation: bump .5s var(--ease-spring); }

.ch-panel { padding: 4px 16px; }
.ch-legend, .ch-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(330px, 1.5fr) 248px; gap: 16px; align-items: center; }
.ch-legend { padding: 14px 0 10px; border-bottom: 2px solid var(--ink); font: 800 16px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); }
.ch-legend-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ch-row:last-child { border-bottom: 0; }
.ch-row.is-new { animation: newrow 2.6s ease-out; }
.ch-row img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 1.5px var(--ink); }
.ch-info .i-name { font-size: 14.5px; }
.ch-info .i-cond { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-info .lot { font-size: 16px; }
.ch-pills { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch-pills::before { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 8px); }
.ch-pill {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 3px;
  border-radius: 10px; padding: 7px 6px 6px;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink);
  min-height: 46px; align-content: center;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.ch-pill .c-name { display: none; font: 600 10.5px/1 var(--f-body); opacity: .75; }
.ch-pill .c-st { font: 800 16px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.ch-pill.s-live { background: var(--ink); color: var(--paper); box-shadow: none; }
.ch-pill.s-live .c-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4cb6e6; box-shadow: 0 0 0 3px rgba(21, 156, 214,.25); }
.ch-pill.s-posting, .ch-pill.s-removing { background: var(--paper-2) repeating-linear-gradient(-45deg, transparent 0 6px, rgba(9, 33, 55,.07) 6px 12px); background-size: 34px 34px; animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 34px 0; } }
.ch-pill.s-sold { background: var(--orange); color: #fff; box-shadow: none; }
.ch-pill.s-todo { background: var(--amber); color: var(--ink); }
.ch-pill.s-removed, .ch-pill.s-off { background: var(--white); color: #74859a; box-shadow: inset 0 0 0 1.5px #ddceb0; }
.ch-pill.s-auction { background: var(--blue); color: var(--white); box-shadow: none; }
.ch-pulse { position: absolute; top: 50%; z-index: 3; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--white), 0 0 0 4.5px var(--ink); pointer-events: none; }

.sold-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.sold-btns button {
  border: 1.5px solid var(--ink); background: var(--white); border-radius: 9px;
  padding: 8px 4px; font: 600 12px/1.1 var(--f-body); cursor: pointer;
  transition: background-color .15s, transform .2s var(--ease-spring);
}
.sold-btns button:hover:not(:disabled) { background: var(--orange); transform: translateY(-1px); }
.sold-btns button:disabled { opacity: .3; cursor: not-allowed; }
.sold-note { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.sold-note b { font: italic 800 20px/1 var(--f-sign); color: var(--ink); display: block; margin-bottom: 2px; }

@media (max-width: 1180px) {
  .ch-legend { display: none; }
  .ch-row { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "img info" "pills pills" "act act"; gap: 10px 14px; padding: 16px 0; }
  .ch-row > img { grid-area: img; }
  .ch-info { grid-area: info; }
  .ch-pills { grid-area: pills; }
  .ch-act { grid-area: act; }
  .ch-pill .c-name { display: block; }
}

/* ---------- Pallets ---------- */
.pal-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .pal-kpis { grid-template-columns: minmax(0, 1fr); } }
.pal-kpi .k-label { font: 600 14px/1.3 var(--f-body); margin: 0; }
.pal-kpi .k-label small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pal-kpi .k-val { font: italic 800 clamp(40px, 4vw, 54px)/1 var(--f-sign); margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.pal-kpi .k-val.pos { color: var(--blue); }

.pal-panel { padding: 4px 16px; }
.pal-head, .pal-row { display: grid; grid-template-columns: 112px repeat(5, minmax(0, 1fr)) minmax(170px, 1.7fr) 30px; gap: 12px; align-items: center; }
.pal-head { padding: 14px 8px 10px; border-bottom: 2px solid var(--ink); font: 800 16px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); }
.pal { border-bottom: 1px solid var(--line); }
.pal:last-child { border-bottom: 0; }
.pal-row {
  width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left;
  padding: 16px 8px; border-radius: 12px; font: 500 15px/1.2 var(--f-body);
  font-variant-numeric: tabular-nums;
  transition: background-color .2s;
}
.pal-row:hover { background: rgba(9, 33, 55, .035); }
.pal-row:disabled { cursor: default; }
.pal-row:disabled:hover { background: transparent; }
.pal-id { font: 800 40px/.9 var(--f-gothic); }
.pal-id small { display: block; font: 600 11.5px/1.2 var(--f-body); color: var(--ink-3); margin-top: 4px; }
.pal-id .tag { display: inline-block; font: 800 13px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; padding: 3px 6px 1px; border-radius: 5px; background: var(--paper-2); color: var(--ink-2); vertical-align: middle; margin-left: 4px; }
.pal-id .tag--open { background: var(--orange); color: #fff; }
.pal-cell small { display: none; }
.pal-profit.pos { color: var(--blue); font-weight: 700; }
.pal-profit.neg { color: var(--orange-deep); font-weight: 700; }
.pal-roi { font: italic 800 24px/1 var(--f-sign); }
.pal-roi.neg { color: var(--orange-deep); }
.pal-roi.pos { color: var(--blue); }
.pal-bar { position: relative; height: 16px; border-radius: 8px; background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.pal-bar .proj { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: repeating-linear-gradient(-45deg, rgba(9, 33, 55,.1) 0 4px, transparent 4px 8px); width: 0; transition: width 1.2s var(--ease-out); }
.pal-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--orange); width: 0; transition: width 1.2s var(--ease-out) .1s, background-color .4s; }
.pal-bar .fill.is-profit { background: var(--blue); }
.pal-bar .be { position: absolute; top: -7px; bottom: -7px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; left: 0; transition: left 1.2s var(--ease-out); }
.pal-bar .be::after { content: "Cost"; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font: 800 12px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.pal-chev { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: transform .35s var(--ease-spring), background-color .2s; }
.pal-chev svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pal.is-open .pal-chev { transform: rotate(180deg); background: var(--ink); color: var(--paper); }
.pal-row:disabled .pal-chev { visibility: hidden; }
.pal-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.pal.is-open .pal-items { grid-template-rows: 1fr; }
.pal-items > div { overflow: hidden; }
.pal-items ul { list-style: none; margin: 0; padding: 4px 8px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pal-items li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--paper); border-radius: 11px; padding: 7px 10px 7px 7px; font-size: 13px; }
.pal-items img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.pal-items .pi-name { font-weight: 600; line-height: 1.25; }
.pal-items .pi-lot { font: 800 14px/1 var(--f-gothic); letter-spacing: .02em; color: var(--ink-3); margin-top: 3px; }
.pal-items .pi-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pal-items .pi-val small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-3); }
.pal-items .pi-val.sold { color: var(--blue); }
.pal-foot { margin-top: 12px; }

@media (max-width: 1000px) {
  .pal-head { display: none; }
  .pal-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 30px;
    grid-template-areas: "id id id chev" "c1 c2 c3 ." "c4 c5 . ." "bar bar bar bar";
    gap: 12px 12px;
  }
  .pal-row > .pal-id { grid-area: id; }
  .pal-row > .pal-chev { grid-area: chev; align-self: start; }
  .pal-row > .pal-cell:nth-of-type(2) { grid-area: c1; }
  .pal-row > .pal-cell:nth-of-type(3) { grid-area: c2; }
  .pal-row > .pal-cell:nth-of-type(4) { grid-area: c3; }
  .pal-row > .pal-cell:nth-of-type(5) { grid-area: c4; }
  .pal-row > .pal-cell:nth-of-type(6) { grid-area: c5; }
  .pal-row > .pal-bar { grid-area: bar; margin-top: 18px; }
  .pal-cell small { display: block; font: 800 13px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); margin-bottom: 4px; }
  .pal-id { font-size: 36px; }
}

/* ==========================================================================
   v2: grading, bins, store-wide pricing preview, after-sale views
   ========================================================================== */

/* rail: nine views now, so tighten it up on shorter screens */
@media (min-width: 1000px) {
  .rail { gap: 16px; padding-top: 20px; overflow-y: auto; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-nav { gap: 2px; }
  .rail-nav a { padding: 9px 12px; }
}
@media (min-width: 1000px) and (max-height: 880px) { .rail-today { display: none; } }

/* grade colors, shared by the intake scale, inventory chips and lineup */
.g-0 { --gc: var(--blue); --gc-ink: var(--white); }
.g-1 { --gc: #8fd0ef; --gc-ink: var(--ink); }
.g-2 { --gc: var(--amber); --gc-ink: var(--ink); }
.g-3 { --gc: #e6d7ba; --gc-ink: var(--ink); }
.g-4 { --gc: var(--orange); --gc-ink: var(--ink); }

/* ---------- Dashboard: needs attention ---------- */
.ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1240px) { .ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.op {
  --tone: var(--ink);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px 12px 20px; border-radius: 14px;
  background: var(--white); color: var(--ink); text-decoration: none;
  box-shadow: 0 0 0 1.5px var(--ink);
  transition: transform .25s var(--ease-spring), box-shadow .2s;
}
.op::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--tone); }
.op:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 0 0 1.5px var(--ink), 4px 5px 0 var(--ink); }
.op--o { --tone: var(--orange); }
.op--b { --tone: var(--blue); }
.op--a { --tone: var(--amber); }
.op--i { --tone: var(--ink); }
.op-n { font: italic 800 40px/1 var(--f-sign); min-width: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
.op--o .op-n { color: var(--orange-deep); }
.op--b .op-n { color: var(--blue); }
.op-l { font: 600 14px/1.2 var(--f-body); }
.op-l small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.op-arr { font: 800 22px/1 var(--f-gothic); transition: transform .25s var(--ease-spring); }
.op:hover .op-arr { transform: translateX(4px); }
@media (max-width: 560px) {
  .ops { gap: 8px; }
  .op { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px 12px 12px 18px; }
  .op-n { text-align: left; font-size: 34px; }
  .op-l { grid-column: 1 / -1; font-size: 13px; }
  .op-arr { grid-row: 1; grid-column: 2; }
}

/* ---------- Intake: bin, grade, checks, defect photos ---------- */
.loc-row { display: flex; gap: 10px; align-items: center; }
.loc-row .input { flex: 1; min-width: 0; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.loc-row .link-btn { flex: 0 0 auto; white-space: nowrap; }

.grade-set {
  margin: 4px 0 0; padding: 16px; border: 0; border-radius: 16px;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  display: grid; gap: 14px; min-width: 0;
  transition: box-shadow .3s;
}
.grade-set legend { float: left; width: 100%; padding: 0; font: 600 15px/1.3 var(--f-body); }
.grade-set legend small { font-weight: 500; color: var(--ink-3); margin-left: 4px; font-size: 13px; }
.grade-set.is-invalid { box-shadow: inset 0 0 0 2px var(--orange), 0 0 0 4px rgba(197, 45, 51, .22); }
.grade-set.is-next { box-shadow: inset 0 0 0 2px var(--blue); }
.grade-set.is-next .gs { animation: gs-nudge 1.6s var(--ease-out) .4s both; }
.grade-set.is-next .gs:nth-child(2) { animation-delay: .48s; }
.grade-set.is-next .gs:nth-child(3) { animation-delay: .56s; }
.grade-set.is-next .gs:nth-child(4) { animation-delay: .64s; }
.grade-set.is-next .gs:nth-child(5) { animation-delay: .72s; }
@keyframes gs-nudge { 0%, 30%, 100% { transform: none; } 12% { transform: translateY(-6px); } }

.grade-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; clear: both; }
.gs {
  position: relative;
  display: grid; gap: 4px; justify-items: start; align-content: start; text-align: left;
  padding: 10px 10px 9px; border: 0; border-radius: 12px;
  background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
  font: inherit; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .25s var(--ease-spring);
}
.gs:hover { transform: translateY(-2px); }
.gs-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gc); color: var(--gc-ink); font: 800 15px/1 var(--f-gothic); padding-top: 2px; }
.gs b { font: 800 20px/.95 var(--f-gothic); text-transform: uppercase; letter-spacing: .01em; }
.gs small { font-size: 11.5px; line-height: 1.25; color: var(--ink-3); }
.gs[aria-pressed="true"] { background: var(--gc); color: var(--gc-ink); box-shadow: inset 0 0 0 2px var(--ink), 3px 4px 0 var(--ink); transform: translateY(-2px); }
.gs[aria-pressed="true"] small { color: inherit; opacity: .8; }
.gs[aria-pressed="true"] .gs-n { background: var(--ink); color: var(--paper); }

.cond-rows { display: grid; gap: 10px; }
.seg-field { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: center; }
.seg-label { font: 600 14px/1.2 var(--f-body); }
.seg-field .seg { justify-self: start; flex-wrap: wrap; background: var(--white); border-radius: 14px; }
.seg-field .seg button { border-radius: 10px; }

.defect-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.defect-photos .form-note { flex: 1 1 200px; }
.dp-list { display: contents; }
.dp { position: relative; width: 64px; height: 64px; flex: 0 0 auto; animation: photo-in .5s var(--ease-spring) both; }
.dp img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1.5px var(--ink); display: block; }
.dp button {
  position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--paper); cursor: pointer;
  font: 700 16px/1 var(--f-body); box-shadow: 0 0 0 2px var(--paper);
  transition: transform .2s var(--ease-spring), background-color .2s;
}
.dp button:hover { transform: rotate(90deg); background: var(--orange-deep); }
.dp-add {
  position: relative; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px;
  border: 1.5px dashed var(--ink); border-radius: 10px; cursor: pointer;
  font: 600 13.5px/1.2 var(--f-body);
  transition: background-color .2s, border-style .2s;
}
.dp-add span { font: 800 26px/1 var(--f-gothic); }
.dp-add input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.dp-add:hover { background: var(--white); border-style: solid; }
.dp-add:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (max-width: 640px) {
  .grade-set { padding: 14px 12px; }
  .grade-scale { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .gs { grid-template-columns: 22px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 12px; }
  .gs small { text-align: right; }
  .seg-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .seg-field .seg { display: flex; width: 100%; }
  .seg-field .seg button { flex: 1 1 auto; padding: 8px 9px; }
}

/* ---------- Inventory: store-wide preview, bins, grades, locks ---------- */
.rule { transition: box-shadow .3s; }
.rule.is-pending { box-shadow: 0 0 0 2px var(--ink), 5px 6px 0 var(--amber); }
.rule-pend {
  align-self: center; margin-left: 12px;
  font: 800 15px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink);
  background: repeating-linear-gradient(-45deg, var(--amber) 0 6px, #f9c86a 6px 12px);
  padding: 5px 8px 3px; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--ink);
  transform: rotate(-5deg);
  animation: pend-in .4s var(--ease-spring) both;
}
@keyframes pend-in { from { transform: rotate(-20deg) scale(.4); opacity: 0; } }

.c-loc { white-space: nowrap; }
.loc-btn {
  border: 0; cursor: pointer; border-radius: 7px; padding: 6px 8px 4px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 800 16px/1 var(--f-gothic); letter-spacing: .03em; font-variant-numeric: tabular-nums;
  transition: background-color .2s, transform .25s var(--ease-spring);
}
.loc-btn:hover { background: var(--amber); transform: rotate(-3deg); }
.c-msrp .num-btn { color: var(--ink-2); }
.num-btn.is-missing, .loc-btn.is-missing {
  color: var(--orange-deep); background: transparent; box-shadow: none;
  font: 700 13px/1 var(--f-body); letter-spacing: 0;
  outline: 1.5px dashed var(--orange); outline-offset: -2px; padding: 7px 9px;
}
.num-btn.is-preview { background: repeating-linear-gradient(-45deg, #fdedc6 0 5px, #fbdc9c 5px 10px); box-shadow: inset 0 0 0 1.5px var(--amber); }
.num-btn.is-locked { display: inline-flex; align-items: center; gap: 5px; cursor: not-allowed; }
.c-floor .num-btn.is-locked { color: var(--ink-2); }
.num-btn.is-locked:hover { background: transparent; }
.lock { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bids-note { display: block; margin-top: 5px; font: 600 12px/1.2 var(--f-body); color: var(--blue-deep); white-space: nowrap; }
.g-chip {
  display: inline-block; margin-right: 6px; vertical-align: 1px;
  padding: 3px 6px 1px; border-radius: 5px;
  background: var(--gc); color: var(--gc-ink);
  font: 800 13px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em;
}
.miss { color: var(--orange-deep); font-weight: 700; }
.pop-row .input.pop-wide { width: 100%; text-transform: uppercase; }

.apply-bar {
  position: sticky; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 16px 14px 22px; border-radius: 16px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 20px 40px -18px rgba(2, 15, 29, .6), 6px 7px 0 var(--amber);
  animation: bar-in .5s var(--ease-spring) both;
}
@keyframes bar-in { from { transform: translateY(40px) rotate(1deg); opacity: 0; } }
.ab-text { flex: 1 1 320px; display: grid; gap: 3px; min-width: 0; }
.ab-text b { font: 800 24px/1.05 var(--f-display); letter-spacing: -.02em; }
.ab-text span { font: 600 14px/1.3 var(--f-body); }
.ab-text span b { font: inherit; color: var(--amber); }
.ab-text small { font-size: 12.5px; color: #c2b59c; }
.ab-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.apply-bar .btn--paper { box-shadow: none; }
.apply-bar .btn:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 560px) {
  .apply-bar { bottom: 10px; padding: 14px; }
  .ab-actions { width: 100%; }
  .ab-actions .btn { flex: 1; }
  .ab-text b { font-size: 21px; }
}

@media (max-width: 860px) {
  .inv-table tbody tr {
    grid-template-areas:
      "thumb name name name notes"
      "thumb lot loc status status"
      "msrp msrp price floor ch";
  }
  .inv-table td.c-loc { grid-area: loc; }
  .inv-table td.c-status { text-align: right; }
}

/* ---------- Saturday ---------- */
.sat-board-mini { min-width: 280px; }
.sat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.sat-grid--b { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); }
@media (max-width: 1100px) { .sat-grid, .sat-grid--b { grid-template-columns: minmax(0, 1fr); } }

.sr-list { display: grid; }
.sr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 214px); gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sr:last-child { border-bottom: 0; }
.sr-label { font: 600 14.5px/1.25 var(--f-body); }
.sr-label small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.sr .input { min-height: 42px; }
.sr > .seg { justify-self: end; }
.unit-input { position: relative; }
.unit-input .input { padding-right: 48px; font-variant-numeric: tabular-nums; }
.unit-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--ink-3); pointer-events: none; }
.sr-link { justify-self: end; text-align: right; font: 600 14px/1.3 var(--f-body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.sr-link b { color: var(--blue); }
.sr-link:hover { color: var(--blue-deep); }
.sr-sum { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.sr-sum b { color: var(--ink); }
@media (max-width: 520px) {
  .sr { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sr > .seg, .sr-link { justify-self: start; text-align: left; }
}

.lineup { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lineup li {
  display: grid; grid-template-columns: 42px 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 6px 8px 6px 6px; border-radius: 12px; background: var(--paper);
  position: relative;
}
.lu-no {
  display: grid; place-items: center; height: 44px; border-radius: 8px;
  background: var(--board) linear-gradient(to bottom, transparent calc(50% - .5px), rgba(2, 15, 29,.6) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
  color: var(--flap-ink); font: 800 22px/1 var(--f-gothic); padding-top: 2px;
}
.lineup img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1.5px var(--ink); }
.lu-info .i-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lu-info .i-cond b { color: var(--blue); }
.lu-st.is-bids { color: var(--blue-deep); font-weight: 700; }
.lu-time { text-align: right; white-space: nowrap; font: italic 800 19px/1 var(--f-sign); font-variant-numeric: tabular-nums; }
.lu-time small { display: block; margin-bottom: 3px; font: 600 11px/1 var(--f-body); color: var(--ink-3); }
.lu-move { display: grid; gap: 3px; }
.lu-btn {
  width: 32px; height: 21px; border: 0; border-radius: 6px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background-color .15s, color .15s, transform .2s var(--ease-spring);
}
.lu-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.lu-btn:active:not(:disabled) { transform: scale(.9); }
.lu-btn:disabled { opacity: .2; cursor: default; }
.lu-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) {
  .lineup li { grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "no info move" "no time move"; gap: 2px 10px; }
  .lineup img { display: none; }
  .lu-no { grid-area: no; height: 100%; min-height: 44px; }
  .lu-info { grid-area: info; }
  .lu-time { grid-area: time; text-align: left; font-size: 16px; }
  .lu-time small { display: inline; margin: 0 4px 0 0; }
  .lu-move { grid-area: move; grid-auto-flow: column; gap: 4px; }
  .lu-btn { width: 36px; height: 36px; }
}

.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flag {
  --lc: var(--blue);
  position: relative; overflow: hidden;
  padding: 14px 14px 12px 20px; border-radius: 14px;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background-color .3s;
}
.flag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--lc); }
.flag.l-high { --lc: var(--orange); }
.flag.l-medium { --lc: var(--amber); }
.fl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.fl-level { font: 800 14px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; padding: 4px 7px 2px; border-radius: 5px; background: var(--lc); color: var(--ink); white-space: nowrap; }
.flag.l-watch .fl-level { color: var(--white); }
.fl-title { flex: 1 1 180px; margin: 0; font: 600 15px/1.25 var(--f-body); }
.fl-text { margin: 8px 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.fl-held { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; font: 600 13px/1.35 var(--f-body); background: repeating-linear-gradient(-45deg, #fdedc6 0 6px, #fbdc9c 6px 12px); }
.fl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.flag.is-held { background: var(--white); }
.flag.is-held .fl-head { padding-right: 92px; }
.flag.is-held::after {
  content: "On hold"; position: absolute; right: 12px; top: 12px;
  font: 800 19px/1 var(--f-gothic); text-transform: uppercase; color: var(--orange-deep);
  border: 2.5px solid currentColor; border-radius: 6px; padding: 4px 8px 2px;
  transform: rotate(7deg); animation: stamp-in .4s var(--ease-spring) both;
}
@keyframes stamp-in { from { transform: rotate(7deg) scale(2); opacity: 0; } }
.flags-empty { padding: 8px 0; color: var(--ink-3); font-size: 14px; }

.audit-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.audit-tools select { flex: 1 1 220px; width: auto; min-width: 0; min-height: 42px; }
.audit-tools input { flex: 0 1 140px; min-width: 0; min-height: 42px; font-variant-numeric: tabular-nums; }
.audit-scroll { max-height: 540px; overflow: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); overscroll-behavior: contain; }
.audit { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 13px; }
.audit th { position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap; padding: 9px 10px 7px; background: var(--ink); color: var(--paper); font: 800 15px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; }
.audit th.num { text-align: right; }
.audit td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.audit .num { text-align: right; font-variant-numeric: tabular-nums; }
.a-t { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.a-lot .lot { font-size: 16px; margin-right: 6px; }
.a-lot small { color: var(--ink-3); font-size: 12px; }
.a-p { white-space: nowrap; }
.a-p .link-btn { padding: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.a-amt { font-weight: 700; white-space: nowrap; }
.a-amt small { display: block; font-size: 11px; color: var(--blue-deep); }
.a-how { white-space: nowrap; }
.a-dev { white-space: nowrap; color: var(--ink-3); font-size: 12px; }
.bk { display: inline-block; margin: 1px 4px 1px 0; padding: 4px 8px; border-radius: 999px; background: var(--paper-2); font: 600 12px/1 var(--f-body); white-space: nowrap; }
.bk--auto { background: #ddf0fa; color: var(--blue-deep); }
.bk--ret { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.bk--ext { background: var(--amber); }
.audit tr.is-win td { background: rgba(9, 99, 181, .05); }
.audit tr.is-held td { background: #fdf3dc; }
.audit tr.is-retracted td { color: var(--ink-3); }
.audit tr.is-retracted .a-amt { text-decoration: line-through; }
.tag-hold { margin-left: 6px; padding: 3px 5px 1px; border-radius: 4px; background: var(--orange); font: 800 12px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; }
.audit-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Orders + pickup ---------- */
.ord-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .ord-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ord-kpis .k-val { font-size: clamp(30px, 2.9vw, 44px); white-space: nowrap; }
@media (max-width: 1100px) { .ord-kpis .k-val { font-size: clamp(30px, 5vw, 44px); } }
@media (max-width: 480px) { .ord-kpis { gap: 8px; } .ord-kpis .panel { padding: 14px; } .ord-kpis .k-val { font-size: 27px; } }
.pal-kpi .k-val.neg { color: var(--orange-deep); }

.ord-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 1140px) { .ord-grid { grid-template-columns: minmax(0, 1fr); } }

.desk-top { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 16px; align-items: start; }
.scanner--desk { aspect-ratio: 1; }
.scanner--desk .sc-idle .gothic { font-size: 30px; }
.desk-ctrl .upc-row { margin-top: 0; }
.desk-ctrl .cam-row { margin-top: 10px; }
.desk-ctrl .cam-note { margin-top: 10px; }
.desk-ctrl .mini-label { margin-top: 16px; }
.desk-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.desk-chip {
  display: grid; gap: 4px; text-align: left; padding: 9px 11px 8px;
  border: 0; border-radius: 10px; background: var(--white); color: var(--ink); cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--ink);
  transition: transform .25s var(--ease-spring), box-shadow .2s;
}
.desk-chip b { font: 800 17px/1 var(--f-gothic); letter-spacing: .03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.desk-chip small { font-size: 12px; color: var(--ink-3); }
.desk-chip:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 0 0 0 1.5px var(--ink), 4px 5px 0 var(--ink); }
.desk-chip.is-own { box-shadow: 0 0 0 2px var(--blue); }
.desk-chip.is-own:hover { box-shadow: 0 0 0 2px var(--blue), 4px 5px 0 var(--blue); }
@media (max-width: 560px) { .desk-top { grid-template-columns: minmax(0, 1fr); } .scanner--desk { aspect-ratio: 16 / 8; } }

.desk-out:not(:empty) { margin-top: 18px; }
.desk-miss { margin: 0; padding: 14px; border-radius: 12px; background: #fdf3dc; box-shadow: inset 0 0 0 1.5px var(--amber); font-size: 14px; line-height: 1.45; }
.desk-card {
  position: relative; overflow: hidden;
  padding: 16px; border-radius: 14px;
  background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink), 5px 6px 0 var(--ink);
}
/* ticket notches */
.desk-card::before, .desk-card::after { content: ""; position: absolute; top: 84px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.desk-card::before { left: -10px; }
.desk-card::after { right: -10px; }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 14px; border-bottom: 2px dashed var(--line-strong); min-height: 78px; }
.dc-head .lot { font-size: 22px; }
.dc-name { margin: 6px 0 3px; font: 600 17px/1.2 var(--f-body); }
.dc-name small { color: var(--ink-3); font-size: 13px; }
.dc-meta { margin: 0; font-size: 13px; color: var(--ink-3); }
.dc-total { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.dc-total b { font: italic 800 28px/1 var(--f-sign); font-variant-numeric: tabular-nums; }
.dc-warn { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fbe1df; box-shadow: inset 0 0 0 1.5px var(--orange); }
.dc-warn p { margin: 0; font-size: 14px; }
.dc-done { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); font-size: 14px; }
.pick-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.pick-list label {
  display: grid; grid-template-columns: 22px 84px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color .2s, box-shadow .2s;
}
.pick-list label:has(input:disabled) { cursor: default; }
.pick-list input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.pl-loc { padding: 5px 6px 3px; border-radius: 6px; text-align: center; background: var(--amber); font: 800 18px/1 var(--f-gothic); letter-spacing: .03em; font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s; }
.pl-name { font-size: 14px; line-height: 1.3; }
.pl-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-list label.is-got { background: #e5f4fb; box-shadow: inset 0 0 0 1.5px var(--blue); }
.pick-list label.is-got .pl-loc { background: var(--blue); color: var(--white); }
.pick-list label.is-got .pl-name { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.desk-card.is-unpaid .pick-list { opacity: .55; }
.dc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.dc-foot .btn:disabled { opacity: .35; cursor: not-allowed; }
.dc-stamp {
  position: absolute; left: 50%; top: 50%; z-index: 2; pointer-events: none;
  padding: 10px 18px 6px; border: 4px solid currentColor; border-radius: 12px;
  background: rgba(255, 255, 255, .88); color: var(--blue);
  font: 800 clamp(30px, 5vw, 46px)/1 var(--f-display); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-12deg);
  animation: dc-stamp .45s var(--ease-spring) both;
}
@keyframes dc-stamp { from { transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); opacity: 0; } }
@media (max-width: 480px) {
  .dc-head { flex-direction: column; }
  .dc-total { justify-items: start; grid-auto-flow: column; align-items: center; }
  .desk-card::before, .desk-card::after { display: none; }
  .pick-list label { grid-template-columns: 22px 70px minmax(0, 1fr); }
  .pl-amt { grid-column: 3; font-size: 13px; color: var(--ink-3); }
  .pl-loc { font-size: 16px; }
}

.sched-days { display: flex; flex-wrap: wrap; border-radius: 14px; margin-bottom: 12px; }
.sched-days button { border-radius: 10px; }
.sched-days .n { opacity: .55; margin-left: 2px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 6px; }
.slot {
  min-width: 0; display: grid; gap: 6px; justify-items: start; text-align: left;
  padding: 8px 9px 7px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font: inherit;
  transition: transform .2s var(--ease-spring), box-shadow .2s, background-color .2s, color .2s;
}
.slot:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sl-time { font: 800 17px/1 var(--f-gothic); letter-spacing: .02em; white-space: nowrap; }
.sl-dots { display: flex; gap: 4px; }
.sl-dots i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.sl-dots i.is-on { background: var(--ink); box-shadow: none; }
.sl-dots i.is-own { background: var(--blue); box-shadow: none; }
.sl-dots i.is-done { background: #c2b59c; box-shadow: none; }
.sl-names { max-width: 100%; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }
.slot.is-full { background: var(--paper-2); }
.slot.is-past { opacity: .45; }
.slot.has-own { box-shadow: inset 0 0 0 2px var(--blue); }
.slot.is-now { box-shadow: inset 0 0 0 2px var(--orange), 0 0 0 3px rgba(197, 45, 51, .2); }
.slot.is-now .sl-time::after { content: " · now"; color: var(--orange-deep); }
.slot[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 3px 4px 0 var(--orange); transform: translateY(-2px); }
.slot[aria-pressed="true"] .sl-names { color: #c2b59c; }
.slot[aria-pressed="true"] .sl-dots i:not(.is-on):not(.is-own):not(.is-done) { box-shadow: inset 0 0 0 1.5px #556375; }
.slot[aria-pressed="true"] .sl-dots i.is-on { background: var(--paper); }
.slot-detail:not(:empty) { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--paper); animation: view-in .35s var(--ease-out) both; }
.sd-head { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-3); }
.sd-head b { color: var(--ink); margin-right: 6px; }
.sd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sd-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 7px 8px 7px 10px; border-radius: 9px; background: var(--white); font-size: 14px; }
.sd-list .lot { font-size: 15px; }
.sd-n { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 480px) {
  .sd-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .sd-who { grid-column: 1 / -1; }
}

.tag-you { display: inline-block; vertical-align: 1px; padding: 3px 5px 1px; border-radius: 4px; background: var(--blue); color: var(--white); font: 800 12px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; }
.pk { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pk--done { color: var(--blue-deep); }
.pk--done::before { content: "✓ "; }
.pk--none { color: var(--ink-3); font-weight: 500; }
.pill--paid { background: var(--blue); color: var(--white); }
.pill--unpaid { background: var(--white); color: var(--orange-deep); box-shadow: inset 0 0 0 1.5px var(--orange); }

.ord-panel { padding-bottom: 12px; }
.ord-table { width: 100%; border-collapse: collapse; }
.ord-table th { text-align: left; white-space: nowrap; padding: 14px 10px 10px; border-bottom: 2px solid var(--ink); color: var(--ink-3); font: 800 16px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; }
.ord-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.ord-table tbody tr:last-child td { border-bottom: 0; }
.ord-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ord-table tbody tr { transition: background-color .2s; }
.ord-table tbody tr:hover { background: rgba(9, 33, 55, .03); }
.ord-table tr.is-own { background: rgba(9, 99, 181, .05); }
.o-no .lot { font-size: 17px; }
.o-no small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.o-who small { color: var(--ink-3); }
.o-total { font-weight: 700; }
.o-act { width: 1%; text-align: right; }
.ord-foot { display: flex; justify-content: center; padding-top: 8px; }
@media (max-width: 860px) {
  .ord-table thead { display: none; }
  .ord-table, .ord-table tbody { display: block; }
  .ord-table tbody { display: grid; gap: 8px; }
  .ord-table tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "no total act" "who who who" "items paid pick";
    gap: 8px 10px; align-items: center;
    padding: 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line-strong);
  }
  .ord-table td { padding: 0; border: 0; }
  .ord-table tbody tr:last-child td { border: 0; }
  .o-no { grid-area: no; } .o-total { grid-area: total; } .o-act { grid-area: act; width: auto; }
  .o-who { grid-area: who; } .o-items { grid-area: items; color: var(--ink-3); font-size: 13px; }
  .o-paid { grid-area: paid; } .o-pick { grid-area: pick; text-align: right; }
}

/* ---------- Issues ---------- */
.issue-list { display: grid; gap: 14px; }
.issue {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr); grid-template-areas: "head head" "body ctrl";
  gap: 14px 24px; padding: 18px 20px; border-radius: 16px;
  background: var(--white); box-shadow: 0 0 0 1.5px var(--ink);
  animation: act-in .5s var(--ease-out) both;
}
.issue.s-new { box-shadow: 0 0 0 1.5px var(--ink), 5px 6px 0 var(--orange); }
.issue.s-resolved { background: var(--paper); }
.pill--st-new { background: var(--orange); color: #fff; }
.pill--st-reviewing { background: var(--amber); color: var(--ink); }
.pill--st-resolved { background: var(--blue); color: var(--white); }
.iss-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 12px; border-bottom: 2px dashed var(--line-strong); }
.iss-head .lot { font-size: 21px; }
.iss-kind { font: 600 14.5px/1.2 var(--f-body); }
.iss-when { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.iss-body { grid-area: body; display: grid; gap: 12px; align-content: start; }
.iss-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.iss-item img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 1.5px var(--ink); }
.iss-text { position: relative; margin: 0; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--paper); font-size: 14.5px; line-height: 1.5; }
.iss-text::before { content: ""; position: absolute; left: 0; top: -9px; border: 0 solid transparent; border-width: 0 0 9px 12px; border-bottom-color: var(--paper); }
.issue.s-resolved .iss-text { background: var(--white); }
.issue.s-resolved .iss-text::before { border-bottom-color: var(--white); }
.iss-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.iss-ph { width: 78px; height: 78px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--paper-2); box-shadow: 0 0 0 1.5px var(--ink); transition: transform .25s var(--ease-spring); }
.iss-ph:hover { transform: rotate(-3deg) scale(1.05); }
.iss-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iss-ctrl { grid-area: ctrl; display: grid; gap: 10px; align-content: start; }
.iss-ctrl .seg { justify-self: start; background: var(--white); }
.iss-ctrl .input { min-height: 42px; }
.iss-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.iss-save .btn:disabled { opacity: .35; cursor: not-allowed; }
.iss-dirty { font: 600 13px/1.2 var(--f-body); color: var(--orange-deep); }
.iss-dirty::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px; border-radius: 50%; background: var(--orange); animation: blink 1.2s steps(2) infinite; }
@media (max-width: 860px) {
  .issue { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "ctrl"; padding: 16px; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: 64px 16px 24px;
  background: rgba(9, 33, 55, .9);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { width: min(860px, 100%); height: auto; max-height: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 0 0 2px var(--paper); transform: scale(.92) rotate(-2deg); transition: transform .45s var(--ease-spring); }
.lightbox.is-open img { transform: none; }
.lb-close { position: absolute; top: 14px; right: 14px; background: var(--paper); }

/* ---------- Go live ---------- */
.gl-board { min-width: 312px; }
.gl-meter { height: 8px; margin: 12px 2px 2px; border-radius: 4px; background: #122c47; overflow: hidden; }
.gl-meter span { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--amber); transition: width 1s var(--ease-out); }
.gl-note {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: baseline;
  margin: 0 0 22px; padding: 16px 20px; border-radius: 16px;
  background: #fdf3dc repeating-linear-gradient(-45deg, transparent 0 10px, rgba(244, 172, 41, .12) 10px 20px);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.gl-note b { font: 800 22px/1.1 var(--f-display); letter-spacing: -.02em; }
.gl-note p { margin: 0; max-width: 62em; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 700px) { .gl-note { grid-template-columns: minmax(0, 1fr); } }
.gl-groups { display: grid; gap: 24px; }
.gl-group .panel-title { margin-bottom: 10px; }
.gl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .gl-cards { grid-template-columns: minmax(0, 1fr); } }
.gl-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px;
  padding: 16px 18px; border-radius: 16px;
  background: var(--white); box-shadow: 0 0 0 1.5px var(--ink);
  transition: background-color .3s, box-shadow .3s, transform .3s var(--ease-spring);
}
.gl-card.s-ready { background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink), 4px 5px 0 var(--blue); }
.gl-title { margin: 0 0 8px; font: 800 25px/.95 var(--f-gothic); text-transform: uppercase; letter-spacing: .01em; }
.gl-title small { display: block; margin-top: 4px; font: 600 13px/1.3 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.gl-main p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.gl-main .gl-cost { margin: 0; font-weight: 700; color: var(--ink); }
.gl-side { display: grid; justify-items: end; align-content: start; gap: 8px; }
.gl-chip {
  --k-bg: var(--ink); --k-fg: var(--paper);
  display: inline-flex; align-items: center; white-space: nowrap;
  font: 800 15px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .01em;
  background: var(--k-bg); color: var(--k-fg);
  padding: 6px 10px 4px 21px; border-radius: 0 6px 6px 0;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
  -webkit-mask: radial-gradient(circle at 11px 50%, #0000 2.6px, #020f1d 3.2px);
          mask: radial-gradient(circle at 11px 50%, #0000 2.6px, #020f1d 3.2px);
  transform: rotate(-2deg);
}
.gl-card.s-demo .gl-chip { --k-bg: var(--orange); --k-fg: #fff; }
.gl-card.s-account .gl-chip { --k-bg: var(--amber); --k-fg: var(--ink); }
.gl-card.s-ready .gl-chip { --k-bg: var(--blue); --k-fg: var(--white); }
@media (max-width: 560px) {
  .gl-board { min-width: 0; width: 100%; }
  .gl-card { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gl-side { grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; order: -1; }
}

/* ---------- Pallets: per-item profit ---------- */
.pi-table { padding: 4px 8px 18px; font-variant-numeric: tabular-nums; }
.pi-row { display: grid; grid-template-columns: minmax(200px, 2.2fr) repeat(5, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.pi-row:not(.pi-row--head):not(.pi-row--total):nth-child(even) { background: var(--paper); }
.pi-row--head { padding-bottom: 7px; border-bottom: 1.5px solid var(--ink); border-radius: 0; color: var(--ink-3); font: 800 15px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; }
.pi-row--head span:not(:first-child), .pi-c { text-align: right; }
.pi-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; }
.pi-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.pi-table .pi-name { display: block; font-weight: 600; line-height: 1.25; }
.pi-table .pi-lot { display: block; margin-top: 3px; font: 800 13px/1 var(--f-gothic); letter-spacing: .02em; color: var(--ink-3); }
.pi-c small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.pi-profit { font-weight: 700; }
.pi-profit.pos { color: var(--blue); }
.pi-profit.neg { color: var(--orange-deep); }
.pi-row.is-est .pi-profit { opacity: .7; }
.pi-row--total { margin-top: 4px; padding-top: 10px; border-top: 2px solid var(--ink); border-radius: 0; font-weight: 700; }
.pi-note { margin: 10px 10px 0; font-variant-numeric: normal; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); max-width: 70em; }
@media (max-width: 760px) {
  .pi-table { padding: 4px 0 16px; }
  .pi-row--head { display: none; }
  .pi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; align-items: start; }
  .pi-item, .pi-row--total > span:first-child { grid-column: 1 / -1; }
  .pi-c { text-align: left; }
  .pi-c::before { content: attr(data-l); display: block; margin-bottom: 3px; font: 800 12px/1 var(--f-gothic); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-line { display: none; }
  .grade-set.is-next .gs, .rule-pend, .apply-bar, .flag.is-held::after, .dc-stamp, .issue, .dp { animation: none; }
}
