/* VRA trade portal — design system
   Palette and type follow the printed VRA Design Library catalogue: warm paper, ink,
   teal brand mark, red editorial accent for codes/labels, monospace small caps. */
:root {
  --paper: #f7f5f0;
  --paper-2: #efebe3;
  --paper-3: #e7e2d7;
  --white: #fff;
  --line: #e4dfd4;
  --line-2: #cfc8b9;
  --ink: #17160f;
  --ink-2: #4a473e;
  --ink-3: #7f7a6e;
  --ink-4: #a8a397;
  --teal: #0e5a54;
  --teal-2: #0a4641;
  --teal-50: #e6efed;
  --red: #b8361e;
  --red-50: #f7e8e3;
  --sun: #e6a338;
  --ok: #2d7a4c;
  --ok-50: #e5f1e9;
  --warn: #8e6411;
  --warn-50: #f8eed8;

  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", Georgia, "Times New Roman", 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: 14px;
  --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: 3px;
  --r2: 6px;
  --r3: 10px;
  --sh1: 0 1px 2px rgba(23, 22, 15, 0.05);
  --sh2: 0 6px 20px rgba(23, 22, 15, 0.08), 0 1px 3px rgba(23, 22, 15, 0.05);
  --sh3: 0 24px 72px rgba(23, 22, 15, 0.24), 0 4px 12px rgba(23, 22, 15, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --hdr: 56px;
  --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(--serif); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.h1 { font-family: var(--serif); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.h2 { font-size: var(--fs-lg); font-weight: 600; }
.h3 { font-size: var(--fs-md); font-weight: 600; }
.eyebrow { font: 500 var(--fs-2xs) / 1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.label { font: 500 var(--fs-2xs) / 1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; 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(--s5) var(--s5) var(--s7); max-width: 1320px; margin: 0 auto; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: var(--s2); }
.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) 340px; 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(--r2); }
.panel-pad { padding: var(--s5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.panel-body { padding: var(--s4) var(--s5); }
.panel + .panel { margin-top: var(--s4); }
:is(.acoll-grid, .cgrid, .kpis, .split, .adm-split, .fgrid) > .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 var(--s4); 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.01em; 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); }
.btn.sec:hover { border-color: var(--ink-3); }
.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.sm { height: 30px; padding: 0 var(--s3); font-size: var(--fs-xs); }
.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=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(--mono); letter-spacing: 0.06em; }
.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: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.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 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 600 var(--fs-2xs) / 1 var(--sans); letter-spacing: 0.02em; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.plain::before { display: none; }
.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.ok, .badge.active { background: var(--ok-50); color: var(--ok); }
.badge.cancelled, .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: 500 var(--fs-2xs) / 1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); padding: 4px 6px; border-radius: var(--r1); }
.lock { display: inline-block; margin-left: 6px; font: 500 9.5px / 1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); background: var(--warn-50); padding: 3px 5px; border-radius: 3px; vertical-align: 1px; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.tbl th { text-align: left; font: 500 var(--fs-2xs) / 1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 10px var(--s3); border-bottom: 1px solid var(--line); background: var(--white); white-space: nowrap; }
.tbl td { padding: 10px 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: #fbfaf7; }
.tbl tr.sel td { background: var(--teal-50); }
.tbl tr.group td { background: var(--paper); 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; }

/* ---------- 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 h3 { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s2); }
.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: var(--r2); 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.96); backdrop-filter: saturate(1.2) blur(8px); 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: 26px; width: auto; }
.brand .sub { font: 500 var(--fs-2xs) / 1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--line); padding-left: var(--s3); }
.mainnav { display: flex; gap: var(--s1); height: 100%; }
.mainnav a { display: flex; align-items: center; padding: 0 var(--s3); color: var(--ink-2); font-weight: 500; 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: var(--s2); height: 34px; 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: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-2xs) / 1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- catalogue list ---------- */
.catalog { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s5); padding: var(--s4) var(--s5) var(--s7); }
.catalog.no-filters { grid-template-columns: minmax(0, 1fr); }
.catalog.no-filters .filters { display: none; }
.filters { position: sticky; top: calc(var(--hdr) + var(--s4)); max-height: calc(100vh - var(--hdr) - var(--s5)); overflow: auto; padding-right: var(--s1); scrollbar-width: thin; }
.filters .fhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.fgroup { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.fgroup:first-of-type { border-top: 0; }
.fgroup h4 { font: 500 var(--fs-2xs) / 1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.fopt { display: flex; align-items: center; gap: var(--s2); padding: 3px 0; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.fopt:hover { color: var(--ink); }
.fopt .n { margin-left: auto; font-size: var(--fs-2xs); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.fopt.zero { opacity: 0.45; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.dots button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); cursor: pointer; padding: 0; position: relative; }
.dots button.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.toolbar h1 { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.toolbar .count { font: 500 var(--fs-2xs) / 1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.chips:empty { display: none; }
.collpick { position: relative; }
.collpick > button { display: inline-flex; align-items: center; gap: var(--s2); height: 36px; padding: 0 var(--s3); border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--white); cursor: pointer; font-size: var(--fs-sm); max-width: 360px; }
.collpick > button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collpick > button:hover { border-color: var(--ink-4); }
.cpanel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 380px; max-height: 70vh; overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh2); padding: var(--s2); display: none; }
.cpanel.open { display: block; animation: toast-in 0.15s var(--ease); }
.cpanel input { margin-bottom: var(--s2); }
.cpanel .lab { padding: var(--s2) var(--s2) var(--s1); }
.crow { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r1); cursor: pointer; width: 100%; border: 0; background: none; text-align: left; }
.crow:hover { background: var(--paper); }
.crow.on { background: var(--teal-50); }
.crow.soon { opacity: 0.55; cursor: default; }
.crow .tile { width: 56px; height: 36px; flex: none; }
.crow .tile img { padding: 2px; }
.crow .ph { width: 56px; height: 36px; flex: none; display: grid; place-items: center; background: var(--paper-2); border-radius: var(--r1); font: 600 var(--fs-2xs) var(--mono); color: var(--ink-3); }
.crow .n { margin-left: auto; font-size: var(--fs-2xs); color: var(--ink-3); white-space: nowrap; }
.recent { display: flex; gap: 4px; align-items: center; }
.recent button { height: 26px; padding: 0 8px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--white); font: 600 var(--fs-2xs) var(--mono); letter-spacing: 0.04em; color: var(--ink-2); cursor: pointer; }
.recent button:hover { border-color: var(--ink-4); }
.recent button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.pgrid { --min: 200px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min), 1fr)); gap: 14px; }
.dense .pgrid { --min: 166px; gap: 10px; }
.pcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease); min-width: 0; }
.pcard:hover { border-color: var(--line-2); box-shadow: var(--sh2); }
.pcard.flash { box-shadow: 0 0 0 2px var(--teal); }
.pcard .pic { position: relative; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); border-radius: var(--r2) var(--r2) 0 0; overflow: hidden; cursor: pointer; background: #fff; display: block; width: 100%; padding: 0; border-top: 0; border-left: 0; border-right: 0; }
.pcard .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px 8px; transition: opacity 0.18s var(--ease), transform 0.4s var(--ease); }
.pcard:hover .pic img { transform: scale(1.025); }
.pcard .pic .tag { position: absolute; top: 6px; left: 6px; }
.pcard .pic .cap { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 3px 7px; border-radius: var(--r1); background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line); font: 600 var(--fs-2xs) / 1.2 var(--mono); 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); }
.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.02em; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.pcard .sc:hover { color: var(--teal); }
.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 7px; border-radius: var(--r1); background: var(--ink); color: #fff; font: 600 var(--fs-2xs) / 1.2 var(--mono); 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 8px; border: 1px solid var(--line-2); border-radius: var(--r1); 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 10px; font-size: var(--fs-2xs); border-radius: var(--r1); }
.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 .pic img { padding: 4px 6px; }
.filter-toggle .n { min-width: 18px; height: 18px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 10px; display: inline-grid; place-items: center; padding: 0 5px; }
.grid-empty { grid-column: 1 / -1; }
.skel-card { height: 268px; border-radius: var(--r2); }

