/* ==========================================================================
   STREAD design system — soft light.
   Surfaces are separated by gentle shadows and pastel tints rather than hard
   borders; nothing is pure black; corners are generous.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/static/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/static/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand */
  --color-primary-50: #f0f5ff;
  --color-primary-100: #e1ebff;
  --color-primary-200: #c9dbff;
  --color-primary-500: #4a86f7;
  --color-primary-600: #3772ee;
  --color-primary-700: #2a5fd6;
  --color-primary-wash: rgb(74 134 247 / 0.12);

  /* Soft canvas */
  --color-page: #f8f8fb;
  --color-sunken: #f1f2f7;
  --color-surface: #ffffff;
  --color-surface-2: #fafbfd;
  --color-text: #27272f;
  --color-text-secondary: #5e5f6e;
  --color-text-muted: #8d8e9c;
  --color-border: rgb(38 38 70 / 0.07);
  --color-border-strong: rgb(38 38 70 / 0.13);

  /* Pastels */
  --soft-blue: #eef3ff;
  --soft-lilac: #f3effe;
  --soft-mint: #e9f7f0;
  --soft-peach: #fff2e8;
  --soft-rose: #fdeff3;
  --soft-sand: #f6f4ee;

  /* Status (soft) */
  --color-success: #23845a;
  --color-success-bg: #e5f6ed;
  --color-warning: #a36a0a;
  --color-warning-bg: #fdf3e0;
  --color-danger: #cc4b4b;
  --color-danger-bg: #fdecec;
  --color-info-bg: #eaf1ff;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgb(38 38 70 / 0.04);
  --shadow-card: 0 1px 2px rgb(38 38 70 / 0.03), 0 6px 22px rgb(38 38 70 / 0.045);
  --shadow-raised: 0 2px 6px rgb(38 38 70 / 0.04), 0 16px 40px rgb(38 38 70 / 0.08);
  --shadow-pop: 0 4px 12px rgb(38 38 70 / 0.05), 0 28px 64px rgb(38 38 70 / 0.12);
  --shadow-primary: 0 6px 18px rgb(55 114 238 / 0.26);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 256px;
  --header-h: 64px;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--color-primary-700); }
::selection { background: var(--color-primary-100); }

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; color: var(--color-text); }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; letter-spacing: -0.01em; font-weight: 620; }
p { margin: 0 0 12px; }
code { font-size: .9em; background: var(--color-sunken); padding: 1px 6px; border-radius: 6px; }

small, .small { font-size: 13px; }
.muted { color: var(--color-text-muted); }
.secondary-text { color: var(--color-text-secondary); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
h1.mono { font-size: clamp(18px, 2.4vw, 23px); letter-spacing: 0; font-weight: 600; margin-bottom: 6px; word-break: break-all; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--color-primary-600); }

.display {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin: 0 0 18px;
}
.display em {
  font-style: normal;
  background: linear-gradient(100deg, #3772ee 10%, #7b61ff 55%, #2fb58a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }

.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }

/* ---------------------------------------------------------------- App shell */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--color-surface);
  box-shadow: 1px 0 0 var(--color-border);
  padding: 16px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.sidebar:hover { scrollbar-color: rgb(38 38 70 / 0.18) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgb(38 38 70 / 0.18); }

.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(145deg, #6aa0ff, #3772ee);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-primary);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }

.nav-group { margin-bottom: 18px; }
.nav-group-title { font-size: 11.5px; letter-spacing: .02em; color: var(--color-text-muted); font-weight: 600; padding: 0 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  color: var(--color-text-secondary); font-size: 14px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--color-sunken); color: var(--color-text); }
.nav-link.active { background: var(--soft-blue); color: var(--color-primary-700); font-weight: 600; }
.nav-link .dot { width: 7px; height: 7px; border-radius: 50%; background: #45c08a; margin-left: auto; }
.nav-link .dot.off { background: #d6d7e0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  background: rgb(248 248 251 / 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--color-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-weight: 600; }
.topbar-inner { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 8px; }
.content { padding: 28px 32px 72px; max-width: 1280px; width: 100%; margin-inline: auto; }

.icon-btn {
  width: 40px; height: 40px; display: none; place-items: center;
  border: none; border-radius: 12px; background: var(--color-surface);
  box-shadow: var(--shadow-card); cursor: pointer; font-size: 16px;
}

/* ---------------------------------------------------------------- Cards */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px;
}
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 620; margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.metric {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card);
}
.metric-label { font-size: 13px; color: var(--color-text-muted); font-weight: 500; }
.metric-value { font-size: 26px; font-weight: 650; margin-top: 4px; letter-spacing: -0.02em; }
.metric-meta { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

/* ---------------------------------------------------------------- Tables */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
th { font-size: 12px; color: var(--color-text-muted); font-weight: 600; white-space: nowrap; background: var(--color-surface-2); }
th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--color-surface-2); }
td.actions { white-space: nowrap; text-align: right; }

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(180deg, #4f8bf8 0%, #3772ee 100%);
  color: #fff; font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-primary), inset 0 1px 0 rgb(255 255 255 / 0.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgb(55 114 238 / 0.32), inset 0 1px 0 rgb(255 255 255 / 0.18); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

.btn-secondary {
  background: var(--color-surface); color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-border-strong), var(--shadow-xs);
}
.btn-secondary:hover { color: var(--color-text); background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border-strong), var(--shadow-card); filter: none; }
.btn-danger { background: linear-gradient(180deg, #e46a6a, #cc4b4b); box-shadow: 0 6px 16px rgb(204 75 75 / 0.22); }
.btn-danger:hover { box-shadow: 0 10px 22px rgb(204 75 75 / 0.28); }
.btn-ghost { background: transparent; color: var(--color-primary-600); box-shadow: none; }
.btn-ghost:hover { background: var(--soft-blue); color: var(--color-primary-700); box-shadow: none; transform: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15.5px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- Forms */

.form-row { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--color-text); }

input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=tel], input[type=url], input[type=color], input[type=file], select, textarea {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 14.5px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: #a9aab6; }
input:hover, select:hover, textarea:hover { border-color: rgb(38 38 70 / 0.2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary-500); box-shadow: 0 0 0 4px var(--color-primary-wash); }
input[readonly] { background: var(--color-sunken); color: var(--color-text-secondary); }
textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.help { font-size: 12.5px; color: var(--color-text-muted); margin-top: 6px; line-height: 1.5; }
.error-text { font-size: 12.5px; color: var(--color-danger); margin-top: 6px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--color-primary-600); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

/* ---------------------------------------------------------------- Badges & alerts */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--color-sunken); color: var(--color-text-secondary);
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); color: var(--color-primary-700); }
.badge-neutral { background: var(--color-sunken); color: var(--color-text-secondary); }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--radius-md); border: none;
  background: var(--color-sunken); font-size: 13.5px; margin-bottom: 18px;
}
.alert-success { background: var(--color-success-bg); color: #1d6b49; }
.alert-warning { background: var(--color-warning-bg); color: #7d5208; }
.alert-danger { background: var(--color-danger-bg); color: #a23b3b; }
.alert-info { background: var(--color-info-bg); color: #2a4f9c; }

.empty { text-align: center; padding: 52px 16px; color: var(--color-text-muted); }
.empty h3 { color: var(--color-text); margin-bottom: 4px; }

/* ---------------------------------------------------------------- Charts */

.chart { width: 100%; height: 220px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: rgb(38 38 70 / 0.06); stroke-width: 1; }
.chart .area { fill: rgb(74 134 247 / 0.10); }
.chart .line { fill: none; stroke: var(--color-primary-500); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { fill: #8db4fb; }
.chart .bar:hover { fill: var(--color-primary-500); }
.chart .axis { font-size: 10px; fill: var(--color-text-muted); }
.chart-tooltip {
  position: absolute; pointer-events: none; background: #2f3040; color: #fff;
  padding: 7px 11px; border-radius: 10px; font-size: 12px; opacity: 0; transition: opacity .15s; z-index: 30;
  box-shadow: var(--shadow-raised);
}

/* ---------------------------------------------------------------- Chips */

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 9px 18px; border-radius: var(--radius-pill);
  background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border), var(--shadow-xs);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; color: var(--color-text-secondary);
  transition: all .15s ease;
}
.chip:hover { color: var(--color-text); box-shadow: 0 0 0 1px var(--color-border-strong), var(--shadow-card); }
.chip.active { background: var(--soft-blue); color: var(--color-primary-700); font-weight: 600; box-shadow: 0 0 0 1px var(--color-primary-200); }
.chip-todo { background: var(--soft-blue); color: var(--color-primary-700); font-weight: 600; box-shadow: 0 0 0 1px var(--color-primary-200); }
.chip-todo:hover { background: var(--color-primary-100); color: var(--color-primary-700); }
.chip-done { background: transparent; color: var(--color-text-muted); text-decoration: line-through; text-decoration-color: #cfd0da; box-shadow: 0 0 0 1px var(--color-border); }

/* ---------------------------------------------------------------- Storefront shell */

.store-header {
  background: rgb(248 248 251 / 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--color-border);
  position: sticky; top: 0; z-index: 30;
}
.store-header-inner { max-width: var(--container); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.store-logo { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; background: var(--soft-blue); color: var(--color-primary-600); box-shadow: var(--shadow-xs); }
.store-name { font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; }
.store-container { max-width: var(--container); margin: 0 auto; padding: 28px 20px 80px; }

body:has(> main.store-container) { display: flex; flex-direction: column; min-height: 100vh; }
body:has(> main.store-container) > main.store-container { flex: 1; width: 100%; }

/* Soft ambient color behind heroes */
.hero, .landing-hero { position: relative; isolation: isolate; }
.hero::before, .landing-hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 60% at 18% 30%, rgb(122 164 255 / 0.28), transparent 70%),
    radial-gradient(34% 55% at 82% 20%, rgb(178 150 255 / 0.22), transparent 70%),
    radial-gradient(30% 50% at 60% 85%, rgb(120 220 180 / 0.20), transparent 70%);
}

.hero {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 38px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.hero::before { inset: 0; opacity: .75; }
.hero h1 { font-size: clamp(28px, 3.8vw, 40px); letter-spacing: -0.025em; margin-bottom: 8px; }
.hero-banner { border-radius: var(--radius-lg); margin-bottom: 22px; width: 100%; object-fit: cover; max-height: 240px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: center; }
.hero-search { display: flex; gap: 10px; max-width: 540px; }
.hero-search input { height: 50px; border-radius: var(--radius-pill); padding-left: 20px; border-color: transparent; box-shadow: var(--shadow-card); }
.hero-search input:focus { border-color: var(--color-primary-500); }

.hero-panel {
  background: rgb(255 255 255 / 0.82); backdrop-filter: blur(8px);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-raised);
}
.hero-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; color: var(--color-text-secondary); }
.hero-stat b { font-size: 18px; font-weight: 650; color: var(--color-text); }

.trust-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.trust-item {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgb(255 255 255 / 0.85); border-radius: var(--radius-pill); padding: 7px 14px;
  font-size: 12.5px; font-weight: 500; color: var(--color-text-secondary); box-shadow: var(--shadow-xs);
}

.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgb(255 255 255 / 0.9); border-radius: var(--radius-pill); padding: 6px 16px 6px 8px;
  font-size: 13px; font-weight: 500; color: var(--color-text-secondary);
  box-shadow: var(--shadow-card); margin-bottom: 22px;
}
.pill-badge b { color: var(--color-text); font-weight: 600; }
.pill-badge .dot-live { width: 22px; height: 22px; border-radius: 50%; background: var(--color-success-bg); display: grid; place-items: center; }
.pill-badge .dot-live::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #45c08a; box-shadow: 0 0 0 3px rgb(69 192 138 / 0.25); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 40px 0 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 23px; letter-spacing: -0.02em; }
.section-head .eyebrow { margin-bottom: 4px; }

/* ---------------------------------------------------------------- Product cards (square media) */

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.product-card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 10px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-card); color: inherit;
  transition: transform .22s ease, box-shadow .22s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); color: inherit; }

