/*
 * Liana's Boutique — Point of sale
 *
 * The boutique's palette and type, laid out for a till: large targets,
 * figures that read at arm's length, the sale always in view. One component
 * system for every POS screen. Built for a laptop first; on a tablet or
 * phone the layout stacks and the sections move to a bar at the bottom.
 *
 *  1. Tokens and base        6. The till
 *  2. Top bar and sections   7. Modals, payment, toast
 *  3. Buttons and forms      8. Ordinary pages
 *  4. Small pieces           9. Sign in
 *  5. Cards, tables, stats  10. Receipt and labels   11. Narrow screens   12. Print
 */

@font-face {
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/playfair-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Jost";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("../fonts/jost-latin.woff2") format("woff2");
}

/* ---------- 1. Tokens and base ---------- */
:root {
    --cream: #fbf4ec;
    --cream-deep: #f5eadf;
    --sand: #eadfd3;
    --sand-deep: #d9cabb;
    --paper: #ffffff;
    --ink: #1c1714;
    --ink-2: #3a302a;
    --ink-soft: #5c524a;
    --ink-faint: #8c8178;
    --accent: #a16c4b;
    --accent-bg: #f4e7dc;
    --success: #2f6a47;
    --success-bg: #e2f0e6;
    --error: #a33a2c;
    --error-bg: #f8e1dc;
    --warn: #8a5a0b;
    --warn-bg: #f8ecd0;

    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --line: 1px solid var(--sand);
    --shadow-1: 0 1px 2px rgba(60, 40, 25, 0.05), 0 6px 18px -12px rgba(60, 40, 25, 0.28);
    --shadow-2: 0 2px 4px rgba(60, 40, 25, 0.06), 0 22px 44px -24px rgba(60, 40, 25, 0.42);
    --ring: 0 0 0 3px rgba(28, 23, 20, 0.1);
    --bar-h: 68px;
    --nav-h: 0px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; padding-bottom: var(--nav-h); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); letter-spacing: -0.005em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.8125rem; padding: 2px 7px; border-radius: var(--radius-xs); background: var(--cream-deep); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.ico { flex: none; }

/* ---------- 2. Top bar and sections ---------- */
.pos-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 20px; height: var(--bar-h); padding: 0 24px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: var(--line); }
.pos-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.pos-brand__logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pos-brand__logo--full { width: auto; height: 44px; max-width: 110px; border-radius: 0; object-fit: contain; }
.pos-brand__text { display: grid; line-height: 1.1; }
.pos-brand__name { font-family: var(--font-display); font-size: 1.1875rem; letter-spacing: 0.08em; }
.pos-brand__tag { font-size: 0.5625rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }

.pos-nav { display: flex; gap: 2px; padding: 4px; margin-left: 8px; background: var(--cream-deep); border-radius: 99px; }
.pos-nav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px; text-decoration: none; font-size: 0.9375rem; color: var(--ink-soft); transition: background-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.pos-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.pos-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); box-shadow: 0 6px 14px -8px rgba(28, 23, 20, 0.7); }

