/* VRA trade portal — Optical Atelier Design System
   Grounded in Vision Reach Africa's Dawn Eye brand identity:
   Deep Peacock Teal (#0E5A54), Abyssal Optical Emerald (#083730), African Sun Gold (#E6A338),
   Warm Alabaster Linen (#F6F4EE), Obsidian Charcoal (#131C1A), Terracotta accent for colourway codes.
   Self-hosted Latin variable fonts (Manrope 24 KB + Fraunces 66 KB) served from Cloudflare edge with font-display: swap. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2");
}

:root {
  --paper: #f6f4ee;
  --paper-2: #edeae1;
  --paper-3: #e3dfd4;
  --tint: #faf9f5;
  --white: #ffffff;
  --line: #e7e3d9;
  --line-2: #d6d1c5;
  --ink: #131c1a;
  --ink-2: #3d4a47;
  --ink-3: #687571;
  --ink-4: #99a3a0;
  --teal: #0e5a54;
  --teal-2: #09413c;
  --teal-deep: #062b27;
  --teal-50: #ebf4f2;
  --teal-100: #cfe4e0;
  --red: #b83822;
  --red-50: #fbeee9;
  --sun: #e6a338;
  --sun-deep: #996714;
  --sun-50: #fdf5e6;
  --sun-100: #f2ddb1;
  --ok: #1e7a4c;
  --ok-50: #e7f4ec;
  --warn: #996310;
  --warn-50: #fdf3df;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-2xs: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 13.75px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --r1: 6px;
  --r2: 9px;
  --r3: 16px;
  --rp: 14px;
  --sh1: 0 1px 2px rgba(19, 28, 26, 0.06);
  --sh-panel: 0 1px 2px rgba(19, 28, 26, 0.03), 0 4px 14px -6px rgba(19, 28, 26, 0.05);
  --sh2: 0 12px 32px -8px rgba(19, 28, 26, 0.11), 0 2px 6px rgba(19, 28, 26, 0.04);
  --sh3: 0 28px 72px -12px rgba(6, 26, 23, 0.28), 0 4px 16px rgba(6, 26, 23, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --hdr: 64px;
  --aside: 220px;
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='M10 9v4.5M10 6.5v.01'/%3E%3C/svg%3E");
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--teal);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-md) / 1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.rule::before { content: ""; display: block; height: 3px; background: var(--red); }
img { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-2); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r1); }
[hidden] { display: none !important; }
::selection { background: var(--teal-50); }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.h1 { font-family: var(--display); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.022em; line-height: 1.2; }
.h2 { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.01em; }
.h3 { font-size: var(--fs-md); font-weight: 650; }
/* Breadcrumb line above page titles: quiet sentence case, links in the same colour. */
.eyebrow { font: 500 var(--fs-sm) / 1.4 var(--sans); color: var(--ink-3); }
.eyebrow a { color: inherit; }
.eyebrow a:hover { color: var(--teal); }
.label { font: 600 var(--fs-xs) / 1.4 var(--sans); letter-spacing: 0.005em; color: var(--ink-3); }
.mono { font-family: var(--mono); }
.code { font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.cc { font-family: var(--mono); color: var(--red); font-weight: 600; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.page { padding: var(--s4) var(--s5) var(--s7); max-width: 1320px; margin: 0 auto; }
.page.wide { max-width: none; }
/* Round 33: a page head is one slim row — where you are (breadcrumb), the title, an info popover for the page's
   description, and the actions on the right — so the page's own content starts near the top of a laptop screen. */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s3); flex-wrap: wrap; min-height: 34px; }
.page-head > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s3); min-width: 0; }
.page-head > div:first-child > :not(.eyebrow):not(h1):not(.ph-info):not(.atabs):not(.tip):not(.badge):not(.row):not(span) { flex-basis: 100%; margin-top: 2px; }
.page-head > div:first-child > .row { margin-top: 0 !important; }
.page-head .eyebrow { margin: 0; font-size: var(--fs-xs); }
.page-head .h1, .page-head h1 { font-size: var(--fs-xl); line-height: 1.3; }
.page-head .ph-note:empty { display: none; }
.ph-info { position: relative; align-self: center; }
.ph-info > summary { list-style: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink-4); cursor: pointer; }
.ph-info > summary::-webkit-details-marker { display: none; }
.ph-info > summary::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.ph-info > summary:hover, .ph-info[open] > summary { color: var(--teal); background: var(--teal-50); }
.ph-info > summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.ph-info > p, .ph-info > div { position: absolute; z-index: 60; left: -8px; top: calc(100% + 6px); width: min(480px, calc(100vw - 48px)); margin: 0; padding: 10px 12px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r2); box-shadow: var(--sh2); font: 400 var(--fs-sm) / 1.55 var(--sans); color: var(--ink-2); letter-spacing: 0; }
.ph-facts { margin: calc(-1 * var(--s1)) 0 var(--s3); color: var(--ink-2); }
.ph-facts:empty { display: none; }
.ph-info.right > p, .ph-info.right > div { left: auto; right: -8px; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: var(--s4); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
.sticky { position: sticky; top: calc(var(--hdr) + var(--s4)); }

/* ---------- surfaces ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--rp); box-shadow: var(--sh-panel); }
.panel-pad { padding: var(--s5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 14px var(--s5); border-bottom: 1px solid var(--line); }
.panel-body { padding: var(--s4) var(--s5); }
/* Section titles inside cards read as titles, not as small grey labels. */
.panel-head .label:first-child, .panel-head > div > .label:first-child, .panel-pad > .label:first-child, .dsec > .label:first-child { font-size: var(--fs-md); font-weight: 650; color: var(--ink); letter-spacing: -0.005em; }
.panel + .panel { margin-top: var(--s4); }
:is(.acoll-grid, .cgrid, .kpis, .split, .adm-split, .fgrid, .mgrid) > .panel + .panel { margin-top: 0; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden; position: relative; }
.tile > img { width: 100%; height: 100%; object-fit: contain; }
.hr { height: 1px; background: var(--line); border: 0; margin: var(--s4) 0; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--teal); --bh: var(--teal-2); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 36px; padding: 0 14px; border-radius: var(--r2);
  border: 1px solid var(--b); background: var(--b); color: var(--fg);
  font: 600 var(--fs-sm) / 1 var(--sans); letter-spacing: 0; white-space: nowrap;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { background: var(--bh); border-color: var(--bh); color: var(--fg); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.sec { --b: var(--white); --bh: var(--paper); --fg: var(--ink); border-color: var(--line-2); box-shadow: var(--sh1); }
.btn.sec:hover { border-color: var(--ink-4); }
.btn.ghost { --b: transparent; --bh: var(--paper-2); --fg: var(--ink-2); border-color: transparent; }
.btn.danger { --b: var(--white); --bh: var(--red-50); --fg: var(--red); border-color: #e3bfb5; }
.btn.ghost.danger { --b: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost.danger:hover { border-color: transparent; }
.btn.sm { height: 30px; padding: 0 var(--s3); font-size: var(--fs-xs); border-radius: 7px; }
.btn.xs { height: 24px; padding: 0 var(--s2); font-size: var(--fs-2xs); border-radius: var(--r1); }
.btn.lg { height: 44px; padding: 0 var(--s5); font-size: var(--fs-md); }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn[disabled], .btn.is-busy { opacity: 0.55; pointer-events: none; }
.btn.is-busy::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.link { background: none; border: 0; padding: 0; color: var(--teal); cursor: pointer; font-size: inherit; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.input, .select, .textarea,
.form input:not([type]), .form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=password], .form input[type=number], .form input[type=date], .form input[type=search], .form select, .form textarea {
  width: 100%; height: 36px; padding: 0 var(--s3);
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r2);
  font: 400 var(--fs-md) / 1.2 var(--sans);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.textarea, .form textarea { height: auto; min-height: 84px; padding: var(--s2) var(--s3); line-height: 1.5; resize: vertical; }
.select, .form select { padding-right: 28px; appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237f7a6e' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:hover, .select:hover, .form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.input.sm, .select.sm { height: 30px; font-size: var(--fs-sm); }
.input[readonly], .ro { background: var(--paper); color: var(--ink-2); }
.input.err { border-color: var(--red); }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); width: 15px; height: 15px; margin: 0; }
.field { display: block; }
.field + .field { margin-top: var(--s4); }
.field > .lbl { display: block; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field > .help { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.check { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: var(--fs-md); color: var(--ink-2); }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--white); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.affix:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.affix > span { display: flex; align-items: center; padding: 0 10px; background: var(--paper); color: var(--ink-3); font: 500 var(--fs-xs) var(--sans); }
.affix > input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; height: 34px; padding: 0 10px; font: 600 var(--fs-md) var(--sans); font-variant-numeric: tabular-nums; outline: none; background: transparent; }
.toggle { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer; transition: background 0.15s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh1); transition: transform 0.15s var(--ease); }
.toggle.on { background: var(--teal); }
.toggle.on::after { transform: translateX(14px); }
.seg { display: inline-flex; background: var(--paper-2); border-radius: var(--r2); padding: 3px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 11px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1); }

/* ---------- badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 600 var(--fs-xs) / 1 var(--sans); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.plain::before { display: none; }
.badge.draft { background: var(--white); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.draft::before { background: none; border: 1px dashed currentColor; }
.badge.submitted, .badge.new { background: var(--red-50); color: var(--red); }
.badge.in_review, .badge.warn, .badge.soon { background: var(--warn-50); color: var(--warn); }
.badge.confirmed, .badge.in_production, .badge.live, .badge.teal { background: var(--teal-50); color: var(--teal); }
.badge.shipped, .badge.delivered, .badge.ok, .badge.active { background: var(--ok-50); color: var(--ok); }
.badge.cancelled { background: var(--paper-2); color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.badge.hidden, .badge.disabled, .badge.invited { background: var(--paper-2); color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); font-size: var(--fs-xs); color: var(--ink-2); }
.chip button { border: 0; background: none; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; color: var(--ink-3); line-height: 1; }
.chip button:hover { background: var(--paper-2); color: var(--ink); }
.tag { display: inline-block; font: 600 var(--fs-2xs) / 1 var(--mono); letter-spacing: 0.02em; color: var(--ink-2); background: var(--paper-2); border: 0; padding: 4px 7px; border-radius: 5px; }
.lock { display: inline-block; margin-left: 6px; font: 600 10px / 1 var(--sans); color: var(--warn); background: var(--warn-50); padding: 3px 6px; border-radius: 999px; vertical-align: 1px; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.tbl th { text-align: left; font: 600 var(--fs-xs) / 1.3 var(--sans); color: var(--ink-3); padding: 9px var(--s3); border-bottom: 1px solid var(--line); background: #fafaf8; white-space: nowrap; }
.tbl thead tr:first-child th:first-child { border-top-left-radius: var(--rp); }
.tbl thead tr:first-child th:last-child { border-top-right-radius: var(--rp); }
.tbl td { padding: 11px var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: var(--s5); }
.tbl th:last-child, .tbl td:last-child { padding-right: var(--s5); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.click { cursor: pointer; transition: background 0.1s; }
.tbl tr.click:hover td { background: #f9f9f6; }
.tbl tr.sel td { background: var(--teal-50); }
.tbl tr.group td { background: #fafaf8; font-size: var(--fs-sm); padding-top: 8px; padding-bottom: 8px; }
.tbl.compact td { padding-top: 7px; padding-bottom: 7px; }
.tbl tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; font-weight: 600; }
.thumb { display: inline-block; vertical-align: middle; width: 64px; height: 40px; flex: none; }
.thumb.lg { width: 84px; height: 52px; }
.thumb img { padding: 2px; }
.cell-col { display: flex; align-items: center; gap: var(--s3); }
.scroll-x { overflow-x: auto; position: relative; } /* contains the off-screen .sr-only labels of wide tables */

/* ---------- states ---------- */
.empty { text-align: center; padding: var(--s7) var(--s5); }
.empty .mark { width: 44px; height: 44px; margin: 0 auto var(--s4); border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); }
.empty .mark svg { width: 20px; height: 20px; }
.empty h3 { font-family: var(--display); font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; }
.empty p { color: var(--ink-3); max-width: 420px; margin: 0 auto var(--s4); }
.skel { background: linear-gradient(90deg, var(--paper-2) 0%, #f5f2ec 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--r1); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r2); background: var(--paper-2); color: var(--ink-2); font-size: var(--fs-sm); }
.alert.err { background: var(--red-50); color: var(--red); }
.alert.ok { background: var(--ok-50); color: var(--ok); }
.alert.info { background: var(--teal-50); color: var(--teal-2); }
.toast-host { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 400; display: grid; gap: var(--s2); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--sh2); font-size: var(--fs-sm); display: flex; gap: var(--s3); align-items: center; animation: toast-in 0.2s var(--ease); }
.toast.err { background: var(--red); }
.toast a { color: #fff; text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- member header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(10px); border-top: 3px solid var(--red); border-bottom: 1px solid var(--line); }
.topbar .in { height: var(--hdr); display: flex; align-items: center; gap: var(--s5); padding: 0 var(--s5); }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none !important; }
.brand img { height: 38px; width: auto; display: block; }
.mainnav { display: flex; gap: var(--s1); height: 100%; }
.mainnav a { display: flex; align-items: center; padding: 0 var(--s3); color: var(--ink-3); font-weight: 600; font-size: var(--fs-md); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.acct { display: flex; align-items: center; gap: var(--s3); margin-left: auto; font-size: var(--fs-sm); color: var(--ink-3); }
.acct .co { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cartlink { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ink); color: #fff !important; font-weight: 600; font-size: var(--fs-sm); text-decoration: none !important; transition: background 0.15s; }
.cartlink > svg { width: 18px; height: 18px; flex: none; }
.cartlink:hover { background: var(--teal); }
.cartlink b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #fff; color: var(--ink); display: inline-grid; place-items: center; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.cartlink.bump b { animation: bump 0.45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.25); background: var(--sun); } }
.menu-btn { display: none; }
.foot { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s4) var(--s5); border-top: 1px solid var(--line); font: 500 var(--fs-xs) / 1.4 var(--sans); color: var(--ink-4); }

/* ---------- catalogue list ---------- */
.catalog { padding: var(--s4) var(--s5) var(--s7); }
.toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.toolbar h1 { font-family: var(--display); font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.toolbar .count { font: 500 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.chips:empty { display: none; }
.cpop-empty { padding: var(--s5) var(--s4); text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
.cpop-f { flex: none; display: flex; align-items: center; gap: var(--s2); padding: 8px 10px; border-top: 1px solid var(--line); background: #fafaf8; }

.pgrid { --min: 200px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min), 1fr)); gap: 14px; }
.dense .pgrid { --min: 166px; gap: 10px; }
.large .pgrid { --min: 296px; gap: 18px; }
/* Laptops (1280–1366): four roomier Comfortable cards instead of five cramped ones. */
@media (max-width: 1400px) { .catalog:not(.dense):not(.large) .pgrid { --min: 224px; } }
.pcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--rp); box-shadow: var(--sh-panel); transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease); min-width: 0; }
.pcard { cursor: pointer; }
.pcard:hover { border-color: var(--line-2); box-shadow: var(--sh2); }
.pcard .sw, .pcard .qa { cursor: default; }
.pcard:hover .det { color: var(--teal); }
.pcard:hover .det svg { transform: translateX(2px); }
.pcard.flash { box-shadow: 0 0 0 2px var(--teal); }
/* The collection badge has its own row above the photo so a frame can never cover it. */
.pcard .pic { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: var(--rp) var(--rp) 0 0; overflow: hidden; cursor: pointer; background: #fff; text-align: left; }
.pcard .pic .ptop { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 26px; padding: 6px 6px 0; }
.pcard .pic .tag { flex: none; padding: 3px 6px; background: var(--white); }
.pcard .pic .vw { font: 600 var(--fs-2xs) / 1 var(--sans); color: var(--ink-3); opacity: 0; transition: opacity 0.15s; }
.pcard .pic .vw.show { opacity: 1; }
.pcard .pic .frame { position: relative; z-index: 1; display: block; aspect-ratio: 16 / 9; }
.pcard .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2px 8px 6px; background: #fff; }
.pcard .pic img.alt { opacity: 0; transition: opacity 0.12s var(--ease); }
.pcard .pic img.alt:not([src]) { display: none; }
.pcard .pic img.alt.on { opacity: 1; }
.pcard .pic .cap { position: absolute; z-index: 2; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line); font: 600 var(--fs-2xs) / 1.2 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(3px); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.pcard .pic .cap b { color: var(--red); font-family: var(--mono); }
.pcard .pic .cap.show { opacity: 1; transform: none; }
.pcard .bd { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .r1 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.pcard .sc { font: 700 var(--fs-md) / 1.2 var(--mono); letter-spacing: 0; color: var(--ink); text-decoration: none; cursor: pointer; }
.pcard .sc:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.pcard .r2 { display: flex; align-items: baseline; gap: var(--s2); margin-top: -4px; min-width: 0; }
.pcard .r2 .meta { flex: 1; min-width: 0; margin-top: 0; }
.pcard .det { flex: none; display: inline-flex; align-items: center; gap: 3px; font: 600 var(--fs-xs) / 1.2 var(--sans); color: var(--ink-3); text-decoration: none; }
.pcard .det svg { transition: transform 0.15s var(--ease); }
.pcard .det:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard .det:focus-visible, .pcard .sc:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
.pcard .pr { font-weight: 700; color: var(--teal); font-size: var(--fs-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .pr small { font-weight: 500; color: var(--ink-3); font-size: var(--fs-2xs); }
.pcard .meta { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.sw { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 3px; }
.sw button { position: relative; aspect-ratio: 3 / 2; padding: 0; border: 1px solid var(--line); border-radius: var(--r1); background: #fff; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; min-width: 0; }
.sw button img { width: 100%; height: 100%; object-fit: contain; padding: 1px; }
.sw button:hover { border-color: var(--ink-3); }
.sw button.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.sw button .q { position: absolute; top: -5px; right: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 9px/15px var(--sans); text-align: center; font-variant-numeric: tabular-nums; z-index: 1; }
.sw button[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font: 600 var(--fs-2xs) / 1.2 var(--sans); pointer-events: none; }
.sw button:first-child[data-tip]:hover::after { left: 0; transform: none; }
.sw button:last-child[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.qa { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.qa .tgt { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--ink-3); }
.qa .tgt b { color: var(--ink); font-weight: 600; }
.qa .tgt b .cc { font-weight: 700; }
.qa .ctl { display: flex; gap: 4px; }
.qa .ctl input { flex: 1; min-width: 0; height: 30px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; font: 600 var(--fs-sm) var(--sans); font-variant-numeric: tabular-nums; background: #fff; }
.qa .ctl input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.qa .ctl .btn { height: 30px; padding: 0 11px; font-size: var(--fs-xs); border-radius: 7px; }
.qa .inlist { font-size: var(--fs-2xs); color: var(--teal); display: flex; justify-content: space-between; gap: 6px; }
.dense .pcard .bd { padding: 6px 8px 8px; gap: 5px; }
.dense .pcard .meta { display: none; }
.dense .pcard .r2 { justify-content: flex-end; margin-top: -2px; }
.dense .pcard .pic img { padding: 2px 6px 4px; }
.dense .pcard .pic .ptop { height: 22px; padding: 4px 4px 0; }
.dense .pcard .pic .vw { display: none; }
.large .pcard .bd { padding: 12px 14px 14px; gap: 8px; }
.large .pcard .sc { font-size: var(--fs-lg); }
.large .pcard .pr { font-size: var(--fs-md); }
.large .pcard .meta { font-size: var(--fs-sm); }
.large .pcard .pic img { padding: 4px 16px 10px; }
.large .pcard .pic .ptop { height: 32px; padding: 10px 10px 0; }
.large .sw { gap: 5px; }
.large .qa .ctl input, .large .qa .ctl .btn { height: 34px; }
.grid-empty { grid-column: 1 / -1; }
.skel-card { height: 268px; border-radius: var(--rp); }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--s5); }
.modal-root[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(23, 22, 15, 0.46); backdrop-filter: blur(2px); animation: fade 0.18s var(--ease); }
.modal { position: relative; width: min(1440px, 100%); height: min(960px, 100%); background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh3); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; animation: pop 0.22s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.modal-head { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3) 0 var(--s5); height: 54px; background: var(--white); border-bottom: 1px solid var(--line); }
.modal-head .crumb { min-width: 0; flex: 0 1 auto; font: 500 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-head .crumb b { color: var(--ink); font-weight: 650; }
.modal-head .pos { white-space: nowrap; font: 500 var(--fs-xs) var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 40%, 540px); min-height: 0; }
.gal { padding: var(--s5); overflow: auto; display: flex; flex-direction: column; gap: var(--s4); min-height: 0; }
/* The stage takes the height the thumbnails leave (frame photos are wide, so width is what sizes them). */
.stage { position: relative; width: 100%; min-height: 220px; flex: 1 1 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--rp); overflow: hidden; cursor: zoom-in; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--s4); transition: opacity 0.16s var(--ease); }
.stage img.out { opacity: 0; }
.stage .cap { position: absolute; left: var(--s3); bottom: var(--s3); display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line); font: 600 var(--fs-sm) / 1.2 var(--sans); box-shadow: var(--sh1); }
.stage .cap .cc { font-size: var(--fs-md); }
.stage .cap.view { color: var(--ink-3); font-size: var(--fs-xs); }
.stage .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.92); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; color: var(--ink-2); }
.stage:hover .nav { opacity: 1; }
.stage .nav.l { left: var(--s3); }
.stage .nav.r { right: var(--s3); }
.stage .zoom { position: absolute; right: var(--s3); bottom: var(--s3); }
.thumbs-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s2); }
.thgroup { flex: none; }
/* Views and colourways share one column grid, so a style's front view and every detail sit on one row. */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--s2); }
.gal.dense .thumbs { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.gal.dense .hint { display: none; }
.th-btn { display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.th-btn .tile { aspect-ratio: 3 / 2; width: 100%; transition: border-color 0.12s, box-shadow 0.12s; }
.th-btn .tile img { padding: 3px; }
.th-btn:hover .tile { border-color: var(--ink-3); }
.th-btn.on .tile { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.th-btn .lb { font: 600 var(--fs-2xs) / 1.25 var(--sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-btn .lb .cc { margin-right: 4px; }
.th-btn .qd { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 10px/18px var(--sans); text-align: center; }
.th-btn.on .lb { color: var(--ink); }
.side { border-left: 1px solid var(--line); background: var(--white); display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; }
.side-scroll { overflow: auto; padding: var(--s5) var(--s5) var(--s3); }
.side .eyebrow { margin-bottom: 6px; }
.side .ttl { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.side .ttl h2 { font: 700 30px / 1 var(--mono); letter-spacing: -0.03em; }
.side .ttl .pr { font: 700 var(--fs-xl) / 1 var(--sans); color: var(--teal); white-space: nowrap; font-variant-numeric: tabular-nums; }
.side .ttl .pr small { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3) var(--s4); margin: 0 0 var(--s4); padding: var(--s3) var(--s4); background: var(--paper); border-radius: 10px; }
.facts > div { min-width: 0; }
.facts dt { font: 500 var(--fs-xs) / 1.3 var(--sans); color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font: 600 var(--fs-sm) / 1.35 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.facts dd.m { font-family: var(--mono); font-weight: 500; }
.qgrid-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); margin-bottom: 6px; }
.qgrid-h .eyebrow { margin: 0; }
.applyall { display: flex; gap: 4px; align-items: center; }
.applyall input { width: 72px; height: 30px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; font: 600 var(--fs-sm) var(--sans); }
.qrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) 88px; align-items: center; gap: 10px; padding: 3px 6px; border-radius: var(--r2); border: 1px solid transparent; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.qrow + .qrow { margin-top: 2px; }
.qrow:hover { background: var(--paper); }
.qrow.on { background: var(--teal-50); border-color: rgba(14, 90, 84, 0.25); }
.qrow .tile { width: 56px; height: 32px; }
.qrow .tile img { padding: 2px; }
.qrow .nm { min-width: 0; }
.qrow .nm div:first-child { font: 600 var(--fs-sm) / 1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .nm .il { font-size: var(--fs-2xs); color: var(--teal); }
.qrow input { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r2); text-align: right; font: 600 var(--fs-md) var(--sans); font-variant-numeric: tabular-nums; background: #fff; }
.qrow input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
/* Many colourways: two columns of rows rather than a scrolling side (set by fit() in product-modal.js).
   The rows drop their photo there; the gallery next to them shows every colourway. */
#pm-rows.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--s3); }
#pm-rows.two .qrow { grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; padding: 3px 4px 3px 8px; }
#pm-rows.two .qrow + .qrow { margin-top: 0; }
#pm-rows.two .qrow .tile { display: none; }
.pm-note { margin: 0; padding: var(--s2) var(--s5) 0; border-top: 1px solid var(--line); line-height: 1.45; }
.pm-note:last-child { padding-bottom: var(--s3); }
.side-foot { padding: var(--s2) var(--s5) var(--s3); display: flex; align-items: center; gap: var(--s3); background: var(--white); }
.side-foot .tot { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.3; }
.side-foot .tot b { display: block; color: var(--ink); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.side-foot .btn { margin-left: auto; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: #fff; display: grid; place-items: center; cursor: zoom-out; animation: fade 0.15s; }
.lightbox img { max-width: 96vw; max-height: 90vh; object-fit: contain; }
.lightbox .cap { position: absolute; left: 50%; bottom: var(--s5); transform: translateX(-50%); font: 600 var(--fs-md) var(--sans); }
.lightbox .cap .cc { margin-right: 8px; }
.modal-loading { display: grid; place-items: center; height: 100%; color: var(--ink-3); }
body.modal-open { overflow: hidden; }

/* ---------- collections (member) ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.ccard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--rp); box-shadow: var(--sh-panel); overflow: hidden; color: var(--ink); text-decoration: none !important; transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s var(--ease); }
.ccard:hover { border-color: var(--line-2); box-shadow: var(--sh2); color: var(--ink); transform: translateY(-1px); }
.ccard .cv { position: relative; aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); }
.ccard .cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--s5); }
.ccard .cv .badge { position: absolute; top: var(--s3); right: var(--s3); }
.ccard .bd { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccard h3 { font: 700 var(--fs-lg) / 1.25 var(--display); letter-spacing: -0.015em; }
.ccard .ft { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); }
.ccard .ft .pr { font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.ccard.soon { opacity: 0.7; }
.ccard.soon:hover { transform: none; }

/* ---------- cart / order ---------- */
.steps { display: flex; gap: var(--s2); margin-bottom: var(--s5); flex-wrap: wrap; }
.steps span { display: inline-flex; align-items: center; gap: var(--s2); font: 600 var(--fs-xs) / 1 var(--sans); color: var(--ink-4); }
.steps span + span::before { content: ""; width: 24px; height: 1px; background: var(--line-2); margin-right: var(--s2); }
.steps span i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; display: inline-grid; place-items: center; font-size: 10px; }
.steps span.on { color: var(--ink); }
.steps span.on i { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps span.done { color: var(--teal); }
.steps span.done i { background: var(--teal); border-color: var(--teal); color: #fff; }
.sumcard .r { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: var(--fs-md); color: var(--ink-2); }
.sumcard .r b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sumcard .r.t { border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s3); }
.sumcard .r.t b { font-size: var(--fs-xl); }
.qty-in { width: 92px; height: 32px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; text-align: right; font: 600 var(--fs-md) var(--sans); font-variant-numeric: tabular-nums; }
.qty-in:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.success { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); background: var(--ok-50); border: 1px solid #cfe6d7; border-radius: var(--rp); margin-bottom: var(--s5); }
.success .tick { width: 36px; height: 36px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; flex: none; font-weight: 700; }
.kv { display: grid; grid-template-columns: minmax(88px, max-content) minmax(0, 1fr); gap: 6px var(--s4); font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ostats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) 40px; }
.ostats.compact { gap: var(--s4) var(--s5); }
.sgrp h4 { display: flex; justify-content: space-between; margin: 0 0 var(--s2); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sgrp h4 span { color: var(--ink-4); }
.srow { display: grid; grid-template-columns: minmax(72px, 1.3fr) minmax(48px, 1fr) 64px 44px; align-items: center; gap: var(--s2); font-size: var(--fs-sm); padding: 4px 0; }
.srow .sl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.srow .sbar { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.srow .sbar i { display: block; height: 100%; border-radius: 3px; background: var(--teal); }
.srow:first-of-type .sbar i { background: var(--red); }
.srow .sn { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.srow .sn b { color: var(--ink); font-weight: 600; }
.srow .sp { font-variant-numeric: tabular-nums; text-align: right; font: 500 var(--fs-xs) / 1 var(--sans); color: var(--ink-2); }
.srow .sn { text-align: right; }
.ostats.compact .srow { grid-template-columns: minmax(60px, 1.2fr) minmax(28px, 0.7fr) 56px 40px; }
@media (max-width: 560px) { .ostats { grid-template-columns: minmax(0, 1fr); } }
.timeline { display: grid; gap: var(--s3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#listp td.client { min-width: 140px; max-width: 180px; }
#detail .dhead .row > span { white-space: nowrap; }
#listp td.client b, #listp td.client div { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl td.act, .tbl th.act { width: 1%; text-align: right; white-space: nowrap; }
.timeline .ev { display: grid; grid-template-columns: 10px 1fr; gap: var(--s3); font-size: var(--fs-sm); }
.timeline .ev::before { content: ""; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--line-2); }
.timeline .ev .t { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 3px; }
.timeline .ev:first-child::before { background: var(--teal); }
.timeline .ev:last-child::before { background: var(--line-2); }
.timeline .ev:only-child::before { background: var(--teal); }
.vra { font: 700 9.5px / 1 var(--sans); letter-spacing: 0.04em; color: var(--teal); background: var(--teal-50); border-radius: 999px; padding: 2px 6px; margin-left: 2px; }
/* order progress */
.ostep { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
.ostep li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: var(--s2); color: var(--ink-4); font-size: var(--fs-xs); }
.ostep li::after { content: ""; position: absolute; left: 26px; right: 4px; top: 11px; height: 2px; background: var(--line); }
.ostep li:last-child::after { display: none; }
.ostep li i { position: relative; z-index: 1; font-style: normal; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--white); display: grid; place-items: center; font: 650 11px / 1 var(--sans); }
.ostep li span { display: flex; flex-direction: column; gap: 2px; font-weight: 600; line-height: 1.2; }
.ostep li small { font-weight: 400; color: var(--ink-3); font-size: var(--fs-2xs); }
.ostep li.done { color: var(--teal); }
.ostep li.done i { background: var(--teal); border-color: var(--teal); color: #fff; }
.ostep li.done::after { background: var(--teal); }
.ostep li.on { color: var(--ink); }
.ostep li.on i { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgba(23, 22, 15, 0.08); }
.ostep li.x { color: var(--red); }
.ostep li.x i { background: var(--red); border-color: var(--red); color: #fff; }
.ostep.is-cancelled li:not(.x) { opacity: 0.55; }
.ostep-card { padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.ostep-mini .ostep li { font-size: var(--fs-2xs); padding-right: 2px; }
.ostep-mini .ostep li i { width: 20px; height: 20px; font-size: 10px; }
.ostep-mini .ostep li::after { left: 22px; top: 9px; }
.ostep-mini .ostep li small { display: none; }
.ostep-mini .ostep li span { max-width: 100%; font-size: 10px; line-height: 1.15; }
.actcard .acts { display: grid; gap: var(--s2); margin-top: var(--s4); }
.actcard .locknote { margin-top: var(--s3); }
.qline-edit { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 720px) {
  .ostep { grid-auto-flow: row; grid-auto-columns: auto; gap: var(--s2); }
  .ostep li { flex-direction: row; align-items: center; }
  .ostep li::after { display: none; }
  .ostep li span { flex-direction: row; gap: var(--s2); align-items: baseline; }
}

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr); }
.login .cover { position: relative; padding: var(--s6) var(--s7); display: flex; flex-direction: column; border-top: 3px solid var(--red); }
.login .cover .top { display: flex; justify-content: space-between; align-items: center; padding-bottom: var(--s4); border-bottom: 1px solid var(--line-2); }
.login .cover .top img { height: 34px; width: auto; }
.login .cover .body { margin: auto 0; padding: var(--s7) 0 var(--s6); max-width: 640px; }
.login .cover h1 { font: 750 clamp(38px, 4.6vw, 60px) / 1.04 var(--display); letter-spacing: -0.035em; margin: var(--s4) 0 var(--s5); }
.login .cover .redrule { width: 96px; height: 3px; background: var(--red); margin: var(--s5) 0; }
.login .cover p.lead { font: 400 18px / 1.55 var(--sans); color: var(--ink-2); max-width: 520px; }
.login .cover .hero { margin-top: var(--s6); max-width: 560px; aspect-ratio: 16 / 7; }
.login .cover .hero img { padding: var(--s3) var(--s5); }
.login .cover .meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.login .cover .meta b { display: block; font: 650 var(--fs-sm) / 1.5 var(--sans); color: var(--ink); }
.login .cover .meta span { font: 500 var(--fs-xs) / 1.5 var(--sans); color: var(--ink-3); }
.login .pane { background: var(--white); border-left: 1px solid var(--line); display: grid; place-items: center; padding: var(--s6) var(--s5); }
.login .box { width: 100%; max-width: 360px; }
.login .box h2 { font: 700 var(--fs-2xl) / 1.2 var(--display); letter-spacing: -0.022em; margin: var(--s2) 0 var(--s2); }
.login .box .intro { color: var(--ink-3); margin-bottom: var(--s5); font-size: var(--fs-sm); }

/* ---------- admin shell ---------- */
.admin { display: grid; grid-template-columns: var(--aside) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--white) 0 calc(var(--aside) - 1px), var(--line) calc(var(--aside) - 1px) var(--aside), transparent var(--aside)); }
.aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); border-top: 3px solid var(--red); padding: var(--s3) var(--s2); overflow: auto; }
.aside .brand { padding: 0 var(--s2) var(--s3); margin-bottom: var(--s1); flex-direction: column; align-items: flex-start; gap: 6px; }
.aside .brand img { height: 30px; width: auto; }
.aside .grp { padding: var(--s4) var(--s3) 6px; font-size: var(--fs-2xs); color: var(--ink-4); }
.aside nav { display: grid; gap: 2px; }
.aside nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 var(--s3); border-radius: var(--r2); color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; text-decoration: none; position: relative; }
.aside nav a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.aside nav a.on { background: var(--teal-50); color: var(--teal-2); font-weight: 650; }
.aside nav a.on svg { opacity: 1; color: var(--teal); }
.aside nav a.locked { color: var(--ink-4); cursor: not-allowed; }
.aside nav a .ct { margin-left: auto; font: 600 10px/18px var(--sans); min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; text-align: center; }
.aside nav a svg { width: 16px; height: 16px; flex: none; opacity: 0.65; }
.aside nav.sf { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.aside nav.sf a .ext { width: 13px; height: 13px; margin-left: auto; opacity: 0.45; }
.aside .who { margin-top: auto; padding: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.aside .who b { display: block; color: var(--ink); font-size: var(--fs-sm); }
.amain { min-width: 0; padding: var(--s4) var(--s5) var(--s6); }
.amain .page-head h1 { font: 700 var(--fs-xl) / 1.3 var(--display); letter-spacing: -0.018em; }
/* Round 33: the menu has one entry per area; an area's pages are tabs at the top of each of them (VRA.adminSide). */
.atabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 10px; align-self: center; }
.atabs a { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px; font: 600 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.atabs a:hover { color: var(--ink); text-decoration: none; }
.atabs a.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1); }
.page-head.has-tabs h1, .page-head.has-tabs .eyebrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.kpi { padding: var(--s4) var(--s5); }
.kpi .v { font: 700 var(--fs-2xl) / 1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.fbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.fbar .field { min-width: 140px; }
.fbar .field > .lbl { font: 600 var(--fs-xs) / 1.3 var(--sans); color: var(--ink-3); margin-bottom: 4px; }
.fbar .field + .field { margin-top: 0; }
.adm-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); gap: var(--s4); align-items: start; }
.adm-split > .panel:last-child { position: sticky; top: var(--s4); max-height: calc(100vh - var(--s5)); overflow: auto; }
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.dhead h2 { font: 700 var(--fs-xl) / 1.2 var(--mono); letter-spacing: -0.01em; }
.dsec { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.dsec:last-child { border-bottom: 0; }
.dsec > .label { display: block; margin-bottom: var(--s3); }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.imgtile .tile { aspect-ratio: 3 / 2; }
.imgtile .tile img { padding: 4px; }
.imgtile .tile .tag { position: absolute; top: 6px; left: 6px; }
.imgtile .ac { display: flex; align-items: center; gap: 2px; margin-top: 4px; font-size: var(--fs-2xs); color: var(--ink-3); }
.imgtile .ac .spacer { flex: 1; }
.imgtile .ac button { border: 0; background: none; cursor: pointer; padding: 3px 5px; border-radius: 3px; color: var(--ink-2); font-size: var(--fs-2xs); }
.imgtile .ac button:hover { background: var(--paper-2); }
.imgtile .ac button.del { color: var(--red); }
.imgtile.add { display: grid; place-items: center; aspect-ratio: 3 / 2; border: 1px dashed var(--line-2); border-radius: var(--r1); color: var(--ink-3); cursor: pointer; font-size: var(--fs-sm); background: transparent; }
.imgtile.add:hover { border-color: var(--teal); color: var(--teal); }
.hist .it { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.hist .it:last-child { border-bottom: 0; }
.hist .av { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-xs); }
.hist .av.ag { background: var(--warn-50); color: var(--warn); }
.hist .chg { color: var(--ink-2); font-size: var(--fs-xs); overflow-wrap: anywhere; margin-top: 2px; }
.hist .chg .k { color: var(--ink-4); }
.hist .chg s { color: var(--ink-4); }
.hist .t { color: var(--ink-4); font-size: var(--fs-xs); }
.acoll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.acoll { display: flex; flex-direction: column; }
.acoll .cv { position: relative; aspect-ratio: 16 / 8; background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--r2) var(--r2) 0 0; overflow: hidden; }
.acoll .cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--s4); }
.ccard .cv .ph, .acoll .cv .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 700 52px / 1 var(--display); color: var(--line-2); letter-spacing: -0.03em; }
.acoll .cv .badge { position: absolute; top: var(--s3); left: var(--s3); }
.acoll .bd { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.acoll h3 { font: 700 var(--fs-lg) / 1.25 var(--display); letter-spacing: -0.015em; }
.acoll .stats { font: 500 var(--fs-xs) / 1.45 var(--sans); color: var(--ink-3); }
.affix.bad { border-color: var(--red); }
.pstate { min-width: 64px; font-size: var(--fs-xs); white-space: nowrap; color: var(--ink-3); transition: opacity 0.2s; }
.pstate.ok { color: var(--ok); font-weight: 600; }
.pstate.err { color: var(--red); white-space: normal; }
.pstate.dirty { color: var(--warn); }
.acoll .acts { display: flex; gap: var(--s2); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: #fafaf8; border-radius: 0 0 var(--rp) var(--rp); margin-top: auto; }
.progress { height: 3px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal); width: 0; transition: width 0.2s; }
pre.code-block { background: var(--paper); border: 1px solid var(--line); padding: var(--s4); border-radius: 10px; overflow: auto; font: 500 var(--fs-sm) / 1.6 var(--mono); margin: 0; }

/* ---------- responsive ---------- */
@media (max-height: 800px) and (min-width: 901px) {
  .modal-root { padding: var(--s4); }
  .gal { padding: var(--s4) var(--s5); gap: var(--s3); }
  .side-scroll { padding-top: var(--s4); }
  .side .ttl { margin-bottom: var(--s3); }
  .side .ttl h2 { font-size: 26px; }
  .facts { gap: var(--s2) var(--s4); padding: 10px var(--s4); margin-bottom: var(--s3); }
  .qgrid-h { padding-top: 10px; }
}
@media (max-width: 1100px) {
  .modal-body { grid-template-columns: minmax(0, 1fr) 360px; }
  .adm-split { grid-template-columns: minmax(0, 1fr); }
  .adm-split > .panel:last-child { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .cover { padding: var(--s5); min-height: auto; }
  .login .cover .body { padding: var(--s5) 0; }
  .login .cover .hero, .login .cover .meta { display: none; }
  .login .pane { border-left: 0; border-top: 1px solid var(--line); }
  .catalog { padding: var(--s3); }
  .modal-root { padding: 0; }
  .modal { width: 100%; height: 100%; border-radius: 0; }
  .modal-body { display: block; overflow: auto; }
  .gal { overflow: visible; padding: var(--s3); }
  .stage { flex: none; aspect-ratio: 2 / 1; min-height: 0; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .side { border-left: 0; border-top: 1px solid var(--line); display: block; }
  .side-scroll { overflow: visible; padding: var(--s4) var(--s4) var(--s2); }
  .pm-note { padding: 0 var(--s4) var(--s4); border-top: 0; }
  .side-foot { position: sticky; bottom: 0; border-top: 1px solid var(--line); padding: var(--s3) var(--s4); }
  .admin { grid-template-columns: minmax(0, 1fr); background: none; }
  .aside { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2); }
  .aside .brand { border: 0; margin: 0; padding: 0 var(--s2); }
  .aside .brand img { height: 32px; }
  .aside nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .aside .grp, .aside .who { display: none; }
  .amain { padding: var(--s4); }
}
@media (max-width: 720px) {
  :root { --hdr: 56px; }
  .brand img { height: 32px; }
  .topbar { background: var(--white); backdrop-filter: none; }
  .topbar .in { gap: var(--s3); padding: 0 var(--s3); }
  .acct .co, .acct .hello { display: none; }
  .mainnav { position: fixed; left: 0; right: 0; bottom: 0; height: 52px; background: var(--white); border-top: 1px solid var(--line); z-index: 60; justify-content: space-around; }
  .mainnav a { border-bottom: 0; border-top: 2px solid transparent; font-size: var(--fs-sm); margin: 0; }
  .mainnav a.on { border-top-color: var(--ink); }
  body.has-tabbar { padding-bottom: 52px; }
  .page { padding: var(--s4) var(--s3) var(--s6); }
  .pgrid, .dense .pgrid, .large .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .toolbar h1 { font-size: var(--fs-lg); width: 100%; }
  .density-seg { display: none; }
  .crow { padding-left: 6px; margin-right: calc(-1 * var(--s3)); }
  .cnav { display: none; }
  .cfind-btn .chev { display: none; }
  .cpop { position: fixed; top: auto; left: var(--s3); right: var(--s3); bottom: calc(52px + var(--s3)); width: auto; max-width: none; max-height: 70vh; box-shadow: var(--sh3); }
  .pcard .bd { padding: 6px 8px 8px; }
  .qa .ctl .btn { padding: 0 8px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .qrow { grid-template-columns: 56px minmax(0, 1fr) 80px; }
  .qrow .tile { width: 56px; height: 34px; }
  .side .ttl h2 { font-size: var(--fs-2xl); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbl th:first-child, .tbl td:first-child { padding-left: var(--s3); }
  .tbl th:last-child, .tbl td:last-child { padding-right: var(--s3); }
  .hide-sm { display: none !important; }
}
@media (min-width: 721px) { .show-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- round 5: price layers, grouped images, profile, customer block ---------- */
.acct a.co { color: inherit; text-decoration: none; }
.acct a.co:hover { color: var(--ink); text-decoration: underline; }
.tag-int { font: 600 var(--fs-2xs) / 1.6 var(--sans); color: var(--ink-3); }
.imgnote { margin-bottom: var(--s3); }
.imggrp + .imggrp { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.imggrp > h4 { margin-bottom: var(--s3); }
.imgtile { margin: 0; }
.imgtile figcaption { margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-2); }
.cwrow { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s2) 0; }
.cwrow + .cwrow { border-top: 1px dashed var(--line); }
.cwrow .cwname { font-size: var(--fs-sm); padding-top: 6px; }
.upbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3); margin-bottom: var(--s4); border: 1px dashed var(--line-2); border-radius: 10px; background: var(--paper); }
.upbar .select { width: auto; }
.custblk .cn { display: block; font-size: var(--fs-md); margin-bottom: 4px; }
.custblk .kv { margin-top: var(--s2); }
.addr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: var(--s3); align-items: end; padding: var(--s2) 0; }
.addr + .addr { border-top: 1px dashed var(--line); }
.addr .link { margin-bottom: 10px; }
.addr:first-child .lbl::after { content: " · default"; color: var(--teal); font-weight: 600; }
.lines-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.lines-pick .qrow2 { display: grid; grid-template-columns: 48px minmax(0, 1fr) 76px; gap: var(--s2); align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.lines-pick .qrow2 .tile { width: 48px; height: 32px; }
.lines-pick .qrow2 input { width: 76px; }
@media (max-width: 720px) {
  .cwrow { grid-template-columns: minmax(0, 1fr); }
  .addr { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- round 6: role indicator, user menu, tooltips, compact collections, profile view, registration ---------- */
/* Role: one small pill + the colour of the thin top rule (member red as before, VRA admin teal, super admin amber). */
.rolepill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font: 600 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.03em; white-space: nowrap; flex: none; }
.rolepill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rolepill.member { background: var(--paper-2); color: var(--ink-3); }
.rolepill.vra { background: var(--teal-50); color: var(--teal); }
.rolepill.super { background: var(--warn-50); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(142, 100, 17, 0.25); }
body.role-vra .topbar, body.role-vra .aside { border-top-color: var(--teal); }
body.role-super .topbar, body.role-super .aside { border-top-color: var(--sun); }
.aside .brand-sub { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

.umenu { position: relative; }
.ubtn { display: inline-flex; align-items: center; gap: var(--s2); height: 34px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); max-width: 260px; }
.ubtn:hover, .ubtn[aria-expanded="true"] { background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.ubtn .av { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.ubtn:hover .av { background: var(--white); }
.ubtn .av svg { width: 16px; height: 16px; }
.ubtn .co { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.ubtn .chev { width: 14px; height: 14px; flex: none; color: var(--ink-3); transition: transform 0.15s var(--ease); }
.ubtn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.umenu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 230px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh2); animation: pop 0.14s var(--ease); }
.umenu-list .uhead { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); display: flex; flex-direction: column; gap: 2px; }
.umenu-list .uhead b { color: var(--ink); font-size: var(--fs-sm); }
.umenu-list [role=menuitem] { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r1); background: none; color: var(--ink-2); font: 500 var(--fs-sm) / 1 var(--sans); text-align: left; cursor: pointer; text-decoration: none; }
.umenu-list [role=menuitem] svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.umenu-list [role=menuitem]:hover, .umenu-list [role=menuitem]:focus-visible { background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: none; }
.umenu-list [role=menuitem].on { color: var(--ink); font-weight: 600; }
.umenu-list [role=menuitem].on svg { color: var(--teal); }
.umenu-list #signout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r1) var(--r1); height: 38px; }

/* Info icon with a hover / focus tooltip. */
.tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--ink-4); cursor: help; flex: none; vertical-align: middle; }
.tip svg { width: 15px; height: 15px; }
.tip:hover, .tip:focus-visible { color: var(--teal); }
/* The bubble only exists while shown: a hidden one would still widen the page (horizontal scroll). api.js flips
   it to the left (.right) when it would run past the right edge. */
