/* =========================================================
   Design tokens — Fintech / high-trust commerce
   ========================================================= */
:root {
  color-scheme: light;

  /* Ink / surfaces */
  --ink: #0b1220;
  --ink-soft: #1c2636;
  --muted: #5f6b7a;
  --muted-soft: #8a95a3;
  --bg: #f7f5f1;
  --bg-elevated: #fffcf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --line: #e4e0d8;
  --line-strong: #cfc8bb;

  /* Accents */
  --accent: #0f7a5f;
  --accent-dark: #0a5c47;
  --accent-soft: rgba(15, 122, 95, 0.1);
  --highlight: #d97706;
  --highlight-soft: rgba(217, 119, 6, 0.12);
  --highlight-line: #e8a317;
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.08);
  --success: #0f7a5f;
  --success-soft: rgba(15, 122, 95, 0.1);

  /* Typography */
  --font-display: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-body: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Geometry / depth — hard offset, not soft blur */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-hard: 3px 3px 0 rgba(11, 18, 32, 0.08);
  --shadow-hard-strong: 4px 4px 0 rgba(11, 18, 32, 0.12);
  --shadow-press: 1px 1px 0 rgba(11, 18, 32, 0.12);
  --ring-accent: 0 0 0 3px var(--accent-soft);
  --ring-highlight: 0 0 0 3px var(--highlight-soft);

  /* Legacy aliases used by admin */
  --shadow: var(--shadow-hard);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Storefront paper grain — subtle, no blur glass */
body.storefront {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(15, 122, 95, 0.05), transparent 55%),
    linear-gradient(180deg, #faf8f4 0%, var(--bg) 28%, #f3f1ec 100%);
}

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

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

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

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

/* =========================================================
   Topbar / brand
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 20px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 3px 3px 0 var(--highlight-line);
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================================================
   Trust / network cues
   ========================================================= */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.trust-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.trust-item span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.trust-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.chain-badge {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--highlight-line);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #7a4f00;
  background: #fff8e8;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(232, 163, 23, 0.28);
}

.chain-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.network-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #edd9a3;
  border-radius: var(--radius);
  background: #fff9eb;
  color: #5c4a12;
  line-height: 1.5;
  font-size: 13px;
  box-shadow: 2px 2px 0 rgba(232, 163, 23, 0.16);
}

.network-banner-label,
.network-banner > strong {
  flex: 0 0 auto;
  font-weight: 800;
  color: #8a6500;
  letter-spacing: 0.02em;
}

.network-banner span {
  flex: 1 1 240px;
}

.network-banner b {
  color: #6b4f00;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.network-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #edd9a3;
  background: #fff9eb;
  color: #5c4a12;
  font-size: 13px;
  font-weight: 600;
}

.network-chip strong {
  color: #6b4f00;
  font-family: var(--font-mono);
  font-size: 12px;
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
  flex-shrink: 0;
}

.network-chip.warn {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fff5f4;
  color: #7a271a;
}

.network-chip.warn .network-dot {
  background: var(--danger);
}

.network-chip.warn strong {
  color: var(--danger);
}

.wallet-network {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.wallet-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Admin topbar (no .page-shell wrapper) */
body:not(.storefront) .topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 18px;
}

body:not(.storefront) .site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  border-top: 0;
  display: block;
}

.wallet-network.ok {
  color: var(--success);
}

.wallet-network.bad {
  color: var(--danger);
}

/* =========================================================
   Buttons
   ========================================================= */
.support-button,
.secondary-button,
.admin-link,
.primary-button {
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #f7f5f1;
  box-shadow: 3px 3px 0 var(--accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--ink-soft);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
}

.primary-button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-press);
}

.primary-button:disabled {
  cursor: not-allowed;
  border-color: #a8b0bb;
  background: #a8b0bb;
  color: #f3f4f6;
  box-shadow: none;
  transform: none;
}

.secondary-button,
.admin-link {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 2px 2px 0 rgba(11, 18, 32, 0.06);
}

.secondary-button:hover,
.admin-link:hover {
  border-color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(11, 18, 32, 0.08);
}

.support-button {
  border-color: rgba(15, 122, 95, 0.28);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: 2px 2px 0 rgba(15, 122, 95, 0.12);
}

.support-button:hover {
  background: rgba(15, 122, 95, 0.16);
  border-color: var(--accent);
  transform: translate(-1px, -1px);
}

