:root {
  --bg: #141b21;
  --card: #07090c;
  --green: #9cbe3f;
  --green-hover: #aecf4c;
  --red: #c4423f;
  --white: #ffffff;
  --muted: #7d8087;
  --disabled: #6f6f6f;
  --line: #3a3f45;
  --radius: 6px;
  --font-head: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* ---------- шапка ---------- */
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
}
.phone { color: var(--green); text-decoration: none; font-family: var(--font-head); font-size: 16px; font-weight: 500; }

main { padding: 8px 0 0; }
h1 {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(26px, 4.5vw, 38px);
  margin: 4px 0 28px;
  letter-spacing: -0.01em;
}

/* ---------- карточка ---------- */
.card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 56px;
  margin-bottom: 48px;
  padding: 24px 80px 56px;
}

/* ---------- шаги ---------- */
.steps {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.steps li {
  position: relative;
  flex: 0 0 auto;
  min-width: 90px;
  padding: 5px 18px;
  border: 1px solid #8c8f93;
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  color: #b9bcc0;
  background: var(--card);
  z-index: 1;
}
.steps li.active, .steps li.done {
  background: var(--green);
  border-color: var(--green);
  color: #13181d;
}
.steps::before { content: none; }
.steps li + li { margin-left: 0; }
.steps { background: linear-gradient(#5b6066, #5b6066) center / 100% 1px no-repeat; }

/* ---------- шаг 1 ---------- */
.step-login { display: flex; flex-direction: column; align-items: center; gap: 0; }
.lead { margin: 0 0 18px; font-size: 15px; text-align: center; }
.field {
  width: 250px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: #1a1f24;
  font: 600 15px var(--font);
  padding: 0 18px;
  outline: none;
}
.field::placeholder { color: #8b8f94; }
.field:focus-visible { box-shadow: 0 0 0 3px rgba(156, 190, 63, .55); }
.step-login .field { margin-bottom: 24px; }
.pin-wrap { position: relative; }
.pin-wrap .field { padding-right: 46px; }
.eye {
  position: absolute; right: 8px; top: 6px;
  width: 32px; height: 30px; border: 0; background: none; color: #1a1f24; cursor: pointer;
  display: grid; place-items: center;
}
.eye.shown .slash { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 250px; height: 42px; padding: 0 24px;
  border: 0; border-radius: var(--radius);
  background: var(--green); color: #13181d;
  font: 700 15px var(--font);
  cursor: pointer; text-decoration: none;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--green-hover); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-wide { min-width: 0; width: 100%; max-width: 344px; height: 58px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--green); border: 1px solid var(--green); }
.btn-ghost:hover { background: rgba(156, 190, 63, .1); }

.error { color: #ff7a73; font-size: 14px; min-height: 18px; margin: -8px 0 14px; text-align: center; }
.error:empty { min-height: 0; margin: 0; }
.link { background: none; border: 0; color: var(--muted); font: 600 13px var(--font); cursor: pointer; padding: 0; margin-top: 18px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #b9bcc0; }

/* ---------- шаг 2 ---------- */
h3 { font-size: 16px; margin: 0 0 18px; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.grid2 p { margin: 0 0 6px; }
.muted { color: var(--muted); }
.status { color: var(--green); line-height: 1.5; margin: 0; }
.status.expired { color: #ff7a73; }

.terminals { width: 128px; height: 50px; text-align: center; font-size: 16px; margin-bottom: 40px; cursor: default; }

.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.tariff { position: relative; }
.tariff button {
  width: 100%; height: 50px;
  border: 0; border-radius: var(--radius);
  background: #fff; color: var(--green);
  font: 700 16px var(--font);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tariff button:hover:not(:disabled) { background: #eef4dc; }
.tariff button[aria-checked="true"] { background: var(--green); color: #13181d; }
.tariff button:disabled { background: var(--disabled); color: #2a2d31; cursor: not-allowed; }
.tariff button:focus-visible { outline: 3px solid rgba(156, 190, 63, .55); outline-offset: 2px; }
.badge {
  position: absolute; top: -8px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  pointer-events: none;
}
.valid { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 6px; }

.notice {
  text-align: center; font-weight: 500; font-size: 16px; line-height: 1.45;
  max-width: 480px; margin: 8px auto 32px;
}
.notice span { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; }

.pay-actions { flex: 0 1 420px; }
.pay-label { margin: 0 0 10px; font-size: 14px; color: #b9bcc0; }
.pay-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-buttons .btn { min-width: 0; height: 58px; font-size: 15px; padding: 0 12px; }
.pay-buttons .btn.loading { opacity: .6; cursor: progress; }
.pay-error { text-align: right; margin-top: 14px; }

hr { border: 0; border-top: 1px solid #e8e8e8; margin: 0 0 36px; }
.total-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.total-row h3 { margin-bottom: 10px; }
.total { color: var(--green); font-family: var(--font-head); font-size: 28px; font-weight: 600; white-space: nowrap; }

/* ---------- шаг 3 ---------- */
.pay-grid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.qr-box { background: #fff; border-radius: 12px; padding: 10px; width: 260px; height: 260px; display: grid; place-items: center; }
.qr-box img { width: 240px; height: 240px; image-rendering: pixelated; }
.pay-info h3 { margin-bottom: 6px; }
.pay-info .muted { margin: 0 0 14px; line-height: 1.45; }
.pay-info .total { margin-bottom: 18px; }
.howto { margin: 0 0 22px; padding-left: 20px; color: #c9ccd0; font-weight: 500; font-size: 14px; line-height: 1.6; }
.pay-links { display: flex; flex-direction: column; gap: 10px; max-width: 300px; }
.pay-links .btn { min-width: 0; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 28px 0 0; }
.spinner { width: 16px; height: 16px; border: 2px solid #3a3f45; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.step-result { text-align: center; padding-top: 24px; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-size: 36px; }
.result-icon.ok { background: var(--green); color: #13181d; }
.result-icon.fail { background: var(--red); color: #fff; }
.step-result h2 { font-family: var(--font-head); font-weight: 600; font-size: 24px; margin: 0 0 10px; }
.step-result p { margin: 0 0 28px; line-height: 1.5; }

/* ---------- адаптив ---------- */
@media (max-width: 760px) {
  .card { padding: 22px 20px 40px; border-radius: 32px; margin: 0 12px 32px; }
  .steps li { min-width: 0; padding: 5px 12px; font-size: 13px; }
  .grid2 { grid-template-columns: 1fr; gap: 20px; }
  .tariffs { grid-template-columns: 1fr; gap: 22px; }
  .total-row { flex-direction: column; align-items: stretch; }
  .pay-actions { flex-basis: auto; }
  .pay-buttons { grid-template-columns: 1fr; }
  .pay-error { text-align: center; }
  .pay-grid { grid-template-columns: 1fr; justify-items: center; }
  .pay-links { max-width: none; width: 100%; }
  .topbar { padding: 16px; }
  .logo { font-size: 17px; }
  .phone { font-size: 14px; }
}
.receipt { color: var(--green); font-size: 15px; }