.tip::after { content: none; position: absolute; z-index: 60; left: -6px; top: calc(100% + 6px); width: max-content; max-width: 280px; padding: 8px 10px; border-radius: var(--r2); background: var(--ink); color: #fff; font: 400 var(--fs-xs) / 1.45 var(--sans); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; box-shadow: var(--sh2); pointer-events: none; animation: tip-in 0.12s var(--ease); }
.tip.right::after { left: auto; right: -6px; }
.tip:hover::after, .tip:focus-visible::after { content: attr(data-tip); }
@keyframes tip-in { from { opacity: 0; transform: translateY(-3px); } }

/* Admin collections: toolbar + compact cards. */
.ctools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s3); margin-bottom: var(--s3); }
.ctools .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.ctools .search input { padding-left: 32px; }
.ctools .search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); }
.ctools .count { margin-left: auto; font: 500 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); }
.acoll .cv { aspect-ratio: 16 / 6; }
.acoll .cv img { padding: var(--s2) var(--s4); }
.acoll .cv .badges { position: absolute; top: var(--s2); left: var(--s2); display: flex; gap: 6px; }
.acoll .cv .badges .badge { position: static; }
.acoll .cv .corner { position: absolute; top: var(--s2); right: var(--s2); display: flex; gap: 4px; }
.acoll .bd { padding: var(--s3) var(--s4); gap: var(--s2); }
.acoll .ttlrow { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.acoll .ttlrow h3 { font: 700 var(--fs-lg) / 1.25 var(--display); letter-spacing: -0.015em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acoll .ttlrow .input { height: 30px; font-size: var(--fs-md); }
.iconbtn { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 0; border-radius: var(--r1); background: none; color: var(--ink-3); cursor: pointer; }
.iconbtn svg { width: 15px; height: 15px; }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.iconbtn.danger:hover { background: var(--red-50); color: var(--red); }
.iconbtn.onwhite { background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); }
.acoll .ctl { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.acoll .ctl .label { white-space: nowrap; }
.acoll .acts { padding: var(--s2) var(--s4); align-items: center; }
.acoll .acts .btn { height: 32px; }
.acoll.is-draft { border-style: dashed; border-color: var(--line-2); }
.acoll.is-deleted { opacity: 0.85; }
.seg.status button.on[data-v="live"] { color: var(--teal); }
.seg.status button.on[data-v="pushed"] { color: var(--teal); }
.seg.status button.on[data-v="draft"] { color: var(--warn); }
.badge.pdraft { background: var(--warn-50); color: var(--warn); }
.badge.pdraft::before { background: none; border: 1px dashed currentColor; }
.badge.ppushed { background: var(--white); color: var(--teal); box-shadow: inset 0 0 0 1px rgba(14, 90, 84, 0.25); }
.badge.deleted { background: var(--red-50); color: var(--red); }

/* Confirm dialog (native <dialog>). */
dialog.dlg { border: 0; padding: 0; border-radius: var(--r3); box-shadow: var(--sh3); width: min(460px, calc(100vw - 32px)); background: var(--white); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(23, 22, 15, 0.46); }
dialog.dlg form { padding: var(--s5); display: grid; gap: var(--s3); }
dialog.dlg h2 { font: 700 var(--fs-xl) / 1.25 var(--display); letter-spacing: -0.02em; }
dialog.dlg .acts { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.btn.dangerfill { --b: var(--red); --bh: #9c2c17; --fg: #fff; }

/* Member profile: read view + edit mode. */
.pf-head .acts { display: flex; align-items: center; gap: var(--s2); }
.pf-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); margin-bottom: var(--s3); }
.pf-card .mono-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-50); color: var(--teal); font: 700 var(--fs-xl) / 1 var(--display); flex: none; }
.pf-card h2 { font: 700 var(--fs-xl) / 1.2 var(--display); letter-spacing: -0.018em; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.pf-grid > .panel + .panel { margin-top: 0; }
.pf-grid .wide { grid-column: 1 / -1; }
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px var(--s4); margin: 0; font-size: var(--fs-md); }
.dl dt { color: var(--ink-3); font-size: var(--fs-sm); padding-top: 1px; }
.dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.dl dd.none { color: var(--ink-4); }
.addr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.addr-card { border: 1px solid var(--line); border-radius: 10px; padding: var(--s3) var(--s4); background: #fafaf8; }
.addr-card b { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); margin-bottom: 4px; }
.addr-card p { font-size: var(--fs-sm); color: var(--ink-2); white-space: pre-line; }
/* Delivery address editor: label and address share one top line; the remove button sits on the input row. */
.addr { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 32px; align-items: start; }
.addr .field > .lbl { min-height: 20px; }
.addr .rm { margin-top: 26px; }
.addr textarea { min-height: 36px; height: 60px; }

/* Product edit: compact two columns (images + colourways left, details right). */
.pe-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s4); align-items: start; }
.pe-split > aside > .panel + .panel, .pe-split > div > .panel + .panel { margin-top: var(--s4); }
.pe-split > aside { position: sticky; top: var(--s4); max-height: calc(100vh - var(--s5)); overflow: auto; }
.pe-split .fgrid { gap: var(--s3); }
.pe-split .fgrid .field { margin-top: 0; }
.rov { display: flex; align-items: center; min-height: 36px; padding: 0 2px; font-size: var(--fs-md); color: var(--ink); }
.rov.faint { color: var(--ink-3); }
.cwrow2 { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3) 0; }
.cwrow2 + .cwrow2 { border-top: 1px dashed var(--line); }
.cwmeta { display: grid; gap: 6px; }
.cwmeta .top { display: flex; align-items: center; gap: var(--s2); }
.cwmeta .input { height: 30px; font-size: var(--fs-sm); }
.cwmeta .fam { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.cwmeta .fam .input { width: 120px; }
.imgtile .ac a.dl { padding: 3px 5px; border-radius: 3px; color: var(--ink-2); font-size: var(--fs-2xs); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.imgtile .ac a.dl:hover { background: var(--paper-2); }
.imgtile .ac a.dl svg { width: 12px; height: 12px; }

/* Registration */
.login .box.wide { max-width: 440px; }
.login .switch { margin-top: var(--s4); font-size: var(--fs-sm); color: var(--ink-3); text-align: center; }
.reg-note { font-size: var(--fs-xs); color: var(--ink-3); }
.field .ferr { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--red); }
.field .ferr:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.codebox { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.codebox .code-v { font: 700 var(--fs-xl) / 1 var(--mono); letter-spacing: 0.06em; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--paper); }

@media (max-width: 1100px) {
  .pe-split { grid-template-columns: minmax(0, 1fr); }
  .pe-split > aside { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .ubtn .co, .rolepill.member { display: none; }
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: var(--s2); }
  .addr { grid-template-columns: minmax(0, 1fr); }
  .addr .rm { margin-top: 0; }
  .cwrow2 { grid-template-columns: minmax(0, 1fr); }
}
.addr:first-child .lbl::after { content: none; }
/* inline icons inside buttons/links get a sensible default size */
.btn > svg:not([width]), a.dl > svg:not([width]), .iconbtn > svg:not([width]) { width: 15px; height: 15px; flex: none; }
/* Round 6b: colourway rows — photo left, details right (like the former Colourways table, one row per colour) */
.cwrow3 { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s4) 0; }
.cwrow3 + .cwrow3 { border-top: 1px solid var(--line); }
.cwimgs { display: grid; gap: var(--s2); }
.cwimgs.multi { grid-template-columns: 1fr 1fr; }
.cwimgs .tile.nophoto { aspect-ratio: 3 / 2; display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: var(--r1); background: var(--paper); }
.cwinfo { min-width: 0; }
.cwhead { display: flex; align-items: center; gap: var(--s2); padding-bottom: var(--s2); margin-bottom: var(--s3); border-bottom: 1px dashed var(--line); }
.cwhead .cc { font-size: var(--fs-md, 15px); }
.cwdl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); margin: 0; }
.cwdl > div { min-width: 0; }
.cwdl > div.wide { grid-column: 1 / -1; }
.cwdl dt { margin-bottom: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.cwdl dd { margin: 0; font-size: var(--fs-sm); color: var(--ink); }
.cwdl dd.mono { font-family: var(--mono); font-size: var(--fs-xs); padding-top: 2px; }
.cwdl .input { height: 34px; width: 100%; font-size: var(--fs-sm); }
@media (max-width: 900px) { .cwrow3 { grid-template-columns: minmax(0, 1fr); } }
.acoll .stagectl .spacer { flex: 1; }
/* Entry page: Log in / Sign up tabs above the form */
.authtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: var(--s5); border-radius: 10px; background: var(--paper-2); border: 0; }
.authtabs a { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: calc(var(--r2) - 2px); font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; }
.authtabs a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.authtabs a.on { background: var(--white); color: var(--teal); box-shadow: var(--sh1, 0 1px 2px rgba(0, 0, 0, 0.08)); }
/* Round 6c: photo tiles — click opens full size, hover shows a download icon at the top-right */
.tile.hoverdl { position: relative; }
.tile.hoverdl a.open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile.hoverdl a.open img { width: 100%; height: 100%; object-fit: contain; }
.tile.hoverdl .dlov { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh1, 0 1px 3px rgba(0, 0, 0, 0.12)); opacity: 0; transform: translateY(-2px); transition: opacity 0.12s, transform 0.12s; }
.tile.hoverdl .dlov svg { width: 15px; height: 15px; }
.tile.hoverdl:hover .dlov, .tile.hoverdl:focus-within .dlov { opacity: 1; transform: none; }
.tile.hoverdl .dlov:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
@media (hover: none) { .tile.hoverdl .dlov { opacity: 1; transform: none; } }
@media (max-width: 720px) { .cartlink .cl { display: none; } .cartlink { padding-left: 10px; } }

/* ---------- round 7: admin modes in the storefront (preview, ordering for a member), load more ---------- */
.modebar { display: flex; align-items: center; gap: var(--s3); padding: 10px 12px 10px 12px; margin-bottom: var(--s3); border: 1px solid; border-radius: var(--rp); }
.modebar.preview { background: var(--warn-50); border-color: #ecdcb6; }
.modebar.for { background: var(--teal-50); border-color: var(--teal-100); }
.modebar .mb-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.75); flex: none; }
.modebar.preview .mb-ic { color: var(--warn); }
.modebar.for .mb-ic { color: var(--teal); }
.modebar .mb-ic svg { width: 18px; height: 18px; }
.modebar .mb-tx { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: var(--fs-sm); color: var(--ink-2); }
.modebar .mb-tx b { color: var(--ink); }
.modebar .mb-tx .mono { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.modebar .mb-tx .faint { flex-basis: 100%; font-size: var(--fs-xs); }
.modebar .btn { flex: none; }
.modebar .btn svg { width: 14px; height: 14px; }
.is-preview .pcard .qa { display: none; }
#pm-rows.ro { background: none; color: inherit; } /* not the read-only input look of .ro */
#pm-rows.ro .qrow { grid-template-columns: 56px minmax(0, 1fr); }
#pm-rows.ro.two .qrow { grid-template-columns: minmax(0, 1fr); }
#pm-rows.ro .qrow .nm .il { color: var(--ink-3); font-family: var(--mono); }
.more { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s5) 0 var(--s2); }
@media (max-width: 720px) { .modebar { flex-wrap: wrap; } .modebar .btn { margin-left: 46px; } }
.tag-int { padding: 1px 8px; border-radius: 999px; background: var(--paper-2); line-height: 18px; }
.acoll .acts .btn svg { width: 15px; height: 15px; }
.ctools .count .link { font-weight: 600; }

