:root {
  --navy: #0f172a;
  --navy-2: #1e2542;
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --purple-soft: #f4eefe;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-soft: #fff1e6;
  --green: #16a34a;
  --red: #dc2626;
  --bg: #f7f6fb;
  --card-border: #ece8f7;
  --ink: #0f172a;
  --muted: #5b6478;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  background: var(--bg);
}

body.checkout-reference {
  min-height: 100vh;
  padding: 28px 32px 60px;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.06), transparent 40%),
    var(--bg);
}

.checkout-reference button,
.checkout-reference input {
  font: inherit;
}

.checkout-reference a {
  color: inherit;
  text-decoration: none;
}

.checkout-reference h1,
.checkout-reference h2,
.checkout-reference h3 {
  font-family: "Sora", sans-serif;
}

.checkout-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Topo */
.checkout-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.checkout-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.checkout-logo__image {
  width: 52px;
  height: 52px;
  display: block;
  flex: 0 0 52px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(15, 23, 42, 0.14));
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-step__circle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  border: 2px solid var(--card-border);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.checkout-step__circle.is-done {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.checkout-step__circle.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.checkout-step__text b,
.checkout-step__text span {
  display: block;
  white-space: nowrap;
}

.checkout-step__text b {
  color: var(--navy-2);
  font-size: 13.5px;
  font-weight: 700;
}

.checkout-step__text span {
  color: var(--muted);
  font-size: 11.5px;
}

.checkout-step__line {
  width: 56px;
  height: 2px;
  background: var(--card-border);
}

.checkout-step__line.is-done {
  background: var(--purple);
}

/* Titulo */
.checkout-title h1 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: clamp(31px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.checkout-title h1 span {
  color: var(--orange);
}

.checkout-title p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 15.5px;
}

.checkout-flashes {
  display: grid;
  gap: 10px;
  margin: -4px 0 22px;
}

.checkout-flash {
  padding: 12px 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 13px;
  font-weight: 700;
}

.checkout-flash.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

/* Colunas */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr);
  gap: 28px;
  align-items: start;
}

.checkout-form-card,
.checkout-plan-card {
  border: 1.5px solid var(--card-border);
  background: #fff;
}

.checkout-form-card {
  padding: 34px 36px;
  border-radius: 22px;
}

.checkout-form-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.checkout-form-head__avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  border-radius: 13px;
  background: var(--purple-soft);
  color: var(--purple);
}

.checkout-form-head h2 {
  color: var(--navy);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.checkout-form-head p {
  color: var(--muted);
  font-size: 13px;
}

.checkout-field {
  margin-bottom: 20px;
}

.checkout-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-2);
  font-size: 13.5px;
  font-weight: 700;
}

.checkout-input-wrap {
  position: relative;
}

.checkout-input-wrap .icon-left {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  color: #9aa2b2;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.15s ease;
}

.checkout-input-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 12px 42px;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.checkout-input-wrap input::placeholder {
  color: #aeb4c2;
}

.checkout-input-wrap:focus-within input {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.checkout-input-wrap:focus-within .icon-left {
  color: var(--purple);
}

.checkout-input-wrap input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.checkout-input-wrap input.is-valid {
  padding-right: 44px;
  background: #f1f6ff;
}

.checkout-input-status {
  position: absolute;
  top: 50%;
  right: 14px;
  display: none;
  align-items: center;
  color: var(--green);
  transform: translateY(-50%);
}

.checkout-input-wrap input.is-valid + .checkout-input-status,
.checkout-input-status.is-visible {
  display: flex;
}

.checkout-eye {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  padding: 6px;
  border: 0;
  background: none;
  color: #9aa2b2;
  cursor: pointer;
  transform: translateY(-50%);
}

.checkout-eye:hover,
.checkout-eye:focus-visible {
  color: var(--navy-2);
}

.checkout-field__error,
.checkout-email-status {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.checkout-field__error {
  color: var(--red);
}

.checkout-email-status {
  color: var(--muted);
}

.checkout-email-status.is-available {
  color: var(--green);
}

.checkout-email-status.is-exists {
  color: var(--red);
}

.checkout-email-status[hidden],
.checkout-field__error:empty {
  display: none;
}

.checkout-pending-account {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #ddd6fe;
  border-radius: 13px;
  background: #f5f3ff;
  color: #4c1d95;
  font-size: 13px;
}

.checkout-pending-account strong {
  display: block;
  margin-bottom: 3px;
}

.checkout-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -2px 0 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
}

.checkout-acceptance input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--purple);
}

