:root {
  color-scheme: dark;
  --bg: #080d0b;
  --surface: #111815;
  --surface-soft: #17211d;
  --surface-raised: #1b2520;
  --ink: #eef6f1;
  --muted: #9eaca4;
  --line: rgba(156, 179, 166, 0.22);
  --green: #00a886;
  --green-dark: #40d7b2;
  --accent: #00a886;
  --gold: #d6b064;
  --danger: #ff7468;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 168, 134, 0.14), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(214, 176, 100, 0.08), transparent 28%),
    linear-gradient(180deg, #080d0b 0%, #0c1210 58%, #090d0c 100%);
  color: var(--ink);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  content: "";
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 0, rgba(0, 0, 0, 0.18) 68%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
}

body::after {
  content: "XIV  0x14  deploy  license  vault\A 0101  build  serial  XIV  catalog\A token  hash  TRC20  order  XIV\A vault  product  grant  audit";
  top: -12vh;
  right: 0;
  width: min(360px, 32vw);
  height: 130vh;
  padding: 28px 20px;
  overflow: hidden;
  white-space: pre-wrap;
  color: rgba(64, 215, 178, 0.13);
  font: 800 13px/2.15 Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  background: linear-gradient(90deg, transparent, rgba(0, 168, 134, 0.07));
  animation: code-drift 28s linear infinite;
}

@keyframes code-drift {
  0% {
    transform: translateY(-3%);
  }
  50% {
    color: rgba(64, 215, 178, 0.22);
  }
  100% {
    transform: translateY(3%);
  }
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  letter-spacing: 0;
}

.brand small,
.muted {
  color: var(--muted);
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

nav a.active {
  border-color: var(--green);
  color: var(--green-dark);
}

.hero {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 168, 134, 0.15), rgba(214, 176, 100, 0.08)),
    rgba(17, 24, 21, 0.92);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
  min-height: 430px;
  padding: 56px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(44px, 9vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 30px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.icon-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: #06110e;
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.status-panel,
.payment-card,
.library-panel,
.product-card,
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 22px;
}

.status-panel > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(0, 168, 134, 0.14);
}

.section {
  padding: 54px 0 0;
}

.section:last-child {
  padding-bottom: 70px;
}

.view-screen[hidden],
[hidden] {
  display: none !important;
}

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

.section-head.compact {
  margin-bottom: 12px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0 14px;
}

.chip.active {
  border-color: var(--green);
  background: rgba(0, 168, 134, 0.14);
  color: var(--green-dark);
}

.skeleton-chip {
  width: 72px;
  min-height: 36px;
  border-color: transparent;
  cursor: default;
}

.skeleton-chip.short {
  width: 118px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-card {
  display: grid;
  grid-template-rows: 316px 42px 34px 58px 24px;
  height: 100%;
  min-height: 470px;
  overflow: hidden;
}

.product-skeleton {
  position: relative;
  grid-template-rows: none;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-skeleton::before,
.product-skeleton::after,
.skeleton-chip {
  background: linear-gradient(90deg, #17211d 0%, #223029 42%, #17211d 84%);
  background-size: 220% 100%;
  animation: skeleton-sheen 1.25s ease-in-out infinite;
}

.product-skeleton::before,
.product-skeleton::after {
  content: "";
  display: block;
  border-radius: 8px;
}

.product-skeleton::before {
  height: 156px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.product-skeleton::after {
  width: calc(100% - 36px);
  height: 246px;
  margin: 20px 18px 0;
  box-shadow:
    0 38px 0 -9px #17211d,
    0 78px 0 -11px #17211d,
    0 124px 0 -12px #17211d,
    0 204px 0 -6px #17211d;
}

@keyframes skeleton-sheen {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.catalog-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 180px;
  align-content: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.catalog-empty strong {
  font-size: 20px;
}

.catalog-empty p {
  max-width: 680px;
  color: var(--muted);
}

.inline-error {
  grid-column: auto;
  min-height: 96px;
  padding: 18px;
  box-shadow: none;
}

.product-hit {
  display: grid;
  grid-template-rows: 156px 160px;
  gap: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.product-cover {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  height: 156px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(64, 215, 178, 0.22), rgba(64, 215, 178, 0) 28%),
    linear-gradient(135deg, rgba(0, 168, 134, 0.18), rgba(214, 176, 100, 0.10));
  color: var(--ink);
}

.product-cover-shot {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 168, 134, 0.14), rgba(214, 176, 100, 0.08));
}

.product-cover-shot img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  object-fit: cover;
  object-position: top center;
}

.product-cover-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(8, 13, 11, 0.28)),
    linear-gradient(115deg, rgba(0, 168, 134, 0.16), rgba(214, 176, 100, 0.16));
  mix-blend-mode: normal;
}

