:root {
  --epay-navy: #1a3f6b;
  --epay-cyan: #00b9f5;
  --epay-cyan-dark: #0096cc;
  --epay-bg: #f3f7fb;
  --epay-card: #ffffff;
  --epay-text: #1f2937;
  --epay-muted: #6b7280;
  --epay-border: #e5edf5;
  --epay-success-bg: #e8f8ef;
  --epay-success: #0f9d58;
  --epay-error: #d93025;
  --shadow-sm: 0 4px 16px rgba(26, 63, 107, 0.06);
  --shadow-md: 0 12px 32px rgba(26, 63, 107, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  background: linear-gradient(180deg, #eef5fb 0%, var(--epay-bg) 40%, #f8fbff 100%);
  color: var(--epay-text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--epay-card);
  border-bottom: 1px solid var(--epay-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 16px;
  flex: 1;
}

.card {
  background: var(--epay-card);
  border: 1px solid var(--epay-border);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
}

.state-card {
  text-align: center;
}

.hidden {
  display: none;
}

.step-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 185, 245, 0.12);
  color: var(--epay-navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--epay-navy);
}

.subtitle {
  margin: 0 0 22px;
  color: var(--epay-muted);
  line-height: 1.6;
  font-size: 15px;
}

.muted {
  color: var(--epay-muted);
  line-height: 1.6;
}

.highlight {
  color: var(--epay-navy);
  font-weight: 600;
}

.details {
  border: 1px solid var(--epay-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
  background: #fbfdff;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--epay-border);
  font-size: 14px;
  align-items: flex-start;
}

.row:last-child {
  border-bottom: 0;
}

.row span {
  color: var(--epay-muted);
  flex-shrink: 0;
}

.row strong {
  text-align: right;
  color: var(--epay-text);
  font-weight: 600;
  word-break: break-word;
}

.terms {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.terms input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--epay-cyan);
  flex-shrink: 0;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--epay-cyan) 0%, var(--epay-cyan-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 185, 245, 0.28);
}

.btn.primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 185, 245, 0.34);
}

.btn.primary:disabled {
  background: #b8d9ea;
  box-shadow: none;
  cursor: not-allowed;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.otp-inputs input {
  width: 100%;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 1.5px solid var(--epay-border);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--epay-navy);
}

.otp-inputs input:focus {
  outline: none;
  border-color: var(--epay-cyan);
  box-shadow: 0 0 0 3px rgba(0, 185, 245, 0.15);
}

.error {
  color: var(--epay-error);
  font-size: 14px;
  margin: 0 0 12px;
  text-align: center;
}

.resend {
  font-size: 14px;
  color: var(--epay-muted);
  margin-bottom: 22px;
  text-align: center;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--epay-cyan-dark);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.link-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.status-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 18px;
}

.success-icon {
  background: var(--epay-success-bg);
  color: var(--epay-success);
}

.error-icon {
  background: #fdecea;
  color: var(--epay-error);
}

.loader {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(0, 185, 245, 0.18);
  border-top-color: var(--epay-cyan);
  animation: spin 0.8s linear infinite;
}

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

.footer {
  text-align: center;
  padding: 18px 16px 28px;
  color: var(--epay-muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

.footer strong {
  color: var(--epay-navy);
}

.footer-note {
  margin-top: 4px;
  font-size: 12px;
}

@media (max-width: 380px) {
  .card {
    padding: 22px 16px;
  }

  h1 {
    font-size: 22px;
  }

  .otp-inputs {
    gap: 8px;
  }

  .otp-inputs input {
    height: 46px;
    font-size: 18px;
  }
}
