@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@500;600;700;800;900&family=Manrope:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600;700&display=swap");

/* Scrollbars: only the page itself (html/body) shows one. Every in-app scroll
   surface — modal bodies, dialogs, popovers, dropdown/date panels, tables,
   sidebars — still scrolls, just without a visible bar. */

/* Firefox */
* {
  scrollbar-width: none;
}

html, body {
  scrollbar-width: thin;
  scrollbar-color: var(--text-soft) var(--surface-sunken);
}

/* Chrome, Edge, Safari, Opera */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* Page scrollbar handle + track (only html/body paint a bar now) */
::-webkit-scrollbar-thumb {
  background: var(--text-soft);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: var(--surface-sunken);
}

/* ==========================================================================
   Design tokens (Phase 0 — Figma "Storefront" file LzTCRyBdXF1p7V5RSwXlSN)
   Palette/type lifted from the Homepage (3:8), Auth (1:3532) and Admin
   Overview (1:5281) frames, which all share the same system: deep teal-black
   surfaces, a single gold accent, Outfit for display type, Manrope for body
   copy, Geist Mono for numerals/kbd/timestamps.
   Existing hex literals elsewhere in this file are left as-is (out of scope
   for this pass) — new/updated rules below consume these variables so future
   phases can keep extending the same system instead of hand-picking colors.
   ========================================================================== */
:root {
  /* Brand surfaces (deep teal) — header, footers-on-dark, admin/vendor chrome */
  --ink-950: #072220;
  --ink-900: #0d3835;
  --ink-800: #144d49;
  --ink-700: #1b615c;
  --ink-line: rgba(255, 255, 255, 0.1);
  --ink-muted: #a5c6c3;

  /* Light surfaces */
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-sunken: #f4f7f6;
  --border: #dee5e4;
  --text: #112220;
  --text-muted: #738e8a;
  --text-soft: #94a3b8;
  /* Heading navy + deep-gold eyebrow — legacy literals (#142c55 / #92660a)
     that were sprinkled through the admin/vendor CSS now resolve here so the
     dark blocks below can flip them. Light values match the originals. */
  --heading: #142c55;
  --accent-strong: #92660a;

  /* Accent (single-hue gold, per Figma) */
  --accent: #ffc619;
  --accent-ink: #072220;
  --accent-hover: #e6b115;
  --accent-wash: rgba(255, 198, 25, 0.11);
  /* Legacy brand orange — kept live for pages/classes not yet migrated past this pass */
  --accent-2: #f97316;

  /* Semantic */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #e53e3e;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;

  /* Type */
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale (rem) */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(7, 34, 32, .06);
  --shadow-md: 0 8px 16px rgba(7, 34, 32, .05);
  --shadow-lg: 0 20px 42px rgba(7, 34, 32, .13);
  --shadow-xl: 0 25px 60px rgba(7, 34, 32, .25);
}

/* Dark mode — system preference, or an explicit [data-theme="dark"] override */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061715;
    --surface: #0d2b28;
    --surface-sunken: #0a2422;
    --border: #1b3d39;
    --text: #eef5f3;
    --text-muted: #9db8b3;
    --text-soft: #6f8d88;
    --heading: #eaf2f0;
    --accent-strong: #ffd879;
    --ink-950: #04120f;
    --ink-900: #0a2422;
    --ink-800: #123c38;
    --success-bg: rgba(16, 185, 129, .16);
    --warning-bg: rgba(245, 158, 11, .16);
    --danger-bg: rgba(229, 62, 62, .18);
    --info-bg: rgba(59, 130, 246, .18);
  }
}

:root[data-theme="dark"] {
  --bg: #061715;
  --surface: #0d2b28;
  --surface-sunken: #0a2422;
  --border: #1b3d39;
  --text: #eef5f3;
  --text-muted: #9db8b3;
  --text-soft: #6f8d88;
  --heading: #eaf2f0;
  --accent-strong: #ffd879;
  --ink-950: #04120f;
  --ink-900: #0a2422;
  --ink-800: #123c38;
  --success-bg: rgba(16, 185, 129, .16);
  --warning-bg: rgba(245, 158, 11, .16);
  --danger-bg: rgba(229, 62, 62, .18);
  --info-bg: rgba(59, 130, 246, .18);
}

/* Colour-scheme hint so native date/number spinners, scrollbars and the
   <option> popup of any not-yet-enhanced <select> follow the theme. */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

/* Safety net: any text-entry control that predates the token system (or a
   third-party embed) must never render as a white box on a dark page. Scoped
   tight to real inputs so it can't repaint buttons or custom controls. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"])),
:where(textarea),
:where(select:not([data-enhanced])) {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
:where(input, textarea)::placeholder { color: var(--text-soft); opacity: 1; }

/* `overflow-x: clip` (not `hidden`) contains stray horizontal overflow WITHOUT
   turning <html>/<body> into a scroll container — `hidden` did the latter, and
   that silently cancelled every `position: sticky` on the page (the sticky
   header, the dashboard sidebars, the cart/checkout summaries…). `clip` keeps
   the overflow guard while letting sticky work against the viewport again.
   `--header-h` is the live height of the sticky site header (utility bar +
   main nav + category bar); ui.js measures the real element on load/resize and
   overwrites this value. The literal here is only the pre-JS fallback. */
:root {
  --header-h: 161px;
}

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-body), Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display), Inter, ui-sans-serif, system-ui, sans-serif;
}

.shell {
  max-width: 1440px;
  margin: auto;
  padding-inline: 24px;
}

/* Header-only content width: the Figma frame itself is 1440 wide with 80px
   side padding, so the utility bar, main nav, category bar, and hero all
   share this container (same 1440 cap as `.shell`, wider 80px inset to
   match the frame exactly). */
.header-shell {
  max-width: 1440px;
  margin: auto;
  padding-inline: clamp(20px, 1vw, 80px);
}

.utility-bar {
  border-bottom: 1px solid var(--ink-900);
  background: var(--ink-950);
  color: var(--ink-muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.utility-bar a {
  color: var(--ink-muted);
}

.utility-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.utility-left a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.utility-right span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .utility-left span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .utility-right span:last-child {
    display: none;
  }
}

/* ==========================================================================
   Theme toggle (System / Light / Dark) — compact variant sits in the utility
   bar, full variant in the mobile + account drawers.
   ========================================================================== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--ink-line);
}

.theme-toggle__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.theme-toggle__opt:hover {
  color: #fff;
}

.theme-toggle__opt[aria-checked="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.theme-toggle__opt svg {
  width: 15px;
  height: 15px;
}

.theme-toggle--compact .theme-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle--compact .theme-toggle__opt {
  padding: 5px 7px;
}

/* Variant for a light in-page surface (account preferences, etc.) */
.theme-toggle--inline {
  background: var(--surface-sunken);
  border-color: var(--border);
}

.theme-toggle--inline .theme-toggle__opt {
  color: var(--text-muted);
}

.theme-toggle--inline .theme-toggle__opt:hover {
  color: var(--text);
}

.theme-toggle--inline .theme-toggle__opt[aria-checked="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Full variant on a light drawer surface */
.drawer-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.drawer-theme .theme-toggle {
  background: var(--surface-sunken);
  border-color: var(--border);
}

.drawer-theme .theme-toggle__opt {
  color: var(--text-muted);
}

.drawer-theme .theme-toggle__opt:hover {
  color: var(--text);
}

.drawer-theme .theme-toggle__opt[aria-checked="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

@media (max-width: 480px) {
  .theme-toggle--compact {
    display: none;
  }
}

.main-nav-container {
  display: flex;
  justify-content: center;
  width: 100%;
  background: var(--ink-950);
}

.catnavbar {
  background: var(--ink-900);
  border-bottom: 1px solid var(--ink-800);
}

.catnavbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 12px;
}

.catnavbar__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .82rem;
  font-weight: 700;
}

.catnavbar__all:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.catnavbar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  overflow: hidden;
}

.catnavbar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
}

.catnavbar__link:hover {
  color: var(--accent);
  opacity: 1;
}

@media (max-width: 1023px) {
  .catnavbar {
    display: none !important;
  }
}

.main-nav {
  display: flex;
  min-height: 84px;
  width: 100%;
  max-width: 1440px;
  padding-inline: clamp(20px, 1vw, 80px);
  margin: auto;
  align-items: center;
  justify-content: space-between;
  background: var(--ink-950);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand small {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand em {
  color: var(--accent);
  font-style: normal;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--ink-line);
}

.cart-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
}

.cart-link:hover {
  color: var(--accent);
  opacity: 1;
}

.cart-link__badge {
  position: absolute;
  top: -2px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
}

.nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 20px !important;
  margin-inline: 0 !important;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
}

.nav-links a,
.nav-dropdown button {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  color: var(--ink-muted) !important;
  background: none;
  border: 0;
  font: inherit;
  font-size: 14px !important;
  font-weight: 400 !important;
  cursor: pointer;
  white-space: nowrap !important;
  text-decoration: none !important;
  line-height: 1 !important;
  padding: 6px 4px !important;
  border-radius: 6px !important;
  transition: color 0.15s ease !important;
}

.nav-links a:hover,
.nav-dropdown button:hover {
  color: #fff !important;
}

.nav-links a.active {
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-links a svg,
.nav-links a i,
.nav-links a [data-lucide] {
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}

.nav-links a span {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-search {
  position: relative;
  /* Flexes down from 480px (rather than holding it fixed) so a 5th nav link
     (Blog) doesn't force the row to wrap or overflow. */
  flex: 1 1 320px;
  max-width: 480px;
  min-width: 0;
  margin-inline: 0;
}

.nav-search input {
  width: 100%;
  height: 44px;
  padding: 0 52px 0 42px;
  border: 1px solid var(--ink-800);
  border-radius: var(--radius-full);
  background: var(--ink-900);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: background-color .15s ease, border-color .15s ease;
}

.nav-search input::placeholder {
  color: var(--ink-muted);
}

.nav-search input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--accent);
}

.nav-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--accent);
  pointer-events: none;
}

.nav-search__kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  /* border: 1px solid var(--ink-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  */
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  pointer-events: none;
}

.drawer-search {
  position: relative;
  margin: 4px 0 14px;
}

.drawer-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
}

.drawer-search input::placeholder {
  color: var(--ink-muted);
}

.drawer-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-muted);
  pointer-events: none;
}

.button,
.text-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius-md);
  padding: 0 17px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-weight: 800;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 9px 18px rgba(255, 198, 25, .28);
}

.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.button-danger:hover {
  background: #c53030;
  border-color: #c53030;
  opacity: 1;
}

.text-action {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ink-line);
  color: #fff;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-popover {
  position: relative;
}

.account-popover summary {
  list-style: none;
  cursor: pointer;
}

.account-popover summary::-webkit-details-marker {
  display: none;
}

.account-popover-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  display: grid;
  min-width: 210px;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.account-popover-panel strong,
.account-popover-panel a,
.account-popover-panel button {
  padding: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.account-popover-panel a:hover,
.account-popover-panel button:hover {
  background: var(--accent-wash);
  opacity: 1;
}

.account-popover-panel a,
.account-popover-panel button {
  display: flex;
  align-items: center;
  gap: 8px
}

.mobile-menu-button,
.account-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #fff
}

.account-menu-button {
  align-items: center;
  justify-content: center;
}

.mobile-scrim {
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(7, 34, 32, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease
}

.mobile-scrim.open {
  opacity: 1;
  visibility: visible
}

.mobile-drawer {
  position: fixed;
  z-index: 300;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(86vw, 360px);
  padding: 22px;
  background: var(--ink-950);
  box-shadow: -18px 0 45px rgba(7, 34, 32, .4);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink-900);
  padding-bottom: 17px;
  color: #fff
}

.mobile-drawer-head button {
  border: 0;
  background: transparent;
  color: #fff
}

.mobile-drawer nav {
  display: grid;
  gap: 5px;
  margin-top: 18px
}

.mobile-drawer nav a,
.mobile-drawer nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: var(--ink-muted);
  font-weight: 700
}

.mobile-drawer nav a:hover,
.mobile-drawer nav button:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  opacity: 1
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 900;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
}

.hero-card,
.soft-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(17, 24, 39, 0.05);
}

.feature-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.icon-dot {
  display: flex;
  height: 42px;
  width: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.field {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.85rem 1rem;
  outline: none;
  transition: 0.15s;
}

.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}

.help {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-soft);
}

.metric {
  border-radius: 16px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.05);
}

.metric span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 900;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
}

.admin-screen {
  display: none;
  animation: page-enter .28s ease both;
}

.admin-screen.is-active {
  display: block;
}

.admin-screen-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 0;
}

.admin-screen-heading h2 {
  margin: .3rem 0 0;
  color: var(--heading);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.035em;
}