.product-cover-shot .cover-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  width: auto;
  min-width: 44px;
  height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  box-shadow: 0 8px 20px rgba(23, 32, 27, 0.16);
}

.product-cover-art {
  position: relative;
  overflow: hidden;
}

.product-cover-art::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -34px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(0, 168, 134, 0.16);
}

.cover-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.cover-kicker {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 23px;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cover-copy small {
  color: var(--muted);
  font-weight: 700;
}

.cover-badge {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 900;
}

.product-copy,
.product-meta,
.product-foot {
  margin-left: 18px;
  margin-right: 18px;
}

.product-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 160px;
  min-height: 0;
  padding: 16px 0 12px;
}

.product-hit strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-copy .muted {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  color: var(--muted);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  align-items: center;
}

.product-rating,
.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.product-rating {
  margin: 0 18px;
  overflow: hidden;
  white-space: nowrap;
}

.product-rating > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: #c7cfc8;
  letter-spacing: 0;
}

.stars .active {
  color: var(--gold);
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 8px 0 6px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.demo-button {
  min-height: 42px;
  background: var(--surface-raised);
  color: var(--muted);
}

.demo-button.is-ready {
  border-color: transparent;
  background: var(--green);
  color: #06110e;
}

.demo-button.is-disabled {
  color: #7a837d;
  opacity: 0.72;
}

.product-actions .button {
  min-width: 72px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.demo-button:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--surface-raised);
}

.demo-button.is-ready:hover {
  background: var(--green-dark);
}

.demo-button.is-disabled:hover {
  border-color: var(--line);
  background: var(--surface-raised);
}

.is-loading {
  position: relative;
  pointer-events: none;
}

.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: spin 0.78s linear infinite;
}

.icon-button.is-loading {
  color: transparent;
}

.icon-button.is-loading::after {
  position: absolute;
  margin-left: 0;
  color: var(--green);
}

.panel-loading {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(238, 244, 240, 0.62);
  color: var(--muted);
  font-size: 14px;
}

.panel-loading::before,
.activity-status::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.78s linear infinite;
}

.activity-status {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(320px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 21, 0.96);
  color: var(--muted);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
  font-size: 13px;
  font-weight: 800;
}

.activity-status[hidden] {
  display: none;
}

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

.demo-popover {
  position: fixed;
  z-index: 70;
  width: min(300px, calc(100vw - 24px));
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(23, 32, 27, 0.18);
}

.demo-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--popover-notch-x, 36px) - 7px);
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
}

.demo-popover-title {
  position: relative;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 900;
}

.demo-popover p {
  position: relative;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.demo-popover p:last-child {
  margin-bottom: 0;
}

.demo-popover-action {
  position: relative;
  width: 100%;
  min-height: 38px;
  font-size: 13px;
}

.demo-count {
  display: block;
  margin: 0 18px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.product-card .price,
.detail-actions .price {
  margin-top: auto;
  color: var(--green);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

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

label {
  display: grid;
  gap: 6px;
  color: #35443d;
  font-size: 13px;
  font-weight: 800;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

.account-grid {
  display: grid;
  gap: 24px;
}

.auth-panel,
.account-panels,
.auth-columns {
  display: grid;
  gap: 16px;
}

.auth-columns,
.account-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-panel {
  max-width: 980px;
}

.auth-panel > .auth-columns > form,
.reset-form,
.account-head {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

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

.account-head strong {
  display: block;
  word-break: break-all;
}

.inline-form {
  margin-bottom: 16px;
}

#password-update-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 18px;
}

.payment-card,
.library-panel {
  padding: 22px;
}

.payment-lines {
  display: grid;
  gap: 12px;
}

.payment-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.payment-line strong {
  text-align: right;
  word-break: break-all;
}

.address-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--green);
  border-radius: 7px;
  background: rgba(0, 168, 134, 0.10);
  word-break: break-all;
}

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

.library-item,
.order-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.order-row-head,
.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
}

.order-row-head span {
  color: var(--green-dark);
  font-weight: 900;
}

.order-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.compact-tx-form {
  display: grid;
  gap: 10px;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
}

.rating-control {
  display: grid;
  gap: 8px;
}

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.license-summary {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(0, 168, 134, 0.24);
  border-radius: 7px;
  background: rgba(0, 168, 134, 0.12);
  color: var(--ink);
  font-size: 12px;
}

.license-summary.pending {
  border-color: var(--line);
  background: var(--surface-soft);
}

.license-summary code,
.serial-result-card code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--green-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-weight: 900;
}

