/* POS terminal — Day 1 shell.
   Reuses the design tokens defined in /style.css (:root --bg, --fg, etc).
   This file adds POS-specific layout and component vocab.
   Tablet-first (iPad landscape 1024+); reactive Preact cart lands Day 2.
*/

:root {
  --pos-topbar-h: 60px;
  --pos-action-w: 280px;
  /* NOTE: --bg-elevated, --bg-subtle, --amber, --blue, --accent, --font-tabular
     all come from /style.css design tokens (2026-05-26 overhaul). No redeclare
     here — that would shadow the brick-rust accent + warm-tinted greys. The
     per-customer accent override (Day 13) sets --accent inline on body. */
}

* { box-sizing: border-box; }

.pos-body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ───────────────────────────────────────────────────────── */

.pos-topbar {
  height: var(--pos-topbar-h);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
}

.pos-topbar__left,
.pos-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-topbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.pos-brand {
  display: flex;
  align-items: center;
}

.pos-brand__logo {
  height: 24px;
  width: auto;
}

.pos-brand__divider {
  width: 1px;
  height: 24px;
  background: var(--border-strong);
}

.pos-brand__customer {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.01em;
}

.pos-cashier-strip {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pos-cashier-strip__sales {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
}

.pos-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--muted);
}

.pos-online-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.pos-online-pill[data-state="offline"] .pos-online-pill__dot {
  background: var(--amber);
}
.pos-online-pill[data-state="syncing"] .pos-online-pill__dot {
  background: var(--blue, #3b82f6);
  animation: pos-online-pulse 1s ease-in-out infinite;
}
@keyframes pos-online-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pos-kbd {
  font-family: var(--font-tabular);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── 3-pane workspace ──────────────────────────────────────────────── */

.pos-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.4fr var(--pos-action-w);
  min-height: 0;
}

.pos-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* min-width: 0 is critical for narrow viewports — without it, a grid item
     refuses to shrink below its content's min-content and the column blows
     past the viewport width (h-scroll appears the moment a long cart line
     renders). */
  min-width: 0;
  background: var(--bg);
}

.pos-pane--search { border-right: 1px solid var(--border); }
.pos-pane--cart   { background: var(--bg-elevated); }
.pos-pane--actions {
  border-left: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 16px;
  gap: 8px;
}

/* ── Search ────────────────────────────────────────────────────────── */

.pos-search {
  position: relative;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.pos-search__icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.pos-search__input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  outline: none;
  transition: border-color 120ms ease;
}

.pos-search__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.pos-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pos-result {
  appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg);
}

.pos-result:hover { background: var(--bg-subtle); }
.pos-result.is-highlighted {
  background: var(--bg-subtle);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.pos-result__sku {
  font-family: var(--font-tabular);
  font-weight: 600;
}

.pos-result__desc {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pos-result__brand {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pos-result__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-result__price {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}

.pos-result__stock {
  font-family: var(--font-tabular);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.pos-result__stock--ok  { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green-ink);}
.pos-result__stock--low { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber-ink);}
.pos-result__stock--out { background: color-mix(in srgb, var(--red) 14%, transparent);   color: var(--red-ink);  }

/* ── Cart ──────────────────────────────────────────────────────────── */

.pos-cart-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-cart-header__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.pos-cart-header__sub {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.pos-cart-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Open-sales / resume-quote picker ─────────────────────────────────── */
.pos-resume-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
}

.pos-resume-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 20px 4px;
  text-align: center;
}

.pos-resume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  color: var(--fg);
  transition: border-color 0.12s, background 0.12s;
}

.pos-resume-row:hover,
.pos-resume-row:focus-visible {
  border-color: var(--accent);
  background: var(--bg-subtle);
  outline: none;
}

.pos-resume-row:disabled { opacity: 0.55; cursor: progress; }

