/* Manual: telas simuladas da criação de campanha (portado do site anterior, paleta nova). Carregado só em /manual-criar-campanha. */
/* ===== Estilos do Manual ===== */
.manual-intro {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-left: 4px solid var(--blue-600);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 30px;
}

.manual-intro p {
  margin-bottom: 8px;
}

.manual-intro p:last-child {
  margin-bottom: 0;
}

/* Índice / sumário */
.manual-toc {
  background: #fff;
  border: 1px solid #e6e9f4;
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 40px;
  box-shadow: 0 2px 18px rgba(1, 41, 112, 0.06);
}

.manual-toc h3 {
  color: var(--navy-900);
  font-size: 18px;
  margin-bottom: 14px;
}

.manual-toc ol {
  margin: 0;
  padding-left: 20px;
}

.manual-toc ol li {
  margin-bottom: 8px;
}

.manual-toc ol li a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 600;
}

.manual-toc ol li a:hover {
  text-decoration: underline;
}

/* Cabeçalho de cada passo */
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 50px 0 18px;
  padding-top: 10px;
}

.step .step-num {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(29, 88, 235, 0.35);
}

.step h2 {
  color: var(--navy-900);
  font-size: 22px;
  margin: 0;
}

/* ===== Mockup fiel da tela (recriação em HTML) ===== */
.mock {
  background: #fff;
  border: 1px solid #e6e9f4;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 6px 24px rgba(1, 41, 112, 0.07);
  max-width: 520px;
}

/* Layout em 2 colunas: tela (mock) à esquerda, tabela de instruções à direita */
.step-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.step-cols .mock {
  flex: 0 0 460px;
  max-width: 460px;
  margin-bottom: 0;
}

.step-cols .field-table {
  flex: 1 1 320px;
  width: auto;
  margin: 0;
  align-self: stretch;
}

@media (max-width: 900px) {
  .step-cols {
    flex-direction: column;
    gap: 16px;
  }

  .step-cols .mock,
  .step-cols .field-table {
    flex-basis: auto;
    width: 100%;
    max-width: 520px;
  }
}

.mock-browserbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eef0f7;
}

.mock-browserbar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.mock-browserbar .dot.r {
  background: #ff5f57;
}

.mock-browserbar .dot.y {
  background: #febc2e;
}

.mock-browserbar .dot.g {
  background: #28c840;
}

.mock-browserbar .cap {
  margin-left: 10px;
  font-size: 12px;
  color: #5f6886;
  font-weight: 600;
}

.mock-section-title {
  color: var(--blue-600);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.mock-field {
  margin-bottom: 18px;
}

.mock-field:last-child {
  margin-bottom: 0;
}

.mock-label {
  display: block;
  color: #4b5675;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.mock-input,
.mock-select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #d7dcec;
  background: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  color: #333;
}

.mock-input.placeholder {
  color: #6b7391;
}

.mock-textarea {
  box-sizing: border-box;
  white-space: pre-line;
  word-break: break-all;
  width: 100%;
  min-height: 70px;
  border: 1px solid #d7dcec;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  color: #6b7391;
  background: #fff;
}

.mock-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
  background: #fff;
}

.mock-select .caret {
  color: #5f6886;
}

.mock-hint {
  display: block;
  font-size: 11px;
  color: var(--blue-500);
  margin-top: 5px;
  line-height: 1.5;
}

.mock-hint.danger {
  color: #be123c;
}

/* Slider fake */
.mock-range {
  margin-top: 8px;
}

.mock-range .val {
  font-size: 12px;
  color: var(--blue-600);
  font-weight: 700;
  margin-bottom: 4px;
}

.mock-range .track {
  position: relative;
  height: 6px;
  background: #e6e9f4;
  border-radius: 4px;
}

.mock-range .fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 6px;
  background: var(--blue-600);
  border-radius: 4px;
}

.mock-range .thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid var(--blue-600);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.mock-btn {
  box-sizing: border-box;
  display: inline-block;
  background: var(--blue-600);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
}

.mock-btn.outline {
  background: #fff;
  color: #15803d;
  border: 2px dashed #15803d;
  width: 100%;
  text-align: center;
}

.mock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--blue-500);
}

.mock-toggle .sw {
  width: 34px;
  height: 18px;
  background: var(--blue-600);
  border-radius: 20px;
  position: relative;
}

.mock-toggle .sw::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
}

/* Origem do tráfego: backlinks + orgânico + direto = 100% */
.mock-origem-resumo {
  background: #f6f7fb;
  border: 1px solid #eef0f7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.mock-origem-barra {
  display: flex;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #e6e9f4;
}

.mock-origem-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 11px;
  color: #5a6385;
}

.mock-origem-legenda b {
  color: var(--navy-900);
  margin-left: 4px;
}