.checkout-submit {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding: 14px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 16px 30px -12px rgba(249, 115, 22, 0.55);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.checkout-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(249, 115, 22, 0.66);
}

.checkout-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.checkout-submit__spinner {
  width: 17px;
  height: 17px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: checkout-spin 0.7s linear infinite;
}

.checkout-submit.is-loading .checkout-submit__spinner {
  display: inline-block;
}

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

.checkout-submit-status {
  margin-top: 10px;
  color: var(--red);
  font-size: 12px;
  text-align: center;
}

.checkout-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* Resumo */
.checkout-plan-card {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border-radius: 22px;
}

.checkout-plan-banner {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  background: linear-gradient(135deg, var(--navy), #2a1a4d 60%, #3b1e63);
  color: #fff;
}

.checkout-plan-banner::before {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 70%);
  content: "";
}

.checkout-plan-banner__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.checkout-plan-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), #fb923c);
}

.checkout-plan-banner__eyebrow {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.checkout-plan-banner h3 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
}

.checkout-plan-banner p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
}

.checkout-plan-body {
  padding: 26px 28px;
}

.checkout-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  font-size: 14px;
}

.checkout-price-row span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.checkout-price-row strong {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.checkout-price-row.is-discount span,
.checkout-price-row.is-discount strong {
  color: var(--green);
}

.checkout-total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--orange-soft);
}

.checkout-total-box__label {
  display: block;
  margin-bottom: 4px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.checkout-total-box__amount {
  display: block;
  color: var(--orange-dark);
  font-family: "Sora", sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.checkout-save-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.checkout-next-charge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.checkout-next-charge span {
  display: block;
}

.checkout-next-charge__label {
  color: var(--navy-2);
  font-size: 13.5px;
  font-weight: 700;
}

.checkout-next-charge__sub {
  color: var(--muted);
  font-size: 11.5px;
}

.checkout-next-charge__value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.checkout-included-label {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.checkout-included-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 22px;
  list-style: none;
}

.checkout-included-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--navy-2);
  font-size: 13.5px;
  font-weight: 600;
}

.checkout-included-list__tick {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 19px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
}

.checkout-payments {
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.checkout-payments__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.checkout-payments__head > svg {
  flex: 0 0 auto;
  color: var(--navy-2);
}

.checkout-payments__head b,
.checkout-payments__head span {
  display: block;
}

.checkout-payments__head b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.checkout-payments__head span {
  color: var(--muted);
  font-size: 11.5px;
}

.checkout-payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkout-payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--navy-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.checkout-back-link {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.checkout-back-link:hover {
  color: var(--purple);
}

@media (max-width: 1000px) {
  .checkout-steps { display: none; }
}

@media (max-width: 960px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-plan-card { position: static; }
}

@media (max-width: 640px) {
  body.checkout-reference { padding: 20px 16px 40px; }
  .checkout-topbar { margin-bottom: 28px; }
  .checkout-title h1 { font-size: 30px; }
  .checkout-title p { margin-bottom: 18px; font-size: 14px; }
  .checkout-form-card { padding: 25px 20px; border-radius: 18px; }
  .checkout-plan-card { border-radius: 18px; }
  .checkout-plan-banner,
  .checkout-plan-body { padding: 22px 20px; }
  .checkout-total-box { align-items: flex-start; flex-direction: column; }
  .checkout-save-badge { white-space: normal; }
  .checkout-next-charge { align-items: flex-start; }
  .checkout-next-charge__value { white-space: normal; }
  .checkout-payment-badge { padding: 7px 9px; }
}

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