/* =====================================================================
   NEXA — Polish (v44). Loaded after style.css and motion.css.
   Nothing here adds a new colour: it uses the existing tokens, so the
   violet stays rationed to the active state and the shop's own accent.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Spacing rhythm
   The stylesheet had grown 20+ distinct paddings (7, 9, 11, 13 px…), so
   neighbouring cards sat a hair apart from each other without any intent.
   Everything structural now steps along one scale.
   --------------------------------------------------------------------- */
:root {
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
}
.view-head { margin-bottom: var(--sp-5); gap: var(--sp-3); }
.card { padding: var(--sp-5); margin-bottom: var(--sp-4); }
.card h3 { margin-bottom: var(--sp-4); }
.inline-form { gap: var(--sp-3); }
.inline-form .row { gap: var(--sp-3); }
.emp-list { gap: var(--sp-2); }
.emp-list li { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
@media (max-width: 640px) {
  .card { padding: var(--sp-4); }
  .view-head { margin-bottom: var(--sp-4); }
}

/* ---------------------------------------------------------------------
   2. Icons
   One stroke weight, sized to the surrounding text, coloured by it.
   --------------------------------------------------------------------- */
svg.ic {
  width: 1.1em; height: 1.1em; flex: none;
  vertical-align: -0.2em;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
/* Space between an icon and its label — but not on an icon-only button. */
svg.ic:not(:only-child) { margin-inline-end: 0.4em; }

.nx-dot {
  display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%;
  margin-inline-end: 0.45em; vertical-align: 0.02em; background: var(--ink-dim);
}
.nx-dot.ok { background: var(--ok); }
.nx-dot.bad { background: var(--danger); }
.nx-dot.warn { background: #d9a441; }

/* ---------------------------------------------------------------------
   3. Feedback: progress bar + busy button
   --------------------------------------------------------------------- */
#nxProgress {
  position: fixed; inset-block-start: 0; inset-inline: 0; height: 2px; z-index: 300;
  background: var(--copper); transform-origin: left center; opacity: 0;
  transform: scaleX(0); pointer-events: none;
}
[dir="rtl"] #nxProgress, :root[dir="rtl"] #nxProgress { transform-origin: right center; }
#nxProgress.on { opacity: 1; animation: nx-progress 1.6s cubic-bezier(.3,.6,.4,1) infinite; }
@keyframes nx-progress {
  0%   { transform: scaleX(0.05); }
  60%  { transform: scaleX(0.75); }
  100% { transform: scaleX(0.95); }
}

button.is-busy {
  position: relative; cursor: progress; opacity: 0.8; padding-inline-end: 2.4em;
}
button.is-busy::after {
  content: ""; position: absolute; inset-inline-end: 0.9em; top: 50%;
  width: 0.95em; height: 0.95em; margin-top: -0.475em;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
  animation: nx-spin 0.7s linear infinite;
}
@keyframes nx-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   4. Toasts
   An error stays until it is dismissed: it used to vanish after six
   seconds, which is how a failed save went unnoticed. A confirmation is
   short-lived.
   --------------------------------------------------------------------- */
.nx-toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); margin: 0; font-size: 0.9rem; line-height: 1.5;
  border-inline-start: 4px solid var(--ok);
}
.nx-toast.err { border-inline-start-color: var(--danger); }
.nx-toast .nx-toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nx-toast > svg.ic { margin-inline-end: 0; margin-top: 0.2em; }
.nx-toast.ok > svg.ic { color: var(--ok); }
.nx-toast.err > svg.ic { color: var(--danger); }
.nx-toast .nx-toast-x {
  flex: none; background: none; border: 0; color: var(--ink-dim); cursor: pointer;
  padding: var(--sp-1); margin: calc(var(--sp-1) * -1); border-radius: 6px; line-height: 0;
}
.nx-toast .nx-toast-x:hover { color: var(--ink); }
.nx-toast.leaving { opacity: 0; transform: translateX(20px); transition: opacity 0.25s, transform 0.25s; }

/* ---------------------------------------------------------------------
   5. Empty states are an invitation, not a blank.
   --------------------------------------------------------------------- */
.emp-empty:not(.illustrated), .empty-hint:not(.illustrated) {
  padding: var(--sp-5) var(--sp-4); text-align: center; color: var(--ink-dim);
  border: 1px dashed var(--line); border-radius: 12px;
}

/* ---------------------------------------------------------------------
   6. Touch targets: 44px is the least a finger can hit reliably, and the
   till is a touchscreen.
   --------------------------------------------------------------------- */