.admin-screen-heading p {
  max-width: 630px;
  margin: .45rem 0 0;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.admin-period {
  display: grid;
  gap: 5px;
  min-width: 154px;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-period select {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--heading);
  padding: 9px 11px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.admin-insight {
  border: 1px solid var(--info);
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--text);
  padding: 10px 13px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-rank-list {
  display: grid;
  gap: 12px;
}

.admin-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.admin-rank-row strong {
  display: block;
  color: var(--heading);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-rank-row small {
  color: var(--text-muted);
  font-size: .7rem;
}

.admin-rank-value {
  color: var(--heading);
  font-size: .78rem;
  font-weight: 900;
}

.admin-rank-track {
  grid-column: 1/-1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-sunken);
}

.admin-rank-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #fbbf24);
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 13px;
  color: var(--text-muted);
  font-size: 13.5px;
  white-space: nowrap;
  border-left: 3px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.admin-link svg,
.admin-link i,
.admin-link [data-lucide] {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color .15s ease;
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-link.active {
  background: rgba(249, 115, 22, 0.14);
  color: #fff;
  border-left-color: #f97316;
}

.admin-link:hover svg,
.admin-link:hover i,
.admin-link.active svg,
.admin-link.active i {
  color: #f97316;
}

/* --------------------------------------------------------------------------
   Dashboard sidebar off-canvas drawer (admin.html / vendor.html)
   Shared by `.adm-sidebar`/`.vnd-sidebar` via the `.dash-sidebar` marker
   class — replaces the old `position:static` mobile fallback with a real
   slide-in panel + scrim, same visual family as the site-wide `.mobile-drawer`.
   Reuses the `.adm-sidebar`/`.vnd-sidebar` breakpoint (980px) those already
   switch layout at. This block replaces dead pre-rebuild CSS that targeted
   classes (`.admin-sidebar`, `.admin-menu-button`, `.admin-scrim`) no longer
   present in the current admin/vendor markup.
   -------------------------------------------------------------------------- */
.dash-menu-button,
.dash-sidebar-close,
.dash-scrim {
  display: none;
}

.dash-menu-button {
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  width: max-content;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.dash-menu-button:hover {
  background: var(--surface-sunken);
  opacity: 1;
}

@media (max-width: 980px) {
  .dash-menu-button {
    display: inline-flex;
  }

  .dash-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    width: min(82vw, 300px);
    max-height: none;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
    box-shadow: 16px 0 44px rgba(7, 34, 32, .3);
  }

  .dash-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .dash-sidebar-close {
    display: inline-grid;
    place-items: center;
    align-self: flex-end;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    color: var(--text-muted);
    cursor: pointer;
  }

  .dash-sidebar-close:hover {
    background: var(--accent-wash);
    color: var(--accent-hover);
    opacity: 1;
  }

  .dash-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(7, 34, 32, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }

  .dash-scrim.is-open {
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 981px) {
  .dash-sidebar-close,
  .dash-scrim {
    display: none !important;
  }
}

a {
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.82;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 40px));
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .25s ease, visibility .25s ease;
}

.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader-card {
  width: min(88vw, 520px);
  display: grid;
  gap: 16px;
}

.shimmer {
  height: 20px;
  border-radius: 9px;
  background: linear-gradient(100deg, var(--surface-sunken) 25%, var(--border) 38%, var(--surface-sunken) 55%);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite;
}

.shimmer.logo {
  width: 150px;
  height: 42px;
}

.shimmer.hero {
  height: 156px;
}

.shimmer.short {
  width: 55%;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  animation: toast-in 0.22s ease;
}

.toast span {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: var(--success-bg);
  color: var(--success);
}

.toast p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.toast button {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 16px;
  color: var(--text-muted);
}

.toast-success {
  border-color: var(--success);
}

.toast-success span {
  background: var(--success-bg);
  color: var(--success);
}

.toast-error {
  border-color: var(--danger);
}

.toast-error span {
  background: var(--danger-bg);
  color: var(--danger);
}

.toast-warning {
  border-color: var(--warning);
}

.toast-warning span {
  background: var(--warning-bg);
  color: var(--accent-strong);
}

.toast-info {
  border-color: var(--info);
}

.toast-info span {
  background: var(--info-bg);
  color: var(--info);
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid #fff8;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.status-line {
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-line.error {
  color: #b91c1c;
}

.status-line.success {
  color: #15803d;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-sunken);
}

.progress-track::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: #f97316;
  animation: progress 1.2s ease-in-out infinite;
}

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.catalog-card,
.soft-panel,
.metric {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.catalog-card:hover,
.soft-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.button {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(7, 34, 32, .14);
  opacity: 1;
}

.button:active {
  transform: translateY(0);
}

.page-enter {
  animation: page-enter .45s cubic-bezier(.2, .8, .2, 1) both;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Product card ------------------------------------------------------- */
.catalog-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface-sunken);
  aspect-ratio: 4 / 3;
}

.catalog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.catalog-card:hover .catalog-card__media img {
  transform: scale(1.05);
}

.catalog-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-soft);
}

.catalog-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-card__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
}

.catalog-card__badge--featured,
.catalog-card__badge--new,
.catalog-card__badge--bestseller {
  background: var(--ink-950);
  color: #fff;
}

.catalog-card__badge--sale,
.catalog-card__badge--deal {
  background: var(--danger);
  color: #fff;
}

.catalog-card__share {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .93);
  color: #52627a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .14);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, color .15s ease;
}

.catalog-card:hover .catalog-card__share,
.catalog-card__share:focus-visible {
  opacity: 1;
  transform: none;
}

.catalog-card__share:hover {
  color: #f97316;
}

.catalog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 7px;
  padding: 16px 18px 0;
}

.catalog-card__cat {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.catalog-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-card__title a:hover {
  color: var(--accent-2);
  opacity: 1;
}

.catalog-card__blurb {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-card__rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.catalog-card__stars {
  display: flex;
  align-items: center;
  gap: 1px;
  color: var(--accent);
}

.catalog-card__stars svg,
.catalog-card__stars i {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.catalog-card__stars .is-empty {
  color: var(--border);
}

.catalog-card__rating-count {
  color: var(--text-muted);
  font-size: 11.5px;
}

.catalog-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.catalog-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.catalog-card__meta-dot {
  color: var(--text-soft);
}

.catalog-card__rating {
  color: #b45309;
}

.catalog-card__rating svg,
.catalog-card__rating i {
  color: #f59e0b;
  fill: #f59e0b;
}

.catalog-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.catalog-card__price {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.catalog-card__price strong {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.catalog-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: var(--ink-950);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color .18s ease, gap .18s ease;
}

.catalog-card__cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
  gap: 9px;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Selling call-to-action
   -------------------------------------------------------------------------- */
/* Selling lives in the account popover, not the navbar — one route, not two.
   Separated from the browsing links above it by a rule. */
.popover-sell {
  margin-top: 4px;
  padding-top: 10px !important;
  border-top: 1px solid var(--border);
  color: var(--accent-strong) !important;
  font-weight: 800 !important;
}

.popover-sell:hover {
  background: var(--accent-wash) !important;
}

/* The popover is hidden below 1024px, so the drawer carries the route there. */
.drawer-sell {
  margin-top: 6px;
  background: rgba(255, 198, 25, .12) !important;
  color: var(--accent) !important;
}

/* Footer strip */
.seller-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  background: var(--ink-950);
}

.seller-strip__eyebrow {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.seller-strip__title {
  margin-top: 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.seller-strip__body {
  max-width: 60ch;
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.seller-strip__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 800;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.seller-strip__cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  opacity: 1;
}

/* In-page band (categories page, storefront body) */
.seller-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(125deg, #142c55, #24476f);
  color: #fff;
}

.seller-band__eyebrow {
  color: #fb923c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.seller-band__title {
  margin-top: 8px;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.seller-band__body {
  max-width: 62ch;
  margin-top: 10px;
  color: #b9c6d8;
  font-size: 0.9rem;
  line-height: 1.65;
}

.seller-band__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 15px 26px;
  border-radius: 14px;
  background: #f97316;
  color: #fff;
  font-weight: 800;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.seller-band__cta:hover {
  background: #fb923c;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(249, 115, 22, .34);
  opacity: 1;
}

@media (max-width: 639px) {
  .seller-band {
    padding: 26px;
  }

  .seller-band__title {
    font-size: 1.35rem;
  }
}

/* --------------------------------------------------------------------------
   Categories page (Figma "04 — Categories", node 3:2343)
   -------------------------------------------------------------------------- */
.cat-hero {
  background: var(--ink-950);
  text-align: center;
  padding: 80px clamp(20px, 1vw, 80px);
}

.cat-hero__badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cat-hero__title {
  margin-top: 20px;
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.cat-hero__sub {
  max-width: 45rem;
  margin: 20px auto 0;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.cat-grid-section {
  padding: 80px clamp(20px, 1vw, 80px);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
}

.cat-tile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  opacity: 1;
}

.cat-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-tile__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
}

.cat-tile__count {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-sunken);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
}

.cat-tile__name {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}

.cat-tile__desc {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-tile__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
}

.cat-tile:hover .cat-tile__cta {
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Custom select
   The native option list is drawn by the OS and cannot be styled, so the list
   is rebuilt while the real <select> stays as the value holder.
   -------------------------------------------------------------------------- */
.xselect {
  position: relative;
  display: block;
  /* Match .field's vertical rhythm so a custom select drops into a form row
     the same way a native input does. */
  margin-top: 0.5rem;
}

.xselect__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.xselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  /* Box model kept identical to .field (padding / border / radius / font) so
     the trigger is the exact height of a sibling text input on the same row. */
  min-height: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.xselect__trigger:hover {
  border-color: var(--text-soft);
}

.xselect.is-open .xselect__trigger,
.xselect__trigger:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.xselect__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xselect__chevron {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 8px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), background-color .18s ease, color .18s ease;
}

.xselect__chevron svg {
  width: 13px;
  height: 13px;
}

.xselect.is-open .xselect__chevron {
  transform: rotate(180deg);
  background: var(--accent-wash);
  color: var(--accent-hover);
}

/* --- Dropdown (default, >= 768px) ---
   Position is set inline by js/select.js (position:fixed, real viewport
   coordinates) so the panel can never be clipped by a scrolling/overflow
   ancestor; these rules are just the fallback box + animation. */
.xselect__panel {
  position: absolute;
  z-index: 500;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1), visibility .22s;
}

.xselect.is-open .xselect__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.xselect__sheet {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* The sheet header is a mobile affordance; the dropdown does not need it. */
.xselect__head {
  display: none;
}

.xselect__list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  overscroll-behavior: contain;
}

.xselect__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

.xselect__option:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.xselect__option.is-selected {
  background: var(--accent-wash);
  color: var(--accent-hover);
  font-weight: 800;
}

.xselect__option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xselect__tick {
  display: none;
  flex: none;
  width: 15px;
  height: 15px;
}

.xselect__tick svg {
  width: 100%;
  height: 100%;
}

.xselect__option.is-selected .xselect__tick {
  display: block;
}

/* --- Bottom sheet (< 768px) --- */
@media (max-width: 767px) {
  .xselect__panel {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    z-index: 320;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, visibility .3s;
  }

  .xselect.is-open .xselect__panel {
    transform: translateY(0);
  }

  /* Dimmed backdrop, drawn by the panel itself so no extra element is needed. */
  .xselect__panel::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    transition: opacity .3s ease;
  }

  .xselect.is-open .xselect__panel::before {
    opacity: 1;
  }

  .xselect__sheet {
    border-radius: 22px 22px 0 0;
    border: 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    box-shadow: var(--shadow-xl);
  }

  /* Grab handle + title, so the sheet reads as dismissible. */
  .xselect__head {
    position: relative;
    display: block;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .xselect__head::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
  }

  .xselect__list {
    max-height: min(60vh, 420px);
    padding: 8px;
  }

  .xselect__option {
    padding: 14px 14px;
    font-size: 15px;
  }
}

body.xselect-locked {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Custom checkbox / radio / date picker (js/form-controls.js)
   Same progressive-enhancement pattern as .xselect above — the native input
   stays in the DOM (visually hidden, still the value/form source) while
   these render the token-styled presentation on top of it.
   -------------------------------------------------------------------------- */

.xcheck__native,
.xradio__native,
.xdate__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.xcheck__box {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.xcheck__box svg {
  width: 12px;
  height: 12px;
  transform: scale(.5);
  opacity: 0;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), opacity .15s ease;
}

.xcheck__box:hover {
  border-color: var(--accent);
}

.xcheck__box.is-checked {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.xcheck__box.is-checked svg {
  transform: scale(1);
  opacity: 1;
}

.xcheck__box.is-indeterminate {
  border-color: var(--accent);
  background: var(--accent);
}

.xcheck__box.is-indeterminate svg {
  opacity: 1;
  transform: scale(1);
  clip-path: inset(45% 15% 45% 15%);
}

.xcheck__box.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}

.xradio__dot {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease;
}

.xradio__dot::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}

.xradio__dot:hover {
  border-color: var(--accent);
}

.xradio__dot.is-checked {
  border-color: var(--accent);
}

.xradio__dot.is-checked::after {
  transform: scale(1);
}

.xradio__dot.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* --- Date picker --- */
.xdate {
  position: relative;
  display: block;
  /* Match .field's vertical rhythm — see .xselect. */
  margin-top: 0.5rem;
}

.xdate__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  /* Box model kept identical to .field so the trigger matches a sibling
     text input's height on the same form row. */
  min-height: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.xdate__trigger:hover {
  border-color: var(--text-soft);
}

.xdate.is-open .xdate__trigger,
.xdate__trigger:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.xdate__value.is-placeholder {
  color: var(--text-soft);
  font-weight: 500;
}

.xdate__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.xdate__icon svg {
  width: 100%;
  height: 100%;
}

.xdate__panel {
  position: absolute;
  /* Above app chrome (sticky headers, .uk-popover, .xselect__panel) so the
     calendar is never buried; js/form-controls.js re-anchors it with
     position:fixed in viewport coords so an overflow ancestor can't clip it. */
  z-index: 620;
  top: calc(100% + 8px);
  left: 0;
  width: max(260px, 100%);
  max-width: min(320px, 92vw);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top left;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1), visibility .22s;
}

.xdate.is-open .xdate__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.xdate__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
}

.xdate__nav {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-muted);
  cursor: pointer;
}

