:root {
  --bg: #f0f4fb;
  --surface: #ffffff;
  --soft: #f5f7ff;
  --text: #102a43;
  --muted: #50657d;
  --primary: #3c67e3;
  --primary-dark: #2f52bd;
  --green: #25d366;
  --danger: #d63545;
  --border: rgba(16, 42, 67, 0.12);
  --shadow: 0 24px 70px rgba(16, 42, 67, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(60, 103, 227, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(37, 211, 102, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.app-shell { width: min(720px, 100%); }

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.step-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(60, 103, 227, 0.14);
  color: var(--primary);
  font-weight: 800;
}

.step-dot.active {
  background: var(--primary);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(60, 103, 227, 0.24);
}

.screen { display: none; }
.screen.active { display: block; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1, h2 { margin: 0 0 8px; line-height: 1.12; }
h1 { font-size: clamp(2rem, 5vw, 2.55rem); }
h2 { font-size: 1.35rem; }

.lead {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 22px;
}

.form-grid, .choice-grid, .actions {
  display: grid;
  gap: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  color: var(--text);
  background: #fff;
  font-size: 1rem;
}

textarea {
  min-height: 92px;
  resize: none;
  background: var(--soft);
  font: 0.8rem/1.45 Consolas, monospace;
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(60, 103, 227, 0.16);
  border-color: var(--primary);
}

button, .whatsapp {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(60, 103, 227, 0.22);
}

.secondary {
  background: #e9efff;
  color: var(--primary);
}

.back {
  width: 100%;
  margin-top: 14px;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.whatsapp {
  background: var(--green);
  color: #fff;
}

.whatsapp.full { width: 100%; margin-top: 12px; }

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

.plan-card {
  min-height: 180px;
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 10px;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 42, 67, 0.1);
}

.plan-card strong { font-size: 1.08rem; }
.plan-card span { color: var(--muted); line-height: 1.5; }
.plan-card b { margin-top: 4px; }

.support-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.support-box p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.hour-grid button {
  aspect-ratio: 1.35;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.hour-grid button.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.selection-status {
  min-height: 24px;
  color: var(--muted);
  font-weight: 800;
}

.benefits {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.benefits li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-weight: 800;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pix-panel { text-align: center; }
.pix-amount { color: var(--muted); }

.pix-frame {
  width: 240px;
  height: 240px;
  margin: 0 auto 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
}

.pix-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.receipt-note {
  color: var(--text);
  font-weight: 800;
  line-height: 1.55;
}

.alert {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.alert.show { display: block; }
.alert.error { background: rgba(214, 53, 69, 0.1); color: var(--danger); }
.alert.success { background: rgba(31, 143, 77, 0.1); color: #1f8f4d; }
.alert.warn { background: rgba(180, 83, 9, 0.1); color: #b45309; }

[hidden] { display: none !important; }

@media (max-width: 760px) {
  body { padding: 18px 12px; }
  .app-card { padding: 22px 16px; }
  .plan-grid { grid-template-columns: 1fr; }
  .support-box { flex-direction: column; align-items: stretch; text-align: center; }
  .hour-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
