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

:root {
  --bg: #ffffff;
  --fg: #171717;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-700: #3f3f46;
  --zinc-900: #18181b;
  --emerald-50: #ecfdf5;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --blue-50: #eff6ff;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --red-500: #ef4444;
  --green-bg: #E1F5EE;
  --green-dark: #085041;
  --green-mid: #0F6E56;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #ededed;
    --zinc-50: #18181b;
    --zinc-100: #27272a;
    --zinc-200: #3f3f46;
    --zinc-700: #d4d4d8;
    --zinc-900: #f4f4f5;
    --emerald-50: rgba(16,185,129,0.1);
    --emerald-600: #34d399;
    --blue-50: rgba(37,99,235,0.12);
    --blue-600: #93c5fd;
    --blue-700: #60a5fa;
    --amber-50: rgba(180,83,9,0.12);
    --amber-700: #fcd34d;
    --green-bg: rgba(16,185,129,0.1);
    --green-dark: #6ee7b7;
    --green-mid: #34d399;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

.container {
  width: 100%;
  max-width: 480px;
}

/* Header */
.header { text-align: center; margin-bottom: 32px; }
.header-label { font-size: 11px; color: var(--zinc-400); letter-spacing: 1px; text-transform: uppercase; }
.header-title { font-size: 22px; font-weight: 500; margin-top: 4px; }

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}
.step-item { display: flex; align-items: center; }
.step-inner { display: flex; align-items: center; gap: 8px; }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
  background: var(--zinc-100);
  color: var(--zinc-400);
  transition: background 0.2s, color 0.2s;
}
.step-dot.active { background: var(--fg); color: var(--bg); }
.step-label {
  font-size: 13px;
  color: var(--zinc-400);
  transition: color 0.2s;
}
.step-label.active { font-weight: 500; color: var(--fg); }
.step-line {
  width: 32px; height: 1px;
  background: var(--zinc-200);
  margin: 0 6px;
}

/* URL chip */
.url-chip {
  background: var(--zinc-50);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  text-align: center;
  margin-bottom: 24px;
}
.url-chip-label { font-size: 12px; color: var(--zinc-400); }
.url-chip-value { font-size: 15px; font-weight: 500; font-family: monospace; margin-top: 4px; }

/* Inputs */
input, select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus {
  border-color: var(--zinc-400);
  box-shadow: 0 0 0 2px rgba(161,161,170,0.2);
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { opacity: 0.85; }

.btn-outline {
  width: 100%;
  background: transparent;
  color: var(--zinc-500);
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.btn-outline:hover { border-color: var(--zinc-400); }

.btn-ghost {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--zinc-400);
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
}

/* Toggle pair */
.toggle-pair {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.toggle-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  background: transparent;
  border: 1px solid var(--zinc-200);
  color: var(--zinc-500);
}
.toggle-btn.active { background: var(--fg); color: var(--bg); border-color: transparent; }

/* Section label */
.section-label { font-size: 15px; font-weight: 500; margin-bottom: 12px; }

/* Status messages */
.status-msg {
  font-size: 12px;
  min-height: 20px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-msg.ok { color: var(--emerald-600); }
.status-msg.err { color: var(--red-500); }
.status-msg.checking { color: var(--zinc-400); }

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--zinc-100);
}
.divider span {
  position: relative;
  background: var(--bg);
  padding: 0 12px;
  font-size: 12px;
  color: var(--zinc-400);
}

/* WhatsApp help button */
.btn-whatsapp {
  width: 100%;
  background: var(--green-bg);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: background 0.15s;
}
.btn-whatsapp:hover { filter: brightness(0.95); }
.btn-whatsapp-title { font-size: 14px; font-weight: 500; color: var(--green-dark); }
.btn-whatsapp-sub { font-size: 12px; color: var(--green-mid); margin-top: 2px; }

/* Register domain box */
.register-box {
  background: var(--blue-50);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}
.register-box-title { font-size: 13px; font-weight: 500; color: var(--blue-700); margin-bottom: 8px; }
.register-row { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.register-row input { flex: 1; }
.register-row select { width: auto; flex-shrink: 0; }
.spinner {
  width: 12px; height: 12px;
  border: 2px solid var(--zinc-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Resumo */
.price-header { text-align: center; margin-bottom: 24px; }
.price-old { font-size: 16px; color: var(--zinc-400); text-decoration: line-through; margin-right: 8px; }
.price-new { font-size: 28px; font-weight: 500; }
.price-sub { font-size: 13px; color: var(--zinc-500); display: block; margin-top: 2px; }

.items-box {
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 24px;
}
.items-box-title { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--zinc-100);
}
.item-row:last-child { border-bottom: none; }
.item-check { flex-shrink: 0; margin-top: 2px; color: var(--emerald-500); }
.item-body { flex: 1; }
.item-label { font-size: 14px; }
.item-desc { font-size: 12px; color: var(--zinc-400); margin-top: 2px; }
.item-price { font-size: 12px; white-space: nowrap; color: var(--zinc-400); text-decoration: line-through; }
.item-price.free { color: var(--emerald-500); font-weight: 500; text-decoration: none; }

.savings-banner {
  background: var(--emerald-50);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--emerald-600);
}

/* Pagamento */
.order-summary {
  background: var(--zinc-50);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.order-row { display: flex; justify-content: space-between; align-items: center; }
.order-col-label { font-size: 12px; color: var(--zinc-400); }
.order-col-value { font-size: 13px; font-weight: 500; margin-top: 2px; font-family: monospace; }
.order-total { font-size: 15px; font-weight: 500; }

.pay-label { font-size: 13px; color: var(--zinc-400); margin-bottom: 12px; }

/* Pix panel */
.pix-panel { text-align: center; padding: 16px 0; }
.pix-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.pix-sub { font-size: 12px; color: var(--zinc-400); margin-bottom: 16px; }
.pix-copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.pix-copy-row input { font-family: monospace; font-size: 16px; }
.btn-copy {
  white-space: nowrap;
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-copy:hover { background: var(--zinc-50); }
.pix-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--zinc-400); }
.pix-status.ok { color: var(--emerald-500); font-weight: 500; }
.btn-simulate {
  width: 100%;
  background: var(--emerald-50);
  color: var(--emerald-600);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-simulate:hover { filter: brightness(0.95); }

/* QR code */
.qrcode { display: block; margin: 0 auto 16px; }

/* Card form */
.card-form { }
.field-group { margin-bottom: 16px; }
.field-label { font-size: 13px; color: var(--zinc-400); display: block; margin-bottom: 6px; }
.field-row { display: flex; gap: 12px; }
.field-row .field-group { flex: 1; }

/* Step pronto */
.pronto { text-align: center; padding: 32px 0; }
.pronto-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--emerald-50);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.pronto-icon svg { color: var(--emerald-500); }
.pronto-title { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.pronto-sub { font-size: 14px; color: var(--zinc-400); margin-bottom: 4px; }
.pronto-domain { font-size: 15px; font-weight: 500; font-family: monospace; color: var(--blue-600); margin-bottom: 16px; }
.pronto-confirm {
  background: var(--blue-50);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--blue-700);
}
.pronto-dns {
  background: var(--amber-50);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
}
.pronto-dns-title { font-size: 13px; font-weight: 500; color: var(--amber-700); margin-bottom: 8px; }
.pronto-dns-text { font-size: 12px; color: var(--zinc-500); }

/* mb helpers */
.mb-6 { margin-bottom: 24px; }
.mb-3 { margin-bottom: 12px; }
