:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f4f9;
  --text: #161b26;
  --muted: #687386;
  --line: #e2e7ef;
  --brand: #1268e8;
  --brand-strong: #0b56c9;
  --brand-soft: #eaf2ff;
  --danger: #d9342b;
  --danger-soft: #fff0ef;
  --success: #087d63;
  --success-soft: #e9f8f3;
  --warning: #a55b00;
  --warning-soft: #fff6e8;
  --shadow: 0 12px 36px rgba(25, 38, 64, 0.08);
  --radius: 8px;
  font-family:
    Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

img {
  display: block;
  max-width: 100%;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.boot-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
}

.boot-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.container {
  width: min(1500px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.nav-row {
  min-height: 70px;
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto minmax(180px, 280px)
    auto auto;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 17px;
}

.brand-name {
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 20px;
  flex: 0 0 auto;
  background: var(--line);
}

.brand-tagline {
  min-width: 0;
  max-width: 300px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-size: 16px;
  font-weight: 800;
}

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  color: #2b3443;
  background: transparent;
  font-weight: 650;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: var(--brand);
}

.nav-caret {
  width: 13px;
  height: 13px;
  transition: transform 180ms ease;
}

.nav-item.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 50;
  width: 320px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  display: none;
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
}

.nav-item:hover .nav-dropdown,
.nav-item.is-open .nav-dropdown {
  display: grid;
}

.dropdown-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 7px;
}

.dropdown-link:hover {
  background: var(--surface-soft);
}

.dropdown-icon,
.category-icon,
.card-icon,
.meta-icon {
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 7px;
}

.dropdown-icon {
  width: 34px;
  height: 34px;
}

.dropdown-link strong {
  display: block;
  font-size: 13px;
}

.dropdown-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 3px;
  border: 1.5px solid #e0343f;
  border-radius: 8px;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(224, 52, 63, 0.1);
  white-space: nowrap;
}

.currency-switch-label {
  padding: 0 5px;
  color: #c01e29;
  font-size: 9px;
  font-weight: 800;
}

.currency-switch button {
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: #9f1d25;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.currency-switch button:hover {
  background: #ffe1e3;
}

.currency-switch button.is-active {
  color: #fff;
  background: #df2f3d;
  box-shadow: 0 2px 7px rgba(223, 47, 61, 0.25);
}

.currency-switch button:focus-visible {
  outline: 2px solid #9f1d25;
  outline-offset: 1px;
}

.price-box-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.price-box-currency-switch {
  min-height: 32px;
  box-shadow: none;
}

.price-box-currency-switch button {
  height: 24px;
  padding-inline: 6px;
  font-size: 9px;
}

.price-box-currency-switch .currency-switch-label {
  display: none;
}

.header-search {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.header-search .search-box input {
  height: 40px;
  font-size: 12px;
}

.header-contact-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-weight: 650;
  white-space: nowrap;
}

.btn:hover {
  border-color: #c9d2e0;
  background: #fafbfd;
}

.btn-primary {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.btn-primary:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

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

.btn-danger:hover {
  border-color: #bb251e;
  background: #bb251e;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.btn-icon {
  width: 38px;
  padding: 0;
}

.mobile-menu-btn {
  display: none;
}

.home-main {
  padding-top: 10px;
}

.search-band {
  padding: 24px 0 18px;
}

.search-band.compact {
  padding: 10px 0 12px;
}

.search-band.compact .search-hero {
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 24px;
}

.search-band.compact .eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 700;
}

.search-band.compact .search-hero h1 {
  margin-top: 1px;
  font-size: 20px;
  line-height: 1.2;
}

.search-band.compact .search-box input {
  height: 38px;
  font-size: 12px;
}

.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: end;
  gap: 40px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.search-hero h1 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.search-hero p {
  margin: 12px 0 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 15px 0 42px;
  border: 1px solid #cfd7e4;
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.12);
}

.market-shell {
  position: relative;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-panel {
  position: relative;
  z-index: 12;
  padding: 10px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 10px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 14px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 11px;
}

.category-list {
  display: grid;
  gap: 2px;
}

.category-btn {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.category-btn:hover,
.category-btn.is-active {
  background: var(--brand-soft);
}

.category-btn.is-active {
  color: var(--brand-strong);
  font-weight: 700;
}

.category-icon {
  width: 26px;
  height: 26px;
}

.category-icon svg {
  width: 15px;
  height: 15px;
}

.category-count {
  color: var(--muted);
  font-size: 11px;
}

.brand-mega {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 45;
  width: min(920px, calc(100vw - 310px));
  max-height: 440px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-mega-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.brand-mega-head strong {
  display: block;
  font-size: 17px;
}

.brand-mega-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.brand-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 13px 0;
}

.brand-card {
  min-width: 0;
  min-height: 96px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.brand-card:hover,
.brand-card.is-selected {
  border-color: #9fc0ef;
  background: #f7faff;
}

.brand-card.is-empty {
  opacity: 0.52;
  cursor: default;
}

.brand-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.brand-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-card strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-card small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brand-card em {
  display: block;
  margin-top: 6px;
  color: var(--brand);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.brand-mega-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.market-stage {
  position: relative;
  min-height: 348px;
  overflow: hidden;
  padding: 22px;
  background-color: #f7f9fe;
  background-image:
    linear-gradient(#e5ebf6 1px, transparent 1px),
    linear-gradient(90deg, #e5ebf6 1px, transparent 1px);
  background-size: 34px 34px;
}

.market-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.2) 72%);
  pointer-events: none;
}

.hero-carousel {
  min-height: 348px;
  padding: 0;
  background: #f3f7ff;
}

.hero-carousel::before {
  display: none;
}

.hero-track {
  height: 100%;
  min-height: 348px;
  display: flex;
  transition: transform 520ms cubic-bezier(0.22, 0.8, 0.25, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  min-height: 348px;
  overflow: hidden;
  padding: 30px;
  background-color: #edf4ff;
}

.hero-slide-blue {
  background-color: #eef5ff;
}

.hero-slide-indigo {
  background-color: #f0f1ff;
}

.hero-slide-violet {
  background-color: #f7f1ff;
}

.hero-slide-rose {
  background-color: #fff0f4;
}

.hero-slide-red {
  background-color: #fff0ef;
}

.hero-slide-black {
  background-color: #f1f3f6;
}

.hero-slide-cyan {
  background-color: #ecf9fa;
}

.hero-slide-amber {
  background-color: #fff6e9;
}

.hero-slide-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(7, 17, 34, 0.82) 0%,
    rgba(7, 17, 34, 0.54) 48%,
    rgba(7, 17, 34, 0.08) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 3;
  width: min(58%, 620px);
}

.hero-slide.has-image .hero-slide-content {
  color: #fff;
}

.hero-slide.has-image .eyebrow {
  color: #cde2ff;
}

.hero-slide.has-image p {
  color: rgba(255, 255, 255, 0.82);
}

.hero-slide-content h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-slide-content p {
  margin: 13px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-slide-brand-grid {
  position: absolute;
  top: 50%;
  right: 24px;
  z-index: 2;
  width: 40%;
  display: grid;
  grid-template-columns: repeat(3, 70px);
  justify-content: end;
  gap: 14px;
  transform: translateY(-50%);
}

.hero-brand-tile {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 25px rgba(31, 52, 86, 0.12);
}

.hero-brand-tile:nth-child(1),
.hero-brand-tile:nth-child(4) {
  transform: translateY(18px);
}

.hero-brand-tile:nth-child(2) {
  transform: translateY(-18px);
}

.hero-brand-tile:nth-child(3) {
  transform: translateY(10px);
}

.hero-brand-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 34px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 7px;
  color: #334258;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 18px rgba(20, 36, 61, 0.12);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  color: var(--brand);
  background: #fff;
}

.hero-arrow-prev {
  left: 10px;
}

.hero-arrow-prev svg {
  transform: rotate(90deg);
}

.hero-arrow-next {
  right: 10px;
}

.hero-arrow-next svg {
  transform: rotate(-90deg);
}

.hero-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  z-index: 8;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(38, 66, 108, 0.25);
}

.hero-dot.is-active {
  width: 24px;
  border-radius: 8px;
  background: var(--brand);
}

.hero-slide.has-image .hero-dot {
  background: rgba(255, 255, 255, 0.42);
}

.hero-slide.has-image .hero-dot.is-active {
  background: #fff;
}

.stage-copy {
  position: relative;
  z-index: 1;
  width: min(520px, 75%);
}

.stage-copy h2 {
  margin: 0;
  max-width: 540px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18;
}

.stage-copy p {
  margin: 12px 0 18px;
  color: var(--muted);
}

.brand-cloud {
  position: absolute;
  inset: 12px 12px 12px 45%;
}

.brand-node {
  position: absolute;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  color: #fff;
  background: var(--node-color, var(--brand));
  box-shadow: 0 8px 22px rgba(32, 58, 103, 0.14);
  font-size: 17px;
  font-weight: 800;
}

.brand-node img {
  width: 34px;
  height: 34px;
  padding: 5px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
}

.brand-node:nth-child(5) img {
  width: 48px;
  height: 48px;
  padding: 7px;
  border-radius: 11px;
}

.brand-node:nth-child(1) {
  top: 6%;
  left: 5%;
}

.brand-node:nth-child(2) {
  top: 0;
  left: 36%;
}

.brand-node:nth-child(3) {
  top: 8%;
  right: 3%;
}

.brand-node:nth-child(4) {
  top: 39%;
  left: 0;
}

.brand-node:nth-child(5) {
  top: 31%;
  left: 35%;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  font-size: 22px;
}

.brand-node:nth-child(6) {
  top: 40%;
  right: 6%;
}

.brand-node:nth-child(7) {
  bottom: 5%;
  left: 22%;
}

.brand-node:nth-child(8) {
  right: 26%;
  bottom: 3%;
}

.account-panel {
  padding: 16px;
}

.account-hello {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #7658d8;
  font-weight: 800;
}

.account-hello strong {
  display: block;
  font-size: 17px;
}

.account-hello small {
  color: var(--muted);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 0;
}

.account-stat {
  min-width: 0;
  text-align: center;
}

.account-stat strong {
  display: block;
  font-size: 16px;
}

.account-stat span {
  color: var(--muted);
  font-size: 11px;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.account-action {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}

.account-action:hover {
  border-color: #b9c8df;
  color: var(--brand);
}

.recommend-strip {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 10px;
  overflow: hidden;
}

.recommend-heading {
  padding-inline: 5px;
}

.recommend-heading strong,
.recommend-heading small {
  display: block;
}

.recommend-heading strong {
  font-size: 13px;
}

.recommend-heading small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.recommend-viewport {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.recommend-track {
  width: max-content;
  display: flex;
  gap: 7px;
  animation: recommend-scroll 42s linear infinite;
}

.recommend-strip:hover .recommend-track {
  animation-play-state: paused;
}

.recommend-item {
  width: 168px;
  min-height: 46px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.recommend-item:hover {
  border-color: #a9c8ef;
}

.recommend-item-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: var(--brand);
  background: var(--brand-soft);
}

.recommend-item-icon img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.recommend-item strong,
.recommend-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-item strong {
  font-size: 11px;
}

.recommend-item small {
  color: var(--muted);
  font-size: 9px;
}

@keyframes recommend-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .recommend-track {
    animation: none;
  }

  .recommend-viewport {
    overflow-x: auto;
  }
}

.brand-directory {
  margin-top: 8px;
  padding: 8px 10px;
  overflow: visible;
}

.brand-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-directory-head strong,
.brand-directory-head small {
  display: block;
}

.brand-directory-head strong {
  font-size: 13px;
}

.brand-directory-head small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.brand-directory-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(48px, auto);
  gap: 6px;
  overflow: visible;
  padding: 1px 0;
}

.brand-directory-item {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.brand-directory-item:hover,
.brand-directory-item.is-open,
.brand-directory-item.is-selected {
  color: var(--brand);
  border-color: #a9c8ef;
  background: var(--brand-soft);
}

.brand-directory-icon {
  width: 26px;
  height: 26px;
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
}

.brand-directory-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.brand-directory-item > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subcategory-panel {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #dbe5f2;
  border-radius: 7px;
  background: #f8fafd;
}

.brand-subcategory-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 10px;
}

.brand-subcategory-title span {
  color: var(--muted);
  margin-left: auto;
}

.brand-subcategory-title .btn {
  min-height: 26px;
  padding-inline: 7px;
  font-size: 9px;
}

.brand-subcategory-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.brand-subcategory-list button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #d4dfec;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 9px;
}

.brand-subcategory-list button:hover {
  color: var(--brand);
  border-color: #a9c8ef;
}

.brand-subcategory-list button > span {
  width: 18px;
  height: 18px;
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
}

.brand-subcategory-list img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.brand-subcategory-list small {
  min-width: 16px;
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 8px;
}

.brand-subcategory-empty {
  color: var(--muted);
  font-size: 10px;
}

.product-market-section {
  padding-top: 14px;
  scroll-margin-top: 86px;
}

.product-market-section.has-quick-nav {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.product-market-content {
  min-width: 0;
}

.quick-nav {
  position: sticky;
  top: 82px;
  overflow: hidden;
}

.quick-nav-head {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 9px 8px;
  color: #fff;
  background: var(--brand);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.quick-nav-list {
  display: grid;
  gap: 2px;
  padding: 7px;
  max-height: calc(100vh - 146px);
  overflow-y: auto;
}

.quick-nav-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 5px;
  border: 0;
  border-radius: 6px;
  color: #222937;
  background: transparent;
  text-align: left;
}

.quick-nav-item:hover,
.quick-nav-item.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.quick-nav-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.quick-nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.quick-nav-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  border-radius: 5px;
}

.quick-nav-icon img + em {
  display: none;
}

.quick-nav-icon em {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.section {
  padding-top: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.deal-card {
  min-height: 170px;
  display: grid;
  grid-template-columns: 44% minmax(0, 1fr);
  overflow: hidden;
}

.deal-cover,
.product-cover {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background: #26324b;
}

.deal-cover::after,
.product-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 25%, rgba(255, 255, 255, 0.16), transparent 72%);
}

.cover-mark {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
  font-weight: 850;
  backdrop-filter: blur(4px);
}

.brand-logo-shell {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(20, 34, 60, 0.18);
}

.brand-logo-shell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.deal-cover .brand-logo-shell {
  width: 66px;
  height: 66px;
  padding: 10px;
  border-radius: 16px;
}

.detail-cover .brand-logo-shell {
  width: 120px;
  height: 120px;
  padding: 20px;
  border-radius: 28px;
}

.cover-theme-blue {
  background: #296fd6;
}

.cover-theme-indigo {
  background: #4d56b8;
}

.cover-theme-slate {
  background: #3f5068;
}

.cover-theme-ocean {
  background: #157d99;
}

.cover-theme-purple,
.cover-theme-violet {
  background: #7046a8;
}

.cover-theme-cyan {
  background: #0b839b;
}

.cover-theme-rose {
  background: #ba456b;
}

.cover-theme-black {
  background: #1f2633;
}

.cover-theme-mint {
  background: #18846f;
}

.cover-theme-amber {
  background: #ac6b16;
}

.cover-theme-red {
  background: #c22e2a;
}

.deal-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.tiny-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.discount-seal {
  min-width: 50px;
  min-height: 50px;
  display: inline-grid;
  place-items: center;
  padding: 4px;
  border: 2px solid var(--danger);
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
  transform: rotate(-4deg);
}

.deal-title {
  margin: 10px 0 3px;
  font-size: 18px;
  line-height: 1.25;
}

.deal-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.price-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-top: auto;
  padding-top: 12px;
  font-weight: 800;
}

