:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #22c55e;
  --accent-dark: #16a34a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #ef4444;
  --border: #334155;
  --tab-bg: #1e293b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  line-height: 1.5;
  min-height: 100vh;
  overscroll-behavior-y: contain;
}
.container { max-width: 720px; margin: 0 auto; }

/* ---------- Header ---------- */
header { text-align: center; margin-bottom: 24px; padding-top: 8px; }
header .emoji { font-size: 2.2rem; line-height: 1; margin-bottom: 8px; }
header h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
header .subtitle { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
header .credit { font-size: 0.78rem; color: var(--muted); opacity: 0.8; }
header .credit a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}
header .credit a:hover { border-bottom-color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--tab-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 16px;
  position: sticky;
  top: 8px;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.tab {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #052e16; }

/* ---------- Modos ---------- */
.modo { display: none; }
.modo.active { display: block; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  -moz-appearance: textfield;
}
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* ---------- Resultados ---------- */
.results {
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.results h2 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  gap: 12px;
}
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--muted); }
.result-row .value { font-weight: 600; text-align: right; }
.result-row.destaque .value { color: var(--accent); font-size: 1.15rem; }
.result-row.negativo .value { color: var(--danger); }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 24px;
  padding-bottom: 24px;
}

/* ---------- Botão instalar PWA ---------- */
.btn-instalar {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: var(--accent);
  color: #052e16;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  z-index: 100;
  animation: pulse 2s infinite;
}
.btn-instalar:active { transform: translateX(-50%) scale(0.96); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 8px 32px rgba(34, 197, 94, 0.7); }
}

/* ---------- Banner UnderSITES ---------- */
.banner-cta {
  position: relative;
  margin-top: 24px;
  padding: 24px 20px 20px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid var(--accent);
  border-radius: 16px;
  overflow: hidden;
}
.banner-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.banner-cta__badge {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.banner-cta__titulo {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text);
}
.banner-cta__titulo span {
  display: block;
  color: var(--accent);
  margin-top: 4px;
}
.banner-cta__texto {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}
.banner-cta__texto strong {
  color: var(--text);
  font-weight: 700;
}
.banner-cta__lista {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.banner-cta__lista li {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}
.banner-cta__botao {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #052e16;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 10px;
  transition: background 0.2s, transform 0.1s;
}
.banner-cta__botao:hover {
  background: var(--accent-dark);
}
.banner-cta__botao:active {
  transform: scale(0.98);
}
.banner-cta__micro {
  margin-top: 10px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.85;
}

/* Em telas maiores, o banner ganha mais respiro */
@media (min-width: 600px) {
  .banner-cta { padding: 28px 28px 24px; }
  .banner-cta__titulo { font-size: 1.3rem; }
  .banner-cta__texto { font-size: 0.95rem; }
}