.pos-bar__side { margin-left: auto; display: flex; align-items: center; gap: 16px; min-width: 0; }
.pos-event { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; height: 36px; padding: 0 14px; border: var(--line); border-radius: 99px; background: var(--paper); font-size: 0.8125rem; color: var(--ink-soft); text-decoration: none; white-space: nowrap; transition: border-color 0.18s var(--ease); }
.pos-event:hover { border-color: var(--sand-deep); }
.pos-event span { overflow: hidden; text-overflow: ellipsis; }
.pos-event::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sand-deep); }
.pos-event.is-open { border-color: transparent; background: var(--success-bg); color: var(--success); font-weight: 500; }
.pos-event.is-open::before { background: var(--success); box-shadow: 0 0 0 3px rgba(47, 106, 71, 0.18); }
.pos-user { display: flex; align-items: center; gap: 10px; }
.pos-user__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--font-display); font-size: 1rem; }
.pos-user__text { display: grid; line-height: 1.2; }
.pos-user__text strong { font-weight: 500; font-size: 0.875rem; white-space: nowrap; }
.pos-user__text small { font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- 3. Buttons and forms ---------- */
.pos-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: transparent; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease); }
.pos-btn:active:not(:disabled) { transform: translateY(1px); }
.pos-btn--dark { background: var(--ink); color: var(--paper); box-shadow: 0 10px 20px -14px rgba(28, 23, 20, 0.8); }
.pos-btn--dark:hover:not(:disabled) { background: var(--ink-2); border-color: var(--ink-2); }
.pos-btn--light { background: var(--paper); border-color: var(--sand-deep); }
.pos-btn--light:hover:not(:disabled) { border-color: var(--ink); }
.pos-btn--quiet { min-height: 40px; padding: 0 12px; border-color: transparent; color: var(--ink-soft); letter-spacing: 0.08em; }
.pos-btn--quiet:hover:not(:disabled) { color: var(--ink); background: var(--cream-deep); }
.pos-btn--danger { background: var(--paper); border-color: #e3b6ad; color: var(--error); }
.pos-btn--danger:hover:not(:disabled) { background: var(--error); border-color: var(--error); color: var(--paper); }
.pos-btn--danger-solid { background: var(--error); border-color: var(--error); color: var(--paper); box-shadow: 0 10px 20px -14px rgba(163, 58, 44, 0.9); }
.pos-btn--danger-solid:hover:not(:disabled) { background: #8a2f23; border-color: #8a2f23; }
.pos-btn--icon { width: 40px; padding: 0; }
.pos-btn--icon:hover:not(:disabled) { color: var(--error); background: var(--error-bg); }
.pos-btn--block { width: 100%; }
.pos-btn--lg { min-height: 56px; font-size: 0.875rem; }
.pos-btn:disabled { opacity: 0.45; box-shadow: none; }

.pos-form { display: grid; gap: 16px; }
.pos-form label { display: grid; gap: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-soft); }
.pos-form input[type="text"], .pos-form input[type="email"], .pos-form input[type="password"], .pos-form input[type="search"] { width: 100%; min-height: 50px; padding: 0 14px; background: var(--paper); border: 1px solid var(--sand-deep); border-radius: var(--radius-sm); font-size: 1.0625rem; font-weight: 400; color: var(--ink); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.pos-form input::placeholder { color: var(--ink-faint); }
.pos-form input:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.pos-form--inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.pos-form--inline .pos-check, .pos-form--inline .pos-form__full { grid-column: 1 / -1; }
.pos-form--row { display: flex; gap: 8px; align-items: center; }
.pos-form--row input { min-width: 260px; }
.pos-form label.pos-check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: var(--line); border-radius: var(--radius-sm); background: var(--cream); font-size: 0.9375rem; font-weight: 400; color: var(--ink); line-height: 1.4; cursor: pointer; }
.pos-check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.pos-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.pos-actions--start { justify-content: flex-start; }
.pos-hint { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.5; }
.pos-hint--icon { display: flex; align-items: flex-start; gap: 8px; }
.pos-hint--icon .ico { margin-top: 3px; }
.pos-eyebrow { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.pos-eyebrow a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-faint); }
.pos-eyebrow a:hover { color: var(--ink); }

/* ---------- 4. Small pieces ---------- */
.pos-flash { display: flex; align-items: flex-start; gap: 10px; margin: 16px 24px 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9375rem; line-height: 1.45; }
.pos-flash--success { background: var(--success-bg); color: var(--success); }
.pos-flash--error { background: var(--error-bg); color: var(--error); }
.pos-modal .pos-flash, .pos-login .pos-flash, .pos-card .pos-flash { margin: 0; }

.seg { display: inline-flex; padding: 4px; background: var(--cream-deep); border-radius: 99px; }
.seg label, .seg a { position: relative; display: block; cursor: pointer; text-decoration: none; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span, .seg a { display: block; padding: 8px 18px; border-radius: 99px; font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap; transition: background-color 0.18s var(--ease), color 0.18s var(--ease); }
.seg input:checked + span, .seg a[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(60, 40, 25, 0.16); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }

.chip { min-height: 40px; padding: 0 18px; border: 1px solid var(--sand-deep); border-radius: 99px; background: var(--paper); font-size: 0.875rem; white-space: nowrap; transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease); }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 0.75rem; font-weight: 500; background: var(--cream-deep); color: var(--ink-soft); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.75; }
.tag--plain::before { content: none; }
.tag--paid { background: var(--success-bg); color: var(--success); }
.tag--pending { background: var(--warn-bg); color: var(--warn); }
.tag--cancelled, .tag--failed { background: var(--sand); color: var(--ink-soft); }
.tag--refunded, .tag--partially_refunded { background: var(--error-bg); color: var(--error); }
.tag--lg { padding: 7px 14px; font-size: 0.8125rem; }

.pos-empty { display: grid; gap: 6px; justify-items: center; padding: 56px 24px; text-align: center; color: var(--ink-soft); }
.pos-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; background: var(--cream-deep); color: var(--accent); }
.pos-empty strong { font-family: var(--font-display); font-weight: 400; font-size: 1.1875rem; color: var(--ink); }
.pos-empty--card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-1); }

