/* ---------------------------------------------------------------------------
   POS - the till, Products, Customers, Sales & shifts and POS Settings.
   Every colour here is a named colour (var(--...)), so the Light look is just
   the second set of values in .pos-scope[data-pos-theme="light"] below - the
   screens aren't written twice. Light applies inside the POS only; the rest
   of Cardlivo stays as it is.
   --------------------------------------------------------------------------- */
.pos-scope {
  --pos-accent-text: var(--accent);
  --pos-blue: #4F8FE0;
  --pos-overlay: rgba(5, 6, 8, 0.72);
  --pos-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --pos-line: var(--border);
  --pos-row: var(--surface-3);
  color: var(--text);
}
.pos-scope[data-pos-theme="light"] {
  --bg: #F6F5F1; --sidebar: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1EFE9; --surface-3: #E8E5DD;
  --border: #DEDAD0; --text: #1C1E22; --text-soft: #4A4F58; --text-muted: #6B717C; --text-faint: #9AA0AA;
  --accent: #D9A441; --accent-hover: #C99636; --accent-ink: #0B0D10; --accent-gradient: #D9A441;
  --success: #1F7A4C; --success-bg: #E1F3E8; --danger: #A12C3A; --danger-bg: #F8E1E4; --warning: #9A4A12; --warning-bg: #F9E6D6;
  --pos-accent-text: #8A5E0F; --pos-blue: #2C64B0; --pos-overlay: rgba(28, 30, 34, 0.38);
  --pos-shadow: 0 18px 50px rgba(28, 30, 34, 0.18); --pos-row: #ECE9E1;
  color-scheme: light;
}
.pos-scope[data-pos-theme="dark"] { color-scheme: dark; }

/* The POS pages fill the content area, so a light page has no dark frame */
.pos-panel { margin: -28px -32px; padding: 28px 32px 96px; min-height: calc(100% + 56px); background: var(--bg); box-sizing: border-box; }
@media (max-width: 760px) { .pos-panel { margin: -20px -16px -32px; padding: 20px 16px 96px; } }

.pos-scope button, .pos-scope input, .pos-scope select, .pos-scope textarea { font-family: inherit; }
.pos-scope code { font-family: var(--font-mono); font-size: 0.92em; color: var(--text-soft); }
.pos-flex { flex: 1; }
.pos-scope [hidden], .pos-scope[hidden] { display: none !important; }
.pos-good { color: var(--success) !important; }
.pos-warn { color: var(--warning) !important; }
.pos-faint { color: var(--text-muted); }
.pos-soft { color: var(--text-soft); }
.pos-accent-text { color: var(--pos-accent-text); }
.pos-hint { color: var(--text-muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
.pos-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pos-empty { color: var(--text-muted); font-size: 14px; padding: 28px 16px; text-align: center; grid-column: 1 / -1; }
.pos-empty-big { padding: 60px 20px; font-size: 15px; }
.pos-busy { color: var(--text-muted); padding: 28px; text-align: center; font-size: 14px; }
.pos-clip { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pos-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--text-muted); }
.pos-dot.is-good { background: var(--success); }

/* Buttons */
.pos-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; box-sizing: border-box; transition: border-color .15s, background-color .15s; }
.pos-btn:hover:not(:disabled) { border-color: var(--accent); }
.pos-btn:disabled { opacity: .5; cursor: not-allowed; }
.pos-btn svg { width: 18px; height: 18px; flex: none; }
.pos-btn.pos-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 650; }
.pos-btn.pos-primary:hover:not(:disabled) { background: var(--accent-hover); }
.pos-btn.pos-danger { background: var(--danger); border-color: transparent; color: #fff; font-weight: 600; }
.pos-btn.pos-danger-text { background: none; border-color: transparent; color: var(--danger); }
.pos-btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.pos-btn-big { height: 56px; font-size: 16.5px; border-radius: 12px; width: 100%; }
.pos-btn-tall { height: 52px; border-radius: 12px; }
.pos-btn-dashed { border-style: dashed; background: none; color: var(--text-soft); }
.pos-btn-block { width: 100%; }
.pos-icon-btn { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--text-muted); cursor: pointer; padding: 0; }
.pos-icon-btn svg { width: 14px; height: 14px; }
.pos-icon-btn:hover { color: var(--text); border-color: var(--text-muted); }
.pos-link { background: none; border: 0; padding: 0; color: var(--pos-accent-text); font-size: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.pos-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.pos-seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--text-soft); font-size: 13px; cursor: pointer; }
.pos-seg button.is-on { background: var(--text); color: var(--bg); font-weight: 600; }
.pos-seg-page { margin-bottom: 18px; }

.pos-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--border); background: none; color: var(--text-soft); font-size: 13px; cursor: pointer; }
.pos-chip span { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.pos-chip.is-on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

.pos-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-soft); white-space: nowrap; }
.pos-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.pos-pill.is-off i { background: var(--warning); }
.pos-pill.is-warn { color: var(--warning); border-color: var(--warning); cursor: pointer; }

/* Phone as the till's camera (pos-till.js tillPhone...) */
.pos-pill.is-phone { cursor: pointer; color: var(--text); font: inherit; font-size: 12.5px; }
.pos-pill.is-phone svg { flex: none; }
.pos-pill.is-phone.is-waiting i { background: var(--warning); }
@media (pointer: coarse) { .pos-pill.is-phone:not(.is-paired):not(.is-waiting) { display: none; } }
.pos-phone-pair { display: flex; gap: 22px; align-items: flex-start; }
.pos-phone-qr { flex: none; width: 236px; height: 236px; border-radius: 14px; background: #fff; padding: 6px; }
.pos-phone-qr svg { display: block; width: 100%; height: 100%; }
.pos-phone-steps { flex: 1; min-width: 0; font-size: 14px; }
.pos-phone-steps ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }
.pos-phone-steps p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.pos-phone-status { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13.5px !important; }
@media (max-width: 620px) { .pos-phone-pair { flex-direction: column; align-items: center; } }

/* Fields */
.pos-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; min-width: 0; }
.pos-field > span:first-child { line-height: 1.3; }
.pos-scope input[type="text"], .pos-scope input[type="search"], .pos-scope input[type="email"], .pos-scope input[type="tel"], .pos-scope input[type="number"], .pos-scope input[type="password"], .pos-scope input[type="date"], .pos-scope input[type="time"], .pos-scope input[type="url"], .pos-scope select, .pos-scope textarea {
  height: 40px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 0 11px; font-size: 14px; box-sizing: border-box; width: 100%; min-width: 0;
}
.pos-scope textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.pos-scope input:focus-visible, .pos-scope select:focus-visible, .pos-scope textarea:focus-visible, .pos-scope button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pos-scope input[type="checkbox"], .pos-scope input[type="radio"] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; flex: none; }
.pos-field-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-soft); font-size: 14px; }
.pos-field-row input { max-width: 160px; text-align: right; }
.pos-field-big input { height: 54px; font-size: 22px; font-weight: 600; }
.pos-field-inline { flex-direction: row; align-items: center; gap: 10px; color: var(--text-soft); font-size: 13.5px; flex-wrap: wrap; }
.pos-unit { display: inline-flex; align-items: center; gap: 4px; color: var(--text-soft); }
.pos-unit input { width: 90px !important; text-align: right; }
.pos-mini { width: 72px !important; height: 32px !important; text-align: right; padding: 0 8px !important; }
.pos-check { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 13.5px; margin: 0 0 10px; cursor: pointer; line-height: 1.35; }
.pos-check-pad { padding-top: 22px; }
.pos-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.pos-span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .pos-grid2 { grid-template-columns: minmax(0, 1fr); } .pos-check-pad { padding-top: 0; } }

