:root {
  --bg: #050505;
  --panel: #111111;
  --panel-2: #1a1a1a;
  --line: #450000;
  --red: #e50914;
  --red-hot: #ff0000;
  --text: #ffffff;
  --muted: #d9d9d9;
  --soft: #8a8a8a;
  --ok: #45d483;
  --warn: #ffcc66;
  --radius: 8px;
  --shadow: 0 0 30px rgba(229, 9, 20, .18);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 76% 12%, rgba(229,9,20,.22), transparent 28rem),
    linear-gradient(180deg, #050505 0%, #0a0a0a 52%, #050505 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

/* ── Scanline ───────────────────────────────────────────────────────────── */
.scanline {
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,0,.035) 1px, transparent 1px);
  background-size: 100% 6px, 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.4), transparent 80%);
  z-index: 0;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 18px; align-items: center;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(5,5,5,.92);
  border-bottom: 1px solid rgba(229,9,20,.28);
  backdrop-filter: blur(14px);
}
/* garante que .topbar-actions (insta + CTA) ocupam a 3ª coluna */
.topbar-actions { grid-column: 3; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--red); border-radius: 6px;
  background: linear-gradient(135deg, #300000, #0a0a0a);
  box-shadow: var(--shadow); font-weight: 900;
}
.brand strong { display: block; text-transform: uppercase; white-space: nowrap; }
.brand small { color: var(--soft); white-space: nowrap; }
nav { display: flex; justify-content: center; gap: 16px; color: var(--muted); font-size: 14px; }
nav a:hover, .footer a:hover { color: var(--red-hot); }
.menu-btn { display: none; }
.icon-btn {
  border: 1px solid rgba(255,255,255,.14); background: #111; color: var(--text);
  border-radius: 6px; min-width: 42px; min-height: 42px;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: #fff; margin: 5px auto; }

/* ── Botões ─────────────────────────────────────────────────────────────── */
.primary, .secondary, .ghost {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; font-weight: 800; text-transform: uppercase; font-size: 13px;
  transition: background .15s, opacity .15s;
}
.primary { background: var(--red); color: #fff; box-shadow: var(--shadow); }
.primary:hover { background: var(--red-hot); }
.secondary { border-color: rgba(229,9,20,.65); color: #fff; background: rgba(48,0,0,.6); }
.ghost { border-color: rgba(255,255,255,.16); color: var(--muted); background: rgba(255,255,255,.04); }
.small { min-height: 36px; padding: 0 14px; white-space: nowrap; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ── Layout principal ───────────────────────────────────────────────────── */
main { position: relative; z-index: 1; }
.section { padding: clamp(54px, 8vw, 94px) clamp(18px, 4vw, 54px); }
.section.tight { padding-top: 34px; }
.wrap { max-width: 1180px; margin: 0 auto; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: min(860px, calc(100vh - 74px));
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(320px,.95fr);
  gap: clamp(28px,5vw,68px);
  align-items: center;
  padding-top: clamp(38px,6vw,72px);
  padding-bottom: clamp(42px,7vw,82px);
}
.eyebrow { color: var(--red-hot); font-weight: 900; text-transform: uppercase; font-size: 13px; }
h1, h2, h3 {
  font-family: Rajdhani, Inter, system-ui, sans-serif;
  letter-spacing: 0; margin: 0; line-height: 1.05;
}
h1 { font-size: clamp(40px,7vw,78px); max-width: 920px; text-transform: uppercase; font-weight: 700; }
h2 { font-size: clamp(28px,4.4vw,50px); text-transform: uppercase; font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { color: var(--muted); line-height: 1.65; }
.lead { font-size: clamp(16px,2vw,20px); max-width: 760px; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; max-width: 760px; }
.trust-strip span {
  display: inline-flex; align-items: center; min-height: 34px;
  padding: 6px 10px; border: 1px solid rgba(255,255,255,.13);
  border-radius: 6px; background: rgba(255,255,255,.045);
  color: var(--muted); font-size: 13px; font-weight: 700;
}
.trust-strip span::before {
  content: ""; width: 7px; height: 7px; margin-right: 8px;
  border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 12px rgba(69,212,131,.45);
}
/* [FIX 2 + 6] Botões hero ocupam largura total em mobile */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions { flex-direction: column; align-items: flex-start; }

/* ── Hero visual ────────────────────────────────────────────────────────── */
.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.phone {
  width: min(88vw,330px); aspect-ratio: 9/16;
  border: 1px solid rgba(255,255,255,.18); border-radius: 30px;
  background: linear-gradient(180deg,#161616,#050505);
  padding: 18px; box-shadow: 0 0 0 8px #080808, 0 0 64px rgba(229,9,20,.32);
  position: relative; overflow: hidden;
}
.phone::before {
  content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 3px;
  background: var(--red-hot); box-shadow: 0 0 28px var(--red-hot);
  animation: scan 3.2s infinite ease-in-out;
}
@keyframes scan { 0%,100% { transform: translateY(-170px); } 50% { transform: translateY(170px); } }
.phone-screen {
  height: 100%; border-radius: 20px; border: 1px solid rgba(229,9,20,.36); padding: 18px;
  background: linear-gradient(transparent 0 31px,rgba(229,9,20,.08) 32px),
    linear-gradient(90deg,transparent 0 31px,rgba(229,9,20,.08) 32px), #080808;
  background-size: 32px 32px;
}
.alert-tile { border: 1px solid #b00000; border-radius: 8px; padding: 14px; background: rgba(48,0,0,.72); margin-bottom: 12px; }
.alert-tile strong { display: block; margin-bottom: 4px; }
.float-card {
  position: absolute; border: 1px solid rgba(229,9,20,.62);
  background: rgba(17,17,17,.9); border-radius: 8px;
  padding: 12px 14px; color: #fff; box-shadow: var(--shadow);
}
.fc1 { top: 42px; left: 10%; } .fc2 { right: 4%; top: 130px; }
.fc3 { bottom: 98px; left: 2%; } .fc4 { right: 10%; bottom: 36px; }

/* ── Grid e cards ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card {
  border: 1px solid rgba(229,9,20,.32); border-radius: var(--radius);
  background: linear-gradient(180deg,rgba(26,26,26,.92),rgba(8,8,8,.92));
  padding: 20px; box-shadow: 0 0 0 1px rgba(255,255,255,.025);
}
.card.compact { padding: 14px 16px; margin-bottom: 14px; }
.card.compact p { margin: 0; }
.card strong { color: #fff; }
.step-number, .badge {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px;
  border-radius: 6px; background: #300000; border: 1px solid #b00000;
  color: #fff; font-weight: 900; margin-bottom: 12px;
}
/* [FIX 7] Ícone de categoria */
.way-icon, .cat-icon {
  display: block; font-size: 32px; margin-bottom: 10px; line-height: 1;
}
.notice { border-color: rgba(255,204,102,.45); background: rgba(60,39,0,.24); }
.danger { border-color: rgba(255,0,0,.55); background: rgba(69,0,0,.32); }
.muted { color: var(--soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.search { min-height: 44px; min-width: min(100%,320px); background: #101010; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; padding: 0 12px; }

/* ── Formulário ─────────────────────────────────────────────────────────── */
.form-shell { max-width: 980px; margin: 0 auto; }
.progress { height: 8px; background: #181818; border-radius: 999px; overflow: hidden; margin: 22px 0; border: 1px solid rgba(255,255,255,.12); }
.progress span { display: block; height: 100%; width: 16.6%; background: var(--red); transition: width .3s ease; border-radius: 999px; }
.inline-alert {
  display: none; margin: 0 0 16px; padding: 14px 16px;
  border: 1px solid rgba(255,204,102,.45); border-radius: 8px;
  background: rgba(60,39,0,.28); color: #ffe2a3;
  font-weight: 700; font-size: 15px;
}
.inline-alert.visible { display: block; }
.form-step { display: none; }
.form-step.active { display: block; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.choice, label.check {
  display: flex; gap: 10px; align-items: flex-start;
  min-height: 54px; padding: 14px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  background: rgba(255,255,255,.04); cursor: pointer; font-size: 15px;
}
.choice input, .check input { accent-color: var(--red); margin-top: 3px; flex-shrink: 0; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid rgba(255,255,255,.14);
  background: #0d0d0d; color: #fff; border-radius: 6px; padding: 12px;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: rgba(229,9,20,.6);
}
.field textarea { min-height: 150px; resize: vertical; }
/* [FIX 3] Campo com erro */
.field-error { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(229,9,20,.25) !important; }
/* [FIX 4] Preview de arquivos */
.file-preview { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.file-tag {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid rgba(229,9,20,.32); border-radius: 6px;
  background: rgba(26,26,26,.9); font-size: 13px; max-width: 280px;
}
.file-tag .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.file-icon { font-size: 22px; flex-shrink: 0; }
/* [FIX 11] Tela de sucesso */
.success-screen { text-align: center; padding: 40px 24px; }
.success-check {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--ok); display: grid; place-items: center;
  font-size: 36px; color: var(--ok); margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(69,212,131,.25);
  animation: popIn .4s ease;
}
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.protocol-box { text-align: left; margin: 20px 0; }
.protocol-number { font-size: 22px; font-weight: 900; color: var(--ok); letter-spacing: 2px; margin: 6px 0 12px; }
.guidance-list li { margin: 6px 0; color: var(--muted); }
.copy-btn.copied { border-color: var(--ok); color: var(--ok); }
/* Botões do formulário */
.form-nav { margin-top: 28px; flex-wrap: wrap; gap: 10px; }
.result-box { margin-top: 20px; display: none; }

/* ── Admin ──────────────────────────────────────────────────────────────── */
.admin-console { display: grid; grid-template-columns: minmax(280px,360px) 1fr; gap: 18px; align-items: start; }
.admin-sidebar { position: sticky; top: 92px; }
.admin-list { max-height: 70vh; overflow: auto; }
.admin-item { width: 100%; text-align: left; color: #fff; margin-bottom: 10px; }
.admin-item span:not(.pill) { display: block; color: var(--muted); margin-top: 5px; }
.admin-summary { margin: 8px 0 14px; }
.admin-detail { min-height: 520px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.admin-actions select { min-height: 38px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: #0d0d0d; color: #fff; padding: 0 10px; }
.pill { display: inline-flex; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 4px 9px; color: var(--muted); font-size: 12px; margin: 3px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  display: grid; grid-template-columns: minmax(220px,.8fr) 1.2fr; gap: 24px;
  padding: 34px clamp(18px,4vw,54px); border-top: 1px solid rgba(229,9,20,.25);
  background: #050505; position: relative; z-index: 1;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: flex-end; color: var(--muted); }

/* ── Spinner [FIX 10] ───────────────────────────────────────────────────── */
.spinner {
  width: 44px; height: 44px; margin: 0 auto;
  border: 3px solid rgba(229,9,20,.25);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 26px; color: var(--soft); border: 1px dashed rgba(255,255,255,.18); border-radius: 8px; }

/* ── Instagram ──────────────────────────────────────────────────────────── */
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Ícone Instagram no header */
.insta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff; transition: opacity .15s;
}
.insta-btn:hover { opacity: .85; }

/* Link Instagram no nav mobile */
.nav-insta { display: flex; align-items: center; gap: 8px; }
.nav-insta svg { flex-shrink: 0; }

/* Instagram no footer */
.insta-footer {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; color: var(--muted); font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(131,58,180,.18), rgba(253,29,29,.18), rgba(252,176,69,.18));
  border: 1px solid rgba(252,176,69,.3);
  transition: border-color .15s, background .15s;
}
.insta-footer:hover { border-color: rgba(252,176,69,.7); color: #fff; }

/* Botão Instagram inline (home e outras seções) */
.insta-cta {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 6px;
  font-weight: 800; font-size: 13px; text-transform: uppercase;
  background: linear-gradient(135deg, #833ab4, #fd1d1d 50%, #fcb045);
  color: #fff; transition: opacity .15s;
}
.insta-cta:hover { opacity: .88; }

/* ── Responsivo 980px ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  /* [FIX 2] CTA e Instagram visíveis no header mobile */
  .topbar { grid-template-columns: auto 1fr auto auto; gap: 10px; }
  .topbar-actions .primary.small { font-size: 11px; padding: 0 10px; min-height: 36px; }
  .insta-btn { width: 34px; height: 34px; }
  .menu-btn { display: inline-block; }
  nav {
    display: none; grid-column: 1 / -1;
    flex-direction: column; align-items: stretch;
    padding: 14px 0 4px; gap: 4px;
    border-top: 1px solid rgba(229,9,20,.2); margin-top: 8px;
  }
  nav a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
  nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 390px; }
  .cols-4, .cols-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-console { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

/* ── Responsivo 640px ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: clamp(32px,9vw,42px); }
  h2 { font-size: clamp(24px,7vw,34px); }
  .section { padding-left: 16px; padding-right: 16px; }
  .section.tight { padding-top: 24px; }

  /* Grids colapsam para 1 coluna */
  .cols-4, .cols-3, .cols-2, .choice-grid, .fields, .footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .float-card { display: none; }
  .hero-visual { display: none; }
  .hero { padding-top: 20px; padding-bottom: 24px; }
  .lead { font-size: 15px; line-height: 1.6; }

  /* [FIX 6] Botões mobile com altura generosa e largura total no hero */
  .primary, .secondary, .ghost { min-height: 52px; font-size: 14px; }
  .small { min-height: 38px; font-size: 12px; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { width: 100%; text-align: center; }

  /* Formulário */
  .actions { gap: 10px; margin-top: 20px; }
  .form-nav { flex-direction: column; }
  .form-nav button, .form-nav a { width: 100%; text-align: center; }
  .trust-strip { margin-top: 16px; }
  .trust-strip span { min-height: 30px; font-size: 12px; padding: 5px 9px; }
  .choice, label.check { min-height: 48px; font-size: 14px; }
  .file-tag { max-width: 100%; }

  /* Admin */
  .detail-head { display: block; }
  .admin-actions { justify-content: flex-start; margin-top: 12px; }

  /* Topbar mobile compacto */
  .topbar { padding: 10px 16px; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; font-size: 13px; }
  .brand strong { font-size: 14px; }
  .brand small { display: none; }
  .topbar-actions .primary.small { min-height: 34px; font-size: 11px; padding: 0 8px; }
  .insta-btn { width: 32px; height: 32px; border-radius: 6px; }
}
