/* A3 Tech POS: the "Premium" look (16 Nov 2026, owner: "redesign it newly… easier, simple, user friendly… so so premium").
   One layer over app.css: same class names, same pages, nothing in the pages changes. It is loaded AFTER app.css and the
   person's colour (Themes::css) and BEFORE a page's own styles, so a page that styles itself still wins.
   The look follows a3tech.ai: night colour side menu, soft white cards, big clear buttons and boxes, the site's fonts.
   Every colour comes from the theme variables (--brand, --brand-dark, --brand-deep, --brand-light, --accent…), so all 20
   POS colours keep working. To go back to the old look: remove the premium.css line from layouts/app + layouts/auth. */

:root {
  --font: "Plus Jakarta Sans", "Hind Siliguri", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Bengali", "Nirmala UI", Arial, sans-serif;
  --bg: #f3f7f5;
  --text: #0f201c;
  --muted: #5f736d;
  --border: #e1eae6;
  --soft: #f6faf8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(10, 40, 33, .04), 0 10px 26px -14px rgba(10, 40, 33, .14);
  --shadow-lift: 0 2px 4px rgba(10, 40, 33, .05), 0 22px 44px -20px rgba(10, 40, 33, .26);
  --ring: color-mix(in srgb, var(--accent) 24%, transparent);
  --side: 252px;
}

body { font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background: radial-gradient(1100px 420px at 85% -120px, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--bg); background-attachment: fixed; }
html[lang="bn"] body { font-family: "Hind Siliguri", "Plus Jakarta Sans", "Noto Sans Bengali", "Nirmala UI", sans-serif; }
h1, h2, h3 { letter-spacing: -.02em; }
.num, .value, .table td.num, .mono { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
* { scrollbar-width: thin; scrollbar-color: #c9d6d1 transparent; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- side menu: night colour, soft light at the top, clear big rows ---------- */
.sidebar {
  background:
    radial-gradient(360px 260px at 0% 0%, color-mix(in srgb, var(--brand-light) 42%, transparent), transparent 72%),
    linear-gradient(180deg, var(--brand-deep), var(--brand-dark) 62%, var(--brand-deep));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
  scrollbar-color: rgba(255, 255, 255, .22) transparent; padding-bottom: 32px;
}
.sidebar .brand { padding: 20px 20px 10px; gap: 12px; }
.sidebar .brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); }
.sidebar .brand b { font-family: "Outfit", var(--font); font-weight: 600; font-size: 18px; letter-spacing: .12em; }
.sidebar .brand span { font-family: "Outfit", var(--font); font-weight: 300; font-size: 18px; letter-spacing: .12em; }
.sidebar .brand small { font-size: 10px; letter-spacing: .22em; margin-top: 0; opacity: .9; }
.shop-name { margin: 8px 14px 12px; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.menu a, .nav-mod-head { min-height: 42px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: background .15s, color .15s; }
.menu a { margin: 2px 12px; padding: 9px 12px; }
.nav-mod-head { width: calc(100% - 24px); margin: 2px 12px; padding: 9px 12px; }
.menu svg { width: 19px; height: 19px; opacity: .85; }
.menu a:hover, .nav-mod-head:hover { background: rgba(255, 255, 255, .08); }
.menu a.active, .nav-mod.single.here > .nav-mod-head {
  background: linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07)); color: #fff;
  box-shadow: inset 3px 0 0 var(--side-soft), 0 8px 18px -12px rgba(0, 0, 0, .5);
}
.menu a.active svg, .nav-mod.here > .nav-mod-head svg { opacity: 1; color: var(--side-soft); }
.nav-mod-items { position: relative; padding: 2px 0 8px; }
.nav-mod-items::before { content: ""; position: absolute; left: 33px; top: 4px; bottom: 12px; width: 1px; background: rgba(255, 255, 255, .12); }
.nav-mod-items a { margin-left: 44px; min-height: 36px; padding: 7px 12px; font-size: 13.5px; font-weight: 500; }
.nav-mod-items a svg { display: none; }
.nav-mod-items a.active { box-shadow: none; background: rgba(255, 255, 255, .14); font-weight: 700; }
.menu .group { font-size: 10.5px; letter-spacing: .14em; padding: 18px 24px 6px; opacity: .85; }