.mock-ponto {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.cor-referencia {
  background: #00AAFF;
}

.cor-organico {
  background: var(--blue-600);
}

.cor-direto {
  background: #C6D0DC;
}

.mock-bloco {
  border: 1px solid #eef0f7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.mock-bloco .mock-field:last-child {
  margin-bottom: 0;
}

.mock-bloco.direto {
  background: #f6f7fb;
}

.mock-range.readonly .val {
  color: #5a6385;
}

.mock-range.readonly .fill {
  background: #C6D0DC;
}

.mock-range.readonly .thumb {
  border-color: #C6D0DC;
  box-shadow: none;
}

/* Tabela de descrição dos campos */
.field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e6e9f4;
  border-radius: 10px;
  overflow: hidden;
}

.field-table th {
  background: var(--navy-900);
  color: #fff;
  text-align: left;
  padding: 11px 16px;
  font-size: 13px;
}

.field-table td {
  padding: 12px 16px;
  border-top: 1px solid #eef0f7;
  vertical-align: top;
}

.field-table td:first-child {
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
  width: 210px;
}

.field-table tr:nth-child(even) td {
  background: #fafbff;
}

.field-table .req {
  color: #be123c;
  font-weight: 700;
  font-size: 11px;
}

.field-table .opt {
  color: #5f6886;
  font-weight: 600;
  font-size: 11px;
}

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #ffe3c2;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
}

.callout i {
  color: #f59e0b;
  font-size: 20px;
  margin-top: 2px;
}

.callout.tip {
  background: #eefdf3;
  border-color: #c2f0d4;
  border-left-color: #15803d;
}

.callout.tip i {
  color: #15803d;
}

.callout p {
  margin: 0;
  font-size: 14px;
}

.layout-2col {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.layout-2col .mock-field {
  flex: 1 1 45%;
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .field-table td:first-child {
    width: auto;
    white-space: normal;
  }
}

/* Selo "Ampliar" + mock clicável (lightbox) */
.mock {
  position: relative;
  cursor: zoom-in;
}

.mock .mock-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef0ff;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.mock:hover .mock-zoom {
  opacity: 1;
}

/* Lightbox */

/* ---- Layout novo: índice lateral fixo ---- */
.manual-grade { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.manual-grade > aside { position: sticky; top: calc(var(--topo-altura) + 1.5rem); }
.manual-toc { margin-bottom: 0; padding: 1.25rem 1.25rem 1rem; border-radius: var(--raio); box-shadow: none; }
.manual-toc h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.manual-toc ol li a { font-size: .95rem; }
.manual-conteudo { max-width: 60rem; }
.manual-conteudo > p { margin-bottom: 1rem; }
.step h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.mock { cursor: zoom-in; position: relative; }
.callout .ico { width: 1.4em; height: 1.4em; flex: none; margin-top: .1rem; }
.manual-toc .ico { width: 1.1em; height: 1.1em; color: var(--blue-600); }
.mock-btn .ico { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; }
dialog.lightbox { display: block; border: 0; background: transparent; padding: 40px 20px; width: 100%; max-width: 760px; }
dialog.lightbox:not([open]) { display: none; }
dialog.lightbox::backdrop { background: rgb(1 25 74 / .82); }
@media (max-width: 980px) {
  .manual-grade { grid-template-columns: 1fr; }
  .manual-grade > aside { position: static; }
}
@media (max-width: 600px) {
  .field-table td:first-child { white-space: normal; width: auto; }
  .field-table, .field-table tbody, .field-table tr, .field-table td, .field-table th { display: block; width: 100%; }
  .field-table td:first-child { padding-bottom: 0; border-top: 1px solid #eef0f7; }
  .field-table td + td { border-top: 0; }
}
.manual-cta { margin-top: 1rem; }
.manual-cta .btn { width: 100%; }
.lightbox-fechar { position: fixed; top: 18px; right: 22px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--navy-900); cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / .3); }
.lightbox-fechar .ico { width: 22px; height: 22px; }
dialog.lightbox .mock { max-width: 100%; cursor: default; }
dialog.lightbox .mock-zoom { display: none; }
/* Ajustes de largura no layout com índice lateral */
.manual .step-cols { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 1.5rem; }
.manual .step-cols .mock { flex: none; max-width: none; width: 100%; }
.manual .field-table td:first-child { white-space: normal; width: 34%; min-width: 9rem; }
@media (max-width: 1240px) {
  .manual .step-cols { grid-template-columns: 1fr; }
  .manual .step-cols .mock { max-width: 560px; }
}
@media (max-width: 600px) {
  .manual .field-table th { display: none; }
  .manual .field-table td:first-child { width: 100%; }
}

/* Acessibilidade: título do índice sem pular nível de heading; contraste dos textos cinza das telas */
.manual-toc-titulo { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; font: 700 1rem/1.3 var(--fonte-display); color: var(--navy-900); }
.mock-browserbar .cap { color: #5f6886; }
.mock-input.placeholder, .mock-textarea { color: #6b7391; }
.mock-hint, .mock-toggle { color: var(--blue-700); }
.mock-hint.danger, .field-table .req { color: #be123c; }
.field-table .opt, .mock-select .caret { color: #5f6886; }