/* Order side column (assets/order-details.js): compact customer read view + delivery & details. */
.odside { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.odside > .panel + .panel { margin-top: 0; }
.odc { padding: var(--s4) var(--s5) var(--s5); }
.odc-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.odc-h h3 { font-size: var(--fs-md); font-weight: 650; letter-spacing: -0.005em; }
.odc-view { display: grid; gap: 2px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.odc-view .cn { font-size: var(--fs-md); margin-bottom: 2px; }
.odc-kv { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.odc-kv > span:first-child { color: var(--ink-3); }
.odc-note { margin-top: var(--s3); }
.odc .field + .field, .odc .fgrid + .field, .odc .field + .fgrid, .odc .fgrid + .fgrid, .odc .field + p { margin-top: var(--s3); }
.odc .fgrid { gap: var(--s3); }
.odc .fgrid > .field { margin-top: 0; }
.odc .field > .lbl { font-size: var(--fs-xs); margin-bottom: 5px; }
.odc :is(input:not([type=checkbox]):not([type=file]), select) { height: 34px; font-size: var(--fs-sm); }
.odc textarea { min-height: 58px; font-size: var(--fs-sm); }
.odc input[type=file] { height: auto; padding: 6px; font-size: var(--fs-xs); }
.odc .check { font-size: var(--fs-sm); }
.odc-logo-f { margin-top: var(--s3); padding: var(--s3); border-radius: 10px; background: #fafaf8; border: 1px solid var(--line); }
.odc-save { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.odc-save #savestate:not(:empty) { color: var(--warn); }

/* Admin order composer */
.newpick { max-width: 780px; }
.pprev { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s3) var(--s5); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.pprev:empty { display: none; }
.addbar { padding: var(--s3) var(--s4); }
.addrow { display: flex; align-items: center; gap: var(--s3); }
.addrow .search { position: relative; flex: 1; max-width: 480px; }
.addrow .search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); }
.addrow .search input { padding-left: 34px; }
.pickbox { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.pickhead { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.compose #linespanel .tbl td.act { width: 1%; }
.compose .sumcard .acts { margin-top: var(--s4); }
@media (max-width: 720px) { .pprev { grid-template-columns: minmax(0, 1fr); } .addrow { flex-wrap: wrap; } }
@media (max-width: 900px) { .aside nav.sf { margin: 0; padding: 0; border: 0; } }
/* Forms: a grid row and the field after it keep the normal field spacing; fields inside a grid are spaced by its gap. */
.fgrid > .field { margin-top: 0; }
.fgrid + .field, .field + .fgrid, .fgrid + .fgrid { margin-top: var(--s4); }
/* Admin order filters stay on one row on a laptop: dates fixed, client and search share the rest. */
.fbar .field { flex: 0 1 150px; min-width: 0; }
.fbar .f-client { flex: 1 1 170px; max-width: 260px; }
.fbar .f-search { flex: 2 1 200px; }
.fbar .btn { flex: none; }
.check + .field, .check + .fgrid { margin-top: var(--s3); }
/* Order pages on a phone: one column in the order you work in — lines, then summary and submit, then details. */
@media (max-width: 900px) {
  .osplit { gap: var(--s4); }
  .osplit > div, .osplit > .odside { display: contents; }
  .osplit > div > .panel, .osplit > .odside > .panel { margin-top: 0; }
  .osplit #addbox { order: 1; }
  .osplit #linespanel { order: 2; }
  .osplit #actions, .osplit #summary { order: 3; }
  .osplit #customer { order: 4; }
  .osplit #extras { order: 5; }
  .osplit #stats { order: 6; }
  .osplit #rfidpanel, .osplit #tlpanel { order: 7; } /* RFID receiving (round 17): just above the timeline, as in the page */
}

/* ---------- Import & API (round 8): the import contract, keys for agents ---------- */
.impsplit { grid-template-columns: minmax(0, 1fr) 380px; }
.impsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); counter-reset: st; }
.impsteps li { counter-increment: st; display: grid; gap: 4px; align-content: start; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r2); background: var(--paper); font-size: var(--fs-sm); }
.impsteps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 999px; background: var(--teal-50); color: var(--teal); font: 600 var(--fs-xs) / 22px var(--sans); text-align: center; }
.implist { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.impopts { grid-template-columns: max-content minmax(0, 1fr); font-size: var(--fs-sm); }
.impvals { grid-template-columns: max-content minmax(0, 1fr); align-items: start; }
.impvals dd { display: flex; flex-wrap: wrap; gap: 4px; }
.impvals .chip { height: 22px; padding: 0 8px; }
.impdet { border: 1px solid var(--line); border-radius: var(--r2); background: var(--white); }
.impdet > summary { cursor: pointer; padding: var(--s2) var(--s3); font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); }
.impdet[open] > summary { border-bottom: 1px solid var(--line); }
.impdet > :not(summary) { margin: var(--s3); }
.ftable-wrap + .ftable-wrap { margin-top: var(--s4); }
.ftcap { margin-bottom: 4px; }
.ftable td:first-child { width: 36%; white-space: nowrap; }
.implist li, .impopts dd, .ftable td, .impsteps li { overflow-wrap: anywhere; }
.badge.req { height: 18px; padding: 0 6px; font-size: var(--fs-2xs); }
.keyrows { display: grid; border-top: 1px solid var(--line); }
.keyrow { display: grid; gap: 4px; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.keyrow .kr-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.keyrow.revoked, .keyrow.expired { opacity: 0.6; }
.keyrow [data-revoke] { justify-self: start; }
.newkey { margin-top: var(--s3); }
.keyval { display: block; margin-top: var(--s2); padding: var(--s2) var(--s3); background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r1); color: var(--ink); font-size: var(--fs-sm); word-break: break-all; user-select: all; }
@media (max-width: 1280px) { .impsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .impsplit { grid-template-columns: minmax(0, 1fr); }
  .impsplit > aside { order: -1; }
}
@media (max-width: 560px) {
  .impsteps, .impopts, .impvals { grid-template-columns: minmax(0, 1fr); }
  .ftable td:first-child { width: 42%; white-space: normal; }
}

/* ---------- round 9: collection cards, customer tiers and prices, quieter menu ---------- */
/* Collection number as VRA catalogues print it: "DL" small, the number large. */
.cno { display: inline-flex; align-items: baseline; flex: none; padding: 3px 8px 4px; border-radius: 7px; background: var(--ink); color: #fff; font: 700 var(--fs-lg) / 1 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cno small { font: 650 9px / 1 var(--sans); letter-spacing: 0.08em; opacity: 0.6; margin-right: 3px; }
.cno.sm { padding: 2px 6px 3px; font-size: var(--fs-sm); border-radius: 6px; }
.cno.sm small { font-size: 8px; margin-right: 2px; }
.acoll .bd { gap: 10px; }
.acoll .ttlrow { gap: 10px; min-height: 32px; }
.acoll .ttlrow h3 { flex: 1; }
.acoll .ttlrow .input { flex: 1; min-width: 0; }
@media (hover: hover) {
  .acoll .ttlrow .iconbtn { opacity: 0; transition: opacity 0.15s; }
  .acoll:hover .ttlrow .iconbtn, .acoll .ttlrow .iconbtn:focus-visible { opacity: 1; }
}
.acoll .stats { margin-top: -4px; }
.acoll .acts .btn { flex: 1 1 0; justify-content: center; }
/* One row of prices, one cell per customer tier; the whole row opens the prices dialog. */
.cprice { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.cph { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.cbase { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; cursor: help; }
.cbase b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.tierstrip { display: flex; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.tierstrip:hover { border-color: var(--ink-4); box-shadow: var(--sh1); }
.tierstrip:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.tierstrip .tc { position: relative; flex: 1 1 0; min-width: 0; display: grid; gap: 2px; padding: 7px 10px 8px; border-left: 1px solid var(--line); }
.tierstrip .tc:first-child { border-left: 0; }
.tierstrip .tc i { font: 600 var(--fs-2xs) / 1.2 var(--sans); font-style: normal; letter-spacing: 0.04em; color: var(--ink-4); }
.tierstrip .tc b { font: 650 var(--fs-md) / 1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tierstrip .tc.set::after { content: ""; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.tierstrip .tc.idle b { color: var(--ink-3); font-weight: 550; }
.tierstrip .tedit { flex: 0 0 30px; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--ink-4); background: #fafaf8; }
.tierstrip .tedit svg { width: 14px; height: 14px; }
.tierstrip:hover .tedit { color: var(--teal); background: var(--teal-50); }
.tierstrip.flash { animation: tierflash 1.4s var(--ease); }
@keyframes tierflash { from { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(45, 122, 76, 0.28); } }
.tierpill { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); font: 700 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.04em; vertical-align: middle; }
.affix.sm > input { height: 30px; font-size: var(--fs-sm); padding: 0 8px; }
.affix.sm > span { padding: 0 8px; }
/* Dialogs: prices of one collection, export with the price for the cover */
dialog.dlg.wide { width: min(640px, calc(100vw - 32px)); }
dialog.dlg h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
dialog.dlg .acts .plast { margin-right: auto; align-self: center; }
.pbase { display: flex; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--paper); }
.pbase .lbl { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.pbase .affix { width: 170px; }
.pbase .pbv { font-variant-numeric: tabular-nums; }
.ptab th:first-child, .ptab td:first-child { padding-left: var(--s3); }
.ptab th:last-child, .ptab td:last-child { padding-right: var(--s3); }
.ptab td { padding-top: 9px; padding-bottom: 9px; }
.ptab .prule { margin-top: 3px; }
.ptab .pin { display: flex; align-items: center; gap: var(--s2); }
.ptab .pin .affix { width: 112px; }
.ptab tr.is-set td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.ptab .affix input::placeholder { color: var(--ink-4); font-weight: 400; opacity: 1; }
.ptab .neg { color: var(--red); font-weight: 600; }
.xopts { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.xopts legend { padding: 0; margin-bottom: 6px; }
.xopts > div { display: grid; gap: 6px; }
.xo { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.xo:hover { border-color: var(--ink-4); }
.xo:has(input:checked) { border-color: var(--teal); background: var(--teal-50); }
.xo input[type="radio"] { margin: 0; accent-color: var(--teal); }
.xo .xn { flex: 1; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.xo b { font-variant-numeric: tabular-nums; }
.xo .affix { width: 136px; }
/* Pricing page (round 43): three sets of tiers, one panel each */
.ptiers + .ptiers { margin-top: var(--s4); }
.ptiers .panel-head .pwhat { display: block; margin-top: 2px; }
.tiertbl .input { height: 32px; max-width: 220px; }
.tiertbl .affix { width: 140px; }
.tiertbl .deft { margin-left: 6px; }
.tiertbl td.teg { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tiertbl .tfx { color: var(--ink-3); font-size: var(--fs-xs); }
.tiertbl .tdel { width: 40px; text-align: right; }
.ptiers .tfoot { display: flex; align-items: center; gap: var(--s3) var(--s4); flex-wrap: wrap; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: #fafaf8; border-radius: 0 0 var(--rp) var(--rp); }
.ptiers .deftier { display: inline-flex; align-items: center; gap: var(--s2); }
.ptiers .deftier .select { height: 32px; width: auto; }
.ptiers .formula { margin: 0; }
.ptiers .panel-head .pstate:empty { display: none; }
/* Members: tier column and filter */
.mtiers { display: grid; gap: 3px; }
.mtiers > div { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mtiers i { min-width: 38px; font: 600 var(--fs-2xs) / 1 var(--sans); font-style: normal; color: var(--ink-4); }
.dtiers { display: inline-flex; align-items: center; gap: 4px; }
.dfacts b.dtiers i { font-size: var(--fs-2xs); margin-left: 4px; }
.dfacts b.dtiers i:first-child { margin-left: 0; }
.mfilter { display: inline-flex; align-items: center; gap: var(--s2); }
.mfilter .select { height: 34px; width: auto; }
/* Admin menu: Change history is a small link at the bottom, away from the daily pages. */
.aside nav.aux { margin-top: auto; padding-top: var(--s3); }
.aside nav.aux a { height: 30px; font-size: var(--fs-sm); color: var(--ink-3); }
.aside nav.aux a svg { width: 14px; height: 14px; }
.aside nav.aux + .who { margin-top: var(--s2); }
@media (max-width: 900px) { .aside nav.aux { margin: 0; padding: 0; } }
/* Product page: the collection's prices per tier (read-only) */
.tprices { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; }
.tprices .tp { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.tprices .tp i { display: block; font: 600 var(--fs-2xs) / 1.3 var(--sans); font-style: normal; color: var(--ink-4); letter-spacing: 0.04em; }
.tprices .tp b { font-variant-numeric: tabular-nums; }
/* Phones: the two price tables become stacked rows instead of scrolling sideways. */
@media (max-width: 640px) {
  .ptab thead, .tiertbl thead { display: none; }
  .ptab, .ptab tbody, .tiertbl, .tiertbl tbody { display: block; }
  .ptab tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px var(--s3); border-bottom: 1px solid var(--line); }
  .ptab td { display: block; padding: 0 !important; border: 0; }
  .ptab td:first-child { grid-column: 1 / -1; }
  .ptab td[data-formula] { display: none; }
  .ptab .pin { flex-wrap: wrap; }
  .tiertbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 12px var(--s4); border-bottom: 1px solid var(--line); }
  .tiertbl td { display: block; padding: 0 !important; border: 0; text-align: left; }
  .tiertbl td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font: 600 var(--fs-2xs) / 1.3 var(--sans); color: var(--ink-3); }
  .tiertbl .affix, .tiertbl .input { width: 100%; max-width: none; }
  .tiertbl td.teg { grid-column: 1 / -1; white-space: normal; }
  .tiertbl .tdel { width: auto; }
  .tiertbl td.num { text-align: left; }
  dialog.dlg .acts { flex-wrap: wrap; }
  dialog.dlg .acts .plast { flex-basis: 100%; }
}

/* ---------- round 10: orders workspace (slim figures, list + roomy order), filter pills, invoice details ---------- */
.statbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s3); overflow: hidden; }
.statbar .st { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: var(--s2); min-width: 0; padding: 8px var(--s5); border: 0; border-left: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; }
.statbar .st:first-child { border-left: 0; }
.statbar .st .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statbar .st b { font: 700 var(--fs-xl) / 1.15 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.statbar button.st { cursor: pointer; transition: background 0.12s; }
.statbar button.st:hover { background: var(--paper); }
.statbar .st.hot b { color: var(--red); }
.olayout { display: grid; grid-template-columns: minmax(380px, min(38%, 500px)) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.olayout > .panel + .panel { margin-top: 0; }
.olist { min-width: 0; }
.olist-h { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); border-radius: var(--rp) var(--rp) 0 0; }
.oseg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oseg button { justify-content: center; }
.oseg .n { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.oseg .n:empty { display: none; }
.oseg button.on .n { color: var(--ink-3); }
.ofilters { display: grid; gap: 8px; }
.osearch { position: relative; }
.osearch svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.osearch input { width: 100%; height: 34px; padding: 0 10px 0 33px; border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--white); color: var(--ink); font: 400 var(--fs-sm) / 1.2 var(--sans); transition: border-color 0.15s, box-shadow 0.15s; }
.osearch input:hover { border-color: var(--ink-4); }
.osearch input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.orow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.orow #freset { margin-left: auto; }
/* Filter pill: a compact select or button; teal while it filters something. */
.pill { height: 30px; max-width: 100%; padding: 0 26px 0 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237f7a6e' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink-2); font: 500 var(--fs-xs) / 1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; appearance: none; transition: border-color 0.12s, background-color 0.12s, color 0.12s; }
select.pill { max-width: 160px; }
.pill:hover { border-color: var(--ink-4); color: var(--ink); }
.pill:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.pill.set { border-color: rgba(14, 90, 84, 0.45); background-color: var(--teal-50); color: var(--teal-2); font-weight: 600; }
.odate { position: relative; }
.datepop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 290px; padding: 12px; display: grid; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--sh2); animation: pop 0.14s var(--ease); }
.datepop .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.datepop .presets button { height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); color: var(--ink-2); font: 500 var(--fs-2xs) / 1 var(--sans); cursor: pointer; }
.datepop .presets button:hover { border-color: var(--ink-4); color: var(--ink); }
.datepop .presets button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.datepop .range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.datepop .range label { display: grid; gap: 4px; font: 600 var(--fs-2xs) / 1.2 var(--sans); color: var(--ink-3); }
.datepop input[type=date] { width: 100%; height: 32px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--white); color: var(--ink); font: 400 var(--fs-sm) / 1 var(--sans); }
.datepop input[type=date]:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.datepop .acts { display: flex; align-items: center; justify-content: space-between; }
.ohelp { margin: 0; line-height: 1.45; }
.otbl th { background: #fafaf8; }
.otbl th:first-child, .otbl td:first-child { padding-left: var(--s4); }
.otbl th:last-child, .otbl td:last-child { padding-right: var(--s4); }
.otbl td { padding-top: 11px; padding-bottom: 11px; vertical-align: top; }
.otbl .ono { font: 700 var(--fs-sm) / 1.3 var(--mono); white-space: nowrap; }
.otbl .sub { margin-top: 3px; font-size: var(--fs-2xs); line-height: 1.35; color: var(--ink-3); }
.otbl { table-layout: fixed; }
.otbl th:first-child { width: 38%; }
.otbl th:last-child { width: 26%; }
.otbl td.client b, .otbl td.client .sub, .otbl .sub.ref { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otbl .sub.byvra { color: var(--teal); font-weight: 600; }
.otbl .ost { margin-top: 6px; }
.otbl .ost .badge { height: 20px; padding: 0 8px; font-size: var(--fs-2xs); }
.otbl tr.click { outline: none; }
.otbl tr.click:focus-visible td { background: #f4f6f4; }
.otbl tr.sel td { background: var(--teal-50); }
.otbl tr.sel td:first-child, .otbl tr.click:focus-visible td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.olist-f { padding: 9px var(--s4); border-top: 1px solid var(--line); border-radius: 0 0 var(--rp) var(--rp); background: #fafaf8; color: var(--ink-3); font-size: var(--fs-xs); }
/* The order: sticky beside the list, its header stays on top while the panel scrolls. Two columns once it is wide.
   admin-orders.html sets max-height so the panel ends at the window's bottom wherever it starts (below the page header
   until the page scrolls): it then scrolls on its own to the end of the timeline, and contain keeps the page still.
   This max-height is the fallback for when the page is stuck at the top (11-04: in Safari the foot was out of reach). */
.odetail { container-type: inline-size; position: sticky; top: var(--s4); max-height: calc(100vh - var(--s5)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.od-empty { padding: var(--s7) 0; }
.od-head { position: sticky; top: 0; z-index: 3; align-items: center; background: var(--white); border-radius: var(--rp) var(--rp) 0 0; }
.od-head h2 { font: 700 var(--fs-xl) / 1.15 var(--mono); letter-spacing: -0.01em; margin-right: 4px; }
.od-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.od-acts { flex: none; }
.od-step { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.od-body { display: flex; flex-direction: column; }
.od-main, .od-side { display: contents; }
.od-body .dsec { border-bottom: 1px solid var(--line); }
#statusbox { order: 1; }
#od-lines { order: 2; }
#od-lensmx { order: 2; } /* 11-27: the lens matrix right under the lines (same order: the page's order follows) */
#od-pay { order: 2; } /* 11-27: payments, under the lens matrix */
#od-cust { order: 3; }
#od-notes { order: 4; }
#od-extras { order: 5; }
#od-stats { order: 6; }
#od-rfid { order: 7; } /* RFID receiving (round 17): just above the timeline, which it precedes in the page */
#od-tl { order: 7; border-bottom: 0; }
.od-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.od-h .label { margin-bottom: 0 !important; }
#od-lines { padding-left: 0; padding-right: 0; }
#od-lines .od-h, #od-lines > p { padding: 0 var(--s5); }
.od-lines th:first-child, .od-lines td:first-child { padding-left: var(--s5); }
.od-lines th:last-child, .od-lines td:last-child { padding-right: var(--s5); }
.od-lines thead th { background: none; padding-top: 6px; padding-bottom: 6px; }
.od-lines tfoot td { padding-top: 10px; padding-bottom: 4px; font-variant-numeric: tabular-nums; }
.od-kv { margin-top: var(--s2); }
.od-quote { margin-top: var(--s2); }
.od-stats > summary { display: flex; align-items: baseline; gap: var(--s2); cursor: pointer; list-style: none; }
.od-stats > summary::-webkit-details-marker { display: none; }
.od-stats > summary::before { content: ""; width: 7px; height: 7px; flex: none; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg) translate(-1px, -1px); transition: transform 0.15s var(--ease); }
.od-stats[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.od-stats > summary .label { margin: 0 !important; }
#statusbox .field + .field { margin-top: var(--s3); }
.od-pair { display: grid; gap: var(--s3); }
.od-pair > .field + .field { margin-top: 0; }
/* One column but wide enough: the status move and its note, or the two notes, side by side. */
@container (min-width: 560px) and (max-width: 819px) { .od-pair { grid-template-columns: 1fr 1fr; align-items: end; } }
@container (min-width: 820px) {
  .od-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 34%); align-items: start; }
  .od-main, .od-side { display: block; min-width: 0; }
  .od-side { border-left: 1px solid var(--line); align-self: stretch; }
  .od-side .dsec:last-child, .od-main .dsec:last-child { border-bottom: 0; }
}
dialog.dlg .pifs { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s3); }
dialog.dlg .pisep { height: 1px; margin: var(--s1) 0; background: var(--line); }
dialog.dlg .pifs legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
dialog.dlg .pifs .field + .field, dialog.dlg .pifs .fgrid + .field, dialog.dlg .pifs .field + .fgrid, dialog.dlg .pifs .fgrid + .fgrid { margin-top: 0; }
#pidlg { max-height: calc(100vh - 32px); }
@media (max-width: 1280px) { .statbar .st { padding: 10px var(--s4); } }
@media (max-width: 1100px) {
  .olayout { grid-template-columns: minmax(0, 1fr); }
  .odetail { position: static; max-height: none; overflow: visible; }
  .od-head { position: static; }
}
@media (max-width: 720px) {
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statbar .st:nth-child(3) { border-left: 0; }
  .statbar .st:nth-child(n+3) { border-top: 1px solid var(--line); }
  .od-head { flex-wrap: wrap; }
}

/* ---------- round 10: online status, sign-ins, change password ---------- */
/* Presence dot: green (with a soft pulse) while online, grey otherwise. */
.pdot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 2px var(--white); vertical-align: 1px; }
.pdot.on { background: #22a35a; animation: pdot 2.4s ease-out infinite; }
@keyframes pdot { 0% { box-shadow: 0 0 0 2px var(--white), 0 0 0 2px rgba(34, 163, 90, 0.45); } 70%, 100% { box-shadow: 0 0 0 2px var(--white), 0 0 0 7px rgba(34, 163, 90, 0); } }
.who-cell { display: flex; align-items: flex-start; gap: 10px; }
.who-cell .pdot { margin-top: 6px; }
.onl { color: #1d8a4c; font-weight: 650; }
.mtbl .lastact { white-space: nowrap; }
.mtbl td.co { min-width: 170px; }
.mtbl td.ct { max-width: 210px; }
.mtbl .em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtbl .mst { margin-top: 4px; }
.mtbl .mst .badge { height: 20px; font-size: var(--fs-2xs); }
.presline { margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.pres { display: inline-flex; align-items: center; gap: 7px; }
.pres.on { color: #1d8a4c; font-weight: 600; }
/* Sign-ins & activity: four figures, then the sign-ins table. */
.sstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: var(--s3); overflow: hidden; }
.sstats > div { min-width: 0; display: grid; gap: 2px; align-content: start; padding: 10px 12px; border-left: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.sstats > div:first-child { border-left: 0; }
.sstats .v { font: 700 var(--fs-lg) / 1.15 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.sstats .bad .v { color: var(--red); }
.sstats .lst > span { margin-bottom: 2px; }
.sstats .lst > div { color: var(--ink-2); overflow-wrap: anywhere; line-height: 1.35; }
.sstats .lst b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.slist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.slist li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.slist li.is-refused { background: linear-gradient(90deg, #fdf3f0, transparent 70%); }
.slist .dev-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--paper-2); color: var(--ink-3); }
.slist .dev-ic svg { width: 16px; height: 16px; }
.slist .sl-main { min-width: 0; }
.slist .sl-main b { font-weight: 600; }
.slist .sl-main .faint { overflow-wrap: anywhere; }
.slist .mono { font-size: var(--fs-2xs); }
.slist .sl-when { text-align: right; white-space: nowrap; color: var(--ink-2); }
.slist .sl-when .xs { margin-top: 2px; }
.sl-more { padding-top: var(--s2); text-align: center; }
@media (max-width: 720px) { .sstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sstats > div:nth-child(3) { border-left: 0; } .sstats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
/* Round 12 — Activity: four figures over countries and devices, then one list per day with each visit and sign-in. */
.sstats.six > .lst { grid-column: span 2; border-top: 1px solid var(--line); }
.sstats.six > .lst:nth-child(5) { border-left: 0; }
@media (max-width: 720px) { .sstats.six > .lst { grid-column: auto; } }
.aday + .aday { margin-top: var(--s4); }
.aday-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 0 2px 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.aday-h b { color: var(--ink); font-weight: 650; }
.aday-h span { font-variant-numeric: tabular-nums; }
.slist .span { font-variant-numeric: tabular-nums; }
.slist .dur { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 600 var(--fs-2xs) / 18px var(--sans); font-variant-numeric: tabular-nums; vertical-align: 1px; }
.slist li.is-on .dev-ic, .slist li.is-on .dur { background: var(--ok-50); color: var(--ok); }
.slist .refused { color: var(--red); }
.sl-note { margin: var(--s2) 2px 0; }
.mtbl tr.is-admin .mst .rolepill { height: 18px; }
/* Change password */
dialog.dlg h2 svg { width: 20px; height: 20px; color: var(--teal); }
.pwmeter { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; gap: 4px; margin-top: 7px; font-size: var(--fs-2xs); color: var(--ink-3); }
.pwmeter i { height: 4px; border-radius: 2px; background: var(--paper-2); transition: background 0.15s; }
.pwmeter span { margin-left: 6px; min-width: 150px; }
.pwmeter[data-level="1"] i:nth-child(1) { background: var(--red); }
.pwmeter[data-level="2"] i:nth-child(-n+2) { background: var(--sun); }
.pwmeter[data-level="3"] i { background: var(--ok); }
.pwmeter[data-level="3"] span { color: var(--ok); font-weight: 600; }
.pwnote { position: fixed; z-index: 150; right: var(--s5); bottom: var(--s5); display: flex; align-items: center; gap: var(--s3); max-width: min(520px, calc(100vw - 32px)); padding: 12px 12px 12px 14px; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--sun); border-radius: var(--r2); box-shadow: var(--sh2); animation: toast-in 0.2s var(--ease); font-size: var(--fs-sm); }
.pwnote > div { display: grid; gap: 1px; min-width: 0; }
.pwnote > div span { color: var(--ink-3); font-size: var(--fs-xs); }
.pwnote-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--warn-50); color: var(--warn); }
.pwnote-ic svg { width: 16px; height: 16px; }
.who-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
@media (max-width: 720px) { .pwnote { left: var(--s3); right: var(--s3); bottom: calc(52px + var(--s3)); max-width: none; flex-wrap: wrap; } }
/* Round 13 — Members: the list on the left (search and two drop-downs, then the members and, for the super admin, the
   admins in a block of their own); the account on the right from the top of the page, read-only until Edit. */
.mem-page { display: grid; grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr); gap: var(--s4); align-items: start; }
.mem-left { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-content: start; }
.mem-left > .page-head { margin-bottom: 0; }
.mem-left > .panel + .panel { margin-top: 0; }
.mtools { margin-bottom: 0; }
.mtools .search { max-width: none; flex: 2 1 150px; min-width: 0; }
.mtools .mfilter { flex: 1 1 110px; min-width: 0; }
.mtools .mfilter .select { width: 100%; }
.mtbl .actn { color: var(--ok); }
.mem-detail { position: sticky; top: var(--s4); max-height: calc(100vh - var(--s6)); overflow: auto; }
/* Round 33: the account's tabs stay in reach while its panel scrolls; Save stays in reach while editing. */
.dtabs { position: sticky; top: 0; z-index: 3; display: flex; gap: var(--s1); padding: 0 var(--s4); background: var(--white); border-bottom: 1px solid var(--line); }
.dtabs button { position: relative; height: 40px; padding: 0 var(--s3); border: 0; background: none; font: 600 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dtabs button:hover { color: var(--ink); }
.dtabs button.on { color: var(--teal-2); }
.dtabs button.on::after { content: ""; position: absolute; left: var(--s2); right: var(--s2); bottom: -1px; height: 2px; border-radius: 2px; background: var(--teal); }
.dtabs button:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; border-radius: var(--r1); }
.dtabs .n { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); font: 600 var(--fs-2xs) / 18px var(--sans); text-align: center; }
.mem-detail .dhead { padding: var(--s3) var(--s5); }
.mem-detail .dsave { position: sticky; bottom: 0; z-index: 2; gap: var(--s2); margin: var(--s4) calc(-1 * var(--s5)) calc(-1 * var(--s4)); padding: var(--s3) var(--s5); background: var(--white); border-top: 1px solid var(--line); }
.mtbl .ct, .mtbl .em { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-detail .md-empty { padding: var(--s7) var(--s5); }
.mem-detail .dhead { align-items: flex-start; }
.mem-detail .dhead h2 { font-family: var(--display); letter-spacing: -0.02em; }
.mem-detail .dh-main { min-width: 0; }
.mem-detail .dh-main .small { margin-top: 4px; overflow-wrap: anywhere; }
.mblock-h { display: flex; align-items: baseline; gap: var(--s3); padding: 12px var(--s4) 10px; border-bottom: 1px solid var(--line); }
.mblock-h h2 { font: 650 var(--fs-md) / 1.2 var(--sans); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.mblock-h .n { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); font: 600 var(--fs-2xs) / 20px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
#blk-admins .mblock-h { background: #fbfaf6; border-radius: var(--rp) var(--rp) 0 0; }
.mtbl.adm td.co { min-width: 200px; }
/* The account: four figures under the name, then sections with a title row (label, help, Edit on the right). */
.dfacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fbfaf6; }
.dfacts > div { min-width: 0; display: grid; gap: 3px; padding: 10px var(--s4); border-left: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.dfacts > div:first-child { border-left: 0; padding-left: var(--s5); }
.dfacts b { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink); font: 650 var(--fs-sm) / 1.4 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfacts b i { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.dsec-h { display: flex; align-items: center; gap: 6px; min-height: 26px; margin-bottom: var(--s3); }
.dsec-h > .label { font-size: var(--fs-md); font-weight: 650; color: var(--ink); letter-spacing: -0.005em; }
.dsec-h .btn svg { width: 13px; height: 13px; }
.dacts { gap: var(--s2); margin-top: var(--s3); }
.topst { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--s3); }
.topst .chip { padding-right: 10px; }
#orders .tbl { margin: 0 calc(-1 * var(--s2)); width: calc(100% + 2 * var(--s2)); }
/* Active time next to a visit's length. */
.slist .actv { display: inline-block; margin-left: 6px; color: var(--ok); font: 600 var(--fs-2xs) / 18px var(--sans); font-variant-numeric: tabular-nums; }
.sstats .sref { display: block; font-style: normal; color: var(--red); font-weight: 600; }
@media (max-width: 1100px) {
  .mem-page { grid-template-columns: minmax(0, 1fr); }
  .mem-detail { position: static; max-height: none; }
}
@media (max-width: 720px) { .dfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dfacts > div:nth-child(3) { border-left: 0; padding-left: var(--s5); } .dfacts > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
/* The storefront as one member sees it (?as=<id>, admins only, read-only). */
.modebar.as { background: #f1eef8; border-color: #ddd5ee; }
.modebar.as .mb-ic { color: #5b4a8a; }
.is-as .pcard .qa { display: none; }
/* Round 14 — product grades and the member's details. */
.badge.gradehigh { background: #f6efdc; color: #7a5a12; box-shadow: inset 0 0 0 1px rgba(122, 90, 18, 0.22); }
.badge.gradehigh::before { background: #c79a2a; }
/* Round 50: the middle grade. */
.badge.grademid { background: #eef3f8; color: #2f5576; box-shadow: inset 0 0 0 1px rgba(47, 85, 118, 0.2); }
.badge.grademid::before { background: #5b86ad; }
.seg.status button.on[data-v="high"] { color: #7a5a12; }
.mtbl .gsee { margin-top: 3px; color: #7a5a12; font: 600 var(--fs-2xs) / 1.2 var(--sans); white-space: nowrap; }
.eyelink { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }
.eyelink svg { width: 15px; height: 15px; }
.dsub { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px dashed var(--line-2); }
.dsub-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); margin-bottom: var(--s2); font-size: var(--fs-sm); }
.dsub-h b { font-weight: 650; color: var(--ink); }
.dfs { border: 0; margin: 0; padding: 0; min-width: 0; }
.dfs + .dfs { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px dashed var(--line-2); }
.dfs legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-sm); font-weight: 650; color: var(--ink); }
.dfs .fgrid { margin-top: 0; }
.dfs .fgrid + .fgrid, .dfs .fgrid + .field, .dfs .field + .fgrid { margin-top: var(--s3); }

/* ---------- Lenses (round 15) ---------- */
.lens-ic { width: 16px; height: 16px; color: var(--teal); flex: none; }
.badge.lform.stock { background: var(--teal-50); color: var(--teal); }
.badge.lform.blank { background: var(--warn-50); color: var(--warn); }
/* order pages: lens lines under the frames */
.lenshead { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s4) var(--s5) var(--s2); }
#lines + .lenshead, .scroll-x + .lenshead { border-top: 1px solid var(--line); }
.lenshead .label:first-child { font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.lenstbl .lpow { font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; }
.lenstbl .group a { font-weight: 600; }
.lensthumb { display: grid; place-items: center; color: var(--teal); background: var(--teal-50); }
/* 11-27: an order's lens lines as the factories' matrix (VRA.lensMatrix): SPH down, CYL across, every square bordered. */
.lenshead .lmx-seg { margin-left: auto; align-self: center; }
.lmx { padding: var(--s2) var(--s5) var(--s4); }
.dsec .lmx { padding: var(--s2) 0 var(--s3); }
.lmx-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s2); }
.lmx-h .lens-ic { align-self: center; color: var(--teal); }
.lensmx { border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.lensmx th, .lensmx td { border: 1px solid var(--line); padding: 5px 10px; min-width: 54px; text-align: center; white-space: nowrap; }
.lensmx thead th, .lensmx tbody th, .lensmx tfoot th { background: var(--paper-2); color: var(--ink); font-weight: 650; }
.lensmx tbody th { position: sticky; left: 0; }
.lensmx td.tot, .lensmx tfoot td { font-weight: 650; }
.lmx-note { padding: 0 var(--s5) var(--s3); }
/* 11-27: payments against an order (VRA records them; the member reads paid and due). */
.pay-sum { display: flex; gap: var(--s6); margin: var(--s2) 0 var(--s3); }
.pay-sum > div { display: flex; flex-direction: column; gap: 2px; }
.pay-sum span { font-size: var(--fs-xs); color: var(--ink-3); }
.pay-sum b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.pay-sum .due b { color: var(--warn); }
.pay-list { margin-bottom: var(--s3); }
.pay-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2) var(--s3); align-items: end; }
.pay-form .pay-note { grid-column: span 2; }
.paid-rows .r.due b { color: var(--warn); }
.paid-rows { margin-top: var(--s1); }
.pay-mini { list-style: none; margin: 0 0 var(--s2); padding: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.pay-mini li { display: flex; justify-content: space-between; gap: var(--s3); padding: 2px 0; }
.pay-mini b { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lensthumb svg { width: 20px; height: 20px; }
/* storefront: the lens lines */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.lgrid > .panel + .panel { margin-top: 0; }
.lcard { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5); color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.lcard:hover { border-color: var(--ink-4); box-shadow: var(--sh2); text-decoration: none; color: inherit; }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.lc-title { font: 700 var(--fs-lg) / 1.3 var(--display); letter-spacing: -0.015em; margin: 0; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-chips .tag { font-family: var(--sans); font-size: var(--fs-xs); }
.lc-range { font-variant-numeric: tabular-nums; }
.lc-stage { color: var(--warn); font-weight: 600; }
.lc-stage.live { color: var(--ok); }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); }
/* storefront: one line and its grid */
.lsplit { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.lsplit > .panel + .panel { margin-top: 0; }
.lspec .kv { grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); }
.lorder { min-width: 0; }
.ltools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.ltools .input.sm { width: 76px; }
/* The grid scrolls inside the panel, sized so the panel and its bar fit one screen. */
.powgrid-wrap { max-height: max(280px, calc(100vh - 430px)); overflow: auto; }
table.powgrid { border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.powgrid th { position: sticky; top: 0; z-index: 2; background: #fafaf8; font: 600 var(--fs-xs) / 1 var(--sans); color: var(--ink-3); padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.powgrid tbody th { position: sticky; left: 0; z-index: 1; text-align: right; padding: 0 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--paper-2); color: var(--ink-2); }
.powgrid thead th.corner { left: 0; z-index: 3; text-align: left; padding: 4px 10px; border-right: 1px solid var(--line); line-height: 1.25; }
.powgrid th.corner span { display: block; font-size: var(--fs-2xs); }
.powgrid th.corner span:first-child::after { content: " \2193"; }
.powgrid th.corner span:last-child::after { content: " \2192"; }
.powgrid td { padding: 2px; border-bottom: 1px solid var(--paper-2); text-align: center; }
.powgrid td.off { background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--paper-2) 5px 6px); }
.powgrid td.dia, .powgrid th.dia { color: var(--ink-4); font-size: var(--fs-2xs); padding: 0 10px; }
.powgrid .gq { width: 46px; height: 28px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font: 600 var(--fs-sm) var(--sans); font-variant-numeric: tabular-nums; background: #fff; color: var(--ink); }
.powgrid .gq:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.powgrid .gq.has { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-2); }
.powgrid .gq.chg { border-color: var(--sun); box-shadow: inset 0 -2px 0 var(--sun); }
.powgrid .gq:disabled { background: var(--paper); color: var(--ink-3); }
.powgrid th.hl { color: var(--teal); background: var(--teal-50); }
table.bgrid { width: auto; min-width: 320px; }
table.bgrid th, table.bgrid td { position: static; text-align: left; padding: 6px var(--s3); }
table.bgrid .num { text-align: right; }
.lbar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); border-radius: 0 0 var(--rp) var(--rp); }
.lbar .lb-tx { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); font-variant-numeric: tabular-nums; }
.chgtx { color: var(--warn); }
@media (max-width: 900px) { .lsplit { grid-template-columns: 1fr; } }
/* admin: lens lines and the editor */
.lline-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.lline .lhd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 30px; }
.lline .lhd .spacer { flex: 1; }
.lline .lcode { font-weight: 700; font-size: var(--fs-md); }
.lline .ltitle { font: 700 var(--fs-lg) / 1.25 var(--display); letter-spacing: -0.015em; margin: 0; }
.especs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.especs .field + .field, #ebody .fgrid .field + .field { margin-top: 0; }
.egrid .input.sm { width: 96px; }
@media (max-width: 640px) { .especs { grid-template-columns: 1fr 1fr; } }
.lorder .seg button { white-space: nowrap; }
/* ---------- round 16: the lens line editor in sections, and Add common lenses ---------- */
/* Round 44: #edlg is the lens line's side panel (.edrawer.ledrawer), as wide as a style's. */
#ebody { display: grid; gap: var(--s4); }
/* The powers table scrolls inside its own box; without this its width would widen the whole dialog on a narrow screen. */
#eform, #ebody { grid-template-columns: minmax(0, 1fr); }
#edlg .esec { padding-top: var(--s4); border-top: 1px solid var(--line); }
#ebody > .esec:first-child { padding-top: var(--s1); border-top: 0; }
.esec-h { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; min-height: 22px; margin-bottom: var(--s3); font: 650 var(--fs-md) / 1.3 var(--sans); letter-spacing: -0.005em; color: var(--ink); }
.esec-h .faint { font-weight: 400; letter-spacing: 0; }
.esec-h .spacer { flex: 1; }
.elens { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.elens.one { grid-template-columns: minmax(0, 1fr); }
.erow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s3) var(--s5); margin-top: var(--s4); }
.erow .field { margin-top: 0; }
.ebase { width: 140px; }
.emore { margin-top: var(--s3); }
.emore > summary { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.emore > summary::-webkit-details-marker { display: none; }
.emore > summary::before { content: ""; width: 7px; height: 7px; flex: none; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg) translate(-1px, -1px); transition: transform 0.15s var(--ease); }
.emore[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.emore > summary:hover { color: var(--ink); }
.emore > .fgrid, .emore > .field { margin-top: var(--s3); }
.egrid td.egempty { padding: 12px 10px; }
#edlg .egrid .input.sm { width: 84px; }
@media (max-width: 640px) {
  .elens { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- RFID receiving on order pages (round 17): only for accounts that use it ---------- */
.rfid-h { display: flex; align-items: baseline; gap: var(--s2); }
.rfid-acts { gap: var(--s2); margin: var(--s2) 0 0; }
.rfid-task { border-top: 1px solid var(--line); margin-top: var(--s3); padding-top: var(--s3); display: grid; gap: var(--s2); justify-items: start; }
.rfid-task > .row { gap: var(--s2); width: 100%; }
.rfid-miss, .rfid-recs { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); display: grid; gap: 2px; }
.rfid-miss li { color: var(--red); }
.rfid-recs li { display: flex; flex-wrap: wrap; column-gap: var(--s2); }
.rfid-note { width: 100%; }
/* Imported EPCs (round 18): the lines that have them on the order, and the import dialog's groups → lines */
.rfid-imps { margin: var(--s2) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); display: grid; gap: var(--s1); }
.rfid-imps li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.rfid-miss .mono { word-break: break-all; }
.epc-map { border-top: 1px solid var(--line); }
.epc-g { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 19rem); align-items: center; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.epc-k { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); min-width: 0; }
.epc-k .mono { word-break: break-all; }
.epc-g select { width: 100%; min-width: 0; }
@media (max-width: 560px) {
  .epc-g { grid-template-columns: minmax(0, 1fr) auto; }
  .epc-g select { grid-column: 1 / -1; }
}
.alert.warn { background: var(--warn-50); color: var(--warn); }
.gsee.rfid-on { color: var(--teal-2); }

/* ---------- round 25: lenses three ways (bulk · Rx · stock), the power grid as a spreadsheet, Rx jobs and the lab ---------- */
/* the three ways in */
.ltabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 2px; margin: 0 0 var(--s3); padding: 3px; background: var(--paper-2); border-radius: 10px; }
.ltabs a { display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 14px 0 10px; border-radius: 7px; color: var(--ink-2); text-decoration: none; transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.ltabs a:hover { background: rgba(255, 255, 255, 0.65); color: var(--ink); text-decoration: none; }
.ltabs a.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1), 0 0 0 1px var(--line); }
.ltabs .lt-ic { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 0; background: none; color: var(--ink-3); box-shadow: none; transition: background 0.15s, color 0.15s; }
.ltabs a.on .lt-ic { background: none; color: var(--teal); box-shadow: none; }
.ltabs .lt-ic svg { width: 16px; height: 16px; }
.ltabs .lt-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ltabs .lt-tx b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.ltabs .lt-tx small { display: none; }

/* the lens library */
.lgroup + .lgroup { margin-top: var(--s6); }
.lgroup-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px var(--s3); margin-bottom: var(--s3); }
.lc-go { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 650; color: var(--teal); white-space: nowrap; }
.lc-go svg { width: 14px; height: 14px; transition: transform 0.15s var(--ease); }
.lcard:hover .lc-go svg { transform: translateX(2px); }
.badge.lform.rx { background: var(--warn-50); color: var(--warn); }
.lpage .page-head { margin-bottom: var(--s4); }

/* the specification as one strip above the grid, so the grid gets the whole width */
.lstrip { padding: 14px var(--s5); margin-bottom: var(--s4); }
.lstrip-main { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.lstrip-main > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lstrip-main dt { font-size: var(--fs-xs); color: var(--ink-3); }
.lstrip-main dd { margin: 0; font-size: var(--fs-sm); font-weight: 650; color: var(--ink); }
.lstrip-more { margin-top: 10px; }
.lstrip-more summary { cursor: pointer; width: max-content; font-size: var(--fs-xs); font-weight: 650; color: var(--teal); }
.lstrip-more > p { margin: 10px 0 0; max-width: 760px; }
.lstrip-more .kv { margin-top: 10px; max-width: 700px; }

/* the power grid (round 26): blocks side by side, each a table; rows sized by VRAGrid.plan (--pg-row) to fit the screen */
.lorder { position: relative; }
.ltabseg button { height: 30px; padding: 0 12px; font-size: var(--fs-sm); }
.ltabseg button .n { font-variant-numeric: tabular-nums; color: var(--teal); font-weight: 700; }
.lt-hint { display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.lt-hint svg { width: 14px; height: 14px; flex: none; }
.gridbox { position: relative; min-width: 0; }
.pg-wrap { --pg-row: 34px; overflow: auto; max-height: 100%; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.pg-chunks { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.pg-chunks > table.powgrid { flex: 1 1 0; min-width: calc(58px + var(--pg-cols, 9) * 34px); width: auto; }
table.powgrid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: clip; }
.powgrid col.rhc { width: 58px; }
.powgrid thead th { position: sticky; z-index: 3; padding: 0 2px; background: #fafaf8; font: 650 var(--fs-2xs) / 1 var(--sans); color: var(--ink-3); text-align: center; white-space: nowrap; }
.powgrid thead tr.cap th { top: 0; height: 28px; padding: 0 10px; text-align: left; background: #f3f3ee; border-bottom: 1px solid var(--line); }
.powgrid thead tr.cyls th { top: 28px; height: 28px; border-bottom: 1px solid var(--line); }
.powgrid thead tr.cyls:first-child th { top: 0; }
.powgrid .cap th { display: table-cell; }
.powgrid .cap-t { font: 700 var(--fs-xs) / 1 var(--sans); color: var(--ink); letter-spacing: 0.02em; text-transform: uppercase; margin-right: 8px; }
.powgrid .cap-s { font: 500 var(--fs-xs) / 1 var(--sans); color: var(--ink-3); }
.powgrid .cap-n { float: right; font: 700 var(--fs-sm) / 1 var(--sans); color: var(--teal-2); }
.powgrid thead th.corner { left: 0; z-index: 5; padding: 2px 8px; text-align: left; cursor: pointer; line-height: 1.15; border-right: 1px solid var(--line); }
.powgrid th.corner span { display: block; font-size: 9.5px; letter-spacing: 0.02em; }
.powgrid th.corner span:first-child::after { content: " \2193"; }
.powgrid th.corner span:last-child::after { content: " \2192"; }
.powgrid th.ch, .powgrid th.rh { cursor: pointer; user-select: none; transition: background 0.1s, color 0.1s; }
.powgrid th.ch:hover, .powgrid th.rh:hover, .powgrid th.corner:hover { background: var(--teal-50); color: var(--teal); }
.powgrid tbody th.rh { position: sticky; left: 0; top: auto; z-index: 2; height: var(--pg-row); padding: 0 10px 0 4px; background: #fafaf8; border-right: 1px solid var(--line); border-bottom: 1px solid var(--paper-2); text-align: right; font: 650 var(--fs-sm) / 1 var(--sans); color: var(--ink-2); white-space: nowrap; }
.powgrid tbody tr:last-child th, .powgrid tbody tr:last-child td { border-bottom: 0; }
.pg-wrap:focus { outline: none; }
.powgrid td { height: var(--pg-row); padding: 1px 2px; border-bottom: 1px solid var(--paper-2); text-align: center; cursor: cell; }
.powgrid .gq { display: block; width: 100%; min-width: 0; height: calc(var(--pg-row) - 4px); max-height: 34px; padding: 0 2px; border: 1px solid transparent; border-radius: 6px; background: var(--paper); color: var(--ink); text-align: center; font: 600 var(--fs-sm) / 1 var(--sans); font-variant-numeric: tabular-nums; caret-color: var(--teal); transition: border-color 0.1s, background 0.1s, box-shadow 0.1s; }
.powgrid .gq:hover:not(:disabled) { border-color: var(--line-2); background: var(--white); }
.powgrid .gq:focus { position: relative; z-index: 1; outline: none; background: var(--white); border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.16); }
.powgrid .gq.has { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-2); font-weight: 700; }
.powgrid .gq.chg { border-color: var(--sun); box-shadow: inset 0 -2px 0 var(--sun); }
.powgrid .gq.chg:focus { box-shadow: inset 0 -2px 0 var(--sun), 0 0 0 3px rgba(14, 90, 84, 0.16); }
.powgrid .gq:disabled { background: transparent; color: var(--ink-3); }
.powgrid td.insel { background: rgba(14, 90, 84, 0.1); }
.powgrid td.insel .gq { border-color: var(--teal); }
.powgrid th.hl { background: var(--teal-50); color: var(--teal); }
.powgrid td.off { background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--paper-2) 5px 6px); }
/* the block selected: a dark floating bar to set or clear it */
.gsel { position: absolute; z-index: 9; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--sh3); font-size: var(--fs-xs); white-space: nowrap; animation: pop 0.14s var(--ease); }
.gsel .gsel-n { margin-right: 4px; font-weight: 650; }
.gsel .input.sm { width: 70px; height: 30px; text-align: center; font-weight: 650; }
.gsel .btn.ghost, .gsel .iconbtn { color: #fff; }
.gsel .btn.ghost:hover, .gsel .iconbtn:hover { background: rgba(255, 255, 255, 0.14); }
/* blanks: a tile per base curve */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); padding: var(--s4) var(--s5); }
.btile { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.btile.has { background: var(--teal-50); border-color: var(--teal-100); }
.btile .bt-b { font-weight: 650; font-variant-numeric: tabular-nums; }
.btile .gq { grid-column: 1 / -1; width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: center; font: 650 var(--fs-lg) / 1 var(--sans); font-variant-numeric: tabular-nums; }
.btile .gq:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.16); }
.lbar .lb-tx { align-items: baseline; }
.lbar .lb-n { font: 700 var(--fs-xl) / 1 var(--display); letter-spacing: -0.015em; }
.lbar .lb-m { margin-left: var(--s2); font-size: var(--fs-lg); font-weight: 700; color: var(--teal-2); }
.lbar .btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  /* a phone: one card per SPH row, each power labelled with its CYL; nothing scrolls sideways */
  .lt-hint { display: none; }
  .pg-wrap { max-height: none; overflow: visible; }
  .pg-chunks { display: block; }
  .pg-chunks > table.powgrid { min-width: 0; margin-bottom: var(--s4); }
  table.powgrid, .powgrid tbody, .powgrid thead { display: block; width: 100%; }
  .powgrid colgroup, .powgrid thead tr.cyls { display: none; }
  .powgrid thead tr.cap { display: block; }
  .powgrid thead tr.cap th { display: flex; align-items: baseline; position: static; height: auto; padding: 10px var(--s4); }
  .powgrid .cap-n { margin-left: auto; float: none; }
  .powgrid tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; padding: 12px var(--s4) 14px; border-bottom: 1px solid var(--line); }
  .powgrid tbody th.rh { position: static; grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; width: auto; height: auto; padding: 0; border: 0; background: none; text-align: left; font-size: var(--fs-md); color: var(--ink); }
  .powgrid tbody th.rh::before { content: "SPH "; color: var(--ink-3); font-weight: 500; font-size: var(--fs-xs); margin-right: 4px; }
  .powgrid tbody th.rh::after { content: attr(data-dia); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); margin-left: auto; }
  .powgrid td { display: flex; flex-direction: column; gap: 3px; height: auto; padding: 0; border: 0; }
  .powgrid td::before { content: attr(data-cl); font-size: 10.5px; color: var(--ink-3); text-align: center; }
  .powgrid td.off { display: none; }
  .powgrid .gq { height: 42px; max-height: none; font-size: 16px; border-color: var(--line); background: var(--white); }
  .gsel { display: none !important; }
}

/* ---------- the prescription order sheet (round 26): one store, one card per patient, sent together ---------- */
/* shared: a power field with its sign and steps, the axis, a piece counter, small chips */
.pw { display: flex; align-items: stretch; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; overflow: hidden; transition: border-color 0.12s, box-shadow 0.12s; }
.pw:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.16); }
.pw.dis { background: var(--paper); }
.pw-sign { width: 30px; flex: none; border: 0; border-right: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 700 17px / 1 var(--sans); cursor: pointer; transition: background 0.1s, color 0.1s; }
.pw-sign:hover:not(:disabled) { background: var(--teal-50); color: var(--teal); }
.pw-sign.fixed { display: grid; place-items: center; cursor: default; color: var(--ink-3); }
.pw-in { flex: 1; min-width: 0; width: 100%; border: 0; padding: 0 4px; background: transparent; text-align: center; font: 650 16px / 1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.pw-in:focus { outline: none; }
.pw-in::placeholder { color: var(--ink-4); font-weight: 500; }
.pw-step { display: flex; flex-direction: column; width: 22px; flex: none; border-left: 1px solid var(--line); }
.pw-step button { flex: 1; border: 0; background: #fff; color: var(--ink-3); font-size: 10px; line-height: 1; cursor: pointer; padding: 0; }
.pw-step button + button { border-top: 1px solid var(--line); }
.pw-step button:hover:not(:disabled) { background: var(--teal-50); color: var(--teal); }
.ax { display: flex; align-items: center; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; padding-right: 10px; transition: border-color 0.12s, box-shadow 0.12s; }
.ax:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.16); }
.ax-in { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; text-align: center; font: 650 16px / 1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.ax-in:focus { outline: none; }
.ax-in:disabled { color: var(--ink-4); }
.ax span { color: var(--ink-3); }
.qs { display: flex; align-items: center; justify-content: space-between; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
.qs button { width: 32px; height: 100%; border: 0; background: none; font: 600 18px / 1 var(--sans); color: var(--ink-2); cursor: pointer; }
.qs button:hover:not(:disabled) { color: var(--teal); }
.qs button:disabled { color: var(--ink-4); cursor: default; }
.qs b { font: 700 var(--fs-md) / 1 var(--sans); font-variant-numeric: tabular-nums; }
.fchip { height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); font: 600 var(--fs-xs) / 1 var(--sans); color: var(--ink-2); cursor: pointer; }
.fchip:hover { border-color: var(--ink-4); color: var(--ink); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip.sm { height: 24px; padding: 0 9px; }
.qnotes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.req { color: var(--red); }
.help.err { color: var(--red); font-weight: 600; }
.affix-btn { display: flex; gap: 6px; }
.affix-btn .input { flex: 1; min-width: 0; }
.re-b { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; font: 700 var(--fs-sm) / 1 var(--sans); }
.re-b.sm { display: inline-grid; width: 22px; height: 22px; border-radius: 6px; font-size: var(--fs-xs); vertical-align: middle; margin-right: 6px; }
.se-src, .srcb { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 650 var(--fs-2xs) / 1 var(--sans); background: var(--teal-50); color: var(--teal); white-space: nowrap; }
.se-src.stock, .srcb.stock { background: var(--ok-50); color: var(--ok); }
.srcb svg { width: 12px; height: 12px; }
.pw-v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rs-rows { margin: 0; padding: 4px var(--s5); display: grid; gap: 6px; }
.rs-rows > div { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); }
.rs-rows dt { color: var(--ink-3); }
.rs-rows dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.rs-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px var(--s5) 0; padding: 12px 0; border-top: 1px solid var(--line); }
.rs-total span { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.rs-total b { font: 700 var(--fs-2xl) / 1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* the sheet: who and where */
.page.rxpage { max-width: 1260px; }
.rxo-top { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); margin-bottom: var(--s3); }
.rxo-top:empty { display: none; }
.rxo-mem { display: flex; align-items: center; gap: var(--s3); }
.rxo-mem .lbl { margin: 0; }
.rxo-mem .select { max-width: 380px; }
.rxo-store { display: grid; grid-template-columns: auto minmax(240px, max-content) minmax(0, 1fr); align-items: center; gap: 4px var(--s4); }
.rxo-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-50); color: var(--teal); }
.rxo-ic svg { width: 20px; height: 20px; }
.rxo-sf .lbl { margin-bottom: 4px; }
.rxo-sf .row { gap: 8px; flex-wrap: nowrap; }
.rxo-sf .select { min-width: 240px; font-weight: 650; }
.rxo-fixed { min-width: 240px; padding: 8px 0 9px; font-size: 15px; } /* round 35: a store login delivers to its own store */
.rxo-sd { display: flex; flex-wrap: wrap; align-self: end; gap: 2px 16px; padding-bottom: 9px; color: var(--ink-2); }
.rxo-note { grid-column: 2 / -1; }
/* one patient */
.rxo { display: grid; gap: var(--s3); }
.rxo > .panel + .panel { margin-top: 0; }
.rxp { padding: 0; transition: box-shadow 0.15s; }
.rxp.bad { box-shadow: 0 0 0 1px rgba(184, 54, 30, 0.45), var(--sh-panel); }
.rxp-h { display: grid; grid-template-columns: 30px minmax(180px, 1.5fr) minmax(170px, 1.1fr) 96px 96px auto; align-items: end; gap: 10px var(--s3); padding: 14px var(--s5) 12px; }
.rxp-h .field + .field { margin-top: 0; }
.rxp-h .lbl { margin-bottom: 4px; }
.rxp-h .field.bad .input { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.rxp-n { width: 28px; height: 28px; margin-bottom: 6px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font: 700 var(--fs-sm) / 1 var(--sans); font-variant-numeric: tabular-nums; }
.rxp-acts { display: flex; gap: 2px; margin-bottom: 4px; }
.rxp-acts .iconbtn svg { width: 16px; height: 16px; }
.rxl { display: grid; grid-template-columns: repeat(4, minmax(104px, 150px)) minmax(0, 1fr); align-items: end; gap: 10px; padding: 12px var(--s5); background: #fafaf7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rxl.bad { background: #fff7f4; }
.rxl-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rxl-f > span { font: 650 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.rxl-f .select { width: 100%; font-weight: 600; }
.rxl-pick { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 0; padding-bottom: 3px; text-align: right; }
.rxl-pick > b { font-size: var(--fs-sm); }
.rxl-pick > span { font-size: var(--fs-xs); color: var(--ink-3); }
.rxl-pick .rxl-p { font-size: var(--fs-md); color: var(--teal-2); }
.rxe { padding: 4px var(--s5) 2px; }
.rxe-r { display: grid; grid-template-columns: 56px minmax(118px, 1fr) minmax(118px, 1fr) 92px 52px 100px minmax(104px, 0.8fr) 56px; align-items: center; gap: 4px 10px; padding: 7px 0; }
.rxe.has-add .rxe-r { grid-template-columns: 56px minmax(118px, 1fr) minmax(118px, 1fr) 92px minmax(108px, 0.9fr) 100px minmax(104px, 0.8fr) 56px; }
.rxe-r + .rxe-r:not(.rxe-head) { border-top: 1px dashed var(--line); }
.rxe-head { padding: 6px 0 2px; font: 650 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.rxe-eye b { width: 38px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; font: 700 var(--fs-xs) / 1 var(--sans); letter-spacing: 0.04em; }
.rxe-r[data-eye="L"] .rxe-eye b { background: var(--teal); }
.rxe-eye small { display: none; }
.rxe-c { min-width: 0; }
.rxe-na { display: block; color: var(--ink-4); text-align: center; }
.rxe-skip { display: inline-flex; align-items: center; justify-self: end; gap: 5px; font-size: var(--fs-xs); color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.rxe-msg { grid-column: 2 / -1; font-size: var(--fs-xs); color: var(--teal-2); }
.rxe-msg:empty { display: none; }
.rxe-msg.err { color: var(--red); font-weight: 600; }
.rxe-r.skip > .rxe-c { opacity: 0.4; }
.rxe-r.bad .pw, .rxe-r.bad .ax { border-color: var(--red); }
.rxp-x { display: flex; align-items: flex-start; gap: var(--s3); padding: 6px var(--s5) 14px; }
.rxp-x > .btn { flex: none; margin-top: 2px; }
.rxp-x .btn svg { width: 14px; height: 14px; }
/* Round 50: a patient's frame on the order sheet (Lenses only | Lenses + frame; from my stock or from the catalogue). */
.rxf { padding: 10px var(--s5) 12px; border-top: 1px solid var(--line); }
.rxf.on { background: #fbfbf8; }
.rxf.bad { background: #fff7f4; }
.rxf-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--s3); }
/* 11-27: Fitting (edge and mount) on a patient with a frame. */
.rxf-fit { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); cursor: pointer; }
.rxf-fit input { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; }
.rxf-fit svg { width: 15px; height: 15px; color: var(--teal); }
/* 11-27: the patient's own frame, described. */
.rxf-pat { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.rxf-pat-row { display: flex; gap: var(--s2); align-items: center; }
.rxf-pat-row .input { flex: 1; min-width: 0; }
.rxf-pat p { margin: 0; }
.rxf-l { font: 650 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); min-width: 52px; }
.rxf .seg button svg { width: 15px; height: 15px; }
.rxf-sel { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); margin-top: 10px; padding: 8px 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); }
.rxf-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rxf-tx b { font-size: var(--fs-sm); }
.rxf-tx small { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.rxf-tx small svg { width: 14px; height: 14px; flex: none; }
.rxf-other { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 0; background: none; border: 0; color: var(--teal-2); cursor: pointer; font-size: var(--fs-xs); }
.rxf-other svg { width: 14px; height: 14px; }
.rxf-pr { font-weight: 700; font-size: var(--fs-sm); color: var(--teal-2); white-space: nowrap; }
.rxf-pk { margin-top: 10px; }
.rxf-tabs { margin-bottom: 8px; }
.rxf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.rxf-tools .search { flex: 1 1 200px; max-width: 320px; }
.rxf-tools .select { width: auto; max-width: 220px; }
.rxf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; overscroll-behavior: contain; padding: 2px; }
.rxf-it { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 6px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); cursor: pointer; font: inherit; color: inherit; }
.rxf-it:hover:not([disabled]) { border-color: var(--teal); }
.rxf-it.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.rxf-it[disabled] { opacity: 0.5; cursor: not-allowed; }
.rxf-it-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rxf-it-tx b, .rxf-it-tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rxf-it-tx b { font-size: var(--fs-sm); }
.rxf-it-tx small { font-size: var(--fs-xs); color: var(--ink-3); }
.rxf-it-tx small.err { color: var(--red); }
.rxf-th { width: 48px; height: 32px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--paper-2); }
.rxf-sel .rxf-th { width: 56px; height: 38px; }
.rxf-th img { width: 100%; height: 100%; object-fit: contain; }
.rxf-ph svg { width: 22px; height: 22px; color: var(--ink-3); }
.rxf-style .rxf-sh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: var(--fs-sm); }
.rxf-style .rxf-sh .btn svg { width: 14px; height: 14px; }
.rxf-style p { margin: 6px 0 0; }
.rxf-empty { padding: 10px 2px; }
.rxf-msg:empty { display: none; }
.rxf-msg { margin-top: 6px; }
.rr-lens small.rr-frame { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
/* Round 50: a branch's staff (body.staff-ro): read-only where it only reads (members), no Rx settings or routing. */
.staff-ro #newbtn, .staff-ro #create, .staff-ro #aedit, .staff-ro .dacts, .staff-ro #maddwh, .staff-ro #maddstore, .staff-ro #storelist button,
.staff-noorder #newpo, .staff-noorder #newlo,
.staff-ro #setbtn, .staff-ro #pibtn, .staff-ro #makers, .staff-ro #routesel, .staff-ro label:has(> #routesel), .staff-ro .field:has(> #a_lab) { display: none !important; }
/* Round 50: a branch's staff: its branch under the admin menu. */
.aside-branch { display: flex; align-items: center; gap: 8px; margin: 6px 10px 0; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); color: #fff; font: 600 var(--fs-xs) / 1.2 var(--sans); }
.aside-branch svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
html.aside-min .aside-branch span { display: none; }
.lr-frame { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.lr-frame.catalogue { background: #eef3f8; color: #2f5576; }
.lr-frame svg { width: 13px; height: 13px; }
.lj-frame .rxf-sel { margin-top: 6px; }
.nframe .lbl { display: inline-flex; align-items: center; gap: 5px; }
.nframe .lbl svg, .ns-f p svg { width: 14px; height: 14px; vertical-align: -2px; }
.rr-lens small.rr-frame svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 720px) {
  .rxf-sel { grid-template-columns: 48px minmax(0, 1fr); }
  .rxf-sel .rxf-pr, .rxf-sel .btn { grid-column: 2; justify-self: start; }
  .rxf-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
.rxp-notes { flex: 1; min-width: 0; margin: 0; }
.rxp-f { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 12px var(--s5); border-top: 1px solid var(--line); background: #fafaf7; border-radius: 0 0 var(--rp) var(--rp); }
.rxp-route { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-sm); }
.rxp-route > svg { width: 18px; height: 18px; flex: none; }
.rxp-route > span { display: flex; flex-direction: column; min-width: 0; }
.rxp-route small { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.4; }
.rxp-route.lab > svg { color: var(--teal); }
.rxp-route.stock > svg, .rxp-route.stock b { color: var(--ok); }
.rxp-route.err { color: var(--red); font-weight: 600; }
.rxp-route.wait { color: var(--ink-3); }
.rxp-route .btn { flex: none; margin-left: 6px; }
.rxp-tot { display: flex; flex-direction: column; align-items: flex-end; flex: none; gap: 2px; }
.rxp-tot b { font: 700 var(--fs-lg) / 1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rxp-tot small { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rxadd { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px var(--s5); border: 1.5px dashed var(--line-2); border-radius: var(--rp); background: transparent; color: var(--ink-2); text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.rxadd:hover { border-color: var(--teal); background: var(--teal-50); color: var(--teal-2); }
.rxadd > svg { width: 20px; height: 20px; flex: none; }
.rxadd > span { display: flex; flex-direction: column; gap: 2px; }
.rxadd small { font-size: var(--fs-xs); color: var(--ink-3); }
/* what the sheet sends: a dark bar that stays at the bottom */
.rxbar { position: sticky; bottom: 14px; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s4); padding: 10px 10px 10px var(--s5); background: rgba(23, 22, 15, 0.95); color: #fff; border-radius: 16px; box-shadow: var(--sh3); }
.rb-tx { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.rb-n { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.rb-n b { margin-right: 3px; font-size: var(--fs-lg); color: #fff; font-variant-numeric: tabular-nums; }
.rb-m { font: 700 var(--fs-xl) / 1 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rxbar .rb-s { color: rgba(255, 255, 255, 0.6); }
.rxbar .chgtx { color: var(--sun); }
.rb-act { display: flex; align-items: center; gap: 8px; flex: none; }
.rxbar .btn.rb-go { height: 44px; padding: 0 20px; background: #fff; border-color: #fff; color: var(--ink); font-size: var(--fs-md); }
.rxbar .btn.rb-go:hover { background: var(--teal-50); }
.rxbar .btn.rb-go svg { width: 17px; height: 17px; }
.rxbar .btn.ghost { color: #fff; }
.rxbar .btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }
/* round 31: the sheet's tools, its lines shown as rows, stock lines, the import dialog */
.lm-more { display: flex; align-items: center; gap: 6px; padding: 10px var(--s4) 12px; }
.lm-more svg { width: 14px; height: 14px; flex: none; }
.rxtools { display: flex; align-items: end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s3); border-top: 1px solid var(--line); }
.rxtools .rxbatch { margin: 0; min-width: 240px; flex: 0 1 340px; }
.rxtools .rxbatch .lbl { margin-bottom: 4px; }
.rxtools .btn svg, .rxi-src .btn svg { width: 14px; height: 14px; }
.rxtag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; font: 650 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.rxtag svg { width: 12px; height: 12px; }
.rxtag.stock { background: var(--teal); }
.rxrow { display: grid; grid-template-columns: 30px 96px minmax(120px, 1fr) minmax(140px, 1.2fr) minmax(200px, 1.6fr) minmax(130px, 1fr) auto; align-items: center; gap: 4px var(--s3); padding: 10px var(--s5); background: var(--white); border-radius: var(--rp); box-shadow: var(--sh-panel); cursor: pointer; transition: box-shadow 0.15s; }
.rxrow:hover, .rxrow:focus-visible { box-shadow: 0 0 0 1px var(--teal), var(--sh-panel); outline: none; }
.rxrow.bad { box-shadow: 0 0 0 1px rgba(184, 54, 30, 0.45), var(--sh-panel); }
.rxrow .rxp-n { margin: 0; }
.rr-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rr-tag small { font-size: var(--fs-2xs); }
.rr-who, .rr-lens { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-sm); }
.rr-who b, .rr-lens { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-who small, .rr-lens small { font-size: var(--fs-xs); }
.rr-rx { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-xs); }
.rr-rx .rr-e { display: inline-block; width: 14px; color: var(--ink-3); }
.rr-st { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; text-align: right; font-size: var(--fs-sm); }
.rr-st .err { color: var(--red); font-weight: 600; font-size: var(--fs-xs); }
.rr-acts { display: flex; align-items: center; gap: 2px; }
.rr-acts .iconbtn svg { width: 15px; height: 15px; }
.rxadds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.rxtofix { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 10px var(--s5); border-radius: var(--rp); background: #fff7f4; color: var(--red); font-size: var(--fs-sm); }
.rxtofix > span { display: flex; align-items: center; gap: 8px; }
.rxtofix svg { width: 16px; height: 16px; }
.rxsl-h { grid-template-columns: 30px minmax(0, 1fr) 110px auto; }
.rxsl-t { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 4px; }
.rxsl-t small { font-size: var(--fs-xs); line-height: 1.4; }
.rxe-stock .rxe-r, .rxe-stock.has-add .rxe-r { grid-template-columns: 56px minmax(118px, 1fr) minmax(118px, 1fr) minmax(108px, 0.9fr) minmax(0, 1.3fr); }
.rxsl-hint { text-align: right; }
.rxsl-hint a { display: inline-flex; align-items: center; gap: 5px; }
.rxsl-hint svg { width: 14px; height: 14px; }
dialog.dlg.rxidlg { width: min(860px, calc(100vw - 32px)); }
.rxi-src { gap: var(--s2); align-items: center; }
.rxi-paste { font: var(--fs-xs) / 1.5 var(--mono); }
.rxi-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.rxi-head .field { margin: 0; }
.rxi-map summary { padding: 6px 0; cursor: pointer; }
.rxi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px var(--s3); max-height: 300px; margin-top: var(--s2); padding-right: 4px; overflow: auto; }
.rxi-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.rxi-f .select { width: 100%; }
.rxi-sum { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ok-50); }
.rxi-sum.warn { background: #fff7f4; }
.rxi-sum > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rxi-sum ul { margin: 4px 0 4px 16px; padding: 0; color: var(--red); }
@media (max-width: 1100px) { .rxrow { grid-template-columns: 30px 90px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; } }
@media (max-width: 760px) {
  .rxrow { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 10px var(--s4); }
  .rxrow .rr-tag { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; gap: 8px; }
  .rxrow .rr-acts { grid-column: 3; grid-row: 1; }
  .rxrow .rr-who, .rxrow .rr-lens, .rxrow .rr-rx, .rxrow .rr-st { grid-column: 2 / -1; align-items: flex-start; text-align: left; }
  .rxadds, .rxi-head, .rxi-grid { grid-template-columns: minmax(0, 1fr); }
  .rxsl-h { grid-template-columns: 1fr 1fr; }
  .rxsl-t { grid-column: 1 / -1; }
  .rxe-stock .rxe-r, .rxe-stock.has-add .rxe-r { grid-template-columns: 1fr 1fr; }
  .rxsl-hint { grid-column: 1 / -1; text-align: left; }
}
/* sent */
.rxsent { padding: var(--s5); }
.rxs-h { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.rxs-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ok-50); color: var(--ok); }
.rxs-ic svg { width: 22px; height: 22px; }
.rxs-a { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
@media (max-width: 1100px) {
  .rxp-h { grid-template-columns: 30px minmax(0, 1.4fr) minmax(0, 1fr) 84px 84px auto; }
  .rxl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rxl-pick { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; text-align: left; }
  .rxe-r, .rxe.has-add .rxe-r { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 80px 44px 92px minmax(84px, 0.8fr) 50px; gap: 4px 8px; }
  .rxe.has-add .rxe-r { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 80px minmax(0, 1fr) 92px minmax(84px, 0.8fr) 50px; }
}
@media (max-width: 760px) {
  .rxo-top, .rxp-h, .rxl, .rxe, .rxp-x, .rxp-f { padding-left: var(--s4); padding-right: var(--s4); }
  .rxo-store { grid-template-columns: 1fr; }
  .rxo-ic { display: none; }
  .rxo-sf .select { min-width: 0; flex: 1; }
  .rxo-sd { padding-bottom: 0; }
  .rxo-note { grid-column: 1; }
  .rxp-h { grid-template-columns: 1fr 1fr; }
  .rxp-n { grid-column: 1; margin: 0; }
  .rxp-acts { grid-column: 2; grid-row: 1; justify-self: end; }
  .rxp-name, .rxp-ref { grid-column: 1 / -1; }
  .rxl { grid-template-columns: 1fr 1fr; }
  .rxe-head { display: none; }
  .rxe-r, .rxe.has-add .rxe-r { grid-template-columns: 1fr 1fr; align-items: start; gap: 10px 10px; padding: 12px 0; }
  .rxe-na { text-align: left; padding: 11px 0 0 4px; }
  .rxe-eye, .rxe-skip { grid-row: 1; }
  .rxe-skip { grid-column: 2; }
  .rxe-c::before { content: attr(data-l); display: block; margin-bottom: 4px; font: 650 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  .rxe-msg { grid-column: 1 / -1; }
  .rxp-x { flex-direction: column; }
  .rxp-f { flex-direction: column; align-items: stretch; }
  .rxp-route { flex-wrap: wrap; }
  .rxp-tot { align-items: flex-start; }
  body.has-tabbar .rxbar { bottom: 62px; }
  .rxbar { flex-direction: column; align-items: stretch; padding: 12px; gap: 10px; }
  .rxbar .btn.rb-go { width: 100%; justify-content: center; }
}

/* ---------- a job, for the store ---------- */
.rxsteps { margin: 0; }
.rxsteps li { min-width: 0; }
.alert.warnbox { background: var(--warn-50); color: var(--warn); }
.lpage .alert { margin-bottom: var(--s4); }
.lpage .alert > span svg { width: 18px; height: 18px; }
.lpage .alert p { margin: 4px 0 0; color: var(--ink-2); }
.lpage .alert .btn { margin-top: 10px; }
.rxjob { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s4); align-items: start; }
.rxjob-main, .rxjob-side { display: grid; gap: var(--s4); min-width: 0; }
.rxjob-main > .panel + .panel, .rxjob-side > .panel + .panel { margin-top: 0; }
.rxeyetbl td, .rxeyetbl th { white-space: nowrap; }
.rxcheck { padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); }
.rxcheck .label { margin-bottom: 6px; }
.rxcheck ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 900px) { .rxjob { grid-template-columns: 1fr; } }

/* orders: orders and prescription jobs */
.otabs { margin-bottom: var(--s4); }
.otabs button { height: 34px; padding: 0 14px; font-size: var(--fs-sm); }
.otabs button svg { width: 15px; height: 15px; }
.otabs .n { color: var(--ink-3); font-weight: 600; }

/* a store's lens stock */
.stockpick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); padding: 6px var(--s4); margin-bottom: var(--s3); }
.stockpick .field { display: flex; align-items: center; gap: var(--s3); margin: 0; }
.stockpick .field + .field { margin-top: 0; }
.stockpick .lbl { margin: 0; font-weight: 650; }
.stockpick .select { max-width: 360px; }
.gridbox.stockbox { padding: 12px; }
.stockgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.stockgrid > .panel + .panel { margin-top: 0; }
.scard { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5); color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.scard:hover { border-color: var(--ink-4); box-shadow: var(--sh2); text-decoration: none; color: inherit; }
.sc-n { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.sc-n b { font: 700 var(--fs-2xl) / 1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sc-n span { color: var(--ink-3); font-size: var(--fs-sm); }
b.neg { color: var(--red); }
b.pos { color: var(--ok); }

/* ---------- the Rx lab (admin) ---------- */
.labkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.labkpis > .panel + .panel { margin-top: 0; }
.labkpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-width: 0; padding: 8px var(--s4); text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.labkpi:hover { border-color: var(--ink-4); }
.labkpi.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.labkpi b { order: -1; font: 700 var(--fs-xl) / 1.2 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.labkpi small { flex-basis: 100%; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.labsplit { display: grid; grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr); gap: var(--s4); align-items: start; }
.labsplit > .panel + .panel { margin-top: 0; }
.lablist-h { display: grid; gap: var(--s2); padding: var(--s3) var(--s3); border-bottom: 1px solid var(--line); }
.labq { display: flex; flex-wrap: wrap; gap: 4px; }
.labq button { height: 26px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: 600 var(--fs-xs) / 1 var(--sans); color: var(--ink-2); cursor: pointer; }
.labq button:hover { border-color: var(--ink-4); }
.labq button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.labq .n { margin-left: 2px; padding: 1px 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.labq button.on .n { background: rgba(255, 255, 255, 0.18); color: #fff; }
.labrows { list-style: none; margin: 0; padding: 6px; max-height: calc(100vh - 300px); overflow: auto; scrollbar-width: thin; }
.labrow { display: grid; gap: 4px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.labrow:hover { background: var(--paper); }
/* round 31: the queue by batch and kind; ticks for one step on many jobs */
.labfilt { gap: 6px; }
.labfilt .select { max-width: 100%; }
.labbulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); padding: 8px var(--s4); border-bottom: 1px solid var(--line); background: #fafaf7; }
.labbulk .btn svg { width: 14px; height: 14px; }
.labskip { flex-basis: 100%; padding: 8px 10px; border-radius: 8px; background: #fff7f4; color: var(--red); }
.labskip ul { margin: 4px 0 0 16px; padding: 0; }
.labrows.picks > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; }
.lrpick { display: grid; place-items: center; padding-top: 12px; cursor: pointer; }
.labrow .rxtag { vertical-align: 1px; }
.labrow.on { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal); }
.lr-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.lr-top b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-mid { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-bot { display: flex; justify-content: space-between; gap: var(--s2); }
.lr-bot .pw-v { overflow: hidden; text-overflow: ellipsis; }
.labjob { position: sticky; top: var(--s4); max-height: calc(100vh - var(--s5)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.labjob-empty { display: grid; place-items: center; min-height: 260px; color: var(--ink-3); }
.lj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); padding: var(--s5) var(--s5) var(--s3); }
.lj-name { margin: 2px 0 6px; font: 700 var(--fs-2xl) / 1.15 var(--display); letter-spacing: -0.02em; }
.lj-total { display: flex; flex-direction: column; align-items: flex-end; }
.lj-total small { font-size: var(--fs-xs); color: var(--ink-3); }
.lj-total b { font: 700 var(--fs-xl) / 1.1 var(--display); font-variant-numeric: tabular-nums; }
.ltrack { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 var(--s5) var(--s4); padding: 0; }
.ltrack li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--fs-2xs); color: var(--ink-4); text-align: center; }
.ltrack li i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.ltrack li::before { content: ""; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.ltrack li:first-child::before { display: none; }
.ltrack li.done { color: var(--teal); }
.ltrack li.done i { background: var(--teal); border-color: var(--teal); }
.ltrack li.done::before, .ltrack li.on::before { background: var(--teal); }
.ltrack li.on { color: var(--ink); font-weight: 700; }
.ltrack li.on i { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 4px rgba(23, 22, 15, 0.1); }
.ltrack small { color: var(--ink-3); font-weight: 400; }
/* Round 47: what passed between VRA and the partner lab, on a job. */
.lj-lablog { margin: 0 var(--s5) var(--s3); font-size: var(--fs-sm); }
.lj-lablog summary { cursor: pointer; color: var(--ink-3); font-weight: 600; }
.lj-lablog ul { margin: var(--s2) 0 0; padding-left: 18px; display: grid; gap: 4px; }
.lj-lablog li.bad { color: var(--red, #b3261e); }
.lj-check { display: flex; gap: 10px; margin: 0 var(--s5) var(--s3); padding: 12px 14px; border-radius: 10px; background: var(--warn-50); color: var(--ink-2); font-size: var(--fs-sm); }
.lj-check > span { color: var(--warn); }
.lj-check > span svg { width: 18px; height: 18px; }
.lj-check.stock { background: var(--ok-50); }
.lj-check.stock > span { color: var(--ok); }
.lj-check b { color: var(--ink); }
.lj-check ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.lj-check p { margin: 4px 0 0; }
.nstep { margin: 0 var(--s5) var(--s3); padding: 16px; border: 1px solid var(--teal-100); border-radius: 12px; background: linear-gradient(180deg, var(--teal-50), #fff 80%); }
.nstep.wait { border-color: var(--line-2); background: var(--paper); }
.nstep.ok { border-color: #cfe3d6; background: var(--ok-50); }
.ns-h { display: flex; gap: 12px; }
.ns-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--teal); color: #fff; }
.nstep.wait .ns-ic { background: var(--ink-3); }
.nstep.ok .ns-ic { background: var(--ok); }
.ns-ic svg { width: 18px; height: 18px; }
.ns-h > div { display: flex; flex-direction: column; gap: 2px; }
.ns-h b { font-size: var(--fs-md); }
.ns-h small { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.ns-f { margin-top: var(--s3); display: grid; gap: var(--s3); }
.ns-f .field + .field { margin-top: 0; }
.ns-a { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.ns-a .btn svg { width: 15px; height: 15px; }
.bases { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); }
.bsel { display: flex; align-items: center; gap: 8px; }
.bsel .input { width: 90px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.issue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.lj-more { display: flex; align-items: center; gap: var(--s2); margin: 0 var(--s5) var(--s3); }
.lj-more .select.sm { width: auto; margin-left: 6px; }
.lj-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.lj-sec { padding: var(--s4) var(--s5); min-width: 0; }
.lj-grid .lj-sec + .lj-sec { border-left: 1px solid var(--line); }
.lj-sec > .label:first-child { margin-bottom: var(--s3); font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.lj-docs, .lj-grid + .lj-sec { border-top: 1px solid var(--line); }
.lj-docs .btn svg { width: 15px; height: 15px; }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1280px) { .labsplit { grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.3fr); } .lj-grid { grid-template-columns: 1fr; } .lj-grid .lj-sec + .lj-sec { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 1000px) { .labsplit { grid-template-columns: 1fr; } .labjob { position: static; max-height: none; } .labkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ltrack { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; } }
/* admin: a prescription line in the editor */
.rxbox { display: grid; gap: var(--s3); }
.rxbox .fgrid + .fgrid, .rxbox .field + .fgrid { margin-top: 0; }
.erx { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
@media (max-width: 720px) {
  /* the order bar sits above the phone's tab bar, on one line */
  body.has-tabbar .lbar { bottom: 52px; }
  .lbar { padding: 10px var(--s4); gap: var(--s2); flex-wrap: nowrap; }
  .lbar .lb-tx .faint { display: none; }
  .lbar .lb-n { font-size: var(--fs-lg); }
  .lbar .btn.sec { display: none; }
}

/* ---------- round 26: a lens line is one screen: the line on the left (switch, price, full specification), the grid on the right ---------- */
.page.lpage.wide { max-width: 1760px; padding: var(--s3) var(--s4) var(--s4); }
.lws { display: grid; grid-template-columns: clamp(236px, 17vw, 300px) minmax(0, 1fr); gap: var(--s3); align-items: stretch; }
.lws.fitted { min-height: 0; }
.lws.fitted .lrail { overflow: auto; overscroll-behavior: contain; }
.lws.fitted .lmain { min-height: 0; }
.lrail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; padding: var(--s4) var(--s4) var(--s5); background: var(--white); border: 1px solid var(--line); border-radius: var(--rp); box-shadow: var(--sh-panel); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.lr-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lr-head .lr-kind { align-self: stretch; }
.lr-back { display: inline-flex; align-items: center; gap: 4px; width: max-content; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); }
.lr-back:hover { color: var(--teal); text-decoration: none; }
.lr-back svg { width: 14px; height: 14px; }
.lr-kind { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.lr-title { font: 700 21px / 1.2 var(--display); letter-spacing: -0.02em; }
.lr-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
.lr-price b { font: 700 var(--fs-2xl) / 1 var(--display); color: var(--teal-2); letter-spacing: -0.02em; }
.lr-price span { font-size: var(--fs-xs); color: var(--ink-3); }
.lr-sw { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 2px; border-top: 1px solid var(--line); }
.lsw-l { font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); margin-bottom: 7px; }
.lsw-o { display: flex; flex-wrap: wrap; gap: 6px; }
.lswc { min-height: 30px; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); color: var(--ink-2); font: 600 var(--fs-sm) / 1.15 var(--sans); text-align: left; cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s, box-shadow 0.12s; }
.lswc:hover { border-color: var(--teal); color: var(--teal-2); background: var(--teal-50); }
.lswc:focus-visible { outline: none; box-shadow: var(--focus); }
.lswc.on, .lswc:disabled.on { background: var(--ink); border-color: var(--ink); color: #fff; cursor: default; opacity: 1; }
.lswc.near { border-style: dashed; color: var(--ink-3); }
.lr-specs { padding-top: 16px; border-top: 1px solid var(--line); }
.lr-h { font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); margin-bottom: 4px; }
.lr-spec { display: grid; margin: 0; }
.lr-spec > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.lr-spec > div:last-child { border-bottom: 0; }
.lr-spec dt { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.lr-spec dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); line-height: 1.4; font-variant-numeric: tabular-nums; }
.lr-desc { margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.55; }
.lmain.panel { display: flex; flex-direction: column; min-width: 0; margin: 0; overflow: hidden; }
.lm-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: var(--s4); min-height: 50px; padding: 8px 10px 8px var(--s4); border-bottom: 1px solid var(--line); background: var(--white); }
.lm-bar .lt-hint { position: relative; color: var(--ink-3); }
.lm-bar .lt-hint:hover, .lm-bar .lt-hint:focus-visible { color: var(--teal); outline: none; }
.lm-bar .lt-hint svg { width: 16px; height: 16px; }
.lm-bar .lt-hint:hover::after, .lm-bar .lt-hint:focus-visible::after { content: attr(data-hint); position: absolute; top: calc(100% + 8px); left: -12px; z-index: 20; width: 300px; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: #fff; font: 500 var(--fs-xs) / 1.5 var(--sans); box-shadow: var(--sh3); white-space: normal; }
.lm-tools { display: flex; align-items: center; flex: none; gap: 8px; white-space: nowrap; }
.lm-tools .input.sm { width: 64px; text-align: center; }
.lm-tools .lt-hint { margin-left: 6px; }
.lm-ro { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.lm-ro svg { width: 16px; height: 16px; color: var(--teal); flex: none; }
.lm-bar .lbar { position: static; display: flex; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: var(--s3); margin-left: auto; padding: 0; background: none; border: 0; border-radius: 0; }
.lm-bar .lbar .lb-tx { display: flex; align-items: baseline; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; gap: 6px; white-space: nowrap; }
.lm-bar .lbar .lb-u { font-size: var(--fs-sm); color: var(--ink-3); }
.lm-bar .lbar .lb-m { margin-left: 4px; }
.lm-bar .lbar .lb-s { min-width: 0; margin-right: 6px; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-xs); }
.lm-bar .lb-act { display: flex; flex: none; align-items: center; gap: 8px; }
.lmain .gridbox { flex: 1; min-height: 0; padding: 10px var(--s3); }
.lws.fitted .lmain .gridbox .pg-wrap { height: 100%; }
.lmain .gridbox.blanks { overflow: auto; padding: 0; }
@media (max-width: 999px) {
  .page.lpage.wide { padding: var(--s4) var(--s3) var(--s6); }
  .lws { grid-template-columns: 1fr; }
  .lr-sw { padding-bottom: 0; }
  .lm-bar .lbar { position: sticky; bottom: 0; }
}
@media (max-width: 720px) {
  /* a phone: the grid first, then the order bar held at the bottom of the screen (above the tab bar) */
  .lmain.panel { overflow: visible; }
  .lmain .gridbox { order: 1; padding: 0; }
  .lm-bar { order: 2; position: sticky; bottom: 0; z-index: 6; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 0; border-radius: 0 0 var(--rp) var(--rp); box-shadow: 0 -6px 18px rgba(23, 22, 15, 0.08); }
  body.has-tabbar .lm-bar { bottom: 52px; }
  .lm-tools { display: none; }
  .lm-bar .lbar { width: 100%; justify-content: space-between; }
  .lm-bar .lbar .lb-s { display: none; }
}
/* the Rx lab: other finished jobs for the same store go on the same delivery note */
.dnwith { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.dnwith label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: var(--fs-sm); cursor: pointer; }
.dnwith label:hover { border-color: var(--teal-100); background: var(--teal-50); }
.dnwith .pw-v { margin-left: auto; }
.ii { display: inline-flex; align-items: center; gap: 5px; }
.ii svg { width: 14px; height: 14px; flex: none; }
.rxfilter { display: flex; align-items: center; gap: var(--s2); padding: 12px var(--s5); border-bottom: 1px solid var(--line); }
.rxfilter .select { width: auto; min-width: 200px; }
/* profile: a member's stores (round 26) */
.store-card .st-acts, .addr-card .st-acts { gap: 4px; margin-top: 8px; }
.store-card .st-acts .btn svg { width: 14px; height: 14px; }
.store-edit { background: #fff; border-color: var(--teal-100); box-shadow: 0 0 0 3px var(--teal-50); grid-column: 1 / -1; }
.store-edit .fgrid + .fgrid { margin-top: 0; }
.st-gone { margin-top: var(--s3); }
.st-gone summary { cursor: pointer; width: max-content; }

/* ---------- Round 27: lens lines in four words, ADD grids, prescription price bands ---------- */
.esub { margin-top: var(--s3); display: grid; gap: var(--s2); }
.esub .egrid td { padding: 3px 6px; }
.esub .egrid .affix { max-width: 150px; }
.esub > .row { align-items: flex-end; gap: var(--s3); flex-wrap: wrap; }
.epowered { margin-left: auto; min-width: 200px; }
.eadd { margin-top: var(--s2); grid-template-columns: repeat(2, minmax(0, 170px)); }
.eadd[hidden] { display: none; }
@media (min-width: 700px) { .gridbox.addgrid .pg-chunks > table.powgrid { min-width: calc(58px + var(--pg-cols, 9) * 40px); } }

/* ---------- Round 28: store logins, a store's bulk-order permission, the member's approval ---------- */
/* Profile → Stores and Admin → Members: a store card grows its bulk permission and its logins. */
#storelist .addr-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.store-card.is-archived { background: #f6f6f3; }
.st-bulk { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.st-bulk .select { width: auto; max-width: 100%; }
.st-logins { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.st-logins ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.st-login { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s2); align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.st-lw { display: grid; min-width: 0; }
.st-le { overflow-wrap: anywhere; }
.st-ls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.st-la { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.st-login .st-lform, .st-logins > .st-lform { grid-column: 1 / -1; margin-top: 6px; padding: 10px; border: 1px solid var(--teal-100); border-radius: 9px; background: #fff; box-shadow: 0 0 0 3px var(--teal-50); }
.st-lform .fgrid + .field { margin-top: var(--s2); }
/* My orders: the stores' orders waiting for the member */
.apprv { border-color: #f0d9a8; }
.apprv .panel-head { background: #fdf8ec; }
/* An order of a store: where it goes, who placed it, the member's approval */
.ostore { display: grid; gap: 6px; }
.ostore .ii b { font-weight: 600; }
.apnote { margin-top: var(--s3); padding: 10px 12px; border-radius: 9px; background: #fdf3f1; border: 1px solid #f1cfc8; font-size: var(--fs-sm); }
.apnote b { display: block; margin-bottom: 2px; }
.bulkbar { display: flex; align-items: flex-start; gap: var(--s3); padding: 12px var(--s4); margin-bottom: var(--s4); border: 1px solid #f0d9a8; border-radius: 12px; background: #fdf8ec; font-size: var(--fs-sm); }
.bulkbar svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #9a6a12; }
.bulkbar b { display: block; }
@media (max-width: 640px) {
  #storelist .addr-list { grid-template-columns: minmax(0, 1fr); }
  .st-login { grid-template-columns: minmax(0, 1fr); }
  .st-ls { justify-content: flex-start; }
}
/* Lens stock (round 28): count, sold or received in the same grid; the stock as a CSV file */
.lorder-h .seg { flex: none; }
.stockio { padding: 6px var(--s4); margin-bottom: var(--s3); }
.stockio > .row { gap: var(--s2); align-items: center; }
.stockio label.btn { cursor: pointer; }
.csverr { margin: 6px 0 0; padding-left: 18px; max-height: 260px; overflow: auto; font-size: var(--fs-sm); display: grid; gap: 2px; }
#lbar #mnote { width: 240px; max-width: 40vw; }
@media (max-width: 640px) { #lbar #mnote { width: 100%; max-width: none; } }
.lorder-h { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
/* Products → Lenses (round 28): the coatings a prescription line is made in, each with what it adds per piece */
.ecoats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px var(--s3); }
.ecoat { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.ecoat.on { border-color: var(--teal-100); background: var(--teal-50); }
.ecoat .affix { max-width: 110px; flex: none; }
.ecoat .check { margin: 0; }
/* Rx order sheet (round 28): what the patient's coating adds per piece */
.rxl-c { color: var(--ink-2); font-size: var(--fs-xs); }

/* Round 29: purchase orders and VRA's branches. */
.callout { border: 1px solid var(--line); background: var(--teal-50); border-radius: var(--rp); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.input.xs { height: 30px; padding: 4px 8px; font-size: var(--fs-sm); }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.brlist { display: grid; gap: var(--s3); }
.brcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--rp); background: var(--paper, #fff); }
.brcard.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.brcard.is-archived { opacity: 0.7; }
.brcard .br-facts { display: flex; flex-wrap: wrap; gap: 4px var(--s3); font-size: var(--fs-xs); color: var(--ink-3); }
/* Round 50: a branch's staff logins under its card; the default branch in the head. */
.brcard-r { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s2) var(--s3); }
.brstaff { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.brstaff-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); margin-bottom: 6px; }
.brstaff .tbl td.act .btn + .btn { margin-left: 4px; }
.brstaff .ok { color: var(--teal-2); font-weight: 600; }
.brdef { gap: 6px; color: var(--ink-3); }
.brdef .select { width: auto; }

/* Round 30: Lens stock — the stock is the wide column; a table wider than its panel scrolls inside it. */
.labsplit.stockfirst { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .labsplit.stockfirst { grid-template-columns: 1fr; } }
.tscroll { overflow-x: auto; max-width: 100%; }
.labgrp .tbl td, .labgrp .tbl th { white-space: nowrap; }

/* Round 32: a member's inventory (/stock): places as chips, totals as tiles, tabs; frames by style with their colourways;
   quantities typed in a count, a sale, a write-off or a receipt with the bar of the lens grids (.lbar); what comes in;
   transfers. */
.invpage .neg { color: var(--red); }
.invpage .pos { color: var(--ok); }
.invps { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; margin-bottom: var(--s3); scrollbar-width: thin; }
.invp { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 150px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--white); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--sh1); }
.invp b { font-size: var(--fs-md); font-weight: 650; white-space: nowrap; }
.invp small { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.invp:hover { border-color: var(--line-2); }
.invp.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; background: var(--teal-50); }
.invp.on small { color: var(--teal-2); }
.invts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.invt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-width: 0; padding: 8px var(--s4); background: var(--white); border: 1px solid var(--line); border-radius: var(--rp); box-shadow: var(--sh-panel); }
.invt-k { font: 600 var(--fs-xs) / 1.3 var(--sans); color: var(--ink-3); }
.invt b { order: -1; font: 700 var(--fs-xl) / 1.2 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.invt small { flex-basis: 100%; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invt.act { cursor: pointer; }
.invt.act:hover { border-color: var(--teal); }
.invt.act b { color: var(--teal-2); }
.invtabs { margin-bottom: var(--s3); overflow-x: auto; scrollbar-width: none; }
.invtabs .seg button { height: 32px; padding: 0 14px; font-size: var(--fs-sm); white-space: nowrap; }
.invn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: var(--fs-2xs); }
.invpanel { overflow: visible; }
.invtools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: 12px var(--s5); border-bottom: 1px solid var(--line); }
.invsp { flex: 1; }
.invq { width: 260px; max-width: 100%; }
.invhint { margin: var(--s3) var(--s5) 0; }
.invhint svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.invsum { padding: 10px var(--s5) 4px; }
.invpad { padding: var(--s3) var(--s5); }
.invs { border-bottom: 1px solid var(--line); }
.invs:last-of-type { border-bottom: 0; }
.invs-h { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s5) 6px; }
.invs-h img, .invs-ph { width: 64px; height: 32px; object-fit: contain; flex: none; border-radius: 4px; background: var(--paper); display: grid; place-items: center; color: var(--ink-4); }
.invs-ph svg { width: 18px; height: 18px; }
.invs-t { flex: 1; min-width: 0; }
.invs-t b { font-size: var(--fs-md); }
.invs-t span { font-size: var(--fs-sm); color: var(--ink-2); }
.invs-t small { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.invs-n { display: flex; flex-direction: column; align-items: flex-end; }
.invs-n b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.invs-n small { font-size: var(--fs-xs); color: var(--ink-3); }
.invs-c { padding: 0 var(--s5) 10px calc(var(--s5) + 64px + var(--s3)); }
.invc { display: flex; align-items: center; gap: var(--s3); min-height: 38px; padding: 4px 0; border-top: 1px dashed var(--line); }
.invs-c .invc:first-child { border-top: 0; }
#cmplist .invc, .invpanel > #invlist > .invc { padding: 4px var(--s5); }
.invc-code { min-width: 54px; font-weight: 700; color: var(--red); font-size: var(--fs-sm); }
.invc-name { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.invc-r { margin-left: auto; display: flex; align-items: center; }
.invq-n { font-size: var(--fs-md); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }
.invat { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-xs); color: var(--ink-3); }
.invat b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.invin { display: inline-flex; align-items: center; gap: 6px; }
.invin .input { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.invin small { font-size: var(--fs-2xs); color: var(--ink-4); min-width: 44px; }
.invin.ch .input { border-color: var(--teal); background: var(--teal-50); box-shadow: 0 0 0 1px var(--teal) inset; }
.invadd { display: flex; align-items: center; gap: var(--s2); margin: var(--s3) var(--s5) 0; padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: var(--r2); background: var(--paper); }
.invadd svg { width: 16px; height: 16px; color: var(--teal); }
.invadd .input { flex: 1; border: 0; background: transparent; box-shadow: none; }
.invpad .invadd { margin: var(--s3) 0 0; }
.invsub { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--s5) 6px; border-top: 1px solid var(--line); }
.invsub b { font-size: var(--fs-md); }
.invsub small { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.invl { display: flex; align-items: center; gap: var(--s4); padding: 10px var(--s5); border-top: 1px dashed var(--line); color: inherit; text-decoration: none; }
a.invl:hover { background: var(--paper); }
.invl-t { flex: 1; min-width: 0; }
.invl-t .lc-chips { margin-top: 4px; }
.invl-n { display: flex; flex-direction: column; align-items: flex-end; min-width: 70px; }
.invl-n b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.invl-n small { font-size: var(--fs-xs); color: var(--ink-3); }
.invbar { border-radius: 0 0 var(--rp) var(--rp); }
.invbar-a .input { width: 180px; }
.invi { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 14px var(--s5); border-top: 1px solid var(--line); }
.invi:first-of-type { border-top: 0; }
.invi-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-50); color: var(--teal); }
.invi-ic svg { width: 18px; height: 18px; }
.invi-t b { font-size: var(--fs-md); }
.invi-t small { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.invi-w { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.invi-w .badge svg { width: 13px; height: 13px; }
.invi-f { margin-top: var(--s3); }
.invi-f .input { width: 200px; }
.invthumb { width: 56px; height: 28px; object-fit: contain; display: grid; place-items: center; color: var(--ink-4); border-radius: 4px; background: var(--paper); }
.invthumb svg { width: 16px; height: 16px; }
.invrec { width: 76px; text-align: right; }
.invrect td { vertical-align: middle; }
.invtr tr.click { cursor: pointer; }
.invtr svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--ink-4); }
.panel-head .label svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--ink-4); }
.invroute { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: var(--s3); }
.invroute .field + .field { margin-top: 0; }
.invroute-a { padding-bottom: 9px; color: var(--ink-4); }
.invroute-a svg { width: 18px; height: 18px; }
.invhist td { vertical-align: top; }
.invhist .nowrap { white-space: nowrap; }
@media (max-width: 900px) {
  .invts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invs-c { padding-left: var(--s5); }
  .invq { width: 100%; }
}
@media (max-width: 560px) {
  .invt b { font-size: var(--fs-xl); }
  .invc { flex-wrap: wrap; }
  .invc-name { flex-basis: 40%; }
  .invi { grid-template-columns: 1fr; }
  .invi-ic { display: none; }
  .invroute { grid-template-columns: 1fr; }
  .invroute-a { display: none; }
  .invbar-a .input { width: 100%; }
}
.labfilt { flex-wrap: nowrap; gap: var(--s2); }
.labfilt .select { flex: 1 1 0; min-width: 0; width: auto; }
/* Quantity boxes: the browser's up/down arrows sit right against a right-aligned number; give the number room. */
.qrow input[type="number"]::-webkit-inner-spin-button, .qty-in::-webkit-inner-spin-button, .pcard .qa input[type="number"]::-webkit-inner-spin-button { margin-left: 8px; }
/* Round 34: a store's stock grid. The panel's head and grid get their padding back, and the page scrolls with the
   pointer over the grid (.pg-wrap is a scroll container that kept the wheel for itself even with nothing to scroll). */
.lorder > .lorder-h { align-items: center; padding: 10px var(--s4); border-bottom: 1px solid var(--line); }
.lorder > .lorder-h p { margin: 2px 0 0; max-width: 860px; }
.stockbox { padding: 10px var(--s3); }
.stockbox .pg-wrap { overscroll-behavior: auto; max-height: none; }

/* ==== Round 34: storefront filters (list page) ==== */
/* Six cards a row (1440 px, Comfortable): "Details" becomes its arrow so the wearer, shape and size line stays whole
   (the whole card opens the details too; the link keeps its name for screen readers). */
.pcard { container-type: inline-size; }
@container (max-width: 236px) { .pcard .det { font-size: 0; gap: 0; } .pcard .det svg { width: 12px; height: 12px; } }
/* Round 37: the filters are a sidebar (.fside, below); the toolbar has the view switch, the count, sort and card size.
   On a phone the sidebar is a bottom sheet opened by the "Filters" button. */
.ftoolbar { flex-wrap: nowrap; }
.ftoolbar > * { flex: none; }
.ftoolbar .count { white-space: nowrap; }
.fbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); color: var(--ink-2); font: 600 var(--fs-xs) / 1 var(--sans); white-space: nowrap; cursor: pointer; box-shadow: var(--sh1); transition: border-color 0.12s, background 0.12s, color 0.12s; }
.fbtn:hover, .fbtn[aria-expanded="true"] { border-color: var(--ink-4); color: var(--ink); }
.fbtn.on { border-color: rgba(14, 90, 84, 0.45); background: var(--teal-50); color: var(--teal-2); }
.fbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.fbtn .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 10px / 18px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
/* A list of its own already has its name on the button: the heading stays only to carry "Clear". */
.fopt { display: flex; align-items: center; gap: var(--s2); min-height: 30px; padding: 3px 8px; border-radius: var(--r2); font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.fopt:hover, .fopt:focus-within { background: var(--paper); color: var(--ink); }
.fopt:has(input:checked) { color: var(--ink); font-weight: 600; }
.fopt input { flex: none; margin: 0; accent-color: var(--teal); }
.fopt .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fopt .n { flex: none; min-width: 2.4em; text-align: right; font: 500 var(--fs-2xs) / 1 var(--sans); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.fopt.zero { opacity: 0.45; }
.fhead, .fsheet-f, .ftoggle { display: none; }
@media (max-width: 900px) {
  .ftoolbar { gap: var(--s2); }
  .ftoggle { display: inline-flex; }
  .ftoolbar .count { margin-left: auto; }
  .sfbar { position: fixed; z-index: 120; left: 0; right: 0; bottom: 0; max-height: 86vh; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-radius: 16px 16px 0 0; box-shadow: var(--sh3); transform: translateY(105%); visibility: hidden; transition: transform 0.22s var(--ease), visibility 0s 0.22s; }
  .catalog.filters-open .sfbar { transform: none; visibility: visible; transition: transform 0.22s var(--ease); }
  .filters-scrim { position: fixed; inset: 0; z-index: 110; background: rgba(23, 22, 15, 0.35); animation: fade 0.18s var(--ease); }
  .fhead { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px var(--s3) 10px var(--s4); border-bottom: 1px solid var(--line); }
  .fsheet-b { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--s2) var(--s2) var(--s3); }
  .fsheet-b .fopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
  .fsheet-b .fopt { min-height: 38px; font-size: var(--fs-md); }
  .fsheet-b .fopt input { width: 18px; height: 18px; }
  .fsheet-f { flex: none; display: flex; gap: var(--s2); padding: 10px var(--s3) calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fafaf8; }
  .fsheet-f .btn { flex: 1; }
  .fsheet-f .btn.sec { flex: 0 0 auto; }
}

/* ==== Round 34: order page (member and admin composer) ==== */
/* Phones: the lines table fits the screen (no sideways scroll), the head's order number, date and reference wrap as whole pieces. */
#ostatus { flex-wrap: wrap; gap: 2px var(--s2); }
#ostatus > span { white-space: nowrap; }
@media (max-width: 720px) {
  #lines { width: 100%; }
  #lines th, #lines td { padding-left: 6px; padding-right: 6px; }
  #lines th:first-child, #lines td:first-child { padding-left: var(--s3); }
  #lines tr > :last-child:not(.hide-sm), #lines tr > :nth-last-child(2):has(+ .hide-sm) { padding-right: var(--s3); }
  #lines td.num { white-space: nowrap; }
  #lines .cell-col { gap: 8px; align-items: center; }
  #lines .cell-col .tile.thumb { width: 44px; height: 30px; flex: none; }
  #lines .cell-col > span:last-child { min-width: 0; line-height: 1.3; }
  #lines .qty-in { width: 64px; padding: 0 6px; }
  #lines tr.group td { padding-left: var(--s3); padding-right: var(--s3); }
}
/* A compact right column: at 1366×768 the summary with Submit, the customer and the start of Delivery & details show
   without scrolling. Explanations sit behind the info button of each card's head (.odc-info, the page head's pattern). */
.osplit > .odside { gap: var(--s3); }
.osplit > .odside > .odc, .osplit > .odside > .panel-pad { padding: 14px var(--s4) var(--s4); }
.odc-h { position: relative; justify-content: flex-start; flex-wrap: wrap; gap: 4px var(--s2); margin-bottom: var(--s2); min-height: 22px; }
.odc-h .label { font-size: var(--fs-md); font-weight: 650; color: var(--ink); letter-spacing: -0.005em; }
.odc-info { position: static; }
.odc-info > p { left: 0; right: 0; top: calc(100% + 4px); width: auto; }
/* "Saving…" / "Saved" / what went wrong with Retry, beside the title of a section that saves by itself. */
.od-savestate { color: var(--ink-3); }
.od-savestate:empty { display: none; }
.od-savestate[data-state="saved"] { color: var(--ok); }
.od-savestate[data-state="error"] { color: var(--red); }
.od-savestate .link { font-weight: 600; text-decoration: underline; }
/* Summary: the counts as one row of figures, the total, the main action, the smaller ones on one row. */
.sumfig { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); }
.sumfig > div { display: flex; flex-direction: column; min-width: 0; }
.sumfig b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; line-height: 1.3; }
.sumfig span { font-size: var(--fs-xs); color: var(--ink-3); }
.sumfig + .sumfig { margin-top: var(--s2); }
.odside .sumcard .r.t { margin-top: var(--s2); padding: var(--s2) 0 0; }
.odside .sumcard .ostore, .odside .sumcard > p { margin-top: var(--s2); }
.odside .actcard .acts, .compose .sumcard .acts { margin-top: var(--s3); }
.acts-more { display: flex; flex-wrap: wrap; gap: var(--s2); }
.acts-more .btn { flex: 1 1 auto; }
.acts-more .btn.ghost { flex: 0 0 auto; margin-left: auto; }
/* Customer: contact on one line, billing right under it. */
.odside .odc-kv { margin-top: 4px; padding-top: 0; border-top: 0; grid-template-columns: 52px minmax(0, 1fr); }
/* The form: a little tighter than a page form. */
.odside .odc .field + .field, .odside .odc .fgrid + .field, .odside .odc .field + .fgrid, .odside .odc .fgrid + .fgrid, .odside .odc .field + p { margin-top: 10px; }
.odside .odc .fgrid > .field { margin-top: 0; }
.odside .odc .field > .lbl { margin-bottom: 3px; }
/* An email moves to the next line whole rather than breaking at its hyphen. */
.odc-contact span { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.odc-contact .sep { font-style: normal; color: var(--ink-4); }
/* The save state shows on Customer only while its fields are open (Delivery & details always shows it). */
#customer:has(#cust-form[hidden]) .od-savestate { display: none; }
.odside .odc textarea { min-height: 52px; }
/* A locked order's details: label and value lines, no disabled form. */
.odc-sum { display: grid; grid-template-columns: minmax(76px, max-content) minmax(0, 1fr); gap: 5px var(--s3); margin: 0; font-size: var(--fs-sm); }
.odc-sum dt { color: var(--ink-3); }
.odc-sum dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.odc-locknote { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); }
.ostep-card:has(> .ostep:not(.rxsteps)) { padding: var(--s3) var(--s5); margin-bottom: var(--s3); }
/* Order breakdown: a <details>, always open on a wide screen (its head is not a button there), folded on a phone. */
.obd > summary { list-style: none; }
.obd > summary::-webkit-details-marker { display: none; }
@media (min-width: 901px) { .obd > summary { pointer-events: none; } }
@media (max-width: 900px) {
  .obd > summary { cursor: pointer; }
  .obd > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.15s var(--ease); }
  .obd[open] > summary::after { transform: rotate(-135deg); }
  .obd:not([open]) > summary { border-bottom: 0; }
  .osplit { gap: var(--s3); }
}
/* The status tracker on a phone: one strip of dots, only the current step named (its date is in the page head). */
@media (max-width: 720px) {
  .ostep-card:has(> .ostep:not(.rxsteps)) { padding: 10px var(--s3); }
  .ostep-card .ostep:not(.rxsteps) { display: flex; align-items: center; gap: 0; }
  .ostep-card .ostep:not(.rxsteps) li { flex: 1 1 0; flex-direction: row; align-items: center; gap: 6px; padding-right: 0; min-width: 0; }
  .ostep-card .ostep:not(.rxsteps) li::after { display: block; position: static; flex: 1 1 0; min-width: 4px; height: 2px; margin-right: 6px; }
  .ostep-card .ostep:not(.rxsteps) li:last-child { flex: none; }
  .ostep-card .ostep:not(.rxsteps) li:last-child::after { display: none; }
  .ostep-card .ostep:not(.rxsteps) li i { flex: none; width: 20px; height: 20px; font-size: 10px; }
  .ostep-card .ostep:not(.rxsteps) li span { display: none; }
  .ostep-card .ostep:not(.rxsteps) li[aria-current] { flex: 0 1 auto; }
  .ostep-card .ostep:not(.rxsteps) li[aria-current]:not(:last-child) { flex: 1 1 auto; }
  .ostep-card .ostep:not(.rxsteps) li[aria-current] span { display: block; font-size: var(--fs-sm); white-space: nowrap; }
  .ostep-card .ostep:not(.rxsteps) li[aria-current] small { display: none; }
  .ostep-card .ostep:not(.rxsteps) li.on i { box-shadow: none; }
}

/* Member stock: what is on hand beside the tabs (the figure tiles are gone). */
.invtabs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.invfig { display: flex; flex-wrap: wrap; gap: 2px var(--s4); font-size: var(--fs-sm); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.invfig b { color: var(--ink); font-weight: 700; font-size: var(--fs-md); }
.invfig-n { color: var(--warn); font-weight: 600; }
/* ==== Round 34: admin pages ==== */
.dhead h2.nm { font-family: var(--display); letter-spacing: -0.015em; }
/* Rx lab: the stages are one row that scrolls sideways (ten of them, most often empty). */
#queues { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
#queues button { flex: none; }
/* The admin menu folded to icons (html.aside-min, remembered per browser). */
.aside .brand-mark { display: none; }
.aside-fold { display: flex; align-items: center; gap: 10px; height: 30px; margin-top: var(--s1); padding: 0 var(--s3); border: 0; border-radius: var(--r2); background: none; color: var(--ink-3); font: 500 var(--fs-sm) / 1 var(--sans); cursor: pointer; }
.aside-fold:hover { background: var(--paper); color: var(--ink); }
.aside-fold svg { width: 14px; height: 14px; flex: none; transition: transform 0.15s var(--ease); }
.aside nav.aux + .aside-fold + .who { margin-top: var(--s2); }
@media (min-width: 901px) {
  html.aside-min { --aside: 56px; }
  html.aside-min .aside { padding-left: 6px; padding-right: 6px; align-items: stretch; }
  html.aside-min .aside .brand { align-items: center; padding: 0 0 var(--s3); }
  html.aside-min .aside .brand-full, html.aside-min .aside .brand-sub .label, html.aside-min .aside .who, html.aside-min .aside-fold span { display: none; }
  html.aside-min .aside .brand-mark { display: block; height: 28px; }
  html.aside-min .aside .rolepill { padding: 0 7px; gap: 0; font-size: 0; }
  html.aside-min .aside nav a { justify-content: center; padding: 0; gap: 0; font-size: 0; }
  html.aside-min .aside nav a svg { width: 18px; height: 18px; }
  html.aside-min .aside-fold { justify-content: center; padding: 0; margin-bottom: var(--s2); }
  html.aside-min .aside-fold svg { transform: rotate(180deg); }
}
@media (max-width: 900px) { .aside-fold { display: none; } }
/* Product page: a colourway is one short row (photo, code, SKU, name, family, listed); the photo opens full size. */
.cwrow3 { grid-template-columns: 132px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) 0; }
.cwrow3 .cwinfo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: end; }
.cwrow3 .cwhead { order: 2; padding: 0 0 7px; margin: 0; border: 0; }
.cwrow3 .cwhead .cc, .cwrow3 .cwhead .spacer { display: none; }
.cwrow3 .cwdl dt { white-space: nowrap; }
.cwrow3 .cwdl { grid-template-columns: 78px 92px minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: end; }
.cwrow3 .cwdl dd.mono { height: 32px; display: flex; align-items: center; padding: 0; }
.cwrow3 .cwdl .input { height: 32px; }
@media (max-width: 900px) { .cwrow3 { grid-template-columns: 96px minmax(0, 1fr); } .cwrow3 .cwdl { grid-template-columns: 1fr 1fr; } }
/* One inset per panel: sections inside a padded panel body take its padding, not their own on top of it. */
.panel-body > .dsec { padding-left: 0; padding-right: 0; }
.panel-body > .dsec:first-child { padding-top: 0; }
.panel-body > .dsec:last-child { padding-bottom: 0; }
/* Counting and ordering forms in the purchasing, stock and lab panels: short rows of small fields. */
.labsplit .form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { height: 32px; font-size: var(--fs-sm); }
.labsplit .form textarea { font-size: var(--fs-sm); min-height: 56px; }
.labsplit .form .fgrid { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s2) var(--s3); }
.labsplit .form .fgrid > .field:first-child { grid-column: span 2; }
.labsplit .form .field { margin-top: var(--s2); }
.labsplit .form .lbl { font-size: var(--fs-xs); margin-bottom: 3px; }
.labsplit .tbl.compact .input { height: 28px; }
/* Stage chips: a stage with nothing in it has no count, so ten stages fit two rows. */
.labq button { height: 24px; padding: 0 8px; font-size: var(--fs-2xs); }
.labq button:not(.on):not(:has(.n)) { color: var(--ink-3); border-color: var(--line); }
/* Round 35: Bulk order → powers made to order (no patient), above the lens cards. */
.lmto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin: 0 0 var(--s4); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--rp); background: var(--white); font-size: 13px; color: var(--ink-2); }
.lmto > span { display: inline-flex; align-items: center; gap: 8px; }
.lmto > span svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
/* Round 36: Admin → Products → Lenses → Prescription options, one row per index · type · colour · coating. */
#grid.rxview { display: block; }
.rxopts td { vertical-align: middle; }
.rxopts .ctl { margin: 0; padding: 0; border: 0; }
.rxopts .ctl > .label { display: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 650; color: var(--teal); cursor: pointer; text-align: left; }
.linkbtn:hover { text-decoration: underline; }

/* ==== Round 37: storefront Frames: the filters as a sidebar left of the grid; two views (All styles / By collection) ==== */
@media (min-width: 901px) {
  .catalog { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0 var(--s5); align-items: start; }
  .fside { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; min-width: 0; }
  .fside .fsheet-b { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 6px; }
}
.fside-h { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 700 var(--fs-md) / 1.2 var(--sans); color: var(--ink); }
.fside .fgroup { border-bottom: 1px solid var(--line); }
.fside .fgroup > summary { display: flex; align-items: center; gap: 8px; padding: 11px 2px; list-style: none; cursor: pointer; font: 650 var(--fs-sm) / 1.2 var(--sans); color: var(--ink); border-radius: var(--r2); }
.fside .fgroup > summary::-webkit-details-marker { display: none; }
.fside .fgroup > summary:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.fside .fgroup > summary .ft { flex: 1; }
.fside .fgroup > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 3px 2px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.15s var(--ease); }
.fside .fgroup[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.fside .fgroup > summary .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 10px / 18px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.fside .fgroup .fopts { padding: 0 0 10px; }
.fside .fopt { padding: 3px 4px; min-height: 30px; }
.fside .fopt.zero { cursor: default; }
.fsearch { padding: 0 0 6px; }
.fsearch .input { width: 100%; }
.fcoll .cno { flex: none; min-width: 44px; justify-content: center; }
.fcoll:has(input:checked) .t { color: var(--ink); }
.fmore { display: inline-block; margin: 4px 4px 0; }
.fnone { padding: 6px 4px; color: var(--ink-3); font-size: var(--fs-xs); }
.frange { display: flex; align-items: center; gap: 6px; padding: 0 4px 12px; }
.frange .input { width: 0; flex: 1; min-width: 0; }
.ftoolbar .count { margin-right: auto; }
.vswitch a { height: 28px; padding: 0 11px; border-radius: 6px; display: inline-flex; align-items: center; font: 600 var(--fs-xs) / 1 var(--sans); color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.vswitch a:hover { color: var(--ink); }
.vswitch a.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1); }
.chead { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3); padding: 12px var(--s4); background: var(--white); border: 1px solid var(--line); border-radius: var(--r3); }
.chead[hidden] { display: none; }
.chead-cv { flex: none; width: 112px; height: 64px; border-radius: var(--r2); overflow: hidden; background: var(--paper); display: grid; place-items: center; }
.chead-cv img { width: 100%; height: 100%; object-fit: contain; }
.chead-cv .ph { font: 700 var(--fs-lg) / 1 var(--display); color: var(--ink-4); }
.chead-tx { flex: 1; min-width: 0; }
.chead-tx h1 { margin: 2px 0; }
.chead-tx p { max-width: 70ch; }
.chead-pr { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.chead-pr b { font-size: var(--fs-lg); color: var(--teal-2); }
.cviewbar .input { width: 260px; }
.cview-tip { margin: -4px 0 var(--s3); }
/* Round 40: tick collections on "By collection", then view their frames together. */
.ccwrap { position: relative; display: flex; }
.ccwrap > .ccard { flex: 1; }
.ccwrap.picked > .ccard { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), var(--sh-panel); }
.cpick { position: absolute; top: var(--s3); left: var(--s3); z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); box-shadow: var(--sh-panel); cursor: pointer; }
.cpick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cpick span { display: grid; place-items: center; color: transparent; }
.cpick svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.cpick:hover { border-color: var(--ink-3); }
.cpick:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.ccwrap.picked .cpick { background: var(--teal); border-color: var(--teal); }
.ccwrap.picked .cpick span { color: #fff; }
.cpickbar { position: fixed; left: 50%; bottom: var(--s4); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: var(--s4); width: min(640px, calc(100% - 32px)); padding: 10px 10px 10px var(--s4); background: var(--white); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--sh3); }
.cpickbar .cp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cpickbar .cp-tx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.has-pickbar .page { padding-bottom: 96px; }
@media (max-width: 720px) { body.has-tabbar .cpickbar { bottom: calc(52px + var(--s3)); } .cpickbar { gap: var(--s3); } }
@media (max-width: 900px) {
  .ftoolbar .count { margin-right: 0; }
  .fsheet-b .fgroup > summary { display: flex; align-items: center; gap: 8px; padding: 10px 6px; list-style: none; font: 650 var(--fs-md) / 1.2 var(--sans); color: var(--ink); }
  .fsheet-b .fgroup > summary::-webkit-details-marker { display: none; }
  .fsheet-b .fgroup > summary .ft { flex: 1; }
  .fsheet-b .fgroup > summary .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 10px / 18px var(--sans); text-align: center; }
  .fsheet-b .fcoll { grid-column: 1 / -1; }
  .chead { padding: 10px var(--s3); gap: var(--s3); }
  .chead-cv { width: 72px; height: 44px; }
  .chead-tx p { display: none; }
}
@media (max-width: 720px) {
  /* The view switch is a row of its own above Filters, the count and sort. */
  .ftoolbar { flex-wrap: wrap; }
  .ftoolbar > .vswitch { order: -1; flex: 1 1 100%; display: flex; }
  .vswitch a { flex: 1; justify-content: center; }
  .cviewbar { flex-wrap: wrap; }
  .cviewbar .input { width: 100%; }
}

/* ==== Round 38: Pricing → Frames, Lenses, Prescription: one row per collection or lens, a price box per tier ==== */
.ptable .panel-head { align-items: flex-end; gap: var(--s3); }
.ptable #pq { width: 220px; }
.pedit td { vertical-align: middle; }
.pedit th { vertical-align: bottom; }
.pedit .pname { min-width: 220px; }
.pedit .affix { width: 108px; }
.pedit td.is-set .affix { border-color: rgba(14, 90, 84, 0.55); box-shadow: inset 3px 0 0 var(--teal); }
.pedit tr.dirty td.pname { box-shadow: inset 3px 0 0 var(--warn); }
.pedit tr.bad td.pname { box-shadow: inset 3px 0 0 var(--red); }
.pedit tr.hit { background: var(--teal-50); }
.pedit .rxx { min-width: 190px; line-height: 1.55; }
.pfoot { padding: 0 var(--s4) var(--s3); }
.pbar { position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); padding: 10px var(--s4); background: var(--ink); color: #fff; border-radius: var(--r3); box-shadow: var(--sh3); font-size: var(--fs-sm); }
.pbar[hidden] { display: none; }
.pbar .btn.ghost { color: #fff; }
.scoats { display: grid; gap: 6px; }
.scoat { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); }
.scoat .affix { width: 130px; }
@media (max-width: 720px) { .ptable .panel-head { flex-wrap: wrap; } .ptable #pq { width: 100%; } }

/* ==== Round 39: Admin → Inventory, frames and lenses as two categories, the branch a filter ==== */
.invtools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-bottom: var(--s2); }
.invtools #q { width: 260px; }
.invsec { margin-bottom: var(--s3); }
.invsec > .panel-head { gap: var(--s3); justify-content: flex-start; }
.invtbl { width: 100%; }
.invtbl td.num, .invtbl th.num { width: 110px; }
.invtbl .input.num { width: 84px; }
.invtbl tr.group td { background: var(--paper); font-weight: 650; font-size: var(--fs-sm); }
.invtbl tr.low td { background: var(--warn-50); }
.warn-t { color: var(--warn, #a15c00); }
td.pos { color: var(--ok); }
td.neg { color: var(--red); }
.brpanel { max-width: 860px; }
#sbar .input { width: 240px; color: var(--ink); }
@media (max-width: 720px) { .invtools #q { width: 100%; } #sbar { flex-wrap: wrap; } #sbar .input { width: 100%; } }
/* Round 39: a member's Manage area: its tabs, the overview's figures, two columns of panels. */
.mtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 var(--s4); padding: 3px; background: var(--paper-2); border-radius: var(--r2); width: max-content; max-width: 100%; }
.mtabs a { height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 6px; font: 600 var(--fs-sm) / 1 var(--sans); color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.mtabs a:hover { color: var(--ink); }
.mtabs a.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1); }
.mfigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.mfig { display: flex; flex-direction: column; gap: 2px; padding: 14px var(--s4); background: var(--white); border: 1px solid var(--line); border-radius: var(--r3); color: var(--ink); text-decoration: none; }
a.mfig:hover { border-color: var(--ink-4); }
.mfig b { font: 700 var(--fs-xl) / 1.1 var(--display); }
.mfig span { font-size: var(--fs-sm); color: var(--ink-2); }
.mfig small { font-size: var(--fs-xs); color: var(--ink-4); }
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.mgrid > .mwide { grid-column: 1 / -1; }
.mrep-head { margin: var(--s6) 0 var(--s3); }
.mrep-head h2 { margin: 0 var(--s2) 0 0; }
@media (max-width: 900px) { .mgrid { grid-template-columns: minmax(0, 1fr); } .mtabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; } }
/* Round 39: a stock slip prints alone. */
@media print { body * { visibility: hidden; } .slipdoc, .slipdoc * { visibility: visible; } .slipdoc { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; } }

/* ---- Round 40 (round D): the storefront's edit mode (admins) ---- */
.is-editing .pcard .qa { display: none; }
.pcard { position: relative; }
.pcard .pedit { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: var(--sh1); cursor: pointer; }
.pcard .pedit svg { width: 16px; height: 16px; }
.pcard .pedit:hover, .pcard .pedit:focus-visible { background: var(--ink); color: #fff; border-color: var(--ink); }
.pcard .eflags { position: absolute; top: 46px; right: 8px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
.pcard .eflags .badge { box-shadow: var(--sh1); }
.pcard.editable .ptop .vw { display: none; }
.pcard.unlisted .pic, .pcard.unlisted .bd { opacity: 0.55; }
.pcard.on-edit { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), var(--sh-panel); }
.edrawer { --edw: min(620px, 100vw); position: fixed; top: 0; right: 0; bottom: 0; z-index: 110; width: var(--edw); display: flex; flex-direction: column; background: var(--paper, #f6f5f1); border-left: 1px solid var(--line); box-shadow: var(--sh3); animation: edin 0.18s var(--ease); }
@keyframes edin { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.edrawer .ed-h { display: flex; align-items: center; gap: var(--s3); height: 52px; padding: 0 var(--s3) 0 var(--s4); background: var(--white); border-bottom: 1px solid var(--line); }
.edrawer .ed-ic { color: var(--teal); display: grid; }
.edrawer iframe { flex: 1; width: 100%; border: 0; background: transparent; }
@media (min-width: 1200px) { body.has-edrawer .catalog { margin-right: min(620px, 100vw); } }
/* The editor inside the panel: no admin menu, one column, the save bar always in reach. */
.embed .admin { display: block; background: none; }
.embed #side { display: none; }
.embed .amain { padding: 0 var(--s4) var(--s5); }
.embed .amain .page-head { position: sticky; top: 0; z-index: 5; margin: 0 calc(-1 * var(--s4)) var(--s4); padding: var(--s3) var(--s4); background: var(--white); border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: var(--s3); }
.embed .amain .page-head h1 { font-size: var(--fs-lg); }
.embed .pe-split { grid-template-columns: minmax(0, 1fr); }
.embed .pe-split > aside { position: static; max-height: none; overflow: visible; order: -1; }
/* Round 41: another style is on its way into the panel. */
.embed .amain.is-loading { opacity: .45; pointer-events: none; transition: opacity .12s; }

/* Round 41 (Sean 11-18): edit mode on By collection and Lenses (the admin's collections and lens lines, in the storefront). */
.ledit .page-head .row { flex-wrap: wrap; justify-content: flex-end; }

/* Round 42 (Sean 11-19): prices in the storefront's edit mode, a panel on the right (assets/price-editor.js). */
/* A slide only: fading a modal dialog in (edin) left Chrome drawing the page through it. */
/* A style priced on its own, on its card in edit mode and in the style editor. */
.badge.ownprice { background: var(--sun); color: var(--ink); border-color: transparent; }
.pcard .pr.ownpr { background: #fff3d6; border-radius: 6px; padding: 0 6px; box-shadow: inset 0 0 0 1px rgba(201, 138, 20, 0.5); }
button.tierstrip { appearance: none; }
.tprices .tp.own { border-color: #c98a14; background: #fff8e8; }
.pcard button.pr { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--teal); font-size: var(--fs-sm); cursor: pointer; }
.pcard button.pr:hover { text-decoration: underline; }
.pcard button.pr.ownpr { background: #fff3d6; padding: 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(201, 138, 20, 0.5); }
/* Round 42: Purchasing lists filter with a search box and one status drop-down (no row of chips). */
.lablist-h.lfilter { display: flex; gap: var(--s2); align-items: center; }
.lablist-h.lfilter .input { flex: 1 1 auto; min-width: 0; }
.lablist-h.lfilter .select { flex: 0 0 auto; width: auto; max-width: 48%; }
/* Round 42 (Sean 11-19): By collection's material and price tags. */
.cfilters { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0 0 var(--s2); }
.cfilters:empty { display: none; }
.cfilters .cfg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cfilters .cfg > .label { margin-right: 2px; }
.cfilters .fchip .faint { font-weight: 500; margin-left: 2px; }
.fchip.on .faint { color: rgba(255, 255, 255, 0.7); }
.ccard .cmats { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px; }
.ccard .cmats .badge { height: 20px; font-size: var(--fs-2xs); }

/* Round 44 (Sean 11-19): each thing edits its own price where it is edited. */
/* A lens line's panel (Lenses → Edit mode), as Frames' style panel: header, a body that scrolls, the save bar at the foot. */
.ledrawer[hidden] { display: none; }
.ledrawer form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.ledrawer .ed-tt { display: grid; gap: 0; min-width: 0; }
.ledrawer .ed-tt .eyebrow { margin: 0; }
.ledrawer .ed-tt b { font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledrawer .ed-body { flex: 1; overflow: auto; padding: var(--s3) var(--s4) var(--s5); }
.ledrawer .ed-body .esec { background: var(--white); border: 1px solid var(--line); border-radius: var(--r3, 12px); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); }
.ledrawer .ed-body .fgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ledrawer .ed-body .fgrid.elens { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ledrawer .ed-body .fgrid.elens.one { grid-template-columns: minmax(0, 1fr); }
.ledrawer .ed-foot { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--white); border-top: 1px solid var(--line); }
.ledrawer .ed-foot .alert { margin: 0; }
.ledrawer .ed-foot .row { gap: var(--s2); }
@media (min-width: 1200px) { body.has-edrawer .ledit { margin-right: min(620px, 100vw); } }
.lline.on-edit { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), var(--sh-panel); }
tr.lline.on-edit td { background: var(--teal-50); }

/* One thing's prices: base and a box per tier (assets/price-editor.js VRAPrices.block). */
.pblock .pb-base { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s3); }
.pblock .pb-base .affix { width: 140px; }
.pblock .pbtbl { width: 100%; }
.pblock .pbtbl td { vertical-align: middle; }
.pblock .pbtbl .affix { width: 130px; }
.pblock .pbtbl tr.is-set .affix { border-color: #c98a14; box-shadow: inset 3px 0 0 var(--sun); }
.pblock .pb-m { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pblock .pbtbl input::placeholder { color: var(--ink-4); font-weight: 400; }
.pblock .pb-help { margin: var(--s2) 0 0; }
#pricing.hit { box-shadow: 0 0 0 2px var(--teal); transition: box-shadow 0.3s; }

/* The styles priced on their own, in a collection's panel (By collection → Edit mode). */
.prown { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.prown li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); padding: 6px 0; border-top: 1px solid var(--line); }
.prown li:first-child { border-top: 0; }
.prown img, .prown .prph { width: 56px; height: 32px; object-fit: contain; border-radius: 6px; background: var(--paper); }
.prown .po-p { display: flex; gap: 4px; }
.prown .po-p .tc { display: grid; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: var(--fs-2xs); line-height: 1.25; }
.prown .po-p .tc i { font-style: normal; color: var(--ink-4); font-weight: 600; }
.prown .po-p .tc.set { border-color: #c98a14; background: #fff8e8; }
@media (max-width: 720px) { .prown li { grid-template-columns: 56px minmax(0, 1fr) auto; } .prown .po-p { grid-column: 2 / -1; flex-wrap: wrap; } }

/* The prescription price table (Lenses → Prescription options → Edit mode). */
.lline-grid.rxview { display: block; }
.rxt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.rxt-sec { padding: 0; overflow: hidden; }
.rxt-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.rxt-h #rxbands { align-self: center; }
.rxtbl { width: 100%; }
.rxtbl th { white-space: nowrap; }
.rxtbl th.rxb { text-align: center; font-variant-numeric: tabular-nums; }
.rxtbl td { vertical-align: middle; }
.rxtbl td.rxopt { min-width: 170px; }
/* Round 46: a single vision option's stock version, under its name. */
.rxtbl td.rxopt .rxst { margin-top: 2px; color: var(--teal-2, var(--teal)); }
.rxtbl td.rxopt .rxst.faint { color: var(--ink-4); }
.rxtbl td.rxk { padding-left: 0; padding-right: 0; }
.rxtbl td.rxk span { display: flex; align-items: center; height: 32px; font-size: var(--fs-2xs); color: var(--ink-4); white-space: nowrap; }
.rxtbl td.rxc { min-width: 92px; padding: 4px 6px; }
.rxtbl td.rxc .rxin, .rxtbl td.rxc .rxv { display: flex; align-items: center; width: 100%; height: 30px; margin: 1px 0; }
.rxtbl td.rxr { min-width: 130px; }
.rxin { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font: inherit; font-size: var(--fs-sm); text-align: right; font-variant-numeric: tabular-nums; }
.rxin::placeholder { color: var(--ink-4); font-style: italic; font-size: var(--fs-2xs); text-align: center; }
.rxin:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.14); }
.rxin.changed { border-color: #c98a14; box-shadow: inset 3px 0 0 var(--sun); }
.rxin.bad { border-color: var(--red, #b3261e); background: #fff4f2; }
.rxv { justify-content: flex-end; padding: 0 8px; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.rxv.q { justify-content: center; color: var(--ink-4); font-style: italic; font-size: var(--fs-2xs); }
.rxcoats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); }
.rxcoat { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.rxcoat > span:first-child { display: grid; }
.rxcoat .affix { width: 120px; }
.rxt-foot { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); background: var(--white); border: 1px solid var(--line); border-radius: var(--r3, 12px); box-shadow: var(--sh2, var(--sh1)); }
/* Round 46 (Sean 11-19): which prices are shown and Save, together in the bar at the bottom. */
.rxt-show { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); min-width: 0; }
.rxt-show .seg button { white-space: nowrap; }
.rxt-show .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rxt-save { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.erxstock { margin-top: var(--s3); }
@media (max-width: 640px) { .rxt-show > .xs { display: none; } }
.bands { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
.bandrow { gap: var(--s2); }
.bandrow > .small { width: 90px; }
.bandrow .input { width: 110px; }

/* Round 45 (Sean 11-19): edit mode is one switch in the header, the same on every page that has an edit mode; while it is
   on, a strip under the header says what can be changed here. (The header's top edge stays the role's colour.) */
.edswitch { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2) !important; font: 600 var(--fs-sm) / 1 var(--sans); text-decoration: none !important; white-space: nowrap; flex: none; transition: background 0.15s, border-color 0.15s; }
.edswitch:hover { border-color: var(--ink-3); color: var(--ink) !important; }
.edswitch:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.edswitch .es-tr { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--paper-3); transition: background 0.15s; flex: none; }
.edswitch .es-kn { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(23, 22, 15, 0.25); display: grid; place-items: center; color: var(--ink-4); transition: transform 0.18s var(--ease), color 0.15s; }
.edswitch .es-kn svg { width: 11px; height: 11px; }
.edswitch.on { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal) !important; }
.edswitch.on .es-tr { background: var(--teal); }
.edswitch.on .es-kn { transform: translateX(16px); color: var(--teal); }
@media (prefers-reduced-motion: reduce) { .edswitch .es-kn { transition: none; } }
.edstrip { background: var(--teal-50); border-top: 1px solid var(--teal-100); }
.edstrip .es-in { min-height: 34px; padding: 6px var(--s5); display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); color: var(--ink-2); }
.edstrip b { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); flex: none; }
.edstrip b svg { width: 14px; height: 14px; }
.edstrip .es-tx { min-width: 0; }
.edstrip .es-tx .mono { font-size: var(--fs-xs); font-weight: 600; }
@media (max-width: 720px) {
  .edswitch { padding: 0 4px; }
  .edswitch .es-l { display: none; }
  .edstrip .es-in { padding: 6px var(--s3); font-size: var(--fs-xs); }
}
/* Frames in edit mode: which styles are shown (All / Hidden / Needs attention), in the toolbar. */
.attnseg[hidden] { display: none; }

/* Round 45 (Sean 11-19): By collection in edit mode looks as members see it; a click opens the collection's panel. */
.ecoll { position: relative; display: flex; }
.ecoll > .ccard { flex: 1; cursor: pointer; }
.ecoll.is-deleted > .ccard { cursor: default; }
.ecoll .cbadges { position: absolute; top: var(--s3); left: var(--s3); right: 56px; display: flex; flex-wrap: wrap; gap: 4px; }
.ecoll .cbadges .badge { position: static; box-shadow: var(--sh1); }
.ecoll.is-off .cv img, .ecoll.is-off .bd > :not(.ft) { opacity: 0.55; }
.ecoll .pedit { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: var(--sh1); cursor: pointer; }
.ecoll .pedit svg { width: 16px; height: 16px; }
.ecoll .pedit:hover, .ecoll .pedit:focus-visible { background: var(--ink); color: #fff; border-color: var(--ink); }
.ecoll.on-edit > .ccard { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), var(--sh-panel); }
.cedit .cviewbar #fstatus button { white-space: nowrap; }
.cedit .cviewbar #q { margin-left: auto; }
@media (min-width: 1200px) { body.has-edrawer .cedit { margin-right: min(620px, 100vw); } }
.cdrawer .cvis { display: flex; align-items: center; gap: var(--s3); }
.cdrawer .cvis-tx { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.cdrawer .cvis-tx .small { flex-basis: 100%; }
.cdrawer .cvpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.cdrawer .cvpick button { position: relative; aspect-ratio: 16 / 10; padding: 4px 4px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.cdrawer .cvpick button img { width: 100%; height: 100%; object-fit: contain; }
.cdrawer .cvpick button span { position: absolute; left: 6px; bottom: 2px; font: 600 10px / 1.2 var(--mono); color: var(--ink-3); }
.cdrawer .cvpick button:hover { border-color: var(--ink-4); }
.cdrawer .cvpick button.on { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.cdrawer .cvpick button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cdrawer .esec .field + .field { margin-top: var(--s3); }
.cdrawer .esec textarea { width: 100%; }
.cdrawer .cdanger { border-color: var(--red-50); }
/* Round 45: an admin's PDF button on a By collection card (outside edit mode). */
.cpdf { position: absolute; top: var(--s3); right: var(--s3); z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); box-shadow: var(--sh-panel); color: var(--ink-2); font: 600 var(--fs-xs) / 1 var(--sans); cursor: pointer; }
.cpdf svg { width: 13px; height: 13px; }
.cpdf:hover { border-color: var(--ink-3); color: var(--ink); }
.cpdf:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cpdf.is-busy { opacity: 0.6; }
.chead-pr [data-pdf] { display: inline-flex; align-items: center; gap: 4px; }
.chead-pr [data-pdf] svg { width: 13px; height: 13px; }

/* Round 45 (Sean 11-19): Frames' filters. The sidebar folds away (Hide; the toolbar's "Filters" brings it back), and
   Collection is a drop-down with ticks, opening in place (inside the sidebar's scroll, so nothing is cut off). */
.fside-h .fhide { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); font: 600 var(--fs-xs) / 1 var(--sans); cursor: pointer; }
.fside-h .fhide svg { width: 13px; height: 13px; }
.fside-h .fhide:hover { background: var(--paper-2); color: var(--ink); }
.fside-h .fhide:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
@media (min-width: 901px) {
  .catalog.fside-off { grid-template-columns: minmax(0, 1fr); }
  .catalog.fside-off .fside { display: none; }
  .catalog.fside-off .ftoggle { display: inline-flex; }
}
.fcollg { padding-bottom: 12px; }
.fgh { display: flex; align-items: center; gap: 8px; padding: 11px 2px 8px; font: 650 var(--fs-sm) / 1.2 var(--sans); color: var(--ink); }
.fgh .ft { flex: 1; }
.fgh .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font: 700 10px / 18px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.cdrop-btn { width: 100%; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--white); color: var(--ink); font: 500 var(--fs-sm) / 1 var(--sans); text-align: left; cursor: pointer; }
.cdrop-btn:hover { border-color: var(--ink-4); }
.cdrop-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.cdrop-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdrop-chev { flex: none; width: 7px; height: 7px; margin: -3px 2px 0; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.15s var(--ease); }
.cdrop.open .cdrop-btn { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.12); }
.cdrop.open .cdrop-chev { transform: rotate(-135deg); margin-top: 4px; }
.cdrop-pop { margin-top: 6px; padding: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--sh2); }
.cdrop-pop[hidden] { display: none; }
.cdrop-pop .fsearch { padding: 0 0 4px; }
.cdrop-list { max-height: 300px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cdrop-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 2px 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .fgh { font-size: var(--fs-md); padding: 10px 6px 8px; } }


/* ==========================================================================
   VRA Optical Atelier — Cohesive UI/UX Design Layer
   Typography · Surfaces · Editorial Auth · Showroom Cards · Executive Admin
   ========================================================================== */

/* ---------- Editorial typography & surfaces ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
body.rule::before { height: 2px; background: var(--teal); }
.h1,
.page-head .h1,
.page-head h1,
.amain .page-head h1,
.ccard h3,
.acoll h3,
.empty h3,
.lj-name,
.mem-detail .dhead h2,
.pf-card h2,
.lr-title,
.lc-title,
dialog.dlg h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 540;
  letter-spacing: -0.02em;
}
.page-head .h1,
.page-head h1,
.amain .page-head h1 {
  font-size: 23px;
  line-height: 1.2;
}
.panel {
  border-color: var(--line);
  border-radius: var(--rp);
  box-shadow: var(--sh-panel);
}
.panel-head {
  padding: 13px var(--s5);
  border-bottom-color: #eeebe3;
}
.panel-head .label:first-child,
.panel-head > div > .label:first-child,
.panel-pad > .label:first-child,
.dsec > .label:first-child {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Refined buttons, inputs & segmented controls ---------- */
.btn {
  border-radius: var(--r2);
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 1px 2px rgba(14, 90, 84, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn:hover {
  box-shadow: 0 3px 10px -2px rgba(14, 90, 84, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.sec {
  border-color: var(--line-2);
  box-shadow: var(--sh1);
}
.btn.sec:hover {
  background: var(--tint);
  border-color: #bfb8aa;
  box-shadow: 0 2px 6px rgba(19, 28, 26, 0.06);
}
.btn.ghost { box-shadow: none; }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); box-shadow: none; }
.btn.danger { box-shadow: none; border-color: #e4c1b7; }
.btn.danger:hover { box-shadow: none; border-color: #d69c8c; }
.btn.dangerfill { box-shadow: 0 1px 2px rgba(184, 56, 34, 0.22); }

.input, .select, .textarea,
.form input:not([type]), .form input[type=text], .form input[type=email], .form input[type=tel],
.form input[type=password], .form input[type=number], .form input[type=date], .form input[type=search],
.form select, .form textarea {
  border-color: var(--line-2);
  border-radius: var(--r2);
  background-color: var(--white);
}
.input:hover, .select:hover, .form input:hover, .form select:hover, .form textarea:hover {
  border-color: #b7b1a3;
}
.input:focus, .select:focus, .textarea:focus, .form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.13);
}
.seg, .atabs, .ltabs, .mtabs {
  background: var(--paper-2);
  border: 1px solid rgba(214, 209, 197, 0.55);
  border-radius: 10px;
  padding: 3px;
}
.seg button.on, .vswitch a.on, .atabs a.on, .ltabs a.on, .mtabs a.on {
  background: var(--white);
  color: var(--teal-deep);
  box-shadow: 0 1px 3px rgba(19, 28, 26, 0.09), 0 0 0 1px rgba(231, 227, 217, 0.7);
}
.tbl th {
  background: var(--tint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  border-bottom-color: var(--line);
}
.tbl tr.click:hover td { background: #f8f7f2; }
.tbl tr.group td { background: var(--tint); }

/* ---------- Sculptural empty states ---------- */
.empty { padding: 52px var(--s5); }
.empty .mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--teal-50) 0%, #ffffff 100%);
  border: 1px solid var(--teal-100);
  color: var(--teal);
  box-shadow: 0 6px 18px -6px rgba(14, 90, 84, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.empty .mark svg { width: 22px; height: 22px; stroke-width: 1.6; }
.empty h3 { font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6; }

/* ---------- Editorial Login & Register Split-Screen ---------- */
.login {
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  background: var(--white);
}
.login .cover {
  position: relative;
  overflow: hidden;
  padding: 36px 56px 32px;
  border-top: 0;
  background: radial-gradient(125% 115% at 88% -8%, #136961 0%, #093b36 48%, #05221f 100%);
  color: #f7f3eb;
}
.login .cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247, 243, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 235, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 75% at 75% 25%, #000 0%, transparent 75%);
  pointer-events: none;
}
.login .cover::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -130px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 163, 56, 0.22) 0%, rgba(230, 163, 56, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
.login .cover > * { position: relative; z-index: 2; }
.login .cover .cover-mark {
  position: absolute;
  z-index: 1;
  right: -44px;
  bottom: 72px;
  width: 300px;
  height: 300px;
  opacity: 0.075;
  pointer-events: none;
}
.login .cover .top {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(247, 243, 235, 0.14);
}
.login .cover .top img { height: 34px; width: auto; }
.login .cover .cover-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 163, 56, 0.36);
  background: rgba(230, 163, 56, 0.1);
  color: #f4cb7e;
  font: 700 10.5px / 1 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.login .cover .body {
  padding: 28px 0 24px;
  max-width: 600px;
}
.login .cover .eyebrow {
  color: var(--sun);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.login .cover h1 {
  font-family: var(--serif);
  font-weight: 430;
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 14px 0 18px;
}
.login .cover h1 em {
  font-style: italic;
  font-weight: 450;
  color: #f4c267;
}
.login .cover p.lead {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(233, 244, 241, 0.8);
  max-width: 490px;
}
.login .cover .goldrule {
  width: 64px;
  height: 2px;
  margin: 26px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sun), rgba(230, 163, 56, 0.12));
}
.login .cover .hero-stage {
  max-width: 520px;
  padding: 10px 10px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(247, 243, 235, 0.15);
  box-shadow: 0 24px 60px -12px rgba(2, 16, 14, 0.48);
  backdrop-filter: blur(8px);
}
.login .cover .hero {
  margin-top: 0;
  max-width: none;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  aspect-ratio: 16 / 7;
}
.login .cover .hero img { padding: 14px 28px; }
.login .cover .hero-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px 2px;
  font-size: 11.5px;
  color: rgba(233, 244, 241, 0.72);
}
.login .cover .hero-cap .mono {
  color: #f4cb7e;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.login .cover .meta {
  padding-top: 20px;
  border-top: 1px solid rgba(247, 243, 235, 0.14);
  gap: 44px;
}
.login .cover .meta b {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login .cover .meta span {
  color: rgba(233, 244, 241, 0.65);
  font-size: 12px;
}
.login .pane {
  background: linear-gradient(180deg, #ffffff 0%, #fcfbf8 100%);
  border-left: 0;
  padding: 32px 44px;
}
.login .box { max-width: 380px; }
.login .box.wide { max-width: 460px; }
.login .box .eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login .box h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 520;
  letter-spacing: -0.025em;
  margin: 6px 0 8px;
}
.login .box .intro {
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 24px;
}
.login .pane .form input:not([type="checkbox"]):not([type="radio"]),
.login .pane .form select {
  height: 40px;
  padding: 0 13px;
}
.login .authtabs {
  margin-bottom: 28px;
  border-radius: 12px;
  padding: 4px;
}
.login .authtabs a {
  height: 36px;
  border-radius: 8px;
  font-weight: 650;
}
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .cover { padding: 22px 20px; min-height: auto; }
  .login .cover .body { padding: 20px 0 12px; }
  .login .cover h1 { font-size: 32px; margin: 10px 0 12px; }
  .login .cover .goldrule { margin: 16px 0 0; }
  .login .cover .hero-stage, .login .cover .meta, .login .cover .cover-mark { display: none; }
  .login .pane { padding: 28px 20px 40px; border-left: 0; }
}

/* ---------- Member Topbar Navigation ---------- */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.5) blur(14px);
  border-top: 2px solid var(--teal);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(231, 227, 217, 0.7), 0 6px 20px -12px rgba(19, 28, 26, 0.08);
}
body.role-vra .topbar { border-top-color: var(--teal); }
body.role-super .topbar { border-top-color: var(--sun); }
.topbar .in { gap: 28px; padding: 0 var(--s5); }
.topbar .brand img { height: 36px; width: auto; }
.mainnav { gap: 4px; }
.mainnav a {
  position: relative;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 0;
  margin-bottom: 0;
  transition: color 0.15s var(--ease);
}
.mainnav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--teal);
  transform: scaleX(0);
  transition: transform 0.2s var(--ease);
}
.mainnav a:hover { color: var(--ink); text-decoration: none; }
.mainnav a.on { color: var(--teal-deep); font-weight: 700; }
.mainnav a.on::after { transform: scaleX(1); }

.acct { gap: 10px; }
.rolepill {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.015em;
}
.rolepill.member {
  background: var(--tint);
  color: var(--ink-3);
  border: 1px solid var(--line);
}
.rolepill.vra {
  background: var(--teal-50);
  color: var(--teal-2);
  border: 1px solid var(--teal-100);
}
.rolepill.super {
  background: var(--sun-50);
  color: var(--sun-deep);
  box-shadow: inset 0 0 0 1px var(--sun-100);
}
.ubtn {
  height: 36px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ubtn:hover, .ubtn[aria-expanded="true"] {
  background: var(--tint);
  border-color: var(--line-2);
  box-shadow: var(--sh1);
}
.ubtn .av {
  width: 26px;
  height: 26px;
  background: var(--teal-50);
  color: var(--teal);
}
.ubtn:hover .av { background: var(--teal-100); }
.umenu-list {
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: var(--sh2);
  padding: 6px;
}
.cartlink {
  height: 36px;
  padding: 0 6px 0 13px;
  background: var(--teal-deep);
  box-shadow: 0 2px 8px -2px rgba(6, 43, 39, 0.35);
  transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.cartlink:hover {
  background: var(--teal);
  box-shadow: 0 4px 12px -2px rgba(14, 90, 84, 0.38);
}
.cartlink b {
  background: #ffffff;
  color: var(--teal-deep);
  font-weight: 750;
}
.edswitch {
  height: 34px;
  border-color: var(--line-2);
  background: var(--white);
}
.edswitch.on {
  background: var(--teal-50);
  border-color: var(--teal-100);
}
.edstrip {
  background: linear-gradient(90deg, var(--teal-50) 0%, #f1f7f5 100%);
  border-top: 1px solid var(--teal-100);
}
.foot {
  border-top-color: var(--line);
  color: var(--ink-4);
  padding: 18px var(--s5);
  background: rgba(255, 255, 255, 0.45);
}
@media (max-width: 720px) {
  .topbar { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .topbar .in { gap: 12px; padding: 0 12px; }
  .topbar .brand img { height: 28px; }
  .mainnav a.on { border-top-color: transparent; }
  .mainnav a::after { top: 0; bottom: auto; border-radius: 0 0 2px 2px; }
  .ubtn { border-color: transparent; background: transparent; padding: 0 4px; }
  .pcard .bd { padding: 8px 9px 9px; }
  .pcard .qa { margin: auto -9px -9px; padding: 7px 9px 9px; }
}
body.has-edrawer .ftoolbar { flex-wrap: wrap; }

/* ---------- Storefront Frames Showroom & Filter Rail ---------- */
@media (min-width: 901px) {
  .catalog { grid-template-columns: 244px minmax(0, 1fr); gap: 0 22px; }
  .fside {
    top: 78px;
    max-height: calc(100vh - 96px);
    padding: 14px 14px 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--rp);
    box-shadow: var(--sh-panel);
  }
}
.fside-h {
  padding-bottom: 10px;
  border-bottom-color: #efece4;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.fside .fgroup { border-bottom-color: #f0ede5; }
.fside .fgroup:last-child { border-bottom: 0; }
.fside .fgroup > summary { padding: 11px 2px; font-weight: 700; color: var(--ink); }
.fside .fopt {
  padding: 3px 6px;
  min-height: 29px;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}
.fside .fopt:hover { background: var(--tint); }
.fside .fopt:has(input:checked) { background: var(--teal-50); color: var(--teal-deep); }
.fside .fopt.zero { opacity: 0.36; min-height: 24px; font-size: 12px; }
.fside .fopt.zero:hover { background: transparent; }
.cdrop-btn {
  background: var(--tint);
  border-color: var(--line);
  font-weight: 600;
}
.cdrop-btn:hover { background: var(--white); border-color: var(--line-2); }

.pgrid { gap: 16px; }
.dense .pgrid { gap: 11px; }
.large .pgrid { gap: 20px; }

.pcard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--sh-panel);
  transition: border-color 0.18s var(--ease), box-shadow 0.22s var(--ease);
}
.pcard:hover {
  border-color: var(--teal-100);
  box-shadow: 0 14px 30px -12px rgba(14, 90, 84, 0.16), 0 3px 8px -2px rgba(19, 28, 26, 0.05);
}
.pcard .pic {
  border-bottom: 1px solid #f0ede5;
  border-radius: 13px 13px 0 0;
  background: #ffffff;
}
.pcard .pic .ptop { padding: 8px 8px 0; height: 28px; }
.pcard .pic .tag {
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--ink-3);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pcard .pic .cap {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: var(--sh1);
  backdrop-filter: blur(6px);
}
.pcard .bd { padding: 10px 12px 12px; gap: 7px; }
.pcard .sc { font-size: 14.5px; font-weight: 750; color: var(--ink); letter-spacing: -0.01em; }
.pcard .pr { font-size: 14px; font-weight: 750; color: var(--teal); }
.pcard .meta { color: var(--ink-3); font-size: 11.5px; }
.pcard .det { color: var(--ink-3); font-weight: 650; }
.pcard:hover .det { color: var(--teal); }

.sw { gap: 4px; }
.sw button {
  border-color: #ebe8e0;
  border-radius: 6px;
  background: #ffffff;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.sw button:hover { border-color: var(--ink-3); }
.sw button.on {
  border-color: var(--teal);
  box-shadow: 0 0 0 1.5px var(--teal);
}
.sw button .q { background: var(--teal); box-shadow: 0 1px 3px rgba(14, 90, 84, 0.35); }

/* Quiet showroom quick-add footer: calm at rest, illuminates in peacock-teal on interaction */
.pcard .qa {
  margin: auto -12px -12px;
  padding: 8px 12px 10px;
  background: var(--tint);
  border-top: 1px solid #efece4;
  border-radius: 0 0 13px 13px;
  gap: 5px;
}
.dense .pcard .bd { padding: 7px 9px 9px; gap: 5px; }
.dense .pcard .qa { margin: auto -9px -9px; padding: 6px 9px 8px; }
.large .pcard .bd { padding: 13px 15px 15px; gap: 8px; }
.large .pcard .qa { margin: auto -15px -15px; padding: 10px 15px 12px; }
.qa .ctl input {
  border-color: var(--line);
  background: var(--white);
  border-radius: 7px;
  font-size: 12.5px;
}
.qa .ctl input::placeholder { color: var(--ink-4); font-weight: 500; }
.qa .ctl .btn {
  --b: var(--teal-50);
  --bh: var(--teal);
  --fg: var(--teal-2);
  border-color: var(--teal-100);
  box-shadow: none;
  font-weight: 700;
}
.pcard:hover .qa .ctl .btn,
.qa:focus-within .ctl .btn,
.qa .ctl .btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(14, 90, 84, 0.35);
}

/* ---------- Collections Showroom ---------- */
.cfilters .fchip {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink-2);
  transition: all 0.14s var(--ease);
}
.cfilters .fchip:hover { border-color: var(--teal-100); color: var(--teal-deep); background: var(--teal-50); }
.cfilters .fchip.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
  box-shadow: 0 2px 6px -2px rgba(14, 90, 84, 0.4);
}
.ccard {
  border-color: var(--line);
  border-radius: 16px;
  transition: border-color 0.2s var(--ease), box-shadow 0.22s var(--ease), transform 0.2s var(--ease);
}
.ccard:hover {
  border-color: var(--teal-100);
  box-shadow: 0 18px 36px -14px rgba(14, 90, 84, 0.18), 0 4px 10px -2px rgba(19, 28, 26, 0.05);
  transform: translateY(-2px);
}
.ccard .cv { border-bottom-color: #f0ede5; }
.ccard .bd { padding: 16px 20px 18px; }
.ccard .eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--sun-deep);
}
.ccard h3 { font-size: 19px; color: var(--ink); }
.ccard .cmats .badge {
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.ccard .ft { border-top-color: #efece4; padding-top: 12px; }
.ccard .ft .pr { font-size: 15.5px; font-weight: 750; color: var(--teal); }
.cpick {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border-color: var(--line);
  border-radius: 8px;
  transition: all 0.14s var(--ease);
}
.cpick:hover { border-color: var(--teal); background: #ffffff; }
.cpickbar {
  background: var(--teal-deep);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.cpickbar .faint { color: rgba(233, 244, 241, 0.72); }
.cpickbar .link { color: #f4cb7e; }
.cpickbar .btn { background: #ffffff; border-color: #ffffff; color: var(--teal-deep); box-shadow: none; }
.cpickbar .btn:hover { background: var(--teal-50); border-color: var(--teal-50); color: var(--teal-deep); }

/* ---------- Product Detail Modal (strictly preserving 1366x768 zero-scroll fit) ---------- */
.modal-bg {
  background: rgba(6, 28, 25, 0.56);
  backdrop-filter: blur(6px);
}
.modal {
  border-radius: 18px;
  box-shadow: var(--sh3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.modal-head {
  height: 52px;
  border-bottom-color: #eeebe3;
  background: var(--white);
}
.modal-head .pos {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper);
  font-weight: 650;
  color: var(--ink-2);
}
.stage {
  border-color: #ece8df;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sh-panel);
}
.stage .cap {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-color: var(--line);
}
.stage .nav {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--sh1);
}
.stage .nav:hover { background: var(--teal); color: #ffffff; border-color: var(--teal); }
.facts {
  background: var(--tint);
  border: 1px solid #eeebe3;
  border-radius: 11px;
}
.facts dt {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.qrow.on {
  background: var(--teal-50);
  border-color: var(--teal-100);
}
.side-foot {
  border-top: 1px solid #eeebe3;
}

/* ---------- Lenses & Bulk Power Grid (preserving 1440x900 one-screen fit) ---------- */
.lcard {
  border-radius: 14px;
  border-color: var(--line);
  transition: border-color 0.18s var(--ease), box-shadow 0.22s var(--ease), transform 0.18s var(--ease);
}
.lcard:hover {
  border-color: var(--teal-100);
  box-shadow: 0 14px 30px -12px rgba(14, 90, 84, 0.16);
  transform: translateY(-1px);
}
.lc-chips .tag {
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
  border-radius: 6px;
}
.lrail {
  border-color: var(--line);
  border-radius: var(--rp);
}
.lswc {
  border-color: var(--line);
  background: var(--white);
}
.lswc.on, .lswc:disabled.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}
table.powgrid {
  border-color: var(--line);
  border-radius: 10px;
}
.powgrid thead tr.cap th {
  background: linear-gradient(90deg, var(--teal-50) 0%, var(--tint) 100%);
  border-bottom-color: var(--teal-100);
}
.powgrid .cap-t { color: var(--teal-deep); letter-spacing: 0.05em; }
.powgrid thead th, .powgrid tbody th.rh { background: var(--tint); }
.powgrid .gq { background: #fbfaf7; }
.powgrid .gq.has { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-deep); }
.gsel { background: var(--teal-deep); }

/* ---------- Prescription Order Sheet ---------- */
.rxp { border-radius: 14px; border-color: var(--line); }
.rxp-n { background: var(--teal-deep); }
.rxl { background: var(--tint); }
.rxe-eye b { background: var(--teal-deep); }
.rxe-r[data-eye="L"] .rxe-eye b { background: var(--teal); }
.rxp-f { background: var(--tint); }
.rxbar {
  background: linear-gradient(90deg, #072d29 0%, #0b443f 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rxbar .btn.rb-go { color: var(--teal-deep); font-weight: 700; }

/* ---------- Member Dashboard KPI Cards ---------- */
.mfigs { gap: 14px; margin-bottom: 20px; }
.mfig {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--sh-panel);
  transition: border-color 0.18s var(--ease), box-shadow 0.2s var(--ease), transform 0.18s var(--ease);
}
.mfig::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: var(--line);
  transition: background 0.18s var(--ease);
}
a.mfig:hover {
  border-color: var(--teal-100);
  box-shadow: var(--sh2);
  transform: translateY(-1px);
  text-decoration: none;
}
a.mfig:hover::before { background: var(--teal); }
.mfig b {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 2px;
}
.mfig span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.mfig small { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- Executive Deep Peacock-Teal Admin Sidebar ---------- */
.admin {
  background: linear-gradient(90deg, #093a35 0 var(--aside), transparent var(--aside));
}
.aside {
  background: linear-gradient(180deg, #0a423d 0%, #062b27 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid var(--sun);
  padding: 14px 10px 12px;
  color: rgba(247, 243, 235, 0.78);
}
body.role-vra .aside { border-top-color: #3ec6b6; }
body.role-super .aside { border-top-color: var(--sun); }
.aside .brand {
  padding: 4px 10px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  gap: 8px;
}
.aside .brand img.brand-full { height: 29px; width: auto; }
.aside .brand-sub .label {
  color: rgba(247, 243, 235, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.aside .rolepill.super {
  background: rgba(230, 163, 56, 0.16);
  color: #f4c977;
  box-shadow: inset 0 0 0 1px rgba(230, 163, 56, 0.34);
}
.aside .rolepill.vra {
  background: rgba(62, 198, 182, 0.16);
  color: #8ee7dc;
  box-shadow: inset 0 0 0 1px rgba(62, 198, 182, 0.32);
}
.aside nav { gap: 3px; }
.aside nav a {
  height: 37px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(247, 243, 235, 0.76);
  font-size: 13.5px;
  font-weight: 550;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.aside nav a svg { opacity: 0.72; color: rgba(247, 243, 235, 0.85); }
.aside nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.aside nav a:hover svg { opacity: 1; }
.aside nav a.on {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--sun);
}
.aside nav a.on svg { color: var(--sun); opacity: 1; }
.aside nav.sf {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.aside nav.aux a { color: rgba(247, 243, 235, 0.66); }
.aside nav.aux a:hover, .aside nav.aux a.on { color: #ffffff; }
.aside-fold {
  color: rgba(247, 243, 235, 0.58);
  border-radius: 8px;
}
.aside-fold:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.aside .who {
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(247, 243, 235, 0.58);
}
.aside .who b { color: #ffffff; font-weight: 700; margin-bottom: 2px; }
.aside .who .link { color: #f2cf88; font-weight: 600; font-size: 11.5px; }
.aside .who .link:hover { color: #ffffff; }
.aside a:focus-visible, .aside button:focus-visible {
  box-shadow: 0 0 0 2px #062b27, 0 0 0 4px var(--sun);
}
@media (min-width: 901px) {
  html.aside-min { --aside: 62px; }
  html.aside-min .aside .brand { padding: 4px 0 12px; }
  html.aside-min .aside .brand-mark {
    border-radius: 9px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}
@media (max-width: 900px) {
  .admin { background: none; }
  .aside {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
  }
  .aside .brand { border-bottom: 0; padding: 0 6px; margin: 0; }
  .aside nav a { height: 32px; padding: 0 10px; font-size: 12.5px; }
}

/* ---------- Admin Orders Statbar & Split Workspace ---------- */
.statbar {
  border-radius: 14px;
  margin-bottom: 16px;
}
.statbar .st {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 20px;
}
.statbar .st .label {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.statbar .st b {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.statbar button.st:hover { background: var(--tint); }
.statbar .st.hot b { color: var(--red); }

.otbl tr.sel td, .mtbl tr.sel td { background: var(--teal-50); }
.otbl tr.sel td:first-child, .mtbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.pill.set {
  border-color: var(--teal-100);
  background-color: var(--teal-50);
  color: var(--teal-deep);
}

/* ---------- Admin Members Fixes (dfacts truncation + clean filter bar) ---------- */
.mem-page { grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr); gap: 18px; }
.mtools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}
.mtools .search { grid-column: 1 / -1; max-width: none; }
.mtools .mfilter { flex: initial; min-width: 0; width: 100%; }
.mtools .mfilter .select { width: 100%; height: 34px; font-size: 12.5px; }
.dfacts {
  grid-template-columns: minmax(195px, 1.9fr) minmax(100px, 1fr) minmax(84px, 0.85fr) minmax(84px, 0.85fr);
  background: var(--tint);
}
.dfacts > div { padding: 12px 14px; }
.dfacts > div:first-child { padding-left: 20px; }
.dfacts b.dtiers {
  flex-wrap: wrap;
  gap: 4px 7px;
  white-space: normal;
  overflow: visible;
}
.dfacts b.dtiers i {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  margin-left: 4px;
  overflow: visible;
}
.dfacts b.dtiers i:first-child { margin-left: 0; }
.tierpill {
  background: var(--teal-50);
  color: var(--teal-deep);
  border: 1px solid var(--teal-100);
  font-weight: 750;
}
@media (max-width: 720px) {
  .dfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Admin Rx Lab Queue Chips (no abrupt right-edge clipping) ---------- */
#queues {
  flex-wrap: wrap;
  overflow-x: visible;
  gap: 5px;
  padding-bottom: 0;
}
.labq button {
  height: 26px;
  padding: 0 10px;
  border-color: var(--line);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.14s var(--ease);
}
.labq button:hover { border-color: var(--teal-100); color: var(--teal-deep); background: var(--teal-50); }
.labq button.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}
.labjob-empty { min-height: 360px; }

/* ---------- Admin Pricing Tiers ---------- */
.ptiers .panel-head { background: var(--tint); border-radius: var(--rp) var(--rp) 0 0; }
.ptiers .tfoot { background: var(--tint); }
.tiertbl td.teg { color: var(--ink-2); }
.tiertbl td.teg b { color: var(--teal-deep); font-weight: 750; }
.tiertbl td.num a {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 12px;
}
.tiertbl td.num a:hover { background: var(--teal-50); text-decoration: none; }

/* ---------- Dialogs, Drawers & Toasts ---------- */
dialog.dlg {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--sh3);
}
dialog.dlg::backdrop {
  background: rgba(6, 28, 25, 0.52);
  backdrop-filter: blur(4px);
}
.edrawer {
  border-left: 1px solid var(--line);
  background: var(--paper);
}
.edrawer .ed-h {
  background: var(--white);
  border-bottom-color: var(--line);
}
.pcard .pedit, .ecoll .pedit {
  border-color: var(--line);
  color: var(--ink-2);
  transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.pcard .pedit:hover, .pcard .pedit:focus-visible,
.ecoll .pedit:hover, .ecoll .pedit:focus-visible {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 4px 12px -2px rgba(14, 90, 84, 0.35);
}
.panel-head .rxfilter { padding: 0; border-bottom: 0; }
.toast {
  background: var(--teal-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 11px 18px;
}

/* ==========================================================================
   VRA Structural Layout & UX Architecture (Round 2)
   Re-architects page hierarchy, workspace shells, cards, and master-detail
   layouts across Storefront, Member Center, Store Portal, and Admin Console.
   ========================================================================== */

/* ---------- 1. Global Page Masthead, Area Titles & Toast Placement ---------- */
.page-head {
  align-items: flex-end;
  gap: 10px var(--s4);
  margin-bottom: var(--s4);
}
.page-head > div:first-child > .eyebrow {
  flex-basis: 100%;
  margin: 0 0 2px;
  line-height: 1.25;
}
.page-head.has-tabs {
  align-items: center;
}
.page-head.has-tabs > div:first-child {
  gap: 8px 14px;
}
.page-head .area-title {
  font: 700 24px / 1.15 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-right: 14px;
  border-right: 1px solid var(--line-2);
}
.mem-left .page-head .area-title {
  font-size: 20px;
  padding-right: 10px;
}
.atabs {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 10px;
}
.toast-host {
  left: auto;
  right: var(--s5);
  bottom: var(--s5);
  transform: none;
  max-width: min(420px, calc(100vw - 32px));
  justify-items: end;
}
@media (max-width: 720px) {
  .toast-host {
    left: var(--s3);
    right: var(--s3);
    bottom: 72px;
    justify-items: stretch;
  }
  .page-head .area-title {
    border-right: 0;
    padding-right: 0;
    flex-basis: 100%;
  }
}

/* ---------- 2. Member Center Architectural Workspace Sub-Nav (.mtabs) ---------- */
.mtabs {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: -6px 0 var(--s5);
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mtabs::-webkit-scrollbar { display: none; }
.mtabs a {
  position: relative;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px 8px 0 0;
  font: 600 13px / 1 var(--sans);
  color: var(--ink-3);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.14s var(--ease), background 0.14s var(--ease);
}
.mtabs a svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
  flex: none;
}
.mtabs a:hover {
  color: var(--ink);
  background: rgba(14, 90, 84, 0.045);
  text-decoration: none;
}
.mtabs a:hover svg { opacity: 0.95; }
.mtabs a.on {
  background: transparent;
  color: var(--teal-deep);
  font-weight: 700;
  box-shadow: none;
}
.mtabs a.on svg {
  color: var(--teal);
  opacity: 1;
}
.mtabs a.on::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--teal);
}

/* ---------- 3. Storefront Frames — Refined Showroom Grid & Filter Rail ---------- */
.catalog {
  gap: 18px;
  padding: var(--s4) var(--s4) var(--s7);
}
.catalog:not(.fside-off) {
  grid-template-columns: 224px minmax(0, 1fr);
}
@media (max-width: 900px) {
  .catalog, .catalog:not(.fside-off) {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--s3) var(--s3) var(--s7);
  }
}
/* Zero-count filter disclosure */
.fzeros {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.fzeros > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font: 600 11px / 1.2 var(--sans);
  color: var(--ink-4);
  user-select: none;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.fzeros > summary::-webkit-details-marker { display: none; }
.fzeros > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
}
.fzeros[open] > summary::before { content: "−"; }
.fzeros > summary:hover {
  background: var(--paper);
  color: var(--ink-2);
}
.fzeros .fzeros-b {
  display: grid;
  gap: 1px;
  margin-top: 3px;
}
.fopt { min-height: 28px; padding: 3px 8px; }

/* Showroom-grade product card with quiet joined quick-add bar */
.pgrid { gap: 14px; }
.pcard .bd {
  padding: 10px 11px 11px;
  gap: 6px;
}
.pcard .r2 {
  gap: 4px;
  margin-top: -2px;
}
.pcard .r2 .meta {
  font-size: 11px;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}
.pcard .det {
  font-size: 11px;
  gap: 2px;
}
@container (max-width: 245px) {
  .pcard .det { font-size: 0; gap: 0; padding: 2px; }
  .pcard .det svg { width: 11px; height: 11px; }
}
.pcard .qa {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  gap: 4px;
  opacity: 0.92;
}
.pcard .qa .tgt {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--ink-4);
}
.pcard .qa .tgt b {
  color: var(--ink-2);
  font-weight: 650;
}
.pcard .qa .ctl {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--tint);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.pcard .qa input {
  border: 0;
  border-radius: 0;
  background: transparent;
  height: 30px;
  padding: 0 9px;
  font-size: 12px;
  box-shadow: none;
}
.pcard .qa input:focus {
  outline: none;
  box-shadow: none;
}
.pcard .qa [data-add] {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  height: 30px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 650;
  background: var(--white);
  color: var(--teal-deep);
  box-shadow: none;
}
.pcard:hover .qa .ctl,
.pcard:focus-within .qa .ctl,
.pcard:has(.inlist) .qa .ctl {
  border-color: var(--teal);
  background: var(--white);
}
.pcard:focus-within .qa .ctl {
  box-shadow: 0 0 0 3px rgba(14, 90, 84, 0.12);
}
.pcard:hover .qa [data-add],
.pcard:focus-within .qa [data-add],
.pcard:has(.inlist) .qa [data-add] {
  background: var(--teal);
  color: #ffffff;
  border-left-color: var(--teal);
}
.pcard .qa [data-add]:hover {
  background: var(--teal-2);
  color: #ffffff;
}
.pcard .qa .inlist {
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--teal-50);
  color: var(--teal-deep);
  font-size: 11px;
}

/* ---------- 4. Collections Lookbook Showroom ---------- */
.cfilterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px var(--s4);
  padding: 10px 14px;
  margin-bottom: var(--s4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--sh-panel);
}
.cfilterbar .cfilters {
  margin: 0;
  gap: 8px 18px;
}
.cfilterbar .cview-tip {
  margin: 0;
  max-width: 420px;
  line-height: 1.4;
}
.cgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1040px) {
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cgrid { grid-template-columns: minmax(0, 1fr); }
}
.ccard .cv {
  aspect-ratio: 16 / 10;
  padding: 18px;
  background: #ffffff;
}
.ccard .bd {
  padding: 18px 20px 20px;
}
.ccard .bd h3 {
  font-size: 20px;
}
.ccard .ft {
  padding-top: 12px;
  margin-top: auto;
}
.ccard .pr {
  font-size: 18px;
}

/* ---------- 5. Lenses Catalog — Optical Spec Sheet Cards ---------- */
.lmto {
  background: linear-gradient(90deg, var(--teal-50), var(--white) 58%);
  border: 1px solid var(--teal-100);
  border-radius: var(--r3);
  padding: 12px 16px;
  margin-bottom: var(--s5);
  box-shadow: var(--sh-panel);
}
.lmto > span { color: var(--teal-deep); font-weight: 500; }
.lgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1040px) {
  .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lgrid { grid-template-columns: minmax(0, 1fr); }
}
.lcard {
  padding: 18px 20px;
  gap: 12px;
}
.lc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.lc-idx {
  width: 50px;
  height: 50px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  color: var(--teal-deep);
  font: 700 17px / 1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.lc-htx {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.lc-htx .lc-title { margin: 0; }
.lc-specs {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tint);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.lc-specs > div:first-child {
  grid-column: 1 / -1;
}
.lc-specs dt {
  font: 700 10px / 1.1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 2px;
}
.lc-specs dd {
  margin: 0;
  font: 600 12px / 1.35 var(--sans);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.lc-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.lc-foot b {
  font-family: var(--display);
  font-size: 20px;
  color: var(--teal-deep);
}

/* ---------- 6. Prescription Order Sheet (/lenses/rx) ---------- */
.page.rxpage {
  max-width: 1320px;
  padding-bottom: 48px;
}
.rxo-top {
  padding: 14px 18px;
  margin-bottom: 14px;
}
@media (min-width: 1020px) {
  .rxo-top:has(.rxtools) {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr);
    align-items: start;
    gap: 10px 20px;
  }
  .rxo-top:has(.rxtools) .rxo-mem { grid-column: 1 / -1; }
  .rxo-top:has(.rxtools) .rxtools {
    border-top: 0;
    padding-top: 0;
    padding-left: 20px;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }
  .rxo-top:has(.rxtools) .rxtools .rxbatch {
    flex: 0 0 auto;
    min-width: 0;
  }
  .rxo-top:has(.rxtools) .rxtools .row {
    justify-content: flex-start;
  }
}
.rxo-store {
  gap: 4px 12px;
}
.rxo-note {
  margin-top: 2px;
  line-height: 1.4;
}
/* Generous proportional widths so Type & Coating prices never clip */
.rxl {
  grid-template-columns: minmax(112px, 0.85fr) minmax(175px, 1.35fr) minmax(130px, 0.95fr) minmax(185px, 1.45fr) minmax(200px, 1.25fr);
  gap: 10px 12px;
  padding: 11px var(--s5);
}
@media (max-width: 1100px) {
  .rxl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rxl-pick { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}
.rxp-h {
  padding: 12px var(--s5) 10px;
}
.rxp-x {
  padding: 4px var(--s5) 12px;
}
.rxp-f {
  padding: 10px var(--s5);
}
.rxadd {
  padding: 12px var(--s5);
}
/* Keep submit dock clean in normal flow below the sheet so it never covers active fields */
.rxbar {
  position: static;
  margin-top: 16px;
}

/* ---------- 7. Cart & Order Page (/orders/:no) ---------- */
.ostep-card {
  padding: 12px 20px;
  margin-bottom: var(--s4);
}
.osplit {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  gap: 20px;
  align-items: start;
}
@media (max-width: 960px) {
  .osplit { grid-template-columns: minmax(0, 1fr); }
}
.odside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.odside > .panel + .panel { margin-top: 0; }
.odside > .sumcard {
  border-top: 3px solid var(--teal);
}

/* ---------- 8. Member Center: Dashboard, Inventory, Stores & Profile ---------- */
.mfig {
  position: relative;
  overflow: hidden;
  border-top: 3px solid transparent;
}
.mfig.is-primary {
  border-top-color: var(--teal-deep);
}
.mfig.is-primary b { color: var(--teal-deep); }
.mfig.is-teal {
  border-top-color: var(--teal);
}
.mfig.is-gold {
  border-top-color: var(--gold);
}
.mfig.is-alert {
  border-top-color: var(--red);
  background: #fff9f7;
}
.mfig.is-alert b { color: var(--red); }
.mfig.is-zero {
  background: var(--tint);
  border-color: var(--line);
  box-shadow: none;
}
.mfig.is-zero b {
  color: var(--ink-4);
}
.mgrid {
  align-items: stretch;
  gap: 16px;
}
.mgrid > .panel {
  display: flex;
  flex-direction: column;
}
.mrep-head {
  padding: 11px 16px;
  margin: 22px 0 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--sh-panel);
  align-items: center;
}
.mrep-head .label {
  font-size: 13px;
  color: var(--ink);
}

/* Member Inventory — clean 2-level hierarchy */
.invps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.invp {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r3);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--sh-panel);
  text-align: left;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.invp:hover {
  border-color: var(--teal-100);
  box-shadow: var(--sh1);
}
.invp.on {
  background: var(--teal-50);
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.invtabs {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--sh-panel);
}

/* Stores & Warehouses — full-width grid + 2-col permissions + non-crushing logins */
#stores-sec > .panel-head {
  flex-wrap: wrap;
  gap: 10px 16px;
}
#stores-sec > .panel-head > div:first-child {
  flex: 1 1 280px;
  min-width: 0;
}
#storelist .st-group[data-group="warehouses"] .addr-list,
.st-group[data-group="warehouses"] .addr-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
#storelist .st-group[data-group="stores"] .addr-list,
.st-group[data-group="stores"] .addr-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  #storelist .st-group[data-group="stores"] .addr-list,
  .st-group[data-group="stores"] .addr-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
.st-perms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.st-perms .st-bulk {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  align-content: start;
  grid-template-rows: auto auto 1fr;
}
.st-perms .st-bulk .lbl {
  margin: 0;
  line-height: 1.3;
}
.st-perms .st-bulk .select {
  width: 100%;
}
.st-perms .st-bulk .xs {
  line-height: 1.4;
}
@media (max-width: 600px) {
  .st-perms { grid-template-columns: minmax(0, 1fr); }
}
/* Inside narrow admin member drawer, keep permissions single-column */
.mem-detail #storelist .st-group[data-group="stores"] .addr-list,
.mem-detail #storelist .st-group[data-group="warehouses"] .addr-list,
.mem-detail .st-group[data-group="stores"] .addr-list,
.mem-detail .st-group[data-group="warehouses"] .addr-list,
.mem-detail .st-perms {
  grid-template-columns: minmax(0, 1fr);
}
.st-login {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}
.st-login .st-lw {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 10px;
  min-width: 0;
}
.st-login .st-le {
  font-weight: 650;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.st-login .st-ls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: flex-start;
}
.st-login .st-la {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

/* Company Profile & Store Profile */
.pf-card {
  padding: 18px 22px;
  background: linear-gradient(100deg, var(--teal-50), var(--white) 46%);
  border-color: var(--teal-100);
}
.pf-grid {
  align-items: stretch;
}
.pf-grid > .panel {
  display: flex;
  flex-direction: column;
}

/* ---------- 9. Admin Orders — Card Queue + 2-Column Command Detail ---------- */
.statbar .st {
  padding: 12px 18px;
}
.statbar b {
  font-size: 24px;
}
.statbar .st.hot {
  box-shadow: inset 3px 0 0 var(--red);
  background: #fffaf8;
}
.olayout {
  grid-template-columns: minmax(360px, 410px) minmax(0, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) {
  .olayout { grid-template-columns: minmax(0, 1fr); }
}
/* Transform cramped 3-column order table into untruncated stacked queue cards */
.otbl,
.otbl tbody {
  display: block;
  width: 100%;
}
.otbl thead {
  display: none;
}
.otbl tbody tr:not([data-no]) {
  display: block;
}
.otbl tbody tr:not([data-no]) td {
  display: block;
  width: 100%;
}
.otbl tbody tr[data-no] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s var(--ease);
}
.otbl tbody tr[data-no]:last-child {
  border-bottom: 0;
}
.otbl tbody tr[data-no]:hover {
  background: var(--tint);
}
.otbl tbody tr[data-no].sel {
  background: var(--teal-50);
  box-shadow: inset 3px 0 0 var(--teal);
}
.otbl tbody tr[data-no] td {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
}
.otbl tbody tr[data-no] td:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.otbl tbody tr[data-no] td:nth-child(1) .sub {
  margin-top: 0;
}
#listp .otbl tbody tr[data-no] td.client {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  max-width: none;
}
#listp .otbl tbody tr[data-no] td.client b {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
}
#listp .otbl tbody tr[data-no] td.client .sub,
#listp .otbl tbody tr[data-no] td.client div {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.otbl tbody tr[data-no] td.num {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
  white-space: nowrap;
}
.otbl tbody tr[data-no] td.num > b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.otbl tbody tr[data-no] td.num .ost {
  margin-top: 6px;
}

/* Single-row Status Update bar inside Admin Order detail */
.od-stbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
}
.od-stbar .od-pair {
  margin-top: 0;
  gap: 10px;
}
.od-stbar .od-pair .field {
  margin-top: 0;
}
.od-stbar #setst {
  height: 36px;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .od-stbar { grid-template-columns: minmax(0, 1fr); }
}

/* 2-Column Command Layout inside Admin Order Detail when wide enough */
@container (min-width: 640px) {
  .od-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
  #statusbox {
    grid-column: 1 / -1;
    order: 1;
    background: var(--tint);
  }
  #od-lines {
    grid-column: 1 / -1;
    order: 2;
  }
  #od-cust {
    grid-column: 1;
    order: 3;
    border-right: 1px solid var(--line);
    height: 100%;
  }
  #od-extras {
    grid-column: 2;
    order: 4;
    height: 100%;
  }
  #od-notes {
    grid-column: 1;
    order: 5;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    height: 100%;
  }
  #od-tl {
    grid-column: 2;
    order: 6;
    border-bottom: 0;
    height: 100%;
  }
  #od-stats,
  #od-stock,
  #od-rfid {
    grid-column: 1 / -1;
    order: 7;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }
}