/* ---------- 5. Cards, tables, stats ---------- */
.pos-card { display: grid; gap: 16px; padding: 24px; background: var(--paper); border: 1px solid rgba(234, 223, 211, 0.7); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.pos-card__head { display: flex; align-items: center; gap: 12px; }
.pos-card__head > div { display: grid; gap: 2px; }
.pos-card__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--cream-deep); color: var(--accent); }
.pos-card--on { border-color: transparent; background: linear-gradient(135deg, #1c1714 0%, #3a2d24 100%); color: var(--paper); box-shadow: var(--shadow-2); }
.pos-card--on .pos-eyebrow { color: #e3c3a8; }
.pos-card--on .pos-hint { color: rgba(255, 255, 255, 0.72); }
.pos-card--on .pos-btn--light { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: var(--paper); }
.pos-card--on .pos-btn--light:hover { border-color: var(--paper); }
.pos-card--on .pos-btn--dark { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.pos-card--on .pos-btn--dark:hover { background: var(--cream); border-color: var(--cream); }
.pos-card--on .pos-btn--quiet { color: rgba(255, 255, 255, 0.75); }
.pos-card--on .pos-btn--quiet:hover { color: var(--paper); background: rgba(255, 255, 255, 0.12); }
.pos-card--danger { border-color: #efcfc8; }
.pos-card--danger .pos-card__icon { background: var(--error-bg); color: var(--error); }

.pos-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid rgba(234, 223, 211, 0.7); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.pos-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.pos-table th { padding: 14px 16px; text-align: left; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); background: var(--cream); border-bottom: var(--line); white-space: nowrap; }
.pos-table td { padding: 14px 16px; border-bottom: 1px solid var(--cream-deep); vertical-align: middle; }
.pos-table tr:last-child td { border-bottom: 0; }
.pos-table .num { text-align: right; white-space: nowrap; }
.pos-table td[data-label] { white-space: nowrap; }
.pos-table small { color: var(--ink-soft); }
.pos-table a { text-decoration: none; }
.pos-table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pos-table--rows tbody tr { position: relative; transition: background-color 0.15s var(--ease); }
.pos-table--rows tbody tr:hover { background: var(--cream); }
.pos-table--rows .row-link::after { content: ""; position: absolute; inset: 0; }
.pos-table--rows .row-link:hover { text-decoration: none; }
.pos-card .pos-table th { background: none; }
.pos-card .pos-table th:first-child, .pos-card .pos-table td:first-child { padding-left: 0; }
.pos-card .pos-table th:last-child, .pos-card .pos-table td:last-child { padding-right: 0; }
.row-actions { display: inline-flex; align-items: center; gap: 4px; }
.method-cell { display: inline-flex; align-items: center; gap: 8px; }
.method-cell .ico { color: var(--ink-faint); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stats > div { display: grid; gap: 6px; padding: 20px 22px; background: var(--paper); border: 1px solid rgba(234, 223, 211, 0.7); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.stats small { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.stats strong { font-family: var(--font-display); font-size: 1.875rem; font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats .is-main { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stats .is-main small { color: #e3c3a8; }
.stats--on-dark > div { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.stats--on-dark small { color: rgba(255, 255, 255, 0.65); }
.stats--on-dark strong { font-size: 1.375rem; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 0.9375rem; }
.kv dt { color: var(--ink-soft); }
.kv dd { text-align: right; font-weight: 500; }

/* ---------- 6. The till ---------- */
.pos-till { overflow: hidden; }
.pos-till .pos-main { height: calc(100vh - var(--bar-h)); height: calc(100dvh - var(--bar-h)); }
.till { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 32vw, 470px); height: 100%; }

.till__catalog { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 20px 24px 0; }
.till__search { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 8px 0 18px; background: var(--paper); border: 1px solid var(--sand-deep); border-radius: var(--radius); color: var(--ink-faint); box-shadow: var(--shadow-1); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.till__search:focus-within { border-color: var(--ink); box-shadow: var(--ring), var(--shadow-1); color: var(--ink); }
.till__search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 1.125rem; color: var(--ink); }
.till__search input::placeholder { color: var(--ink-faint); }
.till__search input::-webkit-search-cancel-button { display: none; }
.till__kbd { flex: none; margin-right: 10px; padding: 4px 9px; border: var(--line); border-radius: var(--radius-xs); background: var(--cream); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.till__toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 0 4px; }
.till__filters { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.till__filters::-webkit-scrollbar { display: none; }
.till__count { flex: none; font-size: 0.8125rem; color: var(--ink-faint); white-space: nowrap; }
.till__grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); grid-auto-rows: max-content; gap: 16px; align-content: start; padding: 14px 4px 28px; scrollbar-width: thin; scrollbar-color: var(--sand-deep) transparent; }

.prod { position: relative; display: grid; align-content: start; padding: 0; border: 1px solid rgba(234, 223, 211, 0.8); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-1); text-align: left; overflow: hidden; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.prod:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.prod:active:not(:disabled) { transform: none; }
.prod__media { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--cream-deep); overflow: hidden; }
.prod__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.prod:hover:not(:disabled) .prod__img { transform: scale(1.04); }
.prod__img--none { display: grid; place-items: center; color: var(--sand-deep); }
.prod__flag { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.94); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(28, 23, 20, 0.4); }
.prod__flag--low { background: var(--warn-bg); color: var(--warn); }
.prod__flag--out { background: var(--ink); color: var(--paper); letter-spacing: 0.12em; text-transform: uppercase; }
.prod__add { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--paper); opacity: 0; transform: translateY(6px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.prod:hover:not(:disabled) .prod__add, .prod:focus-visible .prod__add { opacity: 1; transform: none; }
.prod__body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.prod__name { font-size: 0.9375rem; font-weight: 500; line-height: 1.28; min-height: 2.56em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prod__price { font-size: 1.0625rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.prod__stock { font-size: 0.75rem; color: var(--ink-faint); white-space: nowrap; }
.prod.is-out { box-shadow: none; background: rgba(255, 255, 255, 0.6); }
.prod.is-out .prod__img { filter: grayscale(0.5); opacity: 0.55; }
.prod.is-out .prod__name, .prod.is-out .prod__price { color: var(--ink-faint); }

.till__sale { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-left: var(--line); box-shadow: -18px 0 40px -34px rgba(60, 40, 25, 0.5); }
.sale-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 16px; border-bottom: var(--line); }
.sale-head h1 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.sale-head__count { padding: 3px 11px; border-radius: 99px; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; }
.sale-head__count:empty { display: none; }
.sale-lines { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--sand-deep) transparent; }
.sale-lines:empty { display: none; }
.sale-empty { flex: 1; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 24px 32px; text-align: center; color: var(--ink-faint); }
.sale-empty__icon { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px; border-radius: 50%; background: var(--cream); color: var(--accent); }
.sale-empty strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: var(--ink); }
.sale-empty span { font-size: 0.9375rem; line-height: 1.45; max-width: 26ch; }

.line { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto auto 34px; align-items: center; gap: 12px; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--cream-deep); animation: line-in 0.25s var(--ease); }
@keyframes line-in { from { opacity: 0; transform: translateY(-4px); } }
.line__img { width: 50px; height: 66px; object-fit: cover; border-radius: 8px; background: var(--cream-deep); }
.line__info { display: grid; gap: 1px; line-height: 1.3; min-width: 0; }
.line__info strong { font-weight: 500; font-size: 0.9375rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line__variant { font-size: 0.8125rem; color: var(--ink-soft); }
.line__price { font-size: 0.75rem; color: var(--ink-faint); }
.line__total { font-size: 1rem; font-weight: 500; min-width: 66px; text-align: right; font-variant-numeric: tabular-nums; }
.line__x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; color: var(--ink-faint); border-radius: 50%; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.line__x:hover { color: var(--error); background: var(--error-bg); }
.qty { display: flex; align-items: center; padding: 3px; background: var(--cream); border-radius: 99px; }
.qty__btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(60, 40, 25, 0.16); font-size: 1.125rem; line-height: 1; transition: background-color 0.15s var(--ease); }
.qty__btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.qty__btn:disabled { opacity: 0.35; box-shadow: none; }
.qty__n { min-width: 30px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

.sale-extras { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 24px; border-top: var(--line); background: var(--cream); }
.sale-coupon { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.sale-coupon input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--sand-deep); border-radius: var(--radius-sm); background: var(--paper); text-transform: uppercase; letter-spacing: 0.06em; }
.sale-coupon input::placeholder { text-transform: none; letter-spacing: 0; color: var(--ink-faint); }
.sale-coupon input:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.sale-coupon .pos-btn { min-height: 44px; padding: 0 16px; }
.sale-extras .pos-btn--quiet { min-height: 44px; }
.coupon-tag { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 44px; padding: 0 6px 0 14px; border-radius: var(--radius-sm); background: var(--accent-bg); color: var(--accent); font-size: 0.875rem; font-weight: 500; }
.coupon-tag span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.06em; }
.coupon-tag button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: inherit; }
.coupon-tag button:hover { background: rgba(161, 108, 75, 0.16); }

.sale-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; padding: 16px 24px 14px; font-size: 0.9375rem; }
.sale-totals dt { color: var(--ink-soft); }
.sale-totals dd { padding-left: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.sale-totals .is-less { color: var(--accent); }
.sale-totals .is-total { padding-top: 12px; margin-top: 4px; border-top: var(--line); color: var(--ink); }
.sale-totals dt.is-total { display: flex; align-items: center; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.sale-totals dd.is-total { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.totals__x { margin-left: 8px; padding: 0; border: 0; background: none; font-size: 0.75rem; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.totals__x:hover { color: var(--error); }
.pos-card .sale-totals { padding: 0; }
.pos-card .sale-totals dd.is-total { font-size: 1.625rem; }

.pos-btn--pay { justify-content: space-between; margin: 0 24px 24px; min-height: 68px; padding: 0 26px; border-radius: var(--radius); font-size: 1rem; letter-spacing: 0.14em; box-shadow: 0 16px 28px -16px rgba(28, 23, 20, 0.85); }
.pos-btn--pay span { display: inline-flex; align-items: center; gap: 12px; }
.pos-btn--pay strong { font-family: var(--font-display); font-size: 1.625rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.pos-btn--pay:disabled { opacity: 1; background: var(--cream-deep); border-color: var(--cream-deep); color: var(--ink-faint); box-shadow: none; }

/* ---------- 7. Modals, payment, toast ---------- */
.pos-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(28, 23, 20, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow-y: auto; animation: fade-in 0.18s var(--ease); }
.pos-modal__box { width: min(100%, 480px); display: grid; gap: 18px; padding: 28px; background: var(--paper); border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55); animation: pop-in 0.24s var(--ease); }
.pos-modal__box--wide { width: min(100%, 580px); }
.pos-modal__box > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pos-modal__box > header h2 { font-size: 1.5rem; }
.pos-modal__box > header h2 span { display: block; margin-top: 2px; }
.pos-modal__amount { font-family: var(--font-display); font-size: 2.25rem; line-height: 1.1; }
.pos-x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--cream-deep); color: var(--ink-soft); transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.pos-x:hover { background: var(--ink); color: var(--paper); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

.pos-modal[data-confirm-modal] { z-index: 90; }
.confirm { width: min(100%, 420px); justify-items: center; text-align: center; gap: 12px; padding-top: 32px; }
.confirm__icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 4px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); }
.is-danger .confirm__icon { background: var(--error-bg); color: var(--error); }
.confirm h2 { font-size: 1.5rem; }
.confirm .pos-hint { font-size: 0.9375rem; max-width: 34ch; }
.confirm .pos-actions { width: 100%; margin-top: 12px; flex-wrap: nowrap; }
.confirm .pos-actions .pos-btn { flex: 1; padding: 0 12px; }

.variant-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.variant { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; min-height: 62px; padding: 0 18px; border: 1px solid var(--sand-deep); border-radius: var(--radius-sm); background: var(--paper); text-align: left; font-size: 1.0625rem; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.12s var(--ease); }
.variant:hover:not(:disabled) { border-color: var(--ink); background: var(--cream); }
.variant:active:not(:disabled) { transform: scale(0.99); }
.variant__label { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.variant__dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px rgba(28, 23, 20, 0.2); }
.variant__price { font-variant-numeric: tabular-nums; }
.variant__stock { min-width: 82px; padding: 3px 10px; border-radius: 99px; background: var(--cream-deep); font-size: 0.75rem; color: var(--ink-soft); text-align: center; }
.variant__stock.is-low { background: var(--warn-bg); color: var(--warn); }
.variant.is-out { opacity: 0.5; background: var(--cream); }
.variant.is-out .variant__stock { background: var(--error-bg); color: var(--error); }

.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border: 1px solid var(--sand-deep); border-radius: var(--radius); background: var(--paper); font-size: 0.9375rem; font-weight: 500; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease); }
.method .ico { color: var(--accent); }
.method small { font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); }
.method:hover { border-color: var(--ink); }
.method.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 12px 22px -14px rgba(28, 23, 20, 0.8); }
.method.is-on .ico { color: #e3c3a8; }
.method.is-on small { color: rgba(255, 255, 255, 0.65); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .chip { min-height: 44px; font-variant-numeric: tabular-nums; }
.change { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--success-bg); color: var(--success); font-size: 0.9375rem; font-weight: 500; }
.change strong { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.change:has(.is-short) { background: var(--error-bg); color: var(--error); }
.change .is-short { font-family: var(--font-body); font-size: 1.125rem; font-weight: 500; }
.pos-form input[data-cash] { min-height: 68px; font-family: var(--font-display); font-size: 2rem; text-align: right; font-variant-numeric: tabular-nums; }

.qr { justify-items: center; text-align: center; }
.qr > header { justify-content: center; }
.qr__code { width: min(100%, 340px); height: auto; padding: 14px; background: #fff; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.qr__wait { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 99px; background: var(--cream-deep); font-size: 0.9375rem; }
.spinner { flex: none; width: 18px; height: 18px; border: 2px solid var(--sand-deep); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { justify-items: center; text-align: center; padding-top: 36px; }
.done__mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--success-bg); color: var(--success); animation: mark-in 0.45s var(--ease); }
.done__mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: mark-draw 0.4s 0.2s var(--ease) forwards; }
@keyframes mark-in { from { transform: scale(0.6); opacity: 0; } }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }
.done h2 { font-size: 1.625rem; }
.done__number { color: var(--ink-soft); }
.done__total { font-family: var(--font-display); font-size: 2.75rem; line-height: 1.1; }
.done__change { padding: 12px 22px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: 1.1875rem; font-weight: 500; }
.done .pos-actions { justify-content: center; width: 100%; margin-top: 8px; }
.done .pos-actions .pos-btn { flex: 1; }

.pos-toast { position: fixed; left: 50%; bottom: calc(28px + var(--nav-h)); z-index: 80; transform: translateX(-50%); max-width: min(92vw, 560px); padding: 14px 24px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 0.9375rem; box-shadow: var(--shadow-2); text-align: center; animation: pop-in 0.22s var(--ease); }
.pos-toast.is-error { background: var(--error); }

/* ---------- 8. Ordinary pages ---------- */
.pos-page { max-width: 1180px; margin: 0 auto; padding: 32px 24px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.pos-page--narrow { max-width: 900px; }
.pos-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pos-head > div { display: grid; gap: 6px; min-width: 0; }
.pos-head .pos-hint { max-width: 62ch; }
.pos-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.detail__col { display: grid; gap: 22px; min-width: 0; }
.items { display: grid; }
.item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--cream-deep); }
.item:first-child { padding-top: 0; }
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item__img { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--cream-deep); }
.item__info { display: grid; gap: 2px; min-width: 0; line-height: 1.35; }
.item__info strong { font-weight: 500; }
.item__info small { color: var(--ink-soft); font-size: 0.8125rem; }
.item__total { font-weight: 500; font-variant-numeric: tabular-nums; }
.refund-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--cream-deep); font-size: 0.9375rem; }
.refund-row:last-child { border-bottom: 0; }
.refund-row small { grid-column: 1; color: var(--ink-soft); }
.refund-row strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--error); font-weight: 500; font-variant-numeric: tabular-nums; }

