:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #66737c;
  --line: #dfe6e6;
  --surface: #ffffff;
  --page: #eef3f1;
  --accent: #116b60;
  --accent-dark: #0b4f47;
  --accent-soft: #dff2ee;
  --warning: #b3261e;
  --gold: #c9942d;
  --shadow: 0 18px 40px rgba(35, 54, 60, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(17, 107, 96, 0.12), rgba(238, 243, 241, 0) 240px),
    var(--page);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 18px 28px;
  background: linear-gradient(180deg, #f8fbfa 0%, #ffffff 58%, #f6f8f7 100%);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-width: 104px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.lang-option {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.lang-option.is-active {
  color: #ffffff;
  background: var(--accent);
}

.amount-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  margin: 24px 0 18px;
}

.amount-copy,
.merchant {
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(17, 107, 96, 0.16);
  border-radius: 8px;
  background: var(--surface);
}

.amount-copy span,
.merchant span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.amount-copy strong,
.merchant strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  line-height: 1.08;
}

.merchant strong {
  font-size: 17px;
}

.payment-form {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label {
  color: #26343a;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: 0;
}

select {
  appearance: none;
  padding-right: 42px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(17, 107, 96, 0.12);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.type-option.is-selected {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(17, 107, 96, 0.2);
}

.amount-entry {
  display: grid;
  gap: 10px;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.amount-chip {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 850;
}

.amount-chip.is-selected {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.custom-amount {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    "label label"
    "currency input";
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.custom-amount label {
  grid-area: label;
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.custom-amount span {
  grid-area: currency;
  width: 42px;
  color: var(--accent);
  text-align: center;
  font-weight: 900;
}

.custom-amount input {
  grid-area: input;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding-left: 0;
  box-shadow: none;
}

.input-with-tag {
  position: relative;
}

.input-with-tag input {
  padding-right: 70px;
}

.input-with-tag span {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 48px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #ffffff;
  background: #1d4f91;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.billing-section {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.billing-section h2 {
  margin: 0;
  color: #26343a;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.field-error,
.field-note {
  min-height: 16px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.field-error {
  color: var(--warning);
}

.field-note {
  color: var(--muted);
}

.consent-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.consent-line input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.pay-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(17, 107, 96, 0.22);
}

.pay-button:active {
  transform: translateY(1px);
}

.security-note {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  width: min(calc(100% - 36px), 394px);
  transform: translate(-50%, 16px);
  padding: 14px 16px;
  border-radius: 8px;
  color: #ffffff;
  background: #172126;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 14px;
  font-weight: 750;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 14px;
  }

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