.xdate__nav:hover {
  background: var(--accent-wash);
  color: var(--accent-hover);
  opacity: 1;
}

.xdate__nav svg {
  width: 14px;
  height: 14px;
}

.xdate__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.xdate__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.xdate__cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

.xdate__cell:hover:not(:disabled) {
  background: var(--surface-sunken);
  opacity: 1;
}

.xdate__cell.is-today {
  color: var(--accent-hover);
  font-weight: 800;
}

.xdate__cell.is-selected {
  background: var(--accent);
  color: var(--accent-ink);
}

.xdate__cell:disabled {
  color: var(--text-soft);
  opacity: .4;
  cursor: not-allowed;
}

.xdate__cell--empty {
  cursor: default;
}

.xdate__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.xdate__today,
.xdate__clear {
  border: 0;
  background: transparent;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}

.xdate__today {
  color: var(--accent-hover);
}

.xdate__today:hover,
.xdate__clear:hover {
  background: var(--surface-sunken);
  opacity: 1;
}

/* datetime-local variant: time steppers under the calendar grid */
.xdate__time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.xdate__time > span:first-child {
  margin-right: auto;
}

.xdate__colon {
  font-weight: 800;
  color: var(--text);
}

.xdate__stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.xdate__stepper button {
  border: 0;
  background: var(--surface-sunken);
  color: var(--text);
  width: 26px;
  height: 28px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.xdate__stepper button:hover {
  background: var(--accent-wash);
}

.xdate__stepper span {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 640px) {
  .xdate__panel {
    position: fixed;
    inset: auto 12px 12px 12px;
    top: auto !important;
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto;
    max-width: none;
    transform: translateY(12px);
    transform-origin: bottom center;
  }

  .xdate.is-open .xdate__panel {
    transform: none;
  }

  .xdate__cell {
    font-size: .88rem;
  }
}

/* --------------------------------------------------------------------------
   Category filter
   A wrapping pill row is fine at desktop widths, but with a full taxonomy it
   becomes a wall of buttons on a phone. Small screens get a native select —
   one line, familiar, and properly accessible — instead of a scroll strip
   whose off-screen options are easy to miss entirely.
   -------------------------------------------------------------------------- */
.catfilter__compact {
  display: none;
}

.catfilter__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.catfilter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.catpill:hover {
  border-color: var(--border);
  color: var(--heading);
  opacity: 1;
}

.catpill__count {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.catpill.is-active {
  background: #142c55;
  border-color: #142c55;
  color: #fff;
}

.catpill.is-active .catpill__count {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 767px) {
  .catfilter__compact {
    display: block;
  }

  .catfilter__pills {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Clickable card + wishlist
   The whole card is the link, via one stretched anchor. The heart is the only
   other control, so it sits above that anchor.
   -------------------------------------------------------------------------- */
.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;
}

.catalog-card.is-clickable {
  cursor: pointer;
}

.catalog-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.catalog-card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wishbtn {
  position: absolute;
  top: 12px;
  right: 12px;
  /* Above the stretched link, so the heart stays clickable. */
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--text-muted);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .16);
  cursor: pointer;
  transition: color .18s ease, transform .18s ease, background-color .18s ease;
}

.wishbtn svg {
  width: 17px;
  height: 17px;
  transition: fill .18s ease, transform .22s ease;
  fill: transparent;
}

.wishbtn:hover {
  color: #e11d48;
  transform: scale(1.08);
}

.wishbtn:disabled {
  opacity: .6;
  cursor: default;
}

.wishbtn.is-saved {
  color: #e11d48;
}

.wishbtn.is-saved svg {
  fill: currentColor;
}

.wishbtn.is-saved:hover {
  color: #be123c;
}

.wishbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Arrow in the card footer, replacing the old CTA button. */
.catalog-card__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--ink-950);
  color: #fff;
  transition: background-color .2s ease, transform .2s ease;
}

.catalog-card.is-clickable:hover .catalog-card__go {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateX(2px);
}

/* The body is now spans, not block elements — restore the layout. */
.catalog-card__body {
  display: flex;
  flex-direction: column;
}

.catalog-card__blurb {
  display: -webkit-box;
}

.catalog-card__foot {
  display: flex;
}

.catalog-card__price {
  display: flex;
  flex-direction: column;
}

.catalog-card__media {
  display: block;
}

@media (prefers-reduced-motion: reduce) {

  .wishbtn,
  .catalog-card__go {
    transition: none;
  }

  .wishbtn:hover {
    transform: none;
  }
}

/* Paid placement must be disclosed, quietly but unmistakably. */
.sponsored-flag {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 2;
  padding: 3px 9px;
  border-top-left-radius: 10px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.catalog-card__cta svg,
.catalog-card__cta i {
  transition: transform .18s ease;
}

/* --- "Leaving DigiStore" interstitial --------------------------------- */
.leaving-int__lead {
  margin: 0 0 14px;
}

.leaving-int__dest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  font-weight: 700;
  word-break: break-all;
}

.leaving-int__dest svg,
.leaving-int__dest i {
  flex: none;
  color: var(--warning);
}

.leaving-int__tips {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.leaving-int__tips li + li {
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  border-radius: 99px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress {
  50% {
    transform: translateX(130%);
  }
}

@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1023px) {

  .utility-bar,
  .nav-links,
  .nav-search {
    display: none !important;
  }

  .main-nav {
    min-height: 70px;
    gap: 14px;
    padding: 0 18px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-actions .text-action,
  .nav-actions .button-primary {
    display: none;
  }

  /* Keep the account chip to just the avatar + caret on small screens. */
  .account-chip span:not(.avatar) {
    display: none;
  }

  .shell {
    padding-inline: 18px;
  }

  .brand {
    font-size: 21px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-actions .button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .mobile-menu-button {
    display: inline-grid !important;
    place-items: center;
  }

  /* The account menu stays a click popover at every width — the old account
     side-drawer (#account-menu-button / #account-drawer) is not used here. */
  .account-menu-button {
    display: none !important;
  }

  .account-popover {
    display: block;
  }

  .account-popover-panel {
    max-width: calc(100vw - 32px);
  }

  .toast-region {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }

  .admin-screen-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-period {
    width: 100%;
  }

  .admin-insight {
    white-space: normal;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex !important;
  }

  .mobile-menu-button,
  .account-menu-button {
    display: none !important;
  }

  .mobile-drawer,
  #account-drawer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Pricing Strikethrough & Badges */
.price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88em;
}

.discount-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Upload Dropzone & Image Editor */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: var(--surface-sunken);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-2);
  background: var(--accent-wash);
}

.crop-preset {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.crop-preset.active {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
}

.image-editor-modal,
.description-modal {
  width: min(94vw, 680px);
  border-radius: 20px;
  border: none;
  padding: 0;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

.image-editor-modal::backdrop,
.description-modal::backdrop,
dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Checkout Gallery & Description */
.checkout-main-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.thumb-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.thumb-btn {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--surface-sunken);
  transition: all 0.15s ease;
}

.thumb-btn.active,
.thumb-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.description-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.65;
}

.read-more-btn {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.85rem;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* Payment Selection UI */
.payment-selector-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .payment-selector-tabs {
    grid-template-columns: 1fr;
  }
}

.payment-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-size: 13px;
  color: var(--text-muted);
}

.payment-tab-btn:hover {
  border-color: var(--border);
  background: var(--surface-sunken);
}

.payment-tab-btn.active {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-weight: 700;
}

.payment-tab-btn input[type="radio"] {
  accent-color: var(--accent);
}

.conversion-note {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Horizontal Scroll Showcase & Section Carousel */
.horizontal-scroll-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 18px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.horizontal-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-soft);
}

.scroll-card-item {
  flex: 0 0 280px;
  width: 280px;
}

@media (min-width: 640px) {
  .scroll-card-item {
    flex: 0 0 300px;
    width: 300px;
  }
}

@media (min-width: 1024px) {
  .scroll-card-item {
    flex: 0 0 320px;
    width: 320px;
  }
}

/* Section Header Bar with Navigation */
.section-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

/* Long rail titles ("Templates, Themes & UI Kits") otherwise force the row
   wider than the viewport on small screens, since a flex item's min-width
   defaults to its content size — that pushes the prev/next/"see all"
   controls off-layout instead of just wrapping. Clamp the title to one line
   with an ellipsis and let it actually shrink. */
@media (max-width: 640px) {
  .section-nav-header > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .section-nav-header h2 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .section-nav-header > div:last-child {
    flex: none;
  }
}

.scroll-arrow-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.scroll-arrow-btn:hover {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: #fff;
  transform: scale(1.05);
  opacity: 1;
}

.scroll-arrow-btn--next {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: #fff;
}

.scroll-arrow-btn--next:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Admin Dialog / Modal Controls */
dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

dialog[open].admin-modal-container {
  display: flex;
  flex-direction: column;
}

.admin-modal-container {
  width: min(96vw, 860px);
  max-height: 92vh;
  border-radius: 20px;
  border: 0;
  padding: 0;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  background: var(--surface);
  overflow: hidden;
  margin: auto;
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-height: calc(92vh - 140px);
}

.admin-modal-footer {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-section-card {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

/* ==========================================================================
   Homepage — hero, category tiles, seller strip, promo/newsletter panels
   (Figma "01 — Homepage", node 3:8)
   ========================================================================== */
.hero-section {
  background: var(--ink-950);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 96px clamp(20px, 1vw, 80px);
}

.hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.hero-sub {
  max-width: 52ch;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition: transform .18s ease, background-color .18s ease;
}

.hero-cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  opacity: 1;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  transition: background-color .18s ease;
}

.hero-cta-secondary:hover {
  background: rgba(255, 198, 25, .1);
  opacity: 1;
}

.hero-visual-col {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-visual-box {
  width: min(100%, 480px);
  aspect-ratio: 6 / 5;
  border-radius: 24px;
  border: 1px solid var(--ink-line);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-900), var(--ink-950));
}

.hero-visual-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding-block: 32px;
  }

  .hero-visual-col {
    justify-content: flex-start;
  }

  .hero-visual-box {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-visual-col {
    display: none;
  }
}

/* Category tile grid — icon-circle cards, replaces the bare-icon strip on the homepage only. */
.cattile-section {
  background: var(--surface-sunken);
  padding: 56px clamp(20px, 5vw, 80px);
}

.cattile-head {
  text-align: center;
  max-width: 62ch;
  margin: 0 auto 36px;
}

.cattile-head h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.cattile-head p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: .95rem;
}

/* Storefront category tiles: a deliberate 9-tiles-plus-"View all" block on
   large screens (5 columns × 2 rows), stepping down to fewer tiles as the grid
   narrows so it never leaves a ragged half-row. storefront.js renders at most 9
   `.cattile`s; the count actually shown is capped here per breakpoint. The
   trailing `.cattile__more` card is always visible. */
.cattile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}

/* Below md the section collapses to just the "View all categories" card. */
.cattile-grid .cattile {
  display: none;
}

/* md: 5 category tiles + View all, in a 3-wide grid (2 rows). */
@media (min-width: 768px) {
  .cattile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cattile-grid .cattile:nth-child(-n+5) {
    display: flex;
  }
}

/* lg: the full 9 tiles + View all, in a 5-wide grid (2 rows). */
@media (min-width: 1024px) {
  .cattile-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .cattile-grid .cattile:nth-child(n) {
    display: flex;
  }
}

.cattile {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cattile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  opacity: 1;
}

.cattile__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  color: var(--accent-strong);
}

.cattile__name {
  font-family: var(--font-display);
  color: var(--text);
  font-size: .98rem;
  font-weight: 700;
}

.cattile__count {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}

.cattile__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: .9rem;
  transition: border-color .2s ease, color .2s ease;
}

.cattile__more:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  opacity: 1;
}