.license-summary small {
  color: var(--muted);
  line-height: 1.35;
}

.rating-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.star-button {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-top: 6px;
  padding: 0 9px;
  border: 1px solid rgba(0, 168, 134, 0.24);
  border-radius: 999px;
  background: rgba(0, 168, 134, 0.14);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.admin-section {
  padding-bottom: 70px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

.admin-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.admin-tab.active {
  border-color: var(--green);
  background: rgba(0, 168, 134, 0.14);
  color: var(--green-dark);
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-products-panel {
  grid-column: 1;
}

.admin-categories-panel {
  grid-column: 1;
}

.admin-editor-panel {
  grid-column: 2 / 4;
  grid-row: 1 / span 2;
}

.admin-customers-panel {
  grid-column: 1 / 4;
}

.admin-launch-panel {
  grid-column: 1 / 3;
}

.admin-upload-panel,
.admin-paid-panel {
  min-height: 100%;
}

.admin-actions,
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-form-actions {
  margin-top: 6px;
}

.admin-products-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.admin-summary strong {
  color: var(--ink);
}

.admin-customer-tools {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(220px, 1fr) minmax(190px, 0.75fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.admin-serial-result {
  margin: 12px 0;
}

.serial-result-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(0, 168, 134, 0.22);
  border-radius: 7px;
  background: rgba(0, 168, 134, 0.12);
  font-size: 13px;
}

.serial-result-card span {
  color: var(--muted);
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid rgba(0, 168, 134, 0.34);
  border-radius: 999px;
  background: rgba(0, 168, 134, 0.16);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.customer-list-row .mini-badge {
  margin-left: 4px;
}

.launch-pipeline {
  display: grid;
  gap: 12px;
}

.pipeline-summary,
.pipeline-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.pipeline-summary strong {
  color: var(--ink);
}

.pipeline-checks {
  gap: 8px;
}

.pipeline-pill {
  display: inline-grid;
  gap: 2px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 900;
}

.pipeline-pill.ok {
  border-color: rgba(0, 168, 134, 0.24);
  background: rgba(0, 168, 134, 0.14);
  color: var(--green-dark);
}

.pipeline-pill.blocked {
  border-color: rgba(197, 87, 69, 0.28);
  background: rgba(255, 116, 104, 0.10);
  color: var(--danger);
}

.pipeline-pill small {
  color: var(--muted);
  font-weight: 700;
}

.pipeline-list {
  display: grid;
  gap: 8px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 13px;
}

.pipeline-row div {
  display: grid;
  gap: 3px;
}

.pipeline-row span,
.pipeline-blockers,
.pipeline-ready {
  color: var(--muted);
}

.pipeline-ready {
  color: var(--green-dark);
  font-weight: 900;
}

.pipeline-blockers {
  color: var(--danger);
  font-weight: 900;
}

.admin-customers-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.admin-customers-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(420px, 1fr);
  gap: 14px;
}

.admin-customer-detail {
  min-width: 0;
}

.customer-list-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.customer-list-row.active {
  border-color: var(--green);
  background: rgba(0, 168, 134, 0.12);
}

.customer-list-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 13px;
}

.customer-row span {
  color: var(--muted);
}

.customer-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.customer-main div {
  display: grid;
  gap: 3px;
}

.customer-access-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.customer-access-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.customer-access-list li div,
.customer-ratings {
  display: grid;
  gap: 2px;
}

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

.customer-danger-zone {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.admin-product-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
}

.admin-product-row.active {
  border-color: var(--green);
  background: rgba(0, 168, 134, 0.12);
}

.admin-product-row span,
.admin-product-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-category-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 13px;
}

.admin-category-row button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.admin-category-row span {
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 14px;
}

.admin-tab {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.admin-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #06110e;
}

.admin-customers-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  margin-top: 14px;
}

.customer-list-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.customer-list-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 128, 107, 0.12);
}

.customer-list-row span,
.customer-danger-zone span {
  color: var(--muted);
  font-size: 12px;
}

