:root {
  color-scheme: light;
  --brand: #ff6b0b;
  --brand-dark: #df5100;
  --brand-soft: #fff2e9;
  --blue: #1976ed;
  --blue-dark: #105fc4;
  --ink: #172033;
  --muted: #6d788c;
  --line: #dfe5ee;
  --panel: #f7f9fc;
  --success: #14945f;
  --shadow: 0 26px 80px rgba(21, 34, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #eef3f9;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 107, 11, 0.13), transparent 34rem),
    linear-gradient(180deg, #ffffff 0, #f4f7fb 34rem, #edf2f8 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 18px 42px;
}

.payment-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(210, 219, 232, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.payment-card::after {
  position: absolute;
  top: 106px;
  right: -28px;
  width: 110px;
  height: 110px;
  border-radius: 36px;
  background: var(--brand-soft);
  content: "";
  transform: rotate(18deg);
  z-index: 0;
}

.payment-card > * {
  position: relative;
  z-index: 1;
}

.topbar,
.brand,
.session,
.section-heading,
.summary-row,
.page-footer,
.page-footer nav {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
}

.topbar > *,
form,
.form-section,
.field,
.phone-control,
.secure-method,
.secure-method > div {
  min-width: 0;
}

.brand {
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, #ff7b1f, #f25300);
  box-shadow: 0 10px 24px rgba(255, 107, 11, 0.24);
  font-size: 17px;
  font-weight: 800;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.verified-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
}

.session {
  gap: 11px;
}

.session small,
.session strong {
  display: block;
}

.session small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.session strong {
  color: var(--brand);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.timer-icon {
  position: relative;
  width: 43px;
  height: 43px;
  border: 2px solid var(--brand);
  border-radius: 50%;
}

.timer-icon::before,
.timer-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  border-radius: 4px;
  background: var(--brand);
  content: "";
  transform-origin: center bottom;
}

.timer-icon::before {
  height: 10px;
  transform: translate(-50%, -100%);
}

.timer-icon::after {
  height: 7px;
  transform: translate(-50%, -100%) rotate(120deg);
}

.preview-notice {
  display: flex;
  gap: 11px;
  margin: 26px 0 8px;
  padding: 12px 14px;
  border: 1px solid #cfe1f7;
  border-radius: 13px;
  color: #31506f;
  background: #f2f8ff;
  font-size: 13px;
  line-height: 1.45;
}

.preview-notice > span {
  display: grid;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-weight: 800;
}

.preview-notice p {
  margin: 1px 0 0;
}

.request-status {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #cfe1f7;
  border-radius: 13px;
  color: #244a72;
  background: #f3f8ff;
}

.request-status[hidden] {
  display: none;
}

.request-status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(25, 118, 237, 0.12);
}

.request-status strong {
  display: block;
  font-size: 13px;
}

.request-status p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.request-status.is-approved {
  border-color: #c7e9db;
  color: #166d50;
  background: #effaf5;
}

.request-status.is-approved .request-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(20, 148, 95, 0.12);
}

.request-status.is-rejected {
  border-color: #f0cbd0;
  color: #a8303c;
  background: #fff4f5;
}

.request-status.is-rejected .request-status-dot {
  background: #c83c48;
  box-shadow: 0 0 0 5px rgba(200, 60, 72, 0.1);
}

.amount-panel {
  padding: 30px 20px 28px;
  text-align: center;
}

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

.amount-control {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 18px 9px;
  border: 2px solid #ffb27a;
  border-radius: 18px;
  color: var(--brand);
  background: #fffaf6;
  box-shadow: 0 8px 22px rgba(255, 102, 11, 0.11);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.amount-control:focus-within {
  border-color: var(--brand);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 102, 11, 0.14), 0 10px 24px rgba(255, 102, 11, 0.14);
}

.amount-control:has(input[aria-invalid="true"]) {
  border-color: #d64444;
  box-shadow: 0 0 0 4px rgba(214, 68, 68, 0.1);
}

.currency-symbol {
  flex: 0 0 auto;
  font-size: clamp(28px, 5vw, 39px);
  font-weight: 850;
  line-height: 1;
}

.amount-control input {
  width: 6.35ch;
  min-width: 6.25ch;
  max-width: 13.25ch;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--brand);
  background: transparent;
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: left;
}

