/* NewPOS – mobile-first design system (clean, Square/Shopify-style) */
:root {
  --brand: #0f766e; --brand-d: #115e59; --brand-l: #ccfbf1;
  --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --bg: #f3f4f6; --card: #fff;
  --danger: #dc2626; --warn: #d97706; --ok: #16a34a;
  --r: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.4rem; margin: 0; } h2 { font-size: 1.1rem; margin: 0 0 .6rem; } h3 { font-size: 1rem; margin: 0 0 .4rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: .6rem; align-items: center; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.stack > * + * { margin-top: .8rem; }
svg.i { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; flex: none; }

/* Buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: 0 1rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-d); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 .7rem; font-size: .875rem; } .btn-block { width: 100%; } .btn-lg { min-height: 54px; font-size: 1.1rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=color], select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input[type=color] { padding: 2px; }
.field { margin-bottom: .9rem; } .field .err, .err { color: var(--danger); font-size: .85rem; margin-top: .2rem; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr; } @media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: repeat(3, 1fr); } }

/* Cards, tables, badges */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; }
.cards { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); } @media (min-width: 900px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.stat .v { font-size: 1.5rem; font-weight: 700; } .stat .l { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: .93rem; } th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; background: #fafafa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 700; background: #e5e7eb; color: #374151; }
.badge.ok { background: #dcfce7; color: #166534; } .badge.warn { background: #fef3c7; color: #92400e; } .badge.bad { background: #fee2e2; color: #991b1b; } .badge.brand { background: var(--brand-l); color: var(--brand-d); }
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; background: #dcfce7; color: #166534; font-weight: 600; }
.flash.error { background: #fee2e2; color: #991b1b; }
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; } .pager nav svg { width: 1rem; display: inline; }
.bars { display: flex; align-items: flex-end; gap: .5rem; height: 140px; } .bars .b { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars .b i { display: block; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 2px; margin-bottom: .3rem; }

/* Admin shell */
.shell { display: flex; min-height: 100%; }
.side { width: 250px; background: #0b1f1d; color: #cbd5d1; padding: 1rem .75rem; position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s; z-index: 40; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; display: flex; flex-direction: column; } .side::-webkit-scrollbar { display: none; width: 0; }
.side.open { transform: none; }
.side .brand { color: #fff; font-weight: 800; font-size: 1.3rem; padding: .4rem .75rem 1rem; display: flex; gap: .5rem; align-items: center; }
.side a.nav { display: flex; gap: .7rem; align-items: center; padding: .65rem .75rem; border-radius: 10px; color: #cbd5d1; font-weight: 600; min-height: 44px; }
.side a.nav:hover { background: rgba(255,255,255,.07); } .side a.nav.on { background: var(--brand); color: #fff; }
.side .sep { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b8782; padding: 1rem .75rem .3rem; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; display: none; } .scrim.on { display: block; }
.main { flex: 1; min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; min-height: 58px; }
.top h1 { font-size: 1.15rem; flex: 1; }
.content { padding: 1rem; max-width: 1200px; margin: 0 auto; padding-bottom: 5rem; }
@media (min-width: 960px) { .side { transform: none; } .main { margin-left: 250px; } .menu-btn, .scrim { display: none !important; } .content { padding: 1.5rem; } }
.lang a { padding: .25rem .5rem; border-radius: 6px; font-weight: 700; font-size: .8rem; color: var(--muted); } .lang a.on { background: var(--brand-l); color: var(--brand-d); }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #0b1f1d, #0f766e); }
.auth .card { width: 100%; max-width: 440px; padding: 1.5rem; } .auth .logo { font-size: 1.8rem; font-weight: 800; color: var(--brand); margin-bottom: .2rem; }

/* Modal (lightbox) – used instead of alert()/confirm() */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal .box { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 1.1rem; animation: up .18s ease-out; }
.modal .box.wide { max-width: 760px; }
.modal .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; } .modal .head h2 { margin: 0; }
@media (min-width: 640px) { .modal { align-items: center; } .modal .box { border-radius: 18px; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* POS */
.pos { height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.pos-top { background: #fff; display: flex; gap: .5rem; align-items: center; padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
.pos-top .search { position: relative; flex: 1; } .pos-top .search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); } .pos-top .search input { padding-left: 2.4rem; }
.pos-body { flex: 1; display: flex; min-height: 0; }
.catalog { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chips { display: flex; gap: .45rem; overflow-x: auto; padding: .6rem .7rem; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 1rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; } .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { flex: 1; overflow-y: auto; padding: 0 .7rem 6rem; display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); align-content: start; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); } } @media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); padding-bottom: 1rem; } }
.tile { background: #fff; border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: .7rem; min-height: 96px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; border-left: 6px solid var(--c, var(--brand)); position: relative; }
.tile:active { transform: scale(.97); } .tile .n { font-weight: 700; line-height: 1.2; } .tile .p { color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .q { position: absolute; top: .4rem; right: .5rem; background: var(--brand); color: #fff; border-radius: 99px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; padding: 0 .35rem; }
.tile.out { opacity: .5; } .tile .st { font-size: .72rem; } .tile .st.low { color: var(--warn); font-weight: 700; } .tile .st.none { color: var(--danger); font-weight: 700; }
.cart { display: none; width: 380px; background: #fff; border-left: 1px solid var(--line); flex-direction: column; }
@media (min-width: 900px) { .cart { display: flex; } .cartbar { display: none !important; } }
.cart-head { padding: .8rem 1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cart-lines { flex: 1; overflow-y: auto; padding: .4rem 1rem; }
.line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.line .nm { font-weight: 600; } .line .mods { color: var(--muted); font-size: .82rem; grid-column: 1; } .line .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: .3rem; grid-column: 1 / -1; } .qty button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; cursor: pointer; } .qty b { min-width: 28px; text-align: center; }
.sums { border-top: 1px solid var(--line); padding: .7rem 1rem; } .sums .r { display: flex; justify-content: space-between; padding: .12rem 0; font-variant-numeric: tabular-nums; } .sums .r.total { font-size: 1.35rem; font-weight: 800; padding-top: .4rem; }
.cart-foot { padding: .7rem 1rem 1rem; display: grid; gap: .5rem; }
.cartbar { position: fixed; left: .7rem; right: .7rem; bottom: .7rem; z-index: 30; }
.cartbar .btn { width: 100%; min-height: 58px; font-size: 1.05rem; justify-content: space-between; padding: 0 1.1rem; box-shadow: 0 8px 24px rgba(15,118,110,.4); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .4rem; } .seg button { min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; } .seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .45rem; cursor: pointer; min-height: 48px; } .opt input { width: 22px; height: 22px; accent-color: var(--brand); } .opt .grow { font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.big { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.okmark { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; color: var(--ok); display: grid; place-items: center; margin: 0 auto .6rem; } .okmark svg { width: 38px; height: 38px; }

/* Receipt */
.receipt { max-width: 340px; margin: 1rem auto; background: #fff; padding: 1.2rem; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; box-shadow: var(--shadow); }
.receipt h1 { font-size: 1.1rem; text-align: center; } .receipt .ln { display: flex; justify-content: space-between; gap: .5rem; } .receipt hr { border: 0; border-top: 1px dashed #999; margin: .6rem 0; } .receipt .tot { font-size: 1.1rem; font-weight: 700; }
@media print { body { background: #fff; } .noprint { display: none !important; } .receipt { box-shadow: none; margin: 0; } }

/* Password show/hide */
.pw { position: relative; display: block; } .pw input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 2px; top: 0; bottom: 0; width: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--brand); } .pw-toggle .i { width: 20px; height: 20px; }
.auth .logo a { color: inherit; } .auth .forgot { float: right; font-size: .85rem; }
.slug-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.slug-box input { border: 0 !important; outline: 0 !important; flex: 1; min-width: 0; border-radius: 0; }
.slug-box span { padding: 0 .8rem; color: var(--muted); background: #f9fafb; align-self: stretch; display: flex; align-items: center; }
.slug-box:focus-within { outline: 2px solid var(--brand); border-color: var(--brand); }
.auth .tenant { text-align: center; margin: .2rem 0 .8rem; } .auth .tenant b { font-size: 1.2rem; display: block; } 

/* PIN pad */
.pin-dots { display: flex; justify-content: center; gap: .7rem; margin: .4rem 0 1rem; } .pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand); } .pin-dots i.on { background: var(--brand); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; } .pin-pad button { min-height: 58px; font-size: 1.5rem; font-weight: 700; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; } .pin-pad button:active { background: var(--brand-l); }
/* POS customer + card */
.cust-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; } .cust-bar .grow { min-width: 0; } .cust-pts { font-size: .8rem; color: var(--brand-d); font-weight: 700; }
.cust-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .4rem; cursor: pointer; min-height: 48px; } .cust-row:hover { background: var(--brand-l); }
#card-el { min-height: 120px; margin: .6rem 0; }
.auth { align-content: center; gap: 1rem; padding: 1.5rem 1rem; } .auth .demo-card { max-width: 640px; } .demo-table td, .demo-table th { padding: .5rem .4rem; vertical-align: top; text-align: left; } .demo-table th { font-size: .8rem; color: var(--muted); }

.demo-row { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .7rem 0; border-top: 1px solid var(--line); } .demo-info { min-width: 0; flex: 1; overflow-wrap: anywhere; } .demo-actions { display: flex; gap: .4rem; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .demo-row { flex-direction: column; align-items: stretch; } .demo-actions { justify-content: flex-start; } }

/* Company brand (logo + name) */
.co-brand { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; } .co-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; } .co-initial { display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; } .co-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .brand.co { color: #fff; text-decoration: none; } .side .brand.co .co-logo { background: #fff; } .side .brand.co .co-initial { background: var(--brand); } .side .brand.co .co-name { font-size: 1.05rem; max-width: 150px; }
.top-brand { display: none; color: var(--ink); max-width: 40%; } .top-brand .co-logo { width: 26px; height: 26px; } .top-brand .co-name { font-size: .9rem; }
@media (max-width: 900px) { .top-brand { display: inline-flex; } }
.pos-brand { display: inline-flex; min-width: 0; max-width: 42%; color: var(--ink); } .pos-brand .co-name { font-size: .95rem; } .pos-top .search { min-width: 0; }
@media (max-width: 520px) { .pos-brand { max-width: 36%; } .pos-brand .co-name { font-size: .8rem; } .pos-brand .co-logo { width: 28px; height: 28px; } }
#menu-modal .head h2 .co-name { font-size: 1.1rem; }
.logo-field { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; } .logo-preview { width: 84px; height: 84px; border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center; background: #fff; overflow: hidden; flex: none; } .logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; } .logo-preview span { font-size: 2rem; font-weight: 800; color: var(--brand); }

.side .brand.co .co-name { white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 160px; }

/* Fashion size matrix */
.mx-stat { text-align: center; padding: 0 .6rem; } .mx-stat b { display: block; font-size: 1.3rem; } .mx-stat span { color: var(--muted); font-size: .8rem; }
.dotc { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); vertical-align: -2px; }
.swatches { display: flex; flex-wrap: wrap; gap: .4rem; } .swatch { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 99px; padding: .25rem .7rem .25rem .4rem; cursor: pointer; font-size: .9rem; background: #fff; } .swatch input { width: 16px; height: 16px; accent-color: var(--brand); } .swatch i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.mx-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .5rem; margin-top: .7rem; } .mx-cell { display: block; text-align: center; font-weight: 700; font-size: .85rem; } .mx-cell span { display: block; margin-bottom: .15rem; }
.mx-in { width: 100%; min-width: 0; text-align: center; padding: .35rem .2rem !important; min-height: 38px; } .mx-in.zero { background: #fee2e2; border-color: #fca5a5; } .mx-in.low { background: #fef3c7; border-color: #fcd34d; }
.mx-bra { margin-top: .7rem; } .mx-bra table { width: 100%; border-collapse: collapse; table-layout: fixed; } .mx-bra th { font-size: .8rem; color: var(--muted); padding: .25rem; text-align: center; } .mx-bra td { padding: .15rem; }
/* POS variant picker */
.vp-sw { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; } .vp-sw button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .35rem .6rem; display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; } .vp-sw button.on { border-color: var(--brand); background: var(--brand-l); } .vp-sw i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); } .vp-sw small { color: var(--muted); font-weight: 500; }
.vp-sizes { display: flex; flex-wrap: wrap; gap: .4rem; } .vp-sizes button { min-width: 52px; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; padding: 0 .5rem; } .vp-sizes button.on { background: var(--brand); color: #fff; border-color: var(--brand); } .vp-sizes button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; } .vp-sizes button .st { display: block; font-size: .65rem; font-weight: 500; opacity: .8; line-height: 1; margin-top: -.2rem; padding-bottom: .2rem; }
.vp-bra { display: grid; gap: .3rem; } .vp-bra .rowb { display: flex; align-items: center; gap: .3rem; } .vp-bra .rowb b { width: 34px; font-size: .85rem; color: var(--muted); } .vp-bra .rowb button { flex: 1; min-width: 0; min-height: 40px; padding: 0 .1rem; }

/* Security lock + security page */
.lock { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; } .lock svg.i { width: 14px; height: 14px; } .lock.ok { background: #dcfce7; color: #166534; } .lock.warn { background: #fef3c7; color: #92400e; }
@media (max-width: 520px) { .top .lock .lock-t { display: none; } }
.sec-hero { display: flex; gap: 1rem; align-items: center; border-left: 6px solid var(--line); } .sec-hero.sec-ok { border-left-color: #16a34a; background: #f0fdf4; } .sec-hero.sec-warn { border-left-color: #f59e0b; background: #fffbeb; } .sec-hero.sec-fail { border-left-color: #dc2626; background: #fef2f2; }
.sec-lock { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; } .sec-lock svg.i { width: 26px; height: 26px; } .sec-ok .sec-lock { color: #16a34a; } .sec-warn .sec-lock { color: #d97706; } .sec-fail .sec-lock { color: #dc2626; }
.sec-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.sec-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; } .sec-ic.sec-ok { background: #dcfce7; color: #166534; } .sec-ic.sec-warn { background: #fef3c7; color: #92400e; } .sec-ic.sec-fail { background: #fee2e2; color: #991b1b; } .sec-ic svg.i { width: 16px; height: 16px; }

/* Stocktake */
.st-bar { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; } .st-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #14b8a6); border-radius: 99px; transition: width .3s; }
.st-active { border-left: 6px solid #f59e0b; background: #fffbeb; }
.st-wrap > * { margin-bottom: .8rem; } .st-scan { position: sticky; top: 0; z-index: 5; }
.st-toast { margin-top: .5rem; padding: .5rem .8rem; border-radius: 10px; background: #dcfce7; color: #166534; font-weight: 600; } .st-toast.bad { background: #fee2e2; color: #991b1b; }
.st-tabs { display: flex; gap: .4rem; flex-wrap: wrap; } .st-tabs a { padding: .35rem .9rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; } .st-tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.st-table .st-in { width: 110px; min-height: 44px; text-align: right; font-weight: 700; font-size: 1.05rem; } .st-table tr.done td { background: #f0fdf4; } .st-table tr.err td { background: #fef2f2; } .st-table tr.flash td { animation: st-flash 1.2s; }
@keyframes st-flash { 0% { background: #fde68a; } 100% { background: transparent; } }
.st-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; } .st-kpis .card small { display: block; color: var(--muted); } .st-kpis .card b { font-size: 1.5rem; display: block; }
@media (max-width: 700px) { .st-kpis { grid-template-columns: 1fr 1fr; } .st-table .st-in { width: 84px; } }
.sheet { max-width: 800px; margin: 0 auto; padding: 1rem; background: #fff; } .sheet-table { width: 100%; border-collapse: collapse; } .sheet-table th, .sheet-table td { border: 1px solid #9ca3af; padding: .45rem .5rem; text-align: left; height: 34px; } .sheet-table th { background: #f3f4f6; }
@media print { .noprint, .side, .top, .st-scan { display: none !important; } .sheet { padding: 0; } .sheet-table tr { page-break-inside: avoid; } }

/* Smart search suggestions + camera scanner */
.pos-top { position: relative; } .sugg { position: absolute; left: .7rem; right: .7rem; top: calc(100% - .2rem); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.18); max-height: 62vh; overflow: auto; padding: .3rem; } @media (min-width: 900px) { .sugg { left: 4.5rem; right: auto; width: min(560px, 60vw); } }
.sg { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: .55rem .6rem; font: inherit; cursor: pointer; min-height: 48px; } .sg.on, .sg:hover { background: var(--brand-l); } .sg-n { flex: 1; min-width: 0; font-weight: 600; } .sg-n small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; } .sg-v { color: var(--brand-d); font-weight: 700; } .sg-p { font-weight: 700; color: var(--brand); } mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; }
.sg .st { font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 99px; background: #dcfce7; color: #166534; } .sg .st.low { background: #fef3c7; color: #92400e; } .sg .st.none { background: #fee2e2; color: #991b1b; } .sg-head, .sg-empty { padding: .4rem .6rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.np-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 300; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; } .np-toast.show { opacity: 1; transform: translateX(-50%); } .np-toast.bad { background: #b91c1c; }
.cam-frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; } .cam-frame video { width: 100%; display: block; max-height: 60vh; object-fit: cover; } .cam-aim { position: absolute; inset: 22% 12%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }

[hidden] { display: none !important; }

.hw-sub { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; } .hw-sub h4 { margin: 0 0 .3rem; }
.scan-test { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; padding: .8rem; margin-top: .8rem; } .scan-result { margin-top: .6rem; font-size: .92rem; } .scan-result dl { margin: 0; display: grid; grid-template-columns: 170px 1fr; gap: .25rem .8rem; } .scan-result dt { color: var(--muted); } .scan-result dd { margin: 0; font-weight: 600; word-break: break-all; } .scan-result code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 .35rem; } .scan-result .tip { margin-top: .5rem; padding: .5rem .7rem; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; }
.lbl-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: .7rem 1rem; margin-top: 1rem; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; z-index: 6; }
@media (max-width: 600px) { .scan-result dl { grid-template-columns: 1fr; } }

.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; } .data-card .btn { margin-top: .2rem; }

/* locations */
.loc-filter select { padding: .3rem .5rem; border-radius: 8px; border: 1px solid var(--line, #d8dde6); background: var(--card, #fff); font-weight: 600; font-size: .85rem; max-width: 11rem; }
.pos-loc { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.pos-loc select { padding: .25rem .4rem; border-radius: 8px; border: 1px solid var(--line, #d8dde6); font-weight: 700; max-width: 9rem; }
.tile .st.else, .sg .st.else { color: var(--brand-d, #0f766e); font-weight: 700; display: block; }
.wh-item { margin: .5rem 0 .9rem; } .wh-lbl { font-weight: 700; margin-bottom: .2rem; } .wh-t { width: 100%; border-collapse: collapse; } .wh-t td { padding: .35rem .4rem; border-bottom: 1px solid var(--line, #e5e7eb); } .wh-t td.num { text-align: right; font-weight: 800; font-size: 1.05rem; } .wh-t td.zero { color: var(--danger, #dc2626); font-weight: 600; } .wh-t tr.here td { background: var(--brand-l, #ecfdf5); }
#wh-list .sg { width: 100%; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* training, help, progress */
.tr-hero { background: linear-gradient(135deg, var(--brand-l), #fff); } .tr-hero.pass { background: linear-gradient(135deg, #dcfce7, #fff); } .tr-hero.fail { background: linear-gradient(135deg, #fef3c7, #fff); }
.tr-ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e5e7eb 0); position: relative; flex: none; } .tr-ring::before { content: ''; position: absolute; inset: 9px; background: #fff; border-radius: 50%; } .tr-ring b, .tr-ring span { position: relative; line-height: 1.1; } .tr-ring b { font-size: 1.2rem; } .tr-ring span { font-size: .7rem; color: var(--muted); margin-top: -1.1rem; } .tr-ring.big { width: 110px; height: 110px; margin: 0 auto; } .tr-ring.big b { font-size: 1.6rem; }
.tr-grid, .pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; margin-top: 1rem; }
.tr-card, .pg-card { display: flex; flex-direction: column; gap: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; } .tr-card:hover, .pg-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.08); }
.tr-card.passed { border-color: #86efac; background: #f0fdf4; } .tr-card.learning, .tr-card.quiz { border-color: #fde68a; }
.tr-ico { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; font-size: 1.4rem; background: var(--brand-l); border-radius: 12px; flex: none; } .tr-state { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .tr-card.passed .tr-state { color: #15803d; }
.tr-bar { display: block; height: 7px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin: .3rem 0; } .tr-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #14b8a6); border-radius: 99px; }
.tr-row { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; } .tr-row:last-child { border-bottom: 0; } .tr-row b, .tr-row > span:nth-child(2) { flex: 1; } .tr-row:hover { background: var(--brand-l); }
.tr-num { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: #e5e7eb; font-weight: 800; flex: none; } .tr-num.on { background: var(--brand); color: #fff; }
.tr-steps { display: flex; gap: .3rem; margin-bottom: .8rem; } .tr-steps i { flex: 1; height: 6px; border-radius: 99px; background: #e5e7eb; } .tr-steps i.ok { background: var(--brand); } .tr-steps i.now { background: #f59e0b; } .tr-steps i.q { background: #cbd5e1; }
.tr-lesson p { font-size: 1.02rem; line-height: 1.55; } .tr-tip { background: #fffbeb; border-left: 4px solid #f59e0b; padding: .7rem .9rem; border-radius: 8px; margin: .8rem 0; }
.tr-checklist { list-style: none; padding: 0; margin: .6rem 0; } .tr-checklist li { padding: .45rem .2rem; border-bottom: 1px dashed var(--line); } .tr-checklist label { display: flex; gap: .6rem; cursor: pointer; align-items: flex-start; } .tr-checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.tr-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin: .8rem 0; } .tr-flip { text-align: left; min-height: 110px; border: 2px solid var(--brand); background: var(--brand-l); border-radius: 14px; padding: .9rem; cursor: pointer; font: inherit; } .tr-flip .f { font-weight: 800; } .tr-flip .b { display: none; font-size: .92rem; } .tr-flip.on { background: #fff; } .tr-flip.on .f { display: none; } .tr-flip.on .b { display: block; }
.tr-choose { background: #f9fafb; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; } .tr-opt { text-align: left; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; } .tr-opt:hover { border-color: var(--brand); } .tr-opt.good { background: #dcfce7; border-color: #16a34a; } .tr-opt.bad { background: #fee2e2; border-color: #dc2626; }
.tr-fb { padding: .6rem .8rem; border-radius: 10px; margin-top: .5rem; font-size: .92rem; } .tr-fb.good { background: #dcfce7; color: #166534; } .tr-fb.bad { background: #fee2e2; color: #991b1b; }
.tr-till { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; background: #f3f4f6; padding: 1rem; border-radius: 16px; } .tr-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .6rem; align-content: start; } .tr-items button { padding: .8rem .4rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; } .tr-items button:active { transform: scale(.96); } .tr-cart { background: #fff; border-radius: 12px; padding: .8rem; } @media (max-width: 640px) { .tr-till { grid-template-columns: 1fr; } }
.tr-radio { display: flex; gap: .6rem; padding: .55rem .3rem; cursor: pointer; align-items: flex-start; } .tr-q.ok { border-left: 5px solid #16a34a; } .tr-q.bad { border-left: 5px solid #dc2626; }
.tr-reply.staff { border-left: 4px solid var(--brand); background: var(--brand-l); }
.pg-card.used { border-color: #86efac; } .pg-card.setup { border-color: #fde68a; } .pg-card.todo { border-style: dashed; } .pg-h { margin: 1.4rem 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); } .pg-steps { display: flex; gap: .3rem; } .pg-steps i { flex: 1; height: 6px; border-radius: 99px; background: #e5e7eb; } .pg-steps i.on { background: var(--brand); } .pg-next { color: var(--brand-d, var(--brand)); font-weight: 600; }
.help-q { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid currentColor; font-weight: 800; font-size: .8rem; }
.hp-search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 12px; padding: .2rem .7rem; background: #fff; } .hp-search input { border: 0; outline: 0; flex: 1; padding: .6rem 0; font: inherit; background: transparent; } .hp-results { margin: .6rem 0; max-height: 40vh; overflow: auto; } .hp-h { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .3rem 0; } .hp-item { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; margin-bottom: .4rem; background: #fff; } .hp-item summary { cursor: pointer; font-weight: 700; } .hp-a { padding: .5rem 0 .2rem; color: #374151; } .hp-none { padding: .8rem; background: #fffbeb; border-radius: 10px; } .hp-ticket form { margin-top: .6rem; } .hp-ticket textarea { width: 100%; }

/* NewPOS logo */
.np-logo { display: inline-flex; align-items: center; gap: .5rem; line-height: 1; vertical-align: middle; } .np-mark { flex: none; border-radius: 22%; } .np-word { font-size: 1.4rem; font-weight: 800; letter-spacing: -.035em; color: #0b1f1d; } .np-word b { color: #0f766e; font-weight: 800; } .np-logo.light .np-word { color: #fff; } .np-logo.light .np-word b { color: #5eead4; }

/* hub navigation */
.side .brand { padding-bottom: .8rem; } .side a.nav { margin-bottom: .2rem; padding: .7rem .8rem; font-size: .97rem; } .side a.nav svg { flex: none; } .side a.nav.nav-pos { background: rgba(255,255,255,.1); color: #fff; margin-bottom: .8rem; } .side a.nav.nav-pos:hover { background: rgba(255,255,255,.18); } .side-foot { margin-top: auto; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.08); }
.subnav { display: flex; flex-wrap: wrap; gap: .35rem; padding: .6rem 1rem 0; background: var(--bg, #f6f8f8); } .subnav a { padding: .4rem .8rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: .35rem; } .subnav a:hover { background: var(--brand-l); } .subnav a.on { background: var(--brand); border-color: var(--brand); color: #fff; } .subnav a.sub-home { background: transparent; border-color: transparent; color: var(--muted); } .subnav a.sub-home svg { width: 16px; height: 16px; }
@media (min-width: 960px) { .subnav { padding: .8rem 1.5rem 0; } }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; } .hub-tile { display: flex; flex-direction: column; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; } .hub-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,.08); border-color: var(--brand); } .hub-tile b { font-size: 1.1rem; } .hub-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-l); color: var(--brand-d); } .hub-ic svg { width: 24px; height: 24px; } .hub-stat { margin-top: auto; padding-top: .4rem; font-weight: 700; color: var(--brand-d); font-size: .9rem; }
.chip-link { padding: .35rem .85rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .86rem; } .chip-link.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.au-row { position: relative; display: flex; justify-content: space-between; gap: .6rem; padding: .4rem .5rem; margin-bottom: .25rem; border-radius: 8px; color: var(--ink); text-decoration: none; overflow: hidden; z-index: 0; } .au-row i { position: absolute; inset: 0 auto 0 0; background: var(--brand-l); z-index: -1; border-radius: 8px; } a.au-row:hover { outline: 1px solid var(--brand); } .au-sens { padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }

/* live security lock */
button.lock { border: 0; cursor: pointer; font-family: inherit; } .lock.bad { background: #fee2e2; color: #991b1b; } .lock.busy { opacity: .75; } .lock.busy svg { animation: lockpulse 1s ease-in-out infinite; } @keyframes lockpulse { 50% { transform: scale(1.25); } }
.lock-pop { position: absolute; right: 1rem; top: 3.4rem; width: min(380px, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 1rem; z-index: 60; text-align: left; white-space: normal; } .lock-pop[hidden] { display: none; } .lp-h { margin: .8rem 0 .2rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); } .lp-row { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); } .lp-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: .35rem; background: #22c55e; } .lp-dot.warn { background: #f59e0b; } .lp-dot.fail { background: #ef4444; }
.sec-level { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .2rem; } .sec-hero { display: flex; align-items: center; gap: 1rem; }

/* reports */
.rp-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; } .rp-tabs a { padding: .45rem .95rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; } .rp-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; } .rp-tabs a:last-child { margin-left: auto; background: transparent; border-style: dashed; color: var(--brand-d); }
.up { color: #15803d; font-weight: 700; } .down { color: #b91c1c; font-weight: 700; }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: .75rem; } .heat th { color: var(--muted); font-weight: 600; padding: 0 .2rem; text-align: center; } .heat tbody th { text-align: right; padding-right: .4rem; } .heat td { height: 22px; border-radius: 4px; background-color: #f3f4f6; }
.dc-sheet { max-width: 920px; margin: 0 auto; } .dc-sign { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2.6rem; } .dc-sign span { flex: 1; border-top: 1px solid #9ca3af; padding-top: .3rem; color: var(--muted); font-size: .8rem; }
@media print { .rp-tabs, .subnav, .top, .side, .btn, form.row { display: none !important; } .main { margin-left: 0 !important; } .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; } .content { padding: 0 !important; } }

/* customer profile */
.cu-avatar { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.6rem; font-weight: 800; flex: none; }
.tl-row { display: flex; gap: .7rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); } .tl-row:last-child { border-bottom: 0; } .tl-ic { flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--brand-l); border-radius: 50%; } .tl-body { flex: 1; min-width: 0; }
.cart-cust { padding: .6rem .9rem 0; } .cart-cust .cust-bar { margin: 0; }
.cust-top { max-width: 220px; gap: .45rem; font-weight: 700; } .cust-top .ct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cust-top.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 700px) { .cust-top .ct-name { display: none; } }
.share-bar { display: inline-flex; gap: .35rem; }
@media print { .share-bar { display: none !important; } }
/* till: customer desk (fixed size so the window never jumps while typing) */
#cust-modal .box.cust-box, #hist-modal .box.cust-box { height: min(640px, 92vh); display: flex; flex-direction: column; overflow: hidden; }
#cust-modal .box.cust-box { max-width: 560px; }
#cust-modal .ct-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: .7rem; } #cust-modal .ct-pane[hidden] { display: none; }
#cust-modal #ct-new { overflow-y: auto; }
.cust-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#cust-list .cust-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .4rem; cursor: pointer; min-height: 52px; }
#cust-list .cust-row:hover, #cust-list .cust-row.on { background: #ccfbf1; border-color: var(--brand); }
.cust-none { text-align: center; padding: 1.5rem .5rem; } .cust-none p { margin: 0 0 .8rem; }
#cust-tabs { display: flex; } #cust-tabs button { flex: 1; }
.cart-cust .cust-bar { flex-wrap: wrap; }
.hist-sum { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: .5rem .75rem; background: #f1f5f9; border-radius: 10px; margin-bottom: .7rem; font-size: .9rem; }
.h-order { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .6rem; }
.h-head { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; flex-wrap: wrap; } .h-tot { white-space: nowrap; }
.h-items { width: 100%; border-collapse: collapse; margin: .4rem 0; } .h-items td { padding: .25rem 0; border-top: 1px solid #f1f5f9; vertical-align: top; } .h-items td.r { text-align: right; white-space: nowrap; }
.rf-lines { margin-bottom: .6rem; } .rf-line { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #f1f5f9; } .rf-line input[type=number] { width: 5.5rem; } .rf-line .r { min-width: 5rem; text-align: right; }
#disc-quick { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- till layouts: fast buttons / scan & search / clean & central ---------- */
.pos.lay-scan .catalog, .pos.lay-central .catalog { display: none; }
.pos.lay-scan .cart, .pos.lay-central .cart { display: flex; flex: 1; width: auto; border-left: 0; }
.pos.lay-scan .cartbar, .pos.lay-central .cartbar { display: none !important; }
.pos.lay-scan .pos-top, .pos.lay-central .pos-top { flex-wrap: wrap; }
.pos.lay-scan .pos-top .search, .pos.lay-central .pos-top .search { order: 20; flex: 1 0 100%; margin-top: .15rem; }
.pos.lay-scan .pos-top .search input, .pos.lay-central .pos-top .search input { min-height: 58px; font-size: 1.25rem; padding-left: 3rem; border-width: 2px; border-color: var(--brand); }
.pos.lay-scan .pos-top .search svg, .pos.lay-central .pos-top .search svg { width: 24px; height: 24px; left: 1rem; }
.pos.lay-scan .cart-lines .line { grid-template-columns: 1fr auto; padding: 1rem 0; } .pos.lay-scan .cart-lines .line .nm { font-size: 1.1rem; }
.pos.lay-scan .pos-body { background: #fff; }
.pos.lay-scan .sums, .pos.lay-scan .cart-foot { max-width: 760px; width: 100%; margin: 0 auto; }
.pos.lay-scan .cart-lines { padding: .4rem 1.5rem; }
.pos.lay-central .pos-body { justify-content: center; padding: 1rem; background: var(--bg); }
.pos.lay-central .cart { flex: 0 1 720px; max-width: 720px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.pos.lay-central .pos-top .search { max-width: 720px; margin-left: auto; margin-right: auto; }
.pos.lay-central .cart-lines .line .nm { font-size: 1.1rem; } .pos.lay-central .sums .r.total { font-size: 1.7rem; }
.pos.lay-central .cart-foot .btn-lg { min-height: 64px; font-size: 1.2rem; }
.pos.lay-scan .cart-lines .muted.center, .pos.lay-central .cart-lines .muted.center { font-size: 1.15rem; padding: 4rem 0 !important; }
.lay-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; } .lay-pick button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem .3rem; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.lay-pick button.on { border-color: var(--brand); background: #ccfbf1; }
.lp { width: 64px; height: 44px; border: 2px solid #94a3b8; border-radius: 6px; display: grid; gap: 3px; padding: 4px; background: #f8fafc; } .lp i, .lp b { background: #cbd5e1; border-radius: 3px; display: block; }
.lp.tiles { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); } .lp.scan { grid-template-rows: 9px 1fr; } .lp.scan i { background: var(--brand); } .lp.central { place-items: center; } .lp.central i { width: 60%; height: 100%; }
.till-tag { gap: .4rem; font-weight: 700; } .till-tag .tt-name { white-space: nowrap; }
@media (max-width: 700px) { .till-tag .tt-name { display: none; } }

/* ---------- touch screen without a keyboard ---------- */
body.touch .btn, body.touch .seg button, body.touch .chip { min-height: 54px; } body.touch .btn-sm { min-height: 46px; padding: 0 1rem; }
body.touch input[type=text], body.touch input[type=search], body.touch input[type=email], body.touch input[type=tel], body.touch input[type=password], body.touch input[type=number], body.touch select { min-height: 56px; font-size: 1.15rem; }
body.touch .qty button { width: 54px; height: 54px; font-size: 1.5rem; } body.touch .tile { min-height: 112px; } body.touch .cust-row { min-height: 64px; }
.big-input { min-height: 64px; font-size: 1.7rem !important; font-weight: 700; text-align: right; }
.osk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; background: #1e293b; padding: .4rem .5rem .6rem; box-shadow: 0 -8px 30px rgba(0,0,0,.35); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.osk[hidden] { display: none; }
.osk-bar { display: flex; align-items: center; justify-content: space-between; color: #94a3b8; font-size: .8rem; padding: 0 .3rem .3rem; } .osk-hide { background: transparent; border: 0; color: #cbd5e1; font-size: 1.1rem; padding: .2rem .8rem; cursor: pointer; }
.osk-row { display: flex; justify-content: center; gap: .35rem; margin-bottom: .35rem; }
.osk-k { flex: 1 1 0; max-width: 92px; min-height: 52px; border: 0; border-radius: 10px; background: #475569; color: #fff; font: inherit; font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.osk-k:active { background: var(--brand); } .osk-k.fn { background: #334155; max-width: 120px; flex-grow: 1.4; } .osk-k.fn.on { background: var(--brand); } .osk-k.enter { background: var(--brand); max-width: 140px; flex-grow: 1.6; } .osk-k.space { flex-grow: 6; max-width: none; }
.osk-num { max-width: 420px; left: auto; right: 0; border-radius: 14px 0 0 0; } .osk-num .osk-k { min-height: 64px; font-size: 1.5rem; max-width: none; }
@media (max-width: 520px) { .osk-num { max-width: none; border-radius: 0; } }
body.osk-on .modal { bottom: var(--osk-h, 0); align-items: flex-start; padding-top: .5rem; overflow-y: auto; } body.osk-on .modal .box { max-height: calc(100dvh - var(--osk-h, 0px) - 1rem); }
body.osk-on .pos { height: calc(100dvh - var(--osk-h, 0px)); }

/* ---------- start / end of day ---------- */
.tp-list { display: grid; gap: .6rem; } .tp-btn { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 72px; }
.tp-btn:hover, .tp-btn:active { border-color: var(--brand); background: #ccfbf1; } .tp-btn b { font-size: 2rem; min-width: 2.2rem; text-align: center; color: var(--brand-d); } .tp-btn span { flex: 1; font-weight: 700; } .tp-btn small { display: block; color: var(--muted); font-weight: 500; } .tp-btn em { font-style: normal; font-size: .8rem; color: var(--muted); } .tp-btn em.open { color: var(--warn); font-weight: 700; }
.count-help { margin: .4rem 0 .8rem; } .count-help summary { cursor: pointer; font-weight: 700; padding: .5rem 0; color: var(--brand-d); }
.denoms { display: grid; gap: .35rem; } .den { display: grid; grid-template-columns: 5.5rem 48px 4.5rem 48px 1fr; gap: .4rem; align-items: center; } .den.dt { grid-template-columns: 1fr auto; padding-top: .4rem; border-top: 1px solid var(--line); font-size: 1.15rem; }
.den .dl { font-weight: 700; } .den button { height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 1.3rem; cursor: pointer; } .den input { text-align: center; height: 44px; min-height: 44px; } .den .ds { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.dc-table { margin: .6rem auto; min-width: 260px; border-collapse: collapse; } .dc-table td { padding: .3rem .6rem; border-bottom: 1px solid var(--line); } .dc-table td.r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- red help button + live alert banner ---------- */
.btn-alert { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .9rem 1rem; margin-bottom: .8rem; border: 0; border-radius: 14px; background: #dc2626; color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 6px 18px rgba(220,38,38,.35); min-height: 64px; }
.btn-alert:hover { background: #b91c1c; } .btn-alert:active { transform: scale(.985); } .btn-alert svg { width: 30px; height: 30px; flex: none; } .btn-alert b { display: block; font-size: 1.1rem; } .btn-alert small { opacity: .9; font-size: .8rem; }
.btn-alert:disabled { opacity: .6; }
.help-alert-state { margin: -.3rem 0 .8rem; padding: .6rem .8rem; border-radius: 10px; background: #fee2e2; color: #991b1b; font-weight: 600; display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#np-alerts { position: fixed; left: 0; right: 0; top: 0; z-index: 500; display: none; flex-direction: column; gap: 2px; } #np-alerts.show { display: flex; }
.np-alert { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; color: #fff; } .np-alert.hot { background: #dc2626; animation: npflash 1s steps(2, jump-none) infinite; } .np-alert.calm { background: #d97706; }
.np-alert .al-ico { font-size: 1.8rem; } .np-alert .al-txt { flex: 1; min-width: 0; } .np-alert .al-txt b { font-size: 1.15rem; display: block; } .np-alert .al-sub { opacity: .92; font-size: .85rem; }
.np-alert .al-btns { display: flex; gap: .5rem; flex-wrap: wrap; } .al-btn { min-height: 44px; padding: 0 1.1rem; border: 2px solid rgba(255,255,255,.85); background: transparent; color: #fff; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; } .al-btn.go { background: #fff; color: #b91c1c; }
@keyframes npflash { 0% { background: #dc2626; } 50% { background: #7f1d1d; } 100% { background: #dc2626; } }
@media (prefers-reduced-motion: reduce) { .np-alert.hot { animation: none; } }

/* ---------- discount presets ---------- */
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; } .preset { font-weight: 700; padding: 0; } .preset.on { background: var(--brand); color: #fff; border-color: var(--brand); } .preset.locked { opacity: .75; }
@media (max-width: 480px) { .presets { grid-template-columns: repeat(3, 1fr); } }
@media print { #np-alerts, .osk, .till-tag { display: none !important; } }

/* start of day: standard float chips + number pad (works without a keyboard) */
.std-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: .2rem 0 .35rem; }
.fl-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.fl-chip { flex: 1 1 auto; min-height: 52px; padding: 0 1rem; border: 2px solid var(--line, #e2e8f0); background: #fff; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.fl-chip.sug { border-color: var(--brand, #0f766e); } .fl-chip.on { background: var(--brand, #0f766e); border-color: var(--brand, #0f766e); color: #fff; }
.fl-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .6rem; }
.fl-pad button { min-height: 54px; font-size: 1.4rem; font-weight: 700; border: 1px solid var(--line, #e2e8f0); background: #f8fafc; border-radius: 12px; cursor: pointer; }
.fl-pad button:active { background: #e2e8f0; }
#day-open-modal .box { max-width: 460px; max-height: 96vh; }
#day-open-modal .box > .err { min-height: 1.2rem; margin: .2rem 0 .5rem; }

/* header: never run off the screen when a page has many actions */
.top { flex-wrap: wrap; row-gap: .4rem; } .top h1 { min-width: 6rem; flex: 1 1 auto; }

/* roster, budget, staff portal */
.grid2 { display: grid; gap: 0 .9rem; grid-template-columns: 1fr; } @media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.tabs-mini { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; } .tabs-mini a { padding: .35rem .9rem; font-weight: 700; font-size: .9rem; color: var(--ink); text-decoration: none; } .tabs-mini a.on { background: var(--brand); color: #fff; }
.ro-wrap { overflow-x: auto; } .ro-grid { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.ro-grid th, .ro-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: .35rem; vertical-align: top; font-size: .82rem; text-align: left; }
.ro-grid thead th { background: #f8fafc; text-align: center; font-size: .8rem; } .ro-grid th.today, .ro-grid td.today { background: #f0fdfa; }
.ro-grid .ro-person { width: 170px; display: table-cell; background: #fff; } .ro-grid thead .ro-person { background: #f8fafc; text-align: left; }
.ro-grid tbody .ro-person { display: table-cell; } .ro-person > span { display: inline-block; vertical-align: middle; } .ro-person small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; } .bad-t { color: #b91c1c; font-style: normal; }
.ro-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); font-weight: 800; font-size: .72rem; display: inline-flex !important; align-items: center; justify-content: center; overflow: hidden; margin-right: .45rem; } .ro-av img { width: 100%; height: 100%; object-fit: cover; } .ro-av.open { background: #e5e7eb; color: #475569; }
.ro-tot { width: 78px; text-align: center !important; font-weight: 700; } .ro-grid tfoot td, .ro-grid tfoot th { background: #f8fafc; font-weight: 600; text-align: center; } .ro-grid tfoot .ro-person { text-align: left; }
.ro-chip { position: relative; display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 4px solid #94a3b8; background: #f1f5f9; border-radius: 8px; padding: .3rem .4rem; margin-bottom: .25rem; cursor: pointer; font: inherit; color: var(--ink); }
.ro-chip b { display: block; font-size: .82rem; } .ro-chip span { display: block; color: var(--muted); font-size: .72rem; }
.ro-chip.st-draft { border-left-style: dashed; } .ro-chip.st-published { border-left-color: #f59e0b; background: #fffbeb; } .ro-chip.st-accepted { border-left-color: #16a34a; background: #f0fdf4; } .ro-chip.st-declined { border-left-color: #dc2626; background: #fef2f2; } .ro-chip.err { outline: 2px solid #fca5a5; }
.ro-flag { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 800; font-size: .7rem; display: flex; align-items: center; justify-content: center; } .ro-flag.bad { background: #dc2626; } .ro-flag.warn { background: #f59e0b; }
.ro-prob { font-size: .7rem; line-height: 1.2; margin: -.1rem 0 .3rem; } .ro-prob.error { color: #b91c1c; } .ro-prob.warn { color: #92400e; }
.ro-add { width: 100%; border: 1px dashed var(--line); background: transparent; border-radius: 8px; color: var(--muted); cursor: pointer; padding: .1rem 0; font-size: 1rem; } .ro-add:hover { background: #f8fafc; color: var(--brand); }
.ro-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; } .ro-mh { text-align: center; font-weight: 700; font-size: .78rem; color: var(--muted); }
.ro-mc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .4rem; min-height: 92px; display: flex; flex-direction: column; gap: .15rem; color: var(--ink); text-decoration: none; font-size: .72rem; } .ro-mc.out { opacity: .45; } .ro-mc.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-l); } .ro-mc b { font-size: .9rem; }
@media (max-width: 700px) { .ro-mc { min-height: 70px; padding: .25rem; font-size: .62rem; } }
/* budget */
.bd-table input { width: 110px; text-align: right; } .bd-table td, .bd-table th { white-space: nowrap; } .bd-table tr.today td { background: #f0fdfa; } .bd-table tr.future td { color: var(--muted); }
.bd-bar { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; } .bd-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; } .bd-bar i.warn { background: #f59e0b; } .bd-bar i.ok { background: #16a34a; }
/* till budget chip */
.bd-chip { display: inline-flex; flex-direction: column; gap: 3px; min-width: 112px; padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: left; } .bd-chip[hidden] { display: none; }
.bd-chip .bd-l { font-size: .68rem; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; } .bd-chip .bd-b { height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; } .bd-chip .bd-b i { display: block; height: 100%; background: var(--brand); } .bd-chip .bd-b i.ok { background: #16a34a; }
@media (max-width: 760px) { .bd-chip { display: none; } }
/* staff portal */
.me-hero { display: flex; gap: 1rem; align-items: center; } .me-av { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; } .me-av img { width: 100%; height: 100%; object-fit: cover; }
.me-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; } .me-tabs a { padding: .4rem .9rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; } .me-tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.me-shift { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .8rem 1rem; border-bottom: 1px solid var(--line); } .me-shift:last-child { border-bottom: 0; }
.me-day { width: 54px; text-align: center; border-radius: 10px; background: #f1f5f9; padding: .25rem 0; flex: none; } .me-day b { display: block; font-size: 1.2rem; line-height: 1.1; } .me-day span { font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.av-row { display: grid; grid-template-columns: 110px 70px 1fr 1fr; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); } .av-row input[type=time] { width: 100%; }
@media (max-width: 560px) { .av-row { grid-template-columns: 80px 56px 1fr 1fr; gap: .4rem; } }
.respond-card { max-width: 480px; margin: 2rem auto; }
.bd-table th.r, .bd-table td.r { text-align: right; }

/* live boards */
.lv-status { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: #dcfce7; color: #166534; } .lv-status i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: lvpulse 1.6s ease-in-out infinite; } .lv-status.bad { background: #fee2e2; color: #991b1b; } .lv-status.bad i { background: #dc2626; animation: none; }
@keyframes lvpulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.5); } }
.lv-flash { animation: lvflash 1.1s ease-out; } @keyframes lvflash { 0% { background: #fef08a; } 100% { background: transparent; } }
.lv-hot .v { color: #16a34a; }
.lv-list { margin-top: .6rem; max-height: 420px; overflow-y: auto; } .lv-row, .lv-sale { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid var(--line); } .lv-row:last-child, .lv-sale:last-child { border-bottom: 0; }
.lv-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); font-weight: 800; font-size: .78rem; display: flex; align-items: center; justify-content: center; } .lv-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lv-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: #cbd5e1; } .lv-dot.on { background: #16a34a; }
.lv-who { flex: 1; min-width: 0; } .lv-who small, .lv-meta small, .lv-sale small { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; } .lv-meta { text-align: right; } .lv-sale { justify-content: space-between; } .lv-sale.new { animation: lvflash 2s ease-out; }.ro-grid th, .ro-grid tfoot th { text-transform: none; letter-spacing: normal; font-size: .82rem; } .ro-grid thead th { font-size: .8rem; } .ro-person b { font-size: .85rem; }

/* who is signed in: always visible, with name and position */
.whoami { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .65rem .2rem .25rem; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; max-width: 230px; min-width: 0; flex: none; }
.whoami .wh-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--brand-l); color: var(--brand-d); font-weight: 800; font-size: .72rem; flex: none; } .whoami .wh-av img { width: 100%; height: 100%; object-fit: cover; }
.whoami .wh-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .whoami .wh-txt b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .whoami .wh-txt small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-d); }
.whoami.owner { border-color: #99f6e4; } .whoami.manager { border-color: #bfdbfe; } .whoami.manager small { color: #1d4ed8; } .whoami.cashier { border-color: #e2e8f0; } .whoami.cashier small { color: #475569; } .whoami.super { border-color: #fcd34d; background: #fffbeb; } .whoami.super small { color: #92400e; }
@media (max-width: 640px) { .whoami { padding-right: .3rem; } .whoami .wh-txt b { display: none; } .whoami .wh-txt small { font-size: .62rem; } }
/* ===== one popup style for the whole app: same shape, header, close button, footer button and behaviour ===== */
.modal { align-items: center; justify-content: center; padding: .75rem; overscroll-behavior: contain; }
.modal .box { --pad: 1.1rem; width: 100%; max-width: 520px; max-height: min(92vh, 780px); max-height: min(92dvh, 780px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: var(--pad); border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.35); animation: popin .16s ease-out; }
.modal .box.wide { max-width: 760px; }
.modal .head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) .9rem; padding: .85rem var(--pad) .7rem; background: #fff; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.modal .head h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; min-width: 0; }
.modal .head .btn { flex: none; min-width: 40px; min-height: 40px; }
.modal .head.cart-head { margin: 0; padding: .8rem 1rem; }
.modal .box .cta { position: sticky; bottom: .6rem; z-index: 2; margin-top: .9rem; box-shadow: 0 0 0 .7rem #fff; }
.modal .box .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; } .modal .box .actions .btn { flex: 1 1 140px; }
.modal .box .err { min-height: 0; }
#day-open-modal .box { max-width: 520px; max-height: min(94vh, 780px); max-height: min(94dvh, 780px); }
#cust-modal .box.cust-box, #hist-modal .box.cust-box { height: min(660px, 92vh); height: min(660px, 92dvh); }
#cust-modal .box.cust-box { max-width: 520px; }
@keyframes popin { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetup { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 639px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal .box { max-width: none; max-height: 94vh; max-height: 94dvh; border-radius: 18px 18px 0 0; animation: sheetup .2s ease-out; padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom)); }
  .modal .box.wide, #cust-modal .box.cust-box, #day-open-modal .box { max-width: none; }
  .modal .head { border-radius: 18px 18px 0 0; padding-top: 1.15rem; } .modal .head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: #cbd5e1; transform: translateX(-50%); }
  .modal .head.cart-head { padding-top: 1.15rem; }
  #cust-modal .box.cust-box, #hist-modal .box.cust-box { height: 94vh; height: 94dvh; }
  .modal .box .cta { bottom: calc(.6rem + env(safe-area-inset-bottom)); }
  .modal input:not([type=checkbox]):not([type=radio]), .modal select, .modal textarea { font-size: 16px; }
  .modal .box .form-grid.two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .modal .box { animation: none; } }
.modal .head { flex: none; }
#tm-sub { margin: 0 0 .7rem !important; }
/* the header supplies the top padding (no negative margin: it broke boxes that clip their content) */
.modal .box { padding-top: 0; } .modal .box.center, .modal .box:not(:has(> .head)) { padding-top: var(--pad); }
.modal .head { margin-top: 0; }
input[type=tel], input[type=time], input[type=url], input[type=datetime-local], input[type=month] { width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.modal input[type=tel], .modal input[type=time] { width: 100%; }

/* training: screenshots with "what to notice" */
.tr-shot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: 1rem 0; }
.tr-shot .tr-figs { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; } .tr-shot.k-desk { grid-template-columns: 1fr; } .tr-shot.k-desk .tr-figs { display: block; }
.tr-shot .tr-desk { margin: 0; } .tr-shot .tr-desk figcaption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.tr-notes b { display: block; margin-bottom: .4rem; } .tr-notes ol { margin: 0; padding: 0; list-style: none; counter-reset: n; } .tr-notes li { counter-increment: n; position: relative; padding: .4rem 0 .4rem 2rem; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.45; } .tr-notes li::before { content: counter(n); position: absolute; left: 0; top: .4rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .78rem; display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .tr-shot { grid-template-columns: 1fr; } }.tr-shot, .tr-shot.k-desk { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .tr-shot .tr-figs { align-items: flex-start; }
.tr-notes { max-width: 640px; margin: 0 auto; width: 100%; }
.tr-shot { width: 100%; box-sizing: border-box; align-self: stretch; }