.support-icon {
  display: inline-flex;
  line-height: 1;
}

.wide {
  width: 100%;
}

.pay-cta {
  min-height: 52px;
  gap: 12px;
  font-size: 15px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.pay-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.pay-cta:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.pay-cta-label {
  font-weight: 800;
}

.pay-cta-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  opacity: 0.92;
}

.pay-cta-price:empty {
  display: none;
}

.pay-network-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.link-button {
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   Layout panels
   ========================================================= */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.shop-panel,
.checkout,
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
}

.shop-panel {
  padding: 22px;
}

.checkout {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 20px;
}

.checkout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.checkout-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.secure-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

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

.section-title p {
  margin-bottom: 0;
  color: var(--muted);
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker.success-kicker {
  color: var(--accent);
}

.section-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.section-meta-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.checkout-block {
  margin-bottom: 14px;
}

.block-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   Product grid — immersive selection
   ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.product-card {
  position: relative;
  min-height: 248px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  text-align: left;
  gap: 0;
  overflow: hidden;
  box-shadow: 2px 2px 0 rgba(11, 18, 32, 0.05);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.product-card:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(11, 18, 32, 0.08);
}

.product-card.selected {
  border-color: var(--highlight);
  background: #fff;
  box-shadow: 3px 3px 0 rgba(217, 119, 6, 0.22);
  outline: none;
}

.product-card.selected::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--highlight);
  color: #fff;
  box-shadow: 2px 2px 0 rgba(11, 18, 32, 0.12);
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8.2L6.8 11 12 5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.product-card:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(145deg, #eef3f0 0%, #f7f5f1 48%, #ebe6dc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.product-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  flex: 1;
}

.product-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}

.product-desc {
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.product-price small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.product-stock {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.product-stock.ok {
  color: var(--accent-dark);
}

.product-stock.out {
  color: var(--danger);
}

.product-label,
.product-card small,
.selected-box span,
.order-item span {
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
}

/* =========================================================
   Checkout details
   ========================================================= */
.info-box,
.selected-box,
.status-box,
.codes-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 0;
  background: var(--surface-2);
}

.info-box {
  font-size: 13px;
  color: var(--ink-soft);
  word-break: break-word;
}

.info-box small {
  font-weight: 700;
}

.selected-box {
  background: var(--bg-elevated);
}

.selected-box.empty {
  color: var(--muted);
  font-size: 13px;
}

.selected-box .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.selected-box .summary-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.selected-box .summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.selected-box .summary-row strong {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.selected-box .summary-row.price-row strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--accent-dark);
}

.selected-box .summary-row.mono strong,
.merchant-row strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.merchant-row strong.address-revealed {
  max-width: 220px;
  white-space: normal;
  word-break: break-all;
}

.selected-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

/* Payment method large buttons */
.payment-methods {
  display: grid;
  gap: 10px;
}