/* ---------- top bar: light glass, a clear page name ---------- */
.topbar { height: 64px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); }
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.user-menu summary { padding: 4px 13px 4px 4px; border-color: var(--border); box-shadow: 0 1px 2px rgba(10, 40, 33, .05); transition: box-shadow .15s; }
.user-menu summary:hover { box-shadow: var(--shadow); }
.see-pos summary { padding: 8px 14px; }
.avatar { width: 32px; height: 32px; font-size: 13px; background: linear-gradient(140deg, var(--brand-light), var(--brand-dark)); color: #fff; }
.dropdown { border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lift); top: calc(100% + 10px); min-width: 230px; }
.dropdown a, .dropdown button { padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.dropdown .who { padding: 8px 12px 12px; }
.bell { padding: 9px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(10, 40, 33, .05); }
.bell svg { width: 20px; height: 20px; }
.bell-count { top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--bg); }
.menu-btn { padding: 9px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.content { padding: 24px 24px 56px; max-width: 1480px; }

/* ---------- page parts ---------- */
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.035em; }
.page-head p { margin-top: 4px; font-size: 14px; }
.card { border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card-head { margin-bottom: 14px; }
.card-head h2 { font-size: 16.5px; font-weight: 700; }
.card.flush .card-head { padding: 16px 20px 0; }
.section-title { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; margin: 22px 0 10px; }
.stats { gap: 16px; margin-bottom: 20px; }
.stat { border-radius: var(--radius); padding: 16px 18px; transition: transform .15s, box-shadow .15s; }
a.stat:hover, .stat:has(a):hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.stat .label { font-size: 12.5px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.stat.brand {
  background: radial-gradient(240px 150px at 100% 0%, color-mix(in srgb, var(--brand-light) 75%, transparent), transparent 72%), linear-gradient(150deg, var(--brand-dark), var(--brand));
  box-shadow: 0 18px 34px -18px color-mix(in srgb, var(--brand) 85%, transparent);
}
.grid-2, .grid-3 { gap: 20px; }

/* ---------- buttons: bigger, soft depth, a small lift on hover ---------- */
.btn {
  min-height: 40px; padding: 9px 16px; border-radius: 12px; font-weight: 700; letter-spacing: -.005em;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px -12px color-mix(in srgb, var(--brand) 90%, transparent);
  transition: transform .15s, box-shadow .15s, filter .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: none; filter: brightness(.97); }
.btn svg { width: 17px; height: 17px; }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); box-shadow: 0 1px 2px rgba(10, 40, 33, .06); }
.btn-light:hover { background: var(--soft); border-color: #cfdcd7; filter: none; }
.btn-danger { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.btn-warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.btn-link { background: none; color: var(--brand); box-shadow: none; min-height: 0; padding: 4px 6px; }
.btn-link:hover { transform: none; text-decoration: underline; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: 16px; border-radius: 14px; }
.btn[disabled] { transform: none; box-shadow: none; filter: none; }

/* ---------- forms: tall boxes, a soft ring when you type ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #23372f; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=tel], input[type=url],
input[type=date], input[type=datetime-local], input[type=search], input[type=file], select, textarea {
  min-height: 42px; padding: 10px 13px; border-radius: 12px; border-color: #d3e0db; box-shadow: inset 0 1px 2px rgba(10, 40, 33, .04);
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #bccfc8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
input[type=checkbox], input[type=radio] { min-height: 0; }
textarea { min-height: 92px; }
.help { margin-top: 5px; font-size: 12.5px; }
.check input { width: 18px; height: 18px; margin-top: 2px; }
.form-grid { gap: 0 18px; }
.form-actions { gap: 10px; padding-top: 10px; }
.searchbar { gap: 10px; margin-bottom: 14px; }
.chip { padding: 8px 14px; transition: background .15s, border-color .15s; }
.kind-tabs label { border-radius: 16px; padding: 16px; }

/* ---------- tables: quiet headings, roomy rows ---------- */
.table th { background: transparent; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; padding: 13px 14px; }
.table td { padding: 13px 14px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, #fff); }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 20px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 20px; }
.table tfoot td { background: var(--soft); }
.empty { padding: 44px 24px; font-size: 14.5px; }
.thumb { width: 46px; height: 46px; border-radius: 12px; }

/* ---------- small parts ---------- */
.badge { padding: 4px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
.alert { padding: 13px 16px; border-radius: 14px; }
.pager { gap: 8px; padding: 16px; }
.pager a, .pager span { padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.tabs { gap: 4px; padding: 4px; border: 0; border-radius: 14px; background: #e7efeb; width: fit-content; max-width: 100%; margin-bottom: 18px; }
.tabs a { padding: 8px 15px; border: 0; border-radius: 10px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(10, 40, 33, .14); border: 0; }
.list-plain li { padding: 10px 0; }
dialog { border-radius: 22px; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(3, 30, 25, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog .dialog-head { padding: 16px 22px; }
dialog .dialog-head h3 { font-size: 17px; font-weight: 700; }
dialog .dialog-body { padding: 22px; }
.line-results { border-radius: 14px; box-shadow: var(--shadow-lift); }
.line-results button { padding: 11px 14px; }
.progress { height: 8px; }
.pipe-col { border-radius: 16px; background: #e7efeb; padding: 10px; }
.pipe-card { border-radius: 12px; padding: 11px 12px; }
.work-row { border-radius: 14px; padding: 12px; background: #fff; }
.size-card { border-radius: var(--radius); }
.cust-picked { border-radius: 14px; padding: 12px 14px; }
.totals li.grand span, .totals li.grand b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.scan-box input { border-radius: 14px; }

/* ---------- sign-in: the website's dark hero, a floating white card ---------- */
.auth { position: relative; isolation: isolate; padding: 24px 16px;
  background:
    radial-gradient(900px 520px at 80% 0%, color-mix(in srgb, var(--brand-light) 55%, transparent), transparent 62%),
    radial-gradient(700px 480px at 0% 70%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--brand-deep), var(--brand-dark) 70%, var(--brand-mid)); }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 30%, transparent 80%); }
.auth-card { max-width: 420px; border-radius: 26px; padding: 34px 32px 30px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .5); }
.auth-logo { gap: 14px; margin-bottom: 22px; }
.auth-logo img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 12px 24px -12px rgba(3, 35, 31, .7); }
.auth-logo b { font-family: "Outfit", var(--font); font-weight: 600; font-size: 22px; letter-spacing: .12em; }
.auth-logo span { font-family: "Outfit", var(--font); font-weight: 300; font-size: 22px; letter-spacing: .12em; }
.auth-head h1 { font-size: 20px; font-weight: 800; }
.auth-foot { color: rgba(255, 255, 255, .7); margin-top: 18px; }
.seg { border-radius: 14px; padding: 4px; margin-bottom: 18px; background: #e7efeb; }
.seg a { padding: 10px 8px; border-radius: 10px; }

/* ---------- dashboard (its own stylesheet comes later, so these name the page first) ---------- */
.content .dash-band {
  background:
    radial-gradient(620px 260px at 90% 0%, color-mix(in srgb, var(--brand-light) 38%, transparent), transparent 68%),
    linear-gradient(160deg, var(--brand-deep), var(--brand-dark) 70%, var(--brand-mid) 130%);
  margin: 0 -24px; padding: 22px 24px 18px;
}
.content .dash > .dash-band:first-child { margin-top: -24px; }
.content .dash-band.tall { padding-bottom: 70px; }
.content .dash-band .dash-chips-wrap { margin: 0 -24px; padding: 0 24px 2px; }
.content .dash-welcome { font-size: 19px; letter-spacing: -.02em; }
.content .dash-welcome strong { font-weight: 800; }
.content .dash-card { border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); }
.content .dash-h2 { font-weight: 700; letter-spacing: -.02em; }
.content .dash-seg, .content .dash-chip { font-weight: 700; }

@media (max-width: 960px) {
  .sidebar { width: 284px; }
  .topbar { height: 58px; padding: 0 14px; }
  .content { padding: 16px 14px 48px; }
  .page-head h1 { font-size: 22px; }
  .card { padding: 16px; border-radius: 16px; }
  .content .dash-band { margin: 0 -14px; padding: 18px 14px 16px; }
  .content .dash > .dash-band:first-child { margin-top: -16px; }
  .content .dash-band .dash-chips-wrap { margin: 0 -14px; padding: 0 14px 2px; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  /* small screens: the person's round letter is enough, so the page name has room */
  .user-menu:not(.see-pos) summary { padding: 4px; }
  .user-menu:not(.see-pos) summary .nowrap { display: none; }
  /* phones zoom in on a box whose text is under 16 px */
  input[type=text], input[type=password], input[type=email], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .stat, .table tbody tr { transition: none; } .btn:hover, a.stat:hover { transform: none; } }
@media print { body { background: #fff; } }
/* ============ screens that carry their own styles (16 Nov 2026): named with "body" in front so these lines win ============ */

/* ---------- All sales: the ticket list keeps its shape; fonts, lines, buttons and colours follow the Premium look ---------- */
body .at { font-family: var(--font); --line: var(--border); --mute: var(--muted); --txt: var(--text); --stub: var(--soft); }
html[lang="bn"] body .at { font-family: "Hind Siliguri", "Plus Jakarta Sans", sans-serif; }
body .at .mono, body .at-eyebrow, body .at-btn, body .at-tab, body .at-search input, body .at-filter summary, body .at-fgrid label, body .at-fgrid input, body .at-fgrid select,
body .at-day span, body .tk-time, body .tk-inv, body .tk-phone, body .tk-lab, body .tk-amt, body .tk-sums .v, body .tk-pager, body .tk-pager a, body .tk-pager span.btn, body .tk-view,
body .as, body .as-tot, body .as-cap { font-family: inherit; }
body .at-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; }
body .at-head { margin-bottom: 20px; }
body .at-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
body .at-btn { height: 42px; padding: 0 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font-size: 14px; font-weight: 700;
  box-shadow: 0 1px 2px rgba(10, 40, 33, .06); transition: transform .15s, box-shadow .15s, filter .15s; }
body .at-btn:hover { transform: translateY(-1px); filter: none; background: var(--soft); }
body .at-btn.solid { border-color: transparent; color: #fff; background: linear-gradient(180deg, var(--brand-light), var(--brand));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px -12px color-mix(in srgb, var(--brand) 90%, transparent); }
body .at-btn.solid:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--brand-light), var(--brand)); }
body .at-tab { height: 38px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; font-weight: 600; transition: border-color .15s, background .15s; }
body .at-tab.on { background: var(--brand-dark); border-color: var(--brand-dark); font-weight: 700; box-shadow: 0 8px 16px -10px var(--brand-dark); }
body .at-tab:hover:not(.on) { border-color: var(--accent); }
body .at-search input { height: 42px; border: 1px solid #d3e0db; border-radius: 12px; font-size: 14px; }
body .at-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
body .at-filter summary { font-weight: 700; }
body .at-fgrid { gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
body .at-fgrid label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; }
body .at-fgrid input, body .at-fgrid select { height: 42px; min-height: 42px; border: 1px solid #d3e0db; border-radius: 12px; font-size: 14px; }
body .at-fgrid .go .at-btn { height: 42px; }
body .at-day b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
body .at-day span { font-size: 12.5px; font-weight: 600; }
body .tk { border-radius: 18px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
body .tk:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--border)), var(--shadow-lift); }
body .tk-strip { border-radius: 18px 0 0 18px; background: radial-gradient(160px 90px at 0% 0%, color-mix(in srgb, var(--brand-light) 45%, transparent), transparent 75%), linear-gradient(160deg, var(--brand-deep), var(--brand-dark)); }
body .tk-time { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
body .tk-inv { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
body .tk-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; }
body .tk-phone { font-size: 13px; font-weight: 500; }
body .tk-cut { border-left: 1.5px dashed #cbd9d3; }
/* the two round notches of the ticket are left out: with the fine edge around the card they showed as bumps */
body .tk-cut::before, body .tk-cut::after { display: none; }
body .tk-money { border-radius: 0 18px 18px 0; }
body .tk-lab { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; }
body .tk-amt { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
body .tk-amt.paid { font-size: 18px; }
body .tk-sums .v { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
body .tk-view { height: 36px; border-radius: 10px; font-size: 13px; font-weight: 700; background: linear-gradient(180deg, var(--brand-light), var(--brand)); box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--brand) 90%, transparent); }
body .tk-ico { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px; }
body .tk-ico:hover { border-color: var(--accent); }
body .at .pill { height: 26px; border-width: 1.5px; border-radius: 999px; font-size: 12px; }
body .at .chip { border-radius: 999px; padding: 0 10px; }
body .tk-pager a, body .tk-pager span.btn { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; }
body .at-empty { border-radius: 18px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
/* the ⋮ sheet */
body .as { color: var(--text); border-radius: 24px; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5); }
body .as::backdrop { background: rgba(3, 30, 25, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body .as-head b { font-weight: 800; letter-spacing: -.02em; }
body .as-x { border-color: var(--border); }
body .as-tot { font-size: 16px; font-weight: 800; }
body .as-tile { border-color: var(--border); border-radius: 14px; color: var(--text); transition: border-color .15s, transform .15s; }
body .as-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
body .as-tile i { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
body .as-cap { font-size: 11px; font-weight: 700; letter-spacing: .1em; }
body .as-list { border-color: var(--border); border-radius: 14px; }
body .as-item { color: var(--text); padding: 12px 14px; }
body .as-item i { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
body .as-item:hover { background: var(--soft); }
body .as-del { border-radius: 12px; }
@media (max-width: 767px) {
  body .at-head h1 { font-size: 24px; }
  body .tk { border-radius: 16px; }
  body .tk-strip { border-radius: 16px 0 0 16px; }
  body .tk-money { border-radius: 0 16px 16px 0; }
  body .tk-time { font-size: 13.5px; }
  body .tk-name { font-size: 15px; }
  body .tk-amt { font-size: 16px; }
  body .tk-amt.paid { font-size: 14px; }
  body .tk-sums .v { font-size: 14px; }
}

/* ---------- the sale pop-up (View): the same parts in the POS's own colour, no blue ---------- */
body .qs { background: var(--bg); color: var(--text); }
body .qs-head { padding-top: 20px; box-shadow: 0 1px 0 var(--border); }
body .qs-kicker { color: var(--muted); font-weight: 600; }
body .qs-top h1 { font-weight: 800; letter-spacing: -.035em; }
body .qs-chip { height: 24px; padding: 0 10px; border-radius: 999px; }
body .qs-x { border-color: var(--border); border-radius: 12px; color: var(--text); }
body .qs-x:hover { border-color: var(--accent); }
body .qs-step::before { background: var(--border); }
body .qs-step.done::before { background: color-mix(in srgb, var(--accent) 55%, #fff); }
body .qs-step.done .qs-dot { background: var(--ok); border-color: var(--ok); }
body .qs-step.now .qs-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
body .qs-step.now b { color: var(--brand); }
body .qs-step small, body .qs-muted { color: var(--muted); }
body .qs-btn { height: 40px; padding: 0 15px; border-color: var(--border); border-radius: 12px; color: var(--text); box-shadow: 0 1px 2px rgba(10, 40, 33, .06); transition: transform .15s, border-color .15s; }
body .qs-btn:hover { filter: none; border-color: var(--accent); transform: translateY(-1px); }
body .qs-btn.dark { border-color: transparent; color: #fff; background: linear-gradient(180deg, var(--brand-light), var(--brand)); box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--brand) 90%, transparent); }
body .qs-btn.danger { border-color: #f5c2bb; color: var(--danger); background: var(--danger-bg); box-shadow: none; }
body .qs-tabs { gap: 4px; padding: 4px; margin: 10px 0 12px; border-radius: 14px; background: #e7efeb; width: fit-content; max-width: 100%; }
body .qs-tab { padding: 8px 16px; border: 0; border-radius: 10px; font-weight: 600; color: var(--muted); }
body .qs-tab.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(10, 40, 33, .14); }
body .qs-card { border-color: var(--border); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
body .qs-lab { color: var(--muted); letter-spacing: .1em; }
body .qs-lab a, body .qs-lab button, body .qs-kv .val a { color: var(--brand); }
body .qs-kv span:first-child { color: var(--muted); }
body .qs-thumb { border-radius: 10px; background: var(--soft); }
body .qs-line, body .qs-sum, body .qs-table td { border-color: var(--border); }
body .qs-sum .big { font-size: 17px; }
body .qs-due { border-radius: 12px; padding: 13px 15px; }
body .qs-copy { border-color: var(--border); border-radius: 9px; }
body .qs-post textarea, body .qs-pay input, body .qs-pay select { border-color: #d3e0db; border-radius: 12px; min-height: 42px; }
body .qs-pay input, body .qs-pay select { height: 42px; }
body .qs-av.b { background: var(--brand); }
body .qs-table th { color: var(--muted); border-color: var(--border); letter-spacing: .07em; }
body .qs-foot { border-color: var(--border); padding: 14px 24px; }

/* ---------- Add sale / POS / Add wholesale: only the finishing touches ---------- */
body .sx-card { padding: 20px 22px; }
body .sx-ico { width: 40px; height: 40px; border-radius: 12px; }
body .sx-head h2 { font-size: 16.5px; font-weight: 700; }
body .sx-total { border-radius: 16px; padding: 16px 18px;
  background: radial-gradient(220px 120px at 100% 0%, color-mix(in srgb, var(--brand-light) 70%, transparent), transparent 72%), linear-gradient(150deg, var(--brand-dark), var(--brand)); }
body .sx-total b { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
body .sx .pay-row, body .sx .pay-row:has(.pay-ref) { border-radius: 14px; padding: 9px 11px; }
body .sx .pay-row input, body .sx-edit select, body .sx-edit input[type=number], body .sx-cash input { min-height: 38px; }
body .sx-sum > div { border-radius: 14px; }
body .sx-sum b { font-weight: 800; letter-spacing: -.02em; }
body .ws-banner { border-radius: 16px; }

/* one sign-in, three products (App\Services\Apps): the product switcher in the top bar */
.app-switcher { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft, #f1f5f4); border: 1px solid var(--border); }
.app-switcher a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.app-switcher a:hover { color: var(--text); }
.app-switcher a.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.app-switcher .icon { width: 15px; height: 15px; }
@media (max-width: 720px) { .app-switcher a { padding: 6px 9px; } .app-switcher a:not(.on) span { display: none; } }
/* ============ easier to use (16 Nov 2026): the parts added by partials/quick-tools, partials/bottom-nav and js/premium.js ============ */

/* ---------- top bar: search + "New" ---------- */
.qtools { display: flex; align-items: center; gap: 10px; }
.qfind { position: relative; }
.qfind-open { display: none; }
.qfind-box { display: flex; align-items: center; gap: 8px; width: 300px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(10, 40, 33, .05); transition: border-color .15s, box-shadow .15s, width .2s; }
.qfind-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); width: 360px; }
.qfind-box svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.qfind-box input { flex: 1; min-width: 0; min-height: 0; height: 36px; padding: 0; border: 0; box-shadow: none; background: none; font-size: 14px; }
.qfind-box input:focus { box-shadow: none; outline: none; }
.qfind-x { display: none; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.qfind-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lift); z-index: 60; }
.qfind-h { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qfind-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.qfind-row:hover, .qfind-row:focus { background: var(--soft); outline: none; }
.qfind-row span { min-width: 0; }
.qfind-row b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qfind-row small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qk { flex: none; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 11%, #fff); position: relative; }
.qk::after { content: ""; position: absolute; inset: 9px; border-radius: 3px; background: var(--brand); }
.qk-c::after { border-radius: 50%; }
.qk-p::after { border-radius: 2px; transform: rotate(45deg); }
.qfind-wait { padding: 10px; color: var(--muted); font-size: 13px; }
.user-menu.qnew summary { border: 0; padding: 6px 14px; min-height: 40px; color: #fff; border-radius: 12px; font-weight: 700; background: linear-gradient(180deg, var(--brand-light), var(--brand)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px -12px color-mix(in srgb, var(--brand) 90%, transparent); }
.qnew summary svg { width: 17px; height: 17px; }
.qnew .dropdown a { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.qnew .dropdown a svg { width: 17px; height: 17px; color: var(--brand); flex: none; }

/* ---------- phones: the bottom bar ---------- */
.bnav { display: none; }
@media (max-width: 760px) {
  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 34;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, #fff 90%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgba(10, 40, 33, .3); }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; padding: 6px 2px 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer; border-radius: 12px; }
  .bnav svg { width: 22px; height: 22px; }
  .bnav a.on { color: var(--brand); }
  .bnav a.on svg { stroke-width: 2.2; }
  .bnav .bnav-main { color: var(--brand-dark); font-weight: 700; }
  .bnav .bnav-main i { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; color: #fff; font-style: normal;
    background: linear-gradient(160deg, var(--brand-light), var(--brand-dark)); box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--brand) 90%, transparent), 0 0 0 4px #fff; }
  .bnav .bnav-main svg { width: 26px; height: 26px; }
  .content { padding-bottom: 96px; }
  .menu-open .bnav { display: none; }
  /* the search box folds into a button and opens over the top bar */
  .qfind-open { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--text); cursor: pointer; }
  .qfind-open svg { width: 19px; height: 19px; }
  .qfind-box { display: none; }
  .qfind.open .qfind-box { display: flex; position: fixed; left: 10px; right: 10px; top: 9px; width: auto; z-index: 61; height: 42px; }
  .qfind.open .qfind-box:focus-within { width: auto; }
  .qfind.open .qfind-x { display: block; }
  .qfind-pop { position: fixed; left: 10px; right: 10px; top: 58px; width: auto; max-width: none; }
  .qfind-box input { font-size: 16px; }
  .qnew { display: none; }   /* on phones the bottom bar's Sell button and the menu do this job */
  .topbar .app-switch span, .topbar .hide-sm { display: none; }
}
@media print { .bnav, .qtools { display: none !important; } }

/* ---------- phones: a wide list becomes one card per row ---------- */
@media (max-width: 640px) {
  table.tcards, table.tcards tbody, table.tcards tfoot { display: block; width: 100%; }
  table.tcards thead { display: none; }
  table.tcards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  table.tcards tr:last-child { border-bottom: 0; }
  table.tcards td, .card.flush table.tcards td:first-child, .card.flush table.tcards td:last-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex: 1 1 100%; min-width: 0; padding: 2px 0; border: 0; text-align: right; background: none !important; }
  table.tcards td[data-label]::before { content: attr(data-label); flex: none; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.tcards td.tc-title { order: -1; justify-content: flex-start; text-align: left; font-size: 15.5px; font-weight: 700; }
  table.tcards td.tc-title::before { display: none; }
  table.tcards td:not([data-label]) { flex: 0 0 auto; justify-content: flex-start; text-align: left; }
  table.tcards td.tc-empty { display: none; }
  table.tcards td .actions { justify-content: flex-start; }
  table.tcards td[colspan] { flex: 1 1 100%; justify-content: center; text-align: center; }
  table.tcards tfoot tr { background: var(--soft); }
  .table-wrap:has(> table.tcards) { overflow-x: visible; }
}

/* ---------- the Save bar stays on screen on a long form ---------- */
.form-actions.stick { position: sticky; bottom: 14px; z-index: 6; margin: 8px -8px -8px; padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, #fff 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
@media (max-width: 760px) { .form-actions.stick { bottom: calc(78px + env(safe-area-inset-bottom)); } .form-actions.stick .btn { flex: 1; } }

/* ---------- "Use your last filters" ---------- */
.lastf { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); font-size: 13.5px; }
.lastf span { flex: 1; min-width: 160px; color: var(--muted); }
.lastf b { color: var(--text); }

/* ---------- favourites in the side menu ---------- */
.nav-favs:empty { display: none; }
.nav-favs { margin: 4px 0 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.nav-favs-h { padding: 10px 24px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--side-soft); opacity: .85; }
.menu a { position: relative; }
.menu a > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-star { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -4px -6px -4px 0; border-radius: 8px; opacity: 0; color: var(--side-soft); cursor: pointer; transition: opacity .15s, background .15s; }
.fav-star svg { display: block !important; width: 15px !important; height: 15px !important; opacity: 1 !important; }
.menu a:hover .fav-star, .fav-star.on { opacity: .9; }
.fav-star:hover { background: rgba(255, 255, 255, .14); }
.fav-star.on svg { fill: currentColor; }
.nav-favs .fav-star { display: none; }
@media (hover: none) { .fav-star { opacity: .45; } }

/* ---------- the selling screen: product tiles and quick cash ---------- */
.ptiles-wrap { margin: 0 0 12px; }
.ptiles-h { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ptiles { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.ptile { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; transition: border-color .15s, transform .12s, box-shadow .15s; }
.ptile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ptile:active { transform: scale(.96); }
.ptile img, .ptile i { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); font-style: normal; font-size: 26px; font-weight: 800; }
.ptile span { font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cash-quick { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.cash-quick:empty { display: none; }
.cash-quick button { min-height: 36px; padding: 0 12px; border: 1px solid color-mix(in srgb, #15803d 30%, var(--border)); border-radius: 999px; background: #fff; color: #166534; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.cash-quick button.on { background: #15803d; border-color: #15803d; color: #fff; }

/* ---------- the dashboard's "Get started" card ---------- */
.start { display: none; margin: 0 0 44px; }
.start.show { display: block; }
.start-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.start-bar { height: 8px; margin: 12px 0 14px; border-radius: 99px; background: #e7efeb; overflow: hidden; }
.start-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-light), var(--brand)); }
.start-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.start-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.start-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.start-step i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1.5px solid #cfdad5; color: var(--muted); font-style: normal; font-weight: 800; }
.start-step i svg { width: 17px; height: 17px; }
.start-step b { display: block; font-size: 14.5px; }
.start-step small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.start-step.done { background: var(--ok-bg); border-color: #a7f3d0; }
.start-step.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.start-step.done b { text-decoration: line-through; text-decoration-color: rgba(4, 120, 87, .45); }

/* ============ calmer screens (16 Nov 2026, owner: "find the scope to make it feels premium… dont make it conjusted"):
   less ink on every list, row buttons on one line, the boxes the first pass missed. No page's work changes. ============ */

/* ---------- lists: a name is a link without a line under it; the line comes when the mouse is on it ---------- */
.table td a:not(.btn), .list-plain a:not(.btn) { text-decoration: none; font-weight: 600; }
.table td a:not(.btn):hover, .list-plain a:not(.btn):hover { text-decoration: underline; }
/* a 0 in a list of numbers is quiet, so the real numbers stand out (premium.js marks them) */
.table td.is-zero { color: #b4c3bd; font-weight: 400; }
.table td .mono, .table td.mono { font-size: 12.5px; }

/* ---------- the buttons of a row: small, quiet, side by side (they were stacked and made every row tall) ---------- */
.table td:has(> .btn), .table td:has(> form.inline), .table td:has(> form.quick) { white-space: nowrap; }
.table td form.inline, .table td form.quick { display: inline-block; vertical-align: middle; }
.table td .btn-sm { min-height: 30px; padding: 4px 11px; font-size: 12.5px; border-radius: 9px; box-shadow: none; }
.table td .btn-sm.btn-light { border-color: var(--border); }
.table td .btn-sm.btn-danger { background: transparent; color: var(--danger); }
.table td .btn-sm.btn-danger:hover { background: var(--danger-bg); }

/* ---------- time, month and week boxes look like every other box ---------- */
input[type=time], input[type=month], input[type=week] {
  display: block; width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid #d3e0db; border-radius: 12px; background: #fff; color: var(--text);
  font: inherit; box-shadow: inset 0 1px 2px rgba(10, 40, 33, .04); transition: border-color .15s, box-shadow .15s;
}

/* ---------- the top of a page: a long explanation stays a readable width and a soft colour ---------- */
.page-head > div:first-child { min-width: 0; }
.page-head p { max-width: 78ch; color: var(--muted); }
.section-title { color: var(--muted); text-transform: uppercase; }

/* ---------- Reports: lighter cards under their headings, an arrow that shows they open ---------- */
.report-grid { gap: 14px; margin-bottom: 6px; }
.report-grid .report-link { position: relative; margin: 0; padding: 16px 40px 16px 18px; border-radius: 16px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.report-grid .report-link b { font-size: 15px; }
.report-grid .report-link .muted { font-size: 13px; line-height: 1.4; }
.report-grid .report-link::after { content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-54%); font-size: 22px; color: #b4c3bd; transition: color .15s, right .15s; }
.report-grid .report-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.report-grid .report-link:hover::after { color: var(--brand); right: 13px; }

/* ---------- a folded part of a page (settings that are set once sit under one line) ---------- */
details.fold { margin-bottom: 20px; }
details.fold > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; padding: 14px 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; font-weight: 700; box-shadow: var(--shadow); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold > summary small { font-weight: 500; color: var(--muted); }
details.fold[open] > summary { margin-bottom: 16px; }

/* ---------- fingerprint rules: a slot's name, start and late time sit on one row ---------- */
.form-grid:has([name="slot1_name"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-grid:has([name="slot1_name"]) { grid-template-columns: 1fr; } }

/* ---------- My work: the lines above the cards are one quiet strip each ---------- */
.work-bar { font-size: 13.5px; gap: 8px; }
.work-bar .muted { font-size: 13px; }

/* ---------- "Force delete" under the product list waits until a product is ticked (premium.js) ---------- */
.fd-wait { display: none !important; }

/* =====================================================================================================================
   Add sale / Edit / POS on a phone: an app screen (17 Nov 2026, the owner's phone picture of Add sale: "redesign it").
   Only up to 640px wide, only on the page that holds #sale-form. No field, name or id changes: this is the look, and one
   bar (premium.js payBar) with the total and a "Pay" button that stays above the bottom menu.
   ===================================================================================================================== */
.paybar { display: none; }
@media (max-width: 640px) {
  /* the page's title and its buttons become one slim row */
  body:has(#sale-form) .content { padding: 10px 10px 170px; }
  body:has(#sale-form) .page-head { margin: 0 0 10px; gap: 8px; flex-wrap: nowrap; }
  body:has(#sale-form) .page-head h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body:has(#sale-form) .page-head > div:first-child { flex: 1; min-width: 0; }
  body:has(#sale-form) .page-head p { margin: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body:has(#sale-form) .page-head .flex { gap: 6px; flex-wrap: nowrap; margin-left: auto; }
  body:has(#sale-form) .page-head .btn { min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; }

  body .sx .sale-grid { gap: 10px; grid-template-columns: minmax(0, 1fr); }
  body .sx .sale-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
  body .sx .sale-left > .card { margin: 0; min-width: 0; }
  body .sx .lines, body .sx .sale-side { min-width: 0; }
  body .sx-card, body .sx .sale-panel { padding: 14px 14px 12px; border-radius: 20px; }
  body .sx-head { gap: 10px; margin-bottom: 10px; }
  body .sx-ico { width: 30px; height: 30px; border-radius: 10px; }
  body .sx-ico svg { width: 16px; height: 16px; }
  body .sx-head h2 { font-size: 15px; }
  body .sx-head p { display: none; }

  /* the customer: three fields close together, small quiet labels, 16px text (an iPhone zooms in on smaller) */
  body .sx .cust-grid { grid-template-columns: 1fr; gap: 8px; }
  body .sx .cust-grid .field { margin: 0; }
  body .sx .cust-grid label { margin: 0 0 4px 2px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  body .sx .cust-grid .help { display: none; }
  body .sx .cust-grid input { min-height: 48px; padding: 10px 14px; border-radius: 14px; font-size: 16px; background: var(--soft); }
  body .sx .cust-grid input:focus { background: #fff; }
  body .sx .cust-phone-in { font-size: 18px; letter-spacing: .03em; }
  body .sx .cust-picked { margin-bottom: 8px; }

  /* the items: one search box with the barcode sign inside it, smaller tiles, each chosen product its own card */
  body .sx .line-find { display: block; margin-bottom: 10px; }
  body .sx .line-find > svg { position: absolute; left: 14px; top: 25px; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; z-index: 1; }
  body .sx .line-find .line-search { width: 100%; min-height: 50px; padding: 10px 14px 10px 44px; border-radius: 16px; font-size: 16px; background: var(--soft); }
  body .sx .line-find .line-search:focus { background: #fff; }
  body .sx .line-find .line-results { left: 0; }
  body .sx .ptiles-wrap { margin: 0 -14px 8px; }
  body .sx .ptiles-h { margin: 0 14px 6px; }
  body .sx .ptiles { grid-auto-columns: 84px; gap: 8px; padding: 2px 14px 6px; scrollbar-width: none; }
  body .sx .ptiles::-webkit-scrollbar { display: none; }
  body .sx .ptile { padding: 5px 5px 7px; border-radius: 13px; }
  body .sx .ptile span { font-size: 11.5px; }
  body .sx .lines-table tr[data-variant] { margin-bottom: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--soft); }
  body .sx .lines-table tr[data-variant] input { min-height: 42px; font-size: 16px; border-radius: 12px; background: #fff; }
  body .sx .lines-table tr[data-variant] .line-sum { font-size: 16px; }
  body .sx .line-empty { padding: 14px 8px; font-size: 13.5px; }
  body .sx .lines-foot { padding: 4px 2px 0; font-size: 13px; color: var(--muted); }

  /* the sale's details and the money */
  body .sx .sx-meta { grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  body .sx .sx-meta .field { margin: 0; min-width: 0; }
  body .sx .sx-meta label { margin: 0 0 4px 2px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  body .sx .sx-meta select { min-height: 44px; border-radius: 13px; font-size: 15px; }
  body .sx .sx-meta .field:nth-child(odd):last-child { grid-column: 1 / -1; }
  body .sx .sx-edit input[type=number], body .sx .sx-edit select, body .sx .pay-row input, body .sx .sx-cash input { font-size: 16px; }
  body .sx .sx-total { margin: 10px 0 6px; padding: 14px 16px; border-radius: 18px; }
  body .sx .sale-buttons { margin-top: 14px; gap: 8px; }
  body .sx .sale-buttons .btn-lg { min-height: 54px; border-radius: 16px; font-size: 16.5px; }
  body .sx .sale-buttons .btn-light { min-height: 46px; border-radius: 14px; }

  /* the bar that stays: total and pieces on the left, "Pay" on the right; it goes away once the payment part is on screen */
  .paybar { position: fixed; left: 10px; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 33; display: flex; align-items: center; gap: 12px;
    padding: 9px 9px 9px 16px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 16px 36px color-mix(in srgb, var(--brand-dark) 42%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .22s ease, opacity .22s ease; }
  .paybar.off { transform: translateY(26px); opacity: 0; pointer-events: none; }
  body.embed .paybar, body.no-menu .paybar { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .menu-open .paybar { display: none; }
  .paybar-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
  .paybar-sum small { font-size: 11.5px; font-weight: 600; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
  .paybar-sum b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .paybar button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 15px; background: #fff; color: var(--brand-dark);
    font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer; }
  .paybar button svg { width: 18px; height: 18px; }

  /* the help bubble is small here and sits above the bar, so it covers no product */
  body:has(#sale-form) .a3h:not(.open) { right: 10px; bottom: calc(146px + env(safe-area-inset-bottom)); }
  body:has(#sale-form) .a3h:not(.open) .a3h-fab { height: 44px; padding: 0 5px; opacity: .92; }
  body:has(#sale-form) .a3h:not(.open) .a3h-ico { width: 34px; height: 34px; }
}
@media print { .paybar { display: none !important; } }

/* =====================================================================================================================
   A sale's own page on a phone (17 Nov 2026, the owner's phone picture of AS29592: "redesign this"). The page's two columns
   were written into the page itself (style="grid-template-columns: 2fr 1fr"), so on a phone they stayed side by side and the
   right one ran off the screen. Now: one column, the buttons in one row that slides sideways, each product two short lines.
   ===================================================================================================================== */
/* =====================================================================================================================
   All sales on a phone (17 Nov 2026, the owner's phone picture: "to see the sales user need to scroll huge.. fix it").
   The title, buttons, tabs, search and the four filters filled the whole first screen. Now three slim rows: title + buttons,
   the tabs, search + a "Filter" button; the dates, location and type open only when Filter is tapped (premium.js salesTop),
   and stay open while one of them is set. The first sale shows on the first screen.
   ===================================================================================================================== */
@media (max-width: 640px) {
  body .at .at-eyebrow, body .at .at-head p { display: none; }
  body .at .at-head { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 0; }
  body .at .at-head > div:first-child { min-width: 0; }
  body .at .at-head h1 { margin: 0; font-size: 22px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body .at .at-head .flex { flex: none; flex-wrap: nowrap; gap: 6px; margin: 0; }
  body .at .at-head .at-btn { height: 38px; min-height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; white-space: nowrap; }
  body .at .at-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0 0 10px; align-items: center; }
  body .at .at-tabs { grid-column: 1 / -1; gap: 6px; margin: 0 -14px; padding: 0 14px 2px; width: auto; scrollbar-width: none; }
  body .at .at-tabs::-webkit-scrollbar { display: none; }
  body .at .at-tab { flex: none; height: 36px; min-height: 36px; padding: 0 14px; font-size: 13.5px; }
  body .at .at-search { grid-column: 1; width: auto; min-width: 0; height: 44px; margin: 0; }
  body .at .at-search input { font-size: 16px; min-width: 0; }
  body .at:not(.ftog) .at-search { grid-column: 1 / -1; }
  .at-ftog { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .at-ftog svg { width: 17px; height: 17px; }
  .at-ftog.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
  .at-ftog i { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
  .at-ftog.set i { display: block; }
  body .at.ftog .at-filter { display: none; }
  body .at.ftog .at-filter.open { display: block; }
  body .at .at-filter { margin: 0 0 12px; padding: 12px; border-radius: 18px; }
  body .at .at-fgrid { gap: 8px 10px; }
  body .at .at-fgrid > div { min-width: 0; }
  body .at .at-fgrid input, body .at .at-fgrid select { width: 100%; min-width: 0; max-width: 100%; height: 44px; font-size: 15px; box-sizing: border-box; }
  body .at .at-fgrid input[type=date] { -webkit-appearance: none; appearance: none; display: block; }
  body .at .at-fgrid .go .at-btn { width: 100%; height: 46px; }
  body .at .at-day { margin-top: 6px; }
}
@media (min-width: 641px) { .at-ftog { display: none; } }

/* =====================================================================================================================
   Orders (the steps board) on a phone (17 Nov 2026, the owner's phone picture: "redesign and organizie this"). Six columns
   side by side do not fit a phone: only one and a half showed, cut off. Now the steps are a row of tabs with their counts
   (premium.js ordersBoard) and one step shows at a time, full width; the step with orders opens first and the choice is kept.
   ===================================================================================================================== */
.pipe-tabs { display: none; }
@media (max-width: 640px) {
  body:has(.pipeline) .page-head { flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 10px; }
  body:has(.pipeline) .page-head p { display: none; }
  body:has(.pipeline) .page-head h1 { font-size: 22px; }
  body:has(.pipeline) .page-head .flex { flex: none; flex-wrap: nowrap; gap: 6px; margin-left: auto; }
  body:has(.pipeline) .page-head .btn { min-height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; white-space: nowrap; }
  body:has(.pipeline) .searchbar { display: flex; gap: 8px; margin-bottom: 10px; }
  body:has(.pipeline) .searchbar input { flex: 1; min-width: 0; min-height: 44px; border-radius: 14px; font-size: 16px; }
  body:has(.pipeline) .searchbar .btn { min-height: 44px; border-radius: 14px; }

  .pipe-tabs { display: flex; gap: 6px; margin: 0 -14px 10px; padding: 2px 14px 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; position: sticky; top: 0; z-index: 5; }
  .pipe-tabs::-webkit-scrollbar { display: none; }
  .pipe-tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 8px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text);
    font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; scroll-snap-align: start; }
  .pipe-tabs button i { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 800; background: var(--soft); color: var(--muted); font-variant-numeric: tabular-nums; }
  .pipe-tabs button.none { color: var(--muted); }
  .pipe-tabs button.on { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 28%, transparent); }
  .pipe-tabs button.on i { background: rgba(255, 255, 255, .22); color: #fff; }

  .pipeline.pipe-one { display: block; overflow: visible; padding: 0; }
  .pipeline.pipe-one .pipe-col { display: none; min-height: 0; padding: 0; background: none; border-radius: 0; }
  .pipeline.pipe-one .pipe-col.on { display: block; }
  .pipeline.pipe-one .pipe-head { display: none; }
  .pipeline.pipe-one .pipe-card { display: grid; gap: 3px; margin-bottom: 8px; padding: 13px 15px; border-radius: 18px; }
  .pipeline.pipe-one .pipe-card .flex.between { align-items: baseline; }
  .pipeline.pipe-one .pipe-card .flex.between b { font-size: 14px; letter-spacing: .02em; }
  .pipeline.pipe-one .pipe-card .flex.between span { font-size: 17px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .pipeline.pipe-one .pipe-card .small { font-size: 14px; line-height: 1.35; }
  .pipeline.pipe-one .pipe-card .small.muted { font-size: 12.5px; }
  .pipeline.pipe-one .pipe-card .badge { margin-top: 3px; }
  .pipeline.pipe-one .pipe-col > .muted.small { padding: 28px 12px !important; text-align: center; font-size: 14px; border: 1px dashed var(--border); border-radius: 18px; background: #fff; }
}

@media (max-width: 900px) {
  /* (any page whose columns are written into the page: one column on a small screen) */
  .grid-2[style*="grid-template-columns"], .grid-3[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) {
  .sale-head { display: block; margin-bottom: 12px; }
  .sale-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 24px; }
  .sale-head h1 .badge { font-size: 12px; }
  .sale-head p { margin-top: 4px; font-size: 13px; line-height: 1.4; }
  .sale-head > .flex { flex-wrap: nowrap; gap: 8px; margin: 12px -14px 0; padding: 2px 14px 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .sale-head > .flex::-webkit-scrollbar { display: none; }
  .sale-head > .flex > *, .sale-head > .flex .btn { flex: none; white-space: nowrap; scroll-snap-align: start; }
  .sale-head > .flex .btn { min-height: 42px; padding: 0 15px; border-radius: 999px; font-size: 14px; }

  .sale-show { gap: 12px; }
  .sale-show > div { min-width: 0; display: grid; gap: 12px; align-content: start; }
  .sale-show .card { margin: 0; border-radius: 20px; }
  .sale-show .card:not(.flush) { padding: 16px; }
  .sale-show .card-head { margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
  .sale-show .card-head h2 { font-size: 16px; }
  .sale-show .list-plain { max-width: none !important; }
  .sale-show .mono { overflow-wrap: anywhere; }

  /* the products: name and total on the first line, SKU and "1 × ৳1,390" on the second */
  .sale-show .card.flush > .table-wrap table.tcards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px 6px; align-items: baseline; padding: 13px 16px; }
  .sale-show .card.flush > .table-wrap table.tcards td,
  .sale-show .card.flush > .table-wrap table.tcards td:first-child,
  .sale-show .card.flush > .table-wrap table.tcards td:last-child { display: block; flex: none; order: 0; padding: 0; text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); }
  .sale-show .card.flush > .table-wrap table.tcards td::before { display: none; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(2) { grid-column: 1 / 3; grid-row: 1; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--text); }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(6) { grid-column: 3; grid-row: 1; text-align: right; font-size: 15.5px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(3)::after { content: " ×"; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: right; font-variant-numeric: tabular-nums; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(5),
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(7) { grid-column: 1 / -1; text-align: right; font-size: 12.5px; }
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(5)::before,
  .sale-show .card.flush > .table-wrap table.tcards td:nth-child(7)::before { display: inline; content: attr(data-label) " "; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .sale-show .card.flush > .table-wrap table.tcards td.tc-empty { display: none; }
  .sale-show .card.flush > .table-wrap + div { padding: 4px 16px 14px !important; border-top: 1px dashed var(--border); }
  .sale-show .card.flush .list-plain li { padding: 6px 0; }
  .sale-show .card.flush .list-plain li b { font-size: 16px; }
}