.pos-resume-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pos-resume-row__who {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-resume-row__meta {
  font-size: 12px;
  color: var(--muted);
}

.pos-resume-row__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pos-resume-row__total {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
}

.pos-resume-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pos-resume-badge--draft {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.pos-resume-badge--open,
.pos-resume-badge--partial {
  background: var(--amber);
  color: var(--amber-ink);
}

.pos-cart-lines {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.pos-line {
  display: grid;
  grid-template-columns: 110px 1fr 88px 96px 180px;
  align-items: center;
  min-height: 60px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  font-size: 15px;
}

.pos-line:hover { background: var(--bg-subtle); }

.pos-line__qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  height: 32px;
  padding: 0 2px;
}

.pos-line__qty-stepper button {
  appearance: none;
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pos-line__qty-stepper button:hover { background: var(--bg-subtle); }
.pos-line__qty-stepper button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pos-line__qty-value {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.pos-line__desc {
  overflow: hidden;
}

.pos-line__desc strong {
  display: inline-block;
  margin-right: 8px;
}

.pos-line__desc-text {
  color: var(--muted);
  font-size: 13px;
}

.pos-line__discount-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green-ink);
  font-family: var(--font-tabular);
  font-size: 12px;
}

/* Core deposit line — money, not a part: amber chip + tinted row so the
   cashier reads it as "attached to the part above", not a second item. */
.pos-line--core {
  background: color-mix(in srgb, #b45309 5%, transparent);
}
.pos-line__core-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, #b45309 14%, transparent);
  color: #92400e;
  font-size: 12px;
  white-space: nowrap;
}

.pos-line__price,
.pos-line__total {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pos-line__total { font-weight: 600; }

.pos-line__actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.pos-line__actions button {
  appearance: none;
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pos-line__actions button:hover {
  background: var(--bg-subtle);
  color: var(--fg);
}

.pos-line__remove:hover { color: var(--red) !important; }

/* ── Sale complete panel ─────────────────────────────────────────── */
/* Shown right after payment so the cashier sees their next action
   instantly: print the receipt or start the next sale. Previously the
   POS just disabled all buttons and silently waited — Bert reported the
   dead-end UX 2026-05-26. */
.pos-sale-complete {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--green) 8%, var(--bg));
}
/* `display: flex` above beats the default UA `display: none` for [hidden],
   so the panel would render BEFORE payment too. Force-hide when the
   `hidden` attribute is set. */
.pos-sale-complete[hidden] { display: none !important; }
.pos-sale-complete__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.pos-sale-complete__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.pos-sale-complete__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
}
.pos-sale-complete__sub {
  font-size: 13px;
  color: var(--muted);
}
.pos-sale-complete__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Totals ────────────────────────────────────────────────────────── */

.pos-cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.pos-totals { display: flex; flex-direction: column; gap: 4px; }

.pos-totals__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
/* The [hidden] attribute is set by renderInvoice() to toggle line-vs-sale-vs-
   combined discount rows. Without this !important, the display:flex above
   wins and all 3 rows render. */
.pos-totals__row[hidden] { display: none !important; }

.pos-totals__row--total {
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: 20px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pos-totals__row--discount span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pos-totals__edit {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}

.pos-totals__edit:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--fg);
  border-color: var(--border-strong);
}

.pos-totals__edit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pos-tabular {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.pos-btn {
  appearance: none;
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 120ms ease, transform 80ms ease, border-color 120ms ease;
}

.pos-btn:hover:not(:disabled)  { background: var(--bg-subtle); }
.pos-btn:active:not(:disabled) { transform: scale(0.98); }
.pos-btn:focus-visible         { outline: 2px solid var(--accent); outline-offset: 2px; }
.pos-btn:disabled              { opacity: 0.45; cursor: not-allowed; }

.pos-btn--primary {
  background: var(--accent);
  color: var(--bg-elevated);
  border-color: var(--accent);
}
.pos-btn--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, white);
}