@media (pointer: coarse) {
  .ghost-btn, .primary-btn, .void-btn, .choice-btn, .fc-btn { min-height: 44px; }
  .ghost-btn.small, .primary-btn.small { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  #nxProgress.on { animation: none; transform: scaleX(0.6); }
  button.is-busy::after { animation-duration: 1.6s; }
}
@media print { #nxProgress { display: none !important; } }

/* =====================================================================
   7. Design system (v44) — quiet, precise, corporate.
   The previous look used 2px ink borders and hard offset shadows on every
   control. That reads as playful; a till used all day reads better with
   hairlines, one radius family, and state shown by tone rather than by
   shadow. One colour signal (the shop's accent), everything else neutral.
   ===================================================================== */
:root {
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 16px;
  --sel-bg: color-mix(in srgb, var(--copper) 16%, var(--panel));
  --sel-ring: color-mix(in srgb, var(--copper) 60%, transparent);
}

/* --- buttons ------------------------------------------------------- */
.primary-btn {
  margin: 0; border: 0; border-radius: var(--r-md); padding: 12px 20px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--copper) 94%, #fff), color-mix(in srgb, var(--copper) 78%, #000));
  color: var(--on-accent, #fff); font-weight: 700; letter-spacing: 0; font-family: inherit; font-size: .98rem; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(0,0,0,.35);
  transition: filter .15s, transform .08s, box-shadow .15s;
}
.primary-btn:hover { transform: none; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 4px 14px -6px var(--copper); }
.primary-btn:active { transform: translateY(1px); filter: brightness(.94); box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.primary-btn:disabled { filter: grayscale(.6) brightness(.8); cursor: not-allowed; }
.ghost-btn {
  border-radius: var(--r-md); color: var(--ink); border: 1px solid var(--line);
  background: transparent; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.ghost-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink); }
.ghost-btn:active { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.void-btn, .quick-edit-btn { border-radius: var(--r-sm); }

/* --- surfaces & fields --------------------------------------------- */
.card { border-radius: var(--r-xl); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.card h3 { color: var(--ink); font-size: 1rem; font-weight: 700; display: flex; align-items: center; }
/* A short accent bar before a card title: the only mark inside the working screens. */
.card h3::before {
  content: ""; flex: none; width: 3px; height: 1em; margin-inline-end: 10px; border-radius: 2px; background: var(--copper);
}
input, select, textarea { border-radius: var(--r-md); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--copper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 24%, transparent);
}
.tag { border-radius: 999px; }

/* --- view heading ------------------------------------------------------ */
/* A hairline under every screen title with a short accent bar sitting on it.
   The bar draws in once when the screen opens. */
.view-head { position: relative; padding-bottom: 18px; }
.view-head h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.01em; }
.view-head::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--line); pointer-events: none;
}
.view-head::before {
  content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 56px; height: 3px; border-radius: 2px;
  background: var(--copper); pointer-events: none;
}
.view.active .view-head::before { animation: nx-bar 0.6s var(--ease-out, cubic-bezier(.2,.7,.2,1)) both; }
@keyframes nx-bar { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
[dir="ltr"] .view.active .view-head::before, :root[dir="ltr"] .view.active .view-head::before { animation-name: nx-bar-ltr; }
@keyframes nx-bar-ltr { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .view.active .view-head::before { animation: none; } }

/* --- POS: products -------------------------------------------------- */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.product-card { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .12s; }
.product-card:hover {
  transform: none; border-color: var(--sel-ring);
  box-shadow: 0 10px 26px -14px rgba(0,0,0,.7), 0 0 0 1px color-mix(in srgb, var(--copper) 30%, transparent);
}
.product-card:active { transform: scale(.985); }
.product-card .pname { font-size: .9rem; font-weight: 600; padding: 10px 10px 2px; line-height: 1.35; }
.product-card .pprice { color: var(--ink); font-weight: 700; font-size: .84rem; padding-bottom: 12px; }
.filter-tabs { background: transparent; border: 0; padding: 0; gap: 8px; }
.filter-tab {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: .86rem; font-weight: 600;
  color: var(--ink-dim); background: transparent; box-shadow: none;
}
.filter-tab:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.filter-tab.active { background: var(--sel-bg); border-color: var(--sel-ring); color: var(--ink); box-shadow: none; }

/* --- POS: cart ------------------------------------------------------ */
.pos-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 20px; }
.pos-cart {
  padding: 0; overflow-y: auto; border-radius: var(--r-xl);
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.pos-cart .cart-head h3 { margin: 0; font-size: 1.05rem; }
.cart-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: var(--copper); color: var(--on-accent, #fff); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.cart-context { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 0 18px; }
.cart-context select { margin: 0 0 10px; width: 100%; min-width: 0; }
.pos-cart > .pharmacy-only, .pos-cart > .edit-order-banner { margin-inline: 18px; }

.cart-items {
  gap: 0; margin: 0; padding: 4px 18px; min-height: 96px;
  max-height: 36vh; overflow-y: auto; flex-shrink: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cart-items .empty-hint { border: 0; padding: 22px 8px; }
.cart-row { padding: 12px 0; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row .cr-info { flex: 1; min-width: 0; gap: 3px; }
.cart-row .cr-name { font-size: .92rem; font-weight: 600; line-height: 1.35; }
.cart-row .cr-price { font-size: .8rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.cart-row .qty-controls {
  display: inline-flex; align-items: center; gap: 0; flex: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg);
}
.cart-row .qty-controls button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; font-size: 1.05rem; line-height: 1; }
.cart-row .qty-controls button:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.cart-row .qty-controls span { min-width: 26px; text-align: center; font-weight: 800; font-size: .92rem; font-variant-numeric: tabular-nums; }
.cart-row .qty-controls .cr-remove { margin-inline-start: 2px; color: var(--ink-dim); }
.cart-row .qty-controls .cr-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); border: 0; }
@media (pointer: coarse) { .cart-row .qty-controls button { width: 40px; height: 40px; } }

.cart-foot { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.cart-summary { border-top: 0; padding-top: 0; margin-top: 0; }
.cart-summary > label { display: block; margin-bottom: 6px; }
.cart-summary input { margin: 0 0 10px; }
.cart-summary .row input[type=number] { height: 40px; margin: 0; }
.cart-line { padding: 5px 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.cart-line.total {
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 1.4rem; font-weight: 800; align-items: baseline;
}
.cart-line.total span:first-child { font-size: .95rem; font-weight: 700; }

.cart-section { display: flex; flex-direction: column; gap: 8px; }
.cart-section-title { font-size: .76rem; font-weight: 700; color: var(--ink-dim); }

/* Segmented control: order type and payment method. */
.choice-row, .pay-methods {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 3px;
}
.choice-btn {
  min-width: 0; padding: 9px 4px; border: 0; border-radius: 11px; background: transparent;
  color: var(--ink-dim); font-size: .8rem; font-weight: 600; line-height: 1.25; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.choice-btn svg.ic { margin: 0; width: 1.25em; height: 1.25em; }
.choice-btn:hover { color: var(--ink); border-color: transparent; }
.choice-btn.selected { background: var(--sel-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sel-ring); }
.pay-methods label { position: relative; display: block; margin: 0; }
.pay-methods input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pay-methods span {
  display: block; padding: 10px 4px; border-radius: 11px; text-align: center;
  font-size: .82rem; font-weight: 600; color: var(--ink-dim); transition: background .15s, color .15s;
}
.pay-methods input:checked + span { background: var(--sel-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sel-ring); }
.pay-methods input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: 1px; }

.platform-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.platform-chip {
  padding: 11px 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: transparent;
  color: var(--ink); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.platform-chip:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.platform-chip.selected { background: var(--sel-bg); border-color: var(--sel-ring); }
.platform-note { margin: 0; text-align: start; }

.pos-cart #checkoutBtn {
  margin-top: 0; padding: 15px; font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 8px var(--panel), 0 -14px 14px -6px var(--panel);
}
.pos-cart .ghost-btn.full { margin-top: 0; }
.pos-cart .form-error { margin: 0; }
@media (max-width: 820px) {
  .pos-grid { grid-template-columns: 1fr; }
  .cart-items { max-height: none; }
}

/* --- settings rows & report tables ---------------------------------- */
.platform-set-list { margin-bottom: 14px; }
.platform-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.platform-set-row:last-child { border-bottom: 0; }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; cursor: pointer; }
.pf-pct { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .82rem; color: var(--ink-dim); }
.pf-pct input { width: 90px; margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.data-table th { text-align: start; padding: 10px 14px; font-weight: 600; font-size: .8rem; color: var(--ink-dim); background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.sum td { font-weight: 800; background: color-mix(in srgb, var(--ink) 4%, transparent); border-top: 1px solid var(--line); }

/* --- login: the same rule, in place of the hard shadow -------------- */
.ticket { box-shadow: 0 30px 60px -32px rgba(0,0,0,.75); border-width: 1px; border-color: var(--line); }

/* --- fixes found in the first render ---------------------------------- */
/* `display:flex` on these beats the UA's [hidden] rule, so a hidden block
   stayed on screen. */
.cart-section[hidden], .cart-foot [hidden], .platform-chips[hidden] { display: none !important; }
.cart-summary input[type="checkbox"] { width: auto; height: auto; margin: 0; flex: none; }
.cart-summary .row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cart-summary .row label { margin: 0; display: flex; align-items: center; gap: 4px; }
.pos-cart .cart-head h3 { color: var(--ink); }

/* Custom checkbox/radio look (v56) -- `accent-color` alone only tints the
   checked fill and is unevenly supported (notably incomplete in older
   Safari), leaving the unchecked box in each browser's own native style:
   different corner radius, border weight and sizing next to this site's
   otherwise fully custom, rounded, dark-themed controls. Built instead
   with `appearance: none` and drawn entirely with this site's own colors,
   so it renders identically across Chrome, Firefox and Safari alike.
   Sizing overrides declared elsewhere (e.g. .cart-summary input[type=
   "checkbox"] { width: auto }) still win via their higher specificity;
   this only sets the shared look. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  width: 20px; height: 20px; margin: 0; padding: 0; flex: none;
  border: 1.5px solid var(--line); background: var(--panel);
  display: inline-grid; place-content: center; cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px; transform: scale(0);
  transition: transform .1s ease-in-out;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: var(--on-accent, #fff);
}
input[type="radio"]::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; transform: scale(0);
  transition: transform .1s ease-in-out; background: var(--on-accent, #fff);
}
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--copper); border-color: var(--copper); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--copper); }

/* =====================================================================
   8. Sales ledger — the table style from the reference: rounded frame,
   a slightly warmer header row, hairlines in both directions, roomy rows.
   ===================================================================== */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.seg-scroll { display: flex; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-btn { border: 0; background: transparent; color: var(--ink-dim); font: inherit; font-weight: 600; font-size: .85rem; padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--sel-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sel-ring); }
.ledger-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ledger-dates { display: flex; gap: 8px; }
.ledger-dates input { margin: 0; width: auto; }
.source-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.source-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.source-tile span { font-size: .78rem; color: var(--ink-dim); }
.source-tile b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.source-tile small { font-size: .74rem; color: var(--ink-dim); }
@media (max-width: 560px) { .source-tiles { grid-template-columns: 1fr; } }

.ledger-wrap { overflow-x: auto; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 22px; background: var(--bg); }
.ledger-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.ledger-table th {
  padding: 18px 22px; text-align: start; font-weight: 600; font-size: .95rem; white-space: nowrap;
  background: color-mix(in srgb, var(--copper) 7%, var(--bg-2)); border-inline-start: 1px solid var(--line);
}
.ledger-table td { padding: 14px 22px; height: 58px; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); vertical-align: middle; }
.ledger-table th:first-child, .ledger-table td:first-child { border-inline-start: 0; }
.ledger-table tbody tr:hover td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ledger-table .lg-n { width: 84px; font-size: 1.1rem; }
.ledger-table .lg-item span { font-weight: 600; }
.ledger-table .lg-item em { font-style: normal; color: var(--ink-dim); font-weight: 600; }
.ledger-table .lg-when { white-space: nowrap; }
.ledger-table .lg-when b { display: block; font-weight: 600; }
.ledger-table .lg-when span { display: block; font-size: .8rem; color: var(--ink-dim); }
.ledger-table .lg-price, .ledger-table .lg-qty { white-space: nowrap; font-weight: 700; }
.ledger-table .lg-price small { color: var(--ink-dim); font-weight: 600; }
.src-tag { display: inline-block; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--sel-bg); box-shadow: inset 0 0 0 1px var(--sel-ring); }
#ledgerMoreBtn { margin-top: 14px; }

textarea {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-family: inherit; font-size: inherit;
  padding: 12px 14px; resize: vertical; width: 100%; box-sizing: border-box;
}

/* =====================================================================
   9. POS workspace (v48)
   The POS is a fixed two-pane workspace, not a scrolling page. Scrolling is
   allowed in exactly two places: the product list, and the cart's line
   items. Everything else — the page, the cart panel, the totals and the
   buttons — stays put. It used to have a page scrollbar, a cart-panel
   scrollbar, a line-list scrollbar and sideways overflow all at once, so a
   drag could move any of four things.
   ===================================================================== */
.app-main.is-pos { max-width: none; padding: 0; overflow: hidden; }
.app-main.is-pos #view-pos { height: 100vh; height: 100dvh; animation: none; }
.app-main.is-pos .pos-grid {
  height: 100%; gap: 0; align-items: stretch;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 400px);
  grid-template-rows: minmax(0, 1fr); /* without this the row grows with the product list and the grid never scrolls */
}

/* left pane */
.app-main.is-pos .pos-products { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 22px 0; }
.app-main.is-pos .pos-toolbar { flex: none; margin-bottom: 12px; }
.app-main.is-pos #posCategoryTabs { flex: none; margin-bottom: 14px !important; }
.app-main.is-pos #posProductGrid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; align-content: start;
  grid-auto-rows: max-content; /* rows are as tall as their card; without it the scroll container squeezes them to ~40px */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
  padding: 4px 8px 28px 8px; scrollbar-gutter: stable; overscroll-behavior: contain;
}
.app-main.is-pos .app-frame.nav-collapsed #posProductGrid,
.app-frame.nav-collapsed .app-main.is-pos #posProductGrid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }

/* Collapsing the sidebar is a deliberate "give me more room" action, but
   every non-POS view still capped at max-width: 1200px (style.css) --
   the exact width POS itself is already exempted from. The freed sidebar
   space was being wasted as empty margin instead of reaching any content:
   grids using repeat(auto-fill, ...) never got the chance to show more
   columns because their container never actually grew past the old cap.
   A wider (not unlimited, to avoid a single stretched column on an
   ultra-wide monitor) cap while collapsed fixes that everywhere at once,
   with no per-view changes needed. */
.app-frame.nav-collapsed .app-main:not(.is-pos) { max-width: 1600px; }

/* right pane: a column of three regions — head, lines (scrolls), foot (fixed) */
.app-main.is-pos .pos-cart {
  position: static; height: 100%; max-height: none; min-width: 0; margin: 0;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 0; border-width: 0 1px 0 0; border-style: solid; border-color: var(--line);
  background: var(--panel); box-shadow: none;
}
[dir="rtl"] .app-main.is-pos .pos-cart { border-width: 0 1px 0 0; }
[dir="ltr"] .app-main.is-pos .pos-cart { border-width: 0 0 0 1px; }
.app-main.is-pos .pos-cart > * { min-width: 0; }
.app-main.is-pos .cart-head { flex: none; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.app-main.is-pos .cart-context { flex: none; padding: 12px 18px 0; }
.app-main.is-pos .cart-context select { margin: 0 0 8px; }
.app-main.is-pos .pos-cart > .pharmacy-only, .app-main.is-pos .pos-cart > .edit-order-banner { flex: none; margin: 10px 18px 0; }
.app-main.is-pos .cart-items {
  flex: 1 1 0; min-height: 88px; max-height: none; margin: 0; padding: 0 18px;
  overflow-y: auto; overflow-x: hidden; border: 0; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.app-main.is-pos .cart-foot {
  flex: none; max-height: 66%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 12px 18px 16px; gap: 10px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, var(--panel));
}
.app-main.is-pos .cart-foot > * { flex: none; min-width: 0; }
.app-main.is-pos .cart-foot input:not([type=checkbox]):not([type=radio]), .app-main.is-pos .cart-foot select { width: 100%; min-width: 0; box-sizing: border-box; margin: 0; }
.app-main.is-pos .cart-foot input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; }
.app-main.is-pos .cart-foot label { display: flex; align-items: center; gap: 8px; margin: 0; }
.app-main.is-pos .cart-foot .pay-methods label { display: block; }
.app-main.is-pos .cart-summary .row { display: flex; align-items: center; gap: 10px; }
.app-main.is-pos .cart-summary .row > label { flex: none; font-size: .82rem; color: var(--ink-dim); }

/* totals block: discount on one line, then subtotal and the total */
.app-main.is-pos .cart-summary { display: flex; flex-direction: column; gap: 2px; }
.app-main.is-pos .cart-summary > label { margin: 0 0 4px; font-size: .78rem; color: var(--ink-dim); }
.app-main.is-pos .cart-summary .row { margin: 0 0 6px; }
.app-main.is-pos .cart-summary .row input[type=number] { flex: 1; width: auto; height: 38px; }
.app-main.is-pos .cart-line.total { margin-top: 4px; padding-top: 10px; }

/* sections: the segmented controls name themselves, so their titles go */
.app-main.is-pos .cart-foot .cart-section { gap: 6px; }
.app-main.is-pos #orderTypeChoices { margin: 0; }
.app-main.is-pos .cart-foot .cart-section > .cart-section-title { display: none; }
.app-main.is-pos #deliveryInfoBlock > .cart-section-title, .app-main.is-pos #platformInfoBlock > .cart-section-title { display: block; }
.app-main.is-pos .cart-foot input[type="text"], .app-main.is-pos .cart-foot input[type="tel"] { height: 40px; }

.app-main.is-pos #checkoutBtn {
  position: static; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); padding: 14px; font-size: 1.05rem; margin: 2px 0 0;
}
.cart-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.cart-actions:empty { display: none; }
.cart-actions .ghost-btn { margin: 0; width: 100%; padding: 9px 8px; font-size: .84rem; }
.app-main.is-pos .cart-foot .form-error { margin: 0; }

/* short laptop screens (≈1366×768 with browser chrome leaves ~650px): tighten
   vertical rhythm so the line list keeps room, instead of scrolling the foot */
@media (max-height: 760px) {
  .app-main.is-pos .cart-head { padding: 10px 16px 8px; }
  .app-main.is-pos .cart-foot { padding: 8px 16px 12px; gap: 8px; }
  .app-main.is-pos .choice-btn { flex-direction: row; justify-content: center; gap: 6px; padding: 8px 4px; font-size: .78rem; }
  .app-main.is-pos .choice-btn svg.ic { width: 1.05em; height: 1.05em; }
  .app-main.is-pos .cart-line { padding: 2px 0; }
  .app-main.is-pos .cart-line.total { font-size: 1.25rem; padding-top: 6px; }
  .app-main.is-pos #checkoutBtn { padding: 11px; }
  .app-main.is-pos .cart-summary > label { display: none; }
  .app-main.is-pos .cart-row { padding: 8px 0; }
}

/* phones: stack. The page scrolls (one scrollbar), nothing nested. */
@media (max-width: 640px) {
  .app-main.is-pos { overflow-y: auto; }
  .app-main.is-pos #view-pos, .app-main.is-pos .pos-grid { height: auto; }
  .app-main.is-pos .pos-grid { grid-template-columns: 1fr; }
  .app-main.is-pos .pos-products { padding: 14px 14px 0; }
  .app-main.is-pos #posProductGrid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .app-main.is-pos .pos-cart { height: auto; border-width: 1px 0 0; overflow: visible; }
  .app-main.is-pos .cart-items { flex: none; overflow: visible; min-height: 64px; }
  .app-main.is-pos .cart-foot { max-height: none; overflow: visible; }
}

.cart-context[hidden] { display: none !important; }

/* --- the toggle must not sit on top of the POS search field -------------- */
.app-main.is-pos .pos-toolbar { padding-inline-start: 52px; }

/* =====================================================================
   10. Narrow screens (≤820px): the navigation is a drawer.
   It used to be a wrapped row of pills stacked above the page — up to 40% of
   the screen height, so on a portrait tablet the POS started a third of the
   way down and the checkout button was off-screen. A drawer costs no height:
   the workspace gets the whole screen, and navigation is one tap away.
   ===================================================================== */
