/* ==========================================================================
   Builderz Buyer - design system v3 (production look).
   Layout and components only. Colours and shadows come from theme.css variables,
   so the 5 presets + Custom theme keep working on every screen.
   Sections: 1 base · 2 header/footer · 3 layout · 4 buttons+forms · 5 cards+tables · 6 badges+tabs+steps
             7 marketplace (product cards, categories) · 8 dashboard · 9 cart + product detail
             10 timeline/chat/misc · 11 auth · 12 theme picker · 13 responsive
   ========================================================================== */

/* ---------- 1 base ---------- */
:root {
  --wrap: 1320px;
  --pad: 32px;
  --ring: 0 0 0 4px rgba(var(--accent-rgb), 0.16);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 14px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 6px;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 30px 0 14px;
}
h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}
p {
  margin: 0;
}
b,
strong {
  font-weight: 600;
}
.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.ic.sm {
  width: 16px;
  height: 16px;
}
.ic.lg {
  width: 24px;
  height: 24px;
}
.ic.fill {
  fill: currentColor;
  stroke-width: 1;
}
.num,
.price,
td,
.kpi b,
.sp b {
  font-variant-numeric: tabular-nums;
}
.note {
  font-size: 12.5px;
  color: var(--mute);
  margin: 8px 0;
}
.txt {
  margin: 6px 0;
  color: var(--mute);
  line-height: 1.65;
  font-size: 13.5px;
}
.mute {
  color: var(--mute);
}
::selection {
  background: rgba(var(--accent-rgb), 0.22);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* floating screen label (kept for the review flow) */
.tag {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 60;
  border-radius: 999px;
  padding: 7px 16px;
  gap: 14px;
  display: flex;
  font-size: 11px;
  background: var(--tag-bg);
  color: var(--tag-ink);
  box-shadow: var(--shadow-lg);
  opacity: 0.92;
}
.tag a {
  color: var(--tag-link);
  text-decoration: underline;
}
.tag:hover {
  opacity: 1;
}

/* ---------- 2 header / footer ---------- */
.util {
  background: var(--nav-bg);
  color: var(--nav-ink);
  font-size: 12px;
}
.util .in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.util a {
  color: var(--nav-ink);
  margin-left: 20px;
  opacity: 0.9;
}
.util a:hover {
  color: var(--nav-ink-strong);
  opacity: 1;
}
.util .l {
  display: flex;
  align-items: center;
  gap: 8px;
}
.util .l .ic {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.hdr.scrolled {
  box-shadow: 0 8px 24px -12px rgba(16, 24, 40, 0.25);
}
.hdr .in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.07em;
  color: var(--ink);
  flex: none;
  white-space: nowrap;
}
.logo .mk {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}
.logo .mk svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.logo .role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.catbtn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--strong-bg);
  color: var(--strong-ink);
  font-weight: 600;
  font-size: 14px;
  flex: none;
  transition: 0.15s;
}
.catbtn:hover {
  filter: brightness(1.15);
}
.search {
  flex: 1;
  display: flex;
  align-items: center;
  height: 48px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0 5px 0 18px;
  gap: 10px;
  transition: 0.15s;
  min-width: 0;
}
.search:focus-within {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.search > .ic {
  color: var(--mute);
}
.search input {
  border: 0;
  background: transparent;
  box-shadow: none !important;
  height: 100%;
  padding: 0;
  font-size: 14px;
  min-width: 0;
  flex: 1;
}
.search select {
  width: auto;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  height: 24px;
  padding: 0 26px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
  box-shadow: none !important;
  background-position: right 6px center;
}
.search .btn {
  height: 38px;
  margin: 0;
  border-radius: var(--r-pill);
  padding: 0 22px;
}
.acts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.ib {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--label);
  transition: 0.15s;
}
.ib:hover,
.ib.on {
  background: var(--soft);
  color: var(--ink);
}
.ib .ic {
  width: 22px;
  height: 22px;
}
.ib .cnt {
  position: absolute;
  top: 3px;
  right: 2px;
  margin: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  border: 2px solid var(--card);
  box-sizing: content-box;
}
.ib .dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bad);
  border: 2px solid var(--card);
  box-sizing: content-box;
}
.cnt {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1.5;
}
.me {
  position: relative;
  margin-left: 8px;
}
.me > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  transition: 0.15s;
}
.me > a:hover {
  border-color: var(--btn-line);
  background: var(--hover);
}
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.me .who {
  line-height: 1.25;
  font-size: 13px;
  font-weight: 600;
}
.me .who small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--mute);
}
.me .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 230px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.16s;
  z-index: 70;
}
.me:hover .menu,
.me:focus-within .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--label);
}
.menu a:hover {
  background: var(--soft);
  color: var(--ink);
}
.menu a .ic {
  width: 18px;
  height: 18px;
  color: var(--mute);
}
.menu hr {
  margin: 6px 0;
}
.sub {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.sub .in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub .in::-webkit-scrollbar {
  display: none;
}
.sub a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--soft-ink);
  white-space: nowrap;
  transition: 0.15s;
}
.sub a:hover {
  color: var(--ink);
}
.sub a.on {
  color: var(--ink);
  font-weight: 600;
}
.sub a.on:after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.sub .r {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
  font-size: 13px;
  white-space: nowrap;
  padding-left: 16px;
}
.sub .r a {
  height: auto;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
}