/* Seller strip — compact horizontal band (homepage variant of the footer strip) */
.seller-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  background: var(--ink-950);
  color: #fff;
}

.seller-mini__text h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.seller-mini__text p {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: .85rem;
}

.seller-mini__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease;
}

.seller-mini__cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  opacity: 1;
}

/* Promo banner — deep teal, trust-signal row */
.promo-banner {
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--ink-950), var(--ink-900));
  padding: 56px clamp(20px, 5vw, 64px);
  text-align: center;
  color: #fff;
}

.promo-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
}

.promo-banner p {
  max-width: 62ch;
  margin: 12px auto 0;
  color: var(--ink-muted);
  font-size: .95rem;
  line-height: 1.6;
}

.promo-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
}

.promo-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.promo-trust-item span.icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 198, 25, .12);
  color: var(--accent);
}

.promo-trust-item strong {
  display: block;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}

.promo-trust-item small {
  color: var(--ink-muted);
  font-size: .74rem;
}

/* Generic form-field kit — shared by Auth (1:3532), Contact (3:2868) and the
   Account profile form; each page wraps a <label>+input/select/textarea pair
   in .form-field, groups full rows in .form-grid, and pairs of fields in
   .form-row-2. */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-field textarea {
  min-height: 120px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-soft);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 198, 25, .18);
}

.form-submit {
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .92rem;
  transition: background-color .18s ease;
}

.form-submit:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.form-submit:disabled {
  opacity: .6;
  cursor: default;
}

/* About/Contact hero band — dark full-bleed banner with badge + title + sub,
   shared by About (3:2660) and Contact (3:2868). */
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 96px clamp(20px, 6vw, 80px);
  background: var(--ink-950);
  color: #fff;
}

.about-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  max-width: 32ch;
}

.about-hero__sub {
  max-width: 56ch;
  color: rgba(255, 255, 255, .78);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* --- About: split image/copy rows, stats band, bullets, FAQ -------------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

@media (max-width: 860px) {
  .about-split {
    grid-template-columns: 1fr;
  }
}

.about-split h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.about-split p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-split__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-bullet {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
}

.about-bullet__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.stats-band {
  background: var(--surface-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: auto;
  padding: 48px clamp(20px, 6vw, 80px);
}

@media (max-width: 760px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.stat-item strong {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
}

.stat-item span {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.about-faq {
  max-width: 860px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

.about-faq__head {
  text-align: center;
  margin-bottom: 32px;
}

.about-faq__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.about-faq__head p {
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 20px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: .9rem;
}

.faq-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-hover);
  transition: transform .18s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

/* --- Contact (3:2868) ------------------------------------------------------ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1440px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-layout>div:first-child h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.contact-info-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-row__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 198, 25, .12);
  color: var(--accent-hover);
}

.contact-info-row>span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-info-row strong {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.contact-info-row a {
  color: var(--text);
}

.contact-info-row a:hover {
  color: var(--accent-hover);
  opacity: 1;
}

.contact-info-row span span {
  font-size: .78rem;
  color: var(--text-muted);
}

.contact-illustration {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.contact-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Generic dark page hero (Journal, Categories, etc.) — same treatment as
   .about-hero but without the badge. */
/* --- support (3:2868) ------------------------------------------------------ */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 80px clamp(20px, 6vw, 80px);
  background: var(--ink-950);
  color: #fff;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.page-hero__sub {
  max-width: 56ch;
  color: rgba(255, 255, 255, .78);
  font-size: 1.02rem;
  line-height: 1.6;
}


.support-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1440px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

@media (max-width: 900px) {
  .support-layout {
    grid-template-columns: 1fr;
  }
}

.support-layout h2,
.support-layout>div h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.support-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-faq-list .faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.support-faq-list .faq-item:hover {
  border-color: rgba(7, 34, 32, .2);
  box-shadow: var(--shadow-md);
}

.support-faq-list .faq-item[open] {
  border-color: var(--ink-800);
}

.support-faq-list .faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}

.support-faq-list .faq-item summary::-webkit-details-marker {
  display: none;
}

.support-faq-list .faq-item p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.65;
  font-size: .88rem;
}

.support-faq-list .faq-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 198, 25, .12);
  color: var(--accent-hover);
  transition: transform .2s ease, background-color .2s ease;
}

.support-faq-list .faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--ink-950);
  color: var(--accent);
}

.support-info-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.support-info-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.support-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.support-info-row__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 198, 25, .12);
  color: var(--accent-hover);
}

.support-info-row>span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.support-info-row strong {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.support-info-row a {
  color: var(--text);
}

.support-info-row a:hover {
  color: var(--accent-hover);
  opacity: 1;
}

.support-info-row span span {
  font-size: .78rem;
  color: var(--text-muted);
}

.support-illustration {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.support-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Support search bar — sits inside the about-hero on the support page */
.support-search {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-top: 8px;
}

.support-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  translate: 0 -50%;
  color: var(--accent);
  pointer-events: none;
}

.support-search input {
  width: 100%;
  height: 48px;
  padding: 0 20px 0 46px;
  border: 1px solid var(--ink-800);
  border-radius: var(--radius-full);
  background: var(--ink-900);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  transition: background-color .15s ease, border-color .15s ease;
}

.support-search input::placeholder {
  color: var(--ink-muted);
}

.support-search input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--accent);
}

/* Support channels section */
.support-channels {
  max-width: 1440px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

.support-channels__head {
  text-align: center;
  margin-bottom: 36px;
}

.support-channels__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
}

.support-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .support-channel-grid {
    grid-template-columns: 1fr;
  }
}

.support-channel-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow .2s ease, transform .2s ease;
}

.support-channel-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.support-channel-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--ink-950);
  color: var(--accent);
}

.support-channel-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.support-channel-card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin-top: auto;
  transition: color .15s ease;
}

.channel-link:hover {
  color: var(--accent);
  opacity: 1;
}

/* --- Trust & Legal ---------------------------------------------------------- */
/* Outer shell matches the site's standard 1440px width (same as the blog
   article and every dashboard). The nav + article block inside stays at a
   readable measure and is centred within that shell rather than stretched
   across it — running legal prose 1100px+ wide is unreadable. */
.legal-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 900px);
  justify-content: center;
  gap: 40px;
  max-width: 1440px;
  margin: auto;
  padding: 56px clamp(20px, 6vw, 80px) 80px;
  align-items: start;
}

@media (max-width: 760px) {
  .legal-body {
    grid-template-columns: 1fr;
  }
}

.legal-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

@media (max-width: 760px) {
  .legal-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.legal-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legal-nav a:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.legal-nav a.is-active {
  background: var(--ink-950);
  color: #fff;
  font-weight: 700;
}

/* Sub-heading that splits the buyer-facing documents from the seller-facing
   ones in the legal nav rail. */
.legal-nav__group {
  margin-top: 16px;
  padding: 0 14px 4px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .legal-nav__group {
    width: 100%;
    margin-top: 4px;
    padding-bottom: 0;
  }
}

.legal-article {
  min-width: 0;
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (max-width: 640px) {
  .legal-article {
    padding: 24px;
  }
}

.legal-skel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-effective {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  color: var(--accent-hover);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.legal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.legal-summary {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-doc-body {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.75;
}

/* --- Journal / Blog: single article view ----------------------------------- */
.blog-article-body {
  max-width: 1440px;
  margin: auto;
  padding: 48px clamp(20px, 6vw, 80px) 80px;
}

/* The outer shell matches the site's standard 1440px shell width, but a
   single column of running prose that wide is unreadable — this keeps the
   actual text/comments at a normal measure while related products (outside
   this wrapper) get to use the full width for a wider card grid. */
.blog-article-prose {
  max-width: 820px;
  margin: 0 auto 56px;
}

#blog-related {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.blog-article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.blog-article-back:hover {
  color: var(--text);
  opacity: 1;
}

.blog-article-cover {
  margin: 20px 0 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--surface-sunken);
}

.blog-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-article-readtime {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.blog-article-readtime::before {
  content: '·';
  margin-right: 10px;
  color: var(--text-soft);
}

.blog-article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.blog-article-actions[data-engagement-bar="bottom"] {
  margin: 40px 0 0;
  padding: 24px 0 0;
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

.blog-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
}

.blog-action-btn:hover {
  border-color: var(--text-soft);
  color: var(--text);
  opacity: 1;
}

.blog-action-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-hover);
}

#blog-like-btn.is-active svg {
  fill: var(--accent-hover);
}

#blog-save-btn.is-active svg {
  fill: var(--accent-hover);
}

/* --- Journal / Blog: comments ------------------------------------------- */
.blog-comments {
  margin: 40px 0 24px;
}

.blog-comments-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.blog-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.blog-comment-form textarea {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
  resize: vertical;
}

.blog-comment-form textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.blog-comment-form button[type="submit"] {
  align-self: flex-end;
}

.blog-comment-form--reply {
  margin: 12px 0 4px;
}

.blog-comments-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blog-comment {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.blog-comment.is-reply {
  margin-left: 28px;
  margin-top: 12px;
  background: var(--surface-sunken);
}

.blog-comment__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.blog-comment__head strong {
  font-size: .86rem;
  color: var(--text);
}

.blog-comment__head span {
  font-size: .74rem;
  color: var(--text-soft);
}

.blog-comment__body {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

.blog-comment__actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.blog-comment__reply-btn,
.blog-comment__delete-btn {
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.blog-comment__reply-btn:hover,
.blog-comment__delete-btn:hover {
  color: var(--accent-hover);
  opacity: 1;
}

.blog-comment__delete-btn {
  color: var(--danger);
}

/* --- Journal / Blog -------------------------------------------------------- */
.blog-body {
  max-width: 1200px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
}

.blog-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.blog-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  color: var(--accent-hover);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.blog-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 48px;
}

.blog-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.blog-card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }
}

.blog-featured__cover {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-sunken);
}

.blog-featured__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-featured__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 32px 32px 0;
}

@media (max-width: 860px) {
  .blog-featured__meta {
    padding: 0 24px 24px;
  }
}

.blog-featured__meta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.blog-featured__meta p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: .92rem;
}

.blog-featured__foot {
  margin-top: 4px;
}

.blog-featured__date {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-loadmore-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.blog-loadmore-count {
  font-size: .78rem;
  color: var(--text-soft);
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card.is-clickable,
.blog-featured.is-clickable {
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.blog-card__cover {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-sunken);
}

.blog-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.blog-card__body h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.blog-card__body p {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.6;
}

.blog-card__foot {
  margin-top: 4px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-soft);
}

/* Newsletter — full-bleed dark band (Figma: 1440 wide, no radius, 48/80
   padding), same treatment on every page that includes it. */
.newsletter-band {
  background: var(--ink-950);
  border-top: 1px solid var(--ink-900);
}

.newsletter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1440px;
  margin: auto;
  color: #fff;
  padding: 48px clamp(20px, 1vw, 80px);
}

.newsletter-panel h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.newsletter-panel p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: .85rem;
}

.newsletter-panel mark {
  background: none;
  color: var(--accent);
  font-weight: 800;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.newsletter-form input {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-800);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  outline: none;
}

.newsletter-form input::placeholder {
  color: var(--text-soft);
}

.newsletter-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 198, 25, .18);
}

.newsletter-form button {
  flex: none;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  transition: background-color .18s ease;
}

.newsletter-form button:hover {
  background: var(--accent-hover);
  opacity: 1;
}

/* ==========================================================================
   UI kit (Phase 0) — modal, confirm dialog, toast, tooltip, popover,
   skeletons, empty state, status pill, tabs, data table. Framework-agnostic:
   markup is produced by js/uikit.js, styling lives here.
   ========================================================================== */

/* --- Modal / dialog --------------------------------------------------- */
.uk-modal {
  border: 0;
  padding: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  background: var(--surface);
  color: var(--text);
  width: min(94vw, 520px);
  overflow: hidden;
  /* Flex column so the header and footer stay put and only the body scrolls —
     one scrollbar, not a nested pair. */
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.uk-modal::backdrop {
  background: rgba(7, 34, 32, .55);
  backdrop-filter: blur(3px);
}

.uk-modal[open] {
  animation: uk-modal-in .18s ease both;
}

/* Opacity-only on purpose — no transform. A `transform` animation on the
   dialog (even one whose end state is `transform: none`) makes the browser
   report the dialog's computed transform as a non-"none" matrix for as long
   as the animation stays attached (`animation-fill-mode`), and ANY element
   with a computed transform other than the literal keyword "none" becomes
   the containing block for its `position: fixed` descendants. That silently
   broke the custom `<select>` dropdown (js/select.js positions its option
   panel with `position: fixed` in real viewport coordinates): the panel's
   coordinates were computed against the viewport but applied against the
   dialog's box instead, and `.uk-modal`'s own `overflow: hidden` then
   clipped it out of view entirely — the trigger looked like it opened but
   no options ever appeared. */
@keyframes uk-modal-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.uk-modal__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.uk-modal__head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.uk-modal__head p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .82rem;
}

.uk-modal__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.uk-modal__close:hover {
  background: var(--border);
  opacity: 1;
}