@media (max-width: 820px) {
  .app-frame, .app-frame.nav-collapsed { grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
  .app-main { height: 100vh; height: 100dvh; overflow-y: auto; padding: 62px 14px 40px; max-width: none; }
  .side-nav, .app-frame.nav-collapsed .side-nav {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70;
    width: min(320px, 86vw); height: 100vh; height: 100dvh; max-height: none;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 18px;
    padding: 64px 16px 22px; overflow-y: auto; opacity: 1; pointer-events: auto;
    border-inline-end: 1px solid var(--line); box-shadow: 0 0 60px rgba(0,0,0,.6);
    transform: translateX(-104%); transition: transform .25s cubic-bezier(.2,.7,.2,1);
  }
  [dir="rtl"] .side-nav, [dir="rtl"] .app-frame.nav-collapsed .side-nav { transform: translateX(104%); }
  .app-frame.nav-open .side-nav, [dir="rtl"] .app-frame.nav-open .side-nav { transform: none; }
  .side-nav nav { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
  .side-nav .nav-item { flex: none; font-size: .95rem; padding: 12px; border-radius: 10px; background: transparent; border-inline-start: 3px solid transparent; }
  .side-nav .nav-item svg { display: block; }
  .side-nav .nav-item.active { background: color-mix(in srgb, var(--copper) 15%, transparent); color: var(--copper); border-inline-start-color: var(--copper); }
  .nav-group-label { display: block; }
  .side-nav-toggle { display: flex; z-index: 80; }
  .nx-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app-frame.nav-open ~ .nx-scrim, .nx-scrim.on { opacity: 1; pointer-events: auto; }
  /* POS keeps its fixed workspace (products | cart) down to 641px */
  .app-main.is-pos { padding: 0; overflow: hidden; }
  .app-main.is-pos .pos-toolbar { padding-inline-start: 52px; }
  .app-main.is-pos .pos-grid { grid-template-columns: minmax(0, 1fr) clamp(290px, 42vw, 340px); }
}
@media (max-width: 640px) {
  .app-main.is-pos { overflow-y: auto; }
  .app-main.is-pos .pos-toolbar { padding-top: 6px; }
  .app-main.is-pos .pos-products { padding-top: 12px; }
}

/* phone performance: drop the costly glass blur on notifications (the app uses this same page) */
@media (max-width: 820px) { .nx-notify { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--panel) !important; } }

/* --- receipt logo settings + preview ------------------------------------ */
.receipt-logo-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.receipt-logo-preview {
  width: 120px; height: 120px; flex: none; display: grid; place-items: center; overflow: hidden;
  border: 1px dashed var(--line); border-radius: 16px; background: #fff; color: #888; font-size: .8rem;
}
.receipt-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.receipt-logo-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 220px; }
.receipt-logo-actions input[type=file] { margin: 0; max-width: 100%; }
.receipt-logo-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.receipt-preview { max-width: 380px; width: calc(100% - 32px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 14px; background: var(--panel); border-radius: 18px; }
.receipt-preview img { display: block; width: 100%; background: #fff; border-radius: 6px; margin-bottom: 12px; }

/* --- integrity list --------------------------------------------------------- */
.integrity-ok { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; }
.integrity-list li { align-items: flex-start; gap: 12px; }
.integrity-list .nx-dot { margin-top: .5em; flex: none; }
.integrity-list .order-row-meta { display: block; line-height: 1.6; }

/* --- suppliers / debts summary ---------------------------------------------- */
.source-tile.tile-owe b { color: var(--danger); }
.source-tile.tile-credit b { color: var(--ok); }
.supplier-row { cursor: pointer; gap: 14px; }
.supplier-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.supplier-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.share-bar { display: block; height: 4px; max-width: 220px; border-radius: 999px; background: color-mix(in srgb, var(--danger) 16%, transparent); overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--danger); border-radius: 999px; }

/* =====================================================================
   11. Super admin (v49)
   ===================================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); }
.kpi > span { font-size: .8rem; color: var(--ink-dim); font-weight: 600; }
.kpi > b { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { font-size: .76rem; color: var(--ink-dim); }
.kpi.kpi-alert { cursor: pointer; border-color: var(--sel-ring); background: var(--sel-bg); }
.delta.up { color: var(--ok); font-weight: 700; } .delta.down { color: var(--danger); font-weight: 700; }
.dash-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-insights .card { margin: 0; }
.dash-section-title { margin: 8px 0 12px; font-size: .95rem; color: var(--ink-dim); font-weight: 700; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .78rem; color: var(--ink-dim); }
.bar-col i { display: block; width: 100%; max-width: 44px; min-height: 3px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--copper) 92%, #fff), color-mix(in srgb, var(--copper) 70%, #000)); }
.bar-col b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: 84px 1fr 34px; align-items: center; gap: 10px; padding: 6px 0; font-size: .86rem; }
.hbar > div { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.hbar > div i { display: block; height: 100%; border-radius: 999px; background: var(--copper); }
.hbar b { text-align: end; font-variant-numeric: tabular-nums; }
.insight-list li.clickable { cursor: pointer; }
.insight-list li.clickable:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.insight-right { flex: none; font-variant-numeric: tabular-nums; }
.shop-link { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--line); }
.shop-link:hover { border-bottom-color: var(--copper); color: var(--copper); }
.shop-meta-row.idle-warn { color: var(--danger); }
.shops-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shops-toolbar select { width: auto; min-width: 170px; margin: 0; }
.shop-detail-box { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 20px; background: var(--panel); border-radius: 20px; }
.shop-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shop-detail-head h3 { margin: 0; font-size: 1.2rem; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.fact span { font-size: .74rem; color: var(--ink-dim); }
.fact b { font-size: .92rem; overflow-wrap: anywhere; }
.fact small { font-weight: 500; color: var(--ink-dim); }
.detail-label { display: block; margin: 14px 0 6px; font-size: .8rem; font-weight: 700; color: var(--ink-dim); }
.detail-actions { margin-top: 8px; }
.activity-mini { max-height: 220px; overflow-y: auto; }

/* two-line list entries: name, then a quieter detail line */
.emp-list .order-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.emp-list .order-row-main > b { font-weight: 700; }
.card > .form-note { margin-bottom: 12px; }
/* the sidebar toggle sits over the brand corner; leave its space free */
.side-nav .side-brand { padding-inline-start: 50px; }
@media (max-width: 820px) { .side-nav .side-brand { padding-inline-start: 0; } }
.supplier-totals { margin-bottom: 16px; }
.supplier-totals .source-tile { padding: 16px 18px; }
.supplier-totals .source-tile b { font-size: 1.4rem; }

/* =====================================================================
   12. Edit / delete / archive (v50)
   ===================================================================== */
.row-actions { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.row-tail { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.row-act {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink-dim); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.row-act:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.row-act.danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.row-act svg.ic { margin: 0; width: 1rem; height: 1rem; }
@media (pointer: coarse) { .row-act { width: 40px; height: 40px; } }
.emp-list li.is-archived { opacity: .6; }
.list-toggle { justify-content: center; border: 0 !important; background: none !important; padding: 6px 0 !important; }
.link-btn { background: none; border: 0; padding: 6px 4px; color: var(--ink-dim); font: inherit; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

.entity-overlay { z-index: 120; }
.entity-dialog {
  width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8);
}
.entity-dialog h3 { margin: 0 0 14px; font-size: 1.15rem; color: var(--ink); }
.entity-dialog h3::before { display: none; }
.entity-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 14px; }
.ef { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ef > span { font-size: .8rem; font-weight: 600; color: var(--ink-dim); }
.ef input:not([type=checkbox]), .ef select, .ef textarea { width: 100%; margin: 0; box-sizing: border-box; }
.ef small { font-size: .74rem; color: var(--ink-dim); }
.ef-check { flex-direction: row; align-items: center; gap: 10px; grid-column: 1 / -1; }
.ef-check span { color: var(--ink); font-size: .9rem; }
.ef-wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .entity-fields { grid-template-columns: 1fr; } }
.entity-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.entity-actions .primary-btn { flex: 1 1 140px; margin: 0; }
.entity-actions .ghost-btn { flex: 0 0 auto; margin: 0; }
.entity-actions .danger-btn { margin-inline-start: auto; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.entity-actions .danger-btn:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.entity-error { margin: 0 0 12px; }
/* The confirm/prompt dialogs open ON TOP of the edit dialog (delete asks "are you sure?") */
#appConfirmModal, #appPromptModal { z-index: 140; }

/* =====================================================================
   13. Password reveal + grouped numbers (v51)
   ===================================================================== */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; margin: 0; box-sizing: border-box; padding-inline-end: 46px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: none; border: 0; border-radius: 9px; color: var(--ink-dim); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pw-toggle:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; }
.pw-toggle svg.ic { margin: 0; width: 1.15rem; height: 1.15rem; }
input.nx-num { font-variant-numeric: tabular-nums; }
.app-main.is-pos .cart-summary .row input.nx-num { flex: 1; width: auto; height: 38px; }

/* =====================================================================
   14. Inventory tabs, count sheet, stock badges (v52)
   ===================================================================== */
[data-inv-hide] { display: none !important; }
.inv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.inv-bar .seg-scroll { margin: 0; max-width: 100%; }
.inv-toolbar { display: flex; gap: 8px; }
.inv-toolbar .ghost-btn.active { background: var(--sel-bg); border-color: var(--sel-ring); }
.count-sheet { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.count-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.count-row:last-child { border-bottom: 0; }
.count-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.count-name small { color: var(--ink-dim); font-size: .76rem; }
.count-input { margin: 0 !important; height: 40px; text-align: center; font-weight: 700; }
.count-diff { font-size: .84rem; font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.count-diff.ok { color: var(--ok); } .count-diff.neg { color: var(--danger); } .count-diff.pos { color: #d9a441; }
.count-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 2px 14px; font-size: .9rem; color: var(--ink-dim); }
.count-summary b { color: var(--ink); font-variant-numeric: tabular-nums; }
.count-summary .neg b { color: var(--danger); }
@media (max-width: 520px) { .count-row { grid-template-columns: minmax(0, 1fr) 96px; } .count-diff { grid-column: 1 / -1; text-align: start; } }
.integrity-ok.warn { margin-bottom: 12px; align-items: flex-start; }
.stock-badge { position: absolute; z-index: 3; inset-block-start: 8px; inset-inline-end: 8px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.4; }
.stock-badge.out { background: var(--danger); color: #fff; }
.stock-badge.low { background: #d9a441; color: #1a1300; }
.product-card { position: relative; }
.inv-flat { display: contents; }

/* --- staff screens: shared bar + one job per tab (v52) ------------------------- */
[data-vtab-hide] { display: none !important; }
.staff-nav, .view-tabs { margin-bottom: 14px; max-width: 100%; }
.staff-nav .seg-btn { font-weight: 700; }
.view-tabs { background: transparent; border-color: transparent; padding: 0; gap: 6px; }
.view-tabs .seg-btn { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.view-tabs .seg-btn.active { border-color: var(--sel-ring); }
.ledger-table tr.sum td { font-weight: 800; background: color-mix(in srgb, var(--ink) 4%, transparent); }

/* inventory row: quantity and status on one side, the four actions grouped together */
.inv-row-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.inv-row-side .stock-qty { margin-inline-end: auto; }
.inv-row-side .edit-item-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: 0; flex: none;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink-dim);
}
.inv-row-side .edit-item-btn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.inv-row-side .edit-item-btn svg { margin: 0; width: 1rem; height: 1rem; }

/* =====================================================================
   15. Appearance picker (v53)
   ===================================================================== */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-bottom: 18px; }
.skin-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); text-align: center; transition: border-color .15s, transform .12s; }
.skin-card:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.skin-card.selected { border-color: var(--accent, var(--copper)); box-shadow: 0 0 0 1px var(--accent, var(--copper)); }
.skin-card:active { transform: scale(.98); }
.skin-mock { position: relative; display: block; height: 66px; border: 1px solid; border-radius: 10px; overflow: hidden; }
.skin-mock i { position: absolute; inset: 22px 8px 8px; border-radius: 6px; }
.skin-mock b { position: absolute; inset-inline-end: 8px; top: 7px; width: 34px; height: 8px; border-radius: 4px; }
.skin-mock em { position: absolute; inset-inline-start: 8px; top: 7px; width: 22px; height: 8px; border-radius: 4px; opacity: .9; }
.skin-mock u { position: absolute; inset-inline-start: 16px; bottom: 16px; width: 44px; height: 5px; border-radius: 3px; opacity: .7; }
.skin-name { font-size: .8rem; font-weight: 700; }
.ap-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ap-row > label { min-width: 120px; font-size: .84rem; color: var(--ink-dim); font-weight: 600; margin: 0; }
.ap-row input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 10px; margin: 0; cursor: pointer; }
.ap-row #apAccentHex { width: 110px; margin: 0; text-align: center; }

/* =====================================================================
   16. Notifications (v53) — translucent glass card, spring entrance
   ===================================================================== */
#nxNotifyStack { position: fixed; z-index: 200; inset-block-start: 14px; inset-inline-end: 14px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.nx-notify {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; overflow: hidden; pointer-events: auto; cursor: pointer;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 24px 50px -22px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06);
  animation: nx-in .5s cubic-bezier(.2,.9,.3,1.15) both;
}
.nx-notify.nx-leaving { animation: nx-out .32s cubic-bezier(.4,0,.6,1) both; }
@keyframes nx-in  { from { opacity: 0; transform: translateY(-18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nx-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
.nx-n-icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--on-accent, #fff);
  background: linear-gradient(160deg, color-mix(in srgb, var(--copper) 92%, #fff), color-mix(in srgb, var(--copper) 74%, #000));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -6px var(--copper);
}
.nx-n-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nx-n-icon.big { width: 58px; height: 58px; border-radius: 18px; margin-bottom: 4px; }
.nx-n-icon.big svg { width: 30px; height: 30px; }
.nx-important .nx-n-icon { background: linear-gradient(160deg, #f5c04a, #c98a12); color: #1a1200; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 14px -6px #c98a12; }
.nx-critical .nx-n-icon, .nx-urgent .nx-n-icon { background: linear-gradient(160deg, #ff6b62, #d13a32); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 14px -6px #d13a32; }
.nx-n-body { min-width: 0; flex: 1; }
.nx-n-meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--ink-dim); font-weight: 600; letter-spacing: .01em; margin-bottom: 2px; }
.nx-n-meta time { margin-inline-start: auto; font-weight: 500; }
.nx-n-meta em { font-style: normal; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); font-size: .68rem; }
.nx-important .nx-n-meta em { background: #f5c04a33; color: #e0a93b; } .nx-critical .nx-n-meta em { background: #ff6b6233; color: #ff8a82; }
.nx-n-body b { display: block; font-size: .95rem; font-weight: 700; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.nx-n-body p { margin: 3px 0 0; font-size: .85rem; line-height: 1.5; color: var(--ink-dim); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nx-n-close { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-dim); cursor: pointer; opacity: 0; transition: opacity .15s; }
.nx-notify:hover .nx-n-close, .nx-notify:focus-within .nx-n-close { opacity: 1; }
.nx-n-close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.nx-n-progress { position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--copper); transform-origin: left center; animation: nx-count linear both; opacity: .7; }
[dir="rtl"] .nx-n-progress { transform-origin: right center; }
@keyframes nx-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.nx-urgent-overlay { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: nx-fade .25s both; }
.nx-urgent-overlay.nx-leaving { animation: nx-fade-out .26s both; }
@keyframes nx-fade { from { opacity: 0; } to { opacity: 1; } } @keyframes nx-fade-out { to { opacity: 0; } }
.nx-urgent {
  width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 26px 24px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); animation: nx-in .5s cubic-bezier(.2,.9,.3,1.15) both;
}
.nx-urgent small { font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: #ff8a82; text-transform: uppercase; }
.nx-urgent h3 { margin: 0; font-size: 1.25rem; line-height: 1.35; } .nx-urgent h3::before { display: none; }
.nx-urgent p { margin: 0 0 8px; font-size: .95rem; line-height: 1.65; color: var(--ink-dim); }
.nx-urgent .primary-btn { width: 100%; margin: 6px 0 0; padding: 14px; }
@media (max-width: 520px) { #nxNotifyStack { inset-inline: 10px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .nx-notify, .nx-urgent { animation: none; } .nx-n-progress { animation-duration: 0s !important; } }
@media print { #nxNotifyStack, .nx-urgent-overlay { display: none !important; } }
.notif-sound-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--ink-dim); font-weight: 600; }
.bell-ring svg { transform-origin: 50% 0; animation: nx-ring 1.4s ease-in-out; }
@keyframes nx-ring { 0%,100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-7deg); } 50% { transform: rotate(3deg); } }
.ap-row input[type="range"] { width: 130px; margin: 0; accent-color: var(--copper); }

/* --- super admin: broadcast composer + appearance (v53) --------------------------- */
.bc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .bc-layout { grid-template-columns: 1fr; } }
.bc-form .seg { margin-bottom: 10px; max-width: 100%; }
.bc-form select, .bc-form input[type=text], .bc-form textarea { width: 100%; margin: 0 0 12px; }
.bc-form textarea { resize: vertical; }
.bc-priority { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.bc-pr { display: flex; flex-direction: column; gap: 3px; padding: 12px; text-align: start; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.bc-pr small { font-size: .72rem; line-height: 1.4; color: var(--ink-dim); }
.bc-pr:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.bc-pr.active { background: var(--sel-bg); border-color: var(--sel-ring); }
.bc-pr.bc-important.active { border-color: #d9a441; background: #d9a44118; } .bc-pr.bc-critical.active { border-color: #e5534b; background: #e5534b18; }
@media (max-width: 560px) { .bc-priority { grid-template-columns: 1fr; } }
.bc-counter { text-align: end; font-size: .74rem; color: var(--ink-dim); margin: -6px 0 12px; font-variant-numeric: tabular-nums; }
.bc-stage { display: grid; place-items: center; padding: 26px 14px; margin-bottom: 12px; border-radius: 18px; border: 1px dashed var(--line); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--copper) 12%, transparent), transparent 70%); }
.nx-static { animation: none !important; width: min(380px, 100%); cursor: default; }
.nx-static .nx-n-close { display: none; }
.nx-notify.nx-static .nx-n-progress { display: none; }
.nx-urgent.nx-static { box-shadow: none; padding: 22px 20px 18px; }
.admin-toggles { display: flex; gap: 8px; margin-bottom: 8px; }
.shop-theme-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shop-theme-row select { width: auto; min-width: 130px; margin: 0; }
.shop-theme-row input[type=color] { width: 42px; height: 38px; padding: 2px; margin: 0; border-radius: 10px; }

/* skin picker: each card is a miniature of the skin (v53) */
.skin-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.skin-mock { height: 84px; }
.skin-mock i, .skin-mock b, .skin-mock u, .skin-mock em { position: absolute; }
.skin-mock .sm-aa { inset-inline-start: 10px; top: 6px; font-size: 1.35rem; line-height: 1; font-weight: 700; }
.skin-mock .sm-panel { inset: 40px 10px 10px; }
.skin-mock .sm-btn { inset-inline-end: 10px; top: 12px; width: 34px; height: 14px; }
.skin-mock .sm-line { inset-inline-start: 20px; bottom: 22px; width: 52px; height: 5px; border-radius: 3px; opacity: .6; }
.skin-desc { font-size: .7rem; color: var(--ink-dim); margin-top: -4px; }

/* =====================================================================
   17. Cash accounting + staff board (v54)
   ===================================================================== */
.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; font-size: .86rem; color: var(--ink-dim); cursor: pointer; flex-basis: 100%; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--copper); flex: none; }
.shift-cash-box { margin-top: 14px; }
.scx { border: 1px solid var(--line); border-radius: var(--r-lg, 14px); overflow: hidden; }
.scx-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.scx-row b { font-variant-numeric: tabular-nums; }
.scx-row.total { background: color-mix(in srgb, var(--ink) 5%, transparent); font-weight: 800; border-bottom: 0; font-size: 1rem; }
.scx-var { min-height: 1.4em; margin: 8px 2px 0; font-weight: 800; font-size: .95rem; }
.scx-var.ok { color: var(--ok); } .scx-var.neg { color: var(--danger); } .scx-var.pos { color: #d9a441; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 14px; }
.staff-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg, 16px); background: var(--bg); }
.staff-card.needs-plan { border-color: color-mix(in srgb, #d9a441 60%, transparent); }
.st-head { display: flex; align-items: center; gap: 12px; }
.st-avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 800; background: color-mix(in srgb, var(--copper) 22%, transparent); color: var(--ink); }
.st-who { display: flex; flex-direction: column; min-width: 0; flex: 1; } .st-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .st-who small { color: var(--ink-dim); font-size: .74rem; }
.st-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink-dim); }
.st-pill.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); } .st-pill.done { background: color-mix(in srgb, var(--copper) 16%, transparent); color: var(--ink); }
.st-main { width: 100%; margin: 0; padding: 12px; }
.st-plan { margin: 0; font-size: .8rem; color: var(--ink-dim); } .st-plan.warn { color: #d9a441; }
.st-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-dim); } .st-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.st-adv, .st-net { margin: 0; font-size: .84rem; } .st-net b { font-variant-numeric: tabular-nums; } .st-adv { color: #d9a441; }
.st-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; } .st-acts .ghost-btn { flex: 1 1 auto; margin: 0; }

