:root {
  --background: #eef1f4;
  --ink: #16202b;
  --muted: #778393;
  --line: #dce2e8;
  --green: #09a77b;
  --green-dark: #078c69;
  --green-soft: #eefaf6;
  --orange: #ff5c22;
  --card: #fff;
  --shadow: 0 8px 32px rgba(27, 39, 51, .08);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.checkout-page { min-height: 100vh; }

.checkout-header {
  position: relative;
  min-height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8ed;
  background: #fff;
}

.checkout-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgba(255, 101, 36, .75) 35%, rgba(9, 167, 123, .75) 65%, transparent 100%);
  opacity: .7;
}

.checkout-brand { position: relative; z-index: 1; }
.checkout-brand img {
  display: block;
  width: 118px;
  height: auto;
  transform-origin: left center;
  filter: drop-shadow(0 3px 8px rgba(26, 43, 56, .12));
  animation: logoFloat 4.8s ease-in-out infinite;
}
.checkout-brand:hover img { animation-play-state: paused; }

.secure-badge {
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e9e3;
  border-radius: 999px;
  color: #355164;
  background: #f2faf7;
  box-shadow: 0 2px 8px rgba(22, 69, 56, .06);
  font-size: .78rem;
  font-weight: 700;
}

.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c992; box-shadow: 0 0 0 4px rgba(34, 201, 146, .13), 0 0 12px rgba(34, 201, 146, .32); }

