:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #161a2e;
  --muted: #61667d;
  --line: #e3e6f0;
  --primary: #4f46e5;
  --primary-ink: #ffffff;
  --accent: #f97316;
  --accent-soft: #fff1e6;
  --ok: #059669;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(22, 26, 46, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 Rubik, system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 4.5vw, 28px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }
.narrow { max-width: 560px; }

.topbar { max-width: 1080px; margin: 0 auto; padding: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; display: grid; place-items: center; font-weight: 800; }

.eyebrow { margin: 0 0 8px; color: var(--primary); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.error { color: var(--danger); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 20px; font: 600 16px Rubik, sans-serif; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { background: #c9ccd8; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-lg { width: 100%; padding: 16px 22px; font-size: 18px; border-radius: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 16px; }
.price-now { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.price-was { color: var(--muted); text-decoration: line-through; font-size: 18px; }
.badge { background: var(--accent-soft); color: #c2410c; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; }

/* home */
.home-hero { padding: 24px 0 28px; max-width: 720px; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.card img { border-radius: 10px; }
.card h2 { font-size: 20px; margin-bottom: 6px; }
.card p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.card .price-now { font-size: 22px; }

/* product */
.product-hero { display: grid; gap: 24px; padding-top: 8px; }
.cover img { border-radius: 14px; box-shadow: 0 24px 50px rgba(22, 26, 46, 0.25); }
.cover { max-width: 300px; margin: 0 auto; }
.stats { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats li { background: var(--surface); border-radius: 14px; padding: 10px 8px; text-align: center; box-shadow: var(--shadow); }
.stats strong { display: block; font-size: 22px; font-weight: 800; color: var(--primary); }
.stats span { font-size: 12px; color: var(--muted); line-height: 1.2; display: block; }

.block { background: var(--surface); border-radius: var(--radius); padding: 24px 20px; margin-top: 24px; box-shadow: var(--shadow); }
.previews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.previews figure { margin: 0; }
.previews img { border-radius: 10px; border: 1px solid var(--line); }
.previews figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }

.topics { list-style: none; counter-reset: t; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
.topics li { counter-increment: t; display: grid; grid-template-columns: 36px 1fr; column-gap: 8px; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.topics li::before { content: counter(t, decimal-leading-zero); grid-row: span 2; color: var(--primary); font-weight: 700; }
.topics strong { font-weight: 600; }
.topics span { color: var(--muted); font-size: 14px; }
.extras { margin: 14px 0 0; font-weight: 500; }

.two-col { display: grid; gap: 24px; }
.checks, .steps { margin: 0; padding-left: 20px; }
.checks li, .steps li { margin-bottom: 8px; }
.checks { list-style: none; padding: 0; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }

.cta { text-align: center; }
.cta .price { justify-content: center; }
.cta .btn-lg { max-width: 420px; }

/* buy sheet */
.sheet { border: 0; padding: 0; border-radius: 22px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); }
.sheet::backdrop { background: rgba(22, 26, 46, 0.55); }
.sheet-body { padding: 24px 20px; display: grid; gap: 12px; position: relative; }
.sheet-price { font-size: 28px; font-weight: 800; margin: 0; }
.sheet label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
.sheet input { font: 16px Rubik, sans-serif; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); }
.sheet input:focus { outline: none; border-color: var(--primary); }
.close { position: absolute; right: 12px; top: 10px; background: none; border: 0; font-size: 28px; color: var(--muted); cursor: pointer; }
.qr { width: 220px; margin: 0 auto; }
.banks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.banks a { display: grid; gap: 4px; justify-items: center; font-size: 11px; color: var(--ink); text-decoration: none; text-align: center; }
.banks img { width: 48px; height: 48px; border-radius: 12px; }
.waiting { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); margin: 4px 0 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* order */
.order { background: var(--surface); border-radius: var(--radius); padding: 28px 20px; margin-top: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.order p { margin: 0; }
.note { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
.footer p { margin: 4px 0; }

/* admin */
.admin h2 { margin-top: 32px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.kpi strong { display: block; font-size: 24px; }
.kpi span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr.paid td:nth-child(2) { color: var(--ok); font-weight: 600; }
.price-form { background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 10px; max-width: 420px; }
.price-form label { display: grid; gap: 4px; font-size: 14px; }
.price-form input { font: 16px Rubik, sans-serif; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); }

@media (min-width: 760px) {
  .product-hero { grid-template-columns: 340px 1fr; gap: 48px; align-items: center; padding-top: 24px; }
  .cover { max-width: none; }
  .previews { grid-template-columns: repeat(4, 1fr); }
  .topics { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .block { padding: 32px; }
  .btn-lg { width: auto; min-width: 280px; }
}
