/* =====================================================================
   style.css — identidade visual do Diagnóstico Digital
   Construído sobre o Bootstrap 5 (grid, botões, forms, progress, cards).
   Paleta e tipografia seguem a identidade da KONSTRUA — Produtora
   Audiovisual (navy + ivory, serifa no destaque, sans no corpo).
   ===================================================================== */

:root{
  --ink:#111922;
  --ink-2:#171B1E;
  --paper:#F7F6F3;
  --paper-2:#EDEFF3;
  --navy:#2E3648;
  --navy-dim:#1C2430;
  --ivory:#ECE9E3;
  --slate:#5B6572;
  --line:#DBD5C7;
  --good:#3F7D58;
  --text-ink:#F2EFE8;
  --text-paper:#1B1F22;

  /* Reaproveita as variáveis do Bootstrap para as cores primárias */
  --bs-primary: var(--navy);
  --bs-primary-rgb: 46,54,72;
  --bs-body-font-family: 'IBM Plex Sans', sans-serif;
  --bs-body-color: var(--text-paper);
  --bs-body-bg: var(--paper);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background:var(--paper);
  color:var(--text-paper);
  font-family:'IBM Plex Sans', sans-serif;
  line-height:1.55;
}
h1,h2,h3{
  font-family:Georgia,'Times New Roman',serif;
  font-weight:700;
  letter-spacing:0.005em;
  margin:0;
}
.mono{ font-family:'IBM Plex Mono', monospace; }
a{ color:inherit; }

/* ---------- HERO / VIEWFINDER ---------- */
.hero{
  background:var(--ink);
  color:var(--text-ink);
  min-height:100svh;
  display:flex;
  flex-direction:column;
}
.hero.hero-compacta{ min-height:auto; }
.hero-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:22px 26px;
  font-size:12.5px;
  color:#B7BEC2;
}
.hero-topbar .logo-mark{ height:20px; width:auto; display:block; cursor:pointer; }
.rec{ display:flex; align-items:center; gap:8px; }
.rec-dot{
  width:8px; height:8px; border-radius:50%;
  background:#C0503F;
  animation:pulse 1.6s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:0.25; } }