.price-line strong {
  color: var(--danger);
  font-size: 21px;
}

.price-line del {
  color: #939baa;
  font-size: 11px;
}

.price-unit {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.deal-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.tabs-row {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  padding: 9px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.tab-button.is-active {
  color: var(--brand);
}

.tab-button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--brand);
}

.product-grid {
  --product-columns: 5;
  display: grid;
  grid-template-columns: repeat(var(--product-columns), minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
}

.product-grid-5 {
  --product-columns: 5;
}

.product-grid-8 {
  --product-columns: 8;
  gap: 9px;
}

.product-grid-10 {
  --product-columns: 10;
  gap: 7px;
}

.product-grid-8 .brand-logo-shell {
  width: 62px;
  height: 62px;
  padding: 10px;
  border-radius: 16px;
}

.product-grid-10 .brand-logo-shell {
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 13px;
}

.product-grid-8 .product-body,
.product-grid-10 .product-body {
  padding: 9px;
}

.product-grid-8 .product-title {
  min-height: 0;
  font-size: 12px;
}

.product-grid-10 .product-title {
  min-height: 0;
  font-size: 11px;
}

.product-grid-8 .product-subtitle {
  min-height: 18px;
  font-size: 10px;
}

.product-grid-10 .product-subtitle {
  min-height: 18px;
  font-size: 9px;
}

.product-grid-8 .tag-list,
.product-grid-10 .tag-list {
  gap: 3px;
  margin-top: 7px;
}

.product-grid-8 .tag {
  min-height: 18px;
  padding-inline: 4px;
  font-size: 8px;
}

.product-grid-10 .tag {
  display: none;
}

.product-grid-8 .card-price,
.product-grid-10 .card-price {
  padding-top: 9px;
}

.product-grid-8 .card-price strong {
  font-size: 16px;
}

.product-grid-10 .card-price strong {
  font-size: 15px;
}

.product-grid-8 .card-actions,
.product-grid-10 .card-actions {
  grid-template-columns: 1fr;
  padding: 0 9px 9px;
}

.product-grid-8 .card-actions .btn,
.product-grid-10 .card-actions .btn {
  min-height: 30px;
  padding-inline: 5px;
  font-size: 10px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 31, 54, 0.09);
}

.product-cover {
  aspect-ratio: 1.55;
  border: 0;
  border-radius: 0;
}

.product-cover img,
.deal-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 0;
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding: 22px 0 6px;
}

.load-more-row .btn {
  min-width: 220px;
  justify-content: center;
}