.pos-btn--ghost {
  background: transparent;
  border-color: var(--border);
}

.pos-btn--danger {
  color: var(--red);
}
.pos-btn--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 8%, var(--bg-elevated));
  border-color: var(--red);
}

/* Text-link variant: kills the "bordered red button competes" complaint */
.pos-btn--link {
  border: 0 !important;
  background: transparent !important;
  text-decoration: underline;
  text-decoration-color: rgba(239,68,68,0.4);
  padding: 6px 4px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  width: max-content;
}
.pos-btn--link:hover:not(:disabled) { color: var(--red-ink);background: transparent !important; }

.pos-btn--sm { padding: 6px 12px; font-size: 13px; }
.pos-btn--lg { padding: 14px 20px; font-size: 16px; font-weight: 600; }

.pos-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ── Empty / loading states ───────────────────────────────────────── */

.pos-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

.pos-empty__title {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--fg);
}

.pos-empty__hint {
  margin: 0;
  font-size: 13px;
}

/* Zero-results lost-sale capture (W3) */
.pos-empty__lostsale {
  margin-top: 14px;
}
.pos-empty__hint--quiet {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Agent bar ─────────────────────────────────────────────────────── */

.pos-agent-bar {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
}

.pos-agent-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.pos-agent-bar__input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
}

.pos-agent-bar__transcript {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-agent-bar__transcript:empty {
  display: none;
}

.pos-agent-msg {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  max-width: 90%;
  white-space: pre-wrap;
}

.pos-agent-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg-elevated);
}

.pos-agent-msg--tool {
  font-family: var(--font-tabular);
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  padding: 4px 12px;
}

/* ── Toast ─────────────────────────────────────────────────────────── */

/* ── Payment modal (Day 3) ──────────────────────────────────────────── */

.pos-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-modal[hidden] { display: none; }

.pos-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.pos-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.3);
  animation: pos-modal-in 200ms ease;
}

@keyframes pos-modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pos-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.pos-modal__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 22px;
}

