@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* digbuy — flat, whitespace-forward design system
   Implemented from "digbuy Spec.dc.html" (Claude Design handoff). */
:root {
  color-scheme: light;
  --accent: #2f4bff;
  --accent-press: #2138d6;
  --ink: #111111;
  --ink-soft: #444444;
  --muted: #666666;
  --muted-2: #777777;
  --faint: #999999;
  --line: #e6e6e6;
  --line-strong: #d9d9d9;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --cover: #232a36;
  --radius: 6px;
  --page-width: 1180px;
  --pad: 32px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the old decorative gradient layer — neutralised */
.site-bg { display: none; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.72; }
button, input, select, textarea { font: inherit; }

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 700; }

::-webkit-scrollbar { height: 6px; width: 6px; }
::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 6px; }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
  font-weight: 500;
}

.text-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- buttons ---------- */
.button,
button.button,
.search button,
form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.button:hover,
button.button:hover,
form button[type="submit"]:hover { opacity: 1; background: var(--accent-press); }
.button:active,
button.button:active,
form button[type="submit"]:active { transform: translateY(1px); }
.button:focus-visible,
button.button:focus-visible,
form button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 75, 255, 0.28);
}
.button:disabled,
button.button:disabled { opacity: 0.55; cursor: default; transform: none; }

