/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Nunito", sans-serif; background: #f5f6fa; color: #1a1a2e; font-size: 16px; min-height: 100vh; }

/* ── HEADER ── */
header {
  background: #fff;
  border-bottom: 2px solid #eee;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.logo-text { font-size: 20px; font-weight: 800; color: #1a3a6b; }
.logo-sub { font-size: 11px; color: #f97316; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.header-right { display: flex; align-items: center; gap: 10px; }

/* ── BOTOES HEADER ── */
.cred-box {
  background: #fff8f0;
  border: 2px solid #f97316;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #1a3a6b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cred-box .num { font-size: 20px; color: #f97316; }
.btn-comprar {
  background: #f97316; color: #fff; border: none;
  border-radius: 50px; padding: 10px 18px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: "Nunito", sans-serif;
}
.btn-comprar:hover { background: #ea6200; }
.btn-entrar {
  background: #1a3a6b; color: #fff; border: none;
  border-radius: 50px; padding: 10px 18px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: "Nunito", sans-serif;
}
.btn-entrar:hover { background: #122a52; }

/* ── MAIN ── */
main { max-width: 760px; margin: 0 auto; padding: 28px 20px 80px; }

/* ── CARREGANDO ── */
.carregando { text-align: center; padding: 60px 20px; color: #aaa; font-weight: 600; }

/* ── SPINNER ── */
.spinner {
  width: 50px; height: 50px;
  border: 5px solid #ffe8d6;
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TELA DE LOGIN (para quem nao tem conta) ── */
.login-wall {
  background: #fff;
  border-radius: 20px;
  padding: 52px 24px;
  border: 2px solid #eee;
  text-align: center;
  margin-bottom: 14px;
}
.login-wall .icone { font-size: 72px; margin-bottom: 20px; }
.login-wall h2 { font-size: 26px; font-weight: 800; color: #1a3a6b; margin-bottom: 12px; }
.login-wall p { font-size: 16px; color: #888; font-weight: 600; margin-bottom: 32px; line-height: 1.6; max-width: 420px; margin-left: auto; margin-right: auto; }
.btn-comecar {
  background: #f97316; color: #fff; border: none;
  border-radius: 14px; padding: 18px 40px;
  font-size: 20px; font-weight: 800; cursor: pointer;
  font-family: "Nunito", sans-serif;
}
.btn-comecar:hover { background: #ea6200; }

/* ── CARDS DE PASSO ── */
.passo {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 14px;
  border: 2px solid #eee;
}
.passo-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.passo-num {
  width: 36px; height: 36px;
  background: #1a3a6b; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; flex-shrink: 0;
}
.passo-titulo { font-size: 18px; font-weight: 800; color: #1a3a6b; }
.passo-desc { font-size: 13px; color: #999; font-weight: 600; }

/* ── ZONA DE UPLOAD ── */
.upload-zona {
  border: 3px dashed #d0d7e8;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: #f9fbff;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zona:hover { border-color: #f97316; background: #fff8f0; }
.upload-zona.dragover { border-color: #f97316; background: #fff3e6; }
.upload-zona img.preview {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 13px;
}
.upload-icone { font-size: 52px; line-height: 1; }
.upload-texto { font-size: 19px; font-weight: 800; color: #1a3a6b; }
.upload-sub { font-size: 14px; color: #aaa; font-weight: 600; }
.upload-trocar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(26,58,107,0.88); color: #fff;
  padding: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; display: none;
  align-items: center; justify-content: center;
}

/* ── GRID DE SELECAO ── */
.sel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.sel-btn {
  border: 2px solid #dde3f0;
  background: #f9fbff;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.sel-btn:hover { border-color: #f97316; background: #fff8f0; }
.sel-btn.ativo { border-color: #f97316; background: #fff3e6; box-shadow: 0 0 0 3px rgba(249,115,22,0.12); }
.sel-btn .icone { font-size: 28px; display: block; margin-bottom: 6px; }
.sel-btn .nome { font-size: 13px; font-weight: 700; color: #1a3a6b; }
.sel-btn.ativo .nome { color: #c95500; }

/* ── BOTAO GERAR ── */
.gerar-wrap {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 14px;
  border: 2px solid #eee;
  text-align: center;
}
.btn-gerar {
  width: 100%;
  background: #f97316; color: #fff; border: none;
  border-radius: 16px; padding: 20px 24px;
  font-size: 22px; font-weight: 800; cursor: pointer;
  font-family: "Nunito", sans-serif;
  transition: background 0.15s, transform 0.1s;
}
.btn-gerar:hover:not(:disabled) { background: #ea6200; transform: translateY(-2px); }
.btn-gerar:disabled { background: #ccc; cursor: not-allowed; transform: none; }
.nota-credito { margin-top: 10px; font-size: 14px; color: #bbb; font-weight: 600; }

/* ── LOADING ── */
.loading-card {
  background: #fff;
  border-radius: 20px;
  padding: 52px 24px;
  border: 2px solid #eee;
  display: none;
  margin-bottom: 14px;
  text-align: center;
}
.loading-card.visivel { display: block; }
.loading-titulo { font-size: 22px; font-weight: 800; color: #1a3a6b; margin-bottom: 8px; }
.loading-sub { font-size: 14px; color: #bbb; font-weight: 600; margin-bottom: 20px; }
.loading-passo {
  display: inline-block;
  background: #fff8f0;
  border: 2px solid #f97316;
  color: #c95500;
  font-size: 14px; font-weight: 700;
  padding: 8px 20px; border-radius: 50px;
}

/* ── RESULTADO ── */
.resultado-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  border: 2px solid #eee;
  display: none;
}
.resultado-card.visivel { display: block; }
.resultado-titulo { font-size: 20px; font-weight: 800; color: #1a3a6b; margin-bottom: 16px; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.ba-box { position: relative; }
.ba-box img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; }
.ba-label {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase;
}
.ba-label.depois { background: rgba(249,115,22,0.92); }
.btn-baixar {
  width: 100%;
  background: #1a3a6b; color: #fff; border: none;
  border-radius: 14px; padding: 17px;
  font-size: 18px; font-weight: 800; cursor: pointer;
  font-family: "Nunito", sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-baixar:hover { background: #122a52; }

/* ── MODAIS ── */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.aberto { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
}
.modal-box h2 { font-size: 22px; font-weight: 800; color: #1a3a6b; margin-bottom: 6px; }
.modal-sub { font-size: 14px; color: #999; font-weight: 600; margin-bottom: 22px; }
.modal-msg { font-size: 13px; text-align: center; margin-bottom: 12px; min-height: 18px; font-weight: 600; }
.modal-msg.ok { color: #16a34a; }
.modal-msg.erro { color: #dc2626; }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 14px; font-weight: 700; color: #1a3a6b; margin-bottom: 6px; }
.campo input {
  width: 100%;
  border: 2px solid #ddd; border-radius: 10px;
  padding: 12px 14px; font-size: 15px;
  font-family: "Nunito", sans-serif;
  outline: none; color: #1a1a2e;
}
.campo input:focus { border-color: #f97316; }
.btn-principal {
  width: 100%;
  background: #f97316; color: #fff; border: none;
  border-radius: 12px; padding: 14px;
  font-size: 17px; font-weight: 800; cursor: pointer;
  font-family: "Nunito", sans-serif;
  margin-bottom: 12px;
}
.btn-principal:hover { background: #ea6200; }
.btn-secundario {
  width: 100%;
  background: transparent; border: 2px solid #eee;
  border-radius: 12px; padding: 11px;
  font-size: 14px; font-weight: 700; color: #888;
  cursor: pointer; font-family: "Nunito", sans-serif;
}

/* ── PLANOS ── */
.planos { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 18px; }
.plano {
  border: 3px solid #dde3f0;
  border-radius: 16px; padding: 14px 8px;
  text-align: center; cursor: pointer;
  transition: all 0.15s;
}
.plano:hover { border-color: #f97316; background: #fff8f0; }
.plano-popular { border-color: #f97316; background: #fff3e6; }
.plano-destaque { font-size: 10px; font-weight: 800; color: #f97316; text-transform: uppercase; min-height: 14px; margin-bottom: 4px; }
.plano-num { font-size: 28px; font-weight: 800; color: #1a3a6b; line-height: 1; }
.plano-unit { font-size: 12px; color: #bbb; font-weight: 700; margin: 2px 0 10px; }
.plano-preco { font-size: 18px; font-weight: 800; color: #f97316; }
.btn-cancelar {
  width: 100%;
  background: #f5f6fa; border: 2px solid #eee;
  border-radius: 12px; padding: 13px;
  font-size: 16px; font-weight: 700; color: #aaa;
  cursor: pointer; font-family: "Nunito", sans-serif;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a3a6b; color: #fff;
  padding: 13px 22px; border-radius: 50px;
  font-size: 15px; font-weight: 700;
  z-index: 400;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  text-align: center;
  pointer-events: none;
}
.toast.visivel { transform: translateX(-50%) translateY(0); }
.toast.ok { background: #16a34a; }
.toast.erro { background: #dc2626; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 40px 24px 32px;
  border-top: 2px solid #eee;
  background: #fff;
}
.footer-logo-text {
  font-size: 22px; font-weight: 800; color: #1a3a6b; margin-bottom: 4px;
}
.footer-sub {
  font-size: 13px; color: #aaa; font-weight: 600;
  margin-bottom: 28px; text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-redes {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 28px; flex-wrap: wrap;
}
.rede-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 50px;
  font-size: 15px; font-weight: 700;
  text-decoration: none; color: #fff;
  transition: transform 0.15s, opacity 0.15s;
}
.rede-btn:hover { transform: translateY(-3px); opacity: 0.92; }
.rede-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.rede-fb  { background: #1877f2; }
.rede-ig  { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.rede-yt  { background: #ff0000; }
.footer-copy { font-size: 12px; color: #ccc; font-weight: 600; }

/* ── RESPONSIVO ── */
@media (max-width: 520px) {
  header { padding: 10px 14px; }
  .logo-img { width: 42px; height: 42px; }
  .logo-text { font-size: 17px; }
  .btn-gerar { font-size: 18px; padding: 17px; }
  .ba-grid { grid-template-columns: 1fr; }
  .planos { grid-template-columns: 1fr; }
  .modal-box { padding: 24px 18px; }
}

/* ── SELETOR DE IDIOMA ── */
.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.lang-btn {
  background: transparent;
  border: 2px solid #eee;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #aaa;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  transition: all 0.15s;
}
.lang-btn:hover { border-color: #f97316; color: #f97316; }
.lang-btn.ativo { border-color: #f97316; color: #f97316; background: #fff8f0; }
