:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5f687a;
  --line: #e7e9f0;
  --surface-soft: #f7f8fc;
  --brand: #6758e8;
  --brand-dark: #5143cf;
  --brand-soft: #efedff;
  --danger: #d7475d;
  --danger-soft: #fff0f2;
  --shadow: 0 24px 70px rgba(29, 22, 82, .18);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #2f286f; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 163, 106, .24), transparent 28rem),
    radial-gradient(circle at 92% 92%, rgba(116, 227, 215, .16), transparent 30rem),
    linear-gradient(145deg, #2d276a 0%, #5144ad 52%, #392f82 100%);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, input[type="submit"] { -webkit-tap-highlight-color: transparent; }

.app-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 20px;
  overflow: hidden;
}

.app-shell::before, .app-shell::after {
  position: fixed;
  z-index: -1;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 46% 54% 63% 37%;
  content: "";
  pointer-events: none;
}
.app-shell::before { top: -115px; right: -65px; transform: rotate(24deg); }
.app-shell::after { bottom: -150px; left: -75px; width: 310px; height: 310px; transform: rotate(-18deg); }

.app-card {
  width: min(100%, 480px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7465f2, #5545d5);
  box-shadow: 0 10px 22px rgba(103, 88, 232, .3);
}
.brand__mark svg { width: 25px; height: 25px; }
.brand__name { margin: 0; font-size: 18px; font-weight: 760; letter-spacing: -.025em; }
.brand__tagline { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.page-title { margin-bottom: 10px; font-size: clamp(28px, 8vw, 38px); line-height: 1.08; letter-spacing: -.045em; }
.page-copy { margin-bottom: 28px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; color: #3b4355; font-size: 13px; font-weight: 700; }
.input-wrap { position: relative; }
.input-wrap input, .field input:not([type="hidden"]) {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.input-wrap input { padding-right: 70px; }
.input-wrap input[type="number"] { appearance: textfield; }
.input-wrap input[type="number"]::-webkit-inner-spin-button,
.input-wrap input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.input-wrap input:focus, .field input:not([type="hidden"]):focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(103, 88, 232, .12); }
.input-suffix { position: absolute; top: 50%; right: 16px; color: var(--muted); font-size: 13px; font-weight: 750; transform: translateY(-50%); pointer-events: none; }

.button, button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 25px rgba(83, 68, 211, .24);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.button:hover, button:hover, input[type="submit"]:hover { filter: brightness(1.05); box-shadow: 0 15px 30px rgba(83, 68, 211, .3); transform: translateY(-1px); }
.button:active, button:active, input[type="submit"]:active { box-shadow: 0 7px 16px rgba(83, 68, 211, .22); transform: translateY(1px); }
.order-actions form + form button { color: var(--brand); background: var(--brand-soft); box-shadow: none; }

.form-note { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-note svg { flex: 0 0 auto; width: 15px; margin-top: 1px; }
.error-message, [role="alert"]:not(:empty) { padding: 11px 13px; border-radius: 10px; color: var(--danger); background: var(--danger-soft); font-size: 13px; line-height: 1.45; }
.field [role="alert"] { margin: 7px 0 0; padding: 0; background: transparent; }

.quote-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 28px; padding: 18px; border: 1px solid #e9e6ff; border-radius: 18px; background: linear-gradient(140deg, #f8f7ff, #f1efff); }
.quote-card__value { margin: 4px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.quote-card > div { min-width: 0; }
.quote-card__value { overflow-wrap: anywhere; }
.quote-card__label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.quote-card__arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--brand); background: #fff; }
.quote-card__arrow svg { width: 15px; }
.step-indicator { display: flex; gap: 7px; margin-bottom: 26px; }
.step-indicator span { width: 30px; height: 4px; border-radius: 99px; background: var(--line); }
.step-indicator .is-complete, .step-indicator .is-current { background: var(--brand); }
.form-section-title { margin: 0 0 20px; font-size: 19px; letter-spacing: -.025em; }

.status-card { padding: 24px; border: 1px solid #e9e6ff; border-radius: 20px; background: linear-gradient(145deg, #faf9ff, #f3f1ff); text-align: center; }
.status-icon, .loading-ring { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; color: var(--brand); background: #fff; box-shadow: 0 8px 24px rgba(74, 61, 160, .12); }
.status-icon svg { width: 28px; height: 28px; }
[data-provider-status="SUCCESS"] .status-icon { color: #18865f; background: #e7f7f1; }
[data-provider-status="ERROR"] .status-icon,
.status-card--error .status-icon { color: var(--danger); background: var(--danger-soft); }
.loading-ring::before { width: 25px; height: 25px; border: 3px solid #dedaff; border-top-color: var(--brand); border-radius: 50%; content: ""; animation: spin 900ms linear infinite; }
.status-heading { margin-bottom: 8px; font-size: 20px; letter-spacing: -.025em; }
.status-copy { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.status-code { display: inline-block; margin-top: 14px; padding: 5px 9px; border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, .8); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.status-expiry { margin: 13px 0 0; color: var(--muted); font-size: 11px; }
.status-card button { margin-top: 20px; }
.order-actions { display: grid; gap: 10px; margin-top: 14px; }
.order-actions form, .order-actions form button { width: 100%; }
.auth-card { text-align: center; }
.auth-card .brand { justify-content: center; }
.auth-card .loading-ring { margin-top: 28px; }

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

@media (max-width: 540px) {
  .app-shell { align-items: flex-start; padding: 0; background: #fff; }
  .app-shell::before, .app-shell::after { display: none; }
  .app-card { min-height: 100vh; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .brand { margin-bottom: 30px; }
}

@media (max-width: 350px) {
  .quote-card { grid-template-columns: 1fr; }
  .quote-card__arrow { transform: rotate(90deg); }
}

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