.network-selector {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.network-selector .payment-method {
  min-height: 60px;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 9px;
  padding: 9px 10px;
}

.network-selector .payment-method-icon {
  width: 36px;
  height: 36px;
}

.network-selector .payment-method-copy strong,
.network-selector .payment-method-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-selector .payment-method-copy strong {
  font-size: 12px;
}

.network-selector .payment-method-copy small {
  font-size: 9px;
}

.network-letter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.manual-payment {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: var(--radius);
  background: #fffaf0;
}

.manual-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.manual-payment > p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.manual-payment-summary {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: start;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.manual-payment-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.manual-payment-summary strong,
.manual-payment-summary code {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
}

.manual-payment .secondary-button {
  margin-bottom: 10px;
}

.manual-field {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.payment-method {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 2px 2px 0 rgba(11, 18, 32, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.payment-method:hover {
  border-color: var(--line-strong);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(11, 18, 32, 0.08);
}

.payment-method.selected {
  border-color: var(--highlight);
  background: #fffdf7;
  box-shadow: 3px 3px 0 rgba(217, 119, 6, 0.2);
}

.payment-method.selected:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(217, 119, 6, 0.2);
}

.payment-method-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}

.payment-method.selected .payment-method-icon {
  border-color: rgba(217, 119, 6, 0.35);
  background: var(--highlight-soft);
  color: #9a6700;
}

.payment-method-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.payment-method-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.payment-method-copy small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.payment-method-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.payment-method.selected .payment-method-check {
  border-color: var(--highlight);
  background: var(--highlight);
  color: #fff;
}

.status-box {
  min-height: 48px;
  margin-top: 14px;
  color: var(--muted);
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
}

.status-box.error,
.message.error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff5f4;
}

.status-box.success,
.message.success {
  color: var(--success);
  border-color: rgba(15, 122, 95, 0.28);
  background: #f1faf6;
}

.status-box.info {
  border-color: var(--line);
}

.codes-box {
  margin-top: 14px;
  background: #f1faf6;
  border-color: rgba(15, 122, 95, 0.28);
  box-shadow: 3px 3px 0 rgba(15, 122, 95, 0.1);
}

.codes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.codes-head h3 {
  margin: 0;
}

.codes-mono,
.codes-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  padding: 12px;
  border: 1px solid rgba(15, 122, 95, 0.18);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.codes-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.success-tag {
  border-color: rgba(15, 122, 95, 0.28);
  background: #fff;
  color: var(--accent-dark);
}

.support-card {
  margin-top: 16px;
  border: 1px solid rgba(15, 122, 95, 0.22);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(15, 122, 95, 0.05), transparent 60%),
    var(--surface);
}

.support-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.support-card strong {
  display: block;
  font-size: 14px;
}

.support-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.support-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   Footer / floating
   ========================================================= */
.site-footer {
  margin-top: 28px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  margin: 0 0 6px;
}

.footer-note {
  font-size: 12px;
  color: var(--muted-soft);
}

.footer-mono {
  margin: 0 !important;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  white-space: nowrap;
}

.floating-support {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #1a8bb8;
  background: #1f9fd1;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(11, 18, 32, 0.18);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.floating-support:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(11, 18, 32, 0.18);
}

/* Mobile sticky pay bar */
.mobile-paybar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 247, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -3px 0 rgba(11, 18, 32, 0.04);
  align-items: center;
  gap: 12px;
}

.mobile-paybar-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-paybar-info span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-paybar-info strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mobile-pay-btn {
  min-width: 108px;
  min-height: 46px;
}

.hidden {
  display: none !important;
}

/* =========================================================
   Admin (shared, modernized tokens)
   ========================================================= */
.admin-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.admin-card {
  margin-bottom: 18px;
  padding: 20px;
}

.form-row,
.settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring-accent);
}

textarea {
  resize: vertical;
  min-height: 160px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-hard);
}

.stats span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stats strong {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.icon-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--danger);
}

.product-image-admin {
  width: 96px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

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

.row-actions,
.inventory-counts {
  display: grid;
  gap: 8px;
}

.inventory-counts {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.inventory-counts span {
  color: var(--muted);
  font-size: 12px;
}

.message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
}

.orders {
  display: grid;
  gap: 10px;
}

.order-search {
  margin-bottom: 14px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
  box-shadow: 2px 2px 0 rgba(11, 18, 32, 0.04);
}

.order-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-head,
.order-actions {
  display: flex;
  gap: 10px;
}

.order-head {
  align-items: center;
  justify-content: space-between;
}

.order-actions {
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
}

.order-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.order-status.delivered {
  border-color: rgba(15, 122, 95, 0.28);
  color: var(--success);
}

.order-status.failed {
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--danger);
}

.order-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: start;
}

.order-grid span {
  color: var(--muted);
}

.order-grid code,
.order-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
}

.order-grid .full-hash {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-all;
}

.order-codes {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-codes summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.order-codes pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 12px;
}

.product-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.products-table {
  min-width: 1280px;
}

.col-drag {
  width: 72px;
  vertical-align: middle;
}

.drag-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.drag-handle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.sort-buttons {
  display: grid;
  gap: 4px;
}