.event-on { display: grid; gap: 18px; }
.event-on h2 { font-size: 1.75rem; }
.event-on__status { display: inline-flex; align-items: center; gap: 8px; }
.event-on__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7fd0a0; box-shadow: 0 0 0 4px rgba(127, 208, 160, 0.22); }

.labels-bar { position: sticky; top: calc(var(--bar-h) + 12px); z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.labels-bar__count { margin-left: auto; font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap; }
.labels-bar__count strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; color: var(--ink); }
.labels-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stepper { display: inline-flex; align-items: center; padding: 3px; background: var(--cream); border-radius: 99px; }
.stepper button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(60, 40, 25, 0.16); font-size: 1.125rem; line-height: 1; }
.stepper button:hover { background: var(--ink); color: var(--paper); }
input.copies { width: 46px; height: 34px; padding: 0; border: 0; background: none; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
input.copies::-webkit-outer-spin-button, input.copies::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.copies:focus { outline: none; }
.stepper:focus-within { box-shadow: var(--ring); }
tr.has-copies { background: var(--accent-bg); }

/* ---------- 9. Sign in ---------- */
.pos-login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 0; background: var(--cream); }
.pos-login__brand { position: relative; display: grid; align-content: space-between; gap: 32px; padding: clamp(32px, 5vw, 64px); background: linear-gradient(150deg, #1c1714 0%, #3b2d23 70%, #5a4233 100%); color: var(--paper); overflow: hidden; }
.pos-login__brand::before, .pos-login__brand::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1); }
.pos-login__brand::before { width: 520px; height: 520px; right: -200px; top: -160px; }
.pos-login__brand::after { width: 340px; height: 340px; right: -110px; top: -70px; }
.pos-login__brand > * { position: relative; }
.pos-login__mark { display: flex; align-items: center; gap: 14px; }
.pos-login__mark span { font-family: var(--font-display); font-size: 1.375rem; letter-spacing: 0.08em; }
.pos-login__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--paper); }
.pos-login__logo--full { width: auto; height: 72px; max-width: 150px; padding: 6px 10px; border-radius: 14px; object-fit: contain; }
.pos-login__brand h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.08; max-width: 14ch; }
.pos-login__brand .pos-eyebrow { color: #e3c3a8; margin-bottom: 14px; }
.pos-login__points { display: grid; gap: 12px; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.8); }
.pos-login__points li { display: flex; align-items: center; gap: 12px; }
.pos-login__points .ico { color: #e3c3a8; }
.pos-login__panel { display: grid; place-items: center; padding: 32px 24px; }
.pos-login__card { width: min(100%, 400px); display: grid; gap: 18px; }
.pos-login__card h2 { font-size: 1.875rem; }
.pos-login__card .pos-form { margin-top: 6px; }

/* ---------- 10. Receipt and labels ---------- */
.receipt-page, .labels-page { min-height: 100vh; background: var(--cream-deep); padding: 24px; }
.print-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 8.5in; margin: 0 auto 18px; padding: 12px 16px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-1); font-size: 0.9375rem; color: var(--ink-soft); }
.receipt-page .print-tools { max-width: 340px; }
.receipt { width: min(100%, 340px); margin: 0 auto; padding: 24px 22px; background: #fff; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 0.875rem; box-shadow: var(--shadow-2); }
.receipt h1 { font-size: 1.25rem; }
.receipt__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.receipt__logo--full { width: auto; height: 84px; max-width: 180px; border-radius: 0; object-fit: contain; }
.receipt__meta { margin: 10px 0 4px; padding: 8px 0; width: 100%; border-block: 1px dashed #999; }
.receipt table { width: 100%; border-collapse: collapse; text-align: left; }
.receipt td { padding: 5px 0; vertical-align: top; }
.receipt td.num { text-align: right; white-space: nowrap; padding-left: 12px; }
.receipt small { color: #555; }
.receipt dl { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #999; text-align: left; }
.receipt dd { margin: 0; text-align: right; }
.receipt .is-total { font-size: 1.125rem; font-weight: 600; padding-block: 4px; }
.receipt__thanks { margin: 14px 0 4px; font-family: var(--font-display); font-size: 1.0625rem; }

.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.12in; width: 8in; max-width: 100%; margin: 0 auto; padding: 0.25in; background: #fff; box-shadow: var(--shadow-2); }
.label { display: grid; gap: 1px; justify-items: center; align-content: center; height: 1in; padding: 0.05in 0.08in; border: 1px dashed #ccc; text-align: center; overflow: hidden; break-inside: avoid; color: #000; }
.label p { margin: 0; line-height: 1.15; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label__store { font-size: 6pt; letter-spacing: 0.12em; text-transform: uppercase; }
.label__name { font-size: 8pt; font-weight: 600; }
.label__variant { font-size: 7.5pt; display: flex; justify-content: center; gap: 8px; }
.label__variant span { font-weight: 600; }
.label__bars { width: 100%; height: 0.36in; }
.label__bars svg { width: 100%; height: 100%; display: block; }
.label__code { font-family: ui-monospace, Consolas, monospace; font-size: 6.5pt; letter-spacing: 0.1em; }
.labels-page--roll .labels { display: block; width: 2.25in; padding: 0; }
.labels-page--roll .label { width: 2.25in; height: 1.25in; border: 0; border-bottom: 1px dashed #ccc; break-after: page; }

/* ---------- 11. Narrow screens ---------- */
@media (max-width: 1180px) {
    .pos-user__text { display: none; }
    .line { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; padding: 12px 18px; }
    .line__img { width: 44px; height: 58px; }
    .line__x { display: none; }
    .line__total { min-width: 58px; }
    .sale-head, .sale-extras { padding-inline: 18px; }
    .sale-totals { padding-inline: 18px; }
    .pos-btn--pay { margin-inline: 18px; }
    .sale-coupon { min-width: 130px; }
    .sale-extras .pos-btn--quiet { padding: 0 8px; font-size: 0.75rem; }
    .pos-brand__tag { display: none; }
}
@media (max-width: 960px) {
    .detail { grid-template-columns: minmax(0, 1fr); }
    .pos-login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .pos-login__brand { padding: 28px 24px; gap: 20px; }
    .pos-login__brand h1 { font-size: 1.75rem; max-width: none; }
    .pos-login__points { display: none; }
}
@media (max-width: 820px) {
    :root { --nav-h: calc(64px + env(safe-area-inset-bottom, 0px)); --bar-h: 60px; }
    .pos-bar { padding: 0 16px; gap: 12px; background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .pos-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 4px; border-radius: 0; background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: var(--line); }
    .pos-nav a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; height: 52px; padding: 0 4px; border-radius: 12px; font-size: 0.6875rem; letter-spacing: 0.04em; }
    .pos-event { max-width: 150px; }
    .pos-logout span { display: none; }
    .pos-logout { padding: 0 10px; }

    .pos-till { overflow: auto; }
    .pos-till .pos-main { height: auto; }
    .till { grid-template-columns: minmax(0, 1fr); height: auto; }
    .till__catalog { padding: 14px 16px 0; }
    .till__kbd { display: none; }
    .till__grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .prod__add { display: none; }
    .till__sale { border-left: 0; border-top: var(--line); position: sticky; bottom: var(--nav-h); max-height: 58vh; box-shadow: 0 -16px 34px -20px rgba(60, 40, 25, 0.5); border-radius: 20px 20px 0 0; }
    .sale-head { padding: 12px 16px 10px; }
    .sale-head h1 { font-size: 1.25rem; }
    .till__sale.is-empty .sale-extras, .till__sale.is-empty .sale-totals, .till__sale.is-empty .sale-empty span, .till__sale.is-empty .pos-btn--pay { display: none; }
    .sale-extras .pos-btn--quiet { padding: 0 8px; font-size: 0.75rem; }
    .sale-coupon { min-width: 0; }
    .sale-empty { padding: 14px 16px; }
    .sale-empty__icon { display: none; }
    .sale-empty strong { font-size: 1rem; }
    .sale-empty span { font-size: 0.8125rem; max-width: none; }
    .line { grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 10px; padding: 10px 16px; }
    .line__img { width: 42px; height: 56px; }
    .line__x { display: none; }
    .sale-extras { padding: 10px 16px; }
    .sale-totals { padding: 10px 16px 8px; gap: 4px 0; }
    .sale-totals dd.is-total { font-size: 1.5rem; }
    .sale-totals .is-total { padding-top: 8px; }
    .pos-btn--pay { margin: 0 16px 14px; min-height: 58px; }
    .pos-btn--pay strong { font-size: 1.375rem; }

    .methods { grid-template-columns: minmax(0, 1fr); }
    .method { grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 12px; padding: 12px 16px; text-align: left; }
    .method .ico { grid-row: span 2; }
    .pos-modal { padding: 0; place-items: end center; }
    .pos-modal__box { width: 100%; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; }

    .pos-page { padding: 22px 16px 40px; gap: 16px; }
    .pos-flash { margin: 12px 16px 0; }
    .pos-card { padding: 18px; }
    .pos-form--row { width: 100%; }
    .pos-form--row input { min-width: 0; flex: 1; }
    .labels-bar { position: static; }
    .labels-bar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .labels-bar .pos-btn--dark { flex: 1; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stats > div { padding: 14px 16px; }
    .stats strong { font-size: 1.5rem; }

    /* Tables become a list of cards: each cell carries its own label. */
    .pos-table--stack thead { display: none; }
    .pos-table--stack, .pos-table--stack tbody { display: block; }
    .pos-table--stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--cream-deep); }
    .pos-table--stack tr:last-child { border-bottom: 0; }
    .pos-table--stack td { padding: 0; border: 0; font-size: 0.875rem; }
    .pos-table--stack td:first-child { flex: 0 0 100%; font-size: 1rem; }
    .pos-table--stack td[data-label]::before { content: attr(data-label) " "; font-size: 0.75rem; color: var(--ink-faint); }
    .pos-table--stack td.is-end { margin-left: auto; font-size: 1rem; }
    .pos-table--stack .pos-btn--quiet { min-height: 32px; padding: 0 4px; }
    .pos-card .pos-table--stack tr { padding-inline: 0; }
}
@media (max-width: 420px) {
    .pos-brand__text { display: none; }
    .pos-event { max-width: 120px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
    .done__mark path { stroke-dashoffset: 0; }
}

/* ---------- 12. Print ---------- */
@media print {
    .no-print, .pos-bar, .pos-flash, .pos-nav { display: none !important; }
    body, .receipt-page, .labels-page { background: #fff; padding: 0; min-height: 0; }
    .receipt { box-shadow: none; width: 72mm; padding: 0; }
    .labels { padding: 0.25in; box-shadow: none; }
    .label { border-color: transparent; }
    .labels-page--roll .labels { padding: 0; }
    .pos-page { padding: 0; max-width: none; }
    .pos-card, .stats > div, .pos-table-wrap { box-shadow: none; border: 1px solid #ddd; background: #fff; color: #000; }
    .stats .is-main, .pos-card--on { background: #fff; color: #000; }
    .stats .is-main small { color: #555; }
    .detail { grid-template-columns: 1fr; }
}