.uk-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 22px;
  overflow-y: auto;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text);
}

.uk-modal__foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
}

.uk-modal--danger .uk-modal__head {
  border-color: var(--danger-bg);
}

/* --- Tooltip ------------------------------------------------------------ */
.uk-tip {
  position: relative;
}

.uk-tip::after {
  content: attr(data-uk-tip);
  position: absolute;
  z-index: 80;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--ink-950);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.uk-tip:hover::after,
.uk-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Popover (generic) --------------------------------------------------- */
.uk-popover {
  position: absolute;
  z-index: 85;
  min-width: 200px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.uk-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Row-action menu variant: positioned in viewport coords, appended to <body>
   so a scrolling table container can't clip it. */
.uk-popover--fixed {
  position: fixed;
  z-index: 600;
}

.uk-rowmenu {
  display: inline-flex;
}

/* Footer social row (js/ui.js SOCIAL_LINKS + site_settings.social) */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.footer-social:empty {
  display: none;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-muted);
  transition: background .15s ease, color .15s ease;
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 1;
}

.uk-rowmenu__trigger {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.uk-rowmenu__trigger:hover {
  border-color: var(--accent);
  color: var(--text);
}

.uk-popover a,
.uk-popover button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: .82rem;
  text-align: left;
}

.uk-popover a:hover,
.uk-popover button:hover {
  background: var(--accent-wash);
  opacity: 1;
}

/* --- Skeleton loaders ---------------------------------------------------- */
.uk-skel {
  position: relative;
  overflow: hidden;
  background: var(--border);
  border-radius: var(--radius-sm);
}

.uk-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: uk-skel-sweep 1.3s infinite;
}

:root[data-theme="dark"] .uk-skel::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .uk-skel::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  }
}

@keyframes uk-skel-sweep {
  100% {
    transform: translateX(100%);
  }
}

.uk-skel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.uk-skel-card__media {
  height: 160px;
}

.uk-skel-card__body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.uk-skel-line {
  height: 12px;
}

.uk-skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.uk-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.uk-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .8;
}

/* --- Empty state ----------------------------------------------------------- */
.uk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centre in the host panel/cell rather than hugging its top-left corner. */
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 240px;
  padding: 48px 24px;
  color: var(--text-muted);
}

/* Dropped into the CMS media library's CSS grid, the empty state would be
   squeezed into one 190px column — drop the grid while it's the only child. */
.adm-media-grid:has(> .uk-empty:only-child) {
  display: block;
}

.uk-empty__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.uk-empty__title {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.uk-empty__body {
  max-width: 42ch;
  font-size: .85rem;
  line-height: 1.55;
}

.uk-empty__cta {
  margin-top: 6px;
}

/* --- Status / badge pill --------------------------------------------------- */
.uk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.uk-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.uk-badge--success {
  background: var(--success-bg);
  color: #067a55;
}

.uk-badge--warning {
  background: var(--warning-bg);
  color: var(--accent-strong);
}

.uk-badge--danger {
  background: var(--danger-bg);
  color: #b91c1c;
}

.uk-badge--info {
  background: var(--info-bg);
  color: #1d4ed8;
}

.uk-badge--neutral {
  background: var(--surface-sunken);
  color: var(--text-muted);
}

/* --- Tabs ---------------------------------------------------------------- */
.uk-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.uk-tabs__btn {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}

.uk-tabs__btn:hover {
  color: var(--text);
  opacity: 1;
}

.uk-tabs__btn.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.uk-tabs__panel {
  display: none;
  padding-top: 18px;
}

.uk-tabs__panel.is-active {
  display: block;
  animation: page-enter .2s ease both;
}

/* Collapsible tab strip (initTabs, 5+ tabs). The trigger only shows below lg. */
/* Transparent to layout on wide screens; becomes the dropdown's anchor below lg. */
.uk-tabs__collapse-head {
  display: contents;
}

.uk-tabs__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}

.uk-tabs__toggle .uk-badge {
  margin-left: auto;
}

.uk-tabs__toggle::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.uk-tabs--collapse.is-tabs-open .uk-tabs__toggle::after {
  transform: rotate(-135deg) translateY(-2px);
}

@media (max-width: 1023px) {
  .uk-tabs__collapse-head {
    display: block;
    position: relative;
  }

  .uk-tabs--collapse .uk-tabs__toggle {
    display: flex;
  }

  .uk-tabs--collapse .uk-tabs__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }

  .uk-tabs--collapse.is-tabs-open .uk-tabs__list {
    display: flex;
  }

  .uk-tabs--collapse .uk-tabs__btn {
    width: 100%;
    text-align: left;
    border-bottom: 0;
    border-radius: 8px;
    padding: 10px 12px;
  }

  .uk-tabs--collapse .uk-tabs__btn.is-active {
    background: var(--accent-wash);
    border-bottom-color: transparent;
  }
}

/* --- Data table ------------------------------------------------------------ */
.uk-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.uk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}

.uk-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.uk-table th[data-sortable] {
  cursor: pointer;
  user-select: none;
}

.uk-table th[data-sortable]:hover {
  color: var(--text);
}

.uk-table th .uk-sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: .5;
}

.uk-table th.is-sorted .uk-sort-icon {
  opacity: 1;
}

.uk-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.uk-table tbody tr:last-child td {
  border-bottom: 0;
}

.uk-table tbody tr:hover td {
  background: var(--surface-sunken);
}

.uk-table__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.uk-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
  font-size: .78rem;
  color: var(--text-muted);
}

.uk-page-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.uk-page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
  opacity: 1;
}

.uk-page-btn:disabled {
  opacity: .4;
  cursor: default;
}

/* ==========================================================================
   Store / All Products (Figma 3:1294)
   ========================================================================== */
.store-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.store-crumb a:hover {
  color: var(--accent-ink);
  opacity: 1;
}

.store-crumb__sep {
  color: var(--text-soft);
}

.store-heading {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}

.store-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 32px;
  align-items: start;
}

.store-layout.is-single-col {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .store-layout {
    grid-template-columns: 1fr;
  }
}

/* Storefront "no products" / "no results" — one centred card, spanning the
   whole product grid, matching the .uk-empty treatment used elsewhere. */
.store-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 380px;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.store-empty__emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.store-empty h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.store-empty p {
  max-width: 44ch;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.store-empty__cta {
  margin-top: 8px;
}

.store-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Border radius/shadow belong to the desktop in-flow card look only — at
   <=980px `.dash-sidebar` turns this into a fixed off-canvas drawer (see
   the shared rules near the top of this file) with its own edge-to-edge
   radius/shadow, and same-specificity rules declared later here would
   otherwise win the cascade and silently cancel that. */
@media (min-width: 981px) {
  .store-sidebar {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }
}

.store-filters-toggle {
  display: none;
}

@media (max-width: 980px) {
  .store-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
  }

  .store-filters-toggle:hover {
    background: var(--surface-sunken);
    opacity: 1;
  }
}

.store-filter+.store-filter {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.store-filter__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.store-filter__clear {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.store-filter__clear:hover {
  color: var(--text);
  opacity: 1;
}

.store-price-slider {
  position: relative;
  height: 30px;
}

.store-price-slider input[type="range"] {
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 6px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
}

.store-price-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(7, 34, 32, .3);
  cursor: pointer;
  margin-top: -5px;
}

.store-price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(7, 34, 32, .3);
  cursor: pointer;
}

.store-price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.store-price-slider input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}

.store-price-slider__track {
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border);
}

.store-price-slider__fill {
  position: absolute;
  top: 8px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent);
}

.store-price-slider__values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.store-check-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 220px;
  overflow-y: auto;
}

.store-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .84rem;
  color: var(--text);
}

.store-check:hover {
  background: var(--surface-sunken);
  opacity: 1;
}

.store-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}

.store-check__count {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.store-check__stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--accent);
}

.store-check__stars i,
.store-check__stars svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.store-check__stars .is-empty {
  color: var(--border);
}

.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.store-toolbar__count {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-muted);
}

.store-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  border: 1px solid rgba(255, 198, 25, .35);
  color: var(--text);
  font-size: .72rem;
  font-weight: 700;
}

.store-chip button {
  display: grid;
  place-items: center;
  color: inherit;
}

.store-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}

.store-page-btn {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
}

.store-page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
  opacity: 1;
}

.store-page-btn:disabled {
  opacity: .35;
  cursor: default;
}

.store-page-btn.is-active {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: #fff;
}

.store-page-ellipsis {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  color: var(--text-soft);
  font-weight: 700;
}

.store-card-vendor {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ==========================================================================
   Product Detail (Figma 3:1939)
   ========================================================================== */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 56px;
}

@media (max-width: 899px) {
  .pd-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.pd-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

@media (max-width: 899px) {
  .pd-gallery {
    position: static;
  }
}

.pd-gallery-main {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  overflow: hidden;
  cursor: zoom-in;
}

.pd-gallery-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(7, 34, 32, .6);
  color: #fff;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity .15s ease;
}

.pd-gallery-main:hover .pd-gallery-zoom {
  opacity: 1;
}

.pd-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-gallery-main .catalog-card__placeholder {
  width: 100%;
  height: 100%;
}

.pd-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.pd-thumb {
  display: block;
  flex: none;
  width: 52px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  padding: 0;
  background: var(--surface-sunken);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumb.is-active {
  border-color: var(--accent);
}

.pd-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pd-cat-badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--ink-800);
  color: var(--ink-muted);
  font-size: .75rem;
  font-weight: 700;
}

.pd-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}

.pd-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
  color: var(--text-muted);
}

.pd-byline a {
  color: var(--text);
  font-weight: 700;
}

.pd-byline a:hover {
  color: var(--accent-ink);
  opacity: 1;
}

.pd-byline__sep {
  width: 1px;
  height: 14px;
  background: var(--border);
}

.pd-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pd-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
}

.pd-stars i,
.pd-stars svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.pd-stars .is-empty {
  color: var(--border);
}

.pd-price-block {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.pd-price-current {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.pd-price-original {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.pd-price-save {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.pd-price-note {
  color: var(--text-muted);
  font-size: .84rem;
}

.pd-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pd-spec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.pd-spec__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-sunken);
  color: var(--ink-950);
}

.pd-spec__label {
  display: block;
  color: var(--text-muted);
  font-size: .72rem;
}

.pd-spec__value {
  display: block;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  color: var(--text);
}

.pd-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pd-buy-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 800;
  transition: background-color .18s ease, transform .18s ease;
}

.pd-buy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  opacity: 1;
}

.pd-sell-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--accent-wash);
  transition: border-color .18s ease, background-color .18s ease;
}

.pd-sell-cta:hover {
  border-color: var(--accent);
  background: rgba(255, 198, 25, .18);
  opacity: 1;
}

.pd-sell-cta__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.pd-sell-cta__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pd-sell-cta__text strong {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}

.pd-sell-cta__text span {
  font-size: .78rem;
  color: var(--text-muted);
}

.pd-sell-cta>svg,
.pd-sell-cta>i {
  flex: none;
  color: var(--text-muted);
}

.pd-wish-btn-lg {
  position: static;
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
  color: var(--text);
  transition: color .18s ease, border-color .18s ease;
}

.pd-wish-btn-lg:hover {
  color: #e11d48;
  border-color: #e11d48;
  opacity: 1;
}

.pd-wish-btn-lg.is-saved {
  color: #e11d48;
  border-color: #e11d48;
}

.pd-wish-btn-lg.is-saved svg {
  fill: currentColor;
}

.pd-wish-btn-lg svg {
  width: 22px;
  height: 22px;
  fill: transparent;
}

.pd-tabs-section {
  margin-bottom: 56px;
}

.pd-tab-body {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.75;
  white-space: pre-line;
}

.pd-tab-body.is-muted {
  color: var(--text-muted);
}

/* Markdown-rendered description (js/ui.js renderMarkdown) — headings/lists/
   links/code need their own rules since the plain-text `.pd-tab-body` above
   only styles running prose. */
.pd-markdown h2,
.pd-markdown h3,
.pd-markdown h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  margin: 20px 0 8px;
}

.pd-markdown h2:first-child,
.pd-markdown h3:first-child,
.pd-markdown h4:first-child {
  margin-top: 0;
}

.pd-markdown h2 { font-size: 1.25rem; }
.pd-markdown h3 { font-size: 1.1rem; }
.pd-markdown h4 { font-size: 1rem; }

.pd-markdown p {
  margin-bottom: 14px;
}

.pd-markdown ul,
.pd-markdown ol {
  margin: 0 0 14px 1.25em;
}

.pd-markdown ul { list-style: disc; }
.pd-markdown ol { list-style: decimal; }

.pd-markdown li {
  margin-bottom: 6px;
}

.pd-markdown a {
  color: var(--accent-hover);
  text-decoration: underline;
}

.pd-markdown code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: .85em;
}

.pd-reviews-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 800px) {
  .pd-reviews-layout {
    grid-template-columns: 1fr;
  }
}