.amount-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2,
.secure-method h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.section-heading p,
.secure-method p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-chip {
  padding: 6px 9px;
  border-radius: 999px;
  color: #1b6f51;
  background: #e7f7f0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.field {
  margin-top: 16px;
}

.field.full-width {
  margin-top: 0;
}

.field label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #d9e0ea;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(25, 118, 237, 0.13);
}

.field input[aria-invalid="true"] {
  border-color: #d64444;
  box-shadow: 0 0 0 3px rgba(214, 68, 68, 0.1);
}

.field-error {
  display: block;
  min-height: 17px;
  margin: 5px 2px 0;
  color: #bb3434;
  font-size: 11px;
}

.phone-control {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 8px;
}

.secure-method {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce5f0;
  border-radius: 17px;
  background: #fff;
}

.method-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--blue);
  background: #ecf4ff;
}

.method-icon svg,
.primary-button svg,
.security-footnote svg,
.success-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.method-icon svg {
  width: 23px;
  height: 23px;
}

.consent-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  margin: 20px 2px;
  color: #4d596d;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.summary-row {
  justify-content: space-between;
  margin: 22px 0 14px;
  padding: 16px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.summary-row strong {
  color: var(--ink);
  font-size: 20px;
}

.primary-button,
.secondary-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 14px 30px rgba(25, 118, 237, 0.25);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.primary-button svg {
  width: 20px;
  height: 20px;
}

.security-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.security-footnote svg {
  width: 17px;
  height: 17px;
  color: var(--success);
  fill: rgba(20, 148, 95, 0.08);
}

.page-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 20px 6px 0;
  color: #748095;
  font-size: 11px;
}

.page-footer p {
  margin: 0;
}

.page-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.page-footer a {
  color: inherit;
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 24, 41, 0.5);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden],
.success-state[hidden],
.loading-state[hidden],
.error-state[hidden] {
  display: none;
}

.status-modal {
  width: min(100%, 410px);
  padding: 38px 30px 30px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 25px;
  background: white;
  box-shadow: 0 30px 90px rgba(10, 20, 38, 0.3);
  text-align: center;
  animation: modal-in 230ms ease-out both;
}

.spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border: 6px solid #dcecff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 780ms linear infinite;
}

.status-modal h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.status-modal p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.success-icon {
  display: grid;
  width: 67px;
  height: 67px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #25b77a, #118b59);
  box-shadow: 0 15px 28px rgba(20, 148, 95, 0.25);
}

.success-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.5;
}

.error-icon {
  display: grid;
  width: 67px;
  height: 67px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #e85b66, #b72f3c);
  box-shadow: 0 15px 28px rgba(183, 47, 60, 0.2);
  font-size: 31px;
  font-weight: 900;
}

.error-state .success-kicker {
  color: #b72f3c !important;
}

.success-kicker {
  color: var(--success) !important;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
}

.success-amount strong {
  color: var(--brand);
  font-size: 18px;
}

.no-charge {
  font-size: 12px;
}

.secondary-button {
  min-height: 48px;
  margin-top: 23px;
  color: var(--blue);
  background: #eaf3ff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .page-shell {
    width: 100vw;
    max-width: 100vw;
    padding: 0;
    overflow: hidden;
  }

  .payment-card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 22px 17px 30px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
  }

  .brand-name {
    font-size: 18px;
  }

  .session small {
    max-width: 110px;
  }

  .timer-icon {
    display: none;
  }

  .amount-panel {
    padding-inline: 0;
  }

  .form-section {
    padding: 18px 15px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-footer {
    display: block;
    padding: 20px 18px 28px;
    text-align: center;
  }

  .page-footer nav {
    justify-content: center;
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