.foot {
  background: var(--nav-bg);
  color: var(--nav-ink);
  margin-top: 72px;
  font-size: 13.5px;
}
.foot .trustbar {
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
}
.foot .trustbar .in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.foot .tb {
  display: flex;
  gap: 14px;
  align-items: center;
}
.foot .tb .ic {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.foot .tb b {
  display: block;
  color: var(--nav-ink-strong);
  font-size: 14px;
}
.foot .tb span {
  font-size: 12.5px;
  opacity: 0.8;
}
.foot .cols {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px var(--pad) 36px;
}
.foot h4 {
  color: var(--nav-ink-strong);
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.foot a {
  display: block;
  margin: 10px 0;
  color: var(--nav-ink);
  opacity: 0.85;
}
.foot a:hover {
  color: var(--nav-ink-strong);
  opacity: 1;
}
.foot p {
  line-height: 1.75;
  margin: 0;
  opacity: 0.85;
}
.foot a.logo {
  display: flex;
  color: var(--nav-ink-strong);
  margin: 0 0 16px;
  opacity: 1;
}
.foot .contact {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  opacity: 0.9;
}
.foot .contact .ic {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.foot .bot {
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}
.foot .bot .in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.foot .bot span {
  opacity: 0.75;
}
.foot .pay {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.foot .pay i {
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
  color: var(--nav-ink-strong);
  opacity: 0.9;
}

/* ---------- 3 layout ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px var(--pad) 8px;
}
.row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.g2,
.g3,
.g4 {
  display: grid;
  gap: 20px;
}
.g2 {
  grid-template-columns: repeat(2, 1fr);
}
.g3 {
  grid-template-columns: repeat(3, 1fr);
}
.g4 {
  grid-template-columns: repeat(4, 1fr);
}
.g2 > *,
.g3 > *,
.g4 > *,
.row > *,
.split > *,
.side > *,
.cartgrid > *,
.pd > * {
  min-width: 0;
}
.sp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.side {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 28px;
  align-items: start;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.pagehead p {
  color: var(--mute);
  margin-top: 4px;
  font-size: 14.5px;
}
.crumb {
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.crumb a:hover {
  color: var(--accent);
}
.crumb .ic {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}
.secthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 40px 0 16px;
}
.secthead h2 {
  margin: 0;
}
.secthead p {
  color: var(--mute);
  font-size: 13.5px;
  margin-top: 2px;
}
.secthead a.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}
.secthead a.more:hover {
  gap: 10px;
}
.secthead a.more {
  transition: 0.15s;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--nav-bg);
  color: var(--nav-ink-strong);
  border-radius: var(--r);
  padding: 44px 48px 52px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.hero:before {
  content: none;
}
.hero:after {
  /* the one hand-made detail: a tape-measure edge (see DESIGN_RULES 12) */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px) 0 100% / 60px 14px repeat-x,
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 100% / 12px 7px repeat-x;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 38px;
  margin: 0 0 10px;
  color: inherit;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p {
  margin: 0 0 24px;
  opacity: 0.86;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
}
.hero .btn {
  margin-top: 0;
}
.hero .btn:not(.p) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.hero .btn:not(.p):hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}
.hero .art {
  display: none;
}
.hero .art svg {
  width: 70px;
  height: 70px;
}
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 12px;
}
.eyebrow i {
  display: none;
}

/* ---------- 4 buttons + forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 1px solid var(--btn-line);
  padding: 0 20px;
  margin: 4px 8px 4px 0;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: 600 14px/1 var(--font);
  border-radius: var(--r-sm);
  transition: 0.16s;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--ink);
  background: var(--hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn.p {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.p:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.full {
  display: flex;
  width: 100%;
  margin-right: 0;
}
.btn.sm {
  height: 32px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: var(--r-xs);
}
.btn.lg {
  height: 50px;
  padding: 0 28px;
  font-size: 15px;
}
.btn .ic {
  width: 18px;
  height: 18px;
}
.btn.sm .ic {
  width: 15px;
  height: 15px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}
.btn.ghost:hover {
  background: var(--accent-tint);
  border-color: transparent;
}
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--label);
}
input,
select,
textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--input-line);
  border-radius: var(--r-sm);
  font: inherit;
  background: var(--card);
  color: var(--ink);
  transition: 0.15s;
}
textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--mute);
  opacity: 0.75;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--btn-line);
}
input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b8b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  padding: 0;
  flex: none;
  cursor: pointer;
}
input[type="color"] {
  padding: 3px;
  height: 44px;
  cursor: pointer;
}
.field {
  position: relative;
}
.field > .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.field input {
  padding-left: 44px;
}
.field .eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--mute);
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
.field .eye:hover {
  background: var(--soft);
  color: var(--ink);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--label);
  margin: 0;
  cursor: pointer;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--input-line);
  border-radius: var(--r-sm);
  background: var(--card);
  overflow: hidden;
  height: 40px;
}
.qty button {
  width: 36px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--label);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: 0.12s;
}
.qty button:hover {
  background: var(--soft);
  color: var(--ink);
}
.qty input {
  width: 48px;
  height: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  padding: 0;
  font-weight: 600;
  box-shadow: none !important;
}

/* ---------- 5 cards + tables ---------- */
.box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
}
.box > h2:first-child,
.box > h3:first-child {
  margin-top: 0;
}
a.box {
  transition: 0.2s;
}
a.box:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.ph {
  background: var(--ph1);
  border: 1px dashed var(--ph-line);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-ink);
  font-size: 12px;
}
.bar {
  height: 9px;
  border-radius: 6px;
  margin: 8px 0;
  background: linear-gradient(90deg, var(--bar1) 25%, var(--bar2) 50%, var(--bar1) 75%);
  background-size: 200% 100%;
  animation: sh 1.8s linear infinite;
}
.bar.s {
  width: 60%;
}
.bar.m {
  width: 80%;
}
@keyframes sh {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bar {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
.tw {
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.tw table {
  min-width: 560px;
}
.box .tw {
  box-shadow: none;
  border-radius: var(--r-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: var(--head-bg);
  color: var(--mute);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  text-align: left;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td,
tr:hover > td {
  background: var(--hover);
}
td a.lk {
  color: var(--accent);
  font-weight: 600;
}
td a.lk:hover {
  text-decoration: underline;
}
td a[style*="underline"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none !important;
}
td a[style*="underline"]:hover {
  text-decoration: underline !important;
}
.art-t {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: var(--r-sm);
}
.art-t svg {
  width: 38%;
  height: 62%;
  max-height: 64px;
}
.stat b {
  font-size: 13px;
  color: var(--mute);
  font-weight: 600;
}
.stat h1 {
  font-size: 30px;
  margin: 6px 0 2px;
}
.chartv {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--accent);
}
.opt {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: 0.15s;
  cursor: pointer;
}
.opt:hover {
  border-color: var(--btn-line);
}
.opt input {
  margin-top: 2px;
}
.opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: var(--ring);
}
details.box {
  margin-bottom: 12px;
  padding: 18px 24px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker {
  display: none;
}
summary:after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
details[open] summary:after {
  content: "\2212";
}
details[open] summary {
  margin-bottom: 10px;
}
ul.i {
  padding-left: 0;
  list-style: none;
}
ul.i li {
  margin: 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--label);
}
ul.i li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E")
    center/11px no-repeat;
}

/* ---------- 6 badges, tabs, steps ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip-bg);
  color: var(--soft-ink);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-pill);
  margin: 2px 4px 2px 0;
  line-height: 1.4;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  white-space: nowrap;
  line-height: 1.4;
}
.badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.v-ok {
  background: var(--ok-tint) !important;
  color: var(--ok) !important;
}
.v-warn {
  background: var(--warn-tint) !important;
  color: var(--warn) !important;
}
.v-bad {
  background: var(--bad-tint) !important;
  color: var(--bad) !important;
}
.v-info {
  background: var(--info-tint) !important;
  color: var(--info) !important;
}
.chip.v-ok:before,
.chip.v-warn:before,
.chip.v-bad:before,
.chip.v-info:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs > span,
.tabs > a > span,
.tabs > a {
  padding: 13px 2px;
  margin-bottom: -1px;
  border-bottom: 2.5px solid transparent;
  font-weight: 500;
  color: var(--mute);
  white-space: nowrap;
  cursor: pointer;
  transition: 0.15s;
  display: block;
}
.tabs > a > span {
  padding: 0;
  margin: 0;
  border: 0;
}
.tabs > span:hover,
.tabs > a:hover {
  color: var(--ink);
}
.tabs > .on,
.tabs > a.on {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.tabs.seg {
  display: inline-flex;
  gap: 4px;
  background: var(--soft);
  padding: 4px;
  border: 0;
  border-radius: var(--r-sm);
  overflow: visible;
}
.tabs.seg > span {
  padding: 9px 20px;
  margin: 0;
  border: 0;
  border-radius: var(--r-xs);
}
.tabs.seg > .on {
  background: var(--card);
  box-shadow: var(--shadow-md);
  border: 0;
}
.tabpane[hidden] {
  display: none;
}
.steps {
  counter-reset: s;
  display: flex;
  margin: 0 0 32px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 24px;
  box-shadow: var(--shadow);
  gap: 8px;
}
.steps span {
  counter-increment: s;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
  font-weight: 500;
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}
.steps span:before {
  content: counter(s);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  flex: none;
  color: var(--mute);
  z-index: 1;
}
.steps span:after {
  content: "";
  height: 2px;
  flex: 1;
  background: var(--line);
  margin: 0 4px 0 8px;
  border-radius: 2px;
  min-width: 12px;
}
.steps span:last-child {
  flex: none;
}
.steps span:last-child:after {
  display: none;
}
.steps span.on {
  color: var(--ink);
  font-weight: 700;
  background: none;
  border: 0;
}
.steps span.on:before {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--ring);
}
.steps span:has(~ .on) {
  color: var(--label);
}
.steps span:has(~ .on):before {
  content: "\2713";
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.steps span:has(~ .on):after {
  background: var(--accent);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pills [data-pick],
.pills a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 500;
  font-size: 13px;
  color: var(--label);
  cursor: pointer;
  transition: 0.15s;
}
.pills [data-pick]:hover,
.pills a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pills .on {
  background: var(--strong-bg);
  border-color: var(--strong-bg);
  color: var(--strong-ink);
}

/* ---------- 7 marketplace ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.trust > div {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.trust > div:last-child {
  border: 0;
}
.trust .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.trust b {
  display: block;
  font-size: 14px;
}
.trust span {
  font-size: 12.5px;
  color: var(--mute);
}
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.22s;
}
.cat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.cat .pimg {
  height: 150px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.cat .cb {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat h3 {
  font-size: 16px;
  margin: 0;
}
.cat .cm {
  font-size: 12.5px;
  color: var(--mute);
}
.cat .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  margin-top: 10px;
  transition: 0.15s;
}
.cat:hover .go {
  gap: 10px;
}
.pimg {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--ph1);
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1/0.82;
}
.pimg:before {
  content: none;
}
.pimg > svg {
  position: relative;
  width: 58%;
  height: 78%;
  filter: drop-shadow(0 10px 14px rgba(16, 24, 40, 0.14));
  transition: transform 0.3s;
}
.pcard:hover .pimg > svg,
.cat:hover .pimg > svg {
  transform: scale(1.07) translateY(-2px);
}
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 20px;
}
.pgrid.c3 {
  grid-template-columns: repeat(3, 1fr);
}
.pgrid.c4 {
  grid-template-columns: repeat(4, 1fr);
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: 0.22s;
  overflow: hidden;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--accent-rgb), 0.4);
}
.pcard .pimg {
  border-radius: 0;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
}
.pcard .badges {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pcard .badges .chip {
  margin: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 11.5px;
  padding: 3px 10px;
}
.fav {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 0;
  display: grid;
  place-items: center;
  color: var(--mute);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: 0.15s;
  padding: 0;
}
.fav:hover {
  color: var(--bad);
  transform: scale(1.08);
}
.fav.on {
  color: var(--bad);
}
.fav.on .ic {
  fill: currentColor;
}
.fav .ic {
  width: 18px;
  height: 18px;
}
.pbody {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  flex: 1;
}
.pcat {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.pname {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.pname:hover {
  color: var(--accent);
}
.pname:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pmeta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--mute);
}
.pmeta .rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 600;
}
.pmeta .rate .ic {
  width: 14px;
  height: 14px;
  color: #f5a524;
  fill: #f5a524;
  stroke: #f5a524;
}
.pvendor {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--soft-ink);
}
.pvendor .ic {
  width: 14px;
  height: 14px;
  color: var(--ok);
}
.pfoot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 12px;
}
.price {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.price small {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0;
  margin-left: 3px;
}
.price .was {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--mute);
  text-decoration: line-through;
  letter-spacing: 0;
  margin-bottom: 2px;
}
.add {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  transition: 0.16s;
  box-shadow: none;
}
.add:hover {
  background: var(--accent-hover);
  transform: scale(1.08);
}
.pstock {
  font-size: 11.5px;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pstock:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}
.pstock.low:before {
  background: var(--warn);
}
.filters {
  position: sticky;
  top: 152px;
  padding: 0;
  overflow: hidden;
}
.filters .fh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 15px;
}
.filters .fh a {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
}
.filters .fg {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.filters .fg:last-child {
  border: 0;
}
.filters .fg > b {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
  font-weight: 600;
}
.filters .check {
  margin: 9px 0;
  font-weight: 500;
}
.filters .check span {
  margin-left: auto;
  color: var(--mute);
  font-size: 12px;
}
.filters .pr {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--mute);
}
.filters .pr input {
  height: 40px;
}
.filters .fg .btn {
  margin: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar .cnt-t {
  color: var(--mute);
}
.toolbar .cnt-t b {
  color: var(--ink);
}
.toolbar select {
  width: auto;
  min-width: 200px;
  height: 40px;
}
.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.pager a {
  white-space: nowrap;
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--label);
  padding: 0 12px;
  transition: 0.15s;
}
.pager a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pager a.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--accent-tint);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--r);
  padding: 26px 32px;
}
.promo h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.promo p {
  color: var(--soft-ink);
  font-size: 13.5px;
}
.vcard {
  display: flex;
  align-items: center;
  gap: 16px;
}
.vcard .logo-b {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--strong-bg);
  color: var(--strong-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  flex: none;
}

/* ---------- 8 dashboard ---------- */
.hero.dash {
  padding: 40px 48px;
  align-items: stretch;
}
.hero.dash .hl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1.3;
}
.hero.dash h1 {
  font-size: 34px;
}
.hero .glass {
  flex: 1;
  max-width: 440px;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.glass .gh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
}
.glass .gh .live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
  background: var(--ok-tint);
  color: var(--ok);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.glass .gh .live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.glass h3 {
  font-size: 19px;
  margin: 0;
  color: var(--ink);
}
.glass .gs {
  font-size: 13px;
  color: var(--mute);
}
.track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 4px 0;
}
.track i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.track i.d {
  background: var(--ink);
}
.track i.n {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.track em {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 3px;
}
.track em.d {
  background: var(--ink);
}
.glass .gf {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--mute);
}
.alerts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.alert {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: 0.2s;
}
.alert:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.alert.info {
  border-left-color: var(--info);
}
.alert.ok {
  border-left-color: var(--ok);
}
.alert .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--warn-tint);
  color: var(--warn);
}
.alert.info .ico {
  background: var(--info-tint);
  color: var(--info);
}
.alert.ok .ico {
  background: var(--ok-tint);
  color: var(--ok);
}
.alert b {
  display: block;
  font-size: 14px;
}
.alert span {
  font-size: 12.5px;
  color: var(--mute);
}
.alert .ic.go {
  margin-left: auto;
  color: var(--mute);
  width: 18px;
  height: 18px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.kpi {
  display: block;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: 0.2s;
}
a.kpi:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.4);
}
.kpi .kh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.kpi .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.kpi .lbl {
  font-size: 13px;
  color: var(--mute);
  font-weight: 500;
}
.kpi b {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 2px 0 8px;
}
.kpi .dl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--ok-tint);
  color: var(--ok);
}
.kpi .dl.n {
  background: var(--chip-bg);
  color: var(--soft-ink);
}
.kpi .dl .ic {
  width: 13px;
  height: 13px;
}
.kpi .sub2 {
  font-size: 12.5px;
  color: var(--mute);
  margin-left: 6px;
}
.split {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 20px;
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 210px;
  padding: 8px 4px 0;
  margin-top: 14px;
}
.chart .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}
.chart .col i {
  display: block;
  width: 100%;
  max-width: 56px;
  border-radius: 9px 9px 3px 3px;
  background: color-mix(in srgb, var(--accent) 30%, var(--card));
}
.chart .col.on i {
  background: var(--accent);
}
.chart .col span {
  font-size: 12px;
  color: var(--mute);
  font-weight: 500;
}
.chart .col.on span {
  color: var(--ink);
  font-weight: 700;
}
.chart .col em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0;
  transition: 0.15s;
}
.chart .col:hover em,
.chart .col.on em {
  opacity: 1;
}
.meter {
  height: 10px;
  background: var(--soft);
  border-radius: 99px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}