.pos-radios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pos-radio { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.pos-radio:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pos-radio input { margin-top: 2px; }
.pos-radio span { display: flex; flex-direction: column; gap: 2px; }
.pos-radio b { font-size: 14px; font-weight: 600; color: var(--text); }
.pos-radio small { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Summaries, tiles, cards */
.pos-sum { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; border-top: 1px solid var(--border); }
.pos-sum:first-child { border-top: 0; padding-top: 0; }
.pos-sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.pos-sum-row > span:last-child { text-align: right; }
.pos-sum-row small { font-size: 12px; }
.pos-sum-row.is-strong { color: var(--text); font-weight: 600; border-top: 1px solid var(--border); padding-top: 8px; }
.pos-sum-row.is-over { color: var(--success); font-weight: 600; }
.pos-sum-row.is-short { color: var(--warning); font-weight: 600; }
.pos-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.pos-tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pos-tile { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.pos-tile span { font-size: 12px; color: var(--text-muted); }
.pos-tile b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.pos-tile.is-accent { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.pos-tile.is-accent b { color: var(--pos-accent-text); }
.pos-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 18px; margin-bottom: 14px; min-width: 0; }
.pos-card h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.pos-card h5 { margin: 16px 0 8px; font-size: 13.5px; font-weight: 600; }
.pos-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pos-card-head h4 { margin: 0; }
.pos-subhead { margin: 18px 0 8px; font-size: 13.5px; font-weight: 600; }
.pos-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text-soft); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.pos-banner.is-warn { background: var(--warning-bg); color: var(--warning); }

/* Pages */
.pos-page { max-width: 1240px; margin: 0 auto; }
.pos-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pos-page-head h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.pos-page-head p { margin: 6px 0 0; max-width: 640px; }
.pos-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-status { margin: 6px 0 0; font-size: 13px; color: var(--success); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pos-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pos-toolbar .pos-scanbox { flex: 1 1 260px; }
.pos-split { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.pos-split > .pos-table-wrap { flex: 999 1 560px; }
.pos-split-even > * { flex: 1 1 280px; }
.pos-side { flex: 1 1 280px; max-width: 360px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pos-side h3 { margin: 0; font-size: 16px; font-weight: 600; }
.pos-side-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pos-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 420px) { .pos-cols { grid-template-columns: minmax(0, 1fr); } }
.pos-savebar { display: flex; gap: 10px; align-items: center; margin-top: 6px; position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }
/* The page's scroll area keeps its bottom padding clear of sticky things -
   pull the bar down by that much so it sits on the bottom edge, not above it */
.pos-panel .pos-savebar { bottom: -28px; }
@media (max-width: 760px) { .pos-panel .pos-savebar { bottom: calc(-32px - env(safe-area-inset-bottom)); } }
.pos-setup { max-width: 560px; margin: 40px auto; text-align: center; padding: 32px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.pos-setup h3 { margin: 0 0 8px; font-size: 19px; }
.pos-setup p { color: var(--text-soft); line-height: 1.55; margin: 0 0 18px; }
.pos-row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }

/* Tables */
.pos-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.pos-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.pos-table th { text-align: left; padding: 10px 12px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.pos-table td { padding: 9px 12px; border-top: 1px solid var(--pos-row); vertical-align: middle; }
.pos-table tbody tr { cursor: pointer; }
.pos-table tbody tr:hover, .pos-table tbody tr.is-sel { background: var(--surface-2); }
.pos-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-table .num small { display: block; font-size: 11.5px; }
.pos-table .pos-cb { width: 28px; }
.pos-table-tight { min-width: 0; margin-bottom: 8px; }
.pos-table-tight td { padding: 6px 8px; }
.pos-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pos-who span { display: flex; flex-direction: column; min-width: 0; }
.pos-who small { font-size: 12px; color: var(--text-muted); }
.pos-who b { font-weight: 500; }
.pos-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--text-soft); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pos-avatar.is-big { width: 56px; height: 56px; font-size: 20px; }
.pos-swatch { width: 32px; height: 32px; border-radius: 8px; flex: none; display: inline-block; }
.pos-swatch.is-card { width: 30px; height: 42px; border-radius: 4px; background: var(--surface-3); }
.pos-thumb { width: 30px; height: 42px; border-radius: 4px; object-fit: cover; flex: none; background: var(--surface-2); display: inline-block; }
.pos-thumb-sm { width: 26px; height: 36px; border-radius: 3px; object-fit: cover; flex: none; }

/* Scan / search box */
.pos-scanbox { flex: 1; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 2px solid var(--accent); box-sizing: border-box; min-width: 0; }
.pos-scanbox svg { width: 22px; height: 22px; color: var(--pos-accent-text); flex: none; }
.pos-scanbox input { flex: 1; min-width: 0; height: auto !important; border: 0 !important; background: none !important; padding: 0 !important; font-size: 16px !important; outline: none !important; }
.pos-scan-state { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.pos-scanbox-sm { height: 44px; border-width: 1px; border-color: var(--border); margin-bottom: 14px; }
.pos-scanbox-sm svg { width: 17px; height: 17px; color: var(--text-muted); }
.pos-scanbox-sm input { font-size: 14.5px !important; }
.pos-toolbar .pos-scanbox-sm { margin-bottom: 0; }

/* ---------------------------------------------------------------------------
   The till (full screen)
   --------------------------------------------------------------------------- */
body.pos-till-on { overflow: hidden; }
.pos-till { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.pos-till[hidden] { display: none; }
.pos-till-head { flex: none; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 16px; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--border); background: var(--surface); box-sizing: content-box; }
/* POS menu (pos-home.js) */
.pos-backbar { max-width: 1240px; margin: -10px auto 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pos-backbar [data-back-till] { gap: 6px; }

/* Comp prices on the Buy side (pos-buy.js buyComp...) */
.pos-buy-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 10px; }
.pos-buy-tools .pos-hint { flex: 1; min-width: 200px; }
.pos-comp { grid-column: 1 / -1; padding: 8px 14px 12px 60px; border-top: 1px dashed var(--pos-row); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.pos-comp-load { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); padding: 4px 0; }
.pos-comp-src { display: grid; grid-template-columns: 200px minmax(0, 1fr) 96px 104px; gap: 10px; align-items: center; font-size: 12.5px; }
.pos-comp-name { color: var(--text-muted); }
.pos-comp-prices { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pos-comp-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.pos-comp-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-comp-chip small { color: var(--text-muted); font-size: 11px; }
.pos-comp-chip:hover { border-color: var(--accent); }
.pos-comp-chip.is-on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pos-comp-chip.is-on small { color: inherit; opacity: .75; }
.pos-comp-avg { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pos-comp-avg b { color: var(--text); }
.pos-comp-link { color: var(--accent); text-decoration: none; font-size: 12px; white-space: nowrap; text-align: right; }
.pos-comp-link:hover { text-decoration: underline; }
.pos-comp-note { margin: 0; font-size: 11.5px; color: var(--text-muted); }
.pos-comp-offer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--pos-row); font-size: 13px; }
.pos-comp-offer select { height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 0 8px; }
.pos-comp-offer .pos-unit { display: inline-flex; align-items: center; gap: 3px; }
.pos-comp-offer .pos-mini { width: 54px !important; flex: none; }
.pos-comp-offer select { width: auto !important; max-width: 100%; flex: 0 1 auto; }
.pos-comp-preview { font-variant-numeric: tabular-nums; margin-left: 4px; }
@media (max-width: 900px) {
  .pos-comp { padding-left: 14px; }
  .pos-comp-src { grid-template-columns: minmax(0, 1fr) auto; }
  .pos-comp-name { grid-column: 1 / -1; }
  .pos-comp-prices { grid-column: 1 / -1; }
}
.pos-backbar .pos-btn { gap: 5px; padding-left: 7px; }
.pos-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pos-hub-tile { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, background-color .15s; }
.pos-hub-tile:hover { border-color: var(--accent); background: var(--surface-2); }
.pos-hub-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pos-hub-ico { flex: none; width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.pos-hub-tile:hover .pos-hub-ico { background: var(--surface-3); }
.pos-hub-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pos-hub-text b { font-size: 16px; font-weight: 600; }
.pos-hub-text > span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.pos-hub-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--text-soft); }
.pos-hub-status i, .pos-phone-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex: none; }
.pos-hub-status.is-good i, .pos-phone-state.is-good i { background: var(--success); }
.pos-hub-status.is-warn i, .pos-phone-state.is-warn i { background: var(--warning); }
.pos-hub-status.is-accent { color: var(--accent); }
.pos-hub-status.is-accent i { background: var(--accent); }
.pos-phone-state { display: flex; align-items: center; gap: 8px; margin: 0 0 12px !important; font-size: 15px !important; font-weight: 600; color: var(--text); }
.pos-phone-card { max-width: 760px; }
.pos-phone-none { max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pos-phone-none p { margin: 0; }
.pos-card-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.pos-phone-uses { margin: 0 0 10px; padding-left: 18px; line-height: 1.7; font-size: 14px; color: var(--text-soft); }
.pos-phone-uses b { color: var(--text); font-weight: 600; }
.pos-till-back { flex: none; height: 38px; padding: 0 12px 0 8px; gap: 4px; }
.pos-return { position: fixed; z-index: 900; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px; border-radius: 23px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 650; box-shadow: 0 8px 24px -8px rgba(0,0,0,.55); max-width: calc(100vw - 36px); }
.pos-return span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-return:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.pos-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pos-till-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pos-till-title b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.pos-till-title span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-till-body { flex: 1; min-height: 0; display: flex; }
.pos-sell, .pos-buy { flex: 1; min-height: 0; display: flex; position: relative; }
.pos-find { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px; overflow-y: auto; }
.pos-scanrow { display: flex; gap: 10px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-content: start; }
.pos-tile-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 104px; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.pos-tile-btn:hover { border-color: var(--accent); }
.pos-tile-btn b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.pos-tile-btn span { font-size: 12.5px; color: var(--text-muted); }
.pos-tile-btn .pos-swatch { width: 34px; height: 34px; margin-bottom: 6px; }
.pos-tile-btn.is-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.pos-tile-btn.is-card img, .pos-tile-btn.is-card .pos-swatch { grid-row: 1 / span 3; width: 44px; height: 62px; border-radius: 4px; object-fit: cover; margin: 0; }
.pos-tile-btn.is-card b, .pos-tile-btn.is-card span { grid-column: 2; overflow: hidden; text-overflow: ellipsis; }
.pos-recent { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.pos-recent > div { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-recent-item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px; background: var(--surface); font-size: 12.5px; color: var(--text-soft); }
.pos-recent-item code { color: var(--text-muted); }

.pos-cart { width: 430px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); min-height: 0; padding-bottom: env(safe-area-inset-bottom); }
.pos-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; }
.pos-cart-head > div { display: flex; flex-direction: column; }
.pos-cart-head > div b { font-size: 17px; font-weight: 600; }
.pos-cart-head > div span { font-size: 12px; color: var(--text-muted); }
.pos-cust-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.pos-cust-chip svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.pos-cust-chip span { display: flex; flex-direction: column; min-width: 0; }
.pos-cust-chip b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cust-chip small { font-size: 11.5px; color: var(--pos-accent-text); }
.pos-cart-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px; }
.pos-line { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--pos-row); }
.pos-line > img, .pos-line > .pos-swatch { width: 36px; height: 50px; border-radius: 4px; object-fit: cover; flex: none; }
.pos-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; padding: 0; color: var(--text); text-align: left; cursor: pointer; }
.pos-line-main b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-line-main span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-qty { display: flex; align-items: center; gap: 6px; }
.pos-qty button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft); cursor: pointer; font-size: 15px; }
.pos-qty span { min-width: 18px; text-align: center; font-size: 13.5px; }
.pos-line-total { width: 72px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-cart-totals { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pos-total span { font-size: 15px; font-weight: 600; }
.pos-total b { font-size: 30px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.pos-cart-actions { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.pos-row3 { display: flex; gap: 8px; }
.pos-row3 > * { flex: 1; }
.pos-pay { height: 58px; border-radius: 11px; border: 0; font-size: 17px; font-weight: 700; cursor: pointer; color: var(--accent-ink); }
.pos-pay:disabled { opacity: .45; cursor: not-allowed; }
.pos-pay-cash { background: var(--accent); }
.pos-pay-card { background: #4F8FE0; }
.pos-pay-more { flex: 0 0 96px !important; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 600; }
.pos-cart-bar { display: none; }

/* Buy */
.pos-addrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pos-add { height: 58px; padding: 0 14px; border-radius: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; min-width: 0; box-sizing: border-box; }
.pos-add svg { width: 19px; height: 19px; flex: none; }
.pos-add span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pos-add b { font-size: 14px; font-weight: 600; }
.pos-add small { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-add.is-main { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pos-matching { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-soft); }
.pos-matching[hidden] { display: none; }
.pos-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); flex: none; animation: pos-spin 0.9s linear infinite; }
.pos-spin-box { animation: pos-pulse 1.2s ease-in-out infinite; }
@keyframes pos-spin { to { transform: rotate(360deg); } }
@keyframes pos-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pos-spin, .pos-spin-box { animation: none; } }
.pos-buy-table { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.pos-buy-head, .pos-buy-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 84px 88px 84px 84px; gap: 12px; align-items: center; padding: 9px 14px; }
.pos-buy-head { grid-template-columns: minmax(0, 1fr) 84px 88px 84px 84px; background: var(--surface-2); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); padding: 10px 14px 10px 60px; }
.pos-buy-head span:nth-child(n+3) { text-align: right; }
.pos-buy-row { border-top: 1px solid var(--pos-row); }
.pos-buy-row.is-out { opacity: .62; }
.pos-buy-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--text); cursor: pointer; }
.pos-buy-name b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-buy-name small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-flag { font-size: 11.5px !important; white-space: normal !important; }
.pos-flag.is-warn { color: var(--warning) !important; }
.pos-flag.is-accent { color: var(--pos-accent-text) !important; }
.pos-flag.is-info { color: var(--pos-blue) !important; }
.pos-cond { height: 30px !important; width: 74px !important; padding: 0 6px !important; font-size: 12.5px !important; font-weight: 600; }
.pos-cond.is-nm { color: var(--success); } .pos-cond.is-lp { color: #B8A11F; } .pos-cond.is-mp, .pos-cond.is-hp { color: var(--warning); } .pos-cond.is-dmg { color: var(--danger); }
.pos-num { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pos-offer-cell { background: none; border: 0; padding: 4px 0; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 6px; }
.pos-offer-cell:hover { background: var(--surface-2); }
.pos-offer { padding: 16px 18px 18px; gap: 14px; box-sizing: border-box; overflow-y: auto; }
.pos-offer-cust { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.pos-offer-cust-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pos-offer-cust-main b { font-size: 14.5px; font-weight: 600; }
.pos-offer-cust-main small { font-size: 12px; }
.pos-offer-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.pos-payouts { display: flex; flex-direction: column; gap: 8px; }
.pos-payout { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.pos-payout.is-on { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pos-payout > span { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pos-payout > span b { font-size: 14.5px; font-weight: 600; }
.pos-payout > span small { font-size: 12px; color: var(--text-muted); }
.pos-payout-amt { font-size: 21px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.pos-offer-opts { display: flex; flex-direction: column; gap: 4px; }
.pos-offer-opts .pos-check { margin-bottom: 4px; font-size: 13px; }
.pos-boxname { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; }
.pos-offer-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* Phone and small iPad: the cart / offer slides up over the items */
@media (max-width: 900px) {
  .pos-till-head { gap: 8px; padding: 0 10px; padding-top: env(safe-area-inset-top); }
  .pos-till-head .pos-pill:not(.is-warn) span { display: none; }
  .pos-till-title span { display: none; }
  .pos-till-back span { display: none; }
  .pos-till-back { padding: 0 8px; }
  .pos-cart { position: absolute; left: 0; right: 0; bottom: 0; top: 0; width: auto; border-left: 0; transform: translateY(100%); transition: transform .22s ease; z-index: 3; }
  .pos-sell.is-sheet .pos-cart, .pos-buy.is-sheet .pos-cart { transform: none; }
  .pos-cart-bar { display: flex; position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 4; justify-content: space-between; align-items: center; height: 54px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--pos-shadow); }
  .pos-cart-bar b { font-size: 18px; }
  .pos-sell.is-sheet .pos-cart-bar, .pos-buy.is-sheet .pos-cart-bar { bottom: auto; top: 10px; height: 40px; background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); }
  .pos-sell.is-sheet .pos-cart-head, .pos-buy.is-sheet .pos-offer { padding-top: 60px; }
  .pos-find { padding: 12px 12px 84px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pos-addrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-buy-head { display: none; }
  .pos-buy-row { grid-template-columns: 30px minmax(0, 1fr) 70px; grid-auto-rows: auto; row-gap: 4px; }
  .pos-buy-row > .pos-num.pos-soft { grid-column: 2; text-align: left; font-size: 12px; }
  .pos-buy-row > .pos-offer-cell { grid-column: 3; }
  .pos-buy-row > .pos-cond, .pos-buy-row > .pos-faint { grid-column: 3; grid-row: 1; }
  #posTillShiftBtn { padding: 0 10px; }
}
@media (max-width: 520px) {
  .pos-till-title { display: none; }
  .pos-seg button { padding: 0 10px; }
  #posTillExit { padding: 0 10px; font-size: 12.5px; }
  .pos-scanrow .pos-btn-tall span { display: none; }
  .pos-scan-state { display: none; }
}

/* ---------------------------------------------------------------------------
   Modals and messages
   --------------------------------------------------------------------------- */
.pos-modal-root { position: relative; z-index: 1200; font-family: var(--font-sans); }
.pos-modal-wrap { position: fixed; inset: 0; background: var(--pos-overlay); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; z-index: 1200; }
.pos-modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--pos-shadow); color: var(--text); }
.pos-modal.is-wide { max-width: 760px; }
.pos-inv-preview { display: block; width: 100%; height: min(68vh, 760px); border: 1px solid var(--border); border-radius: 10px; background: #F1EFE9; margin-bottom: 14px; }
.pos-modal.is-xl { max-width: 1100px; }
.pos-modal.is-camera { max-width: 560px; }
.pos-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.pos-modal-head h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.pos-modal-body { padding: 10px 20px 20px; overflow-y: auto; }
.pos-modal-text { color: var(--text-soft); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.pos-modal-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .pos-modal-wrap { padding: 0; align-items: flex-end; }
  .pos-modal { max-width: none !important; border-radius: 16px 16px 0 0; max-height: 94vh; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom); }
}
.pos-toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(560px, calc(100vw - 32px)); }
.pos-toast { padding: 11px 16px; border-radius: 11px; background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: var(--pos-shadow); transition: opacity .3s, transform .3s; text-align: center; }
.pos-toast.is-warn { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
.pos-toast.is-going { opacity: 0; transform: translateY(6px); }

.pos-menu { display: flex; flex-direction: column; gap: 8px; }
.pos-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.pos-menu-item b { font-size: 14.5px; font-weight: 600; }
.pos-menu-item span { font-size: 12.5px; color: var(--text-muted); }
.pos-menu-item.is-strong { border-color: var(--accent); }
.pos-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pos-diff { font-weight: 600; margin: -4px 0 12px; font-size: 14px; }
.pos-diff.is-over { color: var(--success); }
.pos-diff.is-short { color: var(--warning); }
.pos-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pos-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pos-list-row .pos-check { margin: 0; }
.pos-list-main { flex: 1; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; padding: 2px 0; color: var(--text); text-align: left; cursor: pointer; }
.pos-list-main b { font-size: 14px; font-weight: 600; }
.pos-list-main span { font-size: 12px; color: var(--text-muted); }
.pos-total-line { font-size: 16px; font-weight: 600; margin: 8px 0 0; }

/* Payment */
.pos-paybox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; }
@media (max-width: 640px) { .pos-paybox { grid-template-columns: minmax(0, 1fr); } }
.pos-due { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.pos-due span { font-size: 12.5px; color: var(--text-muted); }
.pos-due b { font-size: 34px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.pos-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pos-method { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 64px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.pos-method b { font-size: 15px; font-weight: 600; }
.pos-method span { font-size: 12px; color: var(--text-muted); }
.pos-method.is-on { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pos-method:disabled { opacity: .45; cursor: not-allowed; }
.pos-change { font-size: 18px; font-weight: 600; color: var(--success); min-height: 24px; margin: -4px 0 10px; }
.pos-paydone { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 12px; background: var(--success-bg); color: var(--success); margin-bottom: 12px; }
.pos-paydone b { font-size: 20px; }
.pos-paydone span { font-size: 26px; font-weight: 700; }
.pos-done { text-align: center; }
.pos-rc { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* Sell to us (pos-sell.js) */
.pos-sell-tabs { margin-bottom: 12px; }
.pos-inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 14px; align-items: start; }
.pos-sell-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.pos-sell-item { text-align: left; border: 0; border-bottom: 1px solid var(--pos-row); border-left: 3px solid transparent; background: none; color: var(--text); font: inherit; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.pos-sell-item.is-on { background: var(--surface-2); border-left-color: var(--accent); }
.pos-sell-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pos-sell-item small { color: var(--text-muted); font-size: 12.5px; }
.pos-sell-money { font-size: 13px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.pos-sell-st { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-muted); vertical-align: middle; }
.pos-sell-st.is-new { background: var(--accent-bg, #33280F); color: var(--accent); }
.pos-sell-st.is-offer { color: #7FB0E8; }
.pos-sell-st.is-coming { background: var(--success-bg); color: var(--success); }
.pos-sell-st.is-declined { color: var(--warning); }
.pos-sell-detail { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 18px 20px; min-width: 0; }
.pos-sell-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.pos-sell-head h3 { margin: 0; font-size: 19px; }
.pos-sell-head p { margin: 4px 0 0; font-size: 13px; }
.pos-sell-head select { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 10px; }
.pos-sell-note { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); font-size: 13px; color: var(--text-soft); margin: 0 0 12px; }
.pos-sell-detail .pos-table-wrap { overflow-x: auto; }
.pos-sell-detail .pos-table { min-width: 0; width: 100%; }
.pos-sell-detail .pos-table th, .pos-sell-detail .pos-table td { padding-left: 8px; padding-right: 8px; }
.pos-page-head a, .pos-sell-head a { color: var(--accent); }
.pos-sell-total { font-size: 14.5px; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.pos-accent { color: var(--accent); }
.pos-cond-txt { font-weight: 600; color: var(--success); }
.pos-cond-txt.is-lp { color: var(--accent); }
.pos-cond-txt.is-mp, .pos-cond-txt.is-hp, .pos-cond-txt.is-dmg { color: var(--warning); }
.pos-sell-slug { display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.pos-sell-slug input { flex: 1; min-width: 140px; }
@media (max-width: 900px) {
  .pos-inbox { grid-template-columns: minmax(0, 1fr); }
  .pos-inbox.has-pick .pos-sell-list { display: none; }
}

/* Website (pos-site.js) */
a.pos-btn { color: var(--text); text-decoration: none; }
a.pos-btn:hover { color: var(--text); }
.pos-site-edit { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pos-site-edit.is-solo { grid-template-columns: minmax(0, 860px); }
.pos-site-form { min-width: 0; }
.pos-site-preview { position: sticky; top: 12px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pos-site-prevbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pos-site-framebox { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; height: calc(100vh - 330px); min-height: 300px; max-height: 900px; }
.pos-site-framefail { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--surface); color: var(--text); }
#siteSavebar { z-index: 3; border-top: 1px solid var(--border); }
.pos-site-framebox iframe { width: 100%; height: 100%; border: 0; display: block; }
.pos-site-framebox.is-phone { width: 390px; max-width: 100%; margin: 0 auto; border-radius: 26px; border: 8px solid var(--surface-3); }
.pos-site-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-site-style { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); padding: 8px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit; }
.pos-site-style.is-on { border: 2px solid var(--accent); padding: 7px; }
.pos-site-style b { font-size: 13px; }
.pos-site-style small { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }
.pos-site-swatch { height: 52px; border-radius: 7px; background: #fff; display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.pos-site-swatch i { height: 5px; width: 55%; border-radius: 3px; background: #14161A; }
.pos-site-swatch em { flex: 1; border-radius: 4px; background: var(--c); }
.pos-site-swatch.is-clean em { background: #E8EAEE; border-left: 4px solid var(--c); }
.pos-site-swatch.is-night { background: #121418; }
.pos-site-swatch.is-night i { background: #ECEEF2; }
.pos-site-swatch.is-night em { background: #1C2027; border-left: 4px solid var(--c); }
.pos-site-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pos-site-color { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; outline: 1px solid var(--border); }
.pos-site-color.is-on { border-color: var(--surface); outline: 2px solid var(--text); }
.pos-site-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
.pos-site-custom input { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.pos-site-picrow { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-bottom: 10px; }
.pos-site-picbox { border: 1px dashed var(--border-2, var(--border)); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 84px; justify-content: center; }
.pos-site-picbox img { max-height: 64px; object-fit: contain; border-radius: 6px; align-self: flex-start; max-width: 100%; }
.pos-site-picbox b { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.pos-site-event { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px; margin-bottom: 10px; }
.pos-site-event input { height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 10px; min-width: 0; font: inherit; font-size: 13.5px; }
.pos-site-event .pos-site-evnote { grid-column: 1 / -1; }
.pos-site-folder { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 12px; }
/* Card payments at the till (pos-till.js card panel, Settings › Card readers) */
.pos-cardhow { margin-bottom: 12px; }
.pos-cardwait { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; }
.pos-cardwait > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pos-cardwait b { font-size: 18px; }
.pos-cardwait span { font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }
.pos-cardwait .pos-spin { width: 56px; height: 56px; flex: none; border-width: 4px; }
.pos-cardwait.is-qr { align-items: flex-start; }
.pos-cardqr { width: 190px; flex: none; background: #fff; border-radius: 10px; padding: 6px; }
.pos-cardqr svg { display: block; width: 100%; height: auto; }
.pos-cardsteps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-muted); }
.pos-cardsteps li { display: flex; align-items: center; gap: 10px; }
.pos-cardsteps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; box-sizing: border-box; }
.pos-cardsteps li.is-done { color: var(--success); }
.pos-cardsteps li.is-done::before { background: currentColor; }
.pos-cardsteps li.is-now { color: var(--accent); font-weight: 600; }
.pos-spin-sm { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: pos-spin .9s linear infinite; vertical-align: -1px; margin-right: 4px; }
.pos-paircode { font-size: 40px; font-weight: 700; letter-spacing: 6px; text-align: center; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.pos-details { margin: 6px 0 10px; font-size: 13.5px; }
.pos-details summary { cursor: pointer; color: var(--text-soft); margin-bottom: 8px; }
@media (max-width: 760px) { .pos-cardwait.is-qr { flex-direction: column; align-items: center; } }
.pos-site-paywarn { color: var(--warning); font-size: 12.5px; line-height: 1.45; display: block; }
.pos-site-paylist { display: flex; flex-direction: column; gap: 8px; }
.pos-site-payrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.pos-site-payrow.is-on { border-color: color-mix(in srgb, var(--success, #5BBF8A) 55%, var(--border)); }
.pos-site-payacts { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-site-payinfo { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pos-site-payinfo small { color: var(--text-muted); font-size: 12.5px; }
.pos-site-payuse { margin: 0; white-space: nowrap; }
.pos-site-rates { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pos-site-rate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pos-site-rate > input { flex: 1 1 160px; min-width: 0; height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 10px; font: inherit; font-size: 13.5px; }
.pos-site-rate .pos-unit input { width: 84px; height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 8px; font: inherit; font-size: 13.5px; }
.pos-site-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-soft); font-size: 13.5px; line-height: 1.5; }
.pos-steps { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text-soft); }
.pos-err { color: var(--danger, #E5484D); font-size: 13px; min-height: 1em; margin: 6px 0 0; }
.pos-site-shipto { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin: 0 0 12px; font-size: 13.5px; }
.pos-site-shipto small { color: var(--text-muted); }
.pos-site-find { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.pos-site-find .pos-scanbox { flex: 1 1 360px; max-width: 560px; }
.pos-site-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pos-site-group { font-size: 18px; margin: 22px 0 10px; scroll-margin-top: 12px; }
.pos-site-jump + .pos-site-group { margin-top: 12px; }
.pos-site-piclist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pos-site-picitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.pos-site-picitem.is-new { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.pos-site-picinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pos-site-picinfo b { overflow-wrap: anywhere; font-size: 13.5px; }
.pos-site-picinfo small { color: var(--text-muted); font-size: 12px; }
.pos-site-picinfo select { margin-top: 2px; max-width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.pos-site-thumb { width: 52px; height: 40px; object-fit: contain; border-radius: 5px; background: var(--surface-2); }
.pos-site-pics select { height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); max-width: 220px; font: inherit; font-size: 13px; }
@media (max-width: 1100px) {
  .pos-site-edit { grid-template-columns: minmax(0, 1fr); }
  .pos-site-preview { position: static; }
  .pos-site-framebox { height: 640px; }
}

/* Staff PINs (pos-staff.js) */
.pos-pin { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pos-pin .pos-modal-text { text-align: center; margin: 0; }
.pos-pin-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pos-pin-person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; border: 0; background: none; color: var(--text-muted); font: inherit; cursor: pointer; }
.pos-pin-person span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #0B0D10; }
.pos-pin-person.is-on span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.pos-pin-person.is-on { color: var(--text); }
.pos-pin-dots { display: flex; gap: 14px; min-height: 16px; }
.pos-pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); box-sizing: border-box; }
.pos-pin-dots i.is-on { background: var(--accent); border-color: var(--accent); }
.pos-pin-msg { margin: 0; min-height: 18px; font-size: 13px; color: var(--warning); text-align: center; }
.pos-pin-msg.is-hint { color: var(--text-muted); }
.pos-pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; }
.pos-pin-key { height: 58px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 22px; cursor: pointer; }
.pos-pin-key:active { background: var(--surface-3); }
.pos-pill.is-staff { cursor: pointer; color: var(--text); font: inherit; font-size: 12.5px; padding-left: 4px; }
.pos-staff-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #0B0D10; flex: none; }
.pos-staff-dot.is-big { width: 34px; height: 34px; font-size: 12.5px; }
.pos-staff-list { display: flex; flex-direction: column; }
.pos-staff-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--pos-row); }
.pos-staff-row.is-off { opacity: .55; }
.pos-staff-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-staff-name small { color: var(--text-muted); font-size: 12px; }
.pos-staff-role { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.pos-staff-role.is-owner { color: var(--accent); }
.pos-staff-role.is-manager { color: #7FB0E8; }
.pos-seg-wide { display: flex; width: 100%; box-sizing: border-box; }
.pos-seg-wide button { flex: 1; height: 40px; font-size: 14px; }
.pos-seg button:disabled { opacity: .4; cursor: not-allowed; }
.pos-rc-email { display: flex; flex-direction: column; gap: 8px; }
.pos-rc-email .pos-check small { font-size: 12px; }
.pos-change-big { display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: 14px; background: var(--success-bg); color: var(--success); margin-bottom: 12px; }
.pos-change-big span { font-size: 14px; }
.pos-change-big b { font-size: 40px; font-weight: 700; letter-spacing: -.8px; }

/* Camera */
.pos-cam { position: relative; height: min(420px, 56vh); border-radius: 14px; overflow: hidden; background: #111; display: flex; align-items: center; justify-content: center; }
.pos-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pos-cam-frame { position: relative; width: 74%; height: 38%; border-radius: 14px; border: 2px solid rgba(255,255,255,.22); }
.pos-cam-frame.is-card { width: 52%; height: 84%; }
.pos-cam-frame i { position: absolute; width: 30px; height: 30px; border: 4px solid #D9A441; }
.pos-cam-frame i:nth-child(1) { left: -3px; top: -3px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.pos-cam-frame i:nth-child(2) { right: -3px; top: -3px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.pos-cam-frame i:nth-child(3) { left: -3px; bottom: -3px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.pos-cam-frame i:nth-child(4) { right: -3px; bottom: -3px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.pos-cam-frame b { position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: #E0626F; }
.pos-cam-msg { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-size: 13px; margin: 0; text-shadow: 0 1px 3px rgba(0,0,0,.7); padding: 0 12px; }
.pos-cam-bar { display: flex; gap: 8px; margin-top: 12px; }
.pos-cam-bar .pos-btn { flex: 1; height: 46px; }
.pos-cam-shoot { flex: 2 !important; }
.pos-cam-last { margin: 10px 0 0; min-height: 20px; font-size: 13.5px; color: var(--success); text-align: center; }

/* Search results */
.pos-results-list, .pos-alts { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pos-alts { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pos-result { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.pos-result:hover { border-color: var(--accent); }
.pos-result img { width: 34px; height: 48px; border-radius: 4px; object-fit: cover; flex: none; }
.pos-result > span:not(.pos-avatar) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pos-result b { font-size: 14px; font-weight: 500; }
.pos-result small { font-size: 12px; color: var(--text-muted); }
.pos-result .pos-accent-text { flex: none; font-size: 12.5px; }

/* Customers */
.pos-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .pos-choice { grid-template-columns: minmax(0, 1fr); } }
.pos-choice-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.pos-choice-card:hover:not(:disabled) { border-color: var(--accent); }
.pos-choice-card:disabled { opacity: .55; cursor: not-allowed; }
.pos-choice-card b { font-size: 16px; }
.pos-choice-card span { font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.pos-choice-card small { font-size: 12px; color: var(--text-muted); }
.pos-consent { padding: 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 12px; }
.pos-consent .pos-check { margin-bottom: 4px; }
.pos-profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pos-profile-head > div { display: flex; flex-direction: column; }
.pos-profile-head > div b { font-size: 21px; font-weight: 600; }
.pos-profile-head > div small { font-size: 13px; color: var(--text-muted); }
.pos-profile-cols { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .pos-profile-cols { grid-template-columns: minmax(0, 1fr); } }
.pos-note { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.5; white-space: pre-wrap; }
.pos-want { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--pos-row); font-size: 13.5px; }
.pos-want > span:first-child { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pos-want small { font-size: 12px; color: var(--text-muted); }
.pos-hist-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px 100px; gap: 10px; padding: 9px 0; border-top: 1px solid var(--pos-row); font-size: 13.5px; align-items: baseline; }
.pos-hist-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.pos-hist-row small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-hist-row .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .pos-hist-row { grid-template-columns: 56px minmax(0, 1fr) 80px; } .pos-hist-row > small:last-child { display: none; } }
.pos-filecard { display: flex; align-items: center; gap: 14px; padding: 13px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; flex-wrap: wrap; }
.pos-filecard > span:not(.pos-fileicon) { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-filecard b { font-size: 14.5px; font-weight: 600; }
.pos-filecard small { font-size: 12.5px; color: var(--text-muted); }
.pos-fileicon { width: 40px; height: 50px; border-radius: 6px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--pos-accent-text); font-size: 11px; font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-sizing: border-box; flex: none; }
.pos-checks { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.pos-checks li { position: relative; padding-left: 26px; font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.pos-checks li::before { content: "i"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); color: var(--text-soft); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pos-checks li.is-good::before { content: "✓"; background: var(--success-bg); color: var(--success); }

/* Products */
.pos-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-swatch-btn { width: 28px; height: 28px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.pos-swatch-btn.is-on { border-color: var(--text); }
.pos-label-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 10px; background: #fff; color: #000; margin-bottom: 10px; }
.pos-label-preview svg { width: 200px; height: 38px; }
.pos-label-preview span { font-family: var(--font-mono); font-size: 11px; }

/* Buy rules */
.pos-cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.pos-cond-grid .pos-field { margin: 0; }
.pos-cond-grid .pos-unit input { width: 64px !important; }
.pos-bulk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--text-soft); }
.pos-bulk-row > input { flex: 1 1 180px; height: 34px !important; }
.pos-bulk-row .pos-mini { width: 60px !important; }
.pos-reflist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pos-ref { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.pos-ref small { color: var(--text-muted); }
.pos-ref .pos-icon-btn { width: 22px; height: 22px; border: 0; }

/* Orders page dot for POS sales */
.ord-d-pos { background: #D9A441; }

/* Invoices (pos-invoices.js) */
.pos-inv-edit { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1050px) { .pos-inv-edit { grid-template-columns: minmax(0, 1fr); } }
.pos-inv-res { max-height: 300px; margin-top: 8px; }
.pos-inv-res:empty { display: none; }
.pos-inv-lines { display: flex; flex-direction: column; margin: 14px 0 8px; }
.pos-inv-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 90px 30px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--pos-row); }
.pos-inv-line > input { height: 36px; text-align: right; min-width: 0; }
.pos-inv-line .pos-who input { width: 100%; height: 36px; }
.pos-inv-line .pos-who span { flex: 1; }
.pos-inv-amt { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.pos-inv-head { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); padding-top: 0; }
.pos-inv-head > span:nth-child(n+2) { text-align: right; }
@media (max-width: 560px) {
  .pos-inv-line { grid-template-columns: minmax(0, 1fr) 56px 84px 30px; }
  .pos-inv-line .pos-inv-amt { display: none; }
}
.pos-inv-sums { margin: 14px 0 8px auto; max-width: 360px; display: flex; flex-direction: column; gap: 7px; }
.pos-inv-sums .pos-field-row { margin-bottom: 4px; }
.pos-inv-sums .pos-field-row input { max-width: 120px; }
.pos-inv-due { font-size: 15px; }
.pos-inv-unpay { height: 22px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.pos-inv-acts { margin-top: 16px; }
.pos-inv-back { display: none; margin-bottom: 10px; }
@media (max-width: 900px) { .pos-inv-back { display: inline-flex; } }

/* POS › Website › Web Design › Social Links */
.pos-soc-where { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pos-soc-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; min-width: 0; }
.pos-soc-opt.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pos-soc-opt input { margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.pos-soc-opt span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pos-soc-opt b { font-size: 14px; color: var(--text); font-weight: 600; }
.pos-soc-opt small { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.pos-soc-pagefields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 0 12px; }
.pos-soc-pagefields .pos-field { margin-bottom: 0; }
.pos-soc-add { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); margin-bottom: 12px; }
.pos-soc-addrow { display: flex; gap: 8px; }
.pos-soc-addrow input { flex: 1; min-width: 0; }
.pos-soc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-soc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font: inherit; font-size: 12.5px; cursor: pointer; min-height: 28px; }
.pos-soc-chip:hover { color: var(--text); border-color: var(--text-faint); }
.pos-soc-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 8px; }
.pos-soc-pic { position: relative; flex: none; width: 52px; height: 52px; }
.pos-soc-pic img { width: 52px; height: 52px; display: block; }
.pos-soc-pic img.is-avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.pos-soc-pic .pos-soc-badge { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface-2); }
.pos-soc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pos-soc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.pos-soc-head b { font-size: 14px; color: var(--text); }
.pos-soc-st { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-soft); }
.pos-soc-st.is-ok { background: var(--success-bg); color: var(--success); }
.pos-soc-st.is-warn { background: var(--warning-bg); color: var(--warning); }
.pos-soc-main input, .pos-soc-main select { height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; min-width: 0; font: inherit; font-size: 13.5px; }
.pos-soc-picsel { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.pos-soc-picsel select { flex: 1; }
.pos-soc-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pos-soc-acts .pos-btn { min-width: 36px; padding: 0; justify-content: center; }
@media (max-width: 640px) {
  .pos-soc-where, .pos-soc-pagefields { grid-template-columns: minmax(0, 1fr); }
  .pos-soc-row { flex-wrap: wrap; }
  .pos-soc-acts { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* POS › Website › Web Design › Hero Section (pos-site.js) */
.pos-hero-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pos-hero-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.pos-hero-row.is-on { border-color: var(--accent); }
.pos-hero-name { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 4px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pos-hero-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pos-hero-name small { font-size: 12px; color: var(--text-soft); }
.pos-hero-show { margin: 0; font-size: 13px; }
.pos-hero-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .pos-hero-two { grid-template-columns: minmax(0, 1fr); } }
.pos-btn.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--text); font-weight: 600; }
.pos-hero-srcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 520px) { .pos-hero-srcs { grid-template-columns: minmax(0, 1fr); } }
.pos-hero-src { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pos-hero-src b { font-size: 13.5px; }
.pos-hero-src small { font-size: 12px; color: var(--text-soft); line-height: 1.4; }
.pos-hero-src.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.pos-hero-hits, .pos-hero-picked { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; max-height: 360px; overflow-y: auto; }
.pos-hero-card { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; }
button.pos-hero-card { cursor: pointer; }
button.pos-hero-card:disabled { opacity: .55; cursor: default; }
.pos-hero-card img { width: 34px; aspect-ratio: 63 / 88; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.pos-hero-card span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pos-hero-card b { font-size: 13.5px; }
.pos-hero-card small { font-size: 12px; color: var(--text-soft); }
.pos-hero-card em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--pos-accent-text); }
.pos-hero-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pos-hero-pic { position: relative; padding: 0; border-radius: 9px; border: 2px solid var(--border); background: var(--surface-2); overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; }
.pos-hero-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pos-hero-pic.is-on { border-color: var(--accent); }
.pos-hero-pic em { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
/* POS › Website › What's for sale › Show cards from (pos-site.js) */
.pos-sale-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.pos-sale-tools input[type="search"] { flex: 1 1 220px; min-width: 0; height: 40px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; font-size: 14px; }
.pos-sale-group { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.pos-sale-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pos-sale-head h5 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .06em; }
.pos-sale-head .pos-hint { margin: 0; }
.pos-sale-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.pos-sale-row[hidden] { display: none; }
.pos-sale-row input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; margin: 0; }
.pos-sale-row:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pos-sale-row.is-locked { opacity: .6; cursor: default; }
.pos-sale-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pos-sale-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-sale-info b small { font-weight: 400; color: var(--text-soft); font-size: 12px; }
.pos-sale-info > small { font-size: 12px; color: var(--text-soft); }
.pos-sale-value { font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.pos-sale-sum { margin: 0 0 8px; font-size: 13.5px; color: var(--text); }

/* ---- POS › Website › Events (pos-events.js) ---- */
.pos-warn-text { color: var(--warn, #E5A13A); font-size: 13px; margin: 0 0 10px; }
.pos-ev { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.pos-ev-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.pos-ev-seg { width: 100%; }
.pos-ev-seg button { flex: 1; }
.pos-ev-off { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pos-ev-off .pos-btn { align-self: flex-start; }
.pos-ev-list { display: flex; flex-direction: column; gap: 8px; }
.pos-ev-item { display: flex; gap: 12px; align-items: center; padding: 9px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.pos-ev-item:hover { border-color: var(--text-muted); }
.pos-ev-item.is-on { border-color: var(--accent); background: var(--surface-2); }
.pos-ev-thumb { width: 60px; height: 46px; flex: none; border-radius: 8px; background-size: cover; background-position: center; display: inline-flex; align-items: center; justify-content: center; }
.pos-ev-thumb i { width: 12px; height: 12px; border-radius: 50%; }
.pos-ev-iteminfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pos-ev-iteminfo b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-ev-iteminfo small { font-size: 12px; color: var(--text-muted); }
.pos-ev-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pos-ev-tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.pos-ev-tag.is-sign { background: color-mix(in srgb, #3B82F6 22%, transparent); color: #9CC8FF; }
.pos-ev-tag.is-live { background: color-mix(in srgb, #F0466E 22%, transparent); color: #FFA3BC; }
.pos-ev-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pos-ev-main .pos-card { margin: 0; }
.pos-ev-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.pos-ev-head h4 { margin: 0; }
.pos-ev-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pos-ev-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.pos-ev-opt { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin: 0 0 10px; }
.pos-ev-opt-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 54px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pos-ev-opt-head > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pos-ev-opt-head b { font-size: 14px; }
.pos-ev-opt-head small { font-size: 12px; color: var(--text-muted); }
.pos-ev-switch { width: 42px; height: 24px; flex: none; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.pos-ev-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.pos-ev-switch.is-on { background: var(--accent); }
.pos-ev-switch.is-on i { left: 21px; }
.pos-ev-opt-body { padding: 0 14px 14px; margin: 0; }
.pos-ev-picrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pos-ev-picrow .pos-row-btns { margin: 0; }
.pos-ev-pic { width: 168px; height: 100px; border-radius: 10px; background: var(--surface) center / cover no-repeat; border: 1px dashed var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); }
.pos-ev-signbar { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface); margin: 4px 0 10px; }
.pos-ev-picgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-ev-picbtn { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.pos-ev-picbtn img { width: 100%; height: 96px; object-fit: cover; border-radius: 6px; background: var(--surface); }
.pos-ev-picbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-ev-picbtn.is-on, .pos-ev-picbtn:hover { border-color: var(--accent); }
.pos-ev-aibtn { border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.pos-ev-spark { width: 15px; height: 15px; flex: none; }
/* Make a picture with AI */
.pos-evai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pos-evai-left { padding: 16px 18px 6px; border-right: 1px solid var(--border); }
.pos-evai-right { padding: 16px 18px; background: var(--surface-2); display: flex; flex-direction: column; }
.pos-evai-step { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.pos-evai-step > span { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--accent); color: #111; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pos-evai-step b { font-size: 15px; color: var(--text); }
.pos-evai-step small { margin-left: auto; font-size: 12px; color: var(--text-muted); text-align: right; }
.pos-evai-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-evai-opt { display: flex; flex-direction: column; gap: 3px; min-height: 58px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pos-evai-opt b { font-size: 13px; }
.pos-evai-opt small { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.pos-evai-opt.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.pos-evai-opt.is-on b { color: var(--accent); }
.pos-evai-opt.is-pill { flex-direction: row; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 999px; font-size: 12.5px; }
.pos-evai-opt.is-row { flex-direction: row; align-items: center; gap: 10px; }
.pos-evai-opt.is-row > span { display: flex; flex-direction: column; gap: 2px; }
.pos-evai-sw { display: inline-flex; }
.pos-evai-sw i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); }
.pos-evai-sw i + i { margin-left: -4px; }
.pos-evai-shape { flex: none; border: 2px solid currentColor; border-radius: 3px; opacity: .75; }
.pos-evai-shape.is-square { width: 20px; height: 20px; }
.pos-evai-shape.is-tall { width: 16px; height: 24px; }
.pos-evai-shape.is-wide { width: 28px; height: 16px; }
.pos-evai-seg { display: flex; }
.pos-evai-seg button { flex: 1; height: auto; min-height: 36px; padding: 6px 10px; }
.pos-evai-right textarea { min-height: 380px; font-size: 13px; line-height: 1.55; background: var(--surface); }
.pos-evai-copyrow { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; flex-wrap: wrap; }
.pos-evai-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pos-evai-tools a { justify-content: center; text-decoration: none; }
.pos-evai-up { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 2px; }
.pos-evai-drop { min-height: 88px; border-radius: 12px; border: 1.5px dashed var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px; text-align: center; cursor: pointer; color: var(--text-soft); font-size: 13.5px; }
.pos-evai-drop b { color: var(--text); }
.pos-evai-drop small { font-size: 12px; color: var(--text-muted); }
.pos-evai-drop.is-over, .pos-evai-drop:hover { border-color: var(--accent); }
.pos-evai-drop.is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 860px) {
  .pos-evai { grid-template-columns: minmax(0, 1fr); }
  .pos-evai-left { border-right: 0; border-bottom: 1px solid var(--border); }
  .pos-evai-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-evai-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pos-ev-signups { display: flex; flex-direction: column; gap: 12px; }
.pos-ev-signhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pos-ev-signtitle { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.pos-ev-signtitle h4 { margin: 0; font-size: 18px; }
.pos-ev-datepick { margin: 0; min-width: 170px; }
.pos-ev-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pos-ev-stat { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pos-ev-stat span { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.pos-ev-stat b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-ev-stat small { font-size: 12px; color: var(--text-muted); }
.pos-ev-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pos-ev-tools input { flex: 1 1 260px; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; font-size: 14px; }
.pos-ev-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.pos-ev-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); }
.pos-ev-row:first-child { border-top: 0; }
.pos-ev-n { width: 24px; flex: none; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pos-ev-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pos-ev-who b { font-size: 14px; }
.pos-ev-who small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.pos-ev-toggle { min-width: 104px; }
.pos-ev-toggle.is-paid { border-color: #2E7D5B; background: color-mix(in srgb, #2E7D5B 22%, transparent); color: #7FD8A8; }
.pos-ev-toggle.is-in { border-color: #3B6EA8; background: color-mix(in srgb, #3B6EA8 22%, transparent); color: #8CC8FF; }
.pos-ev-waith { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.pos-ev-deck { white-space: pre-wrap; font-size: 13px; line-height: 1.5; max-height: 60vh; overflow: auto; margin: 0; }
@media (max-width: 900px) {
  .pos-ev { grid-template-columns: minmax(0, 1fr); }
  .pos-ev-side { position: static; }
  .pos-ev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pos-ev-3 { grid-template-columns: minmax(0, 1fr); }
  .pos-ev-row { flex-wrap: wrap; }
  .pos-ev-toggle { flex: 1; min-width: 0; }
}