.pos-icon-btn {
  appearance: none;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.pos-icon-btn:hover { background: var(--bg-subtle); color: var(--fg); }

.pos-modal__body {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pos-modal__foot {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.pos-pay-summary {
  background: var(--bg-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.pos-pay-summary__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pos-pay-summary__amount {
  font-family: var(--font-heading);
  font-size: 36px;
  margin-top: 4px;
}

.pos-pay-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.pos-pay-tab {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pos-pay-tab.is-active {
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.pos-pay-pane[hidden] { display: none; }
.pos-pay-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-pay-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pos-pay-field span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pos-pay-field input {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-tabular);
  font-size: 20px;
  padding: 10px 12px;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.pos-pay-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.pos-quick-cash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
}

.pos-quick-cash__btn {
  appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-tabular);
  font-size: 14px;
  cursor: pointer;
  color: var(--fg);
}

.pos-quick-cash__btn:hover {
  background: var(--bg-subtle);
}

.pos-pay-change {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--bg-subtle);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.pos-pay-change span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pos-pay-change strong {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--green);
}

.pos-pay-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pos-pay-hint em { font-style: normal; color: var(--fg); font-weight: 600; }

.pos-pay-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
  display: block;
}

/* BUG-002 fix: POS topbar cross-app nav. Same shape as .inv-nav on every
   other dashboard. Lives in the center column of the POS topbar. */
.pos-topbar__nav {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-subtle, rgba(0,0,0,0.04));
  padding: 4px;
  border-radius: 8px;
  margin-right: 14px;
}
.pos-topbar__nav a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #777);
  text-decoration: none;
  border-radius: 6px;
}
.pos-topbar__nav a[aria-current="page"] {
  background: var(--bg-elevated, #fff);
  color: var(--fg, #000);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.pos-topbar__nav a:hover:not([aria-current="page"]) { color: var(--fg, #000); }

/* BUG-007: split-tender controls. Collapsed by default — most sales don't
   need it — but always reachable from inside the payment modal. */
.pos-pay-split {
  margin: 12px 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}
.pos-pay-split summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
  list-style: none;
}
.pos-pay-split summary::-webkit-details-marker { display: none; }
.pos-pay-split summary::before {
  content: "+ ";
  font-family: var(--font-heading, monospace);
  color: var(--muted);
}
.pos-pay-split[open] summary::before { content: "− "; }

.pos-pay-split-history {
  list-style: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 10px;
  font-size: 13px;
}
.pos-pay-split-history li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 0;
  font-weight: 600;
}
.pos-pay-split-history li + li { border-top: 1px solid rgba(34,197,94,0.15); }
.pos-pay-split-history .pos-tab-amt { font-family: var(--font-tabular, monospace); }

/* Account-pay pane */

.pos-account-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.pos-account-results:empty { display: none; }

.pos-account-result {
  appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.pos-account-result:hover { background: var(--bg-subtle); }
.pos-account-result.is-selected {
  border-color: var(--accent);
  background: var(--bg-subtle);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.pos-account-result__name {
  font-family: var(--font-tabular);
  font-weight: 600;
  font-size: 14px;
}

.pos-account-result__meta {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.pos-account-result__balance {
  font-family: var(--font-tabular);
  font-size: 13px;
  align-self: center;
}

.pos-account-result__balance--due  { color: var(--amber-ink);}
.pos-account-result__balance--ok   { color: var(--muted); }
.pos-account-result__balance--hold { color: var(--red-ink);font-weight: 600; }

.pos-account-summary {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 13px;
  font-family: var(--font-tabular);
}

.pos-account-summary[data-state="over-limit"] {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red-ink);
}

.pos-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  background: var(--fg);
  color: var(--bg-elevated);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: pos-toast-in 200ms ease;
  z-index: 999;
}

@keyframes pos-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive — POS works on phone, tablet, and desktop ───────────
   Layout rules:
     ≥1024px  desktop:  3-column grid (search | cart | actions)
     768-1023 tablet:   2-column grid (search | cart), actions become a
                        sticky row at the bottom of the cart pane
     <768px   mobile:   1-column stack, sections collapse, actions become
                        a fixed bottom action bar, search results scroll
                        inside the search pane
   The cashier-strip / online pill / agent-toggle hide first on narrow
   widths; the brand mark + module nav stay so the user can navigate. */

/* TABLET — 2-column with sticky actions row */
@media (max-width: 1023px) {
  .pos-workspace { grid-template-columns: 1fr 1.4fr; }
  .pos-pane--actions {
    /* Move actions out of the right column and into the cart's bottom edge
       as a horizontal sticky bar so the cashier doesn't lose the primary CTA. */
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    position: sticky;
    bottom: 0;
    background: var(--bg-elevated);
    z-index: 20;
  }
  .pos-pane--actions > .pos-btn--lg { flex: 1 1 220px; }
  /* Hide the per-button help text on tablet — buttons are self-explanatory
     after one use, and the help bloats the action row to ~250px tall. */
  .pos-pane--actions > .pos-action-help { display: none; }

  /* Compact topbar — drop the cashier strip + online pill so the brand,
     nav, and ⌘K agent toggle still fit on a Surface / iPad mini. */
  .pos-cashier-strip { display: none; }
  .pos-online-pill { display: none; }
  .pos-topbar__nav { margin-right: 0; overflow-x: auto; max-width: 100%; }
  .pos-topbar__nav::-webkit-scrollbar { height: 0; }
}

/* MOBILE — single column, sections stack, actions become a fixed bottom bar */
@media (max-width: 767px) {
  :root { --pos-action-w: 100%; }

  .pos-workspace {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  /* Topbar gets compact: hide the agent label + ⌘K kbd, leave the icon
     button only so the topbar height doesn't blow up. The nav stays —
     scrolls horizontally if 7 items don't fit. */
  .pos-topbar {
    height: auto;               /* allow taller wrap if needed */
    min-height: 48px;
    padding: 6px 10px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .pos-topbar__left { min-width: 0; flex: 0 1 auto; gap: 6px; }
  .pos-brand__logo { height: 24px; }
  .pos-brand__divider { display: none; }
  .pos-brand__customer { font-size: 12px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pos-topbar__center {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow: hidden;
  }
  .pos-topbar__nav a { padding: 6px 10px; font-size: 13px; }
  .pos-topbar__right { gap: 6px; flex: 0 0 auto; }
  .pos-topbar__right > .pos-btn span { display: none; }
  .pos-topbar__right > .pos-btn kbd { display: none; }
  .pos-topbar__right > .pos-btn { padding: 6px 8px; }

  /* Search pane caps height so the cart is reachable below it without
     scrolling forever. ~38vh leaves enough room for cart-lines preview. */
  .pos-pane--search {
    max-height: 42vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pos-search { padding: 12px; }
  .pos-search__input { height: 44px; font-size: 16px; /* prevents iOS zoom */ }
  .pos-search__icon { left: 24px; }
  .pos-search__hint { padding: 0 12px 8px; }
  .pos-search-results { flex: 1 1 auto; overflow-y: auto; }

  /* Cart pane: header + step bar collapse for breathing room. */
  .pos-cart-header { padding: 12px; min-width: 0; }
  .pos-cart-header__title { font-size: 15px; }
  .pos-stepbar {
    overflow-x: auto;
    padding: 8px 12px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }
  .pos-stepbar::-webkit-scrollbar { height: 0; }
  .pos-stepbar__label { font-size: 11px; }
  .pos-cart-lines { padding: 8px 10px; min-width: 0; overflow-x: hidden; }
  .pos-cart-footer { min-width: 0; }
  /* Cart line row layout — force it to fit a 375px column.
     The default desktop layout uses a wide grid; on phone we stack the
     description above the qty-stepper + actions so nothing wraps weirdly. */
  .pos-line {
    grid-template-columns: 1fr auto !important;
    grid-auto-flow: row;
    gap: 6px 8px;
    min-width: 0;
  }
  .pos-line__desc, .pos-line__sku { min-width: 0; overflow-wrap: anywhere; }

  /* Actions pane: pinned to viewport bottom so primary CTA is reachable
     without scrolling, no matter how long the cart gets. iOS-safe inset. */
  .pos-pane--actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px env(safe-area-inset-bottom, 10px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
    z-index: 25;
  }
  /* flex-basis must be auto here: chrome.css keeps this pane column-direction
     on phones, so the tablet row-basis (flex: 1 1 220px) would become a 220px
     BUTTON HEIGHT — the giant-oval CTA bug. */
  .pos-pane--actions > .pos-btn--lg { font-size: 15px; min-height: 48px; flex: 0 0 auto; }
  .pos-pane--actions > .pos-action-help { display: none; }

  /* Make room at the bottom of the cart so the fixed action bar (4 stacked
     buttons ≈ 230px tall) doesn't cover the last line / totals. */
  .pos-pane--cart { padding-bottom: 240px; }

  /* Payment modal: full-screen on mobile so the keypad has room and the
     keyboard doesn't push the Charge button below the fold. */
  .pos-modal__panel {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }
  .pos-modal__head { padding: 12px 14px; }
  .pos-modal__body { padding: 12px 14px; flex: 1 1 auto; overflow-y: auto; }
  .pos-modal__foot { padding: 12px 14px env(safe-area-inset-bottom, 12px); }

  /* Cart line touch targets — qty stepper buttons grow to 36px minimum. */
  .pos-line__qty-dec, .pos-line__qty-inc {
    min-width: 36px; min-height: 36px;
  }
  .pos-line__discount-btn, .pos-line__remove {
    min-height: 32px; padding: 6px 10px;
  }

  /* Home dashboard cards stack 1-up instead of 2x2. */
  .pos-home-grid { grid-template-columns: 1fr !important; }

  /* Quick-action rail buttons stack vertically with more breathing room. */
  .pos-quick-rail { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}

/* ── Day-1+ retrofit pass 3: kill all the sub-7 patterns ──────────── */

/* Search field always-visible format hint */
.pos-search__hint {
  display: block;
  padding: 6px 16px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.pos-search__hint strong { color: var(--fg); }
.pos-search__hint em { font-style: normal; background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px; font-family: var(--font-tabular, monospace); }

/* Action panel inline help under every button */
.pos-action-help {
  display: block;
  padding: 4px 4px 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: -4px;
}
.pos-action-help strong { color: var(--fg); }
.pos-action-help--danger strong { color: var(--red-ink);}

/* Rich empty state for the cart center: turn the "dead screen" into a
   working dashboard with today's totals + recent sales */
.pos-empty--rich {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  height: 100%;
  overflow-y: auto;
}

.pos-home-card {
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos-home-card__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.pos-home-card__big {
  font-family: var(--font-tabular, monospace);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
}
.pos-home-card__sub {
  font-size: 11px;
  color: var(--muted);
}

.pos-home-card--cta {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #2255ff) 6%, transparent), transparent);
  border-color: color-mix(in srgb, var(--accent, #2255ff) 18%, var(--border));
  text-align: center;
  padding: 24px;
}
.pos-home-card--cta .pos-empty__title {
  font-family: var(--font-heading, inherit);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--fg);
}
.pos-home-card--cta .pos-empty__hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.pos-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .pos-home-grid { grid-template-columns: repeat(2, 1fr); }
}

.pos-home-recent {
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.pos-home-recent__title {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.pos-home-recent__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-home-recent__row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.pos-home-recent__row:last-child { border-bottom: 0; }
.pos-home-recent__row span:first-child { color: var(--muted); font-family: var(--font-tabular, monospace); font-size: 12px; }
.pos-home-recent__row strong { font-family: var(--font-tabular, monospace); }

/* Line item polish: description-as-title, SKU as small badge */
.pos-line__title { font-size: 15px; font-weight: 600; color: var(--fg); }
.pos-line__sku-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 11px;
  font-family: var(--font-tabular, monospace);
  background: var(--bg-subtle);
  color: var(--muted);
  border-radius: 4px;
  vertical-align: middle;
}
.pos-line__discount-btn,
.pos-line__remove {
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  /* Earlier .pos-line__actions button rule pins width/height to 28px (icon-
     button era). Without overriding both explicitly, "Discount" / "Remove"
     overflow the 28px box. min-width/min-height: auto is not enough — the
     fixed `width: 28px` still wins. */
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  min-height: auto !important;
  white-space: nowrap;
  cursor: pointer;
}
.pos-line__discount-btn:hover { color: var(--fg) !important; border-color: var(--fg) !important; }
.pos-line__remove:hover { color: var(--red) !important; border-color: var(--red) !important; }

/* ════════════════════════════════════════════════════════════════════
   2026-06-10 keyboard-first counter retrofit (GAP-04/05/06/12/21/32).
   Additive block — appended so earlier rules (incl. recent cores/multi-
   store work) stay byte-identical above this line.
   ════════════════════════════════════════════════════════════════════ */

/* ── Hotkey rail (GAP-04) ─────────────────────────────────────────── */

.pos-keybar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.pos-keybar__chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.pos-keybar__chip:hover { background: var(--bg-subtle); color: var(--fg); }
.pos-keybar__chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Shortcut help overlay ────────────────────────────────────────── */

.pos-keyhelp { width: min(460px, calc(100vw - 32px)); }

.pos-keyhelp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.pos-keyhelp-row:last-child { border-bottom: 0; }

/* ── Search result rows: wrapper + secondary actions (GAP-05/06) ──── */
/* .pos-result is now a DIV wrapper (option row); the original grid
   layout moved onto the full-width add button inside it. */

.pos-result {
  display: block;
  padding: 0;
  cursor: default;
}

.pos-result__add {
  appearance: none;
  background: transparent;
  border: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: inherit;
  text-align: left;
  border-radius: inherit;
}

.pos-result__add:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.pos-result__actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
}

.pos-result__act {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.pos-result__act:hover { background: var(--bg-subtle); color: var(--fg); }
.pos-result__act:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.pos-result__alias {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--blue, #3b82f6) 14%, transparent);
  color: var(--blue, #2563eb);
  font-size: 10px;
  font-family: var(--font-tabular, monospace);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

/* Parsed-shorthand chips: '24x …' qty prefix + 'WGR 1234' line boost */

.pos-search-chips { display: flex; gap: 6px; padding: 2px 4px 6px; }

.pos-search-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--fg);
  font-size: 11px;
  font-family: var(--font-tabular, monospace);
}

/* ── Typed line qty (GAP-12) ──────────────────────────────────────── */

.pos-line__qty-input {
  width: 42px;
  text-align: center;
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  border: 0;
  background: transparent;
  color: var(--fg);
  padding: 2px 0;
}

.pos-line__qty-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: 4px;
}

/* O/S/B-O chip — Ordered / Shipped / Back-ordered split on a line */

.pos-line__bo-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: var(--amber-ink, #92400e);
  font-family: var(--font-tabular, monospace);
  font-size: 11px;
  white-space: nowrap;
}

/* Selected line (F6 target) */

.pos-line--selected { background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* Details toggle shares the discount/remove pill look */

.pos-line__detail-btn {
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  min-height: auto !important;
  white-space: nowrap;
  cursor: pointer;
}

.pos-line__detail-btn:hover { color: var(--fg) !important; border-color: var(--fg) !important; }

.pos-line__actions { flex-wrap: wrap; }

/* ── Line detail row (GAP-21) ─────────────────────────────────────── */

.pos-line-detail {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.pos-line-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 16px;
  margin-bottom: 10px;
}

.pos-line-detail__cell { display: flex; flex-direction: column; gap: 2px; }

.pos-line-detail__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pos-line-detail__value {
  font-size: 13px;
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
}

.pos-line-detail__reveal {
  appearance: none;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-full);
  padding: 1px 10px;
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.pos-line-detail__reveal:hover { color: var(--fg); border-color: var(--fg); }

.pos-line-detail__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Per-store stock panel + Check-Whse (GAP-05) ──────────────────── */

.pos-stock-panel__inner { width: min(520px, calc(100vw - 32px)); }

.pos-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.pos-stock-row--out { color: var(--muted); }
.pos-stock-row--held { color: var(--muted); font-style: italic; }

.pos-stock-row--total {
  border-bottom: 0;
  border-top: 2px solid var(--border-strong);
  font-weight: 700;
}

.pos-stock-row__meta {
  font-family: var(--font-tabular);
  font-size: 12px;
  color: var(--muted);
}

.pos-stock-whse { margin-top: 14px; }
.pos-stock-whse > button { width: 100%; }
.pos-stock-disclosure { display: block; margin-top: 8px; }

/* ── Lost-sale decline dialog (GAP-06) ────────────────────────────── */

.pos-lostsale-panel { width: min(460px, calc(100vw - 32px)); }

.pos-lostsale-reasons {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pos-lostsale-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.pos-lostsale-reason:hover { background: var(--bg-subtle); }
.pos-lostsale-reason:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.pos-lostsale-qty input { max-width: 120px; }

/* ⌘K palette: real shortcut column (GAP-04) */

.posux-cmdk__shortcut {
  font-family: var(--font-tabular, monospace);
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
}