.pd-rating-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pd-rating-big {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.pd-rating-count {
  color: var(--text-muted);
  font-size: .82rem;
  margin-top: 4px;
}

.pd-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .8rem;
  color: var(--text);
}

.pd-bar-row .pd-bar-label {
  width: 26px;
  flex: none;
}

.pd-bar-track {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  overflow: hidden;
}

.pd-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
}

.pd-bar-pct {
  width: 34px;
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-muted);
}

.pd-write-review-btn {
  align-self: flex-start;
}

.pd-review-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-review-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pd-review-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-review-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: .92rem;
}

.pd-review-verified {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-sunken);
  color: var(--text);
  font-size: .68rem;
  font-weight: 700;
}

.pd-review-date {
  color: var(--text-muted);
  font-size: .78rem;
}

.pd-review-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: .92rem;
}

.pd-review-body {
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.65;
}

.pd-related h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.pd-related-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .pd-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .pd-related-grid {
    grid-template-columns: 1fr;
  }
}

.pd-review-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-review-field label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
}

.pd-star-picker {
  display: flex;
  gap: 4px;
}

.pd-star-picker button {
  padding: 2px;
  color: var(--border);
}

.pd-star-picker button.is-active,
.pd-star-picker button:hover {
  color: var(--accent);
}

.pd-star-picker svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* ==========================================================================
   Phase 2 — Auth (1:3532), Cart (1:3777), Account Dashboard (1:3640)
   ========================================================================== */

/* --- Auth --------------------------------------------------------------- */
.auth-shell {
  max-width: 1440px;
  margin: auto;
  padding: 80px clamp(20px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-card {
  width: min(100%, 520px);
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.auth-tabs button {
  flex: 1;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background-color .15s ease, color .15s ease;
}

.auth-tabs button.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-label-row a {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
}

.auth-label-row a:hover {
  color: var(--accent-ink);
  opacity: .8;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .95rem;
  transition: background-color .18s ease;
}

.auth-submit:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.auth-submit:disabled {
  opacity: .6;
}

.auth-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.auth-trust__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .8rem;
}

.auth-trust__item i,
.auth-trust__item svg {
  color: #2dab66;
}

/* --- Cart ----------------------------------------------------------------- */
.cart-page-header {
  max-width: 1440px;
  margin: auto;
  padding: 48px clamp(20px, 6vw, 80px) 0;
}

.cart-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 32px;
  align-items: start;
  max-width: 1440px;
  margin: auto;
  padding: 24px clamp(20px, 6vw, 80px) 64px;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.cart-item-row img {
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-sunken);
}

.cart-item-row__details {
  flex: 1;
  min-width: 0;
}

.cart-item-row__vendor {
  display: block;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
}

.cart-item-row__title {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.cart-qty-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.cart-qty-stepper button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.cart-qty-stepper button:hover:not(:disabled) {
  color: var(--text);
  opacity: 1;
}

.cart-qty-stepper button:disabled {
  opacity: .3;
}

.cart-qty-stepper span {
  min-width: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}

.cart-item-row__price {
  flex: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.cart-item-row__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--danger);
}

.cart-item-row__remove:hover {
  background: var(--danger-bg);
  opacity: 1;
}

.cart-summary {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.cart-summary h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.cart-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--text-muted);
}

.cart-summary-line strong {
  color: var(--text);
  font-weight: 600;
}

.cart-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cart-summary-total span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.cart-summary-total strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color .18s ease;
}

.cart-checkout-btn:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.cart-checkout-btn:disabled {
  opacity: .5;
  cursor: default;
}

.cart-continue-link {
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}

.cart-continue-link:hover {
  color: var(--text);
  opacity: 1;
}

/* Empty cart breaks out of the two-column cart grid and centres on the page. */
.cart-empty-wrap {
  max-width: 1440px;
  margin: auto;
  padding: 24px clamp(20px, 6vw, 80px) 64px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 420px;
  padding: 64px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.cart-empty__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.cart-empty h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.cart-empty p {
  max-width: 42ch;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.cart-empty__cta {
  margin-top: 8px;
}

/* --- Account dashboard ---------------------------------------------------- */
.acct-shell {
  max-width: 1440px;
  margin: auto;
  padding: 48px clamp(20px, 6vw, 80px) 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 980px) {
  .acct-shell {
    grid-template-columns: 1fr;
  }
}

.acct-sidebar {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* See `.adm-sidebar`'s equivalent comment: keep sticky positioning out of
   the mobile cascade so it can't override the `.dash-sidebar` off-canvas
   drawer rules at <=980px. */
@media (min-width: 981px) {
  .acct-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

.acct-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acct-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}

.acct-nav button:hover {
  background: var(--surface-sunken);
  opacity: 1;
}

.acct-nav button.is-active {
  background: var(--ink-950);
  color: #fff;
  font-weight: 700;
}

.acct-nav button.is-active i,
.acct-nav button.is-active svg {
  color: var(--accent);
}

.acct-seller-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.acct-seller-card h3 {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 800;
  color: var(--text);
}

.acct-seller-card p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .76rem;
  line-height: 1.5;
}

.acct-seller-card a {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .76rem;
  font-weight: 700;
}

.acct-seller-card a:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.acct-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.acct-tab-panel {
  display: none;
}

.acct-tab-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.acct-welcome {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--ink-950);
}

.acct-welcome__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  background: var(--ink-800);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  overflow: hidden;
}

.acct-welcome__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acct-welcome h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.acct-welcome p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: .88rem;
}

.acct-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 700px) {
  .acct-stats {
    grid-template-columns: 1fr;
  }
}

.acct-stat-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.acct-stat-card span {
  color: var(--text-muted);
  font-size: .88rem;
}

.acct-stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.acct-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.acct-panel h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.acct-table-wrap {
  overflow-x: auto;
}

.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}

.acct-table thead th {
  text-align: left;
  padding: 12px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.acct-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.acct-table tbody tr:last-child td {
  border-bottom: 0;
}

.acct-table a {
  font-weight: 700;
  color: var(--accent-strong);
}

.acct-table a:hover {
  opacity: .8;
}

.acct-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.acct-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .acct-profile-form {
    grid-template-columns: 1fr;
  }
}

.acct-profile-form .span-2 {
  grid-column: 1 / -1;
}

.acct-profile-form .form-submit {
  grid-column: 1 / -1;
  width: auto;
  padding: 0 28px;
  justify-self: start;
}

.acct-form-section,
.vnd-form-section {
  margin: 8px 0 -4px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.acct-form-section:first-child,
.vnd-form-section:first-child {
  margin-top: 0;
}

/* Social-link inputs: a compact two-up grid inside one span-2 field. */
.vnd-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .vnd-social-grid {
    grid-template-columns: 1fr;
  }
}

.acct-avatar-field {
  display: flex;
  align-items: center;
  gap: 16px;
}

.acct-avatar-field__preview {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--ink-950);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  overflow: hidden;
}

.acct-avatar-field__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.acct-welcome__avatar img,
.acct-avatar-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acct-check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.acct-check-line input {
  flex: none;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* --- Order Success (1:4014) -------------------------------------------- */
.success-shell {
  max-width: 1440px;
  margin: auto;
  padding: 64px clamp(20px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
}

.success-card {
  width: min(100%, 640px);
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-bg);
  color: #2dab66;
}

.success-card h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
}

.success-card>p#status-copy {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.5;
}

.success-download-list {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.success-download-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.success-download-item__icon {
  flex: none;
  color: var(--text);
}

.success-download-item__meta {
  flex: 1;
  min-width: 0;
}

.success-download-item__meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.success-download-item__meta span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .76rem;
}

.success-download-item a.dl-btn {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 700;
}

.success-download-item a.dl-btn:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.success-note {
  margin-top: 16px;
  color: var(--danger);
  font-size: .76rem;
}

.success-cross-sell {
  width: 100%;
}

.success-cross-sell h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.success-cross-sell-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1000px) {
  .success-cross-sell-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .success-cross-sell-grid {
    grid-template-columns: 1fr;
  }
}

.success-help {
  color: var(--text-muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: min(100%, 640px);
  text-align: center;
}

.success-help a {
  font-weight: 700;
  color: var(--text);
}

/* --- Checkout rebuild (Figma 1:3893, real multi-item cart) -------------- */
.checkout-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 1440px;
  margin: 24px auto 0;
  margin-inline: clamp(20px, 6vw, 80px);
}

@media (min-width: 1440px) {
  .checkout-progress {
    margin-inline: auto;
  }
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-step__badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.checkout-step.is-done .checkout-step__badge {
  background: #2dab66;
  color: #fff;
}

.checkout-step.is-active .checkout-step__badge {
  background: var(--accent);
  color: var(--accent-ink);
}

.checkout-step span {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.checkout-step.is-done span,
.checkout-step.is-active span {
  color: var(--text);
  font-weight: 700;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 32px;
  max-width: 1440px;
  margin: 24px auto 64px;
  padding-inline: clamp(20px, 6vw, 80px);
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

.checkout-panel {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
}

@media (max-width: 480px) {
  .checkout-panel {
    padding: 20px;
  }
}

.checkout-panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.checkout-panel h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 24px 0 16px;
}

.checkout-summary-col {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

@media (min-width: 901px) {
  .checkout-summary-col {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

@media (max-width: 480px) {
  .checkout-summary-col {
    padding: 18px;
  }
}

.checkout-summary-col h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.checkout-summary-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.checkout-summary-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.checkout-summary-item img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-sunken);
  flex: none;
}

.checkout-summary-item__meta {
  flex: 1;
  min-width: 0;
}

.checkout-summary-item__meta strong {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-summary-item__meta span {
  font-size: .72rem;
  color: var(--text-muted);
}

.checkout-summary-item__price {
  flex: none;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}

.checkout-promo-row {
  display: flex;
  gap: 8px;
}

.checkout-promo-row input {
  flex: 1;
}

.checkout-empty {
  max-width: 1440px;
  margin: 64px auto;
  padding: 64px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Phase 3 — Vendor Dashboard (V01 Overview 1:4148, V02 My Products 1:4311,
   V03 Sales & Earnings 1:4579, V04 Payouts 1:4774, V05 Boost & Ads 1:4921,
   V06 Ad Wallet 1:5084)
   ========================================================================== */

/* --- Gate / apply / status screens (shared shell before the dashboard) -- */
.vnd-gate {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.vnd-gate-card {
  width: min(100%, 460px);
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.vnd-gate-card--wide {
  width: min(100%, 640px);
  text-align: left;
}

.vnd-gate-card--center {
  text-align: center;
}

.vnd-gate-card p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
}

.vnd-gate-card h1 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.vnd-gate-lede {
  margin-top: 8px !important;
}

.vnd-status-icon {
  margin: 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--warning-bg);
  color: #b45309;
}

.vnd-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .vnd-form {
    grid-template-columns: 1fr;
  }
}

.vnd-field {
  display: block;
}

.vnd-field--span2 {
  grid-column: 1 / -1;
}

.vnd-optional {
  font-weight: 400;
  color: var(--text-soft);
}

.vnd-callout {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  font-size: .78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.vnd-callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

/* --- Dashboard shell ----------------------------------------------------- */
.vnd-shell {
  max-width: 1440px;
  margin: auto;
  padding: 40px clamp(20px, 1vw, 80px) 64px;
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 980px) {
  .vnd-shell {
    grid-template-columns: 1fr;
  }
}

.vnd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* See `.adm-sidebar`'s equivalent comment: keep sticky positioning out of
   the mobile cascade so it can't override the `.dash-sidebar` off-canvas
   drawer rules at <=980px. */
@media (min-width: 981px) {
  .vnd-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

/* Mobile sidebar layout (off-canvas drawer) now lives in the shared
   `.dash-sidebar` rules above, which this element also carries as a class. */

.vnd-store-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vnd-store-card__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-950);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  overflow: hidden;
}

.vnd-store-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vnd-store-card__name {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vnd-balance-pill {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--ink-950);
  color: #fff;
}

.vnd-balance-pill span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-muted);
}

.vnd-balance-pill strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}

.vnd-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vnd-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vnd-nav a:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.vnd-nav a.is-active {
  background: var(--ink-950);
  color: #fff;
  font-weight: 700;
}

.vnd-nav a.is-active i,
.vnd-nav a.is-active svg {
  color: var(--accent);
}

.vnd-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.vnd-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vnd-sidebar-link:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.vnd-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.vnd-tab-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.vnd-tab-panel.is-active {
  display: flex;
}

.vnd-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.vnd-panel-head h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.vnd-panel-head p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .86rem;
}

.vnd-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.vnd-panel h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.vnd-panel-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.6;
}

.vnd-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.vnd-stat-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .vnd-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vnd-stat-grid--3 {
    gap: 10px;
  }

  .vnd-stat-grid--3 .vnd-stat-card {
    padding: 14px;
  }
}

@media (max-width: 900px) {
  .vnd-stat-grid > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.vnd-stat-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.vnd-stat-card span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.vnd-stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.vnd-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: .74rem;
}