/* ---------- 10. Admin Rx Lab, Purchasing, Members & Lenses Edit Mode ---------- */
.labsplit {
  grid-template-columns: minmax(350px, 0.9fr) minmax(0, 1.45fr);
  gap: 18px;
}
@media (max-width: 1060px) {
  .labsplit { grid-template-columns: minmax(0, 1fr); }
}
/* Compact quiet Rx status chips so active stages jump out & list rises higher */
.labq {
  gap: 4px;
}
.labq button {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.labq button:not(.on):not(:has(.n)) {
  opacity: 0.62;
  background: var(--tint);
}
.labq button:not(.on):not(:has(.n)):hover {
  opacity: 1;
}
/* Let Rx queue item store/member text wrap cleanly instead of truncating mid-word */
.labrow .lr-mid {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.38;
}
/* Fix Admin Purchasing 'Where it goes' 3-select row truncation */
.labsplit .form .fgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.labsplit .form .fgrid > .field:first-child {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .labsplit .form .fgrid { grid-template-columns: minmax(0, 1fr); }
}
/* Align Admin Members left column header cleanly with right detail panel */
.mem-left > .page-head {
  min-height: 44px;
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.mtbl td.co { min-width: 150px; max-width: 185px; }
.mtbl td.co .ct,
.mtbl td.co .em { max-width: 165px; }
/* Tighten Admin Lenses edit-mode cards for better scan density */
.lline .bd {
  padding: 14px 16px;
  gap: 8px;
}
.lline .ctl {
  padding: 6px 0;
}
.lline .cprice {
  padding-top: 8px;
}
.lline .acts {
  padding: 10px 16px;
}
/* Admin Inventory figures pill bar */
.invtools #figs {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.invtools #figs:empty {
  display: none;
}

/* ---------- 11. Edit Mode Workspace, Side Drawers & Embedded Editors ---------- */
/* Consistent height for sticky topbar + edit strip so drawers dock cleanly below */
.topbar.editing > .in {
  min-height: 60px;
  height: 60px;
}
.topbar.editing .edstrip {
  min-height: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
}
.topbar.editing .edstrip .es-in {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edrawer {
  --edw: min(560px, 44vw);
  top: 100px;
  z-index: 45;
  width: var(--edw);
  box-shadow: -12px 0 32px -12px rgba(6, 43, 39, 0.14);
}
@media (min-width: 1200px) {
  body.has-edrawer .catalog,
  body.has-edrawer .cedit,
  body.has-edrawer .ledit {
    margin-right: min(560px, 44vw);
  }
}
@media (max-width: 1199px) {
  .edrawer {
    --edw: min(540px, 100vw);
    z-index: 110;
  }
}
@media (max-width: 720px) {
  .edrawer {
    top: 0;
    --edw: 100vw;
    z-index: 110;
  }
}

/* Prevent filter sidebar price inputs from clipping "From" -> "Fror" */
.frange {
  gap: 5px;
}
.frange .input {
  padding: 0 6px;
  font-size: 12px;
  min-width: 0;
}

/* Adapt Collections edit grid smoothly when side drawer is open */
@media (max-width: 1620px) {
  body.has-edrawer .cedit .cgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (max-width: 1280px) {
  body.has-edrawer .cedit .cgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
body.has-edrawer .cedit .ftoolbar {
  flex-wrap: wrap;
  gap: 8px;
}
body.has-edrawer .cedit #q {
  flex: 1 1 180px;
  max-width: 240px;
}
.ecoll .ccard .ft {
  gap: 8px;
  flex-wrap: nowrap;
}
.ecoll .ccard .pr {
  white-space: nowrap;
}

/* Style Editor inside #edrawer (iframe .embed): compact 2-column form + slim sticky action bar */
.embed .amain {
  padding: 0 16px 24px;
}
.embed .amain .page-head {
  margin: 0 -16px 14px;
  padding: 10px 16px;
  min-height: 48px;
  align-items: center;
}
.embed .amain .page-head > div:first-child > .eyebrow {
  font-size: 10.5px;
  margin-bottom: 1px;
}
.embed .amain .page-head h1 {
  font-size: 18px;
  line-height: 1.15;
}
@media (min-width: 420px) {
  .embed .fgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
}
.embed .fgrid .field {
  margin-top: 0;
}
.embed .panel + .panel {
  margin-top: 12px;
}
.embed .panel-head {
  padding: 10px 14px;
}
.embed .panel-body {
  padding: 12px 14px;
}

/* Full-page Style Editor (/admin/products/:id): wider right rail for clean tier pricing rows */
@media (min-width: 1100px) {
  html:not(.embed) .pe-split {
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 435px);
    gap: 20px;
  }
}

/* Lenses Edit Mode (/lenses?edit=1 & /lenses/rx?edit=1) */
.ledit .page-head .ltabs {
  margin: 0;
}
.ledit .ctools {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 14px;
  align-items: center;
}
.ledit .ctools .select {
  height: 32px;
  background-color: var(--white);
}
.ledit .lline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1120px) {
  .ledit .lline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .ledit .lline-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1620px) {
  body.has-edrawer .ledit .lline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (max-width: 1320px) {
  body.has-edrawer .ledit .lline-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.lline .ctl {
  padding: 6px 0;
  min-height: 34px;
}
.lline .stats {
  margin-bottom: 2px;
}

/* Lens Editor Drawer: 2-column specs so "One pair per envelope" never clips */
.ledrawer .ed-body .fgrid.especs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.ledrawer .ed-body .fgrid.especs .field {
  margin-top: 0;
}
@media (max-width: 420px) {
  .ledrawer .ed-body .fgrid.especs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Prescription Options Price Table (/lenses/rx?edit=1) */
.rxtbl .rxc {
  width: 140px;
}
.rxtbl .rxin {
  width: 112px;
  max-width: 100%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rxcoats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}
.rxcoat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}
.rxcoat > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rxcoat .affix {
  width: 112px;
  flex: none;
  background: var(--white);
}
.rxt-foot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--sh2);
  padding: 12px 16px;
}

/* ---------- 12. Storefront Topbar Declutter, Display Name, Folded History & Role Sidebars ---------- */

/* 12a. Calm, airy topbar right cluster: Edit mode | Account+Role | Cart */
.topbar .acct {
  gap: 10px;
}
.topbar .edswitch {
  height: 30px;
  padding: 0 10px 0 4px;
  background: transparent;
  border-color: var(--line-2);
  position: relative;
  margin-right: 6px;
}
.topbar .edswitch::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.topbar .edswitch .es-tr {
  width: 36px;
  height: 22px;
}
.topbar .edswitch .es-kn {
  width: 18px;
  height: 18px;
}
.topbar .edswitch.on .es-kn {
  transform: translateX(14px);
}
.topbar .ubtn {
  height: 40px;
  padding: 0 8px 0 5px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  gap: 8px;
  max-width: 290px;
}
.topbar .ubtn:hover,
.topbar .ubtn[aria-expanded="true"] {
  background: var(--paper);
  border-color: var(--line);
}
.topbar .ubtn .av {
  width: 28px;
  height: 28px;
  background: var(--teal-50);
  color: var(--teal-deep);
}
.topbar .ubtn .ub-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  text-align: left;
}
.topbar .ubtn .co {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink);
  max-width: 220px;
}
.topbar .ubtn .rolepill {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.15;
  gap: 4px;
  letter-spacing: 0.01em;
}
.topbar .ubtn .rolepill::before {
  width: 5px;
  height: 5px;
}
.topbar .ubtn .rolepill.member { color: var(--ink-3); }
.topbar .ubtn .rolepill.member::before { background: var(--ink-4); }
.topbar .ubtn .rolepill.store { color: var(--teal); }
.topbar .ubtn .rolepill.store::before { background: var(--teal); }
.topbar .ubtn .rolepill.vra { color: var(--teal-deep); }
.topbar .ubtn .rolepill.vra::before { background: #1ea696; }
.topbar .ubtn .rolepill.super { color: #9a6710; }
.topbar .ubtn .rolepill.super::before { background: var(--sun); }
.topbar .cartlink {
  height: 34px;
  padding: 0 10px 0 12px;
  gap: 6px;
}
@media (max-width: 720px) {
  .topbar .edswitch { margin-right: 0; }
  .topbar .edswitch::after { display: none; }
  .topbar .ubtn { height: 34px; padding: 0 4px; gap: 4px; }
  .topbar .ubtn .ub-id { display: none; }
}

/* 12b. Collection Minimum order & all drawer 2-column field alignment */
.edrawer .esec .fgrid {
  align-items: end;
  gap: 10px 12px;
}
.edrawer .esec .fgrid .field {
  margin-top: 0;
}

/* 12c. Frames Editor: Collapsible Locked Fields & Change History + Optimal Drawer Order */
.pe-fold > summary.panel-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-bottom: 0;
  border-radius: var(--rp);
  transition: background 0.14s var(--ease);
}
.pe-fold > summary.panel-head::-webkit-details-marker { display: none; }
.pe-fold > summary.panel-head:hover { background: var(--tint); }
.pe-fold[open] > summary.panel-head {
  border-bottom: 1px solid var(--line);
  border-radius: var(--rp) var(--rp) 0 0;
}
.pe-fold > summary.panel-head::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  flex: none;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform 0.16s var(--ease);
}
.pe-fold[open] > summary.panel-head::after {
  transform: rotate(45deg);
}
.pe-fold .pe-cnt {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font: 650 11px / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.pe-fold[open] .pe-cnt {
  background: var(--teal-50);
  color: var(--teal-deep);
}
/* In embedded side drawer: Style details -> Price -> Images & Colourways -> Locked -> History */
.embed .pe-split {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.embed .pe-split > div,
.embed .pe-split > aside {
  display: contents;
}
.embed .pe-split .panel + .panel {
  margin-top: 0;
}
.embed .pe-split .panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  scroll-margin-top: 76px;
}
.embed #details { order: 1; }
.embed #pricing { order: 2; }
.embed #images { order: 3; }
.embed #pe-locks { order: 4; }
.embed #pe-history { order: 5; }

/* 12d. Product Display Name in Frames Card & Product Modal */
.pcard .sname {
  display: block;
  margin-top: -3px;
  font: 600 12.5px / 1.25 var(--sans);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard .sname:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pm .ttl {
  align-items: flex-start;
  gap: 12px;
}
.pm .ttl-l {
  min-width: 0;
  flex: 1;
}
.pm-sname {
  margin-top: 2px;
  font: 600 14px / 1.3 var(--sans);
  color: var(--ink-2);
}

/* 12e. Role-Differentiated Admin Sidebars (VRA Admin = Peacock Emerald | Super Admin = Obsidian Slate-Indigo) */
body.role-vra .aside {
  background: linear-gradient(180deg, #062b27 0%, #093b36 54%, #05221f 100%);
  border-top: 3px solid #2ec4b6;
}
body.role-vra .aside .rolepill.vra {
  background: rgba(46, 196, 182, 0.16);
  border-color: rgba(46, 196, 182, 0.42);
  color: #ccf5f0;
}
body.role-vra .aside .rolepill.vra::before {
  background: #4ce0c5;
}
body.role-super .aside {
  background: linear-gradient(180deg, #151a26 0%, #1d2436 54%, #10141e 100%);
  border-top: 3px solid var(--sun);
  border-right-color: rgba(255, 255, 255, 0.08);
}
body.role-super .aside .brand {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.role-super .aside .rolepill.super {
  background: rgba(230, 163, 56, 0.18);
  border-color: rgba(230, 163, 56, 0.46);
  color: #f8d794;
}
body.role-super .aside .rolepill.super::before {
  background: #f0b64d;
}
body.role-super .aside nav a:hover {
  background: rgba(255, 255, 255, 0.07);
}
body.role-super .aside nav a.on {
  background: rgba(230, 163, 56, 0.13);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--sun);
}
body.role-super .aside nav a.on svg {
  color: var(--sun);
}
body.role-super .aside .sf,
body.role-super .aside .aux,
body.role-super .aside .who {
  border-color: rgba(255, 255, 255, 0.08);
}
body.role-super .aside .who-acts .link {
  color: #f2c879;
}
body.role-super .aside .who-acts .link:hover {
  color: #ffffff;
}

/* 12f. Printable Stock Slip (.slipdoc) — Restrained Executive Business Document (Screen + Print) */
.slipdoc {
  position: relative;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--white);
}
.slipdoc::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--teal);
}
.slipdoc .panel-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
  align-items: flex-start;
}
.slipdoc .panel-head .label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.slipdoc .panel-head h2 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.slipdoc .invpad {
  padding: 14px 22px;
  background: #f9faf9;
  border-bottom: 1px solid var(--line);
}
.slipdoc .dl {
  gap: 6px 18px;
}
.slipdoc .dl dt {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.slipdoc .tbl thead th {
  background: #f1f4f3;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 2px solid var(--teal);
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 22px;
}
.slipdoc .tbl tbody td {
  padding: 10px 22px;
  border-bottom: 1px solid #ebeeec;
}
.slipdoc .tbl tbody tr:nth-child(even) td {
  background: #f9faf9;
}
.slipdoc .tbl tfoot td {
  background: #f3f8f7;
  color: var(--ink);
  border-top: 2px solid var(--teal);
  padding: 11px 22px;
  font-weight: 700;
}
.slipdoc .tbl tfoot td b {
  color: var(--teal);
}
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .slipdoc {
    border-radius: 0;
    border: 1px solid #d7dcd9;
  }
}