/* ---------- 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(1280px, 100%); height: min(880px, 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: 52px; background: var(--white); border-top: 3px solid var(--red); border-bottom: 1px solid var(--line); }
.modal-head .crumb { min-width: 0; flex: 0 1 auto; font: 500 var(--fs-2xs) / 1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-head .crumb b { color: var(--red); font-weight: 600; }
.modal-head .pos { white-space: nowrap; font: 500 var(--fs-2xs) var(--mono); color: var(--ink-3); letter-spacing: 0.08em; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); min-height: 0; }
.gal { padding: var(--s5); overflow: auto; display: flex; flex-direction: column; gap: var(--s4); min-height: 0; }
.stage { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; cursor: zoom-in; flex: none; }
.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 10px; border-radius: var(--r1); background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line); font: 600 var(--fs-sm) / 1.2 var(--mono); letter-spacing: 0.02em; box-shadow: var(--sh1); }
.stage .cap .cc { font-size: var(--fs-md); }
.stage .cap .nm { text-transform: uppercase; letter-spacing: 0.06em; }
.stage .cap.view { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--fs-2xs); }
.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); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.thumbs.views { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-width: 50%; }
.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(--mono); letter-spacing: 0.04em; color: var(--ink-2); text-transform: uppercase; 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; min-height: 0; }
.side-scroll { overflow: auto; padding: var(--s5); }
.side .eyebrow { margin-bottom: var(--s2); }
.side .ttl { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.side .ttl h2 { font: 700 var(--fs-3xl) / 1 var(--serif); letter-spacing: -0.02em; }
.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; }
.spec { width: 100%; border-collapse: collapse; border: 1px solid var(--ink-2); margin-bottom: var(--s5); font-size: var(--fs-sm); }
.spec th, .spec td { border-bottom: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
.spec th { width: 34%; background: var(--paper); font: 500 var(--fs-2xs) / 1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); border-right: 1px solid var(--line-2); }
.spec td.m { font-family: var(--mono); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.qgrid-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--ink-2); margin-bottom: var(--s2); }
.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: var(--r1); font: 600 var(--fs-sm) var(--sans); }
.qrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px; align-items: center; gap: var(--s3); padding: 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: 72px; height: 46px; }
.qrow .tile img { padding: 2px; }
.qrow .nm { min-width: 0; }
.qrow .nm div:first-child { font: 600 var(--fs-sm) / 1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .nm .il { font-size: var(--fs-2xs); color: var(--teal); }
.qrow input { width: 100%; height: 34px; 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); }
.side-foot { border-top: 1px solid var(--line); padding: var(--s3) var(--s5); 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(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.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(--r2); 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-xl) / 1.15 var(--serif); letter-spacing: -0.01em; }
.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: 500 var(--fs-2xs) / 1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; 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 8px; border: 1px solid var(--line-2); border-radius: var(--r1); 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(--white); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: var(--r2); 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: auto 1fr; gap: 6px var(--s4); font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.timeline { display: grid; gap: var(--s3); }
.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:last-child::before { background: var(--teal); }
.timeline .ev .t { color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- 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(--ink); }
.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: 700 clamp(40px, 5vw, 64px) / 1.02 var(--serif); letter-spacing: -0.025em; 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 var(--fs-xl) / 1.45 var(--serif); 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: 600 var(--fs-2xs) / 1.6 var(--mono); letter-spacing: 0.12em; color: var(--ink); text-transform: uppercase; }
.login .cover .meta span { font: 500 var(--fs-2xs) / 1.6 var(--mono); letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.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.15 var(--serif); margin: var(--s2) 0 var(--s2); }
.login .box .intro { color: var(--ink-3); margin-bottom: var(--s5); font-size: var(--fs-sm); }
.login .demo { margin-top: var(--s5); padding: var(--s3) var(--s4); border: 1px dashed var(--line-2); border-radius: var(--r2); font-size: var(--fs-xs); color: var(--ink-3); }
.login .demo button { font: 600 var(--fs-xs) var(--mono); }

/* ---------- admin shell ---------- */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); border-top: 3px solid var(--red); padding: var(--s4) var(--s3); overflow: auto; }
.aside .brand { padding: var(--s1) var(--s2) var(--s4); border-bottom: 1px solid var(--line); margin-bottom: var(--s3); flex-direction: column; align-items: flex-start; gap: 6px; }
.aside .brand img { height: 24px; }
.aside .grp { padding: var(--s3) var(--s2) var(--s1); }
.aside nav a { display: flex; align-items: center; gap: var(--s2); height: 34px; 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-2); color: var(--ink); }
.aside nav a.on { background: var(--white); color: var(--ink); box-shadow: var(--sh1); }
.aside nav a.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--teal); border-radius: 2px; }
.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: 15px; height: 15px; flex: none; opacity: 0.7; }
.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(--s5) var(--s6) var(--s7); }
.amain .page-head h1 { font: 700 var(--fs-2xl) / 1.15 var(--serif); letter-spacing: -0.015em; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.kpi { padding: var(--s4); }
.kpi .v { font: 700 var(--fs-2xl) / 1.1 var(--serif); 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: 500 var(--fs-2xs) / 1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; 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-3); font-family: var(--mono); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.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 56px / 1 var(--serif); color: var(--line-2); letter-spacing: -0.02em; }
.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-xl) / 1.2 var(--serif); }
.acoll .stats { font: 500 var(--fs-2xs) / 1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.acoll .price-row { display: flex; gap: var(--s2); align-items: center; }
.acoll .price-row .affix { flex: 1; }
.acoll .changed { font-size: var(--fs-2xs); color: var(--ink-3); min-height: 16px; }
.acoll .acts { display: flex; gap: var(--s2); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 var(--r2) var(--r2); margin-top: auto; }
.acoll details summary { cursor: pointer; font-size: var(--fs-xs); color: var(--ink-3); list-style: none; }
.acoll details summary::-webkit-details-marker { display: none; }
.acoll details[open] summary { margin-bottom: var(--s2); }
.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: var(--r2); overflow: auto; font: 500 var(--fs-sm) / 1.6 var(--mono); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .modal-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .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 { grid-template-columns: minmax(0, 1fr); padding: var(--s3); gap: var(--s3); }
  .filters { position: fixed; z-index: 120; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); max-height: none; background: var(--paper); padding: var(--s4); box-shadow: var(--sh3); transform: translateX(-105%); transition: transform 0.22s var(--ease); }
  .catalog.filters-open .filters { transform: none; }
  .catalog.no-filters .filters { display: block; }
  .filters-scrim { position: fixed; inset: 0; z-index: 110; background: rgba(23, 22, 15, 0.35); }
  .modal-root { padding: 0; }
  .modal { width: 100%; height: 100%; border-radius: 0; }
  .modal-body { display: block; overflow: auto; }
  .gal { overflow: visible; padding: var(--s3); }
  .thumbs.views { max-width: none; }
  .side { border-left: 0; border-top: 1px solid var(--line); display: block; }
  .side-scroll { overflow: visible; padding: var(--s4); }
  .side-foot { position: sticky; bottom: 0; }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .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 nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .aside .grp, .aside .who { display: none; }
  .amain { padding: var(--s4); }
}
@media (max-width: 720px) {
  :root { --hdr: 52px; }
  .topbar { background: var(--white); backdrop-filter: none; }
  .topbar .in { gap: var(--s3); padding: 0 var(--s3); }
  .brand .sub, .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 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .toolbar h1 { font-size: var(--fs-lg); width: 100%; }
  .recent, .density-seg { display: none; }
  .collpick > button { max-width: 60vw; }
  .cpanel { width: calc(100vw - 24px); }
  .pcard .bd { padding: 6px 8px 8px; }
  .qa .ctl .btn { padding: 0 8px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .qrow { grid-template-columns: 60px minmax(0, 1fr) 84px; }
  .qrow .tile { width: 60px; height: 40px; }
  .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; } }