.load-more-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.card-vendor {
  min-width: 0;
  overflow: hidden;
  display: inline-block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-row {
  min-height: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.card-category {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.card-meta-labels {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.product-code {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 1px 5px;
  border: 1px solid #c7d9f8;
  border-radius: 4px;
  overflow: hidden;
  color: #1d4ed8;
  background: #eff6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-content > .product-code {
  margin-top: 7px;
}

.offer-tier {
  flex: none;
  padding: 1px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
}

.offer-tier-economy {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.offer-tier-balanced {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.offer-tier-stable {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.offer-tier-pinned {
  color: #6b21a8;
  border-color: #e9d5ff;
  background: #faf5ff;
}

.offer-tier-custom {
  color: #475467;
  border-color: #e4e7ec;
  background: #f9fafb;
}
.offer-tier-color-red {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
}

.offer-tier-color-black {
  color: #101828;
  border-color: #d0d5dd;
  background: #f2f4f7;
}

.offer-tier-color-orange {
  color: #b54708;
  border-color: #fedf89;
  background: #fffaeb;
}

.offer-tier-color-purple {
  color: #6921a8;
  border-color: #e9d5ff;
  background: #faf5ff;
}

.offer-tier-color-blue {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.offer-tier-color-green {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.offer-tier-color-gray {
  color: #475467;
  border-color: #e4e7ec;
  background: #f9fafb;
}

.offer-admin-label {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.product-title {
  margin: 0;
  min-height: 0;
  font-size: 14px;
  line-height: 1.35;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.product-title-row > a {
  min-width: 0;
}

.product-subtitle {
  margin: 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.tag {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #d8e3f4;
  border-radius: 4px;
  color: #31527f;
  background: #f5f8fd;
  font-size: 9px;
  font-weight: 700;
}

.card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: auto;
  padding-top: 9px;
}

.price-primary-line,
.price-unit-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.price-reference-inline {
  color: #939baa;
  font-size: 10.5px;
  font-weight: 500;
  text-decoration-color: #b7bec9;
  white-space: nowrap;
}

.card-price strong {
  color: var(--danger);
  font-size: 18px;
}

.card-price del {
  color: #939baa;
  font-size: 10px;
}

.price-reference-row {
  min-width: 0;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #e4e8f0;
}

.price-brand-mark {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce3ee;
  border-radius: 4px;
  color: #31527f;
  background: #f7f9fc;
  font-size: 9px;
  font-weight: 800;
}

.price-brand-mark img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.price-reference-row del {
  min-width: 0;
  overflow: hidden;
  color: #8b95a7;
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-reference-row del span {
  color: #9aa3b1;
}

.price-discount-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid #ffb3b8;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #ff5a5f, #d9363e);
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(217, 54, 62, 0.22);
}

.price-reference-pending {
  min-width: 0;
  color: #9aa3b1;
  font-size: 9px;
  line-height: 1.4;
}

.price-reference-row.is-pending .price-brand-mark {
  opacity: 0.72;
}

.price-box-main + .price-reference-row {
  min-height: 30px;
  margin-top: 9px;
  padding-top: 9px;
}

.price-box-main + .price-reference-row del,
.price-box-main + .price-reference-row .price-discount-chip,
.price-box-main + .price-reference-row .price-reference-pending {
  font-size: 11px;
}

.price-box-main + .price-reference-row .price-brand-mark {
  width: 24px;
  height: 24px;
}

.price-box-main + .price-reference-row .price-brand-mark img {
  width: 18px;
  height: 18px;
}

.deal-content > .price-reference-row {
  margin-top: 7px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}

.card-actions .btn {
  min-width: 0;
  padding-inline: 8px;
  font-size: 11px;
}

.announcement {
  margin-top: 26px;
  padding: 12px 15px;
  border: 1px solid #e5dfc8;
  border-radius: 7px;
  color: #725d20;
  background: #fffdf4;
  font-size: 12px;
}

.footer {
  margin-top: 48px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 30px;
}

.footer p,
.footer a {
  color: var(--muted);
  font-size: 12px;
}

.footer h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 24px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.detail-main {
  min-width: 0;
  padding: 24px;
}

.detail-vendor {
  color: var(--muted);
  font-weight: 650;
}

.detail-title {
  margin: 7px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.detail-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.detail-badges .product-code,
.product-id-badge {
  min-height: 23px;
  padding: 0 7px;
  font-size: 10px;
}

.detail-description {
  max-width: 900px;
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.8;
}

.model-id-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.model-id-row code {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 13px;
}

.detail-gallery {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

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

.gallery-grid img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.price-box {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.price-box-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-box h2 {
  margin: 0;
  font-size: 20px;
}

.price-box-sub {
  color: var(--muted);
  font-size: 11px;
}

.price-box-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 22px;
}

.price-box-main .price-reference-inline {
  font-size: 14px;
}

.price-box-main .price-discount-chip {
  font-size: 18px;
  padding: 7px 14px;
  border-radius: 10px;
}

.price-box-main strong {
  font-size: 32px;
}

.price-box-main del {
  color: #929aa8;
}

.pricing-breakdown {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

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

.pricing-breakdown-grid.single {
  grid-template-columns: 1fr;
}

.pricing-breakdown-grid > div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.pricing-breakdown-grid span,
.pricing-period-head span {
  color: var(--muted);
  font-size: 9px;
}

.pricing-breakdown-grid strong,
.pricing-period-head strong {
  font-size: 12px;
}

.pricing-breakdown-grid small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.pricing-period {
  display: grid;
  gap: 7px;
}

.pricing-period + .pricing-period {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.pricing-period-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-meta {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.price-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-box-actions {
  display: grid;
  gap: 8px;
}

.price-box-actions .btn {
  min-height: 44px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-info-cell {
  padding: 12px 15px;
  border-right: 1px solid var(--line);
}

.detail-info-cell:last-child {
  border-right: 0;
}

.detail-info-cell strong {
  display: block;
  font-size: 17px;
}

.detail-info-cell span {
  color: var(--muted);
  font-size: 11px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 19, 32, 0.56);
}

.modal {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(6, 15, 31, 0.28);
}

.modal > form {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  flex: none;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 62px 14px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
}

.modal-footer {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 20px;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 12px rgba(18, 31, 53, 0.14);
  backdrop-filter: blur(10px);
}

.close-btn:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.modal-floating-close {
  position: fixed !important;
  top: auto;
  right: auto;
  z-index: 130;
}

.modal-dirty-badge {
  position: absolute;
  top: 23px;
  right: 57px;
  z-index: 19;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd5e2;
  border-radius: 6px;
  outline: none;
  background: #fff;
}

.field textarea {
  min-height: 105px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.1);
}

.field small {
  color: var(--muted);
  font-size: 10px;
}

.result-box {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #bfe5db;
  border-radius: 7px;
  background: var(--success-soft);
}

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

.copy-row span {
  color: var(--muted);
  font-size: 11px;
}

.copy-row code {
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(8, 125, 99, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.notice.warning {
  color: var(--warning);
  border-color: #f3ddb5;
  background: var(--warning-soft);
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 17px;
}

.toast {
  min-width: 240px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast.success {
  border-color: #bfe5db;
  background: var(--success-soft);
}

.toast.error {
  border-color: #f2c4bf;
  background: var(--danger-soft);
}

#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 8px;
}

.admin-body {
  min-height: 100vh;
  background: #f4f6fa;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
}

.admin-sidebar {
  padding: 18px 12px;
  color: #dce7f7;
  background: #172236;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  font-weight: 800;
}

.admin-nav {
  display: grid;
  gap: 5px;
}

.admin-nav button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #bdcbe0;
  background: transparent;
  text-align: left;
}

.admin-nav button:hover,
.admin-nav button.is-active {
  color: #fff;
  background: #253551;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 18px;
}

.admin-topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-content {
  padding: 22px;
  min-width: 0;
}

.admin-section {
  display: none;
  min-width: 0;
}

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

.admin-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.admin-card + .admin-card {
  margin-top: 14px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-card-head h2 {
  margin: 0;
  font-size: 16px;
}

.upstream-intro .notice {
  margin-bottom: 14px;
}

.upstream-intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.upstream-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.upstream-steps span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 4px;
  border: 1px solid #dce4ef;
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 9px;
  font-weight: 700;
}

.upstream-steps b {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #64748b;
  background: #e8edf4;
  font-size: 9px;
}

.upstream-steps span.is-active {
  color: var(--brand);
  border-color: #b8d2f3;
  background: var(--brand-soft);
}

.upstream-steps span.is-active b {
  color: #fff;
  background: var(--brand);
}

.upstream-steps span.is-complete {
  color: var(--success);
  border-color: #c8e5d7;
  background: var(--success-soft);
}

.upstream-steps span.is-complete b {
  color: #fff;
  background: var(--success);
}

.upstream-collapsed-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px dashed #c8d6e8;
  border-radius: 7px;
  color: var(--muted);
  background: #f8fafc;
}

.upstream-collapsed-note > span {
  width: 34px;
  height: 34px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-soft);
}

.upstream-collapsed-note strong,
.upstream-collapsed-note small {
  display: block;
}

.upstream-collapsed-note strong {
  color: var(--text);
  font-size: 12px;
}

.upstream-collapsed-note small {
  margin-top: 2px;
  font-size: 10px;
}

.price-monitor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.monitor-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.monitor-toggle input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.monitor-toggle strong,
.monitor-toggle small {
  display: block;
}

.monitor-toggle strong {
  font-size: 11px;
}

.monitor-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.monitor-interval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.monitor-interval > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.monitor-interval input {
  width: 76px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid #ccd7e6;
  border-radius: 5px;
  font-size: 11px;
}

.price-monitor-actions,
.price-monitor-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-monitor-status {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.price-monitor-status span {
  padding: 3px 7px;
  border-radius: 5px;
  background: #f1f5fa;
}

.price-monitor-status .monitor-error {
  width: 100%;
  color: #a33c47;
  font-size: 10px;
}

#upstream-model-selection {
  scroll-margin-top: 18px;
}

.upstream-form {
  display: grid;
  gap: 16px;
}

.upstream-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.upstream-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.upstream-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 40px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #ccd5e2;
  border-radius: 6px;
  background: #fff;
}

.upstream-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.upstream-checks input,
.upstream-model input {
  accent-color: var(--brand);
}

.field .upstream-checks input[type="checkbox"],
.field .upstream-model input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: none;
  padding: 0;
}

.upstream-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}

.upstream-toolbar .search-box {
  max-width: none;
  margin: 0;
}

.upstream-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.upstream-model {
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.upstream-model:hover {
  border-color: #b9cbe5;
  background: #fbfdff;
}

.upstream-model:has(input:checked) {
  border-color: #8eb7ef;
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.upstream-model.is-imported,
.upstream-model.is-imported:hover,
.upstream-model.is-imported:has(input:checked) {
  border-color: var(--line);
  background: #f6f7f9;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
}

.upstream-model.is-imported input {
  cursor: not-allowed;
}

.upstream-model-tags em.is-imported-tag {
  color: #5b6472;
  background: #e5e8ee;
}

.upstream-model-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--brand);
  background: #fff;
}

.upstream-model-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.upstream-model-main {
  min-width: 0;
}

.upstream-model-main strong,
.upstream-model-main code,
.upstream-model-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upstream-model-main code {
  margin: 1px 0;
  color: var(--muted);
  font-size: 10px;
}

.upstream-model-main small {
  color: var(--muted);
  font-size: 10px;
}

.upstream-model-tags {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.upstream-model-tags em {
  padding: 2px 6px;
  border-radius: 4px;
  color: #315578;
  background: #edf4fc;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.upstream-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin-top: 12px;
}

.upstream-result-list span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.upstream-result-list svg {
  flex: none;
  color: var(--success);
}

.upstream-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.upstream-connection-row {
  grid-template-columns:
    44px minmax(130px, 1.1fr) minmax(190px, 1.5fr)
    minmax(90px, 0.7fr) 90px 72px minmax(120px, 0.8fr) auto;
}

.supplier-balance-cell strong,
.supplier-balance-cell small {
  display: block;
}

.supplier-balance-cell strong {
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.supplier-balance-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.supplier-balance-cell.is-low strong,
.supplier-balance-cell.is-muted strong {
  color: var(--danger);
}

.supplier-balance-cell.is-loading strong,
.supplier-balance-cell.is-muted strong {
  color: var(--muted);
}

.supplier-delete-btn {
  color: var(--danger);
}

.supplier-delete-btn:hover {
  color: #a9241e;
  background: var(--danger-soft);
}

.supplier-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.supplier-products-head strong,
.supplier-products-head small {
  display: block;
}

.supplier-products-head small {
  color: var(--muted);
  font-size: 9px;
}

.supplier-test-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.supplier-test-summary {
  max-width: 270px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-test-summary.success {
  color: var(--success);
}

.supplier-test-summary.has-error {
  color: #a33c47;
}

.supplier-test-summary.is-testing {
  color: #315a9f;
}

.supplier-product-list {
  display: grid;
  gap: 7px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 4px;
}

.supplier-product-row {
  display: grid;
  grid-template-columns:
    64px minmax(0, 1.4fr) minmax(90px, 0.8fr) 84px
    minmax(260px, auto);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.supplier-product-row strong,
.supplier-product-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-product-row small {
  color: var(--muted);
  font-size: 9px;
}

.supplier-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.supplier-product-actions .btn {
  flex: none;
}

.supplier-test-state {
  width: 108px;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.supplier-test-state strong,
.supplier-test-state small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-test-state strong {
  font-size: 10px;
}

.supplier-test-state.success strong {
  color: var(--success);
}

.supplier-test-state.error strong {
  color: #a33c47;
}

.supplier-test-state.is-testing small {
  color: #315a9f;
}

.admin-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.admin-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.5fr) minmax(120px, 1fr) 110px auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
}

.admin-row.product-row {
  grid-template-columns:
    28px 64px minmax(190px, 1.5fr) minmax(300px, 1.45fr)
    minmax(104px, 0.55fr) auto;
}

.hero-admin-row {
  grid-template-columns: 64px minmax(180px, 1.25fr) minmax(180px, 1fr) 90px auto;
}

.quick-nav-admin-list {
  margin-top: 14px;
}

.quick-nav-admin-row {
  grid-template-columns: 44px minmax(160px, 1.3fr) 110px 80px auto;
}

.product-list-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  min-width: 0;
}

.product-list-toolbar .search-box {
  width: 100%;
  max-width: none;
}

.product-filter-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.product-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-filter-heading strong,
.product-filter-heading small {
  display: block;
}

.product-filter-heading strong {
  font-size: 13px;
}

.product-filter-heading small,
.product-filter-result {
  color: var(--muted);
  font-size: 10px;
}

.product-filter-result {
  white-space: nowrap;
}

.product-filter-result b {
  color: var(--brand);
  font-size: 13px;
}

.product-filter-fields {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(120px, 1fr))
    auto;
  gap: 8px;
  align-items: end;
}

.product-filter-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-filter-fields select {
  width: 100%;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid #ccd7e6;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
}

.product-filter-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-filter-actions .btn {
  min-height: 34px;
  white-space: nowrap;
}

.product-filter-active {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px solid #e5eaf2;
}

.product-filter-active span {
  padding: 3px 7px;
  border-radius: 5px;
  color: #49617f;
  background: #edf3fb;
  font-size: 9px;
  font-weight: 700;
}

.product-status-filters {
  display: flex;
  gap: 5px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.product-status-filters button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 4px 9px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-status-filters button:hover {
  color: var(--text);
  background: #fff;
}

.product-status-filters button.is-active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 1px 4px rgba(25, 38, 64, 0.1);
}

.product-status-filters button span {
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #edf1f7;
  font-size: 9px;
  text-align: center;
}

.product-list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.product-list-summary button {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.product-selection-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-pagination-info,
.product-page-size {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.product-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-page-size select {
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
}

.product-pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.product-pagination-pages button {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.product-pagination-pages button:hover:not(:disabled) {
  color: var(--brand);
  border-color: #a9c8ef;
}

.product-pagination-pages button.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.product-pagination-pages button:disabled {
  cursor: default;
  opacity: 0.4;
}

.product-pagination-pages button svg {
  width: 14px;
  height: 14px;
}

.product-pagination-pages .prev-page svg {
  transform: rotate(90deg);
}

.product-pagination-pages .next-page svg {
  transform: rotate(-90deg);
}

.product-pagination-pages span {
  padding: 0 3px;
  color: var(--muted);
}

.product-bulk-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #bad1ee;
  border-radius: 7px;
  background: #f4f8ff;
}

.product-bulk-title,
.product-bulk-pricing {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-bulk-title {
  justify-content: space-between;
}

.product-bulk-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-bulk-title button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.product-bulk-title .btn-danger {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #b52d25;
  border-radius: 5px;
  color: #fff;
  background: var(--danger);
  font-size: 10px;
  font-weight: 700;
}

.product-bulk-title .btn-danger:hover {
  background: #bd2a23;
}

.product-bulk-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.product-bulk-actions label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-bulk-actions label > span {
  grid-column: 1 / -1;
  grid-row: 1;
}

.product-bulk-actions label > select {
  grid-column: 1;
  grid-row: 2;
}

.product-bulk-actions label > button {
  grid-column: 2;
  grid-row: 2;
}

.product-bulk-actions select,
.product-bulk-pricing select {
  width: 100%;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid #c4d3e6;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
}

.product-bulk-actions button {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #bdd0e8;
  border-radius: 5px;
  color: var(--brand);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.product-bulk-pricing {
  padding-top: 9px;
  border-top: 1px solid #d8e4f2;
}

.product-bulk-pricing > label:not(.bulk-sync-toggle) {
  display: grid;
  grid-template-columns: auto minmax(220px, 340px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.bulk-sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.bulk-sync-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.product-select-box {
  display: grid;
  place-items: center;
}

.product-select-box input,
.product-attribution select,
.product-price-line input {
  accent-color: var(--brand);
}

.product-select-box input {
  width: 15px;
  height: 15px;
}

.product-attribution {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.product-attribution label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-attribution b {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.product-attribution select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 3px 5px;
  overflow: hidden;
  border: 1px solid #d8e0eb;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.product-price-line {
  display: flex;
  align-items: center;
  gap: 5px 9px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.product-price-line span {
  white-space: nowrap;
}

.product-price-line b {
  display: inline;
  color: var(--brand);
  font-size: 10px;
}

.product-price-line em {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--warning);
  background: var(--warning-soft);
  font-style: normal;
  font-weight: 700;
}

.product-manual-price-editor {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 6px;
  border: 1px dashed #d6deea;
  border-radius: 6px;
  background: #f8fafc;
}

.product-manual-price-editor label {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.3;
}

.product-manual-price-editor label.is-discount {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 3px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  line-height: 14px;
}

.product-manual-price-editor label.is-discount > span {
  color: #b42318;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 14px;
}

.product-manual-price-editor.is-compact {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 2px;
}

.product-manual-price-editor.is-compact input[type="text"] {
  width: 28px;
  min-height: 14px;
  height: 14px;
  padding: 0 1px;
  border: 1px solid #fecdca;
  border-radius: 2px;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  color: #b42318;
}

.product-manual-price-editor.is-compact input[type="text"]:focus {
  outline: 1px solid #f04438;
  border-radius: 2px;
  background: #fff;
}

.product-manual-price-editor input.is-saved {
  background: #ecfdf3 !important;
  box-shadow: 0 0 0 1px #12b76a;
}

.product-manual-price-editor .discount-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid #fda29b;
  border-radius: 3px;
  background: #fff;
  color: #b42318;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.product-manual-price-editor .discount-save-btn:hover {
  border-color: #d92d20;
  background: #fef3f2;
}

.product-manual-price-editor label.is-official {
  width: 92px;
}

.product-manual-price-editor label.is-note {
  flex: 1 1 190px;
}

.product-manual-price-editor input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 27px;
  padding: 3px 6px;
  border: 1px solid #d8e0eb;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 10px;
}

.product-manual-price-editor .is-visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 27px;
  padding: 0 2px;
  color: #475467;
  white-space: nowrap;
}

.product-manual-price-editor .is-visible input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
}

.official-price-reference {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  color: #667085;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.official-price-reference:hover {
  color: #344054;
  text-decoration: underline;
}

.official-price-reference del {
  color: #7c8798;
  text-decoration-color: #d92d20;
  text-decoration-thickness: 1px;
}

.official-discount-chip {
  flex: none;
  padding: 1px 5px;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
}

.official-price-reference.is-muted {
  color: #c2413a;
  font-weight: 650;
}

.product-status-reason {
  max-width: 100%;
  overflow: hidden;
  color: #b42318;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-config-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid #c6d8ee;
  border-radius: 4px;
  color: var(--brand);
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}

.product-sort-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.product-sort-field input {
  width: 54px;
  height: 22px;
  padding: 2px 4px;
  border: 1px solid #cad5e3;
  border-radius: 4px;
  color: var(--text);
  background: #fff;
  font-size: 10px;
  text-align: center;
}

.product-sort-field input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(37, 99, 235, 0.12);
}

.pricing-empty {
  color: var(--warning);
  font-weight: 700;
}

.pricing-mode-section[hidden] {
  display: none;
}

.pricing-mode-section {
  margin-top: 16px;
}

.pricing-period-editor {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.pricing-period-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pricing-period-editor-head strong {
  font-size: 13px;
}

.pricing-period-editor-head span {
  color: var(--muted);
  font-size: 10px;
}

.product-status-select {
  width: 104px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.product-status-select.status-active {
  color: var(--success);
  border-color: #bce4d8;
  background: var(--success-soft);
}

.product-status-select.status-draft {
  color: var(--warning);
  border-color: #f3ddb5;
  background: var(--warning-soft);
}

.product-status-select.status-backup {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.product-status-select.status-offline {
  color: #8b3540;
  border-color: #efcbd0;
  background: #fff3f4;
}

.product-status-select.status-maintenance {
  color: #9a3412;
  border-color: #fdba74;
  background: #fff7ed;
}

.pricing-template-row {
  grid-template-columns: 44px minmax(180px, 1.4fr) minmax(150px, 0.9fr) 90px 90px auto;
}

.template-applied {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.template-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-example-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.template-example-grid span {
  color: var(--muted);
  font-size: 10px;
}

.template-example-grid strong {
  color: var(--brand);
  font-size: 17px;
}

.membership-level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.membership-level-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(145deg, #fff, #f7faff);
}

.membership-level-head {
  display: grid;
  gap: 3px;
}

.membership-level-card strong {
  display: block;
  font-size: 15px;
}

.membership-level-card small {
  color: var(--muted);
  font-size: 9px;
}

.membership-level-card label {
  display: grid;
  grid-template-columns: auto 66px auto;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.membership-level-card input {
  width: 100%;
  height: 32px;
  padding: 4px 6px;
  border: 1px solid #cbd6e4;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.membership-level-card textarea {
  width: 100%;
  min-height: 68px;
  padding: 8px;
  border: 1px solid #cbd6e4;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 11px;
  line-height: 1.55;
  resize: vertical;
}

.membership-level-card label.span-2 {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.membership-level-card .membership-purchase-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.membership-level-card .membership-purchase-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.membership-notice-field {
  margin-top: 14px;
}

.membership-notice-field textarea {
  width: 100%;
  min-height: 64px;
  padding: 9px;
  border: 1px solid #cbd6e4;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.admin-card-subfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-card-subfoot > span {
  color: var(--muted);
  font-size: 10px;
}

.invite-reward-list {
  margin-top: 12px;
}

.user-search-form {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-admin-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-status-filter {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #cbd6e4;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
  font-weight: 650;
}

.user-search-form .search-box {
  min-width: 260px;
  margin: 0;
}

.user-admin-row {
  grid-template-columns:
    30px minmax(140px, 1.2fr) minmax(100px, 0.8fr)
    minmax(92px, 0.65fr) minmax(92px, 0.65fr) 112px auto;
  min-height: 52px;
  gap: 7px;
  padding: 6px 8px;
}

.user-admin-list {
  gap: 5px;
}

.user-admin-row > .admin-thumb {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-size: 11px;
}

.user-admin-row strong {
  font-size: 11px;
  line-height: 1.25;
}

.user-admin-row small {
  margin-top: 1px;
  font-size: 8.5px;
  line-height: 1.3;
}

.user-admin-row select {
  width: 100%;
  min-height: 28px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.user-more-actions {
  width: 106px !important;
  min-width: 106px;
  min-height: 28px !important;
  color: #46556b !important;
  background: #f8fafc !important;
  font-weight: 600 !important;
}

.user-meta-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.user-row-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.user-admin-row .status-chip {
  min-height: 16px;
  padding: 1px 4px;
  font-size: 8px;
}

.user-row-state em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.user-ip-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
}

.user-ip-line code {
  padding: 1px 4px;
  border-radius: 4px;
  color: #27476f;
  background: #eef3f9;
  font-size: 8px;
}

.user-ip-line small {
  color: var(--muted);
  font-size: 8px;
}

.user-admin-row > .row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-admin-row > .row-actions .btn {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 9px;
}

.voucher-red,
.voucher-code-item code {
  color: #c81e2b !important;
}

.voucher-overview-card {
  border-color: #f3c3c7;
}

.voucher-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.voucher-stat-grid > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.voucher-stat-grid span,
.voucher-stat-grid small {
  color: var(--muted);
  font-size: 9px;
}

.voucher-stat-grid strong {
  color: var(--text);
  font-size: 21px;
}

.voucher-generate-card {
  border-color: #efb5ba;
}

.voucher-generate-grid {
  grid-template-columns: minmax(160px, 0.5fr) minmax(160px, 0.5fr) minmax(0, 2fr);
}

.voucher-generate-grid .span-2 {
  grid-column: auto;
}

.voucher-generate-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.voucher-generate-action .voucher-red {
  font-size: 10px;
  font-weight: 800;
}

.voucher-generated-result {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #f0b4ba;
  border-radius: 7px;
  background: #fff6f7;
}

.voucher-generated-head,
.voucher-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voucher-generated-head div,
.voucher-batch-head div {
  display: grid;
  gap: 3px;
}

.voucher-generated-head small,
.voucher-batch-head small {
  color: var(--muted);
  font-size: 9px;
}

.voucher-code-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.voucher-code-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 6px 7px;
  border: 1px solid #f0c5c9;
  border-radius: 5px;
  background: #fff;
}

.voucher-code-item code {
  min-width: 0;
  overflow: hidden;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voucher-code-item.is-used {
  border-color: var(--line);
  opacity: 0.62;
}

.voucher-code-item.is-used code {
  color: var(--muted) !important;
  text-decoration: line-through;
}

.voucher-code-item > span {
  color: var(--muted);
  font-size: 8px;
}

.voucher-code-item .btn {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 8px;
}

.voucher-code-export {
  display: none;
}

.voucher-batch-list {
  display: grid;
  gap: 10px;
}

.voucher-batch-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.voucher-amount-tabs {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 6px;
}

.voucher-amount-tab {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.voucher-amount-tab:hover {
  border-color: #e6a1a8;
  background: #fffafb;
}

.voucher-amount-tab.is-active {
  border-color: #cf2532;
  background: #fff2f3;
  box-shadow: inset 0 0 0 1px #cf2532;
}

.voucher-amount-tab strong {
  color: #c81e2b;
  font-size: 15px;
}

.voucher-amount-tab small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voucher-code-limit {
  display: grid;
  flex: 0 0 138px;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.voucher-code-limit select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.voucher-batch {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.voucher-preview-note {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 5px;
  background: #fff5f6;
  color: #9e2832;
  font-size: 9px;
  line-height: 1.55;
}

.voucher-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed #e5b5b9;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
}

.voucher-code-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.voucher-code-grid.compact .voucher-code-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

@media (max-width: 760px) {
  .voucher-batch-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .voucher-amount-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voucher-code-limit {
    flex-basis: auto;
  }
}

.voucher-redemption-row {
  grid-template-columns: 34px minmax(130px, 1fr) minmax(220px, 1.4fr) 150px;
  min-height: 46px;
  padding: 6px 8px;
}

.voucher-redemption-row code {
  color: #b4232d;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
}

.contact-admin-icon-preview {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 9px;
}

.contact-admin-icon-preview img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.announcement-editor-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.announcement-editor-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.announcement-editor-row textarea {
  min-height: 110px;
  resize: vertical;
}

.announcement-remove-field .btn {
  width: 100%;
  justify-content: flex-start;
  color: #b4232d;
}

.ip-ban-row {
  grid-template-columns: 44px minmax(170px, 1.2fr) minmax(180px, 1fr) 110px auto;
}

.ip-ban-list .empty-state {
  min-height: 76px;
  padding: 14px;
}

.admin-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.admin-thumb.product {
  width: 64px;
  height: 44px;
}

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

.admin-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row small.product-code {
  margin-top: 2px;
  padding: 1px 5px;
}

.product-id-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.admin-row .product-id-group small.product-code {
  margin-top: 0;
}

.row-actions {
  display: flex;
  gap: 5px;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 700;
}

.status-chip.draft {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-chip.backup {
  color: #1d4ed8;
  background: #eff6ff;
}

.status-chip.offline {
  color: #8b3540;
  background: #fff3f4;
}

.status-chip.maintenance {
  color: #9a3412;
  background: #fff7ed;
}

.btn-pin-active {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.offer-tier-select {
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.offer-tier-select.is-manual {
  color: #6b21a8;
  border-color: #e9d5ff;
  background: #faf5ff;
}

.offer-tier-editor {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.offer-tier-clear {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: #fff;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.offer-tier-clear:hover {
  color: #b42318;
  border-color: #fda29b;
  background: #fef3f2;
}

.offer-tier-input {
  width: 74px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.offer-tier-input.is-manual {
  color: #6b21a8;
  border-color: #e9d5ff;
  background: #faf5ff;
}

.offer-tier-color {
  width: 46px;
  min-height: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.editor-modal {
  width: min(920px, 100%);
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.editor-grid .span-2 {
  grid-column: span 2;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.preview-cover {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.site-logo-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.site-logo-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #edf1f7 25%, transparent 25%),
    linear-gradient(-45deg, #edf1f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf1f7 75%),
    linear-gradient(-45deg, transparent 75%, #edf1f7 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.site-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-logo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-avatar,
.account-hero-avatar {
  overflow: hidden;
}

.account-avatar img,
.account-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.login-gate {
  max-width: 480px;
  margin: 12vh auto;
  padding: 28px;
  text-align: center;
}

.login-gate h1 {
  margin: 0;
  font-size: 25px;
}

.login-gate p {
  color: var(--muted);
}

.docs-page,
.account-page {
  padding: 28px 0 54px;
}

.docs-titlebar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 2px 24px;
}

.docs-titlebar .breadcrumb {
  margin-bottom: 8px;
}

.docs-titlebar h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.docs-titlebar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.docs-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.docs-sidebar {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 10px;
}

.docs-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.docs-sidebar-head strong {
  font-size: 14px;
}

.docs-sidebar-head span,
.docs-side-label {
  color: var(--muted);
  font-size: 11px;
}

.docs-nav-toggle {
  display: none;
}

.docs-side-content {
  display: grid;
}

.docs-side-group {
  display: grid;
  gap: 2px;
  padding-top: 12px;
}

.docs-side-label {
  padding: 0 9px 4px;
  font-weight: 700;
}

.docs-side-group a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 6px;
  color: #303947;
  font-size: 12px;
}

.docs-side-group a:hover,
.docs-side-group a.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 700;
}

.docs-article {
  min-width: 0;
  padding: 38px clamp(24px, 5vw, 64px);
}

.docs-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-article > h2 {
  margin: 9px 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.docs-intro {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.docs-section {
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.docs-section h3 {
  margin: 0 0 14px;
  font-size: 21px;
}

.docs-section > p,
.doc-paragraph {
  margin: 0 0 14px;
  color: #4e5969;
  line-height: 1.75;
}

.doc-callout {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid #cbd9ec;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: #f5f9ff;
}

.doc-callout.warning {
  border-color: #f0d7ad;
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.doc-callout strong {
  font-size: 13px;
}

.doc-callout span {
  color: #586477;
  font-size: 12px;
  line-height: 1.7;
}

.doc-steps {
  display: grid;
  gap: 10px;
}

.doc-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.doc-step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.doc-step strong,
.doc-step small {
  display: block;
}

.doc-step small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.doc-fields {
  display: grid;
  gap: 8px;
}

.doc-field {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.doc-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.doc-field code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #14294d;
  font-size: 12px;
}

.doc-field small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}

.doc-code-list {
  display: grid;
  gap: 10px;
}

.doc-code-card {
  overflow: hidden;
  border: 1px solid #26354b;
  border-radius: 7px;
  background: #111a28;
}

.doc-code-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 14px;
  color: #dce7f6;
  background: #1b2839;
}

.doc-code-head strong {
  font-size: 12px;
}

.doc-code-head .btn-ghost {
  color: #dce7f6;
  border-color: #3d5068;
  background: transparent;
}

.doc-code-card pre {
  max-width: 100%;
  padding: 16px;
  margin: 0;
  overflow: auto;
  color: #d8e5f7;
  font-size: 12px;
  line-height: 1.75;
  tab-size: 2;
}

.doc-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.doc-tool-card {
  min-height: 134px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.doc-tool-card:hover {
  border-color: #aec4e4;
  box-shadow: 0 8px 24px rgba(26, 51, 88, 0.08);
}

.doc-tool-card > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-soft);
}

.doc-tool-card strong {
  font-size: 13px;
}

.doc-tool-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.doc-list {
  padding: 16px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: #f7f9fc;
}

.doc-list > strong {
  display: block;
  margin-bottom: 8px;
}

.doc-list ul {
  display: grid;
  gap: 7px;
  padding-left: 20px;
  margin: 0;
  color: #4e5969;
  line-height: 1.7;
}

.doc-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.doc-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
}

.doc-table th,
.doc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.doc-table th {
  color: #43506a;
  background: #f5f7fb;
  font-weight: 750;
}

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

.doc-inline-links {
  display: grid;
  gap: 8px;
}

.doc-inline-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.doc-inline-links a:hover {
  border-color: #afc4e1;
  color: var(--brand);
}

.doc-inline-links strong,
.doc-inline-links span {
  grid-column: 1;
}

.doc-inline-links span {
  color: var(--muted);
  font-size: 11px;
}

.doc-inline-links svg {
  grid-column: 2;
  grid-row: 1 / 3;
}

.docs-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 28px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.docs-pagination a {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.docs-pagination a:last-child {
  text-align: right;
}

.docs-pagination a:hover {
  border-color: #aec4e4;
  color: var(--brand);
}

.docs-pagination span {
  color: var(--muted);
  font-size: 10px;
}

.docs-pagination strong {
  font-size: 12px;
}

.login-gate-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.login-gate .btn {
  margin-top: 8px;
}

.account-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 30px;
  overflow: hidden;
  padding: 24px 28px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(110deg, #0879ed 0%, #159cf5 70%, #4fc4ff 100%);
  box-shadow: 0 12px 32px rgba(8, 103, 202, 0.18);
}

.account-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -130px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.account-hero-user {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.account-hero-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 30px;
  font-weight: 800;
}

.account-hero-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-hero-name h1 {
  margin: 0;
  font-size: 24px;
}

.account-hero-name span {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  font-size: 10px;
}

.account-hero p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.account-security-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 11px;
}

.account-security-track {
  width: min(260px, 30vw);
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}

.account-security-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.account-hero-bindings {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 2px;
  font-size: 12px;
}

.account-hero-bindings span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-hero-bindings i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.account-hero-bindings i.is-good {
  background: #b9ffd7;
  box-shadow: 0 0 0 3px rgba(185, 255, 215, 0.15);
}

.account-security-button {
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.13);
}

.account-security-button:hover {
  color: var(--brand);
  background: #fff;
}

.account-notice {
  margin-top: 12px;
}

.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.account-stat-card {
  position: relative;
  min-height: 126px;
  display: grid;
  align-content: start;
  padding: 18px;
}

.account-stat-card > span {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-soft);
}

.account-stat-card small {
  color: var(--muted);
  font-size: 12px;
}

.account-stat-card > strong {
  margin-top: 7px;
  font-size: 25px;
  line-height: 1.2;
}

.account-stat-card a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: end;
  margin-top: 14px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 650;
}

.account-stat-actions {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.account-stat-actions a,
.account-stat-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.account-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  margin-top: 14px;
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
}

.membership-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.membership-modal {
  width: min(900px, 100%);
}

.membership-plan-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(150deg, #fff 0%, #f5f8ff 100%);
}

.membership-plan-card.is-current {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

.membership-plan-badge {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 9px;
  font-weight: 750;
}

.membership-plan-card h3 {
  margin: 0;
  font-size: 19px;
}

.membership-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #172033;
}

.membership-plan-price strong {
  font-size: 28px;
  letter-spacing: 0;
}

.membership-plan-price span {
  color: var(--muted);
  font-size: 11px;
}

.membership-plan-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.membership-plan-discount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 9px;
  border-radius: 6px;
  color: #344054;
  background: #eef3ff;
  font-size: 10px;
}

.membership-plan-discount strong {
  color: var(--brand);
}

.membership-plan-card .btn {
  width: 100%;
  margin-top: auto;
}

.membership-balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #344054;
  background: var(--surface-soft);
  font-size: 11px;
}

.membership-refund-notice {
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #991b1b;
  background: #fff7f7;
  font-size: 11px;
  line-height: 1.65;
}

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

.invite-link-row code {
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  background: #f7f9fc;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invite-summary-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.invite-summary-grid small {
  color: var(--muted);
  font-size: 9px;
}

.invite-summary-grid strong {
  font-size: 18px;
}

.invite-reward-history {
  display: grid;
  gap: 6px;
}

.invite-reward-history > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.account-layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}

.account-nav {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.account-nav > strong {
  padding: 8px 10px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.account-nav a,
.account-nav button {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  color: #384454;
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.account-nav a:hover,
.account-nav a.is-active,
.account-nav button:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 700;
}

.account-content {
  display: grid;
  gap: 14px;
}

.account-panel-block {
  padding: 18px;
}

.account-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-block-head h2 {
  margin: 0;
  font-size: 17px;
}

.account-block-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.account-key-list {
  display: grid;
  gap: 0;
}

.account-key-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 120px 105px;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.account-key-row:last-child {
  border-bottom: 0;
}

.account-key-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-soft);
}

.account-key-main,
.account-key-quota {
  min-width: 0;
}

.account-key-main strong,
.account-key-main small,
.account-key-quota strong,
.account-key-quota small {
  display: block;
}

.account-key-main strong,
.account-key-quota strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.account-key-main small,
.account-key-quota small {
  color: var(--muted);
  font-size: 10px;
}

.account-key-quota {
  text-align: right;
}

.account-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

.account-status.is-good {
  color: var(--success);
  background: var(--success-soft);
}

.account-status.is-off {
  color: var(--muted);
  background: var(--surface-soft);
}

.account-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.account-security-item {
  min-height: 100px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.account-security-item > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
}

.account-security-item.is-good > span {
  color: var(--success);
  background: var(--success-soft);
}

.account-security-item strong {
  font-size: 12px;
}

.account-security-item small {
  color: var(--muted);
  font-size: 10px;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  padding-top: 16px;
}

.account-profile-grid div {
  min-width: 0;
}

.account-profile-grid span,
.account-profile-grid strong {
  display: block;
}

.account-profile-grid span {
  color: var(--muted);
  font-size: 10px;
}

.account-profile-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .nav-row {
    grid-template-columns:
      auto minmax(0, 1fr) auto minmax(150px, 210px)
      auto auto;
    gap: 12px;
  }

  .brand-divider,
  .brand-tagline {
    display: none;
  }

  .nav-link {
    padding-inline: 11px;
  }

  .market-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .account-panel {
    grid-column: 1 / -1;
  }

  .account-panel {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.4fr) minmax(260px, 1fr);
    gap: 16px;
    align-items: center;
  }

  .account-hello,
  .account-stats {
    border: 0;
    padding: 0;
  }

  .product-grid-5 {
    --product-columns: 4;
  }

  .product-grid-8 {
    --product-columns: 6;
  }

  .product-grid-10 {
    --product-columns: 8;
  }

  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 24px, 1500px);
  }

  .nav-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-rows: 62px 40px;
    gap: 0 10px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-bottom: 8px;
  }

  .header-actions {
    grid-column: 4;
    grid-row: 1;
  }

  .header-contact-slot {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
  }

  .header-currency-switch {
    grid-column: 3;
    grid-row: 1;
  }

  .primary-nav {
    position: fixed;
    top: 110px;
    right: 12px;
    left: 12px;
    z-index: 70;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .nav-item,
  .nav-link {
    width: 100%;
  }

  .nav-link {
    justify-content: space-between;
  }

  .nav-dropdown {
    position: static;
    width: 100%;
    padding: 4px 0 4px 14px;
    border: 0;
    box-shadow: none;
    transform: none;
  }

  .nav-item:hover .nav-dropdown:not(.is-open) {
    display: none;
  }

  .nav-item.is-open .nav-dropdown {
    display: grid;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .header-actions .btn:not(.mobile-menu-btn) {
    display: none;
  }

  .search-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .search-band.compact .search-hero {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .market-shell {
    grid-template-columns: 1fr;
  }

  .category-panel {
    overflow-x: auto;
  }

  .category-list {
    display: flex;
    min-width: max-content;
  }

  .category-btn {
    width: auto;
    min-width: max-content;
    grid-template-columns: 24px auto auto;
  }

  .brand-mega {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 10px;
    box-shadow: none;
  }

  .brand-mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-stage {
    min-height: 320px;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 370px;
  }

  .hero-slide-content {
    width: 72%;
  }

  .hero-slide-brand-grid {
    right: 8px;
    width: 38%;
    grid-template-columns: repeat(2, 60px);
    gap: 10px;
    opacity: 0.72;
  }

  .hero-brand-tile {
    width: 60px;
    height: 60px;
  }

  .brand-cloud {
    opacity: 0.34;
    left: 28%;
  }

  .stage-copy {
    width: 100%;
  }

  .account-panel {
    display: block;
  }

  .account-hello {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }

  .account-stats {
    padding: 12px 0;
  }

  .deal-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    --product-columns: 3;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .price-box {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 8px 12px;
    min-width: 0;
    max-width: 100vw;
    overflow-x: auto;
  }

  .admin-brand {
    padding: 2px 4px 8px;
  }

  .admin-nav {
    display: flex;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .admin-nav button {
    min-width: max-content;
  }

  .upstream-model-grid {
    grid-template-columns: 1fr;
  }

  .upstream-intro .admin-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .upstream-intro-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .price-monitor-form {
    grid-template-columns: 1fr;
  }

  .supplier-products-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplier-test-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .supplier-test-summary {
    width: 100%;
    max-width: 100%;
  }

  .supplier-product-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .supplier-product-row > :nth-child(3) {
    display: none;
  }

  .supplier-product-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-row.product-row {
    grid-template-columns: 26px 52px minmax(0, 1fr) 110px;
  }

  .admin-row.product-row .product-select-box {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-row.product-row .admin-thumb.product {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-row.product-row > div:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .admin-row.product-row .product-status-select {
    grid-column: 4;
    grid-row: 1;
  }

  .admin-row.product-row .product-attribution {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .admin-row.product-row .row-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-wrap: wrap;
  }

  .product-bulk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-template-row {
    grid-template-columns: 44px minmax(0, 1fr) 110px auto;
  }

  .pricing-template-row > :nth-child(4),
  .pricing-template-row > :nth-child(5) {
    display: none;
  }

  .membership-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-admin-row {
    grid-template-columns: 44px minmax(0, 1fr) minmax(90px, auto);
  }

  .user-admin-row > :nth-child(5) {
    display: none;
  }

  .user-admin-row > select {
    grid-column: 2 / -1;
  }

  .user-admin-row > .row-actions {
    grid-column: 1 / -1;
  }

  .voucher-code-grid,
  .voucher-code-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voucher-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .nav-row {
    min-height: 0;
    grid-template-rows: 58px 38px;
  }

  .header-currency-switch .currency-switch-label {
    display: none;
  }

  .header-currency-switch button {
    padding-inline: 6px;
    font-size: 9px;
  }

  .voucher-generate-grid,
  .voucher-stat-grid,
  .voucher-code-grid,
  .voucher-code-grid.compact {
    grid-template-columns: 1fr;
  }

  .voucher-generate-action,
  .voucher-generated-head,
  .voucher-batch-head {
    align-items: stretch;
    flex-direction: column;
  }

  .voucher-redemption-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .voucher-redemption-row code,
  .voucher-redemption-row > span:last-child {
    grid-column: 2;
  }

  .primary-nav {
    top: 102px;
  }

  .search-band {
    padding-top: 18px;
  }

  .search-band.compact {
    padding: 8px 0 10px;
  }

  .search-hero h1 {
    font-size: 32px;
  }

  .search-band.compact .search-hero h1 {
    font-size: 19px;
  }

  .market-stage {
    padding: 16px;
  }

  .hero-carousel {
    padding: 0;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 350px;
  }

  .hero-slide {
    padding: 22px 20px 48px;
  }

  .hero-slide-content {
    width: 100%;
  }

  .hero-slide-content h2 {
    font-size: 30px;
  }

  .hero-slide-brand-grid {
    display: none;
  }

  .hero-arrow {
    width: 30px;
    height: 36px;
  }

  .brand-cloud {
    display: none;
  }

  .market-stage::before {
    inset: 0;
  }

  .product-grid {
    --product-columns: 2;
  }

  .recommend-strip {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .recommend-heading {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .brand-directory {
    margin-top: 7px;
    padding: 7px 8px;
  }

  .brand-directory-row {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    grid-auto-rows: minmax(44px, auto);
  }

  .product-subtitle,
  .tag-list {
    display: none;
  }

  .product-title {
    min-height: 35px;
    font-size: 12px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .card-actions .btn-secondary {
    display: none;
  }

  .detail-main {
    padding: 18px;
  }

  .detail-title {
    font-size: 31px;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .detail-info-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-info-cell:last-child {
    border-bottom: 0;
  }

  .form-grid.two,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .upstream-toolbar {
    grid-template-columns: 1fr;
  }

  .upstream-toolbar .btn {
    justify-content: center;
  }

  .upstream-result-list {
    grid-template-columns: 1fr;
  }

  .upstream-model {
    grid-template-columns: auto 36px minmax(0, 1fr);
    gap: 8px;
  }

  .upstream-model-icon {
    width: 36px;
    height: 36px;
  }

  .upstream-checks {
    display: grid;
    gap: 8px;
  }

  .editor-grid .span-2 {
    grid-column: auto;
  }

  .copy-row {
    grid-template-columns: 1fr auto;
  }

  .copy-row span {
    grid-column: span 2;
  }

  .admin-content {
    padding: 12px;
  }

  .admin-topbar {
    padding: 10px 12px;
  }

  .admin-task-actions .btn span {
    display: none;
  }

  .admin-row {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    min-width: 0;
  }

  .admin-row.product-row {
    grid-template-columns: 26px 50px minmax(0, 1fr) 92px;
    min-width: 0;
  }

  .admin-row:not(.product-row):not(.hero-admin-row) > :nth-child(3) {
    display: none;
  }

  .hero-admin-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .hero-admin-row > :nth-child(3) {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .hero-admin-row > .status-chip {
    grid-column: 2;
    grid-row: 3;
  }

  .hero-admin-row > .row-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    flex-wrap: wrap;
  }

  .product-list-toolbar {
    grid-template-columns: 1fr;
  }

  .product-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .product-status-filters {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .product-list-toolbar .search-box,
  .product-list-toolbar .search-box input {
    min-width: 0;
    max-width: 100%;
  }

  .admin-row.product-row .product-attribution {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .admin-row.product-row .product-select-box {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-row.product-row .admin-thumb.product {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-row.product-row > div:nth-child(3) {
    grid-column: 3 / -1;
    grid-row: 1;
  }

  .admin-row.product-row .product-status-select {
    grid-column: 2 / -1;
    grid-row: 3;
    width: 100%;
  }

  .admin-row.product-row .row-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    flex-wrap: wrap;
  }

  .product-bulk-actions {
    grid-template-columns: 1fr;
  }

  .product-filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-filter-fields {
    grid-template-columns: 1fr;
  }

  .product-filter-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .product-pagination {
    flex-wrap: wrap;
  }

  .product-pagination-pages {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .membership-level-grid {
    grid-template-columns: 1fr;
  }

  .upstream-connection-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .upstream-connection-row > :nth-child(4),
  .upstream-connection-row > :nth-child(5),
  .upstream-connection-row > :nth-child(6),
  .upstream-connection-row > :nth-child(7) {
    display: none;
  }

  .user-search-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .user-search-form .search-box {
    min-width: 0;
    flex: 1;
  }

  .product-bulk-pricing > label:not(.bulk-sync-toggle) {
    grid-template-columns: 1fr;
  }

  .template-example-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .account-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .docs-page,
  .account-page {
    padding-top: 18px;
  }

  .docs-titlebar {
    align-items: flex-start;
  }

  .docs-titlebar h1 {
    font-size: 28px;
  }

  .docs-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar,
  .account-nav {
    position: static;
    max-height: none;
  }

  .docs-sidebar {
    display: block;
    overflow: visible;
    padding: 10px;
  }

  .docs-sidebar-head {
    display: none;
  }

  .docs-nav-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    color: var(--text);
    background: transparent;
    font-weight: 700;
  }

  .docs-nav-toggle > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .docs-nav-toggle > span:last-child {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
  }

  .docs-nav-toggle svg {
    transition: transform 180ms ease;
  }

  .docs-nav-toggle[aria-expanded="false"] > span:last-child svg {
    transform: rotate(-90deg);
  }

  .docs-side-content {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .docs-side-content.is-open {
    display: grid;
  }

  .docs-side-group {
    min-width: 0;
    align-content: start;
    padding-top: 0;
  }

  .docs-side-group a {
    min-height: 27px;
    padding-block: 3px;
  }

  .docs-article {
    padding: 28px 22px;
  }

  .account-nav {
    display: flex;
    overflow-x: auto;
  }

  .account-nav > strong {
    min-width: max-content;
    align-self: center;
    padding: 8px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .account-nav a {
    min-width: max-content;
  }

  .account-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .docs-titlebar {
    display: grid;
    gap: 14px;
  }

  .docs-titlebar .btn {
    width: max-content;
  }

  .docs-article > h2 {
    font-size: 27px;
  }

  .docs-section h3 {
    font-size: 18px;
  }

  .doc-field {
    grid-template-columns: 1fr 34px;
  }

  .doc-field > span {
    grid-column: 1 / -1;
  }

  .doc-field small {
    grid-column: 1 / -1;
  }

  .doc-tool-grid {
    grid-template-columns: 1fr;
  }

  .docs-pagination {
    grid-template-columns: 1fr;
  }

  .account-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .account-hero-user {
    align-items: flex-start;
  }

  .account-hero-avatar {
    width: 58px;
    height: 58px;
    font-size: 23px;
  }

  .account-hero-name h1 {
    font-size: 20px;
  }

  .account-security-track {
    width: 120px;
  }

  .account-hero-bindings {
    grid-column: 1;
  }

  .account-security-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .account-stat-grid {
    grid-template-columns: 1fr;
  }

  .membership-plan-grid,
  .invite-summary-grid {
    grid-template-columns: 1fr;
  }

  .account-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-key-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .account-key-quota {
    grid-column: 2;
    text-align: left;
  }

  .account-status {
    grid-column: 3;
    grid-row: 1;
  }

  .account-security-grid,
  .account-profile-grid {
    grid-template-columns: 1fr;
  }

  .account-empty {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .product-market-section.has-quick-nav {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .quick-nav-admin-row {
    grid-template-columns: 44px minmax(0, 1fr) 80px auto;
  }

  .quick-nav-admin-row > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 900px) {
  .product-market-section.has-quick-nav {
    display: block;
  }

  .quick-nav {
    display: none;
  }
}

/* Keep header controls in their own tracks at every viewport width. */
.brand-divider,
.brand-tagline {
  display: none;
}

.nav-row {
  grid-template-columns:
    minmax(118px, auto) minmax(0, 1fr) auto minmax(180px, 260px)
    auto;
  gap: 12px;
}

.brand {
  white-space: nowrap;
}

.primary-nav {
  justify-content: center;
  overflow: visible;
}

.brand-directory-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.brand-directory-item {
  flex: 1 1 100px;
  max-width: 140px;
}

.brand-directory-item > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quick-nav-item > span:last-child {
  overflow-wrap: anywhere;
}

.product-grid {
  align-items: stretch;
}

.product-card {
  height: 100%;
}

@media (max-width: 1180px) {
  .nav-row {
    grid-template-columns:
      minmax(110px, auto) minmax(0, 1fr) auto minmax(140px, 210px)
      auto;
    gap: 9px;
  }

  .nav-link {
    gap: 4px;
    padding-inline: 8px;
    font-size: 12px;
  }

}

@media (max-width: 900px) {
  .nav-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .primary-nav {
    overflow: visible;
  }

}

@media (max-width: 660px) {
  .brand-directory-item {
    flex-basis: 76px;
    max-width: 104px;
  }
}

.account-contact-slot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.account-contact-slot:empty {
  display: none;
}

.account-contact-slot .xinyuan-contact-widget {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-contact-slot .xinyuan-contact-button {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 56px;
  justify-content: flex-start;
  gap: 6px;
  padding: 7px 6px;
  border-radius: 7px;
  box-shadow: none;
}

.account-contact-slot .xinyuan-contact-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.account-contact-slot .xinyuan-contact-icon svg,
.account-contact-slot .xinyuan-contact-icon img {
  width: 28px;
  height: 28px;
}

.account-contact-slot .xinyuan-contact-label {
  display: block;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .account-contact-slot .xinyuan-contact-button {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .account-contact-slot .xinyuan-contact-label {
    display: block;
  }
}

.announcement-page {
  width: min(100% - 32px, 980px);
  margin: 28px auto 52px;
}

.announcement-page-head {
  padding: 24px 26px;
}

.announcement-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.announcement-page-head h1 {
  margin: 9px 0 5px;
  font-size: 30px;
}

.announcement-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.announcement-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.announcement-entry {
  padding: 20px 22px;
}

.announcement-entry.is-warning {
  border-color: #efc6c9;
  background: #fffafb;
}

.announcement-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  color: #195d91;
  background: #edf6ff;
  font-size: 10px;
  font-weight: 750;
}

.announcement-entry.is-warning .announcement-type {
  color: #a52b36;
  background: #fff0f1;
}

.announcement-entry-head time {
  color: var(--muted);
  font-size: 10px;
}

.announcement-entry h2 {
  margin: 13px 0 8px;
  font-size: 19px;
}

.announcement-entry-body {
  color: #465064;
  font-size: 13px;
  line-height: 1.8;
}

.announcement-entry-body p {
  margin: 0 0 8px;
}

.announcement-entry-body p:last-child {
  margin-bottom: 0;
}

.announcement-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.announcement-empty svg {
  color: var(--brand);
}

.announcement-empty strong {
  color: var(--text);
  font-size: 16px;
}

@media (max-width: 660px) {
  .announcement-page {
    width: min(100% - 22px, 980px);
    margin-top: 16px;
  }

  .announcement-page-head,
  .announcement-entry {
    padding: 16px;
  }

  .announcement-page-head h1 {
    font-size: 25px;
  }
}
/* 商品卡：折扣标签与价格同一行，醒目但不撑破卡片 */
.card-price .price-primary-line {
  flex-wrap: nowrap;
  gap: 4px;
}
.card-price .price-discount-chip {
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: 0;
  line-height: 1.1;
  box-shadow: 0 1px 4px rgba(217, 54, 62, 0.28);
}
.deal-card .price-discount-chip {
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 6px;
}

/* ===== 快速接入抽屉（参考词元之河） ===== */
.access-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: flex-end;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(2px);
}
.access-drawer {
  width: min(660px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -30px 0 70px rgba(15, 23, 42, 0.2);
  animation: ad-in 0.26s ease-out;
}
@keyframes ad-in {
  from { transform: translateX(30px); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}
.ad-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
}
.ad-eyebrow { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ad-head h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.ad-head-actions { display: flex; align-items: flex-start; gap: 12px; }
.ad-support {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-size: 13px;
  white-space: nowrap;
  padding-top: 4px;
}
.ad-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.ad-close:hover { color: var(--text); border-color: #c8d0dd; }
.ad-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 26px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ad-step { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ad-step-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: none;
  border: 0;
  text-align: left;
}
.ad-step-head.is-static { cursor: default; }
.ad-step-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-step.is-done .ad-step-num { background: #1f9d63; }
.ad-step-title { font-size: 15px; font-weight: 600; }
.ad-step-sub { font-size: 12.5px; color: var(--muted); }
.ad-step-chevron { margin-left: auto; color: var(--muted); transition: transform 0.2s; }
.ad-step-chevron.is-open { transform: rotate(180deg); }
.ad-step-panel { padding: 0 18px 18px; }
.ad-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-radius: 10px;
}
.ad-key-row span { font-size: 12px; color: var(--muted); }
.ad-key-row code { font-size: 13px; word-break: break-all; }
.ad-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.ad-note.is-error { color: var(--danger); }
.ad-link { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--brand); }
.ad-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--surface-soft);
  border-radius: 12px;
}
.ad-segmented-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}
.ad-segmented-btn.is-active {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(25, 38, 64, 0.08);
}
.ad-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ad-tool {
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: #33405a;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
}
.ad-tool.is-active {
  border-color: #bcd5ff;
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(18, 104, 232, 0.1);
}
.ad-tool-detail { margin-top: 16px; }
.ad-tool-hint { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.ad-info-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ad-info-row {
  display: grid;
  grid-template-columns: 96px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}
.ad-info-row:first-child { border-top: 0; }
.ad-info-label { font-size: 12.5px; color: var(--muted); }
.ad-info-value {
  font-size: 13px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-info-value.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ad-info-value a { color: var(--brand); }
.ad-copy {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}
.ad-copy:hover { border-color: var(--brand); color: var(--brand); }
.ad-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ad-protocols { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ad-protocol {
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: #33405a;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
}
.ad-protocol.is-active {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #bcd5ff;
}
.ad-code-tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 10px;
  width: fit-content;
}
.ad-code-tab {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
}
.ad-code-tab.is-active {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(25, 38, 64, 0.1);
}
.ad-code-block { position: relative; margin-top: 10px; background: #0f172a; border-radius: 12px; overflow: hidden; }
.ad-code-block pre { margin: 0; padding: 18px; overflow-x: auto; }
.ad-code-block code {
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
}
.ad-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-code-copy:hover { background: rgba(255, 255, 255, 0.22); }
.ad-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ad-step-item { display: flex; gap: 10px; }
.ad-step-dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ad-step-item strong { font-size: 13.5px; }
.ad-step-item p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.ad-step-item code { background: var(--surface-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.ad-code-block.is-small pre { padding: 14px 44px 14px 16px; }

@media (max-width: 640px) {
  .access-drawer { width: 100%; }
  .ad-head { padding: 16px 16px 14px; }
  .ad-head h2 { font-size: 19px; }
  .ad-body { padding: 14px 14px 30px; }
  .ad-info-row { grid-template-columns: 80px 1fr 26px; }
  .ad-info-value { font-size: 12px; }
}

/* 折扣标签再放大一档：保持与价格同行，空间不足时才换行 */
.card-price .price-primary-line { flex-wrap: wrap; }
.card-price .price-discount-chip {
  font-size: 14px;
  padding: 3px 8px;
  border-radius: 7px;
}
/* 保证折扣标签与价格严格同行：略收价格字号，标签保持醒目 */
.card-price .price-primary-line { flex-wrap: nowrap; gap: 3px; }
.card-price .price-primary-line strong { font-size: 15px; }
.card-price .price-discount-chip {
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
}
/* 快速接入抽屉：字号收紧到与词元之河相近的密度 */
.ad-head { padding: 18px 22px 15px; }
.ad-head h2 { font-size: 19px; }
.ad-eyebrow { font-size: 11px; }
.ad-body { padding: 16px 22px 34px; gap: 12px; }
.ad-step-head { padding: 13px 16px; }
.ad-step-title { font-size: 13.5px; }
.ad-step-sub { font-size: 11.5px; }
.ad-step-num { width: 24px; height: 24px; font-size: 12px; }
.ad-step-panel { padding: 0 16px 16px; }
.ad-segmented-btn { height: 38px; font-size: 13px; }
.ad-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 9px;
}
.ad-tool-logo { display: inline-flex; align-items: center; }
.ad-tool-hint { font-size: 12px; }
.ad-tools { gap: 7px; margin-top: 14px; }
.ad-info-label { font-size: 11.5px; }
.ad-info-value { font-size: 12.5px; }
.ad-info-row { padding: 9px 13px; }
.ad-step-item strong { font-size: 12.5px; }
.ad-step-item p { font-size: 11.5px; }
.ad-note { font-size: 11.5px; }
.ad-code-block code { font-size: 11.5px; }
.ad-protocol { font-size: 12.5px; padding: 7px 12px; }
.ad-code-tab { font-size: 12.5px; padding: 6px 12px; }
.ad-key-row code { font-size: 12px; }
.ad-support { font-size: 12.5px; }
.ad-actions .btn { font-size: 13px; }

/* 复制成功反馈 */
.ad-actions .btn.is-copied { animation: ad-pop 0.28s ease; }
@keyframes ad-pop {
  0% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.ad-copy.is-copied,
.ad-code-copy.is-copied {
  color: #16a34a;
  border-color: #86efac;
  background: #f0fdf4;
}
/* 工具标签更紧凑，图标更大更醒目 */
.access-drawer { width: min(700px, 100vw); }
.ad-tools { gap: 6px; }
.ad-tool { font-size: 12px; padding: 6px 9px; gap: 5px; }
.ad-tool-logo svg { display: block; }