/* 12g. Member & Store Orders Hub, Order Detail & Prescription Job Layout Architecture */

/* Keep storefront / member / store footer cleanly anchored at viewport bottom on short pages */
body:not(.admin):not(.auth) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:not(.admin):not(.auth) > main.page {
  flex: 1 0 auto;
  width: 100%;
}

/* Integrated Orders Hub Masthead (.orders-head + .otabs) */
.page-head.orders-head {
  align-items: flex-end;
}
.page-head.orders-head > .oh-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.page-head.orders-head > .oh-left > .eyebrow {
  flex-basis: auto;
  margin: 0;
}
.orders-head .oh-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.orders-head #otabs-slot:empty {
  display: none;
}
.orders-head .otabs {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 10px;
}
.orders-head .otabs button {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 7px;
}

/* 4-Card Order Overview KPI Strip (.okpis) */
.okpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 820px) {
  .okpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.okpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--sh-panel);
  overflow: hidden;
  transition: border-color 0.14s var(--ease), box-shadow 0.16s var(--ease), transform 0.14s var(--ease);
}
.okpi::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.5px;
  background: var(--line);
}
.okpi.is-teal::before { background: var(--teal); }
.okpi.is-gold::before { background: var(--sun); }
.okpi.is-zero::before { background: transparent; }
.okpi b {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.okpi.is-zero b { color: var(--ink-3); }
.okpi span {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
  margin-top: 2px;
}
.okpi small {
  font-size: 11px;
  color: var(--ink-4);
}
button.okpi {
  cursor: pointer;
}
button.okpi:hover {
  border-color: var(--teal-100);
  box-shadow: var(--sh1);
  transform: translateY(-1px);
}
button.okpi.on {
  border-color: var(--teal);
  background: var(--teal-50);
  box-shadow: 0 0 0 1px var(--teal);
}
button.okpi.on b { color: var(--teal-deep); }

/* Elevated Draft Cart & Pending Store Approval Cards */
.panel.oaccent-teal {
  border-left: 3px solid var(--teal);
  margin-bottom: 14px;
}
.panel.oaccent-gold {
  border-left: 3px solid var(--sun);
  margin-bottom: 14px;
}

/* Cohesive Panel Toolbar (Orders + Prescription Jobs) */
.panel-head.otoolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 18px;
}
.otoolbar .otb-l {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}
.otoolbar .otb-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
.ochips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.ochip {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  font: 600 11.5px / 1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s var(--ease);
}
.ochip:hover {
  border-color: var(--teal-100);
  color: var(--teal-deep);
  background: var(--teal-50);
}
.ochip.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}
.osearch {
  width: 190px;
  max-width: 100%;
  height: 30px;
  font-size: 12.5px;
  background: var(--tint);
}
.osearch:focus {
  background: var(--white);
}
@media (max-width: 680px) {
  .osearch { width: 100%; }
}

