:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b6b7b;
  --accent: #f5490a;
  --accent-bg: #fef0e7;
  --accent-disabled: #fbc9ab;
  --brand-grad: linear-gradient(180deg, #ff8a3d, #f5490a);
  --pix: #0f9d8f;
  --pix-bg: #e4f7f4;
  --border: #e6e6ee;
  --success: #1fa855;
  --danger: #d64545;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  font-size: 16px !important;
  -webkit-user-select: text;
  user-select: text;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 20px 32px;
  position: relative;
}

.app::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  width: 320px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(245, 73, 10, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 18px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn:hover { filter: brightness(0.97); }
.icon-btn[hidden] { display: none; }

.lock-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

/* --- Indicador de progresso --- */
.progress {
  display: flex;
  gap: 6px;
  padding: 2px 2px 22px;
}

.progress.progress--hidden { display: none; }

.progress__seg {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s ease;
}

.progress__seg.is-active,
.progress__seg.is-done {
  background: var(--accent);
}

.screen[hidden] { display: none; }

.title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: -12px 0 20px;
  line-height: 1.5;
}

/* --- Chips de benefício (tela inicial) --- */
.benefits {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
}

.benefit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 12px 6px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
}

.benefit svg { color: var(--accent); flex-shrink: 0; }

.benefit span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

/* --- Instruções (tela Pix) --- */
.pix-instructions {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: -12px 0 20px;
}

/* --- Listas (operadoras / valores) --- */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.list-item:last-child { border-bottom: none; }

.list-item:hover { background: #fafafe; }

.list-item__label {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
}

.list-item__valor {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.list-item__valor .valor-principal {
  font-size: 17px;
  font-weight: 700;
}

.list-item__valor .valor-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chevron { color: var(--accent); flex-shrink: 0; }

.op-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  flex-shrink: 0;
  overflow: hidden;
}

.op-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Badge (ex.: "Mais escolhida") --- */
.badge {
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- Campos de formulário --- */
.field { margin-bottom: 18px; }

.field--icon { position: relative; }

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.input--icon { padding-left: 44px; }

.input:focus { border-color: var(--accent); }

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
}

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

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

.sucesso-nota { margin: 4px 0 0; }

/* --- Botões --- */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

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

.btn--primary:disabled {
  background: var(--accent-disabled);
  color: #fff;
  cursor: not-allowed;
}

.btn--outline {
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  margin-bottom: 12px;
}

.btn--bottom {
  position: sticky;
  bottom: 20px;
  margin-top: 24px;
}

/* --- Resumo da operadora selecionada --- */
.op-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.op-summary__nome { font-size: 17px; font-weight: 700; }
.op-summary__numero { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* --- Revisão / totais --- */
.review-block {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.review-label { color: var(--text-muted); font-size: 14px; }
.review-value { font-weight: 700; font-size: 14px; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.total-row span:first-child { font-weight: 700; font-size: 16px; }
.total-value { font-weight: 800; font-size: 20px; }

/* --- Método de pagamento (tela Confirmar) --- */
.payment-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  border: 1.5px solid var(--pix);
  background: var(--pix-bg);
  border-radius: var(--radius-sm);
}

.payment-method__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
}

.payment-method__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.payment-method__info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.payment-method__nome { font-size: 16px; font-weight: 700; }
.payment-method__desc { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

.payment-method__check { color: var(--pix); flex-shrink: 0; }

/* --- Pix --- */
.pix-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0 20px;
}

.pix-qrcode {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.pix-code {
  width: 100%;
  resize: none;
  height: 70px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.pix-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pix);
  flex-shrink: 0;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 157, 143, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(15, 157, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 157, 143, 0); }
}

.trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.trust-note svg { flex-shrink: 0; }

.pix-alert-warning {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.pix-alert-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.pix-alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.pix-alert-text {
  font-size: 13.5px;
  color: #78350f;
  line-height: 1.5;
  margin: 0;
}

.pix-alert-text strong {
  color: #92400e;
  font-weight: 800;
}

/* --- Sucesso --- */
.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 26px;
  box-shadow: 0 0 0 10px rgba(31, 168, 85, 0.10);
}

/* --- Erro no envio / Retentativa --- */
.error-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 20px;
  box-shadow: 0 0 0 10px rgba(220, 38, 38, 0.10);
}

.alert-box-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13.5px;
  color: #991b1b;
  line-height: 1.55;
  text-align: left;
}

.alert-box-danger strong {
  color: #7f1d1d;
}

/* --- Rodapé --- */
.app-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.footer-trust svg { flex-shrink: 0; color: var(--pix); }

.footer-bacen {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f7f7fb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.footer-bacen img { flex-shrink: 0; }

.footer-bacen span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.footer-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

.footer-note strong { color: var(--text); }

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  opacity: 0.85;
  margin: 0;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