/* =====================================================================
   18. Sign-in options: Google, phone OTP, finish-setup (v55)
   ===================================================================== */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: .76rem; color: var(--ink-dim); font-weight: 600; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px; margin: 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: #1f1f1f; font-family: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.google-btn:hover { box-shadow: 0 2px 10px -4px rgba(0,0,0,.35); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.google-btn svg { width: 18px; height: 18px; flex: none; }
.phone-login-link { display: block; width: 100%; text-align: center; margin-top: 10px !important; font-weight: 600; }
.phone-linked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.phone-linked b { font-variant-numeric: tabular-nums; }
#finishSetupForm .form-note { margin-bottom: 6px; }

/* Apple button follows Apple's black sign-in-button guideline; Facebook and
   Google keep the white/bordered style already defined on .google-btn. */
.apple-btn { background: #000; color: #fff; border-color: #000; }
.apple-btn:hover { box-shadow: 0 2px 10px -4px rgba(0,0,0,.6); }
:root[data-theme="light"] .apple-btn, :root:not([data-theme="dark"]) .apple-btn { background: #000; color: #fff; }

/* Country-code + number pairing, used on every phone field (v55.3) */
.phone-field-row { display: flex; gap: 8px; align-items: stretch; }
.country-code-select { flex: 0 0 auto; width: auto; max-width: 130px; }
.phone-field-row input[type="tel"] { flex: 1; min-width: 0; }

/* Delivery-area select in the cart's delivery/takeaway block (v55.4) */
#deliveryAreaSelect { width: 100%; margin-bottom: 8px; }

#shopOpenBtn.shop-closed { background: color-mix(in srgb, #c0392b 20%, transparent); border-color: #c0392b; }

/* Notifications popover: its own top layer, above the sidebar drawer (70)
   and its toggle (80), below toasts/banners. */
.nx-popover { z-index: 95 !important; box-shadow: 0 18px 48px -12px rgba(0,0,0,.55); border-radius: var(--r-lg, 16px); overscroll-behavior: contain; }

/* Notification items (v58) */
.nf-item { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nf-item.is-read { opacity: .62; }
.nf-item.is-link { cursor: pointer; }
.nf-item.is-link:hover { background: color-mix(in srgb, var(--copper) 8%, transparent); }
.nf-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--ink-dim); cursor: pointer; font-size: .85rem; line-height: 1; }
.nf-x:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.nf-title { margin: 0 0 4px; padding-inline-end: 28px; font-weight: 800; font-size: .92rem; line-height: 1.4; }
.nf-title .tag { margin-inline-end: 6px; }
.nf-body { margin: 0; font-size: .84rem; line-height: 1.55; color: var(--ink-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nf-item.expanded .nf-body { -webkit-line-clamp: unset; display: block; }
.nf-more { margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--copper); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.nf-time { margin: 6px 0 0; font-size: .72rem; color: var(--ink-dim); }

/* Work-plan dialog (v59) */
.wp-dialog { max-width: 520px; }
.wp-step { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wp-q { font-weight: 800; font-size: .95rem; }
.wp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wp-day { padding: 10px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink-dim); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.wp-day.on { background: var(--copper); border-color: var(--copper); color: var(--on-accent, #fff); }
.wp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-presets button { padding: 5px 12px; border: 1px dashed var(--line); border-radius: 999px; background: none; color: var(--ink-dim); font: inherit; font-size: .78rem; cursor: pointer; }
.wp-presets button:hover { color: var(--ink); border-color: var(--copper); }
.wp-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wp-hours label { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-dim); }
.wp-hours input { width: auto; margin: 0; }
.wp-dur { font-size: .82rem; font-weight: 700; color: var(--copper); }
.wp-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wp-seg button { padding: 11px; border: 0; background: var(--bg); color: var(--ink-dim); font: inherit; font-weight: 700; cursor: pointer; }
.wp-seg button.on { background: color-mix(in srgb, var(--copper) 18%, var(--bg)); color: var(--ink); box-shadow: inset 0 -2px 0 var(--copper); }
.wp-amount { display: flex; align-items: center; gap: 10px; }
.wp-amount input { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wp-amount span { color: var(--ink-dim); font-weight: 700; }
.wp-warn { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #d9a441 16%, transparent); color: #e7b858; font-size: .85rem; font-weight: 600; }
.wp-warn button { margin-inline-start: 8px; padding: 4px 12px; border: 0; border-radius: 999px; background: #d9a441; color: #1a1300; font: inherit; font-weight: 800; cursor: pointer; }
.wp-summary { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: .86rem; line-height: 1.7; }
.wp-summary p { margin: 0; }
.wp-adv { margin: 8px 0; font-size: .86rem; }
.wp-adv summary { cursor: pointer; color: var(--ink-dim); font-weight: 700; padding: 6px 0; }
.wp-grace { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ink-dim); }
.wp-grace input { width: 70px; margin: 0; }
/* staff card: tappable net breakdown */
.st-net summary { cursor: pointer; list-style: none; font-size: .86rem; }
.st-net summary::-webkit-details-marker { display: none; }
.st-net summary::after { content: " ▾"; color: var(--ink-dim); font-size: .75rem; }
.st-net[open] summary::after { content: " ▴"; }
.st-break { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: .8rem; color: var(--ink-dim); }
.st-break b { color: var(--ink); font-variant-numeric: tabular-nums; }
.st-bulk { margin-top: 10px; width: 100%; }

/* Floors & bulk tables (v60) */
.floor-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 12px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.floor-tabs::-webkit-scrollbar { display: none; }
.floor-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-bottom: 2.5px solid transparent; background: none; color: var(--ink-dim); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.floor-tab:hover { color: var(--ink); }
.floor-tab.on { color: var(--ink); border-bottom-color: var(--copper); }
.floor-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); font-size: .74rem; font-variant-numeric: tabular-nums; text-align: center; }
.floor-tab.on .floor-count { background: var(--copper); color: var(--on-accent, #fff); }
.floor-add { color: var(--copper); }
.floor-plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.floor-plan-toolbar .primary-btn, .floor-plan-toolbar .ghost-btn { margin: 0; }
.floor-summary { margin-inline-start: auto; font-size: .82rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.floor-plan-canvas { transition: height .15s ease; }
.floor-plan-canvas .empty-hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--ink-dim); }
.at-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.at-count > button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.at-count input { width: 76px; margin: 0; text-align: center; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.at-count .wp-presets { margin-inline-start: 6px; }
.at-shapes button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.at-ico { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; }
.at-ico.sq { border-radius: 4px; } .at-ico.rd { border-radius: 50%; } .at-ico.rc { width: 22px; height: 12px; border-radius: 3px; }
.at-full { color: #e7b858; font-weight: 700; }

/* Cart table picker (v60.1) */
.table-picker-btn { margin: 0; white-space: nowrap; }
.table-picker-btn.on { border-color: var(--copper); color: var(--ink); font-weight: 800; }
.tp-dialog { max-width: 760px; width: min(760px, 94vw); }
.tp-head { display: flex; align-items: center; gap: 12px; }
.tp-head h3 { margin: 0; flex: none; }
.tp-search { flex: 1; margin: 0; }
.tp-floors { margin-top: 10px; }
.tp-legend { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: 8px 0; font-size: .76rem; color: var(--ink-dim); }
.tp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: -8px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: min(56vh, 520px); overflow-y: auto; padding: 2px; }
.tp-t { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; aspect-ratio: 1; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.tp-t b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tp-t small { font-size: .66rem; color: var(--ink-dim); }
.tp-t:hover { border-color: var(--copper); }
.tp-t.on { background: var(--copper); border-color: var(--copper); color: var(--on-accent, #fff); }
.tp-t.on small { color: inherit; }
.st-available { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.st-occupied { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }
.st-reserved { border-color: #f0a94e; background: color-mix(in srgb, #f0a94e 12%, var(--bg)); }
.st-cleaning { border-color: var(--info, #4aa3df); }
.st-disabled { opacity: .45; }
.tp-legend i.st-available { background: var(--ok); } .tp-legend i.st-occupied { background: var(--danger); } .tp-legend i.st-reserved { background: #f0a94e; }
.cart-context .table-picker-btn { flex: 1; }

/* Offer codes (v61) */
.promo-opts { margin: 0 0 4px; font-size: .86rem; color: var(--ink-dim); }
.promo-opts label { display: flex; align-items: center; gap: 8px; }
.promo-opts input { margin: 0; }
.promo-stats h4 { margin: 18px 0 8px; font-size: .9rem; }
.promo-stat { padding: 10px 0; border-top: 1px solid var(--line); }
.ps-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ps-head .tag.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.ps-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: .8rem; color: var(--ink-dim); }
.ps-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-dialog { max-width: 420px; }
.pc-input { width: 100%; margin: 8px 0 12px; text-align: center; font-family: 'Inter', ui-monospace, monospace; font-size: 1.9rem; font-weight: 800; letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; }
.pc-state { margin: 4px 0 8px; padding: 12px; border-radius: 12px; font-size: 1.1rem; font-weight: 800; text-align: center; }
.pc-state.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pc-state.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pc-offer { display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: .95rem; }
.pc-offer small { color: var(--ink-dim); font-size: .82rem; }
.pc-meta { margin: 8px 0; text-align: center; font-size: .86rem; color: var(--ink-dim); }
.pc-redeem { margin-top: 6px; }
.pc-pct { align-self: center; margin-top: 4px; padding: 2px 12px; border-radius: 999px; background: color-mix(in srgb, var(--copper) 18%, transparent); color: var(--copper); font-weight: 800; font-size: .86rem; }

/* =====================================================================
   Phone POS (v62) — the earlier ≤820px rule forced the desktop two-column
   workspace onto phones (it came later in the file and won). Phones now get
   their own layout: products full-width, a one-line toolbar, and the cart
   as a bottom sheet behind a summary bar.
   ===================================================================== */
.cart-peek, .cart-sheet-close { display: none; }
@media (max-width: 640px) {
  .app-main.is-pos { padding: 0; overflow-y: auto; }
  .app-main.is-pos #view-pos, .app-main.is-pos .pos-grid { height: auto; min-height: 100%; }
  .app-main.is-pos .pos-grid { display: block; }
  .app-main.is-pos .pos-products { padding: 10px 12px 96px; }

  /* toolbar: search on its own line, actions in one swipeable row */
  .app-main.is-pos .pos-toolbar {
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none;
    padding: 4px 0 2px; padding-inline-start: 52px; margin-bottom: 10px;
  }
  .app-main.is-pos .pos-toolbar::-webkit-scrollbar { display: none; }
  .app-main.is-pos .pos-toolbar #posSearch { flex: 0 0 calc(100vw - 88px); min-width: 0; margin: 0; height: 42px; }
  .app-main.is-pos .pos-toolbar .ghost-btn { flex: none; margin: 0; white-space: nowrap; height: 42px; padding: 0 14px; }
  .app-main.is-pos #posCategoryTabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px !important; }
  .app-main.is-pos #posCategoryTabs::-webkit-scrollbar { display: none; }
  .app-main.is-pos #posCategoryTabs > * { flex: none; }

  /* products: two per row, compact photos */
  .app-main.is-pos #posProductGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: visible; }
  .app-main.is-pos #posProductGrid .product-card .thumb { aspect-ratio: 4 / 3; height: auto; }
  .app-main.is-pos #posProductGrid .product-card .pname { font-size: .86rem; padding: 8px 10px 0; }

  /* bottom summary bar */
  .app-main.is-pos .cart-peek {
    position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; border-radius: 16px;
    background: var(--panel); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer;
    box-shadow: 0 14px 34px -10px rgba(0,0,0,.65); border: 1px solid var(--line);
  }
  .app-main.is-pos .cart-peek.has-items { background: var(--copper); color: var(--on-accent, #fff); border-color: var(--copper); }
  .cart-peek .cp-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 18%, transparent); font-variant-numeric: tabular-nums; }
  .cart-peek .cp-label { flex: 1; text-align: start; }
  .cart-peek .cp-total { font-variant-numeric: tabular-nums; }

  /* the cart itself: a full-screen sheet */
  .app-main.is-pos .pos-cart {
    position: fixed; inset: 0; z-index: 72; height: 100%; max-height: none; border: 0; border-radius: 0;
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); transform: translateY(102%); transition: transform .24s cubic-bezier(.2,.7,.2,1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .app-main.is-pos.cart-open .pos-cart { transform: none; }
  .app-main.is-pos.cart-open .cart-peek { display: none; }
  .app-main.is-pos .cart-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 14px 16px; }
  .app-main.is-pos .cart-head h3 { flex: 1; margin: 0; }
  .app-main.is-pos .cart-sheet-close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-size: 1rem; cursor: pointer; }
  .app-main.is-pos .cart-items { flex: none; overflow: visible; min-height: 60px; }
  .app-main.is-pos .cart-foot { max-height: none; overflow: visible; }
  .app-main.is-pos .cart-context { display: flex; gap: 8px; }
  .app-main.is-pos .cart-context > * { flex: 1; min-width: 0; margin: 0; }
}
@media (max-width: 640px) { body.pos-cart-open .side-nav-toggle { display: none !important; } }

/* Official NEXA logo (v63) — the image itself, never a redrawn mark */
.topbar-mark img.nexa-logo, img.nexa-logo { width: 34px; height: 34px; object-fit: contain; display: block; }
img.nexa-logo.small { width: 26px; height: 26px; }
.topbar-mark:has(> img.nexa-logo) { background: none; border: 0; box-shadow: none; }
.auth-logo { display: block; width: 96px; height: 96px; margin: 0 auto 6px; object-fit: contain; }
.auth-logo-name { display: block; text-align: center; font-family: 'Inter', 'NexaAr', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: .12em; color: var(--ink); }
.side-powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 2px; color: var(--ink-dim); font-family: 'Inter', sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .14em; }
.side-powered img { width: 28px; height: 28px; object-fit: contain; }

/* Pharmacy: hotkeys, quick-add, alternatives, import (v64) */
.rx-hotkeys { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -4px 0 10px; font-size: .74rem; color: var(--ink-dim); }
.rx-hotkeys kbd { display: inline-block; min-width: 22px; margin-inline-end: 4px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel); color: var(--ink); font: 700 .7rem 'Inter', monospace; text-align: center; }
@media (max-width: 640px) { .rx-hotkeys { display: none; } }
.rxq-dialog { max-width: 560px; }
.rxq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rxq-grid .ef:first-child { grid-column: 1 / -1; }
.rxq-stock { margin: 10px 0; }
.rxq-stock summary { cursor: pointer; color: var(--ink-dim); font-weight: 700; padding: 6px 0; }
.rxa-dialog { max-width: 620px; }
.rxa-reason { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #d9a441 16%, transparent); color: #e7b858; font-weight: 700; }
.rxa-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.rxa-row { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.rxa-row:hover, .rxa-row:focus-visible { border-color: var(--copper); }
.rxa-row.out { opacity: .55; }
.rxa-k { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--ink) 10%, transparent); font: 800 .78rem 'Inter', sans-serif; }
.rxa-name small { display: block; color: var(--ink-dim); font-size: .76rem; }
.rxa-stock { font-size: .78rem; color: var(--ok); font-weight: 700; } .rxa-row.out .rxa-stock { color: var(--danger); }
.rxa-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.rx-map-title { margin: 12px 0 8px; font-weight: 700; }
.rx-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.rx-map-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--ink-dim); }
.rx-map-grid select { margin: 0; }
.rx-preview { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: .82rem; line-height: 1.7; }
.rx-preview i { font-style: normal; color: var(--ink); font-weight: 700; }
.rx-done { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 12%, transparent); }
.rx-done > b { width: 100%; color: var(--ok); }
.rx-errs { margin-top: 8px; font-size: .84rem; } .rx-errs summary { cursor: pointer; color: #e7b858; font-weight: 700; }

/* Install guide (v65) -- shared by the menu and the NEXA app */
.nx-install-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: nxFade .18s ease-out; }
@keyframes nxFade { from { opacity: 0; } to { opacity: 1; } }
.nx-install { width: min(420px, 100%); padding: 24px 22px 20px; border-radius: 24px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); animation: nxUp .22s cubic-bezier(.2,.7,.2,1); }
@keyframes nxUp { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.nx-install-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.nx-install-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--copper); color: var(--on-accent, #fff); }
.nx-install-ico svg { width: 24px; height: 24px; }
.nx-install-head h2 { margin: 0; font-size: 1.18rem; font-weight: 800; line-height: 1.35; }
.nx-install-reason, .nx-install-lead { margin: 0 0 12px; font-size: .9rem; line-height: 1.6; color: var(--ink-dim); }
.nx-install-reason { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--copper) 12%, transparent); color: var(--ink); font-weight: 600; }
.nx-install-steps { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.nx-install-steps li { display: flex; align-items: center; gap: 12px; font-size: .95rem; line-height: 1.5; }
.nx-install-steps svg { display: inline-block; vertical-align: -3px; margin: 0 2px; color: var(--copper); }
.nx-install-steps b { color: var(--copper); font-size: 1.1rem; }
.nx-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--copper) 14%, transparent); color: var(--copper); font: 800 .9rem 'Inter', sans-serif; }
.nx-install-go, .nx-install-copy, .nx-install-later { display: block; width: 100%; margin-top: 8px; padding: 14px; border: 0; border-radius: 16px; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; }
.nx-install-go { background: var(--copper); color: var(--on-accent, #fff); }
.nx-install-copy { background: color-mix(in srgb, var(--copper) 14%, transparent); color: var(--ink); }
.nx-install-later { background: none; color: var(--ink-dim); font-weight: 700; }
.nx-install-btn { white-space: nowrap; }
.shop-open-pill { display: block; width: 100%; margin: 0 0 8px; padding: 10px; font-weight: 800; }
.shop-open-pill[hidden] { display: none; }
#appConfirmMessage { white-space: pre-line; line-height: 1.7; }
.archived-emps { margin-top: 12px; }
.archived-emps summary { cursor: pointer; color: var(--ink-dim); font-weight: 700; padding: 8px 0; }
.st-remove { display: block; margin: 8px auto 0; padding: 4px 8px; border: 0; background: none; color: var(--ink-dim); font: inherit; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; } .st-remove:hover { color: var(--danger); }

/* Freshness cards (v66): live clock + progress */
.fb-presets { flex-wrap: wrap; }
.fb-auto-hint { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--copper) 10%, transparent); }
.freshness-card .fc-timer { font-variant-numeric: tabular-nums; font-family: 'Inter', ui-monospace, monospace; letter-spacing: .02em; }
.fc-bar { height: 6px; margin: 8px 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .9s linear; }
.freshness-card.warning .fc-bar i { background: #e5a33a; }
.freshness-card.urgent .fc-bar i { background: var(--danger); }
.fc-ends { font-size: .74rem; color: var(--ink-dim); margin-bottom: 6px; }
/* ⓘ info points */
.info-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-start: 6px; padding: 0; border: 1px solid color-mix(in srgb, var(--copper) 60%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--copper) 12%, transparent); color: var(--copper); font: 700 .78rem/1 'Inter', sans-serif; cursor: pointer; vertical-align: middle; }
.info-dot:hover { background: var(--copper); color: var(--on-accent, #fff); }
.info-dot-wrap { display: inline-flex; align-items: center; }
.help-pop .nx-install-steps li { align-items: flex-start; }
.help-pop .nx-install-steps li > span:last-child { padding-top: 4px; }
.help-pop .nx-install-ico { font-size: 1.4rem; }
.staff-add-btn { margin: 0 0 12px; }

/* v67 — welcome gift settings */
.welcome-fields { display: grid; gap: 8px; margin-top: 8px; }
.welcome-fields[hidden] { display: none; }
.welcome-fields input, .welcome-fields textarea, .welcome-fields select { width: 100%; }
.welcome-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.welcome-row label { display: grid; gap: 4px; font-size: .85rem; color: var(--ink-dim, inherit); }
.welcome-row label input { width: auto; }
.welcome-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.welcome-loc a { font-size: .85rem; font-weight: 700; }
@media (max-width: 420px) { .welcome-row { grid-template-columns: 1fr; } }

/* v73: phone sign-in -- hidden unless the build enables it */
.phone-login-link[hidden], #phoneSecurityCard[hidden] { display: none !important; }
#phoneVerifyForm #phoneCodeInput { width: 100%; }

/* v76: spotlight (pointer-following light on cards) -- see js/fx.js */
.fx-spot { position: relative; }
.fx-spot::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--fx-x, 50%) var(--fx-y, 50%), color-mix(in srgb, var(--copper, #c8873a) 14%, transparent), transparent 70%);
}
.fx-spot:hover::after { opacity: 1; }
/* Lenis: the browser's own smooth-scroll must stay out of its way */
html.has-lenis, html.has-lenis body { scroll-behavior: auto !important; }

/* v198: an empty cart is one short line, not a tall empty box, so the payment, checkout and
   split-bill buttons are all in view without scrolling. */
.app-main.is-pos .cart-items:has(> .empty-hint) { flex: 0 0 auto; min-height: 0; }
.app-main.is-pos .cart-items > .empty-hint, .cart-items > .cart-empty { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 14px 0; font-size: .84rem; color: var(--ink-dim); }
.app-main.is-pos .cart-items > .empty-hint img { display: none; }
.app-main.is-pos .pos-cart:has(.cart-items > .empty-hint) .cart-foot { flex: 1 1 auto; max-height: none; min-height: 0; }
