:root {
  --green-900: #123c22;
  --green-800: #1b5e20;
  --green-600: #2f8f46;
  --green-100: #e8f5ea;
  --gold: #c99a2e;
  --ink: #142019;
  --muted: #66756b;
  --line: #dfe8e1;
  --danger: #b42318;
  --white: #fff;
  --shadow: 0 22px 70px rgba(18, 60, 34, .16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f7fbf7 0%, #eef6ef 55%, #f8f1df 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.checkout-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .9fr 1.35fr;
  gap: 28px;
  align-items: center;
  padding: 40px 0;
}

.brand-panel,
.checkout-card {
  border: 1px solid rgba(27, 94, 32, .12);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.brand-panel {
  min-height: 680px;
  border-radius: 18px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(rgba(18, 60, 34, .86), rgba(18, 60, 34, .78)),
    url("https://images.unsplash.com/photo-1500595046743-cd271d694d30?auto=format&fit=crop&w=1200&q=80") center/cover;
  color: var(--white);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 1.1rem;
}

.brand span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #1d1708;
  font-weight: 900;
}

.brand-panel h1 {
  max-width: 520px;
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
}

.brand-panel p {
  color: rgba(255, 255, 255, .86);
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: #f4cb68;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: .8rem;
}

.brand-panel ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.brand-panel li::before {
  content: "✓";
  margin-right: 10px;
  color: #f4cb68;
  font-weight: 900;
}

.checkout-card {
  border-radius: 16px;
  padding: clamp(22px, 3vw, 34px);
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.checkout-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.checkout-head p,
.summary p,
.message {
  color: var(--muted);
  line-height: 1.55;
}

.plan-pill {
  min-width: 170px;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--green-100);
  border: 1px solid var(--line);
  text-align: right;
}

.plan-pill strong {
  display: block;
  font-size: 1.45rem;
  color: var(--green-800);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.summary div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdfb;
}

.summary span,
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.summary strong {
  color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field.full,
.payment-methods,
.terms,
.actions,
.result-box,
.message {
  grid-column: 1 / -1;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(76, 175, 80, .22);
  border-color: var(--green-600);
}

.section-label {
  margin: 10px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.method {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: #fbfdfb;
  font-weight: 800;
}

.method:has(input:checked) {
  border-color: var(--green-600);
  background: var(--green-100);
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.primary,
.secondary {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary {
  background: var(--green-800);
  color: var(--white);
}

.primary:disabled {
  opacity: .65;
  cursor: wait;
}

.secondary {
  background: #eaf3ec;
  color: var(--green-900);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.message {
  min-height: 24px;
  margin-top: 4px;
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.result-box {
  display: grid;
  gap: 14px;
  border-radius: 14px;
  border: 1px solid rgba(47, 143, 70, .24);
  background: var(--green-100);
  padding: 16px;
}

.pix-result {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: center;
}

.pix-result img {
  width: 170px;
  height: 170px;
  border-radius: 12px;
  background: var(--white);
  padding: 8px;
  border: 1px solid var(--line);
}

.pix-code {
  display: block;
  max-height: 96px;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
  font-size: .82rem;
  color: var(--green-900);
}

.loading {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 900px) {
  .checkout-shell {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }

  .brand-panel {
    min-height: 430px;
  }
}

@media (max-width: 640px) {
  .checkout-shell {
    width: min(100% - 20px, 1180px);
  }

  .checkout-head,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .plan-pill {
    text-align: left;
  }

  .summary,
  .form-grid,
  .payment-methods,
  .pix-result {
    grid-template-columns: 1fr;
  }

  .pix-result img {
    margin: 0 auto;
  }
}