.vnd-two-col {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 20px;
  align-items: start;
}

.vnd-two-col--reverse {
  grid-template-columns: .7fr 1.3fr;
}

@media (max-width: 900px) {

  .vnd-two-col,
  .vnd-two-col--reverse {
    grid-template-columns: 1fr;
  }
}

.vnd-chart {
  margin-top: 16px;
  height: 180px;
}

.vnd-chart-bars {
  display: flex;
  height: 100%;
  align-items: flex-end;
  gap: 4px;
}

.vnd-chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vnd-chart-bar__fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  min-height: 3px;
}

.vnd-chart-bar small {
  font-size: .6rem;
  color: var(--text-soft);
}

.vnd-chart-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-muted);
  font-size: .84rem;
  text-align: center;
}

.vnd-checklist {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vnd-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vnd-check-row__dot {
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-sunken);
  color: var(--text-soft);
}

.vnd-check-row.is-done .vnd-check-row__dot {
  background: var(--success-bg);
  color: #2dab66;
}

.vnd-check-row strong {
  display: block;
  font-size: .84rem;
  color: var(--text);
}

.vnd-check-row.is-done strong {
  color: var(--text-soft);
  text-decoration: line-through;
}

.vnd-check-row span.vnd-check-hint {
  font-size: .76rem;
  color: var(--text-muted);
}

.vnd-check-row a {
  margin-left: 6px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.vnd-activity-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}

.vnd-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.vnd-activity-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.vnd-activity-row__meta strong {
  display: block;
  font-size: .86rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.vnd-activity-row__meta span {
  font-size: .74rem;
  color: var(--text-muted);
}

.vnd-activity-row__value {
  text-align: right;
  flex: none;
}

.vnd-activity-row__value strong {
  display: block;
  font-size: .88rem;
  color: var(--text);
}

.vnd-balance-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vnd-balance-block strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.vnd-balance-block p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .8rem;
}

.vnd-account-list,
#payouts-history {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}

.vnd-account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.vnd-account-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.vnd-account-row__meta strong {
  display: block;
  font-size: .88rem;
  color: var(--text);
}

.vnd-account-row__meta span {
  font-size: .76rem;
  color: var(--text-muted);
}

.vnd-account-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vnd-charge-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: .84rem;
  color: var(--text);
}

.vnd-charge-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vnd-charge-row strong {
  color: var(--text);
}

.vnd-charge-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.vnd-full-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
}

.vnd-campaign-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.vnd-campaign-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
}

.vnd-campaign-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vnd-campaign-card__head strong {
  font-size: .92rem;
  color: var(--text);
}

.vnd-campaign-card__sub {
  margin-top: 2px;
  font-size: .74rem;
  color: var(--text-muted);
}

.vnd-campaign-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.vnd-campaign-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.vnd-campaign-spend {
  margin-top: 6px;
  font-size: .72rem;
  color: var(--text-muted);
}

.vnd-campaign-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.vnd-campaign-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  color: var(--text);
}

.vnd-campaign-stats span {
  display: block;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-soft);
}

.vnd-campaign-card__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.vnd-logo-preview {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-950);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  overflow: hidden;
}

.vnd-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vnd-banner-preview {
  flex: none;
  width: 160px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--ink-950);
  color: var(--text-soft);
  font-size: .68rem;
  overflow: hidden;
}

.vnd-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Modal helpers reused by the vendor console's openModal() forms ----- */
.uk-modal--wide {
  width: min(94vw, 640px);
}

/* Form-heavy modals (product create/edit): a touch wider, and a consistent
   vertical rhythm so the dialog doesn't visibly resize as fields/previews
   appear (the body scrolls instead — see the flex rules on .uk-modal). */
.uk-modal--form {
  width: min(94vw, 720px);
}

.adm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-form .adm-modal-grid {
  gap: 14px;
}

.adm-form .field[readonly] {
  background: var(--surface-sunken);
  color: var(--text-muted);
  cursor: not-allowed;
}

.label--nowrap {
  white-space: nowrap;
}

/* Format badge pinned to the end of the title input (e.g. PDF / LINK). */
.adm-title-wrap {
  position: relative;
  display: block;
}

.adm-title-wrap .field.has-badge {
  padding-right: 68px;
}

.adm-title-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  pointer-events: none;
}

/* Collapsible section (Full description). */
.adm-collapse {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
}

.adm-collapse > summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.adm-collapse > summary::-webkit-details-marker {
  display: none;
}

.adm-collapse > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--text-soft);
  transition: transform .15s ease;
}

.adm-collapse[open] > summary::before {
  transform: rotate(90deg);
}

.adm-collapse__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.adm-collapse > *:not(summary) {
  margin-bottom: 12px;
}

/* Segmented control (delivery mode). */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
}

.seg__btn {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: calc(var(--radius-md) - 4px);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.seg__btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.adm-ad-notice {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-wash);
  border: 1px solid var(--accent);
}

.adm-ad-notice strong {
  font-size: .8rem;
  color: var(--text);
}

.adm-ad-notice p {
  margin-top: 3px;
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.adm-wallet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  font-size: .78rem;
}

.adm-wallet-line[hidden] {
  display: none;
}

.vnd-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .vnd-modal-grid {
    grid-template-columns: 1fr;
  }
}

.vnd-modal-grid .vnd-field--span2 {
  grid-column: 1 / -1;
}

.vnd-upload {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
}

.vnd-upload img {
  margin: 10px auto 0;
  max-height: 96px;
  border-radius: var(--radius-sm);
}

.vnd-check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
}

/* ==========================================================================
   Admin back-office shell — Phase 4. Mirrors the vendor console's `.vnd-`
   shape (sidebar nav + hash-routed content panels) under its own `.adm-`
   prefix, plus CMS-editor / moderation-queue / media-library additions that
   have no vendor-console analog.
   ========================================================================== */

.adm-shell {
  max-width: 1440px;
  margin: auto;
  padding: 32px clamp(20px, 1vw, 80px) 64px;
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 28px;
  align-items: start;
}

/* Admin/vendor/account dashboards get more room than the storefront's
   Figma-locked 1440px grid: the overview page is growing more analytics/charts
   and more entity types (stores, vendors, admins, customers, ads) that all want
   width. `body.dash-wide` is set on admin.html/vendor.html/account.html, so
   this widens their header instance, their own shell, AND the footer that sits
   below them — every public storefront page keeps the untouched 1440px rules
   above. */
body.dash-wide .header-shell,
body.dash-wide .main-nav,
body.dash-wide .adm-shell,
body.dash-wide .vnd-shell,
body.dash-wide .acct-shell,
body.dash-wide #site-footer > .shell {
  max-width: 1720px;
}

@media (max-width: 980px) {
  .adm-shell {
    grid-template-columns: 1fr;
  }
}

.adm-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* position:sticky must only apply once the sidebar is back in normal flow
   (desktop layout) — at <=980px `.dash-sidebar` turns it into a fixed
   off-canvas drawer, and this rule (same specificity, declared later) would
   otherwise win the cascade and silently cancel that positioning. */
@media (min-width: 981px) {
  .adm-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
  }
}

/* Mobile sidebar layout (off-canvas drawer) now lives in the shared
   `.dash-sidebar` rules above, which this element also carries as a class. */

.adm-id-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-id-card__mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-950);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
}

.adm-id-card__name {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-id-card__email {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.adm-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.adm-nav a:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.adm-nav a.is-active {
  background: var(--ink-950);
  color: #fff;
  font-weight: 700;
}

.adm-nav a.is-active i,
.adm-nav a.is-active svg {
  color: var(--accent);
}

.adm-nav a span.adm-nav-badge {
  margin-left: auto;
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
}

.adm-nav-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: .66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-soft);
  padding-left: 12px;
}

.adm-nav-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.adm-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.adm-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.adm-sidebar-link:hover {
  background: var(--surface-sunken);
  color: var(--text);
  opacity: 1;
}

.adm-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.adm-tab-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.adm-tab-panel.is-active {
  display: flex;
}

.adm-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.adm-panel-head h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.adm-panel-head p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .86rem;
  max-width: 60ch;
}

.adm-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.adm-panel h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.adm-panel-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.6;
}

.adm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.adm-stat-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .adm-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* The "store health" style 3-card row (Stores/Admins/Customers, etc.)
     stays in one row at every width instead of wrapping — narrower cards
     read better here than a lone third card dropping to its own line. */
  .adm-stat-grid--3 {
    gap: 10px;
  }

  .adm-stat-grid--3 .adm-stat-card {
    padding: 14px;
  }
}

/* An odd-numbered 2-column grid otherwise leaves its last card alone on a
   half-empty row — stretch it across both columns instead. */
@media (max-width: 900px) {
  .adm-stat-grid > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.adm-stat-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.adm-stat-card span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.adm-stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.adm-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: .74rem;
}

.adm-two-col {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .adm-two-col {
    grid-template-columns: 1fr;
  }
}

.adm-chart {
  margin-top: 16px;
  height: 190px;
}

.adm-rank-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-rank-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 6px;
  align-items: center;
}

.adm-rank-row strong {
  display: block;
  font-size: .86rem;
  color: var(--text);
}

.adm-rank-row small {
  font-size: .74rem;
  color: var(--text-muted);
}

.adm-rank-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .88rem;
  color: var(--text);
}

.adm-rank-track {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.adm-rank-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

/* --- Lightweight donut / legend (Overview analytics, E) ----------------- */
.adm-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.adm-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
}

.adm-legend-row strong {
  margin-left: auto;
  color: var(--text);
  font-family: var(--font-display);
}

.adm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Store team (vendor.html Team tab) ----------------------------------- */
.vnd-team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.vnd-team-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.vnd-team-row__meta strong {
  display: block;
  font-size: .88rem;
  color: var(--text);
}

.vnd-team-row__meta span {
  font-size: .74rem;
  color: var(--text-muted);
}

.adm-field {
  display: block;
}

.adm-field--span2 {
  grid-column: 1 / -1;
}

.adm-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .adm-modal-grid {
    grid-template-columns: 1fr;
  }
}

.adm-modal-grid .adm-field--span2 {
  grid-column: 1 / -1;
}

.adm-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-gallery-thumb {
  position: relative;
  display: block;
  width: 56px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.adm-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adm-gallery-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(7, 34, 32, .7);
  color: #fff;
}

.adm-upload {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
}

.adm-upload img {
  margin: 10px auto 0;
  max-height: 96px;
  border-radius: var(--radius-sm);
}

.adm-check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Drag-and-drop file field (js/filedrop.js) ------------------------- */
.filedrop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 18px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.filedrop * {
  max-width: 100%;
  box-sizing: border-box;
}

.filedrop:hover {
  border-color: var(--text-soft);
}

.filedrop.is-dragover {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.filedrop.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.filedrop input[type="file"] {
  display: none;
}

.filedrop--compact {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 14px;
  gap: 8px;
}

.filedrop__icon {
  color: var(--text-muted);
  line-height: 0;
}

.filedrop__label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}

.filedrop__hint {
  font-size: .7rem;
  color: var(--text-soft);
}

.filedrop__status {
  margin: 4px 0 0;
  font-size: .72rem;
}

.filedrop__status.error {
  color: var(--danger);
}

.filedrop__status.ok {
  color: var(--success);
}

.filedrop__preview {
  margin-top: 10px;
  width: 100%;
}

.filedrop__preview img {
  max-height: 130px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
}

.filedrop__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .74rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.filedrop__preview .file-glyph,
.adm-gallery-thumb .file-glyph {
  display: block;
  margin: 0 auto;
}

/* --- Universal file viewer (js/preview.js) --------------------------------- */
/* A top-layer <dialog> so it sits above the product/CMS modals. */
.fviewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(7, 34, 32, .86);
  color: #fff;
  display: flex;
  flex-direction: column;
  animation: uk-modal-in .15s ease both;
}

.fviewer::backdrop {
  background: rgba(7, 34, 32, .4);
  backdrop-filter: blur(4px);
}

.fviewer__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  color: #fff;
}

.fviewer__name {
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fviewer__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.fviewer__tools button,
.fviewer__tools a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}

.fviewer__tools button:hover,
.fviewer__tools a:hover {
  background: rgba(255, 255, 255, .24);
  opacity: 1;
}

.fviewer__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px 16px 24px;
}

.fviewer__img {
  max-width: 92vw;
  max-height: 82vh;
  transform-origin: center center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.fviewer__img:active {
  cursor: grabbing;
}

.fviewer__media,
.fviewer__frame {
  width: min(92vw, 1100px);
  height: 82vh;
  border: 0;
  border-radius: var(--radius-md);
  background: #000;
}

.fviewer__frame {
  background: var(--surface);
}

.fviewer__audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.fviewer__text {
  width: min(92vw, 900px);
  max-height: 82vh;
  overflow: auto;
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.fviewer__nofile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-align: center;
}

.fviewer__nofile p {
  font-size: .86rem;
  opacity: .8;
}

/* --- Pre-upload image editor (js/imgedit.js) ----------------------------- */
/* Full-screen top-layer <dialog> so it always sits above the product modal. */
.imgedit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  animation: uk-modal-in .15s ease both;
}