.mrow {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin: 8px 0 6px;
  color: var(--mute);
}
.mrow b {
  color: var(--ink);
}
.qa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.qa a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13.5px;
  background: var(--card);
  transition: 0.18s;
}
.qa a:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: translateY(-2px);
}
.qa .ic {
  color: var(--accent);
  width: 24px;
  height: 24px;
}
.ref {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: var(--strong-bg);
  color: var(--strong-ink);
  border-radius: var(--r);
  padding: 32px 40px;
}
.ref h3 {
  font-size: 22px;
  margin-bottom: 6px;
  color: inherit;
}
.ref p {
  opacity: 0.85;
  max-width: 520px;
}
.ref .code {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 8px 8px 8px 20px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
}
.ref .code .btn {
  margin: 0;
  height: 38px;
}
.ref .code .btn:not(.p) {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.who .av {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.vtag {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vtag .av {
  border-radius: 10px;
  background: var(--soft);
  color: var(--soft-ink);
  width: 34px;
  height: 34px;
  font-size: 12px;
}

/* ---------- 9 cart + product detail ---------- */
.cartgrid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}
.vgroup {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.vgroup .vh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--head-bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.vgroup .vh .vcard .logo-b {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
}
.vgroup .vh b {
  font-size: 15px;
}
.vgroup .vh small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
}
.crow {
  display: grid;
  grid-template-columns: 76px 1fr auto 120px 36px;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.crow:last-of-type {
  border-bottom: 0;
}
.crow .pimg {
  width: 76px;
  height: 76px;
  aspect-ratio: auto;
  border-radius: 12px;
}
.crow .pimg > svg {
  width: 70%;
  height: 70%;
}
.crow .pn {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.35;
  display: block;
}
.crow .pn:hover {
  color: var(--accent);
}
.crow .ps {
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 3px;
}
.crow .lt {
  text-align: right;
  font-weight: 700;
  font-size: 15.5px;
}
.crow .lt small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--mute);
}
.crow .rm {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--mute);
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}
.crow .rm:hover {
  background: var(--bad-tint);
  color: var(--bad);
}
.vgroup .vf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: var(--head-bg);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--mute);
  flex-wrap: wrap;
  gap: 8px;
}
.vgroup .vf b {
  color: var(--ink);
  font-size: 16px;
}
.summary {
  position: sticky;
  top: 152px;
  padding: 0;
  overflow: hidden;
}
.summary .sh {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 16px;
}
.summary .sb {
  padding: 20px 24px;
}
.summary .ln {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  color: var(--soft-ink);
  font-size: 14px;
}
.summary .ln b {
  color: var(--ink);
}
.summary .ln.disc b {
  color: var(--ok);
}
.summary .tot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px dashed var(--btn-line);
  font-weight: 700;
}
.summary .tot b {
  font-size: 26px;
  letter-spacing: -0.02em;
}
.summary .vc {
  display: flex;
  gap: 8px;
  margin: 18px 0 6px;
}
.summary .vc input {
  flex: 1;
}
.summary .vc .btn {
  margin: 0;
}
.summary .secure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 16px 24px;
  background: var(--head-bg);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--mute);
}
.summary .secure .ic {
  color: var(--ok);
  margin-top: 1px;
}
.freebar {
  background: var(--accent-tint);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 6px;
  font-size: 13px;
}
.freebar .meter {
  margin-top: 10px;
  height: 8px;
  background: rgba(var(--accent-rgb), 0.16);
}
.freebar.done {
  background: var(--ok-tint);
  border-color: transparent;
  color: var(--ok);
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
}
.pd {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.gallery .main {
  aspect-ratio: 1/0.88;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.gallery .main > svg {
  width: 62%;
  height: 76%;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.thumbs .pimg {
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: none;
}
.thumbs .pimg > svg {
  width: 64%;
  height: 64%;
  filter: none;
}
.thumbs .pimg:hover {
  border-color: var(--btn-line);
}
.thumbs .pimg.on {
  border-color: var(--accent);
}
.pinfo h1 {
  font-size: 30px;
  margin: 8px 0 10px;
}
.pinfo .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 20px;
}
.pinfo .meta .rate {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}
.pinfo .meta .rate .ic {
  color: #f5a524;
  fill: #f5a524;
  stroke: #f5a524;
  width: 16px;
  height: 16px;
}
.pinfo .meta i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--btn-line);
}
.pricebox {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--head-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 18px;
}
.pricebox .price {
  font-size: 36px;
}
.pricebox .price small {
  font-size: 15px;
}
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 20px;
}
.tiers div {
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--mute);
  background: var(--card);
}
.tiers div.on {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.tiers b {
  display: block;
  color: var(--ink);
  font-size: 15.5px;
  margin-top: 2px;
}
.buy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: end;
}
.buy .qty {
  height: 46px;
}
.buy select {
  height: 46px;
}
.cta {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.cta .btn {
  margin: 0;
  flex: 1;
  min-width: 150px;
}
.cta .btn.lg {
  height: 52px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
}
.facts > div {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--mute);
}
.facts > div:last-child {
  border: 0;
}
.facts .ic {
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
  width: 22px;
  height: 22px;
}
.facts b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 2px;
}
.sold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 18px;
  background: var(--card);
  flex-wrap: wrap;
}
.sold .vcard {
  gap: 14px;
}
.sold b {
  font-size: 15px;
}
.sold small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
}
.spec td:first-child {
  width: 34%;
  color: var(--mute);
  font-weight: 500;
  background: var(--head-bg);
}
.review {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.review:last-child {
  border: 0;
}
.stars {
  display: inline-flex;
  gap: 2px;
  color: #f5a524;
}
.stars .ic {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: currentColor;
}

/* ---------- 10 timeline / chat / misc ---------- */
.tl {
  border-left: 2px solid var(--line);
  margin-left: 10px;
  padding-left: 28px;
}
.tl .s {
  position: relative;
  margin-bottom: 26px;
}
.tl .s:before {
  content: "";
  position: absolute;
  left: -39px;
  top: 2px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--btn-line);
  background: var(--card);
  border-radius: 50%;
}
.tl .s.done:before {
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E")
    center/12px no-repeat;
  border-color: var(--accent);
}
.tl .s.now:before {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.tl .s.now:after {
  content: "";
  position: absolute;
  left: -33px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.tl .s.done {
  border-color: var(--accent);
}
.tl .s b {
  font-size: 14.5px;
}
.chat {
  border: 1px solid var(--line);
  background: var(--chat-bg);
  border-radius: var(--r);
  height: 380px;
  padding: 20px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat .m {
  max-width: 68%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px 16px 16px 4px;
  box-shadow: var(--shadow);
}
.chat .m.me {
  align-self: flex-end;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  border-radius: 16px 16px 4px 16px;
}
.ixg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
a.ix {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-weight: 500;
  transition: 0.18s;
  box-shadow: var(--shadow);
}
a.ix:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
a.ix b {
  color: var(--accent);
  background: var(--accent-tint);
  min-width: 36px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 12.5px;
}
.links {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--mute);
}
.empty .ico {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--accent-tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

/* ---------- 11 auth ---------- */
body.auth {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  background: var(--card);
}
.auth .side-hero {
  position: relative;
  overflow: hidden;
  grid-column: 1;
  grid-row: 1/3;
  background: var(--nav-bg);
  color: var(--nav-ink-strong);
  padding: 56px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.side-hero:before {
  content: none;
}
.side-hero:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px) 0 100% / 60px 14px repeat-x,
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 100% / 12px 7px repeat-x;
}
.side-hero > * {
  position: relative;
  z-index: 1;
}
.side-hero .logo {
  color: #fff;
  margin-bottom: 24px;
}
.side-hero h1 {
  font-size: 44px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.035em;
  max-width: 560px;
}
.side-hero p {
  font-size: 17px;
  opacity: 0.85;
  max-width: 500px;
  line-height: 1.6;
}
.side-hero ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.side-hero li {
  margin: 14px 0;
  font-size: 15.5px;
  display: flex;
  align-items: center;
}
.side-hero li:before {
  content: "\2713";
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-right: 14px;
  flex: none;
  font-weight: 700;
}
.side-hero .quote {
  margin-top: 14px;
  max-width: 440px;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quote .qh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.quote .qh span {
  background: var(--ok-tint);
  color: var(--ok);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0;
  text-transform: none;
}
.quote .qr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--r-xs);
  background: var(--soft);
}
.quote .qr.top {
  background: var(--accent-tint);
  color: var(--ink);
}
.quote .qr.top b {
  color: var(--ink);
}
.quote .qr small {
  display: block;
  opacity: 0.7;
  font-size: 11.5px;
}
.side-hero .stats {
  display: flex;
  gap: 36px;
  margin-top: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.stats b {
  display: block;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.stats span {
  font-size: 12.5px;
  opacity: 0.75;
}
.auth .brand {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 48px 0 8px;
  text-align: center;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.brand .mk {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.brand .mk svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.brand small {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--mute);
  margin-top: 4px;
}
.auth .narrow {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  box-shadow: none;
  border: 0;
  background: transparent;
  max-width: 440px;
  width: 100%;
  justify-self: center;
  padding: 8px 32px 48px;
  margin: 0;
}
.narrow h1 {
  font-size: 28px;
  margin-bottom: 6px;
}
.narrow .lead {
  color: var(--mute);
  margin-bottom: 8px;
}
.narrow:not(.auth .narrow) {
  max-width: 460px;
  margin: 0 auto 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 6px);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.brand:not(.auth .brand) {
  text-align: center;
  margin: 48px auto 20px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--mute);
  font-size: 12.5px;
  margin: 22px 0;
}
.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.authfoot {
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  margin-top: 28px;
}
.authfoot a {
  margin: 0 8px;
}
.authfoot a:hover {
  color: var(--accent);
}

/* ---------- 12 theme picker (Settings > Appearance) ---------- */
.cust {
  display: none;
  background: var(--head-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 12px;
}
.cust.on {
  display: block;
}
.cust .g3 {
  margin: 6px 0 4px;
}
.tp {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.tpc {
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: block;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  transition: 0.15s;
}
.tpc:hover {
  border-color: var(--btn-line);
}
.tpc .pv {
  display: block;
  position: relative;
  overflow: hidden;
  height: 58px;
  margin-bottom: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.tpc .pv i {
  position: absolute;
  display: block;
}
.tpc .pv .a {
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  background: var(--nav-bg);
}
.tpc .pv .b {
  left: 8px;
  bottom: 8px;
  width: 46px;
  height: 14px;
  border-radius: var(--r-xs);
  background: var(--accent);
}
.tpc .pv .c {
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 14px;
  border-radius: var(--r-xs);
  background: var(--soft);
}
.tpc.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}
.tpc.sel b:after {
  content: " \2713";
  color: var(--accent);
}

/* ---------- 13 responsive ---------- */
@media (max-width: 1180px) {
  :root {
    --pad: 24px;
  }
  .cats,
  .kpis,
  .g4,
  .pgrid.c4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .pgrid.c3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .catbtn span {
    display: none;
  }
  .catbtn {
    padding: 0 14px;
  }
  .me .who {
    display: none;
  }
  .me > a {
    padding: 4px;
  }
  .foot .cols {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .foot .cols > div:first-child {
    grid-column: 1/-1;
  }
  .hero.dash .glass {
    max-width: 380px;
  }
}
@media (max-width: 980px) {
  .hdr .in {
    flex-wrap: wrap;
    gap: 12px 14px;
    padding: 12px var(--pad);
  }
  .logo {
    order: 1;
    margin-right: auto;
  }
  .acts {
    order: 2;
  }
  .catbtn {
    display: none;
  }
  .search {
    order: 3;
    flex: 1 1 100%;
    height: 46px;
  }
  .g3,
  .alerts,
  .trust {
    grid-template-columns: 1fr 1fr;
  }
  .trust > div:nth-child(2) {
    border-right: 0;
  }
  .trust > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .side,
  .cartgrid,
  .pd,
  .split {
    grid-template-columns: 1fr;
  }
  .filters,
  .summary {
    position: static;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 28px;
  }
  .hero .art {
    display: none;
  }
  .hero.dash .glass {
    max-width: none;
    width: 100%;
  }
  .hero h1 {
    font-size: 30px;
  }
  body.auth {
    display: block;
  }
  .auth .side-hero {
    display: none;
  }
  .auth .brand {
    margin-top: 36px;
  }
  .foot .trustbar .in {
    grid-template-columns: 1fr 1fr;
  }
  .ref {
    flex-direction: column;
    align-items: flex-start;
  }
  .pagehead {
    align-items: flex-start;
  }
  .util .r {
    display: none;
  }
}
@media (max-width: 700px) {
  :root {
    --pad: 16px;
  }
  .wrap {
    padding: 20px var(--pad) 8px;
  }
  h1 {
    font-size: 24px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero p {
    font-size: 14.5px;
  }
  .g2,
  .g3,
  .alerts,
  .facts {
    grid-template-columns: 1fr;
  }
  .facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .row:not(.keep) {
    flex-direction: column;
  }
  .row:not(.keep) > * {
    flex: none !important;
    width: 100%;
  }
  .row.keep {
    gap: 8px;
    flex-wrap: wrap;
  }
  .row.keep select {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  .util .l span:nth-child(n + 2) {
    display: none;
  }
  .sub .r {
    display: none;
  }
  .ib {
    width: 40px;
    height: 40px;
  }
  .cats,
  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pgrid,
  .pgrid.c3,
  .pgrid.c4 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pbody {
    padding: 12px 14px 14px;
  }
  .pname {
    font-size: 14px;
  }
  .price {
    font-size: 17px;
  }
  .pmeta {
    flex-wrap: wrap;
  }
  .cat .pimg {
    height: 110px;
  }
  .cat .cb {
    padding: 14px;
  }
  .crow {
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    padding: 16px;
  }
  .crow .pimg {
    width: 64px;
    height: 64px;
  }
  .crow .lt {
    grid-column: 2/3;
    text-align: left;
  }
  .crow .rm {
    grid-row: 1;
    grid-column: 3;
  }
  .crow .qty {
    grid-column: 3;
    grid-row: 2;
  }
  .steps {
    padding: 14px 16px;
    overflow-x: auto;
  }
  .steps span {
    flex: none;
  }
  .steps span:after {
    width: 20px;
    flex: none;
  }
  .tp {
    grid-template-columns: 1fr 1fr;
  }
  .btn {
    padding: 0 18px;
  }
  .pricebox .price {
    font-size: 30px;
  }
  .tiers {
    grid-template-columns: 1fr;
  }
  .thumbs {
    gap: 8px;
  }
  .buy {
    grid-template-columns: 1fr;
  }
  .foot .cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 36px var(--pad) 24px;
  }
  .foot .trustbar .in {
    grid-template-columns: 1fr;
  }
  .promo,
  .sold {
    flex-direction: column;
    align-items: flex-start;
  }
  .ref {
    padding: 26px 22px;
  }
  .ref .code {
    width: 100%;
    justify-content: space-between;
  }
  .narrow:not(.auth .narrow) {
    margin: 0 16px 32px;
    padding: 24px;
  }
  .sp {
    flex-wrap: wrap;
  }
  .tag {
    left: 8px;
    bottom: 8px;
  }
  .chart {
    gap: 8px;
  }
  .hero.dash {
    padding: 28px 22px;
  }
  .secthead {
    flex-wrap: wrap;
  }
  .toolbar select {
    flex: 1;
  }
}
@media (max-width: 420px) {
  .pgrid,
  .pgrid.c3,
  .pgrid.c4,
  .cats {
    grid-template-columns: 1fr 1fr;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .qa {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- DESIGN_RULES pass ---------- */
/* KPI cards: the number is the evidence, the icon tile was decoration (rule 5). */
.kpi .ico {
  display: none;
}
.hero .glass {
  align-self: center;
}

/* ---------- States: empty / loading / error (DESIGN_RULES 9) ---------- */
[hidden] { display: none !important; }
.state {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 640px;
  padding: 48px 0;
  text-align: left;
}
.state .ico {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
}
.state .ico.bad { background: var(--bad-tint); color: var(--bad); }
.state h2 { font-size: 20px; margin: 0 0 6px; letter-spacing: -0.01em; }
.state p { margin: 0 0 18px; color: var(--mute); max-width: 52ch; line-height: 1.55; }
.state.loading { display: block; max-width: none; padding: 8px 0; }
.skel .note { margin: 0 0 12px; }
.skrow {
  display: grid;
  grid-template-columns: 1fr 2fr 3fr;
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.skrow .bar { margin: 0; width: auto; }
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } }
.tag .sw { display: inline-flex; gap: 2px; margin-left: 4px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.tag .sw button {
  font: inherit; color: var(--tag-ink); background: none; border: 0; cursor: pointer;
  padding: 0 6px; text-transform: capitalize; border-radius: 4px;
}
.tag .sw button.on { color: #fff; text-decoration: underline; }

/* ---------- Nested cards: one level only (DESIGN_RULES 4) ---------- */
.box .tw { border: 0; border-radius: 0; background: none; box-shadow: none; }
.box .freebar { border: 0; }
.box .box { border: 0; box-shadow: none; background: var(--soft); }
.qa a { box-shadow: none; }
.box .qa a { border: 0; background: var(--soft); }
.state { width: 100%; align-self: flex-start; margin: 0 auto 0 0; justify-self: start; }
.state h2 { color: var(--ink); }

/* ---------- Form errors ---------- */
.ferr { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; font-size: 13px; line-height: 1.45; color: var(--bad); }
.ferr .ic { flex: none; margin-top: 1px; }
.ferr[hidden] { display: none !important; }
.field.bad input, input.bad, .ph.bad { border-color: var(--bad); }
.ph.bad { background: var(--bad-tint); }

/* ---------- Dashboard KPIs: a flat strip, not four identical cards (DESIGN_RULES 4) ---------- */
.kpis { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.kpis .kpi { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 22px 24px; }
.kpis .kpi + .kpi { border-left: 1px solid var(--line-soft); }
.kpis a.kpi:hover { transform: none; box-shadow: none; background: var(--hover); }

/* ==========================================================================
   14 mobile + touch  (added)
   Everything that changes layout lives inside max-width:980px, so desktop
   stays exactly as designed. Only the touch fixes sit outside, behind
   (hover: none).
   ========================================================================== */

/* hamburger, drawer, sheet: hidden until the mobile query turns them on */
.mnav-btn,
.drawer,
.drawer-ov,
.fbtn {
  display: none;
}

/* ---- touch: profile menu opens on tap instead of hover (any width) ---- */
@media (hover: none) {
  .me:hover .menu,
  .me:focus-within .menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
  }
  .me.open .menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .me.open > a {
    border-color: var(--btn-line);
    background: var(--hover);
  }
  .menu a {
    padding: 12px 11px;
  }
}

@media (max-width: 980px) {
  /* ---- header: hamburger | logo ........ bell cart, search on row 2 ---- */
  .mnav-btn {
    order: 0;
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: -8px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mnav-btn:active {
    background: var(--soft);
  }
  .mnav-btn .ic {
    width: 24px;
    height: 24px;
  }
  .logo {
    min-width: 0;
  }
  .sub,
  .hdr .me {
    display: none;
  }
  /* search row tucks away while reading down, comes back on scroll up.
     The header's layout height stays constant (no reflow = no scroll jitter):
     only the background plate shrinks and the search row slides/fades. */
  .hdr {
    background: transparent;
    border-bottom: 0;
    box-shadow: none !important;
  }
  .hdr::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    z-index: -1;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    transition: height 0.22s ease, box-shadow 0.2s;
    pointer-events: none;
  }
  .hdr.scrolled::before {
    box-shadow: 0 8px 24px -12px rgba(16, 24, 40, 0.25);
  }
  .search {
    transition: transform 0.22s ease, opacity 0.18s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    will-change: transform, opacity;
  }
  .hdr.tuck::before {
    height: calc(100% - 62px);
  }
  .hdr.tuck .search {
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
  }
  /* tucked: the empty strip under the header must not block taps on the page */
  .hdr.tuck {
    pointer-events: none;
  }
  .hdr.tuck .in > :not(.search) {
    pointer-events: auto;
  }
  .search input {
    font-size: 16px; /* stops iOS zooming the page on focus */
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }

  /* ---- drawer ---- */
  .drawer-ov {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(16, 24, 40, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s, visibility 0.22s;
  }
  body.nav-open .drawer-ov,
  body.sheet-open .drawer-ov {
    opacity: 1;
    visibility: visible;
  }
  body.nav-open,
  body.sheet-open {
    overflow: hidden;
  }
  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: min(86vw, 320px);
    background: var(--card);
    box-shadow: var(--shadow-lg);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.26s;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.nav-open .drawer {
    transform: none;
    visibility: visible;
  }
  .drawer.drag {
    transition: none;
  }
  .dr-h {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 18px;
    border-bottom: 1px solid var(--line);
  }
  .dr-h .av {
    width: 42px;
    height: 42px;
  }
  .dr-h .nm {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
    font-size: 14.5px;
    font-weight: 700;
  }
  .dr-h .nm small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--mute);
  }
  .dr-x {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--label);
    cursor: pointer;
  }
  .dr-x:active {
    background: var(--soft);
  }
  .dr-b {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px 16px;
    -webkit-overflow-scrolling: touch;
  }
  .dr-b h4 {
    margin: 18px 10px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mute);
  }
  .dr-b h4:first-child {
    margin-top: 10px;
  }
  .dr-b a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--label);
    -webkit-tap-highlight-color: transparent;
  }
  .dr-b a:active {
    background: var(--soft);
  }
  .dr-b a .ic {
    width: 20px;
    height: 20px;
    color: var(--mute);
  }
  .dr-b a.on {
    background: var(--accent-tint);
    color: var(--ink);
    font-weight: 600;
  }
  .dr-b a.on .ic {
    color: var(--accent);
  }
  .dr-b hr {
    margin: 10px 8px;
  }
  .dr-f {
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--mute);
  }
  .dr-f a {
    color: var(--accent);
    font-weight: 600;
  }

  /* ---- filters become a bottom sheet (JS adds .fsheet + the button) ---- */
  .fbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--btn-line);
    border-radius: var(--r-sm);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
  }
  .fbtn .ic {
    width: 18px;
    height: 18px;
  }
  .filters.fsheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 100;
    max-height: 86vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.26s;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.sheet-open .filters.fsheet {
    transform: none;
    visibility: visible;
  }
  .filters.fsheet .fh {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card);
    gap: 12px;
  }
  .filters.fsheet .fh .dr-x {
    margin-left: auto;
  }
  .filters.fsheet .fft {
    position: sticky;
    bottom: 0;
    padding: 12px 22px;
    background: var(--card);
    border-top: 1px solid var(--line);
  }
  .filters.fsheet .fft .btn {
    width: 100%;
    margin: 0;
  }

  /* ---- things you swipe sideways: make it obvious and smooth ---- */
  .tabs,
  .steps,
  .tw {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  /* edge shadows on scrollable tables: show only on the side with more content */
  .tw,
  .box .tw {
    background:
      linear-gradient(to right, var(--card) 30%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--card) 30%, transparent) right center / 28px 100% no-repeat local,
      linear-gradient(to right, rgba(16, 24, 40, 0.14), rgba(16, 24, 40, 0)) left center / 12px 100% no-repeat scroll,
      linear-gradient(to left, rgba(16, 24, 40, 0.14), rgba(16, 24, 40, 0)) right center / 12px 100% no-repeat scroll,
      var(--card);
  }
  .tw th {
    background: var(--head-bg);
  }
  /* tabs + steps: fade on the right while there is more to swipe */
  .tabs:not(.seg),
  .steps {
    scroll-snap-type: x proximity;
    scroll-padding: 0 16px;
  }
  .tabs:not(.seg) > *,
  .steps > span {
    scroll-snap-align: center;
  }
  .tabs.seg {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs.seg::-webkit-scrollbar {
    display: none;
  }
  .tabs.seg > span {
    flex: none;
    white-space: nowrap;
  }

  /* ---- touch targets ---- */
  .pager a {
    min-width: 44px;
    height: 44px;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar .cnt-t {
    flex: 1 1 100%;
    order: 3;
  }
}

/* ---- tables become stacked cards on phones (JS adds .rt + data-label) ---- */
@media (max-width: 700px) {
  .tw,
  .box .tw {
    background: var(--card);
    overflow: visible;
  }
  .tw table.rt {
    min-width: 0;
  }
  table.rt,
  table.rt tbody,
  table.rt tr,
  table.rt td {
    display: block;
    width: 100%;
  }
  table.rt thead,
  table.rt tr.rh {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    padding: 0;
    border: 0;
  }
  table.rt tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.rt tr:last-child {
    border-bottom: 0;
  }
  table.rt td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 7px 0;
    border: 0;
    text-align: right;
    font-size: 14px;
  }
  table.rt td:before {
    content: attr(data-label);
    flex: none;
    max-width: 42%;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mute);
  }
  table.rt td[data-label=""]:before {
    content: none;
  }
  table.rt td:first-child {
    padding-top: 2px;
    font-weight: 700;
  }
  table.rt td[data-label=""] {
    justify-content: flex-end;
  }
  table.rt td[data-label=""]:last-child {
    padding-bottom: 2px;
  }
  table.rt td input,
  table.rt td select {
    max-width: 55%;
  }
  tbody tr:hover td,
  tr:hover > td {
    background: none;
  }
  /* short tables (1-3 cols) just fit */
  .tw table:not(.rt) {
    min-width: 0;
  }
  .tw table:not(.rt) th,
  .tw table:not(.rt) td {
    padding-left: 14px;
    padding-right: 14px;
  }
}
@media (max-width: 520px) {
  .hdr .acts .ib[title="Favourites"] {
    display: none;
  }
}
@media (max-width: 380px) {
  .logo .role {
    display: none;
  }
}

/* header fits on one row on phones; utility bar keeps its message */
@media (max-width: 520px) {
  .logo .role {
    display: none;
  }
  .hdr .in {
    gap: 12px 8px;
  }
  .hdr .acts {
    gap: 0;
  }
  .util .l {
    min-width: 0;
  }
  .util .l > span:nth-child(2) {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 700px) {
  .hero .btn.lg {
    margin: 0 8px 10px 0;
  }
}

/* ==========================================================================
   14 Admin additions (additive only: nothing above is changed)
   ========================================================================== */
.alert.bad { border-left-color: var(--bad); }
.alert.bad .ico { background: var(--bad-tint); color: var(--bad); }
.alert .badge { margin-left: auto; flex: none; }
.alert .badge + .ic.go { margin-left: 0; }
.alert > div { min-width: 0; }
.alert > div span { display: block; }
.sp a.lk, .box a.lk, .note a.lk, .pagehead a.lk, p a.lk { color: var(--accent); font-weight: 600; }
.sp a.lk:hover, .box a.lk:hover, .note a.lk:hover, p a.lk:hover { color: var(--accent-hover); text-decoration: underline; }
.pagehead > div:last-child:not(:first-child) { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pagehead h1 { margin-bottom: 0; }
.box + .box, .tw + .box, .box + .tw { margin-top: 20px; }
.row > .box + .box { margin-top: 0; }
.box label:first-of-type { margin-top: 0; }
.chat .m { max-width: 78%; }
@media (max-width: 1360px) { .sub a { padding-left: 11px; padding-right: 11px; } }
@media (max-width: 700px) {
  .alert .badge { display: none; }
  .pagehead > div:last-child:not(:first-child) { width: 100%; }
  .pagehead > div:last-child:not(:first-child) .btn { flex: 1; justify-content: center; }
}

.alerts.list { grid-template-columns: 1fr; gap: 12px; }
.alerts.list .alert .note { white-space: nowrap; }
@media (min-width: 981px) { .alerts:not(.list) > .alert:last-child:nth-child(3n+2) { grid-column: span 2; } }

.g2 > .box, .g3 > .box, .g4 > .box, .kpis > *, .row > .box { margin-top: 0 !important; }