/* Refined Order Table Rows */
.ord-tbl tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}
.ord-tbl tbody tr.click:hover td {
  background: rgba(14, 90, 84, 0.032);
}
.ord-tbl tbody tr.is-cancelled td {
  opacity: 0.68;
}
.ord-tbl .row-go {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-4);
  transition: transform 0.14s var(--ease), color 0.14s var(--ease);
}
.ord-tbl tbody tr.click:hover .row-go {
  color: var(--teal);
  transform: translateX(2px);
}

/* Order Detail (/orders/:no) & Rx Job (/rx/:no) Page Head Stacking Fix */
#ostatus,
.rxjob-head > div:first-child > .row {
  flex-basis: 100%;
  margin-top: 6px !important;
  gap: 8px 10px;
}

/* Balanced Left Main Column on Order Detail */
.osplit > .odmain {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}
.osplit > .odmain > .panel {
  margin-top: 0;
}
.osplit > .odmain > .panel[hidden] {
  display: none;
}
.ostock-card {
  border-left: 3px solid var(--teal);
  background: var(--white);
}
.ostock-card:has(.rec-ic.is-warn) {
  border-left-color: var(--warn);
}
.ostock-card:has(.rec-before) {
  border-left-color: var(--line-2);
}
.rxjob-head {
  align-items: flex-end;
}
.rxjob-head > div:first-child {
  flex: 1 1 420px;
}