.sort-btn {
  width: 36px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 0;
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.product-row {
  transition: background 0.12s ease;
}

.product-row.dragging {
  opacity: 0.55;
  background: #eef8f5;
}

.product-row.drop-before {
  box-shadow: inset 0 3px 0 0 var(--accent);
}

.product-row.drop-after {
  box-shadow: inset 0 -3px 0 0 var(--accent);
}

.product-row:hover .drag-handle {
  border-color: rgba(15, 122, 95, 0.35);
  color: var(--accent-dark);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .checkout {
    position: static;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .settings-grid,
  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-bottom: 110px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .primary-button,
  .topbar-actions .support-button {
    flex: 1;
  }

  .chain-badge {
    width: 100%;
  }

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

  .product-card {
    min-height: 220px;
  }

  .product-price {
    font-size: 18px;
  }

  .codes-actions {
    grid-template-columns: 1fr;
  }

  .order-item {
    grid-template-columns: 1fr;
  }

  .order-actions {
    flex-direction: row;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-mono {
    white-space: normal;
  }

  .mobile-paybar {
    display: flex;
  }

  .floating-support {
    right: 12px;
    bottom: 78px;
  }

  body.storefront .checkout .pay-cta {
    display: none;
  }
}

@media (max-width: 420px) {
  .network-selector {
    grid-template-columns: 1fr;
  }

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

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  h1 {
    font-size: 26px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pay-cta::after {
    display: none;
  }
}

/* =========================================================
   Admin console — sidebar workspace
   ========================================================= */
.admin-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 122, 95, 0.08), transparent 28%),
    #f4f5f3;
}

.admin-login-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: 56px;
}

.admin-login-brand {
  max-width: 560px;
}

.admin-login-brand h1 {
  max-width: 520px;
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.admin-login-brand > p:not(.eyebrow) {
  max-width: 480px;
  color: var(--muted);
  font-size: 16px;
}

.admin-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(15, 122, 95, 0.26);
}

.admin-login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.admin-login-points span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.admin-login-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 8px 8px 0 rgba(11, 18, 32, 0.08);
}

.admin-login-head {
  margin-bottom: 24px;
}

.admin-login-head h2 {
  margin-bottom: 7px;
  font-size: 28px;
}

.admin-login-head p:last-child {
  color: var(--muted);
}

.admin-login-button {
  width: 100%;
  margin-top: 16px;
}

.admin-back-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-back-link:hover {
  color: var(--accent-dark);
}

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

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
  border-right: 1px solid #243044;
  background: #111827;
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-brand .admin-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent);
  font-size: 21px;
  box-shadow: none;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand span {
  display: block;
}

.admin-sidebar-brand strong {
  font-size: 15px;
}

.admin-sidebar-brand span {
  margin-top: 1px;
  color: #93a4b9;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.admin-nav-item {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #aab6c7;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav-item.active {
  border-color: rgba(34, 197, 148, 0.22);
  background: rgba(15, 122, 95, 0.24);
  color: #fff;
}

.admin-nav-icon {
  width: 22px;
  color: #7f91a8;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 17px;
}

.admin-nav-item.active .admin-nav-icon {
  color: #57d6b2;
}

.admin-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.admin-sidebar-link,
.admin-logout-button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: #aab6c7;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.admin-sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-logout-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.admin-logout-button:hover {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

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

.admin-workspace-header {
  min-height: 104px;
  padding: 22px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-workspace-header h1 {
  font-size: 28px;
}

.admin-workspace-header p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-live-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 122, 95, 0.2);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-live-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 122, 95, 0.1);
}

.admin-content {
  width: min(1320px, 100%);
  padding: 28px 30px 48px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  animation: admin-panel-in 0.18s ease-out;
}

@keyframes admin-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-overview-hero {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(15, 122, 95, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(15, 122, 95, 0.12), rgba(255, 255, 255, 0.7) 55%),
    #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-hard);
}

.admin-overview-hero h2 {
  margin-bottom: 7px;
  font-size: 26px;
}

.admin-overview-hero p:last-child {
  margin: 0;
  color: var(--muted);
}

.admin-quick-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
}

.admin-page .stats {
  gap: 14px;
}

.admin-page .stats .stat-card {
  position: relative;
  min-height: 138px;
  padding: 18px;
  overflow: hidden;
}

.admin-page .stats .stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -34px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(11, 18, 32, 0.035);
}

.admin-page .stats .stat-card.accent {
  border-color: rgba(15, 122, 95, 0.22);
}

.admin-page .stats .stat-card.highlight {
  border-color: rgba(217, 119, 6, 0.24);
}

.admin-page .stats small {
  display: block;
  margin-top: 9px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 600;
}

.admin-overview-grid,
.admin-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-overview-card {
  margin-bottom: 0;
}

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