.reservation-bar {
  min-height: 42px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid #202c36;
  color: #bdc7d0;
  background: linear-gradient(90deg, #17232d 0%, #10181f 100%);
  font-size: .78rem;
}

.reservation-bar strong { color: #ff9a62; font-size: .95rem; letter-spacing: .04em; }
.reservation-note { color: #82909d; margin-left: 10px; }

.checkout-main { width: min(100% - 32px, 690px); margin: 28px auto 36px; }

.product-card, .checkout-card {
  border: 1px solid rgba(207, 215, 222, .75);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.product-card { min-height: 110px; padding: 18px 24px; display: flex; align-items: center; gap: 18px; }
.product-cover { width: 70px; height: 70px; padding: 8px; display: grid; place-items: center; border: 1px solid #e2e6eb; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(16, 24, 40, .09); }
.product-cover img { width: 100%; height: auto; }
.product-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eyebrow { color: var(--orange); font-size: .64rem; font-weight: 800; letter-spacing: .03em; }
.product-copy h1 { margin: 0; font-size: 1rem; font-weight: 800; }
.product-copy strong { color: #1d466e; font-size: 1.25rem; }
.product-caption { color: var(--muted); font-size: .72rem; }

.checkout-card { margin-top: 10px; padding: 28px; }
.step-title { display: flex; align-items: center; gap: 9px; }
.step-title > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: .78rem; font-weight: 800; }
.step-title h2 { margin: 0; font-size: .91rem; text-transform: uppercase; }
.step-description { margin: 5px 0 18px 34px; color: var(--muted); font-size: .77rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field span { color: #33404c; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.field input { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #d7dfe6; border-radius: 7px; outline: none; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: #a9b4c0; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(9, 167, 123, .12); }
.field input[aria-invalid="true"] { border-color: #dc4d4d; }

.payment-title { margin-top: 28px; }
.payment-method { width: min(100%, 230px); margin-top: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 2px solid var(--green); border-radius: 9px; color: #17624f; background: var(--green-soft); text-align: left; }
.pix-symbol { width: 27px; height: 27px; flex: 0 0 27px; display: block; color: var(--green); }
.pix-symbol path { fill: currentColor; }
.payment-method strong { display: block; font-size: .77rem; }
.payment-method small { display: block; margin-top: 2px; color: #6d8f86; font-size: .65rem; }
.selected-check { width: 20px; height: 20px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: .7rem; font-weight: 900; }

.pix-instructions { margin-top: 19px; }
.pix-instructions h3 { margin: 0 0 13px; font-size: .88rem; }
.instruction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.instruction { display: flex; gap: 8px; align-items: flex-start; }
.instruction > span { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: .7rem; font-weight: 800; }
.instruction strong { display: block; font-size: .72rem; }
.instruction p { margin: 3px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.35; }

.checkout-total { margin-top: 23px; display: flex; align-items: center; justify-content: space-between; font-size: .83rem; font-weight: 800; }
.checkout-total strong { color: var(--green-dark); }
.primary-button, .secondary-button { width: 100%; min-height: 48px; border: 0; border-radius: 7px; font-weight: 900; letter-spacing: .01em; }
.primary-button { margin-top: 18px; color: #fff; background: linear-gradient(90deg, #08a57a, #12aa7e); box-shadow: 0 9px 18px rgba(9, 167, 123, .2); transition: transform .2s, filter .2s; }
.primary-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.security-note { margin: 12px 0 0; color: #93a0ad; text-align: center; font-size: .67rem; }
.security-note span { color: var(--green); margin-right: 4px; }
.form-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; color: #9e3030; background: #fff0f0; font-size: .75rem; }

.payment-result { padding-top: 2px; }
.result-header { display: flex; align-items: center; gap: 12px; }
.result-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 900; }
.result-header h2 { margin: 2px 0 0; font-size: 1.05rem; }
.result-status { margin: 18px 0 12px; color: #47606e; font-size: .82rem; font-weight: 700; }
.qr-panel { padding: 18px; display: grid; justify-items: center; border: 1px solid #e2e8ed; border-radius: 8px; background: #fbfcfd; }
.qr-frame { width: min(100%, 250px); aspect-ratio: 1; display: grid; place-items: center; padding: 10px; border: 1px solid #edf0f3; border-radius: 8px; background: #fff; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-panel p { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: .7rem; }
.copy-row { margin-top: 14px; display: flex; gap: 8px; }
.copy-row input { min-width: 0; flex: 1; height: 44px; padding: 0 10px; border: 1px solid #d7dfe6; border-radius: 6px; color: #637283; font-size: .69rem; }
.copy-row button { padding: 0 15px; border: 0; border-radius: 6px; color: #fff; background: var(--green); font-size: .75rem; font-weight: 800; }
.copy-feedback { margin: 7px 0 0; color: var(--green-dark); text-align: right; font-size: .7rem; font-weight: 700; }
.waiting-note { margin-top: 16px; padding: 11px 12px; display: flex; align-items: center; gap: 8px; border-radius: 6px; color: #5e7581; background: var(--green-soft); font-size: .7rem; }
.pulse-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(9, 167, 123, .12); animation: pulse 1.5s infinite; }
.secondary-button { margin-top: 15px; min-height: 42px; border: 1px solid #d7dfe6; color: #657383; background: #fff; font-size: .76rem; }
.payment-result.is-approved .result-icon { background: #168b5f; }
.payment-result.is-approved .result-status { color: #168b5f; }
.payment-result.is-declined .result-icon { background: #c34444; }
.payment-result.is-declined .result-status { color: #c34444; }

.checkout-footer { padding: 25px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; color: #5f6d7a; font-size: .7rem; }
.checkout-footer div span { margin-right: 4px; color: #394854; }
.checkout-footer p { width: 100%; margin: 0; color: #99a5b0; text-align: center; font-size: .65rem; }

@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(9, 167, 123, 0); } }

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.012); }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-brand img,
  .pulse-dot { animation: none; }
}

@media (max-width: 620px) {
  .checkout-header { min-height: 58px; padding: 0 16px; }
  .checkout-brand img { width: 105px; }
  .secure-badge { font-size: .68rem; }
  .reservation-bar { gap: 6px; font-size: .68rem; }
  .reservation-note { display: none; }
  .checkout-main { width: min(100% - 20px, 500px); margin-top: 17px; }
  .product-card { padding: 15px; gap: 13px; }
  .product-cover { width: 58px; height: 58px; padding: 6px; }
  .product-copy h1 { font-size: .9rem; }
  .product-copy strong { font-size: 1.1rem; }
  .product-caption { font-size: .65rem; }
  .checkout-card { padding: 19px 15px 20px; }
  .field-grid { display: block; }
  .field { margin-bottom: 13px; }
  .field input { min-height: 44px; }
  .payment-title { margin-top: 24px; }
  .payment-method { width: 100%; }
  .instruction-grid { display: block; }
  .instruction { margin-bottom: 12px; }
  .instruction:last-child { margin-bottom: 0; }
  .instruction p { margin-top: 2px; }
  .copy-row { display: block; }
  .copy-row input { width: 100%; }
  .copy-row button { width: 100%; height: 42px; margin-top: 8px; }
  .copy-feedback { text-align: center; }
  .checkout-footer { gap: 14px; }
}