/* Unmistakable Back Navigation Bar on Order & Rx Detail Pages */
.back-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  flex-basis: 100%;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font: 600 var(--fs-xs) / 1 var(--sans);
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(15, 25, 24, 0.04);
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease), background 0.14s var(--ease), transform 0.14s var(--ease);
}
.back-link svg {
  width: 13px;
  height: 13px;
  transition: transform 0.14s var(--ease);
}
.back-link:hover {
  border-color: var(--teal);
  background: var(--teal-50);
  color: var(--teal);
}
.back-link:hover svg {
  transform: translateX(-2px);
}
.back-sep {
  color: var(--ink-4);
  font-size: var(--fs-xs);
}
.back-cur {
  margin: 0;
  font: 600 var(--fs-2xs) / 1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Timeline "Received into stock" Event Badge */
.badge.received {
  background: var(--teal-50);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(14, 90, 84, 0.22);
}

/* Redesigned Order Stock Receiving Panel (Member, Store & Admin) */
.rec-card {
  display: grid;
  gap: 14px;
}
.rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rec-head-l {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rec-ic {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal);
  flex: none;
}
.rec-ic svg {
  width: 14px;
  height: 14px;
}
.rec-ic.is-warn {
  background: var(--warn-50);
  color: var(--warn);
}
.rec-ic.is-muted {
  background: var(--paper-2);
  color: var(--ink-3);
}
.rec-prog {
  display: grid;
  gap: 6px;
}
.rec-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.rec-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
  transition: width 0.25s var(--ease);
}
.rec-bar i.is-warn {
  background: linear-gradient(90deg, var(--teal) 0%, #c8861e 100%);
}
.rec-note-warn {
  color: var(--warn);
  font-weight: 600;
}
.rec-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
}
.rec-meta > div {
  min-width: 0;
}
.rec-meta dt {
  font: 500 11px / 1.2 var(--sans);
  color: var(--ink-3);
  margin-bottom: 3px;
}
.rec-meta dd {
  margin: 0;
  font: 500 var(--fs-sm) / 1.3 var(--sans);
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .rec-meta {
    grid-template-columns: 1fr;
  }
}
.rec-tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow-x: auto;
}
.rec-tbl {
  margin: 0;
}
.rec-tbl thead th {
  background: var(--paper);
  font-size: 11px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.rec-tbl tbody td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}