.product-thumb {
  aspect-ratio: 1 / 1; position: relative; overflow: hidden;
  border-radius: 14px; display: grid; place-items: center;
  background: var(--soft-blue);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.t0 { background: linear-gradient(150deg, #eef3ff, #dde8ff) !important; }
.t1 { background: linear-gradient(150deg, #edf8f1, #d8f0e3) !important; }
.t2 { background: linear-gradient(150deg, #fff3ea, #fde3d1) !important; }
.t3 { background: linear-gradient(150deg, #f4efff, #e4dafe) !important; }
.t4 { background: linear-gradient(150deg, #eafaf8, #d3f1ec) !important; }
.t5 { background: linear-gradient(150deg, #fff0f3, #fbdce4) !important; }

.product-initial {
  width: 64px; height: 64px; border-radius: 20px;
  background: rgb(255 255 255 / 0.9); box-shadow: var(--shadow-raised);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 650; color: var(--color-text-secondary);
}
.product-stock {
  display: inline-flex; align-items: center; align-self: flex-start;
  max-width: 100%; padding: 4px 9px; margin-bottom: 3px;
  border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 650; line-height: 1.25;
  white-space: nowrap;
}
.product-stock.in { color: var(--color-success); background: var(--color-success-bg); }
.product-stock.out { color: var(--color-danger); background: var(--color-danger-bg); }

.product-body { padding: 12px 8px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product-cat { font-size: 12px; font-weight: 500; color: var(--color-text-muted); }
.product-name { font-weight: 600; font-size: 15px; color: var(--color-text); line-height: 1.35; }
.product-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; color: var(--color-text); }
.product-price .from { display: block; font-size: 11px; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0; line-height: 1.2; }
.product-cta {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  display: grid; place-items: center; font-size: 0;
  background: var(--soft-blue); color: var(--color-primary-600);
  transition: background .2s ease, color .2s ease;
}
.product-cta::after { content: '→'; font-size: 16px; font-weight: 600; }
.product-card:hover .product-cta { background: var(--color-primary-600); color: #fff; }

/* ---------------------------------------------------------------- Product detail */

.pd {
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  column-gap: 36px; row-gap: 20px; align-items: start;
}
.pd-summary {
  grid-column: 1 / -1; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 24px;
}
.pd-summary-copy { min-width: 0; }
.pd-media { position: sticky; top: calc(var(--header-h) + 20px); }
.pd-image {
  aspect-ratio: 1 / 1; border-radius: var(--radius-xl); overflow: hidden;
  display: grid; place-items: center; box-shadow: var(--shadow-card); background: var(--soft-blue);
}
.pd-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-image .product-initial { width: 104px; height: 104px; border-radius: 30px; font-size: 42px; }

.pd-summary h1 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.025em; margin: 10px 0 0; }
.pd-price-line { display: flex; align-items: baseline; gap: 10px; margin: 0; white-space: nowrap; }
.pd-price-line b { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; }

.soft-panel { background: var(--color-surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card); }
.soft-panel + .soft-panel { margin-top: 18px; }
.grid > .soft-panel + .soft-panel { margin-top: 0; }
.prose + .prose-title { margin-top: 26px; }

.variant-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.variant-option {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-radius: var(--radius-md); padding: 14px 16px; cursor: pointer;
  background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border);
  transition: box-shadow .15s ease, background .15s ease;
}
.variant-option:hover { box-shadow: 0 0 0 1px var(--color-primary-200); }
.variant-option.selected { background: var(--soft-blue); box-shadow: 0 0 0 2px var(--color-primary-500); }
.variant-option.sold-out { opacity: .5; cursor: not-allowed; }
.variant-option input { position: absolute; opacity: 0; pointer-events: none; }
.variant-name { font-weight: 600; font-size: 14px; display: block; }
.variant-price { font-weight: 650; font-size: 14.5px; white-space: nowrap; }

/* ---------------------------------------------------------------- Payment method selector */

.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.method-option {
  position: relative;
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: var(--radius-lg); padding: 18px;
  background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer; transition: box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.method-option:hover { box-shadow: 0 0 0 1px var(--color-primary-200); }
.method-option.selected { background: var(--soft-blue); box-shadow: 0 0 0 2px var(--color-primary-500); }
.method-option.disabled { opacity: .55; cursor: not-allowed; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 19px; background: var(--color-surface); box-shadow: var(--shadow-xs);
}
.method-option.tint-mint .method-icon { background: var(--soft-mint); }
.method-option.tint-peach .method-icon { background: var(--soft-peach); }
.method-body { flex: 1; min-width: 0; }
.method-title { font-weight: 620; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.method-desc { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-top: 3px; line-height: 1.55; }
.method-note { display: block; font-size: 11.5px; color: var(--color-text-muted); margin-top: 6px; font-style: italic; }
.method-radio {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; margin-top: 2px;
  border: 2px solid var(--color-border-strong);
  display: grid; place-items: center; transition: border-color .15s ease, background .15s ease;
}
.method-option.selected .method-radio { border-color: var(--color-primary-500); background: var(--color-primary-500); }
.method-option.selected .method-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.card-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 16px; background: var(--soft-blue);
}
.card-icon.tint-mint { background: var(--soft-mint); }
.card-icon.tint-peach { background: var(--soft-peach); }

.total-row { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 0; margin-top: 4px; border-top: 1px dashed var(--color-border-strong); }
.total-row b { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }

/* Description: soft, readable prose */
.prose { color: var(--color-text-secondary); font-size: 15px; line-height: 1.85; white-space: pre-wrap; margin: 0; }
.prose-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 620; margin: 0 0 12px; }
.prose-title span { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; font-size: 14px; background: var(--soft-blue); }
.terms-box { background: var(--soft-sand); border-radius: var(--radius-md); padding: 16px 18px; color: var(--color-text-secondary); font-size: 14px; line-height: 1.8; white-space: pre-wrap; }

.assure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.assure { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-md); background: var(--color-surface-2); }
.assure b { font-weight: 600; font-size: 14px; }
.assure-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; background: var(--color-surface); box-shadow: var(--shadow-xs); }

.buy-card { position: sticky; top: calc(var(--header-h) + 16px); }
.buy-bar { display: none; }

/* ---------------------------------------------------------------- Order, QR, credentials */

.qr-box { display: grid; place-items: center; gap: 12px; padding: 24px; border-radius: var(--radius-lg); background: var(--color-surface-2); }
.qr-box img { width: 236px; height: 236px; border-radius: 16px; background: #fff; padding: 10px; box-shadow: var(--shadow-card); }

.credential {
  background: #f4f6fb; color: #2a3450; border-radius: var(--radius-md);
  padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.75;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.order-banner {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 20px;
  background: var(--color-surface); box-shadow: var(--shadow-card);
}
.order-banner > div:not(.order-banner-amount) { flex: 1; min-width: 0; }
.order-banner-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; font-weight: 700; }
.order-banner-title { font-weight: 620; font-size: 16px; }
.order-banner-amount { margin-left: auto; font-size: 22px; font-weight: 650; white-space: nowrap; }
.order-banner.tone-success { background: linear-gradient(95deg, var(--color-success-bg), #fff 75%); }
.order-banner.tone-success .order-banner-icon { background: #45c08a; color: #fff; }
.order-banner.tone-warning { background: linear-gradient(95deg, var(--color-warning-bg), #fff 75%); }
.order-banner.tone-warning .order-banner-icon { background: #f7cd6b; color: #5a3d00; }
.order-banner.tone-info { background: linear-gradient(95deg, var(--color-info-bg), #fff 75%); }
.order-banner.tone-info .order-banner-icon { background: var(--color-primary-500); color: #fff; }
.order-banner.tone-neutral .order-banner-icon { background: var(--color-sunken); color: var(--color-text-secondary); }

/* ---------------------------------------------------------------- Steps */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--color-surface); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-card); }
.step-num { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--soft-blue); color: var(--color-primary-600); font-size: 14px; font-weight: 650; margin-bottom: 14px; }
.step:nth-child(2) .step-num { background: var(--soft-lilac); color: #6a4fd8; }
.step:nth-child(3) .step-num { background: var(--soft-mint); color: #23845a; }
.step:nth-child(4) .step-num { background: var(--soft-peach); color: #c46a1c; }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.6; }

/* ---------------------------------------------------------------- Landing */

.landing-hero { padding: 96px 20px 64px; text-align: center; overflow: hidden; }
.landing-hero::before { inset: 0 -20% auto; height: 780px; filter: blur(10px); }
.landing-hero p.lead { font-size: 18px; color: var(--color-text-secondary); max-width: 620px; margin: 0 auto 30px; line-height: 1.65; }
.landing-section { max-width: var(--container); width: 100%; margin: 0 auto; padding: 72px 20px; }
.landing-section.tight { padding-top: 16px; padding-bottom: 16px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.025em; font-weight: 650; margin: 6px 0 10px; }
.section-sub { color: var(--color-text-muted); max-width: 560px; margin: 0 auto; font-size: 16px; }

.mock {
  max-width: 980px; margin: 56px auto 0; padding: 10px;
  border-radius: 32px; background: rgb(255 255 255 / 0.6); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-pop); border: 1px solid rgb(255 255 255 / 0.9);
}
.mock-inner { border-radius: 24px; overflow: hidden; background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border); }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--color-surface-2); }
.mock-dot { width: 11px; height: 11px; border-radius: 50%; opacity: .85; }
.mock-url { flex: 1; margin-left: 8px; background: var(--color-sunken); border-radius: var(--radius-pill); padding: 5px 14px; font-size: 12px; color: var(--color-text-muted); text-align: center; }
.mock-body { padding: 22px; display: grid; gap: 14px; text-align: left; }
.mock-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mock-tile { border-radius: 16px; padding: 14px; background: var(--soft-blue); }
.mock-tile:nth-child(2) { background: var(--soft-lilac); }
.mock-tile:nth-child(3) { background: var(--soft-mint); }
.mock-tile:nth-child(4) { background: var(--soft-peach); }
.mock-tile .label { font-size: 11.5px; color: var(--color-text-secondary); font-weight: 500; }
.mock-tile .value { font-size: 18px; font-weight: 650; margin-top: 2px; }
.mock-chart { height: 104px; border-radius: 16px; background: linear-gradient(180deg, rgb(74 134 247 / 0.10), rgb(74 134 247 / 0)); position: relative; overflow: hidden; }
.mock-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock-list { display: grid; gap: 8px; }
.mock-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 11px 14px; border-radius: 12px; background: var(--color-surface-2); }

.logo-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.logo-strip span { background: var(--color-surface); border-radius: var(--radius-pill); padding: 9px 18px; font-size: 13.5px; font-weight: 500; color: var(--color-text-secondary); box-shadow: var(--shadow-card); }

/* Bento features */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.bento .feature { grid-column: span 2; }
.bento .span-2 { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.feature { border-radius: var(--radius-xl); padding: 28px; background: var(--color-surface); box-shadow: var(--shadow-card); transition: transform .22s ease, box-shadow .22s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-raised); }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 14px; color: var(--color-text-secondary); line-height: 1.65; }
.feature-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; background: rgb(255 255 255 / 0.85); box-shadow: var(--shadow-xs); }
.feature.tint-blue { background: linear-gradient(160deg, #f3f7ff, #e8efff); }
.feature.tint-lilac { background: linear-gradient(160deg, #f7f3ff, #ece4ff); }
.feature.tint-mint { background: linear-gradient(160deg, #f1fbf6, #e1f4ea); }
.feature.tint-peach { background: linear-gradient(160deg, #fff7f0, #ffeadb); }
.feature.tint-rose { background: linear-gradient(160deg, #fff5f7, #fde6ec); }
.feature.tint-sand { background: linear-gradient(160deg, #faf8f3, #f1ede2); }

.price-card { text-align: center; position: relative; border-radius: var(--radius-xl); padding: 32px 26px; }
.price-card.featured {
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
              linear-gradient(140deg, #7aa7ff, #b39bff, #7fdcb6) border-box;
  border: 2px solid transparent; box-shadow: var(--shadow-raised);
}
.price-card .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #4f8bf8, #8b6cf6); color: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; padding: 5px 16px; white-space: nowrap; box-shadow: var(--shadow-primary); }
.price-value { font-size: 40px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.price-list { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.price-list li { padding: 7px 0 7px 30px; position: relative; font-size: 14px; color: var(--color-text-secondary); }
.price-list li::before { content: "✓"; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-success-bg); color: var(--color-success); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.cta-band {
  position: relative; overflow: hidden; border-radius: 36px; padding: 60px 32px; text-align: center;
  background: linear-gradient(135deg, #e9f0ff 0%, #f1ebff 50%, #e6f7ef 100%);
  box-shadow: var(--shadow-card);
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.025em; }
.cta-band p { color: var(--color-text-secondary); max-width: 520px; margin: 0 auto 26px; font-size: 16px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--color-surface); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow-card); transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow-raised); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ''; }
.faq summary::after { content: "+"; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--soft-blue); color: var(--color-primary-600); display: grid; place-items: center; font-weight: 600; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.7; }

/* ---------------------------------------------------------------- Auth */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 18px; position: relative; isolation: isolate; }
.auth-wrap::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 40% at 30% 20%, rgb(122 164 255 / 0.22), transparent 70%), radial-gradient(35% 35% at 75% 30%, rgb(178 150 255 / 0.18), transparent 70%); }
.auth-card { width: 100%; max-width: 430px; }

.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-pitch {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 52px;
  background: radial-gradient(60% 50% at 20% 20%, rgb(122 164 255 / 0.25), transparent 70%),
              radial-gradient(50% 45% at 85% 75%, rgb(120 220 180 / 0.22), transparent 70%),
              radial-gradient(45% 40% at 70% 20%, rgb(178 150 255 / 0.18), transparent 70%),
              var(--color-sunken);
}
.auth-pitch-body { max-width: 460px; }
.auth-pitch-title { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 18px; font-weight: 650; }
.auth-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: rgb(255 255 255 / 0.8); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-card); margin-top: 22px; }
.auth-price-value { font-size: 24px; font-weight: 650; }
.auth-price-value span { font-size: 14px; font-weight: 500; color: var(--color-text-muted); }
.auth-form-side { display: grid; place-items: center; padding: 40px 24px; }

/* ---------------------------------------------------------------- Utilities */

.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.divider { height: 1px; background: var(--color-border); margin: 18px 0; }
.scroll-y { max-height: 440px; overflow-y: auto; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; }
.mobile-nav { display: none; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }

.fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
.fade-up-2 { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) .08s both; }
.fade-up-3 { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) .16s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- Public website & storefront refresh */

.store-header {
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(180%) blur(20px);
}
.store-header-inner { min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.header-brand { display: flex; align-items: center; gap: 11px; color: var(--color-text); text-decoration: none; min-width: 0; }
.header-brand:hover { color: var(--color-text); }
.header-brand-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.header-brand-tagline { font-size: 11.5px; font-weight: 550; color: var(--color-text-muted); letter-spacing: -0.005em; }
.public-logo {
  display: grid; place-items: center; color: #fff; font-weight: 750;
  background: linear-gradient(145deg, #689bff, #3772ee 58%, #6d55e9);
  box-shadow: 0 8px 22px rgb(55 114 238 / .24);
}
.public-nav, .store-nav { display: flex; align-items: center; gap: 6px; margin-left: 26px; }
.public-nav a, .store-nav a {
  color: var(--color-text-secondary); font-size: 13.5px; font-weight: 550;
  padding: 8px 11px; border-radius: 10px;
}
.public-nav a:hover, .store-nav a:hover { background: var(--color-sunken); color: var(--color-text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-lang, .header-login {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 0 12px; border-radius: var(--radius-pill); color: var(--color-text-secondary);
  font-size: 12.5px; font-weight: 600;
}
.header-lang { min-width: 38px; padding-inline: 9px; background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border-strong); }
.header-lang:hover, .header-login:hover { color: var(--color-text); background: var(--color-sunken); }

/* Landing hero */
.landing-hero {
  padding: 76px 20px 54px; text-align: left;
  background: linear-gradient(180deg, #fbfcff 0%, #f8f8fb 100%);
}
.landing-hero::before {
  inset: -90px -10% auto; height: 760px; filter: none;
  background:
    radial-gradient(42% 55% at 12% 26%, rgb(91 143 255 / .24), transparent 72%),
    radial-gradient(36% 50% at 86% 18%, rgb(159 119 255 / .20), transparent 72%),
    radial-gradient(32% 46% at 70% 82%, rgb(69 192 138 / .16), transparent 72%);
}
.landing-hero-shell {
  width: 100%; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .88fr) minmax(540px, 1.12fr);
  gap: 58px; align-items: center;
}
.landing-hero-copy { position: relative; z-index: 2; }
.landing-hero .pill-badge { margin-bottom: 24px; }
.landing-hero .display { font-size: clamp(43px, 4.7vw, 66px); max-width: 670px; }
.landing-hero p.lead { max-width: 600px; margin: 0 0 28px; font-size: 17px; }
.landing-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.landing-hero-actions .btn:first-child span { margin-left: 5px; font-size: 17px; }
.hero-proof {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--color-border-strong);
}
.hero-proof div { display: flex; flex-direction: column; gap: 2px; }
.hero-proof b { font-size: 18px; line-height: 1.2; letter-spacing: -.02em; }
.hero-proof span { color: var(--color-text-muted); font-size: 11.5px; }
.landing-visual { position: relative; padding: 24px 0 30px; }
.visual-kicker {
  position: absolute; z-index: 3; top: 5px; left: 28px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-pill); background: rgb(255 255 255 / .94);
  color: var(--color-text-secondary); font-size: 11.5px; font-weight: 600; box-shadow: var(--shadow-raised);
}
.visual-live { width: 7px; height: 7px; border-radius: 50%; background: #40ba83; box-shadow: 0 0 0 4px rgb(64 186 131 / .14); }
.landing-visual .mock { margin: 0; padding: 8px; transform: rotate(1deg); box-shadow: 0 24px 70px rgb(47 58 105 / .16); }
.landing-visual .mock-body { padding: 18px; }
.landing-visual .mock-tile { padding: 12px; }
.landing-visual .mock-tile .value { font-size: 15px; }
.landing-visual .mock-chart { height: 92px; }
.visual-order-card {
  position: absolute; right: -22px; bottom: 7px; z-index: 3;
  display: flex; align-items: center; gap: 10px; min-width: 176px;
  padding: 12px 14px; border-radius: 16px; background: rgb(255 255 255 / .96);
  box-shadow: var(--shadow-pop); transform: rotate(-2deg);
}
.visual-order-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--color-success-bg); color: var(--color-success); font-weight: 750; }
.visual-order-card > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.visual-order-card small { color: var(--color-text-muted); font-size: 10.5px; }
.visual-order-card b { font-size: 13px; }
.visual-caption { text-align: center; margin-top: 12px; }
.channel-section { padding-top: 22px; padding-bottom: 22px; }
.logo-strip { gap: 8px; }
.logo-strip span { border: 1px solid var(--color-border); box-shadow: var(--shadow-xs); }
.landing-panel {
  max-width: 1180px; width: calc(100% - 40px); margin-top: 42px; margin-bottom: 42px;
  padding: 58px 54px; border: 1px solid rgb(255 255 255 / .9); border-radius: 40px;
  background: rgb(255 255 255 / .72); box-shadow: 0 18px 60px rgb(38 38 70 / .055);
}
.pricing-section { background: linear-gradient(145deg, rgb(255 255 255 / .9), rgb(242 246 255 / .78)); }
.feature { border: 1px solid rgb(255 255 255 / .82); box-shadow: 0 8px 28px rgb(38 38 70 / .055); }
.step { border: 1px solid rgb(255 255 255 / .9); }

/* Store hero and catalogue */
.tenant-header .store-logo { width: 42px; height: 42px; }
.store-hero {
  padding: 46px; margin-bottom: 22px; border: 1px solid rgb(255 255 255 / .92);
  background:
    radial-gradient(55% 90% at 6% 30%, rgb(105 154 255 / .18), transparent 74%),
    radial-gradient(45% 80% at 94% 8%, rgb(168 130 255 / .15), transparent 74%),
    radial-gradient(36% 60% at 65% 100%, rgb(77 203 155 / .13), transparent 74%),
    #fff;
  box-shadow: 0 18px 55px rgb(38 38 70 / .075);
}
.store-hero::before { display: none; }
.store-hero .hero-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 42px; }
.store-hero-copy { min-width: 0; }
.store-hero h1 { font-size: clamp(34px, 4vw, 48px); margin-bottom: 7px; }
.store-hero .pill-badge { margin-bottom: 20px; }
.store-hero .hero-search { max-width: 600px; padding: 5px; gap: 6px; border-radius: var(--radius-pill); background: #fff; box-shadow: 0 10px 28px rgb(38 38 70 / .085); }
.store-hero .hero-search input { height: 46px; box-shadow: none; background: transparent; }
.store-hero .hero-search-button { min-width: 112px; box-shadow: none; }
.store-hero .trust-item { border: 1px solid rgb(38 38 70 / .045); box-shadow: none; }
.hero-panel { padding: 22px; border: 1px solid rgb(255 255 255 / .92); background: rgb(255 255 255 / .9); }
.hero-panel-head { align-items: flex-start; margin-bottom: 13px; }
.hero-panel-title { margin-top: 2px; font-size: 15px; font-weight: 650; }
.status-pulse { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: #36ae78; box-shadow: 0 0 0 3px rgb(54 174 120 / .13); }
.hero-panel .hero-stat { padding: 9px 10px; border-radius: 11px; }
.hero-panel .hero-stat:nth-child(odd) { background: var(--color-surface-2); }
.category-bar {
  display: flex; align-items: center; gap: 8px; padding: 7px;
  background: rgb(255 255 255 / .82); border: 1px solid var(--color-border);
  border-radius: 18px; box-shadow: var(--shadow-xs); overflow: hidden;
}
.category-label { padding: 0 11px; color: var(--color-text-muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.category-bar .chips { flex: 1; padding: 1px; }
.category-bar .chip { padding: 8px 16px; box-shadow: none; background: transparent; }
.category-bar .chip:hover { background: var(--color-sunken); box-shadow: none; }
.category-bar .chip.active { background: var(--soft-blue); box-shadow: inset 0 0 0 1px var(--color-primary-200); }
.section-description { margin: 5px 0 0; color: var(--color-text-muted); font-size: 13.5px; }
.product-grid { gap: 18px; }
.product-card { padding: 8px; border: 1px solid rgb(255 255 255 / .95); box-shadow: 0 8px 28px rgb(38 38 70 / .055); }
.product-thumb { aspect-ratio: 1 / 1; border-radius: 16px; }
.product-body { padding: 13px 8px 8px; gap: 3px; }
.product-name { font-size: 15.5px; }
.product-foot { padding-top: 13px; }
.product-cta {
  width: auto; height: 34px; flex: 0 0 auto; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 650;
}
.product-cta::after { content: '→'; font-size: 14px; }
.store-guide {
  margin-top: 64px; padding: 34px; border-radius: 32px;
  background: linear-gradient(135deg, rgb(233 240 255 / .8), rgb(244 239 255 / .72) 55%, rgb(232 248 240 / .78));
  border: 1px solid rgb(255 255 255 / .9);
}
.store-guide .section-head { margin-top: 0; }
.store-guide .step { box-shadow: 0 7px 24px rgb(38 38 70 / .045); }
.store-footer { border-top: 1px solid var(--color-border); background: #fff; }
.store-footer-inner { max-width: var(--container); margin: 0 auto; padding: 28px 20px 34px; }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mock-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .feature, .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: span 3; }
  .pd { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 26px; }
}

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: translateX(0); }
  .icon-btn { display: grid; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .backdrop { position: fixed; inset: 0; background: rgb(38 38 70 / .28); backdrop-filter: blur(2px); z-index: 50; }
  .content { padding: 20px 16px 104px; }
  .store-container { padding: 18px 16px 110px; }
  .hero { padding: 24px 20px; border-radius: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero-panel { padding: 14px 16px; }
  .hero-panel .divider, .hero-panel .flex-col { display: none; }
  .hero-panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stat { flex-direction: column; align-items: flex-start; gap: 0; padding: 0; font-size: 12px; }
  .landing-hero { padding: 60px 18px 44px; }
  .landing-section { padding: 48px 18px; }
  .public-nav, .store-nav { display: none; }
  .landing-hero-shell { grid-template-columns: 1fr; gap: 30px; max-width: 760px; }
  .landing-hero-copy { text-align: center; }
  .landing-hero .display, .landing-hero p.lead { margin-left: auto; margin-right: auto; }
  .landing-hero-actions { justify-content: center; }
  .hero-proof { max-width: 520px; margin-left: auto; margin-right: auto; }
  .landing-visual { max-width: 680px; width: 100%; margin: 0 auto; }
  .landing-visual .mock { transform: none; }
  .visual-order-card { right: 0; }
  .landing-panel { width: calc(100% - 36px); padding: 48px 34px; }
  .store-hero .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .store-hero { padding: 28px 24px; }
  .store-guide { margin-top: 52px; padding: 28px; }
  .bento { grid-template-columns: 1fr; }
  .bento .feature, .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: auto; }
  .pd { grid-template-columns: 1fr; gap: 18px; }
  .pd-summary { grid-column: auto; }
  .pd-media { position: static; width: 100%; max-width: 560px; margin-inline: auto; }
  .product-layout { grid-template-columns: 1fr; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-pitch { padding: 24px 20px; gap: 18px; }
  .auth-pitch .price-list, .auth-pitch > .small { display: none; }
  .auth-pitch-title { font-size: 24px; margin-bottom: 0; }
  .auth-form-side { padding: 24px 18px 40px; place-items: start center; }
  .buy-card { position: static; }

  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { border-radius: var(--radius-md); margin-bottom: 10px; padding: 10px 14px; background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border); }
  table.responsive td { border: none; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; }
  table.responsive td::before { content: attr(data-label); font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
  table.responsive td.actions { justify-content: flex-end; padding-top: 10px; }

  .mobile-nav {
    display: flex; position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 40;
    background: rgb(255 255 255 / 0.92); backdrop-filter: blur(16px); border-radius: 22px;
    box-shadow: var(--shadow-raised); padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 6px);
  }
  .mobile-nav a { flex: 1; text-align: center; font-size: 10.5px; color: var(--color-text-muted); padding: 6px 2px; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 500; border-radius: 16px; }
  .mobile-nav a span { font-size: 17px; line-height: 1; }
  .mobile-nav a.active { color: var(--color-primary-600); font-weight: 600; background: var(--soft-blue); }

  .buy-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45;
    background: rgb(255 255 255 / 0.94); backdrop-filter: blur(16px); border-radius: 22px;
    padding: 10px 10px 10px 18px; box-shadow: var(--shadow-pop);
  }
  .buy-bar b { font-size: 18px; font-weight: 650; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  h1 { font-size: 24px; }
  .store-header-inner { min-height: 62px; padding: 9px 13px; }
  .store-logo, .tenant-header .store-logo { width: 38px; height: 38px; border-radius: 12px; }
  .store-name { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .header-actions { gap: 6px; }
  .public-header .header-login { display: none; }
  .header-lang { min-width: 36px; min-height: 36px; }
  .public-header .btn { padding-inline: 13px; }
  .landing-hero { padding: 44px 14px 30px; }
  .landing-hero .pill-badge { margin-bottom: 18px; }
  .landing-hero .display { font-size: clamp(36px, 10.5vw, 46px); line-height: 1.05; }
  .landing-hero p.lead { font-size: 15px; line-height: 1.65; }
  .landing-hero-actions { display: grid; grid-template-columns: 1fr; }
  .landing-hero-actions .btn { width: 100%; }
  .hero-proof { gap: 8px; margin-top: 26px; padding-top: 20px; }
  .hero-proof b { font-size: 16px; }
  .hero-proof span { font-size: 10px; }
  .landing-visual { padding-bottom: 0; }
  .visual-kicker { left: 14px; top: 8px; }
  .visual-order-card { display: none; }
  .landing-visual .mock-body { padding: 12px; }
  .landing-visual .mock-row { gap: 7px; }
  .landing-visual .mock-tile { padding: 10px; }
  .landing-visual .mock-tile .label { font-size: 9.5px; }
  .landing-visual .mock-tile .value { font-size: 13px; }
  .landing-visual .mock-chart { height: 70px; }
  .landing-visual .mock-line { padding: 8px 9px; font-size: 10.5px; }
  .landing-panel { width: calc(100% - 24px); margin-top: 24px; margin-bottom: 24px; padding: 38px 18px; border-radius: 28px; }
  .channel-section { padding-top: 18px; padding-bottom: 18px; }
  .product-body { padding: 10px 4px 4px; }
  .product-stock { padding: 3px 7px; font-size: 9.5px; }
  .product-name { font-size: 14px; }
  .product-price { font-size: 15px; }
  .product-cta { width: 32px; height: 32px; flex-basis: 32px; padding: 0; justify-content: center; }
  .product-cta span { display: none; }
  .product-initial { width: 52px; height: 52px; border-radius: 16px; font-size: 21px; }
  .pd-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pd-summary h1 { margin-top: 8px; }
  .variant-list { grid-template-columns: 1fr; }
  .assure-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .metric-value { font-size: 22px; }
  .qr-box img { width: 204px; height: 204px; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .store-hero { padding: 24px 16px; }
  .store-hero h1 { font-size: 32px; }
  .store-hero .hero-search { padding: 0; gap: 9px; border-radius: 0; background: transparent; box-shadow: none; }
  .store-hero .hero-search input { background: #fff; box-shadow: var(--shadow-card); }
  .store-hero .trust-row { gap: 6px; }
  .store-hero .trust-item { padding: 6px 10px; font-size: 11px; }
  .category-bar { margin-left: -4px; margin-right: -4px; }
  .category-label { display: none; }
  .category-bar .chip { padding: 8px 14px; }
  .product-thumb { aspect-ratio: 1 / 1; }
  .section-description { font-size: 12.5px; }
  .store-guide { margin: 48px -4px 0; padding: 24px 16px; border-radius: 26px; }
  .store-guide .section-head { align-items: flex-start; }
  .store-footer-inner { padding: 24px 16px 30px; }
  .cta-band { padding: 40px 20px; border-radius: 28px; }
  .order-banner { flex-wrap: wrap; }
  .order-banner-amount { margin-left: 58px; font-size: 19px; flex-basis: 100%; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .btn, .store-header, .buy-bar { display: none !important; }
  .content, .store-container { padding: 0; }
  body { background: #fff; }
}

/* Keyboard focus for the visually hidden variant radios */
.variant-option:has(input:focus-visible) { outline: 3px solid var(--color-primary-200); outline-offset: 2px; }

/* ---------------------------------------------------------------- Dashboard building blocks (member & admin) */

.brand-mark-admin { background: linear-gradient(145deg, #a78bfa, #6d5ae6); box-shadow: 0 6px 18px rgb(109 90 230 / 0.28); }
.nav-button { width: 100%; background: none; border: none; text-align: left; cursor: pointer; font: inherit; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 4px 0 6px; }

.metric-top { display: flex; align-items: center; gap: 10px; }
.metric-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 15px; flex: 0 0 34px; }
.metric-top + .metric-value { margin-top: 12px; }
.mi-blue { background: var(--soft-blue); }
.mi-lilac { background: var(--soft-lilac); }
.mi-mint { background: var(--soft-mint); }
.mi-peach { background: var(--soft-peach); }

.grid-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }

.empty-soft {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  min-height: 190px; padding: 24px; border-radius: var(--radius-md); background: var(--color-surface-2);
}
.empty-soft b { font-weight: 600; margin-top: 6px; }
.empty-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: var(--color-surface); box-shadow: var(--shadow-card); }

.health-list { display: grid; gap: 8px; }
.health-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-surface-2); font-size: 14px; color: var(--color-text-secondary); }
.health-row b { margin-left: auto; color: var(--color-text); font-weight: 650; }
.health-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.health-dot.ok { background: #45c08a; box-shadow: 0 0 0 4px rgb(69 192 138 / 0.18); }
.health-dot.idle { background: #c9cad6; box-shadow: 0 0 0 4px rgb(38 38 70 / 0.06); }
.health-dot.warn { background: #f2b544; box-shadow: 0 0 0 4px rgb(242 181 68 / 0.2); }
.health-dot.bad { background: #e46a6a; box-shadow: 0 0 0 4px rgb(228 106 106 / 0.2); }

.rank-list { display: grid; gap: 6px; }
.rank-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md);
  color: inherit; transition: background .15s ease;
}
a.rank-row:hover { background: var(--color-surface-2); color: inherit; }
.rank-num { width: 22px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); }
.rank-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 650; color: var(--color-primary-600); background: var(--soft-blue); }
.rank-row:nth-child(2) .rank-avatar { background: var(--soft-lilac); color: #6a4fd8; }
.rank-row:nth-child(3) .rank-avatar { background: var(--soft-mint); color: #23845a; }
.rank-row:nth-child(4) .rank-avatar { background: var(--soft-peach); color: #c46a1c; }
.rank-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rank-main b, .rank-stat b { font-weight: 600; font-size: 14px; }
.rank-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-stat { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }

@media (max-width: 1100px) {
  .grid-3-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rank-num { display: none; }
  .rank-row { flex-wrap: wrap; }
  .page-head .flex { width: 100%; }
  .page-head .btn { flex: 1; }
}

/* ---------------------------------------------------------------- Soft upload */

.upload {
  display: flex; align-items: center; gap: 14px; margin: 0;
  padding: 12px 14px; border-radius: var(--radius-md); cursor: pointer;
  background: var(--color-surface-2);
  border: 1.5px dashed rgb(38 38 70 / 0.16);
  font-weight: 400; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  position: relative;
}
.upload:hover { border-color: var(--color-primary-500); background: var(--soft-blue); }
.upload.is-drag { border-color: var(--color-primary-500); background: var(--soft-blue); box-shadow: 0 0 0 4px var(--color-primary-wash); }
.upload.has-file { border-style: solid; border-color: var(--color-border-strong); background: var(--color-surface); }
.upload.is-error { border-color: var(--color-danger); background: var(--color-danger-bg); }
.upload:has(.upload-input:focus-visible) { box-shadow: 0 0 0 4px var(--color-primary-wash); border-color: var(--color-primary-500); }

.upload-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.upload-preview {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--color-surface); box-shadow: var(--shadow-xs);
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-icon { font-size: 22px; }

.upload-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.upload-title { font-size: 14px; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-sub { font-size: 12px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload.is-error .upload-title { color: var(--color-danger); }

.upload-btn {
  flex: 0 0 auto; padding: 7px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600;
  background: var(--color-surface); color: var(--color-primary-600); box-shadow: 0 0 0 1px var(--color-primary-200);
  transition: background .15s ease, color .15s ease;
}
.upload:hover .upload-btn { background: var(--color-primary-600); color: #fff; box-shadow: none; }

@media (max-width: 560px) {
  .upload-sub { white-space: normal; }
  .upload-btn { display: none; }
}

/* Upload adapts to the width of its field, not the viewport. */
.form-row:has(.upload) { container-type: inline-size; }
@container (max-width: 380px) {
  .upload { gap: 10px; }
  .upload-btn { display: none; }
  .upload-sub { white-space: normal; }
}

/* Colour picker as a soft swatch */
input[type=color] { width: 64px; height: 46px; padding: 5px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 9px; }
input[type=color]::-moz-color-swatch { border: none; border-radius: 9px; }

/* Add-product live preview & tips */
.preview-wrap { display: grid; place-items: center; padding: 8px 0 4px; }
.preview-card { width: 100%; max-width: 250px; pointer-events: none; }
.preview-card .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tip-list { display: grid; gap: 10px; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-surface-2); }
.tip b { font-weight: 600; font-size: 14px; }
.tip-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; display: grid; place-items: center; background: var(--color-surface); box-shadow: var(--shadow-xs); }

/* ---------------------------------------------------------------- Product editor + notepad */

.back-link { display: inline-block; font-size: 13.5px; font-weight: 500; color: var(--color-text-muted); margin-bottom: 14px; }
.back-link:hover { color: var(--color-primary-600); }
.danger-text { color: var(--color-danger) !important; }
.danger-text:hover { background: var(--color-danger-bg) !important; }
.success-text { color: var(--color-success) !important; }

.pe-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pe-thumb { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow-card); background: var(--soft-blue); }
.pe-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pe-thumb span { font-size: 24px; font-weight: 650; color: var(--color-text-secondary); }
.pe-title { flex: 1; min-width: 220px; }
.pe-title h1 { margin: 0 0 8px; font-size: 26px; }
.pe-actions { gap: 6px; }

/* Two numbered steps: product info, then variations — same visual weight so
   neither reads as more important than the other. */
.pe-section { margin-top: 34px; }
.pe-section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pe-section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.pe-section-desc { font-size: 13px; color: var(--color-text-muted); }
.pe-step {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--color-primary-600); color: #fff;
}

.variant-card { scroll-margin-top: calc(var(--header-h) + 16px); transition: box-shadow .3s ease; }
.variant-card.just-saved { box-shadow: 0 0 0 2px #9fdcbf, var(--shadow-raised); }
.variant-card.is-inactive { opacity: .8; }
.variant-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.variant-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 14px; flex: 1; min-width: 260px; max-width: 560px; }
.variant-meta { display: flex; align-items: center; gap: 8px; padding-top: 28px; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--color-sunken); color: var(--color-text-secondary); padding: 5px 10px; border-radius: 8px; cursor: help; }

.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--color-text-muted); background: var(--color-sunken); border: 1px solid var(--color-border-strong); border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-prefix input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.variant-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.stock-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.stock-pill { font-size: 12.5px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--color-sunken); color: var(--color-text-secondary); }
.stock-pill b { font-weight: 650; color: var(--color-text); }
.stock-pill.ok { background: var(--color-success-bg); color: var(--color-success); }
.stock-pill.ok b { color: var(--color-success); }
.stock-pill.warn { background: var(--color-warning-bg); color: var(--color-warning); }
.stock-pill.warn b { color: var(--color-warning); }

.variant-extra { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.sold-list summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); }
.sold-list ul { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.sold-list li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 10px; border-radius: 8px; background: var(--color-surface-2); }

.add-variant { padding: 0; }
.add-variant > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-weight: 600; color: var(--color-primary-600); }
.add-variant > summary::-webkit-details-marker { display: none; }
.add-variant > form { padding: 0 22px 22px; }
.add-plus { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--soft-blue); font-size: 18px; }

/* Notepad */
.notepad { border-radius: var(--radius-md); overflow: hidden; background: #fdfdfb; box-shadow: 0 0 0 1px var(--color-border-strong); transition: box-shadow .15s ease; }
.notepad:focus-within { box-shadow: 0 0 0 1px var(--color-primary-500), 0 0 0 5px var(--color-primary-wash); }
.notepad.has-error { box-shadow: 0 0 0 1px var(--color-danger), 0 0 0 5px rgb(204 75 75 / 0.1); }
.notepad-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--color-sunken); font-size: 12.5px; color: var(--color-text-secondary); }
.notepad-dots { display: flex; gap: 5px; }
.notepad-dots i { width: 9px; height: 9px; border-radius: 50%; background: #dfe0e8; }
.notepad-file { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.notepad-count { margin-left: auto; font-weight: 600; white-space: nowrap; color: var(--color-primary-600); }
.notepad-body { display: flex; align-items: stretch; max-height: 460px; overflow: hidden; }
.notepad-gutter {
  flex: 0 0 auto; min-width: 44px; padding: 12px 8px 12px 10px; text-align: right; user-select: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 22px;
  color: #b3b4c0; background: #f7f7f4; border-right: 1px solid var(--color-border); overflow: hidden; white-space: pre;
}
.notepad-gutter .bad { color: #fff; background: var(--color-danger); border-radius: 4px; padding: 0 4px; }
.notepad textarea {
  flex: 1; min-height: 180px; max-height: 460px; resize: vertical; border: none; border-radius: 0; box-shadow: none !important;
  padding: 12px 14px; background: transparent; white-space: pre; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 22px; color: #2a3450;
}
.notepad textarea:focus { border: none; }
.notepad-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; font-size: 12px; color: var(--color-text-muted); background: var(--color-surface-2); border-top: 1px solid var(--color-border); }
.notepad-foot code { font-size: 11.5px; }
.notepad-foot .is-bad { color: var(--color-danger); font-weight: 600; }
.notepad-keys { white-space: nowrap; }
.notepad-errors { padding: 12px 14px; background: var(--color-danger-bg); color: #a23b3b; font-size: 13px; border-top: 1px solid #f5cfcd; }
.notepad-errors ul { margin: 6px 0 0; padding-left: 18px; }

@media (max-width: 700px) {
  .variant-fields { grid-template-columns: 1fr; max-width: none; }
  .variant-meta { padding-top: 0; }
  .notepad-keys { display: none; }
  .variant-foot .btn { width: 100%; }
  .variant-extra { flex-direction: column; }
}

/* ---------------------------------------------------------------- Admin: member management */

.member-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px; margin-bottom: 18px; }
.status-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.status-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 500; color: var(--color-text-secondary); transition: background .15s ease, color .15s ease; }
.status-tab span { font-size: 11.5px; font-weight: 650; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--color-sunken); color: var(--color-text-muted); }
.status-tab:hover { background: var(--color-sunken); color: var(--color-text); }
.status-tab.active { background: var(--soft-blue); color: var(--color-primary-700); font-weight: 600; }
.status-tab.active span { background: var(--color-primary-600); color: #fff; }

.member-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 260px; max-width: 460px; position: relative; }
.member-search input { padding-left: 38px; border-radius: var(--radius-pill); height: 40px; }
.member-search-icon { position: absolute; left: 13px; font-size: 14px; opacity: .6; pointer-events: none; }

.member-list-head, .member-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, 1.2fr) auto; gap: 16px; align-items: center; }
.member-list-head { padding: 0 20px 8px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.member-list-head .right, .member-sales { text-align: right; }
.member-list { display: grid; gap: 10px; }
.member-row { background: var(--color-surface); border-radius: var(--radius-lg); padding: 14px 20px; box-shadow: var(--shadow-card); transition: box-shadow .18s ease, transform .18s ease; }
.member-row:hover { box-shadow: var(--shadow-raised); }

.member-id { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.member-id:hover { color: inherit; }
.member-id:hover b { color: var(--color-primary-600); }
.member-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 650; font-size: 17px; }
.av-0 { background: var(--soft-blue); color: var(--color-primary-600); }
.av-1 { background: var(--soft-lilac); color: #6a4fd8; }
.av-2 { background: var(--soft-mint); color: #23845a; }
.av-3 { background: var(--soft-peach); color: #c46a1c; }
.av-4 { background: var(--soft-rose); color: #c2456b; }
.member-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.member-names > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-names b { font-weight: 620; font-size: 15px; transition: color .15s ease; }
.member-names .mono { font-size: 11.5px; }

.period-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.period-top b { font-size: 13.5px; font-weight: 620; }
.period-bar { height: 6px; border-radius: 6px; background: var(--color-sunken); overflow: hidden; margin-top: 7px; }
.period-bar i { display: block; height: 100%; border-radius: 6px; }
.tone-ok { color: var(--color-success); } .tone-bg-ok { background: #6fd1a3; }
.tone-warn { color: var(--color-warning); } .tone-bg-warn { background: #f2c063; }
.tone-bad { color: var(--color-danger); } .tone-bg-bad { background: #ec8e8e; }
.tone-idle { color: var(--color-text-muted); } .tone-bg-idle { background: #d6d7e0; }

.member-sales { display: flex; flex-direction: column; align-items: flex-end; }
.member-sales b { font-weight: 650; font-size: 15px; }

@media (max-width: 1000px) {
  .member-list-head { display: none; }
  .member-row { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .member-id { grid-column: 1 / -1; }
  .member-cell::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 3px; }
  .member-actions::before, .member-sales::before { content: none; }
  .member-period { grid-column: 1 / -1; }
  .member-sales { align-items: flex-start; text-align: left; }
  .member-actions { justify-self: end; }
  .member-search { max-width: none; }
}

@media (max-width: 1000px) {
  .status-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .status-tabs::-webkit-scrollbar { display: none; }
  .status-tab { white-space: nowrap; }
  .member-id { grid-column: 1; grid-row: 1; }
  .member-cell[data-label="Status"] { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; }
  .member-cell[data-label="Status"]::before { content: none; }
}

/* Gateway (QRIS Manual) applications reuse the member-row skeleton, at its own
   column widths — a compact row instead of one big card per application.
   Compound selectors (two classes) keep these overrides ahead of the plainer
   .member-list-head / .member-row rules regardless of source order. */
.gwapp-list-head.member-list-head, .gwapp-row.member-row { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1.1fr) auto; }
/* A long rejection/revoke note can make this row taller than its neighbours —
   top-align the grid cells instead of the base list's vertical centering, so
   short cells don't float oddly in the middle of a stretched row. Each cell's
   own contents (avatar+name, action buttons) still center themselves via
   their own nested flex rules below. */
.gwapp-row.member-row { align-items: start; }
.gwapp-row .member-id, .gwapp-row .gwapp-actions { padding-top: 2px; }
.gwapp-thumb { overflow: hidden; }
.gwapp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gwapp-review-note { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; line-height: 1.4; }
.gwapp-actions { justify-content: flex-end; }
.gwapp-actions input[name="note"] { max-width: 130px; padding: 8px 10px; font-size: 12.5px; }

@media (max-width: 1000px) {
  /* A single column, not the member list's "name | badge" pair: the Status
     cell here can carry a multi-line rejection/revoke note, and pairing it
     next to another cell in an `auto`-sized track let a long note's unwrapped
     max-content width blow the track up and crush the tenant name down to a
     couple of characters. Full-width stacking sidesteps that entirely. */
  .gwapp-row.member-row { grid-template-columns: 1fr; }
  .gwapp-row .member-cell[data-label="Status"] { grid-column: auto; grid-row: auto; align-self: auto; justify-self: auto; }
  .gwapp-actions { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- Billing */

.pending-invoice { padding: 16px 18px; border-radius: var(--radius-md); background: linear-gradient(95deg, var(--color-warning-bg), #fff 80%); box-shadow: inset 0 0 0 1px #f3e3bb; }
.pending-amount { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; margin: 2px 0; }
.pending-timer { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.pending-timer b { font-size: 20px; font-weight: 650; color: var(--color-warning); font-variant-numeric: tabular-nums; }
.detail-list { display: grid; gap: 2px; }
.detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.detail-list > div:nth-child(odd) { background: var(--color-surface-2); }
.detail-list span { color: var(--color-text-muted); }
.detail-list b { font-weight: 600; text-align: right; }
@media (max-width: 560px) { .pending-timer { align-items: flex-start; margin-top: 10px; } }

/* ---------------------------------------------------------------- Dashboard & buyer workspace refresh */

.app { background: #f6f7fb; }
.app .sidebar {
  width: 248px; flex-basis: 248px; display: flex; flex-direction: column;
  padding: 14px 10px 18px; background: rgb(255 255 255 / .96);
  box-shadow: inset -1px 0 0 var(--color-border);
}
.app .brand { padding: 7px 10px 17px; margin-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.app .brand-mark { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 7px 20px rgb(55 114 238 / .2); }
.brand-copy { min-width: 0; line-height: 1.3; }
.brand-copy .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.app .nav-group { margin-bottom: 15px; }
.app .nav-group-title { padding: 0 11px 5px; color: #a0a1ad; font-size: 10.5px; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.app .nav-link { min-height: 38px; gap: 9px; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; }
.app .nav-link > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .nav-link.active { background: #edf3ff; box-shadow: inset 3px 0 0 var(--color-primary-500); }
.nav-icon {
  width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center;
  border-radius: 8px; background: var(--color-sunken); color: var(--color-text-secondary);
  font-size: 13px; font-weight: 700; line-height: 1;
}
.nav-icon-letter { font-size: 10.5px; }
.nav-icon-wide { font-size: 8.5px; }
.nav-link.active .nav-icon { color: var(--color-primary-700); background: #fff; box-shadow: var(--shadow-xs); }
.app .nav-link .dot { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--color-border); }
.nav-button { display: flex; width: 100%; background: none; border: none; text-align: left; cursor: pointer; font: inherit; }

.app .topbar {
  height: 72px; padding: 0 26px; background: rgb(255 255 255 / .82);
  backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 1px 0 var(--color-border);
}
.app .topbar-inner { max-width: 1320px; padding-inline: 2px; }
.topbar-copy { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-copy > span { color: var(--color-text-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; }
.topbar-copy .title { margin-top: 2px; font-size: 14px; font-weight: 650; }
.topbar-store, .topbar-language {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); color: var(--color-text-secondary); font-size: 12.5px; font-weight: 600;
}
.topbar-store { gap: 6px; padding: 0 13px; background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border-strong); }
.topbar-store:hover { background: var(--color-surface-2); color: var(--color-text); }
.topbar-language { width: 36px; background: var(--color-sunken); }
.topbar-language:hover { color: var(--color-primary-700); background: var(--soft-blue); }
.admin-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 5px; border-radius: var(--radius-pill); background: var(--soft-lilac); color: #6046c6; font-size: 12.5px; font-weight: 650; }
.admin-user-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); }
.app .content { max-width: 1320px; padding: 34px 34px 80px; }
.app .content > h1 { margin-bottom: 24px; font-size: 28px; }
.dashboard-page .page-head { margin-bottom: 26px; }
.dashboard-page .page-head h1 { font-size: 30px; }
.dashboard-welcome { align-items: center; }
.workspace-link { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 2px 4px 2px 7px; border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border); }
.workspace-link-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--soft-blue); color: var(--color-primary-600); font-size: 11px; }
.workspace-link a { max-width: 390px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-secondary); font-size: 12.5px; }
.workspace-link .btn { min-height: 29px; padding-inline: 10px; font-size: 11.5px; }

.app .card, .app .metric {
  border-color: rgb(38 38 70 / .065); box-shadow: 0 7px 24px rgb(38 38 70 / .045);
}
.app .card { padding: 22px; }
.app .metric { position: relative; overflow: hidden; min-height: 140px; padding: 19px 20px; }
.app .metric::after, .buyer-metric::after {
  content: ''; position: absolute; inset: auto -26px -34px auto; width: 100px; height: 100px;
  border-radius: 50%; background: var(--soft-blue); opacity: .52; pointer-events: none;
}
.app .metric-accent-lilac::after, .buyer-metric.metric-accent-lilac::after { background: var(--soft-lilac); }
.app .metric-accent-mint::after, .buyer-metric.metric-accent-mint::after { background: var(--soft-mint); }
.app .metric-accent-peach::after { background: var(--soft-peach); }
.app .metric-top, .buyer-metric .metric-top { position: relative; z-index: 1; }
.app .metric-icon, .buyer-metric .metric-icon { font-size: 12px; font-weight: 750; }
.app .metric-value, .buyer-metric .metric-value { position: relative; z-index: 1; font-size: 25px; }
.app .metric-meta, .buyer-metric .metric-meta { position: relative; z-index: 1; }
.card-subtitle { margin: 4px 0 0; color: var(--color-text-muted); font-size: 12.5px; line-height: 1.5; }
.setup-card { background: linear-gradient(110deg, #fff, #f7f9ff); }
.setup-progress { height: 5px; margin-bottom: 17px; border-radius: 8px; overflow: hidden; background: var(--color-sunken); }
.setup-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-primary-500), #8369ed, #45bd89); }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-actions .chip { box-shadow: 0 0 0 1px var(--color-border); }
.dashboard-card .chart { height: 235px; }
.dashboard-table-card .table-wrap { border: 1px solid var(--color-border); border-radius: 14px; }
.app table th { background: #f8f9fc; color: #9495a3; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; }
.app table td { padding-top: 13px; padding-bottom: 13px; }
.app tbody tr:hover { background: #fafbfe; }
.health-row { border: 1px solid transparent; }
.rank-row { border-radius: 12px; }

/* Buyer workspace */
.buyer-account-page { width: 100%; }
.buyer-account-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 22px; padding: 28px 30px; border-radius: 26px;
  background: linear-gradient(120deg, rgb(235 242 255 / .95), rgb(247 243 255 / .86) 58%, rgb(236 249 242 / .92));
  border: 1px solid rgb(255 255 255 / .92);
}
.buyer-account-head h1 { margin: 4px 0 5px; font-size: 30px; }
.buyer-account-head p { margin: 0; color: var(--color-text-secondary); font-size: 13.5px; }
.buyer-account-head p b { color: var(--color-text); }
.buyer-metric { position: relative; overflow: hidden; min-height: 136px; }
.buyer-actions-grid { align-items: stretch; }
.buyer-actions-grid > .card { margin-top: 0; }
.buyer-deposit-card { background: linear-gradient(145deg, #fff, #f5f8ff); }
.buyer-profile-card { background: linear-gradient(145deg, #fff, #faf8ff); }
.account-card-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 12px; background: var(--soft-blue); color: var(--color-primary-600); font-weight: 700; }
.account-card-icon.profile { background: var(--soft-lilac); color: #684ed0; }
.buyer-contact-summary { display: grid; gap: 5px; padding: 11px 13px; border-radius: 12px; background: var(--color-surface-2); }
.buyer-contact-summary > div { display: flex; justify-content: space-between; gap: 16px; min-width: 0; font-size: 11.5px; }
.buyer-contact-summary span { color: var(--color-text-muted); }
.buyer-contact-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; color: var(--color-text-secondary); }
.buyer-history-card .table-wrap { border: 1px solid var(--color-border); border-radius: 14px; }
.buyer-history-card table th { background: #f8f9fc; color: #9495a3; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; }

@media (max-width: 900px) {
  .app .sidebar { position: fixed; width: 272px; flex-basis: 272px; padding-bottom: 24px; }
  .app .topbar { height: 64px; padding: 0 16px; }
  .app .content { padding: 24px 18px 104px; }
  .topbar-store { display: none; }
  .dashboard-page .page-head h1 { font-size: 27px; }
}

@media (max-width: 700px) {
  .app .content > .card.mb-2 > form.flex.wrap { align-items: stretch; }
  .app .content > .card.mb-2 > form.flex.wrap input,
  .app .content > .card.mb-2 > form.flex.wrap select { max-width: none !important; flex: 1 1 100%; }
  .app .content > .card.mb-2 > form.flex.wrap .btn { flex: 1; }
}

@media (max-width: 560px) {
  .app .topbar { padding: 0 12px; }
  .topbar-copy > span { display: none; }
  .topbar-copy .title { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-language { display: none; }
  .admin-user > span:last-child { display: none; }
  .admin-user { padding-right: 5px; }
  .app .content { padding: 21px 12px 100px; }
  .app .content > h1 { font-size: 24px; margin-bottom: 19px; }
  .dashboard-page .page-head { align-items: stretch; margin-bottom: 20px; }
  .dashboard-page .page-head h1 { font-size: 26px; }
  .dashboard-page .page-head > .btn { width: 100%; }
  .workspace-link { width: 100%; }
  .workspace-link a { flex: 1; max-width: 190px; }
  .app .metric { min-height: 128px; padding: 16px; }
  .app .metric-value { font-size: 21px; }
  .app .card { padding: 17px; }
  .setup-actions { display: grid; grid-template-columns: 1fr; }
  .setup-actions .chip { width: 100%; }
  .dashboard-card .chart { height: 190px; }
  .buyer-account-head { align-items: flex-start; margin: 0 -4px 18px; padding: 23px 20px; border-radius: 22px; }
  .buyer-account-head h1 { font-size: 26px; }
  .buyer-account-head form { width: 100%; }
  .buyer-account-head form .btn { width: 100%; }
  .buyer-metric { min-height: 124px; padding: 16px; }
  .buyer-metric .metric-value { font-size: 22px; }
  .buyer-actions-grid .card, .buyer-history-card { padding: 17px; }
  .buyer-contact-summary > div { flex-direction: column; gap: 1px; }
}

/* ---------------------------------------------------------------- Landing page: clean visual pass */

.landing-hero {
  padding-top: 72px; padding-bottom: 52px;
  background: #fbfcfe; border-bottom: 1px solid var(--color-border);
}
.landing-hero::before {
  inset: -100px 0 auto; height: 620px;
  background: radial-gradient(46% 64% at 76% 32%, rgb(74 134 247 / .13), transparent 74%);
}
.landing-hero-shell { gap: 52px; }
.landing-hero .display { font-size: clamp(42px, 4.6vw, 64px); }
.display em {
  background: none; -webkit-background-clip: initial; background-clip: initial;
  color: var(--color-primary-600);
}
.landing-hero .pill-badge {
  padding: 6px 13px 6px 7px; border: 1px solid var(--color-border);
  background: #fff; box-shadow: none;
}
.landing-hero p.lead { color: var(--color-text-secondary); }
.hero-proof { gap: 12px; margin-top: 32px; padding-top: 21px; }
.hero-proof b { font-size: 17px; }
.landing-visual { padding: 0; }
.landing-visual .mock {
  padding: 7px; transform: none; border: 1px solid var(--color-border);
  background: #fff; box-shadow: 0 18px 48px rgb(38 38 70 / .1);
}
.landing-visual .mock-inner { box-shadow: none; }
.landing-visual .mock-tile { background: #f4f7fd; }
.landing-visual .mock-tile:nth-child(2),
.landing-visual .mock-tile:nth-child(3),
.landing-visual .mock-tile:nth-child(4) { background: #f7f8fb; }
.landing-visual .mock-chart { background: linear-gradient(180deg, rgb(74 134 247 / .07), transparent); }
.visual-caption { margin-top: 10px; }

.landing-section { padding-top: 64px; padding-bottom: 64px; }
.channel-section { padding-top: 23px; padding-bottom: 23px; }
.logo-strip { gap: 0; }
.logo-strip span {
  position: relative; padding: 6px 15px; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; font-size: 12.5px;
}
.logo-strip span + span::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 15px;
  background: var(--color-border-strong); transform: translateY(-50%);
}
.landing-panel {
  width: 100%; max-width: var(--container); margin-top: 0; margin-bottom: 0;
  padding: 64px 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.bento { gap: 13px; }
.landing-panel .feature {
  padding: 25px; border: 1px solid var(--color-border); border-radius: 20px;
  background: #fff; box-shadow: none;
}
.landing-panel .feature:hover { transform: translateY(-2px); border-color: var(--color-border-strong); box-shadow: var(--shadow-card); }
.landing-panel .feature-icon {
  width: 42px; height: 42px; margin-bottom: 15px; border-radius: 12px;
  background: #f4f6fa; box-shadow: none; font-size: 18px;
}
.landing-section .step { padding: 20px; border: 1px solid var(--color-border); border-radius: 16px; box-shadow: none; }
.pricing-section { background: transparent; }
.price-card { border: 1px solid var(--color-border); box-shadow: none; }
.price-card.featured {
  background: #fff; border: 1px solid var(--color-primary-500);
  box-shadow: 0 10px 32px rgb(55 114 238 / .1);
}
.price-card .ribbon { background: var(--color-primary-600); box-shadow: none; }
.pricing-section > .card { box-shadow: none; }
.faq details { border: 1px solid var(--color-border); box-shadow: none; }
.faq details[open] { border-color: var(--color-border-strong); box-shadow: none; }
.cta-band {
  padding: 54px 30px; border: 1px solid #dce7fb;
  background: #eef4ff; box-shadow: none;
}

@media (max-width: 900px) {
  .landing-hero { padding-top: 54px; }
  .landing-hero-shell { gap: 36px; }
  .landing-panel { width: 100%; padding: 52px 18px; }
}

@media (max-width: 560px) {
  .landing-hero { padding: 42px 14px 30px; }
  .landing-hero .display { font-size: clamp(35px, 10vw, 44px); }
  .hero-proof { margin-top: 25px; }
  .landing-section, .landing-panel { padding-top: 44px; padding-bottom: 44px; }
  .channel-section { padding-top: 16px; padding-bottom: 16px; }
  .logo-strip { gap: 6px 0; }
  .logo-strip span { width: 50%; padding: 5px 8px; text-align: center; font-size: 10.5px; }
  .logo-strip span:nth-child(odd)::before { display: none; }
  .landing-panel .feature { padding: 21px; }
  .cta-band { padding: 38px 19px; border-radius: 24px; }
  .cta-band > .flex {
    display: grid; grid-template-columns: 1fr; gap: 9px;
    width: 100%; max-width: 280px; margin-inline: auto;
  }
  .cta-band > .flex .btn { width: 100%; min-width: 0; padding-inline: 14px; }
  .faq summary { min-width: 0; padding-right: 6px; }
  .faq summary::after { width: 26px; height: 26px; flex-basis: 26px; }
  .faq summary, .feature h3, .feature p, .step h3, .step p { overflow-wrap: anywhere; }
  .landing-visual .mock, .landing-visual .mock-inner, .landing-visual .mock-body { min-width: 0; }
  .landing-visual .mock-line > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .price-card { min-width: 0; padding-inline: 18px; }
}

@media (max-width: 350px) {
  .public-header .header-brand-copy { display: none; }
  .public-header .store-header-inner { gap: 7px; }
  .public-header .header-actions { margin-left: auto; }
  .landing-hero .display { font-size: 33px; }
  .landing-hero p.lead { font-size: 14px; }
  .hero-proof { gap: 5px; }
  .hero-proof b { font-size: 15px; }
  .hero-proof span { font-size: 9px; }
  .logo-strip span { width: 100%; }
  .logo-strip span::before { display: none; }
}

/* ---------------------------------------------------------------- Mobile safety pass: member, admin & buyer */

@media (max-width: 560px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .app, .app .main, .app .content, .dashboard-page,
  .buyer-account-page, .buyer-account-page .card { min-width: 0; max-width: 100%; }
  .app .content .grid, .app .content .flex-between,
  .buyer-account-page .grid, .buyer-account-page .flex-between { min-width: 0; }
  .app .content .grid > *, .buyer-account-page .grid > * {
    min-width: 0; max-width: 100%; width: 100%;
  }
  .app .content .card, .app .content .metric { min-width: 0; max-width: 100%; }
  .app .content .copy-field, .buyer-account-page .copy-field { min-width: 0; max-width: 100%; }
  .app .content .copy-field input, .buyer-account-page .copy-field input {
    min-width: 0; width: 1%; flex: 1 1 auto;
  }
  .app .content h1, .app .content h2, .app .content h3,
  .buyer-account-page h1, .buyer-account-page h2, .buyer-account-page h3 {
    max-width: 100%; overflow-wrap: anywhere;
  }
  .app .alert { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .app .alert .btn { margin-left: 0 !important; }
}

@media (max-width: 350px) {
  .app .content > .flex-between:first-child { align-items: flex-start; }
  .app .content > .flex-between:first-child > * { min-width: 0; max-width: 100%; }
  .app .content > .flex-between:first-child > div { width: 100%; }
  .app .content > .flex-between:first-child .flex { flex-wrap: wrap; max-width: 100%; }
  .app .content > .flex-between:first-child .small { overflow-wrap: anywhere; }
  .app .content .btn { max-width: 100%; }
  .mobile-nav { left: 6px; right: 6px; bottom: 6px; }
}

@media (max-width: 560px) {
  .sold-list, .sold-list ul, .sold-list li { min-width: 0; max-width: 100%; }
  .sold-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .sold-list li .mono {
    max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  }
  .sold-list li .small { white-space: normal; }

  table.responsive td.actions { display: block; width: 100%; white-space: normal; }
  table.responsive td.actions > details { width: 100%; min-width: 0; }
  table.responsive td.actions > details > summary { width: 100%; }
  table.responsive td.actions > details > form {
    width: 100%; min-width: 0 !important; max-width: 100%;
  }

  .member-toolbar { padding: 10px; }
  .status-tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px; width: 100%; overflow: visible; padding-bottom: 0;
  }
  .status-tab { width: 100%; min-width: 0; justify-content: space-between; padding: 8px 10px; }
  .member-search { width: 100%; min-width: 0; max-width: 100%; }
  .member-search input { min-width: 0; }
}

/* ---------------------------------------------------------------- Store period (dashboard) */
/* One slim line — the dashboard is for selling, this is just a status ticker. */
.period-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-border);
  font-size: 13px;
}
.period-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); }
.period-strip-label { color: var(--color-text-muted); }
.period-strip-badge { font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--color-success-bg); color: var(--color-success); }
.period-strip-note { color: var(--color-text-secondary); flex: 1 1 auto; min-width: 0; }
.period-strip-cta { flex: none; padding: 4px 12px; font-size: 12.5px; height: auto; }

.period-strip.is-trial .period-dot { background: var(--color-primary-500); }
.period-strip.is-trial .period-strip-badge { background: var(--soft-blue); color: var(--color-primary-600); }

.period-strip.is-grace { background: var(--color-warning-bg); box-shadow: none; }
.period-strip.is-grace .period-dot { background: var(--color-warning); }
.period-strip.is-grace .period-strip-badge { background: rgb(255 255 255 / 0.6); color: var(--color-warning); }

.period-strip.is-ended { background: var(--color-danger-bg); box-shadow: none; }
.period-strip.is-ended .period-dot { background: var(--color-danger); }
.period-strip.is-ended .period-strip-badge { background: rgb(255 255 255 / 0.6); color: var(--color-danger); }

@media (max-width: 560px) {
  .period-strip { border-radius: var(--radius-md); }
}

/* ---------------------------------------------------------------- Buyer channels */
.channel-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.channel-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--color-sunken); color: var(--color-text-secondary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.channel-tab:hover { background: var(--color-primary-100); color: var(--color-primary-700); }
.channel-tab.active { background: var(--color-primary-600); color: #fff; }
.channel-tab-count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.25); }
.channel-tab:not(.active) .channel-tab-count { background: var(--color-surface); color: var(--color-text-secondary); }
.channel-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.ch-telegram { background: var(--soft-blue); color: var(--color-primary-700); }
.ch-whatsapp { background: var(--soft-mint); color: var(--color-success); }
.ch-web { background: var(--soft-sand); color: var(--color-text-secondary); }

/* ---------------------------------------------------------------- Stock: variant picker inside a product */
.variant-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--color-sunken); color: var(--color-text-secondary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.variant-tab:hover { background: var(--color-primary-100); color: var(--color-primary-700); }
.variant-tab.active { background: var(--color-primary-600); color: #fff; }
.variant-tab-count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-secondary); }
.variant-tab.active .variant-tab-count { background: rgb(255 255 255 / 0.25); color: #fff; }

/* ---------------------------------------------------------------- Stock page + Telegram banner */
.banner-preview { margin-bottom: 10px; border-radius: var(--radius-md); overflow: hidden; background: var(--color-sunken); }
.banner-preview img { display: block; width: 100%; max-height: 220px; object-fit: cover; }

.stock-picker form { align-items: center; }
.stock-picker-label { margin: 0; font-weight: 600; }
.stock-picker select { flex: 1; min-width: 0; }

@media (max-width: 860px) {
  .period-side { flex-basis: 100%; padding-left: 0; padding-top: 14px; border-left: none; border-top: 1px solid var(--color-border); }
  .period-value { font-size: 24px; }
}

/* ---------------------------------------------------------------- Telegram banners */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.banner-slot { padding: 16px; border-radius: var(--radius-md); background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border); }
.banner-slot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.banner-slot p { margin: 0 0 10px; }
.banner-slot .form-row { margin-bottom: 10px; }
/* ---------------------------------------------------------------- Connection log (Telegram & WhatsApp settings) */
.conn-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.conn-log-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--color-border); }
.conn-log-item:last-child { border-bottom: none; }
.conn-log-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--color-text-muted); }
.conn-log-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.conn-log-text { font-size: 13px; color: var(--color-text); }
.conn-log-time { font-size: 11.5px; color: var(--color-text-muted); }
.conn-ok .conn-log-dot { background: var(--color-success); }
.conn-warn .conn-log-dot { background: var(--color-warning); }
.conn-bad .conn-log-dot { background: var(--color-danger); }
.conn-info .conn-log-dot { background: var(--color-primary-500); }
.conn-muted .conn-log-dot { background: var(--color-text-muted); }

/* ---------------------------------------------------------------- Confirm dialog */
/* Replaces window.confirm everywhere `data-confirm` is used, so a destructive
   action asks in the app's own voice instead of the browser chrome. */
[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(38 38 70 / 0.34); backdrop-filter: blur(3px); animation: modal-fade .16s ease; }

.modal-panel {
  position: relative; width: min(420px, 100%); padding: 28px 26px 22px; text-align: center;
  background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-pop);
  animation: modal-rise .18s cubic-bezier(.2, .8, .3, 1);
}
.modal-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--soft-blue); color: var(--color-primary-600);
  font-size: 24px; font-weight: 700; line-height: 1;
}
.modal-panel.is-danger .modal-icon { background: var(--color-danger-bg); color: var(--color-danger); }
.modal-title { font-size: 19px; margin: 0 0 6px; }
.modal-body { margin: 0 0 22px; color: var(--color-text-secondary); font-size: 14.5px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(10px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-panel { animation: none; }
}

@media (max-width: 480px) {
  .modal-actions { flex-direction: column-reverse; }
}

/* ---------------------------------------------------------------- Numbered how-to steps */
.guide-steps { counter-reset: guide; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.guide-steps > li { counter-increment: guide; position: relative; padding-left: 40px; }
.guide-steps > li::before {
  content: counter(guide); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--soft-blue); color: var(--color-primary-600);
  font-size: 13px; font-weight: 700;
}
.guide-steps p { margin: 4px 0 0; color: var(--color-text-secondary); }
.guide-steps ul { margin: 8px 0 0; padding-left: 18px; color: var(--color-text-secondary); }
.guide-steps ul li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- Checkbox row with explanation */
.switch-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 12px; border-radius: var(--radius-md); background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border); }
.switch-row:hover { background: var(--soft-blue); }
.switch-row input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-primary-600); }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }

/* ---------------------------------------------------------------- Custom emoji Telegram */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.emoji-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border); }
.emoji-glyph { flex: none; font-size: 22px; line-height: 1; width: 30px; text-align: center; }
.emoji-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.emoji-label { font-size: 12px; color: var(--color-text-secondary); }
.emoji-info input { width: 100%; }

/* ---------------------------------------------------------------- Affiliate payout target */
.payout-target { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-surface-2); box-shadow: 0 0 0 1px var(--color-border); }
.payout-target > span:last-child { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
