/* ─────────────────────────────────────────────────────────────────
   Aesthetic: fintech glass.
   Deep midnight gradient with soft starlight; a single floating
   glass card; one emerald accent for approval, one soft crimson for
   decline. Hanken Grotesk + Geist Mono — no Inter / Roboto.
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --font-ui:   'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --midnight:    #0a0f1f;
  --midnight-2:  #131a30;
  --midnight-3:  #1c2444;
  --glass:       rgba(255, 255, 255, 0.06);
  --glass-strong:rgba(255, 255, 255, 0.10);
  --glass-edge:  rgba(255, 255, 255, 0.14);
  --hairline:    rgba(255, 255, 255, 0.08);
  --ink:         #f4f6fb;
  --ink-mute:    #a3acc4;
  --ink-faint:   #6b7592;

  --emerald:     #10b981;
  --emerald-2:   #34d399;
  --emerald-deep:#047857;
  --crimson:     #f87171;
  --crimson-soft:#fda4af;
  --amber:       #fbbf24;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(16, 185, 129, 0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(124, 58, 237, 0.08), transparent 60%),
    linear-gradient(180deg, var(--midnight) 0%, var(--midnight-2) 60%, var(--midnight-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

/* Starfield: a sparse dot grid for atmosphere */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 16% 24%, rgba(255,255,255,0.5) 1px, transparent 1px),
    radial-gradient(circle at 72% 12%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 38% 68%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle at 88% 82%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 52% 92%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle at 4% 88%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 64% 48%, rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.provider {
  max-width: 460px;
  margin: 48px auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────────── */

header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 4px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo::before {
  content: '◉';
  color: var(--emerald);
  font-size: 14px;
}

.env-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ── Glass card ──────────────────────────────────────────────────── */

main {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(255, 255, 255, 0.05) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 16px 32px -8px rgba(0, 0, 0, 0.4);
  position: relative;
}

main h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--ink);
}

.merchant {
  margin: 0 0 28px;
  color: var(--ink-mute);
  font-size: 14px;
}
.merchant strong { color: var(--ink); font-weight: 600; }

/* Amount block */

.amount {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 48px;
  text-align: center;
  margin: 20px 0 28px;
  letter-spacing: -0.03em;
  color: var(--ink);
  position: relative;
  padding: 12px 0;
}
.amount::before, .amount::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-edge), transparent);
  transform: translateX(-50%);
}
.amount::before { top: 0; }
.amount::after  { bottom: 0; }

/* Detail rows */

dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  padding: 16px 0 8px;
  margin: 0 0 28px;
}
dl dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
dl dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* Actions */

.actions {
  display: flex;
  gap: 8px;
}
.actions button {
  flex: 1;
  padding: 14px 16px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
  position: relative;
}
.actions .decline {
  background: var(--glass);
  color: var(--crimson-soft);
  border: 1px solid var(--glass-edge);
}
.actions .decline:hover {
  background: rgba(248, 113, 113, 0.12);
  color: var(--crimson);
  border-color: rgba(248, 113, 113, 0.4);
}
.actions .approve {
  background: linear-gradient(180deg, var(--emerald-2), var(--emerald));
  color: #03301c;
  border: 1px solid var(--emerald-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 20px -6px rgba(16, 185, 129, 0.5);
}
.actions .approve:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 12px 28px -8px rgba(16, 185, 129, 0.6);
}
.actions .approve:focus-visible {
  outline: 2px solid var(--emerald-2);
  outline-offset: 3px;
}

.footer-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.6;
  font-family: var(--font-ui);
}

.footer-note code {
  font-family: var(--font-mono);
  background: var(--glass);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-mute);
}

/* Card + OTP forms */

.card-form,
.otp-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 18px 0 0;
}

.card-form label,
.otp-form label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-top: 8px;
}

.card-form input,
.otp-form input {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.02em;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.card-form input::placeholder,
.otp-form input::placeholder {
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.card-form input:focus,
.otp-form input:focus {
  border-color: var(--emerald-2);
  background: var(--glass-strong);
}

.otp-form .error {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--crimson);
  font-family: var(--font-ui);
}

/* Disabled approve button — keep readable, drop the gradient. */
.actions .approve:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}
.actions .approve:disabled:hover {
  transform: none;
}

.card-form .actions,
.otp-form .actions {
  margin-top: 18px;
}

/* Result states */

.result { text-align: center; padding: 16px 0; }
.result h1 {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.result.approved h1 {
  color: var(--emerald-2);
}
.result.declined h1 {
  color: var(--crimson);
}
.result p { color: var(--ink-mute); font-size: 14px; }