.button--secondary,
.button.button--secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.button--secondary:hover { background: #fff; color: var(--ink); opacity: 0.7; }

.button--ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.button--free,
.button.button--free {
  background: #0a7d3b;
  color: #fff;
  border: 1px solid #0a7d3b;
}
.button--free:hover { background: #096a32; }
.detail__free-hint { font-size: 13px; color: var(--muted-2); margin: 8px 0 0; }

.star-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  color: var(--line-strong);
}
.star-toggle:hover { color: #e0a400; }
.star-toggle--on { color: #f5b301; }

.product-strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.product-strip .market-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
@media (max-width: 640px) {
  .product-strip .market-card { flex-basis: 72%; }
}

.button--small { padding: 9px 15px; font-size: 14px; font-weight: 500; }

.button--dark,
.button.button--dark { background: var(--ink); color: #fff; }
.button--dark:hover,
.button.button--dark:hover { background: #000; }

.button--google,
.button.button--google {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(47, 75, 255, 0.35);
}
.button--google:hover,
.button.button--google:hover {
  opacity: 1;
  background: rgba(47, 75, 255, 0.04);
  border-color: rgba(47, 75, 255, 0.55);
}

.button--block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 15px var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { opacity: 1; }
.brand-mark { display: none; }
.brand-copy strong {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-copy span { display: none; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav__link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.site-nav__link:hover { opacity: 0.6; }
.site-nav__logout {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.site-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: var(--ink);
}
.site-nav__icon svg { width: 20px; height: 20px; }
.site-nav__icon:hover { opacity: 1; background: var(--line); }
.site-nav__cart { position: relative; }
.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.cart-menu { position: relative; }
.cart-menu > summary { list-style: none; cursor: pointer; }
.cart-menu > summary::-webkit-details-marker { display: none; }
.cart-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 320px;
  max-width: calc(100vw - 2 * var(--pad));
  padding: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.cart-menu__items { list-style: none; margin: 0 0 10px; padding: 0; max-height: 320px; overflow-y: auto; }
.cart-menu__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.cart-menu__item:last-child { border-bottom: none; }
.cart-menu__name { font-size: 14px; font-weight: 500; color: var(--ink); }
.cart-menu__price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cart-menu__remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.cart-menu__remove:hover { color: var(--ink); }
.cart-menu__checkout { display: block; text-align: center; }
.cart-menu__empty { margin: 0; padding: 6px 2px; font-size: 14px; color: var(--muted); }

.nav-search { display: flex; align-items: center; gap: 4px; position: relative; }
.nav-search__suggest {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  max-width: 78vw;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 50;
}
.nav-search__suggest[hidden] { display: none; }
.nav-search__suggestion a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
}
.nav-search__suggestion:hover a,
.nav-search__suggestion.is-active a { background: var(--surface-2); }
.nav-search__s-name { font-size: 14px; font-weight: 600; }
.nav-search__s-pub { font-size: 12px; color: var(--muted-2); }
.nav-search .nav-search__input {
  width: 240px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: width 0.22s ease, opacity 0.18s ease, padding 0.22s ease, border-color 0.22s ease;
}
.js .nav-search .nav-search__input {
  width: 0;
  padding: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}
.js .nav-search.is-open .nav-search__input {
  width: 240px;
  padding: 0 12px;
  border-color: var(--line);
  opacity: 1;
  pointer-events: auto;
}
.nav-search .nav-search__btn {
  flex: none;
  background: none;
  border: none;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
}
.nav-search .nav-search__btn:hover { background: var(--line); opacity: 1; }

.site-header__status {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 9px var(--pad);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- page shell ---------- */
.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--pad) 64px;
}

/* ---------- hero / landing ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0 8px;
}
.hero__content h1 {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 680px;
  text-wrap: balance;
}
.hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 18px 0 0;
}
.hero__cta { margin-top: 28px; }
.hero .search { margin-top: 28px; }
.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.info-chip {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: #fff;
}

/* search panel */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
}
.hero__panel h2 { font-size: 20px; margin-bottom: 8px; }
.hero__panel p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }

/* profile fields */
.profile-fields { margin: 0; }
.profile-fields > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.profile-fields > div:first-child { padding-top: 0; }
.profile-fields > div:last-child { border-bottom: none; padding-bottom: 0; }
.profile-fields dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-fields dd { margin: 0; color: var(--ink); font-size: 15px; }
.profile-panel .action-row {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  align-items: center;
}
@media (max-width: 520px) {
  .profile-fields > div { grid-template-columns: 1fr; gap: 4px; }
}

.search { display: flex; gap: 10px; }
.search input,
input:not([type]),
input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search input:hover,
input:not([type]):hover,
input[type="search"]:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover { border-color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 75, 255, 0.14);
}
input::placeholder, textarea::placeholder { color: var(--faint); }

/* custom select chevron — drop the dated native arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

/* file inputs — a clean bordered field with a styled Browse button */
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="file"]:hover { border-color: var(--muted-2); }
input[type="file"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 75, 255, 0.14); }
input[type="file"]::file-selector-button {
  margin: 0 14px 0 0;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
input[type="file"]::file-selector-button:hover { background: #f0f0f0; }

.search--stacked { flex-direction: column; }
.search--stacked button { width: 100%; }

.feature-list { margin-top: 18px; display: flex; flex-direction: column; }
.feature-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}
.feature-list__item:hover { opacity: 1; color: var(--accent); }
.feature-list__item strong { font-weight: 600; }

/* category chips */
.chip-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}
.chip {
  font-size: 13px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip:hover { opacity: 1; border-color: var(--ink); }
.chip--active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip--free { color: #0a7d3b; border-color: #9fdcb8; font-weight: 600; }
.chip--free:hover { border-color: #0a7d3b; }

/* section head */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 22px;
}
.section-head .eyebrow { margin: 0; }
.section-head h2 { font-size: 20px; margin-top: 4px; }
.section-head--tight { margin-top: 44px; }

.market-card__media--pub {
  display: flex;
  align-items: center;
  justify-content: center;
}
.market-card__media--placeholder {
  background: linear-gradient(135deg, var(--surface-2), var(--line));
}
.market-card__initial {
  font-size: 56px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
}

.branding {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.branding__preview {
  flex: none;
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.branding__preview img { width: 100%; height: 100%; object-fit: cover; }
.branding__placeholder { font-size: 13px; color: var(--muted-2); }
.branding__form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.branding__file { font-size: 14px; }

/* ---------- stat tiles ---------- */
.stat-caption {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.stat-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-tile .eyebrow { margin: 0; }
.stat-tile__value {
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-tile__unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.stat-tile--accent { border-color: var(--accent); }
.stat-tile--accent .stat-tile__value { color: var(--accent); }

/* ---------- stat chart ---------- */
.stat-chart {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
  margin: 0;
}
.stat-chart figcaption { margin: 0 0 14px; color: var(--muted); }
.stat-chart__svg { width: 100%; height: auto; display: block; }
.stat-chart__bar { fill: var(--accent); transition: fill 0.12s ease; }
.stat-chart__bar:hover { fill: var(--accent-press); }
.stat-chart__axis { stroke: var(--line-strong); stroke-width: 1; }
.stat-chart__label {
  fill: var(--faint);
  font-size: 11px;
  text-anchor: middle;
}

/* ---------- journal entry meta ---------- */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0 0 28px;
}
.entry-meta div { display: flex; flex-direction: column; gap: 4px; }
.entry-meta dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.entry-meta dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- product grid + cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.market-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.market-card:hover { border-color: var(--line-strong); }
.market-card__media {
  aspect-ratio: 4 / 3;
  background: var(--cover);
  position: relative;
}
.market-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-card__media .pill,
.pill {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 3px 7px;
  border-radius: 4px;
  background: transparent;
}
.market-card__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.market-card__body h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.market-card__body h2 a { color: var(--ink); }
.market-card:hover .market-card__body h2 { color: var(--accent); }
.market-card__body p { font-size: 13px; color: var(--muted-2); margin: 0; }
.market-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
}
.market-card__meta .eyebrow { margin: 0; }
.price-tag { font-size: 14px; font-weight: 600; color: var(--ink); }
.market-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.market-card__actions form { flex: 1; display: flex; }
.market-card__actions .button {
  width: 100%;
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

/* ---------- product detail ---------- */
.detail {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 56px;
  align-items: start;
  padding-top: 32px;
}
.detail__cover {
  aspect-ratio: 3 / 4;
  background: var(--cover);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail__cover .pill { top: 12px; left: 12px; font-size: 11px; padding: 4px 8px; }
.detail__title { font-size: 38px; line-height: 1.1; letter-spacing: -0.035em; margin: 12px 0 18px; max-width: 520px; }
.detail__price { font-size: 28px; font-weight: 700; margin-bottom: 22px; }
.detail__lead { font-size: 17px; line-height: 1.6; color: var(--ink-soft); max-width: 520px; margin: 0 0 28px; }
.detail__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.spec-pill {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
}
.detail__actions { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.detail__body p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); max-width: 520px; margin: 0 0 14px; }
.detail__pub { font-size: 15px; font-weight: 500; display: inline-block; margin-bottom: 12px; }
.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 28px; }
.breadcrumb a { color: var(--faint); }
.rule { height: 1px; background: var(--line); border: 0; margin: 32px 0; }

/* ---------- dashboard / workspace ---------- */
.dash-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
}
.dash-header__brand { font-size: 21px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.dash-header__nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.dash-header__nav a { font-size: 14px; color: var(--ink); }
.dash-header__nav a:hover { color: var(--accent); }

.workspace-shell { display: flex; min-height: calc(100vh - 62px); }
.workspace-sidebar { width: 230px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 26px 12px; }
.workspace-sidebar__title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; padding: 0 14px 18px; }
.workspace-nav { display: flex; flex-direction: column; gap: 2px; }
.workspace-nav a {
  font-size: 14px;
  color: var(--muted-2);
  padding: 11px 14px;
  border-radius: var(--radius);
}
.workspace-nav a:hover { opacity: 1; background: var(--surface-2); color: var(--ink); }
.workspace-nav a.is-active { color: var(--ink); font-weight: 600; background: #f4f4f4; }
.workspace-nav__section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); padding: 20px 14px 6px; }
.workspace-main { flex: 1; min-width: 0; padding: 36px 44px 48px; }
.workspace-main h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }

.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 14px; }