.imgedit::backdrop {
  background: rgba(7, 34, 32, .5);
}

.imgedit__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.imgedit__head strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
}

.imgedit__head [data-close] {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-muted);
  cursor: pointer;
}

.imgedit__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background:
    repeating-conic-gradient(#e9eeed 0% 25%, #f7f9f8 0% 50%) 50% / 22px 22px;
  touch-action: none;
}

.imgedit__img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.imgedit__img:active {
  cursor: grabbing;
}

.imgedit__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(7, 34, 32, .58);
  border: 1px solid rgba(255, 255, 255, .95);
  pointer-events: none;
}

.imgedit__frame span {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
}

.imgedit__frame span:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.imgedit__frame span:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.imgedit__frame span:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.imgedit__frame span:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.imgedit__controls {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.imgedit__row .xselect {
  flex: 1;
  /* This row is a centered control strip, not a stacked form field. */
  margin-top: 0;
}

.imgedit__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.imgedit__row .label {
  width: 74px;
  flex: none;
}

.imgedit__row .seg {
  flex: 1;
}

.imgedit__row .seg__btn {
  flex: 1;
}

.imgedit__range {
  flex: 1;
  accent-color: var(--accent);
}

.imgedit__row .field {
  flex: 1;
  margin-top: 0;
}

.imgedit__note {
  font-size: .72rem;
  color: var(--text-soft);
}

.imgedit__foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
}

/* --- Moderation queue (vendors/campaigns/topups/payouts tabs) ----------- */
.adm-mod-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.adm-mod-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.adm-mod-row__meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  color: var(--text);
}

.adm-mod-row__meta span {
  font-size: .76rem;
  color: var(--text-muted);
}

.adm-mod-row__note {
  margin-top: 6px;
  max-width: 56ch;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.adm-mod-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: none;
}

/* --- CMS / content editor ------------------------------------------------ */
.adm-cms-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1180px) {
  .adm-cms-layout {
    grid-template-columns: 1fr;
  }
}

.adm-cms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  padding-right: 2px;
}

@media (max-width: 1180px) {
  .adm-cms-list {
    max-height: 420px;
  }
}

.adm-cms-doc {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.adm-cms-doc:hover {
  border-color: var(--accent);
}

.adm-cms-doc.is-active {
  border-color: var(--accent);
  background: var(--surface-sunken);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.adm-cms-doc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-cms-doc__head strong {
  font-size: .86rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.adm-cms-doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: .68rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* The document list moved into a modal (openCmsDocPicker), so the editor now
   owns the full panel width. */
.adm-cms-shell {
  position: relative;
}

.adm-cms-blank {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-cms-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adm-cms-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-cms-title-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 12px 14px;
}

.adm-cms-actions-trigger {
  flex: none;
  white-space: nowrap;
}

.adm-cms-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: .74rem;
  color: var(--text-soft);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.adm-cms-meta__slug {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.linklike {
  border: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--accent-hover);
  font-weight: 700;
  font-size: inherit;
  cursor: pointer;
}

.linklike:hover {
  text-decoration: underline;
}

.adm-cms-advanced {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.adm-cms-advanced summary {
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Actions popover: menu rows, not buttons. */
.uk-popover__sep {
  display: block;
  height: 1px;
  margin: 6px 2px;
  background: var(--border);
}

.uk-popover .is-danger {
  color: var(--danger);
}

.uk-popover .is-danger:hover {
  background: var(--danger-bg);
}

.uk-popover button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* --- CMS document picker (modal) ------------------------------------------- */
/* Only the list scrolls; the modal's own head/foot and this filter row stay
   put. */
#cms-doc-picker .uk-modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.cms-picker__filters {
  display: flex;
  gap: 8px;
  flex: none;
}

.cms-picker__filters .cms-picker__search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.cms-picker__filters .cms-picker__type {
  flex: none;
  width: 170px;
}

.cms-picker__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

/* --- CMS version history --------------------------------------------------- */
.adm-cms-tabpanel[data-cms-tabpanel="history"] {
  max-width: 720px;
}

.adm-version-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.adm-version-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.adm-version-row:first-child {
  border-top: 0;
}

.adm-version-row:nth-child(odd) {
  background: var(--surface-sunken);
}

.adm-version-row__meta strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}

.adm-version-row__meta span {
  font-size: .72rem;
  color: var(--text-muted);
}

/* --- CMS media library -------------------------------------------------- */
.adm-media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.adm-media-toolbar__count {
  font-size: .74rem;
  color: var(--text-soft);
}

.adm-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 190px));
  justify-content: start;
  gap: 14px;
  margin-top: 14px;
}

.adm-media-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.adm-media-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.adm-media-card__thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 120px;
  padding: 0;
  border: 0;
  background: var(--surface);
  cursor: zoom-in;
  overflow: hidden;
}

.adm-media-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adm-media-card__body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.adm-media-card__body strong {
  display: block;
  font-size: .7rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-media-card__body span {
  font-size: .64rem;
  color: var(--text-soft);
}

/* --- Rich text editor (js/rte.js) -------------------------------------- */
.cms-rte {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.cms-rte.is-disabled {
  opacity: .7;
}

.cms-rte__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.cms-rte.is-disabled .cms-rte__toolbar {
  display: none;
}

.cms-rte__btn {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.cms-rte__btn:hover {
  background: var(--accent-wash);
  color: var(--text);
}

.cms-rte__btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.cms-rte__btn--sm sub {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: .5rem;
  font-weight: 800;
}

.cms-rte__sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--border);
}

.cms-rte__area {
  padding: 16px 18px;
  max-height: 60vh;
  overflow-y: auto;
  /* min-height comes from an inline style set by buildRte(); the editor opens
     at that height and can be dragged taller. */
  resize: vertical;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text);
  outline: none;
}

.cms-rte__area:focus {
  box-shadow: inset 0 0 0 2px var(--accent-wash);
}

.cms-rte__area[contenteditable="true"]:empty::before {
  content: "Start writing…";
  color: var(--text-soft);
}

.cms-rte__area blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.cms-rte__area code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--surface-sunken);
  padding: 1px 5px;
  border-radius: 5px;
}

.adm-lock-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: #92400e;
  font-size: .8rem;
  font-weight: 600;
}

.adm-lock-banner[hidden] {
  display: none;
}

.adm-cms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.adm-cms-tab-btn {
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.adm-cms-tab-btn:hover {
  color: var(--text);
}

.adm-cms-tab-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.adm-cms-tabpanel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.adm-cms-tabpanel.is-active {
  display: flex;
}

.adm-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-field-group+.adm-field-group {
  margin-top: 12px;
}

/* --- Site settings / Audit log ------------------------------------------ */
.adm-settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .adm-settings-form {
    grid-template-columns: 1fr;
  }
}

.adm-rate-card-grid {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(90px, 1fr));
  gap: 10px 14px;
  align-items: center;
}

.adm-rate-card-grid .label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .adm-rate-card-grid {
    grid-template-columns: 1fr;
  }

  .adm-rate-card-grid .label:nth-child(-n+4) {
    display: none;
  }
}

.adm-audit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.adm-audit-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.adm-audit-row__meta strong {
  display: block;
  font-size: .82rem;
  color: var(--text);
}

.adm-audit-row__meta span {
  font-size: .72rem;
  color: var(--text-muted);
}

.adm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-filter-row select,
.adm-filter-row input {
  max-width: 220px;
}

/* --- Shared period / date-range filter (js/filters.js) ------------------- */
.period-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.period-filter__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.period-filter__group .label {
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.period-filter__group .field,
.period-filter__group .xselect {
  margin-top: 0;
  min-width: 150px;
  max-width: 200px;
}

.period-filter__custom .field {
  min-width: 140px;
}

/* Overview keeps the control compact in the panel header. */
.adm-panel-head .period-filter {
  flex: none;
}

.adm-overview-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.adm-overview-filters .field,
.adm-overview-filters .xselect {
  margin-top: 0;
  min-width: 150px;
  max-width: 200px;
}

/* ==========================================================================
   Affiliate programme page (affiliate.html)
   ========================================================================== */
.aff-wrap {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px) 20px 80px;
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

.aff-hero h1 {
  margin: 10px 0 0;
  max-width: 22ch;
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--heading);
}

.aff-hero__lede {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.aff-hero__cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Live programme figures */
.aff-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
}

.aff-facts > div {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.aff-facts dt {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-soft);
}

.aff-facts dd {
  margin: 7px 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.aff-block__title,
.aff-card__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.aff-block__title {
  margin-bottom: 16px;
}

.aff-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.aff-step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.aff-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 0.9rem;
}

.aff-step h3 {
  margin: 14px 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
}

.aff-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Shared card (application form + terms) */
.aff-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.aff-card__lede {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Application form */
.aff-form {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

@media (max-width: 560px) {
  .aff-form {
    grid-template-columns: 1fr;
  }
}

.aff-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.aff-field--full {
  grid-column: 1 / -1;
}

.aff-field > label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.aff-field .field {
  margin-top: 0;
}

.aff-field .help {
  margin-top: 2px;
}

.aff-req {
  color: var(--danger);
}

.aff-consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.aff-consent input {
  margin-top: 2px;
  flex: none;
}

.aff-form__actions {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.aff-form__actions .status-line {
  margin: 0;
}

/* Terms */
.aff-terms h3 {
  margin: 24px 0 6px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
}

.aff-terms p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.aff-terms__meta {
  margin-top: 6px !important;
  font-style: italic;
  font-size: 0.82rem !important;
}

.aff-terms a {
  color: var(--accent-strong);
  font-weight: 700;
}

/* Dashboard */
.aff-link-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 12px;
}

.aff-link-row .field {
  flex: 1 1 260px;
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.aff-qr {
  margin-top: 14px;
}

.aff-qr:empty {
  display: none;
}
/* ==========================================================================
   Recognition & Rewards — leaderboards, badges, follow button, rewards tab
   ========================================================================== */

.lb-hero { max-width: 64ch; margin-bottom: 26px; }
.lb-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin: 6px 0 8px;
}
.lb-hero__sub { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.lb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.lb-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.lb-period select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.lb-caption { color: var(--text-soft); font-size: 0.8rem; margin: 0 0 14px; }

.lb-rows { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: grid;
  grid-template-columns: 52px 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.lb-row__rank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  font-family: var(--font-display);
}
.lb-row__rank b { font-size: 1rem; font-weight: 800; color: var(--text-muted); }
.lb-row--rank1 { border-color: var(--accent); background: var(--accent-wash); }
.lb-row--rank1 .lb-row__rank, .lb-row--rank1 .lb-row__rank b { color: var(--accent-strong); }
.lb-row--rank2 { background: var(--surface-sunken); }
.lb-row--rank3 { background: var(--surface-sunken); }
.lb-row__avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  display: block;
}
.lb-row__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-weight: 800;
  font-family: var(--font-display);
}
.lb-row__name { min-width: 0; font-weight: 700; color: var(--text); }
.lb-row__name a { color: inherit; }
.lb-row__name a:hover { color: var(--accent-strong); }
.lb-row__you {
  margin-left: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--radius-full);
  padding: 2px 7px;
}
.lb-row__value {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.lb-skel { display: flex; flex-direction: column; gap: 8px; }
.lb-skel > div {
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  animation: lb-pulse 1.4s ease-in-out infinite;
}
@keyframes lb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (max-width: 560px) {
  .lb-row { grid-template-columns: 40px 34px 1fr; }
  .lb-row__value { grid-column: 2 / -1; font-size: 0.85rem; }
}

/* Earned-badge chips (storefront, vendor centre) */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-row:empty { display: none; }
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--text-muted);
}
.badge-chip--gold, .badge-chip--platinum, .badge-chip--diamond {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.badge-chip--silver { color: var(--text); }

/* Follow button count pill */
.button-count {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.button-primary .button-count { background: rgba(7, 34, 32, 0.14); color: inherit; }

/* Account "Rewards" tab */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.badge-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
  text-align: center;
}
.badge-tile.is-locked { opacity: 0.55; }
.badge-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  color: var(--accent-strong);
  margin-bottom: 8px;
}
.badge-tile.is-locked .badge-tile__icon { background: var(--surface-sunken); color: var(--text-soft); }
.badge-tile__title { display: block; font-weight: 800; font-size: 0.85rem; color: var(--text); }
.badge-tile__desc { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }
.badge-tile__bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  margin-top: 10px;
  overflow: hidden;
}
.badge-tile__bar > span { display: block; height: 100%; background: var(--accent); }

.rank-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.rank-pill b { font-family: var(--font-display); font-size: 1rem; color: var(--text); }

.reward-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px 16px;
}
.reward-card__body { min-width: 0; }
.reward-card__title { font-weight: 800; color: var(--text); font-size: 0.88rem; }
.reward-card__meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.plaque-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.plaque-form .field { flex: 1 1 200px; margin-top: 0; }