.viewfinder{
  position:relative;
  flex:1;
  margin:0 18px 18px 18px;
  border:1px solid rgba(242,239,232,0.18);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:60px 24px;
}
.viewfinder.viewfinder-compacta{ min-height:220px; padding:40px 24px; flex:none; }
.corner{ position:absolute; width:26px; height:26px; border:2px solid var(--ivory); opacity:0.85; }
.corner.tl{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.corner.tr{ top:-1px; right:-1px; border-left:none; border-bottom:none; }
.corner.bl{ bottom:-1px; left:-1px; border-right:none; border-top:none; }
.corner.br{ bottom:-1px; right:-1px; border-left:none; border-top:none; }

.hero-content{ max-width:640px; text-align:center; }
.eyebrow{ font-size:12.5px; color:var(--ivory); opacity:0.8; margin-bottom:18px; }
.hero h1{ font-size:clamp(30px, 6vw, 56px); line-height:1.08; margin-bottom:22px; }
.hero p{ font-size:16.5px; color:#C7CBCD; max-width:480px; margin:0 auto 34px auto; }
.hero-foot{ text-align:center; padding:16px; font-size:12px; color:#7C8388; }

/* ---------- BOTÕES (reskin do Bootstrap) ---------- */
.btn-brass{
  display:inline-flex;
  align-items:center;
  gap:12px;
  background:var(--navy);
  color:var(--ivory);
  border:none;
  padding:14px 26px;
  font-size:15.5px;
  font-weight:600;
  border-radius:2px;
}
.btn-brass:hover{ background:var(--navy-dim); color:var(--ivory); }
.btn-brass:active{ transform:scale(0.98); }
.shutter{ width:9px; height:9px; border-radius:50%; background:var(--ivory); flex:none; }

/* Variante usada só no botão do hero (fundo escuro) — inverte pra ivory/navy */
.btn-hero{ background:var(--ivory); color:var(--navy-dim); }
.btn-hero:hover{ background:#fff; color:var(--navy-dim); }
.btn-hero .shutter{ background:var(--navy-dim); }

.btn-link-voltar{
  font-size:14px;
  color:var(--slate);
  background:none;
  border:none;
  padding:10px 4px;
  text-decoration:none;
}
.btn-link-voltar:hover{ color:var(--text-paper); }

/* ---------- FORMULÁRIO / CENAS ---------- */
.stage{ max-width:640px; margin:0 auto; padding:64px 22px 100px 22px; }
.frame-count{ font-size:13px; color:var(--slate); margin-bottom:10px; }

.progress{ height:2px; background:var(--line); margin-bottom:40px; border-radius:0; }
.progress-bar{ background-color:var(--navy); }

.step{ display:none; }
.step.active{ display:block; animation:fade .35s ease; }
@keyframes fade{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }
.step h2{ font-size:26px; line-height:1.25; margin-bottom:26px; max-width:520px; }

.opcao{
  border:1px solid var(--line);
  border-radius:0;
  padding:14px 16px;
  background:#fff;
  transition:border-color .15s ease, background .15s ease;
}
.opcao:hover{ border-color:var(--navy); }
.opcao .form-check-input{ margin-top:0; }
.opcao .form-check-input:checked{ background-color:var(--navy); border-color:var(--navy); }
.opcao .form-check-input:focus{ box-shadow:0 0 0 .2rem rgba(46,54,72,.2); }
.opcao label{ cursor:pointer; width:100%; font-size:15px; }
.opcao.checked{ border-color:var(--navy); background:var(--paper-2); }

.campo label{ font-size:13px; color:var(--slate); margin-bottom:6px; }
.campo .form-control{
  border:1px solid var(--line);
  border-radius:0;
  padding:12px 14px;
  font-size:15px;
  font-family:inherit;
}
.campo .form-control:focus{
  border-color:var(--navy);
  box-shadow:0 0 0 .2rem rgba(46,54,72,.18);
}

.alert-diagnostico{
  background:#F4E3DE;
  border:1px solid #C0503F;
  color:#7A2E20;
  border-radius:0;
  font-size:14px;
}

/* ---------- LAUDO / RESULTADO ---------- */
.laudo{ max-width:640px; margin:0 auto; padding:70px 22px 100px 22px; }
.laudo-head{ border-bottom:1px solid var(--line); padding-bottom:24px; margin-bottom:30px; }
.laudo-head .mono{ font-size:13px; color:var(--slate); display:block; margin-bottom:14px; }
.laudo-head h2{ font-size:30px; }

.barra-wrap{ margin-bottom:22px; }
.barra-label{ display:flex; justify-content:space-between; font-size:13px; color:var(--slate); margin-bottom:6px; }
.barra-wrap .progress{ height:8px; margin-bottom:0; }
.barra-wrap .progress-bar{ background-color:var(--navy); }

.card-plano{
  border:1px solid var(--text-paper);
  border-radius:0;
  padding:26px 24px;
  margin:32px 0 26px 0;
  background:#fff;
}
.card-plano .mono{ font-size:12.5px; color:var(--slate); }
.card-plano h3{ font-size:26px; margin:6px 0 4px 0; }
.card-plano .preco{ font-family:'IBM Plex Mono', monospace; font-size:18px; color:var(--navy-dim); margin-bottom:14px; }
.vagas{ font-size:13px; color:var(--slate); margin-top:18px; }

/* ---------- Responsivo ---------- */
@media (max-width:576px){
  .hero-topbar{ font-size:11px; padding:16px 16px; }
  .viewfinder{ margin:0 10px 10px 10px; padding:36px 14px; }
  .stage, .laudo{ padding-left:16px; padding-right:16px; }
  .step h2{ font-size:22px; }
}

/* ---------- Popup de acesso aos leads (clique na logo) ---------- */
.login-overlay{
  display:none;
  position:fixed; inset:0; z-index:1000;
  background:rgba(17,25,34,0.72);
  align-items:center; justify-content:center;
  padding:20px;
}
.login-overlay.aberto{ display:flex; }
.login-box{
  position:relative;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:6px;
  padding:32px 28px;
  width:100%; max-width:340px;
  box-shadow:0 20px 50px rgba(0,0,0,0.35);
}
.login-label{ font-size:11px; color:var(--slate); letter-spacing:0.04em; }
.login-box h3{ font-size:22px; margin:8px 0 18px 0; color:var(--text-paper); }
.login-box form{ display:flex; flex-direction:column; gap:12px; }
.login-box input[type="password"]{
  border:1px solid var(--line);
  padding:12px 14px;
  font-size:15px;
  font-family:inherit;
  border-radius:2px;
}
.login-box input[type="password"]:focus{
  outline:none;
  border-color:var(--navy);
  box-shadow:0 0 0 .2rem rgba(46,54,72,.18);
}
.login-box .btn{ justify-content:center; }
.login-close{
  position:absolute; top:10px; right:14px;
  background:none; border:none; font-size:22px; line-height:1;
  color:var(--slate); cursor:pointer; padding:4px;
}
.login-close:hover{ color:var(--text-paper); }

/* ---------- Painel de Leads (leads.php) ---------- */
.topbar{
  background:var(--ink); color:#F2EFE8;
  padding:18px 20px; display:flex; align-items:center; justify-content:space-between;
}
.topbar img{ height:22px; }
.btn-voltar{
  color:#B7BEC2; text-decoration:none; font-size:13px;
  border:1px solid rgba(242,239,232,0.25); padding:7px 14px; border-radius:4px;
}
.btn-voltar:hover{ color:#F2EFE8; border-color:rgba(242,239,232,0.5); }

.wrap{ max-width:640px; margin:0 auto; padding:20px 16px 60px 16px; }
.vazio{ text-align:center; color:var(--slate); padding:60px 20px; font-size:15px; }

.tabs{ display:flex; gap:6px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.tab{
  padding:10px 16px; font-size:14px; font-weight:600; color:var(--slate);
  text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-1px;
}
.tab.ativa{ color:var(--navy); border-bottom-color:var(--navy); }
.tab:hover{ color:var(--navy-dim); }

.card{
  background:#fff; border:1px solid var(--line); border-radius:6px;
  padding:16px 18px; margin-bottom:14px;
}
.card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px; }
.nome{ font-size:16px; font-weight:600; color:var(--ink); }
.especialidade{ font-size:13px; color:var(--slate); margin-top:2px; }
.badge{
  font-size:11px; font-weight:600; padding:4px 10px; border-radius:20px;
  white-space:nowrap; text-transform:uppercase; letter-spacing:0.02em;
}
.linha{ font-size:14px; color:#33383D; margin-bottom:4px; }
.linha b{ color:var(--slate); font-weight:500; }
.data{ font-size:12px; color:var(--slate); margin-top:8px; }

.card-acoes{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:12px; }
.btn-zap{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--navy); color:#ECE9E3; text-decoration:none;
  padding:10px 16px; border-radius:4px; font-size:14px; font-weight:600;
}
.btn-zap:hover{ background:var(--navy-dim); }
.form-arquivar{ margin:0; }
.btn-arquivar{
  background:none; border:1px solid var(--line); color:var(--slate);
  padding:9px 15px; border-radius:4px; font-size:13px; font-weight:600; cursor:pointer;
}
.btn-arquivar:hover{ border-color:var(--slate); color:var(--text-paper); }

/* tela de login (leads.php sem sessão) */
.login-wrap{
  min-height:100svh; display:flex; align-items:center; justify-content:center; padding:20px;
}
.login-wrap .login-box{
  background:#fff; border:1px solid var(--line); border-radius:6px;
  padding:32px 28px; width:100%; max-width:340px; box-shadow:none;
}
.login-wrap .login-box .mono{ font-size:11px; color:var(--slate); letter-spacing:0.04em; font-family:monospace; }
.login-wrap .login-box h3{ font-size:22px; margin:8px 0 18px 0; color:var(--ink); }
.login-wrap .login-box form{ display:flex; flex-direction:column; gap:12px; }
.login-wrap .login-box input[type="password"]{
  border:1px solid var(--line); padding:12px 14px; font-size:15px; border-radius:2px; font-family:inherit;
}
.login-wrap .login-box input[type="password"]:focus{ outline:none; border-color:var(--navy); }
.login-wrap .login-box button{
  background:var(--navy); color:#ECE9E3; border:none; padding:12px 16px;
  border-radius:2px; font-size:15px; font-weight:600; cursor:pointer;
}
.login-wrap .login-box button:hover{ background:var(--navy-dim); }
.login-erro{ font-size:13px; color:#7A2E20; margin-top:-4px; }
.voltar-link{
  display:block; text-align:center; margin-top:16px; font-size:13px; color:var(--slate); text-decoration:none;
}
.voltar-link:hover{ color:var(--text-paper); }
