:root {
  --bg: #f3f8f5;
  --bg-2: #e7f2ec;
  --paper: #ffffff;
  --ink: #1a1620;
  --muted: #6b6470;
  --soft: #6f6f6f;
  --line: rgba(26, 22, 32, 0.09);
  --tab: #e5efe9;
  --jade: #3db87a;
  --jade-deep: #2d9a66;
  --jade-dark: #1e7a50;
  --outline: #3db87a;
  --link: #2f6fed;
  --shadow: 0 18px 50px rgba(30, 80, 55, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, Inter, Arial, sans-serif;
}

.is-hidden {
  display: none !important;
}

.page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 28px 20px 80px;
  background: var(--bg);
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(61, 184, 122, 0.1), transparent 36%),
    radial-gradient(circle at 85% 90%, rgba(45, 154, 102, 0.08), transparent 34%),
    linear-gradient(180deg, #f7fbf9 0%, var(--bg) 52%, var(--bg-2) 100%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin: 0 0 28px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.brand-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name strong {
  font-family: Syne, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-name strong span {
  color: var(--jade);
}

.brand-name em {
  color: #8d8d8d;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero {
  padding: 42px 48px 40px;
  background: var(--paper);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin-bottom: 28px;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.hero h2 {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 700;
}

.offer-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.offer-list {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.promo-link,
.promo-form button {
  color: var(--link);
  background: none;
  border: 0;
  font: 600 15px/1.2 Manrope, sans-serif;
  cursor: pointer;
}

.promo-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.promo-form input {
  width: 160px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 15px Manrope, sans-serif;
}

.promo-msg {
  width: 100%;
  color: var(--jade);
  font-size: 13px;
}

.promo-msg.is-error {
  color: #c0392b;
}

.amount-label {
  display: block;
  margin: 28px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.amount {
  margin-bottom: 28px;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--jade);
  color: #fff;
  font: 700 15px/1 Manrope, sans-serif;
  cursor: pointer;
}

.btn-fill:hover {
  background: var(--jade-deep);
}

.btn-fill:disabled,
.btn-ghost:disabled {
  color: #8a8a8a;
  background: #e8e8e8;
  border-color: #d0d0d0;
  cursor: not-allowed;
  pointer-events: none;
}

.methods {
  margin-top: 54px;
}

.methods > h2 {
  margin-bottom: 18px;
  font-family: Syne, Manrope, sans-serif;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel {
  overflow: hidden;
  background: var(--tab);
  border-radius: 22px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tab {
  min-height: 56px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #4a4a4a;
  font: 700 15px/1 Manrope, sans-serif;
  cursor: pointer;
}

.tab:first-child {
  border-top-left-radius: 22px;
}

.tab:last-child {
  border-top-right-radius: 22px;
}

.tab.is-active {
  background: var(--paper);
  color: var(--ink);
}

.grids {
  display: grid;
  background: var(--paper);
}

.grid {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
  padding: 22px;
  visibility: hidden;
  pointer-events: none;
}

.grid.is-active {
  visibility: visible;
  pointer-events: auto;
}

.method {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 230px;
  padding: 22px 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
}

.method img {
  max-width: 160px;
  max-height: 52px;
  object-fit: contain;
}

.method-name {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.method-note,
.method-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.method-hint.is-warn {
  color: #c0392b;
}

.term-select {
  width: 100%;
  max-width: 230px;
  margin: 0;
  padding: 8px 32px 8px 12px;
  color: #4a4a4a;
  background-color: #f3f3f3;
  background-image: linear-gradient(45deg, transparent 50%, #8b8b8b 50%),
    linear-gradient(135deg, #8b8b8b 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  font: 13px/1.3 Manrope, sans-serif;
  appearance: none;
}

.btn-ghost {
  flex-shrink: 0;
  min-height: 40px;
  margin-top: auto;
  padding: 0 22px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: transparent;
  color: var(--jade-dark);
  font: 600 14px/1 Manrope, sans-serif;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(61, 184, 122, 0.08);
}

.method-pokupay {
  min-height: 280px;
  padding-bottom: 28px;
}

.method-pokupay .btn-ghost {
  margin-top: 28px;
}

.method-split {
  align-self: start;
  min-height: 0;
}

.method-split .btn-ghost {
  margin-top: 12px;
}

.legal {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.legal a {
  color: var(--jade-dark);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 22, 18, 0.45);
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.modal-lg {
  width: min(720px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h3 {
  font-size: 22px;
}

.modal-close {
  border: 0;
  background: none;
  color: #999;
  font-size: 28px;
  cursor: pointer;
}

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

.form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.form input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 15px Manrope, sans-serif;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qr-row {
  display: flex;
  gap: 18px;
  align-items: center;
}

.qr {
  width: 200px;
  height: 200px;
  flex: 0 0 200px;
  border: 1px solid var(--line);
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 520px;
  margin: 80px auto 0;
  padding: 48px 24px;
  background: #fff;
  border-radius: 36px;
  box-shadow: var(--shadow);
  text-align: center;
}

.success b {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #e8f8ef;
  color: var(--jade);
  font-size: 36px;
}

.success h1 {
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.success p {
  color: var(--soft);
}

.success a {
  margin-top: 22px;
  text-decoration: none;
}

.pay-error {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  width: min(520px, calc(100% - 32px));
  padding: 12px 16px;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e0b4b4;
  border-radius: 12px;
  color: #9a2a2a;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .hero {
    padding: 28px 22px;
  }

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

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

  .qr-row {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .amount {
    white-space: normal;
  }
}
