:root,
[data-theme="light"] {
  --bg: #e8eef5;
  --bg-2: #f7fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0b6e4f;
  --brand-dark: #085c42;
  --brand-light: #e6f5ef;
  --accent: #c45c26;
  --border: #d5dee8;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --hero-grad: radial-gradient(1200px 600px at 10% -10%, #cfe8dc 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #dbe7f5 0%, transparent 50%),
    linear-gradient(180deg, #eef3f8 0%, #e4ebf3 100%);
}

[data-theme="dark"] {
  --bg: #0c1210;
  --bg-2: #121a17;
  --surface: #18211d;
  --text: #ecf3ee;
  --muted: #94a89c;
  --brand: #3dba88;
  --brand-dark: #2f9a70;
  --brand-light: #1a3329;
  --accent: #e08a4f;
  --border: #2a3a33;
  --danger: #f87171;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --hero-grad: radial-gradient(1000px 500px at 0% 0%, #1a3d30 0%, transparent 55%),
    radial-gradient(800px 400px at 100% 10%, #1a2838 0%, transparent 50%),
    linear-gradient(180deg, #0e1512 0%, #0c1210 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

a {
  color: var(--brand);
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
}

.top-stick {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}

.mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 2rem;
  padding: 0.35rem 1rem;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.mode-bar:hover,
.mode-bar:focus-visible {
  background: var(--brand-light);
  color: var(--brand-dark);
  outline: none;
}

.phrase-rotator {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 42rem;
  height: 1.35rem;
  overflow: hidden;
  text-align: center;
}

.phrase-text {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.phrase-text.is-out {
  opacity: 0;
  transform: translateY(0.55rem);
}

.phrase-text.is-in {
  opacity: 0;
  transform: translateY(-0.45rem);
}

.mode-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.75;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .mode-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phrase-text {
    transition: none;
  }
}

.header {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  gap: 0.75rem 1rem;
}

.header-memo {
  margin: 0;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .header-memo {
  color: var(--brand);
}

@media (max-width: 640px) {
  .header-memo {
    display: none;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo span {
  color: var(--brand);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--brand);
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle,
.theme-opt,
.nav-cta,
.id-tab,
.linkish,
.btn-main,
.package,
.service {
  font: inherit;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  color: var(--brand-dark);
}

.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}

.theme-icon {
  display: none;
  line-height: 0;
}

html[data-theme="light"] .theme-icon--sun,
html:not([data-theme]) .theme-icon--sun {
  display: block;
}

html[data-theme="dark"] .theme-icon--moon {
  display: block;
}

.theme-opt {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
}

.theme-opt.active {
  background: var(--brand);
  color: #fff;
}

.nav-cta {
  display: inline-flex;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 0 1.1rem;
  background: var(--hero-grad);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
}

.hero-inner {
  position: relative;
  display: block;
}

.hero-copy {
  min-width: 0;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.brand-title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-lead {
  margin: 0.45rem 0 0;
  max-width: 32rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-cta-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.hero-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.buy {
  padding: 0 0 2rem;
  margin-top: -0.35rem;
}

.buy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.1rem;
}

.buy-card h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.buy-sub {
  margin: 0.25rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.label {
  font-weight: 700;
  font-size: 0.88rem;
  margin: 0 0 0.55rem;
}

.id-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.id-tab {
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.id-tab.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}

.id-tab:disabled,
.id-tab.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.fines-panel {
  margin-bottom: 0.75rem;
}

.fines-banner {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 12%, var(--bg-2));
  border: 1.5px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

[data-theme="dark"] .fines-banner {
  color: #a7f3d0;
  background: color-mix(in srgb, var(--brand) 18%, var(--bg-2));
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
}

.hidden {
  display: none !important;
}

.packages {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 720px) {
  .packages {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.package,
.product-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid transparent;
  background: var(--surface);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.product-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1.5px var(--brand), 0 8px 22px rgba(11, 110, 79, 0.12);
}

.product-card.featured {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 6;
  max-height: 5.5rem;
  background: var(--brand-light);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .product-media {
  background: var(--brand-light);
}

.product-art {
  position: absolute;
  inset: 0;
}

.product-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-icon {
  display: none;
}

.product-card:nth-child(1) .product-media,
.product-card:nth-child(2) .product-media,
.product-card:nth-child(3) .product-media {
  background: var(--brand-light);
}

.product-fav,
.product-dots {
  display: none;
}

.product-card .tag {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  margin: 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 6px;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.7rem 0.8rem;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
}

.product-card .price {
  margin: 0;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  line-height: 1.1;
}

[data-theme="dark"] .product-card .price {
  color: var(--brand);
}

.price-old {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
}

.price-disc {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
}

.product-title {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-top: auto;
  padding-top: 0.45rem;
  font-size: 0.75rem;
}

.product-rating {
  font-weight: 700;
  color: #c9a227;
}

.product-reviews {
  color: var(--muted);
}

.product-action {
  margin-left: auto;
  font-weight: 700;
  color: var(--brand);
}

.product-buy {
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 28%, transparent);
}

.product-buy:hover {
  filter: brightness(1.05);
}

.product-buy:disabled {
  opacity: 0.65;
  cursor: wait;
}

.product-buy .loader {
  width: 0.85rem;
  height: 0.85rem;
  border-width: 2px;
}

.product-card.active .product-action {
  color: var(--brand-dark);
}

.field-pulse input {
  animation: fieldPulse 1.4s ease;
}

@keyframes fieldPulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent);
    border-color: var(--brand);
  }
  40% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 22%, transparent);
    border-color: var(--brand);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.field-pulse.is-invalid input,
.email-field.is-invalid input {
  border-color: var(--accent, #c2410c);
  animation: fieldPulseWarn 1.4s ease;
}

@keyframes fieldPulseWarn {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #c2410c) 45%, transparent);
    border-color: var(--accent, #c2410c);
  }
  40% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent, #c2410c) 22%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.opt {
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.opt-warn {
  color: var(--accent);
  font-weight: 700;
}

.order-window {
  display: grid;
  gap: 1rem;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scroll-margin-top: 5.5rem;
}

@media (min-width: 860px) {
  .order-window {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
    gap: 1rem;
  }
}

.shelf-packages {
  display: none;
}

.order-demo,
.order-pay {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.order-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.order-summary {
  margin-bottom: 0.55rem;
}

.order-product-name {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
}

.order-product-meta {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.order-price-block {
  margin-bottom: 0.85rem;
}

.pay-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pay-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1;
}

[data-theme="dark"] .pay-price {
  color: var(--brand);
}

.pay-old {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: line-through;
}

.pay-disc {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
}

.pay-free {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.order-pay .field {
  margin-bottom: 0.75rem;
}

.order-pay .email-field {
  margin-bottom: 0.9rem;
}

.btn-buy {
  width: 100%;
  min-height: 3.35rem;
  white-space: nowrap;
  font-size: 1.05rem;
}

.btn-buy:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, #fff);
  outline-offset: 3px;
}

.order-pay-note {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.demo-sheet {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}

.demo-badge {
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-light);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .demo-badge {
  color: var(--brand);
}

.demo-fields {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0.65rem 0.55rem;
  max-height: 16rem;
  overflow: auto;
}

.demo-fields li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.35rem 0.2rem;
  font-size: 0.82rem;
  line-height: 1.35;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.demo-fields li:last-child {
  border-bottom: 0;
}

.demo-fields .tick {
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 800;
}

.demo-note {
  margin: 0;
  padding: 0.45rem 0.75rem 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.order-fields-mini {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.order-fields-mini li {
  position: relative;
  padding-left: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

.order-fields-mini li::before {
  content: "·";
  position: absolute;
  left: 0.15rem;
  color: var(--brand);
  font-weight: 800;
}

.order-fields-mini li.more {
  color: var(--brand);
  font-weight: 700;
}

.demo-rows {
  padding: 0.25rem 0;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 0.84rem;
}

.demo-row:last-child {
  border-bottom: 0;
}

.demo-row span {
  color: var(--muted);
}

.demo-row strong {
  font-weight: 700;
  text-align: right;
}

.linkish {
  border: 0;
  background: none;
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
  padding: 0.35rem 0 0.85rem;
}

.api-catalog {
  scroll-margin-top: 5.5rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.api-catalog-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.api-catalog .buy-sub {
  margin: 0 0 1rem;
}

.services {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .services {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 0;
  width: 100%;
  text-align: left;
  border: 2px solid var(--border);
  background: var(--bg-2);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.service:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  transform: translateY(-1px);
}

.service.active {
  border-color: var(--brand);
  background: var(--brand-light);
}

.service strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
}

.service .service-info > span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.service-price {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: normal;
  color: var(--brand-dark);
}

.service-price-now {
  font-weight: 800;
  font-size: 1.05rem;
  color: inherit;
}

.service-price-free {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.service-price .price-old {
  font-size: 0.82rem;
}

.service-price .price-disc {
  font-size: 0.72rem;
}

[data-theme="dark"] .service-price {
  color: var(--brand);
}

.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-main:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hero-cta-row .btn-main {
  width: auto;
  min-width: 12rem;
}

.err {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 0.65rem;
}

.how {
  padding: 1.25rem 0 2rem;
}

.how h2 {
  margin: 0 0 1rem;
  font-family: "Source Serif 4", Georgia, serif;
}

.how-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.how-list li {
  margin-bottom: 0.55rem;
}

.how-list strong {
  color: var(--text);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a {
  color: inherit;
}

@media (max-width: 860px) {
  .order-pay {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.12);
    padding-bottom: calc(0.95rem + env(safe-area-inset-bottom, 0px));
  }
}

/* order page minimal */
.order-wrap {
  width: min(800px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.order-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.order-meta {
  color: var(--muted);
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1rem;
}

.result-head {
  padding: 1rem 1.25rem;
  background: var(--brand-light);
  border-bottom: 1px solid var(--border);
}

.result-body {
  padding: 0.5rem 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.result-foot {
  padding: 1rem 1.25rem 1.25rem;
}

.email-send {
  margin: 0 0 1rem;
  padding: 1rem 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
}

.email-send-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.email-send-note {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.email-send-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.email-send-row input {
  flex: 1 1 12rem;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: var(--bg);
  color: var(--text);
}

.email-send-row .btn-action {
  flex: 0 0 auto;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-action {
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.btn-action.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-ghost {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  text-decoration: none;
  background: transparent !important;
  border: 2px solid var(--border);
  color: var(--text);
}

.spinner-block {
  padding: 2rem;
  text-align: center;
}

.loader {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 0.45rem;
  vertical-align: -0.15em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Admin —— */
.admin-page {
  background: var(--bg);
  min-height: 100vh;
}

.admin-wrap {
  padding: 1.25rem 0 3rem;
}

.admin-card,
.admin-app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

.admin-card h1,
.admin-toolbar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-login {
  display: grid;
  gap: 0.45rem;
  max-width: 22rem;
  margin-top: 1rem;
}

.admin-login input {
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.admin-btn:hover {
  border-color: var(--brand);
}

.admin-btn--warn {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.admin-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.2rem;
}

.admin-stat span {
  font-size: 0.75rem;
  color: var(--muted);
}

.admin-stat strong {
  font-size: 1.1rem;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.admin-filters input,
.admin-filters select {
  flex: 1;
  min-width: 10rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.admin-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.admin-list {
  display: grid;
  gap: 0.45rem;
  max-height: 70vh;
  overflow: auto;
}

.admin-row {
  text-align: left;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  color: inherit;
  font: inherit;
}

.admin-row:hover,
.admin-row.active {
  border-color: var(--brand);
}

.admin-row-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.admin-row-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--border);
}

.admin-pill--ok {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.admin-pill--bad {
  background: #fee2e2;
  color: #b91c1c;
}

.admin-pill--wait {
  background: #ffedd5;
  color: #c2410c;
}

.admin-pill--run {
  background: #e0e7ff;
  color: #3730a3;
}

.admin-detail {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--bg-2);
  min-height: 12rem;
}

.admin-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-detail-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-dl {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0;
}

.admin-dl > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.admin-dl dt {
  color: var(--muted);
  margin: 0;
}

.admin-dl dd {
  margin: 0;
  word-break: break-word;
}

.admin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.admin-h3 {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.admin-table-wrap {
  overflow: auto;
  max-height: 22rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  width: 40%;
  color: var(--muted);
  font-weight: 600;
}

.bad-text {
  color: var(--danger);
}

.admin-ok {
  color: var(--brand-dark) !important;
}