.rec-tbl tbody tr.is-diff td {
  background: rgba(196, 132, 29, 0.07);
}
.rec-tbl tfoot td {
  background: var(--paper);
  border-top: 1px solid var(--line-2);
  font-weight: 600;
  padding-top: 9px;
  padding-bottom: 9px;
}
.rec-it-t {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--ink);
}
.rec-it-sub {
  display: block;
  margin-top: 1px;
}
.rec-st {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 11px / 1.35 var(--sans);
  white-space: nowrap;
}
.rec-st.ok {
  background: var(--ok-50);
  color: var(--ok);
}
.rec-st.short {
  background: var(--warn-50);
  color: var(--warn);
}
.rec-st.over {
  background: var(--teal-50);
  color: var(--teal);
}
.rec-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.rec-cta-body {
  flex: 1 1 260px;
  min-width: 0;
}
.rec-cta-body p {
  margin: 6px 0 0;
}
.rec-cta-btn {
  flex: none;
}
.rec-before p {
  margin: 6px 0 0;
}

/* Order List (/orders) 1-to-1 Inventory Receiving Pills */
.ord-st-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ord-st-row {
  margin-top: 5px;
}
.ord-st-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 11px / 1.35 var(--sans);
  white-space: nowrap;
  text-decoration: none !important;
}
.ord-st-pill svg {
  width: 11px;
  height: 11px;
  flex: none;
}
.ord-st-pill.is-wait {
  background: var(--teal-50);
  color: var(--teal);
  border: 1px solid rgba(14, 90, 84, 0.25);
  transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.ord-st-pill.is-wait:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.ord-st-pill.is-diff {
  background: var(--warn-50);
  color: var(--warn);
}
.ord-st-pill.is-ok {
  background: var(--ok-50);
  color: var(--ok);
}
.ord-st-pill.is-pre {
  background: var(--paper-2);
  color: var(--ink-3);
  font-weight: 500;
}

/* Inventory → To receive Cross-Links & Multi-Button Row */
.invi-link {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.14s var(--ease);
}
.invi-link:hover {
  color: var(--teal);
  text-decoration: underline;
}
.invi-a {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Calm Teal Order Breakdown Progress Bars */
.srow .sbar {
  background: var(--teal-50);
}
.srow .sbar i {
  background: #4f9891;
}
.srow:first-of-type .sbar i {
  background: var(--teal);
}

/* Prescription Job Detail (/rx/:no) Side Column & Eye Badges */
.rxjob-side {
  display: grid;
  gap: 14px;
  align-content: start;
}
.rxjob-side > .panel + .panel {
  margin-top: 0;
}
.rxjob-side > .sumcard {
  border-top: 2.5px solid var(--teal);
}
.rx-div {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.rxjob-meta .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-transform: none;
}
.re-b {
  background: var(--teal-deep);
}
tr:nth-child(even) .re-b,
.rxcheck li:nth-child(even) .re-b {
  background: var(--teal);
}

/* Round 51: Branch stock availability, redesigned storefront card, lead time & reorder alerts */
.pcard .pic .ptop {
  height: auto;
  min-height: 28px;
  padding: 6px 8px 2px;
}
.pcard .pic .ptop-r {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.pcard .pic .ptop-r .vw {
  position: absolute;
  right: 0;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}
.pcard .pic .ptop-r:has(.vw.show) .stk-pill {
  opacity: 0;
}
.stk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 7px;
  border-radius: 999px;
  font: 600 10.5px / 1.2 var(--sans);
  letter-spacing: -0.005em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.15s var(--ease);
}
.stk-pill b {
  font-weight: 750;
}
.stk-pill .sdot,
.qstk .sdot,
.inv-alert .sdot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: none;
  display: inline-block;
}
.stk-pill.in {
  background: var(--teal-50);
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 1px rgba(14, 90, 84, 0.16);
}
.stk-pill.in .sdot,
.qstk.in .sdot {
  background: var(--teal);
}
.stk-pill.low {
  background: #fdf3e1;
  color: #7c4b09;
  box-shadow: inset 0 0 0 1px rgba(200, 127, 23, 0.24);
}
.stk-pill.low .sdot,
.qstk.low .sdot,
.inv-alert .sdot.low {
  background: #c87f17;
}
.stk-pill.out {
  background: #f3f1ec;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
}
.stk-pill.out .sdot,
.qstk.out .sdot {
  background: transparent;
  box-shadow: inset 0 0 0 1.4px var(--ink-4);
}
.pcard .pic .cap .cap-stk {
  font-style: normal;
  font-weight: 600;
}
.pcard .pic .cap .cap-stk.in { color: var(--teal); }
.pcard .pic .cap .cap-stk.low { color: #9a5d0c; }
.pcard .pic .cap .cap-stk.out { color: var(--ink-3); }

/* Swatch micro availability dot (bottom-left of colourway tile; cart count stays top-right) */
.sw button .sw-dot {
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  pointer-events: none;
}
.sw button .sw-dot.in {
  background: var(--teal);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
}
.sw button .sw-dot.low {
  background: #c87f17;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
}
.sw button .sw-dot.out {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1.2px #b5b0a6;
}

/* Redesigned quick-add target row & inline backorder lead-time notice */
.pcard .qa .tgt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.pcard .qa .tgt-l {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcard .qa .tgt-r {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pcard .qa .qa-st {
  font-size: 10.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pcard .qa .qa-st.in { color: var(--teal); }
.pcard .qa .qa-st.low { color: #9a5d0c; }
.pcard .qa .qa-st.out { color: var(--ink-3); }
.pcard .qa .qa-eta {
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fdf3e1;
  color: #7c4b09;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
}
.dense .pcard .stk-pill {
  padding: 2px 5px;
  font-size: 10px;
}
.dense .pcard .stk-pill.in span,
.dense .pcard .stk-pill.low span,
.dense .pcard .stk-pill .stk-out-lbl {
  display: none;
}
.dense .pcard .qa .qa-st {
  display: none;
}
.large .pcard .pic .ptop {
  padding: 8px 10px 4px;
}
.large .pcard .stk-pill {
  padding: 3px 8px;
  font-size: 11px;
}

/* Product modal stock pill, colourway stock readout & footer ETA */
.side-scroll .eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pm-pills {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pm-stk {
  padding: 1px 7px;
  font-size: 10.5px;
  line-height: 1.25;
}
.pm-mystk {
  padding: 1px 6px;
  font-size: 10.5px;
  line-height: 1.25;
}
/* Keep two-line colourway name + stock readout inside the 32px tile height across macOS/Linux fonts */
.qrow .nm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.qrow .nm div:first-child {
  line-height: 1.2;
}
.qrow .nm .il {
  display: block;
  font-size: 10.5px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qrow .nm .il[hidden] { display: none; }

/* Round 51: Aligned columnar SKU stock matrix in Product Modal (VRA stock | My stock / Store | Order qty) */
.qcols {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 8px;
  padding: 0 6px 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.qcols[hidden] { display: none; }
.qcols .qh-col { grid-column: 1 / 3; }
.qcols .qh-num { text-align: right; white-space: nowrap; }
.qcols.has-av,
#pm-rows.has-av .qrow {
  grid-template-columns: 56px minmax(0, 1fr) 84px 76px;
  gap: 8px;
}
.qcols.has-av.has-my,
#pm-rows.has-av.has-my .qrow {
  grid-template-columns: 56px minmax(0, 1fr) 82px 74px 74px;
  gap: 8px;
}
.qcols.has-av.ro,
#pm-rows.has-av.ro .qrow {
  grid-template-columns: 56px minmax(0, 1fr) 84px;
}
.qcols.has-av.has-my.ro,
#pm-rows.has-av.has-my.ro .qrow {
  grid-template-columns: 56px minmax(0, 1fr) 82px 74px;
}
.qvra, .qmy-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.qpill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.qpill b { font-weight: 700; }
.qpill small { font-size: 10px; font-weight: 500; opacity: 0.85; }
.qpill.in {
  background: var(--teal-50);
  color: var(--teal-deep);
}
.qpill.low {
  background: #fdf3e1;
  color: #8a5308;
}
.qpill.out {
  background: var(--paper-2);
  color: var(--ink-3);
}
.qpill .sdot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.qpill.in .sdot { background: var(--teal); }
.qpill.low .sdot { background: #d48215; }
.qpill.out .sdot { background: transparent; border: 1.5px solid var(--ink-4); }

.qmy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 46px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.qmy b { font-weight: 700; color: var(--ink); }
.qmy small { font-size: 10px; font-weight: 500; color: var(--ink-3); }
.qmy.low {
  border-color: rgba(200, 127, 23, 0.45);
  background: #fdf3e1;
  color: #7c4b09;
}
.qmy.low b, .qmy.low small { color: #7c4b09; }
.qmy.zero {
  border-color: transparent;
  background: transparent;
  color: var(--ink-4);
  font-weight: 500;
  min-width: 24px;
}

/* Compact 2-column dense mode (13+ colourways / small laptop) & mobile: stack VRA + My stock cleanly under colour name */
#pm-rows.two .qrow,
#pm-rows.two.has-av .qrow,
#pm-rows.two.has-av.has-my .qrow {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 62px;
  grid-template-rows: auto auto;
  row-gap: 1px;
  column-gap: 6px;
  padding: 2px 4px 2px 8px;
}
#pm-rows.two .qrow .nm { grid-column: 1 / 4; grid-row: 1; }
#pm-rows.two .qrow .qvra { grid-column: 1; grid-row: 2; justify-content: flex-start; }
#pm-rows.two .qrow .qmy-cell { grid-column: 2; grid-row: 2; justify-content: flex-start; }
#pm-rows.two .qrow input { grid-column: 4; grid-row: 1 / 3; align-self: center; height: 28px; }
#pm-rows.two .qpill, #pm-rows.two .qmy { height: 17px; padding: 0 5px; font-size: 10px; min-width: 0; }
#pm-rows.two .qmy:not(.zero)::before { content: attr(data-lbl) ": "; font-weight: 500; opacity: 0.85; }
#pm-rows.two .qmy.zero { display: none; }

@media (max-width: 640px) {
  .qcols { display: none; }
  #pm-rows.has-av .qrow,
  #pm-rows.has-av.has-my .qrow {
    grid-template-columns: 48px auto auto minmax(0, 1fr) 72px;
    grid-template-rows: auto auto;
    row-gap: 3px;
    column-gap: 6px;
  }
  #pm-rows .qrow .tile { grid-column: 1; grid-row: 1 / 3; width: 48px; height: 32px; }
  #pm-rows .qrow .nm { grid-column: 2 / 5; grid-row: 1; }
  #pm-rows .qrow .qvra { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  #pm-rows .qrow .qmy-cell { grid-column: 3; grid-row: 2; justify-content: flex-start; }
  #pm-rows .qrow input { grid-column: 5; grid-row: 1 / 3; align-self: center; }
  #pm-rows .qmy:not(.zero)::before { content: attr(data-lbl) ": "; font-weight: 500; opacity: 0.85; }
  #pm-rows .qmy.zero { display: none; }
}
.qstk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qstk.in { color: var(--teal); }
.qstk.low { color: #9a5d0c; }
.qstk.out { color: var(--ink-3); }
.pm-eta {
  color: #8a5308;
  font-weight: 600;
}
.pm-feta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
}
.pm-feta.in { color: var(--teal); }
.pm-feta.back { color: #8a5308; }

/* Cart & order availability summary + per-line tags */
.oline-st {
  margin-top: 2px;
  font-weight: 600;
}
.oline-st.in { color: var(--teal); }
.oline-st.warn { color: #9a5d0c; }
.oline-st.out { color: var(--ink-3); }
.oavail {
  margin: var(--s3) 0;
  padding: 9px 11px;
  border-radius: var(--r2);
  font-size: var(--fs-xs);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.oavail b { font-weight: 700; }
.oavail.in {
  background: var(--teal-50);
  color: var(--teal-deep);
  border: 1px solid rgba(14, 90, 84, 0.2);
}
.oavail.warn {
  background: #fdf3e1;
  color: #7c4b09;
  border: 1px solid rgba(200, 127, 23, 0.28);
}
.oavail.out {
  background: var(--paper);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}

/* Admin branches 4-col reorder settings & inventory reorder alert bar */
.fgrid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fgrid4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 780px) {
  .fgrid3, .fgrid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.inv-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: var(--s3);
  border-radius: var(--r2);
  background: #fdf3e1;
  border: 1px solid rgba(200, 127, 23, 0.28);
  color: #7c4b09;
  font-size: var(--fs-xs);
}
.inv-cntbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: var(--s2);
  border-radius: var(--r2);
  background: var(--teal-50);
  border: 1px solid rgba(14, 90, 84, 0.22);
  color: var(--teal-deep);
  font-size: var(--fs-xs);
}
.badge.danger {
  background: #fdeceb;
  color: #9f231b;
  box-shadow: inset 0 0 0 1px rgba(159, 35, 27, 0.2);
}

/* Round 51: Monthly & spot stock count workspace (Inventory → Counts) */
.cnt-sched {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.cnt-scard .link { white-space: nowrap; }
.cnt-scard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--rp);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cnt-stop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cnt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.cnt-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s3);
}
@media (max-width: 820px) {
  .cnt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cnt-kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--rp);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cnt-kpi .label {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-3);
}
.cnt-kpi b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cnt-prog {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.cnt-bar {
  flex: 1;
  height: 6px;
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
}
.cnt-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.2s var(--ease);
}
.cnt-bar-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s3);
}
.cnt-add {
  margin-bottom: var(--s3);
}
.cnt-diff {
  font-family: var(--mono);
  font-weight: 650;
  font-size: 12px;
}
.cnt-diff.zero { color: var(--teal); }
.cnt-diff.pos { color: var(--teal-deep); }
.cnt-diff.neg { color: #b42318; }
.ok-t { color: var(--teal); font-weight: 600; }

/* Round 51: Admin branch switcher pills, per-SKU Rules button, & buyer own-stock quiet badge */
.inv-brbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--s3);
}
.inv-brbar[hidden] { display: none; }
.inv-brbar .fchip.on .warn-t { color: #fde68a; }
.rule-txt {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rule-txt.custom {
  color: var(--teal-deep);
  background: var(--teal-50);
  padding: 2px 7px;
  border-radius: 999px;
}
.rule-txt.auto {
  color: #7c4b09;
  background: #fdf3e1;
  padding: 2px 7px;
  border-radius: 999px;
}
.rule-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink-2);
}
.rule-btn:hover {
  border-color: var(--ink-3);
  color: var(--ink);
  background: var(--paper);
}
.rule-btn.on {
  border-color: rgba(14, 90, 84, 0.35);
  color: var(--teal-deep);
  background: var(--teal-50);
}
.inv-defs {
  padding: 8px var(--s4);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.invc.is-low {
  background: #fffaf0;
}
.invc .invc-r {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.invc .badge {
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
}

/* Buyer's own shelf stock quiet boxed pill on storefront cards (clearly distinct from VRA's coloured dot pill) */
.my-stk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.my-stk b { font-weight: 700; color: var(--ink); }
.my-stk svg { flex: none; color: var(--ink-3); }
.my-stk.low {
  border-color: rgba(200, 127, 23, 0.4);
  background: #fdf3e1;
  color: #7c4b09;
}
.my-stk.low b, .my-stk.low svg { color: #7c4b09; }
.dense .pcard .my-stk {
  padding: 0 5px;
  font-size: 10px;
}
.cap-own {
  font-style: normal;
  opacity: 0.85;
}
.oline-my {
  color: var(--ink-3);
  font-weight: 500;
}
.oline-my.low {
  color: #9a5d0c;
  font-weight: 600;
}

/* Round 52: Partial shipments (SH-), Quick Outbound & VSO/VT SKU picker modals */
#od-ships {
  grid-column: 1 / -1;
  order: 2;
}
.sh-list {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s2);
}
.sh-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
}
.sh-card.is-can {
  opacity: 0.68;
}
.sh-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.sh-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.qo-sug {
  margin-top: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--r2);
  background: var(--white);
  box-shadow: var(--sh2);
  max-height: 210px;
  overflow: auto;
}
.qo-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--paper-2);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.qo-opt:last-child { border-bottom: 0; }
.qo-opt:hover { background: var(--paper); }
.qo-list {
  display: grid;
  gap: 6px;
  margin: var(--s2) 0;
  max-height: 220px;
  overflow: auto;
}
.qo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
}
.qo-info {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.qo-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
dialog.dlg > .form { padding: var(--s5); display: grid; gap: var(--s3); }
.doc-kv {
  margin: 0 0 var(--s3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
}
.doc-tbl {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
}
tr.is-void td { opacity: 0.72; }

/* Round 53: Professional WMS Inventory KPI strip, colourway thumbnails, Days-of-Cover badges & row actions */
.inv-kpis {
  margin-bottom: var(--s3);
}
.inv-kpis[hidden] { display: none; }
.inv-kpis .st {
  display: grid;
  justify-content: start;
  justify-items: start;
  align-content: center;
  gap: 3px;
  padding: 14px var(--s5);
  text-align: left;
  transition: background 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.inv-kpis .st > b {
  font: 700 var(--fs-xl) / 1.15 var(--display);
}
.inv-kpis .st small {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}
.inv-kpis .st span b,
.inv-kpis .st span strong {
  font: 600 inherit / inherit var(--sans);
  letter-spacing: 0;
}
.inv-kpis .st.on {
  background: var(--teal-50);
  box-shadow: inset 0 -2px 0 var(--teal);
}
.inv-kpis .st.hot.on {
  background: #fdf3e1;
  box-shadow: inset 0 -2px 0 #c87f17;
}
.inv-sku-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.inv-sku-txt {
  min-width: 0;
  line-height: 1.3;
}
.inv-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 52px;
  height: 28px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.14s, transform 0.14s;
}
button.inv-thumb:hover {
  border-color: var(--teal);
  transform: scale(1.06);
}
.inv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.inv-thumb.sm {
  width: 44px;
  height: 24px;
  cursor: default;
}
.inv-thumb.ph {
  color: var(--ink-4);
  background: var(--paper);
  cursor: default;
}
.inv-thumb.ph svg { width: 15px; height: 15px; }
.doc-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font: 600 11px / 1.45 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.doc-pill.ok {
  background: var(--teal-50);
  color: var(--teal-deep);
}
.doc-pill.warn {
  background: #fdf3e1;
  color: #8c5206;
}
.doc-pill.danger {
  background: var(--red-50);
  color: #b42318;
}
.inv-acts-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inv-vel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.invc .inv-thumb.sm {
  margin-right: 2px;
}

/* Round 54: Store Supply Network — separated Warehouse Supply & Store-to-Store Transfers, Request Basket & Dual-Channel Modal */
.st-supply {
  margin-top: var(--s3);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
  display: grid;
  gap: var(--s3);
}
/* Round 55: Company default store pricing bar, per-store pricing selector & Warehouse operator role pill */
.st-pdef {
  margin: 0 0 var(--s3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--paper);
}
.st-pdef-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.st-pdef-ctrls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.st-perms .st-price-row {
  grid-column: 1 / -1;
}
.st-pm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.st-pm-row .select {
  width: auto;
  min-width: 190px;
  flex: 1 1 190px;
}
.st-pm-inputs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.st-pm-inputs .affix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--white);
  font-size: 12.5px;
  color: var(--ink-2);
}
.st-pm-inputs .affix input {
  width: 58px;
  border: 0;
  padding: 0;
  height: 28px;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}
.st-pm-inputs .affix input:focus {
  outline: none;
}
.rolepill.warehouse {
  background: var(--teal-50);
  color: var(--teal-deep);
  border: 1px solid rgba(13, 122, 114, 0.28);
}
.sup-sec {
  display: grid;
  gap: 4px;
}
.sup-peer-sec {
  padding-top: var(--s3);
  border-top: 1px dashed var(--line);
}
.sup-toggle {
  margin: 0;
}
.sup-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sup-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.sup-chk:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-50);
  color: var(--teal-deep);
}
.sup-chk input {
  accent-color: var(--teal);
  margin: 0;
}
.reqlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--teal);
  background: var(--teal-50);
  color: var(--teal-deep);
  font: 600 var(--fs-sm) / 1 var(--sans);
  cursor: pointer;
  transition: background 0.14s, transform 0.14s;
}
.reqlink:hover {
  background: #d7ede6;
}
.reqlink svg {
  width: 15px;
  height: 15px;
}
.reqlink b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.reqlink.bump {
  animation: bump 0.28s var(--ease);
}
.stk-pill.peer {
  background: #e9f3fb;
  color: #16568a;
  border-color: rgba(22, 86, 138, 0.22);
}
.stk-pill.peer .sdot {
  background: #2573b3;
}
.stk-pill .stk-sep {
  opacity: 0.8;
  font-weight: 500;
}
.qpill.peer {
  background: #e9f3fb;
  color: #16568a;
}
.qpill.peer .sdot {
  background: #2573b3;
}
.pm-chan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  margin: 0 0 var(--s3);
  border-radius: var(--r2);
  background: var(--paper);
  border: 1px solid var(--line);
}
.pm-chbtn {
  border: 0;
  border-radius: calc(var(--r2) - 2px);
  background: transparent;
  padding: 7px 10px;
  font: 600 12.5px / 1.2 var(--sans);
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.pm-chbtn.on {
  background: var(--white);
  color: var(--teal-deep);
  box-shadow: 0 1px 2px rgba(10, 34, 28, 0.08);
}
.pm-ch-note {
  margin: 0 0 var(--s2);
  padding: 6px 10px;
  border-radius: var(--r2);
  background: var(--teal-50);
  color: var(--teal-deep);
}
.pm-src {
  margin-top: 3px;
  max-width: 100%;
  height: 24px;
  padding: 0 22px 0 6px;
  font-size: 11px;
}
.pm-sbrk {
  font-size: 9.5px;
  line-height: 1.15;
  color: var(--ink-4);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#pm-rows.has-sup .qvra {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
#pm-rows.has-sup .qrow .tile {
  width: 100%;
  height: 30px;
}
.qcols.has-sup.has-wh.has-my,
#pm-rows.has-sup.has-wh.has-my .qrow,
.qcols.has-sup.has-peer.has-my,
#pm-rows.has-sup.has-peer.has-my .qrow {
  grid-template-columns: 50px minmax(0, 1fr) 70px 58px 64px;
  gap: 6px;
}
.qcols.has-sup.has-wh.has-peer.has-my,
#pm-rows.has-sup.has-wh.has-peer.has-my .qrow,
.qcols.has-sup.has-wh.has-av.has-my,
#pm-rows.has-sup.has-wh.has-av.has-my .qrow,
.qcols.has-sup.has-peer.has-av.has-my,
#pm-rows.has-sup.has-peer.has-av.has-my .qrow {
  grid-template-columns: 46px minmax(0, 1fr) 64px 64px 54px 60px;
  gap: 6px;
}
.qcols.has-sup.has-wh.has-peer.has-av.has-my,
#pm-rows.has-sup.has-wh.has-peer.has-av.has-my .qrow {
  grid-template-columns: 44px minmax(0, 1fr) 54px 54px 58px 46px 56px;
  gap: 5px;
}
.pm-dupwarn {
  margin: var(--s2) var(--s4) 0;
  padding: 8px 10px;
  border-radius: var(--r2);
  background: #fdf6e6;
  border: 1px solid rgba(190, 122, 16, 0.28);
  color: #7c4a06;
  line-height: 1.4;
}
.callout.warn {
  background: #fdf6e6;
  border-color: rgba(190, 122, 16, 0.28);
  color: #7c4a06;
}
@media (max-width: 720px) {
  .reqlink .cl { display: none; }
}

/* 11-28 (review P1-10/11): a quantity that cannot be used is marked as it is typed, never changed without a word. */
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