.admin-customer-detail {
  min-width: 0;
}

.customer-danger-zone {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.text-button.danger-text,
.danger-text {
  color: var(--danger);
}

.danger-light {
  border-color: rgba(168, 69, 42, 0.32);
  color: var(--danger);
}

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.wide-field {
  grid-column: 1 / -1;
}

.admin-preview {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.admin-preview-cover {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(0, 168, 134, 0.14);
}

.admin-preview-cover img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
}

.admin-preview h4 {
  margin: 8px 0;
  font-size: 22px;
}

.admin-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-preview-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: start center;
  overflow: auto;
  padding: 24px;
  background: rgba(23, 32, 27, 0.62);
}

.modal-backdrop:target,
.modal-backdrop.is-open {
  display: grid;
}

.product-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(540px, 1.1fr) minmax(500px, 0.9fr);
  width: min(1240px, calc(100vw - 20px));
  min-height: min(760px, calc(100vh - 48px));
  overflow: visible;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  width: min(880px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 30px;
}

.checkout-product-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.checkout-product-summary span {
  color: var(--green);
  font-weight: 900;
}

.detail-cover {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  background: rgba(0, 168, 134, 0.14);
}

.detail-gallery {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(64, 215, 178, 0.20), rgba(64, 215, 178, 0) 30%),
    linear-gradient(135deg, rgba(0, 168, 134, 0.10), rgba(214, 176, 100, 0.07));
}

.detail-gallery .detail-cover {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
  align-self: end;
}

.detail-thumb {
  min-height: 62px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.detail-thumb.active {
  border-color: var(--green);
}

.detail-thumb img {
  display: block;
  width: 100%;
  height: 62px;
  object-fit: contain;
  object-position: top center;
  background: var(--surface);
}

.detail-body {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto auto auto auto auto auto;
  gap: 9px;
  padding: 24px 30px 26px;
  overflow: visible;
}

.detail-body h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.12;
}

#detail-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  min-height: 46px;
  align-self: start;
}

.detail-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.detail-tab.active {
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 6px 18px rgba(23, 32, 27, 0.08);
}

.detail-panels {
  min-height: 0;
  overflow: visible;
  align-self: start;
}

.detail-panel {
  display: none;
  gap: 10px;
  align-content: start;
  align-items: start;
}

.detail-panel.active {
  display: grid;
}

.detail-section {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 4px;
}

.detail-section h3 {
  font-size: 15px;
}

.detail-section ul,
.detail-section ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.detail-section p,
#detail-technical p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

#detail-installation ol {
  -webkit-line-clamp: unset;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.detail-actions .demo-count {
  margin: 4px 0 0;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 24px));
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-grid strong {
  color: var(--ink);
}

.footer-policy {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: none;
}

.footer-policy p:last-child {
  margin-bottom: 0;
}

.danger {
  color: var(--danger);
}

@media (max-width: 760px) {
  .topbar,
  nav,
  .hero-actions {
    align-items: flex-start;
  }

  .topbar,
  nav {
    flex-direction: column;
  }

  .hero-grid,
  .checkout-layout,
  .auth-columns,
  .account-panels,
  .admin-workspace,
  .admin-customers-layout,
  .admin-form-grid,
  .admin-preview,
  .checkout-modal,
  .footer-grid,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .admin-products-panel,
  .admin-categories-panel,
  .admin-editor-panel,
  .admin-customers-panel,
  .admin-launch-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .pipeline-row {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding: 40px 0;
  }

  .section {
    padding-top: 40px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-rows: 310px 42px 34px 104px 24px;
    min-height: 514px;
  }

  .product-cover {
    height: 150px;
  }

  .product-hit {
    grid-template-rows: 150px 160px;
  }

  .detail-cover {
    height: 100%;
  }

  .product-detail {
    width: min(100%, calc(100vw - 20px));
    height: auto;
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }

  .detail-gallery {
    grid-template-rows: minmax(220px, 1fr) auto;
    min-height: 0;
    height: clamp(300px, 55dvh, 470px);
    padding: 14px;
  }

  .detail-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-body {
    padding: 22px;
    overflow: visible;
  }

  .product-foot,
  .detail-actions,
  .account-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-foot {
    gap: 10px;
  }

  .product-actions {
    justify-content: stretch;
    width: 100%;
  }

  .product-actions .button {
    flex: 1 1 0;
  }

  .detail-actions .product-actions {
    width: 100%;
  }
}