.workspace-main .section-head { margin: 0 0 32px; }
.workspace-main .section-head p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; max-width: 560px; }

/* dashboard header row (title + actions) */
.workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.workspace-actions { display: flex; gap: 12px; }

/* product management cards */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dashboard-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-card__head .eyebrow { margin: 0; }
.dashboard-card__title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.dashboard-card__title a { color: var(--ink); }
.dashboard-card__title a:hover { color: var(--accent); }
.dashboard-card__desc { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.dashboard-card .chip-row { margin-top: 2px; }
.dashboard-card .info-chip { font-size: 12px; padding: 4px 9px; }
.info-chip--price { font-weight: 600; color: var(--ink); }
.dashboard-card .action-row { margin-top: auto; padding-top: 8px; }

.status-badge { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 4px 9px; border-radius: 4px; white-space: nowrap; }
.status-badge--success { color: #12965a; background: #eaf6ef; }
.status-badge--muted { color: #8a8a8a; background: #f2f2f2; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dash-header { padding: 14px 16px; gap: 12px; }
  .dash-header__brand { font-size: 19px; }
  .dash-header__nav { gap: 14px; }
  .dash-header__hide-sm { display: none; }
  .workspace-shell { flex-direction: column; min-height: 0; }
  .workspace-sidebar { width: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .workspace-sidebar__title { display: none; }
  .workspace-nav__section { display: none; }
  .workspace-nav { flex-direction: row; gap: 8px; overflow-x: auto; }
  .workspace-nav a { flex: none; white-space: nowrap; font-size: 13px; padding: 7px 13px; }
  .workspace-main { padding: 22px 16px 28px; }
  .workspace-main h1 { font-size: 26px; line-height: 1.14; }
  .workspace-main .section-head { flex-direction: column; align-items: stretch; }
  .workspace-main .section-head .button { width: 100%; }
}

.checkout { max-width: 860px; margin: 0 auto; padding: 40px var(--pad) 64px; }
.checkout__head { margin-bottom: 24px; }
.checkout__head h1 { margin: 4px 0 8px; }
.checkout__lede { color: var(--muted); margin: 0; }
.checkout__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .checkout__grid { grid-template-columns: 1fr; } }
.checkout-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.checkout-card__title { font-size: 16px; margin: 0 0 16px; }
.checkout-items { list-style: none; margin: 0; padding: 0; }
.checkout-item { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checkout-item:first-child { padding-top: 0; }
.checkout-item:last-child { border-bottom: none; }
.checkout-item__name { font-weight: 500; }
.checkout-item__price { color: var(--muted); white-space: nowrap; }
.checkout-item form { display: inline; }
.checkout-item form button.checkout-remove { background: none; border: none; padding: 0; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.checkout-item form button.checkout-remove:hover { background: none; color: var(--ink); opacity: 1; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--ink); }
.checkout-total strong { font-size: 20px; }
.checkout-note { font-size: 14px; color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
.checkout-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.checkout-field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.checkout-field__hint { font-weight: 400; color: var(--muted); }
.checkout-field input, .checkout-field select { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 15px; background: #fff; }
.checkout-field input:focus, .checkout-field select:focus { outline: none; border-color: var(--accent); }
.checkout-pay__btn { margin-top: 4px; }

/* form-card fallbacks (legacy class names) */
.form-card { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.form-card label, .form label { display: flex; flex-direction: column; gap: 9px; text-transform: none; letter-spacing: normal; font-size: 15px; color: var(--ink); }
.form-card > label > input, .form-card > label > textarea, .form-card > label > select { margin-top: 2px; }
.settings-grid { display: flex; flex-direction: column; gap: 12px; }
.toggle-row { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 14px !important; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); }
.toggle-row input { width: auto; }
.form-note { font-size: 13px; color: var(--muted-2); margin: 0; }

/* generic dashboard nav used by dashboard.html/admin.html shells */
.dashboard-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.dashboard-nav a {
  font-size: 13px;
  color: var(--muted-2);
  padding: 8px 13px;
  border-radius: var(--radius);
}
.dashboard-nav a:hover { opacity: 1; background: var(--surface-2); color: var(--ink); }

/* ---------- forms ---------- */
.form, form.stack { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
/* Keep the form's header actions aligned above the field column, not flung to
   the far edge of the workspace. */
.product-form { max-width: 720px; }
.product-form .workspace-head { margin-bottom: 24px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.upload-progress { max-width: 720px; margin-top: 16px; }
.upload-progress__track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.upload-progress__bar { height: 100%; width: 0; background: var(--accent); transition: width 0.15s ease; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field > label,
.field-label,
form label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* checkbox card (playlist bundle) */
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.check-card input { width: auto; }
.check-card strong { font-size: 15px; font-weight: 500; color: var(--ink); display: block; margin-bottom: 2px; }
.check-card span { font-size: 14px; color: var(--muted-2); line-height: 1.5; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.table-wrap { margin-bottom: 24px; overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tfoot th { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; border-top: 2px solid var(--line-strong); border-bottom: none; }
.balance-check { margin-top: 4px; font-size: 13.5px; line-height: 1.5; padding: 11px 15px; border-radius: var(--radius); }
.balance-check--ok { background: #eef7ef; color: #256b2f; border: 1px solid #cfe6d2; }
.balance-check--off { background: #fdf3f2; color: #a5352b; border: 1px solid #f0c9c4; }

/* ---------- alerts / empty states ---------- */
.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 56px 32px;
  text-align: center;
  color: var(--muted);
}
.empty-state h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
.empty-state p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0 auto 28px; max-width: 420px; }
.alert { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.alert--error { border-color: #f0c9c4; background: #fdf3f2; color: #a5352b; }
.account-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 24px; padding: 11px 15px; background: #f4f5f7; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.account-note a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.account-note a:hover { color: var(--accent); }
.account-note__close { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: var(--radius); font-size: 17px; line-height: 1; color: var(--faint); cursor: pointer; }
.account-note__close:hover { background: rgba(17, 17, 17, 0.06); color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 40px var(--pad);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.site-footer__copy { color: var(--muted); max-width: 460px; font-size: 14px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 6px; }
.site-footer__links a { color: var(--ink-soft); font-size: 14px; }
.site-footer__links a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --pad: 16px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .hero__content h1 { font-size: 30px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .market-card__actions { flex-direction: column; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .detail__title { font-size: 26px; }
  .workspace { grid-template-columns: 1fr; }
  .workspace__nav { border-right: none; border-bottom: 1px solid var(--line); }
  .site-nav { gap: 14px; }
  .site-nav__link { font-size: 13px; }
}

@media (max-width: 640px) {
  .site-header__inner { flex-wrap: wrap; gap: 10px 12px; }
  .site-nav {
    margin-left: 0;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .site-nav > * { flex-shrink: 0; }
}

/* ---------- auth (signup / one-time-code login) ---------- */
.auth-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
}
.auth-header__brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.auth-header__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.auth-header__nav a { color: var(--accent); font-weight: 500; }

.auth {
  max-width: 380px;
  margin: 0 auto;
  padding: 88px 28px 96px;
}
.auth--wide { max-width: 700px; }
.auth__eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 12px;
}
.auth__title {
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.auth__sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 32px;
}

.auth__form { display: flex; flex-direction: column; }
.auth__label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 9px;
}
.auth__input { width: 100%; margin-bottom: 24px; }
.auth__form .button--block { width: 100%; padding: 16px; }

/* inline field + button rows (OTP login) */
.auth__row { display: flex; gap: 10px; margin-bottom: 22px; }
.auth__row .auth__input { flex: 1; margin-bottom: 0; }
.auth__row .button { width: auto; white-space: nowrap; padding: 0 22px; }
.auth .button--secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.auth__code {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  font-variant-numeric: tabular-nums;
  padding: 20px;
}

/* inline field error: red message + red border */
.auth__error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d92d20;
  margin: 0 0 9px;
}
.auth .is-error { border-color: #d92d20; }
.auth .is-error:focus { border-color: #d92d20; }

/* per-field error sits tight under its input, taking the input's bottom gap */
.auth__input.is-error { margin-bottom: 7px; }
.auth__field-error {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #d92d20;
  margin: 0 0 24px;
}

.auth__sent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #12965a;
  margin: 0 0 28px;
}

.auth__resend { text-align: center; margin-top: 20px; }
.auth .auth__resend button {
  background: none;
  border: none;
  width: auto;
  padding: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.auth .auth__resend button:hover { background: none; color: var(--accent-press); opacity: 1; }

.auth__divider { height: 1px; background: var(--line); margin: 32px 0; }
.auth__foot { text-align: center; font-size: 14px; color: var(--muted); }
.auth__foot a { color: var(--accent); font-weight: 500; }
.auth__foot + .auth__foot { margin-top: 10px; }
.auth__alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 22px; }
.auth__alt a { color: var(--accent); font-weight: 500; }

@media (max-width: 560px) {
  .auth-header { justify-content: center; padding: 16px; }
  .auth-header__brand { font-size: 19px; }
  .auth-header__nav { display: none; }
  .auth { max-width: none; padding: 44px 28px 40px; }
  .auth__title { font-size: 26px; line-height: 1.14; }
  .auth__sub { font-size: 15px; margin-bottom: 28px; }
  .auth__code { font-size: 28px; letter-spacing: 0.42em; text-indent: 0.42em; padding: 18px; }
}

/* ---------- modal (first-login referral prompt) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.45);
}
.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: 0 20px 60px rgba(17, 17, 17, 0.22);
}
.modal-card .eyebrow { margin: 0 0 10px; }
.modal-card h2 { font-size: 25px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 10px; }
.modal-card__lead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.modal-form .auth__label { margin-bottom: 8px; }
.modal-form .auth__input { margin-bottom: 24px; }
.modal-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fdecea;
  color: #d92d20;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}
.modal-form .is-error { border-color: #d92d20; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
@media (max-width: 480px) {
  .modal-card { padding: 24px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}

/* --- Superadmin category management --- */
.flash { padding: 10px 14px; border-radius: var(--radius); font-size: 14px; margin: 0 0 18px; }
.flash--ok { background: #eef7f0; color: #1c6b2e; border: 1px solid #c4e3cb; }
.flash--error { background: #fdeeec; color: #b02a20; border: 1px solid #f0c4bf; }

.cat-add { display: flex; gap: 10px; align-items: center; max-width: 520px; margin: 0 0 26px; }
.cat-add input { flex: 1; }

.cat-rename { display: flex; gap: 8px; align-items: center; }
.cat-rename input { width: 260px; max-width: 100%; }
.data-table .cat-rename .button { flex: none; }

.cat-actions-col { width: 1%; white-space: nowrap; }

.button--danger,
.button.button--danger { background: #fff; color: #c0392b; border: 1px solid #e6b8b2; }
.button--danger:hover,
.button.button--danger:hover { background: #fdeeec; border-color: #d99; }