.section-title.compact h2 {
  font-size: 19px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.overview-list {
  display: grid;
}

.overview-list-item {
  min-height: 62px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overview-list-item:first-child {
  border-top: 0;
}

.overview-list-item > div:first-child strong,
.overview-list-item > div:first-child span {
  display: block;
}

.overview-list-item > div:first-child strong {
  font-size: 13px;
}

.overview-list-item > div:first-child span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.overview-stock {
  min-width: 84px;
  text-align: right;
}

.overview-stock strong,
.overview-stock span {
  display: block;
}

.overview-stock strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.overview-stock span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.overview-stock.ok strong { color: var(--success); }
.overview-stock.low strong { color: var(--highlight); }
.overview-stock.empty strong { color: var(--danger); }

.overview-order-summary {
  display: grid;
  gap: 14px;
}

.overview-order-number {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.overview-order-number strong,
.overview-order-number span {
  display: block;
}

.overview-order-number strong {
  font-family: var(--font-display);
  font-size: 34px;
}

.overview-order-number span,
.overview-order-split span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.overview-order-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-order-split div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.overview-order-split strong,
.overview-order-split span {
  display: block;
}

.overview-order-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-card-roomy {
  padding: 24px;
}

.admin-card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 122, 95, 0.2);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.admin-table-note,
.admin-warning-box {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 650;
}

.admin-table-note {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.admin-warning-box {
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: var(--highlight-soft);
  color: #8a4a05;
}

.admin-product-table-wrap {
  max-height: calc(100vh - 310px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-product-table-wrap table {
  margin: 0;
}

.admin-product-table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8f8f6;
}

.admin-product-table-wrap th,
.admin-product-table-wrap td {
  padding: 12px 9px;
}

.admin-sticky-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  z-index: 5;
}

.admin-sticky-actions .message {
  flex: 1;
  margin: 0;
}

.settings-grid.single-column {
  grid-template-columns: 1fr;
}

.settings-grid.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.settings-grid .span-two {
  grid-column: 1 / -1;
}

.admin-order-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-order-filters .order-search {
  margin: 0;
}

.admin-narrow-card {
  max-width: 820px;
}

.security-form {
  max-width: 560px;
}

.network-admin-list {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.network-admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.network-admin-head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.network-admin-head strong,
.network-admin-head span {
  display: block;
}

.network-admin-head span {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.network-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.network-enable input {
  width: 18px;
  height: 18px;
}

.network-fields {
  margin: 0;
  padding: 15px;
}

.admin-page .order-item {
  padding: 16px;
  background: #fff;
}

.admin-page .icon-button {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 1080px) {
  .admin-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .admin-content,
  .admin-workspace-header {
    padding-left: 22px;
    padding-right: 22px;
  }

  .admin-page .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 0;
  }

  .admin-login-brand h1 {
    font-size: 42px;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: sticky;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #243044;
  }

  .admin-sidebar-brand {
    padding: 0 4px 11px;
  }

  .admin-nav {
    display: flex;
    gap: 6px;
    padding: 10px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-nav-item {
    width: auto;
    min-width: max-content;
    padding: 0 11px;
  }

  .admin-sidebar-foot {
    position: absolute;
    top: 14px;
    right: 12px;
    margin: 0;
    display: block;
  }

  .admin-sidebar-foot .admin-sidebar-link {
    display: none;
  }

  .admin-sidebar-foot .admin-logout-button {
    min-height: 36px;
    padding: 0 11px;
  }

  .admin-overview-grid,
  .admin-two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-login-brand {
    display: none;
  }

  .admin-login-shell {
    display: flex;
    align-items: center;
    padding: 20px 0;
  }

  .admin-login-card {
    width: 100%;
    padding: 24px;
  }

  .admin-workspace-header {
    min-height: auto;
    padding: 17px 16px;
  }

  .admin-workspace-header h1 {
    font-size: 24px;
  }

  .admin-header-actions .secondary-button,
  .admin-live-chip {
    display: none;
  }

  .admin-content {
    padding: 18px 14px 36px;
  }

  .admin-overview-hero {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-quick-actions {
    width: 100%;
  }

  .admin-quick-actions button {
    flex: 1;
  }

  .admin-page .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .admin-page .stats .stat-card {
    min-height: 118px;
    padding: 14px;
  }

  .admin-page .stats strong {
    font-size: 24px;
  }

  .admin-card-roomy,
  .admin-card {
    padding: 17px;
  }

  .admin-sticky-actions {
    margin: 0 -17px -17px;
    padding: 12px 17px;
  }

  .admin-order-filters,
  .settings-grid,
  .settings-grid.compact-grid {
    grid-template-columns: 1fr;
  }

  .admin-page .order-actions {
    flex-wrap: wrap;
  }

  .admin-page .order-actions button {
    flex: 1;
  }
}
