/* Componentes compostos por pagina. Tudo por classe (sem estilo inline). */

/* ===== Hero (home) ===== */
.hero { padding: var(--sp-9) 0 var(--sp-8); text-align: center; }
.hero .container { max-width: 900px; }
.hero-lead {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto var(--sp-6);
}

/* Cards de feature */
.feature-card h3 { color: var(--accent); margin-bottom: var(--sp-3); }
.feature-card p { color: var(--text-dim); margin: 0; }

/* ===== Blog lista ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
}
.blog-card { display: block; text-decoration: none; color: inherit; }
/* Capa padronizada: todo card tem o mesmo quadro 16:9. O ajuste (cover/contain)
   vem do campo capa_fit do post, escolhido no editor. */
.blog-card img,
.blog-card-capa {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-3);
  background: color-mix(in srgb, var(--text) 4%, white);
}
.blog-card-capa--contain {
  object-fit: contain;
  background: color-mix(in srgb, var(--text) 6%, white);
}
.blog-card h3 { margin-bottom: var(--sp-2); font-size: 20px; }
.blog-card .resumo { color: var(--text-dim); font-size: 14px; margin-bottom: var(--sp-3); }
.blog-card time { color: var(--text-mute); font-size: 12px; }
.blog-card { position: relative; }
.blog-card-cat {
  display: inline-block; align-self: flex-start;
  background: var(--accent-soft); color: var(--accent-hover);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 10px; border-radius: var(--radius-pill); margin-bottom: var(--sp-2);
}

/* Navegacao de categorias */
.blog-cats {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: var(--sp-6);
}
.blog-cat {
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: all var(--transition);
}
.blog-cat:hover { border-color: var(--accent); color: var(--accent); }
.blog-cat.ativo { background: var(--accent); color: white; border-color: var(--accent); }
.blog-cat.ativo:hover { color: white; }

/* Paginacao */
.blog-paginacao {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
  margin-top: var(--sp-7);
}
.blog-pag-info { font-size: 14px; color: var(--text-dim); }

/* Post: chip de categoria, tags, preview banner */
.post-cat-chip {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent-hover);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 12px; border-radius: var(--radius-pill);
  text-decoration: none; margin-bottom: var(--sp-3);
}
.post-cat-chip:hover { background: var(--accent); color: white; }
.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.post-tag {
  font-size: 13px; color: var(--text-dim);
  background: rgba(45, 41, 38, 0.04); padding: 4px 10px; border-radius: 6px;
}
.preview-banner {
  background: #fff3cd; border-bottom: 1px solid #ffe08a;
  padding: 10px 0; font-size: 14px; color: #856404; text-align: center;
}
.preview-banner a { color: var(--accent-hover); font-weight: 600; }

/* ===== Post ===== */
.post { padding: var(--sp-7) 0 var(--sp-9); }
.post .container { max-width: 760px; }
.post-breadcrumb { margin-bottom: var(--sp-5); font-size: 13px; color: var(--text-dim); }
.post h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}
.post-meta { color: var(--text-dim); font-size: 14px; margin-bottom: var(--sp-6); }
/* Capa grande do artigo: mesmo padrao 16:9 configuravel por capa_fit. */
.post-capa {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  margin-bottom: var(--sp-6);
  background: color-mix(in srgb, var(--text) 4%, white);
}
.post-capa--contain {
  object-fit: contain;
  background: color-mix(in srgb, var(--text) 6%, white);
}
.post-body { font-size: 17px; line-height: 1.75; }
.post-body img { border-radius: var(--radius); margin: var(--sp-4) 0; }
.post-body h2 { margin-top: var(--sp-6); }

/* ===== CTA inline no corpo do post (injetada via ctas.conteudo_html) =====
   Vive AQUI (pages.css) porque carrega no admin E no site publico (o post
   publico usa base_publico.html, que nao carrega editor.css).
   O wrapper leva sempre 2 modificadores: estilo (--padrao/destaque/suave/
   escuro/contorno) e alinhamento (--esq/centro). */
.post-cta-inline {
  margin: var(--sp-5) 0;
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius-lg);
  /* Visual PADRAO por default: assim .post-cta-inline sozinha (previews do
     pipeline) ja aparece estilizada. As variantes abaixo sobrescrevem. */
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 8%, white),
    color-mix(in srgb, var(--accent) 3%, white));
  border-left: 5px solid var(--accent);
}
.post-cta-inline p { margin: 8px 0; font-size: 16px; line-height: 1.55; }
.post-cta-inline p:first-child { margin-top: 0; }
.post-cta-inline p:last-child { margin-bottom: 0; }
.post-cta-inline .post-cta-titulo { font-size: 19px; margin-bottom: 4px; }
.post-cta-inline .post-cta-titulo strong { font-weight: 700; }
.post-cta-img {
  display: block; width: 100%; max-height: 260px;
  object-fit: cover; border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}
.post-cta-acao { margin-top: var(--sp-4); margin-bottom: 0; }

/* Botao base (tambem estilo primario) + legado (a solto no modo HTML) */
.post-cta-inline a,
.post-cta-btn {
  display: inline-block;
  padding: 11px 24px;
  background: var(--accent);
  color: white !important;
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.post-cta-inline a:hover,
.post-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}
.post-cta-btn--secundario {
  background: transparent;
  color: var(--accent-hover) !important;
  border-color: var(--accent);
}
.post-cta-btn--secundario:hover { background: var(--accent-soft); }
.post-cta-btn--ghost {
  background: transparent;
  color: var(--accent-hover) !important;
  border-color: transparent;
  padding-left: 6px; padding-right: 6px;
  text-decoration: underline !important;
}
.post-cta-btn--ghost:hover { transform: none; box-shadow: none; }

/* ---- Variantes de estilo do quadro (sobrescrevem o padrao da base) ---- */
/* --padrao nao precisa de regra: e o visual base. */
.post-cta-inline--destaque {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 18%, white),
    color-mix(in srgb, var(--accent) 7%, white));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 16%, transparent);
}
.post-cta-inline--suave {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.post-cta-inline--contorno {
  background: transparent;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, white);
}
.post-cta-inline--escuro {
  background: linear-gradient(135deg, #2D2926, #45403c);
  border: 0;
  color: #fff;
  box-shadow: 0 16px 40px rgba(45, 41, 38, 0.25);
}
.post-cta-inline--escuro p { color: rgba(255, 255, 255, 0.9); }
.post-cta-inline--escuro .post-cta-titulo strong { color: #fff; }
.post-cta-inline--escuro .post-cta-btn--secundario {
  color: #fff !important; border-color: rgba(255, 255, 255, 0.55);
}
.post-cta-inline--escuro .post-cta-btn--secundario:hover { background: rgba(255, 255, 255, 0.12); }
.post-cta-inline--escuro .post-cta-btn--ghost { color: var(--accent-light) !important; }

/* ---- Alinhamento ---- */
.post-cta-inline--centro { text-align: center; }
.post-cta-inline--centro .post-cta-img { margin-left: auto; margin-right: auto; max-width: 520px; }

/* ===== Imagens do post: <figure class="post-fig ...">  =====
   Compartilhado entre o editor (.rt-area) e o site publico (.post-body).
   Prefixo `figure` eleva a especificidade pra vencer `.post-body img` e
   `.rt-area img` independente da ordem de carga dos CSS. Tamanho fica no
   atributo width da <img>; estas classes cuidam de posicao e enfeite. */
figure.post-fig {
  width: fit-content;
  max-width: 100%;
  margin: var(--sp-5) 0;
}
figure.post-fig img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 8px;
}
figure.post-fig a { display: block; }
/* alinhamento em bloco (fit-content faz a figure encolher no tamanho da imagem) */
figure.post-fig--esq    { margin-right: auto; margin-left: 0; }
figure.post-fig--centro { margin-left: auto; margin-right: auto; }
figure.post-fig--dir    { margin-left: auto; margin-right: 0; }
/* quebra de texto (texto flui ao lado) */
figure.post-fig--flut-esq {
  float: left; max-width: 48%;
  margin: 4px var(--sp-5) var(--sp-3) 0;
}
figure.post-fig--flut-dir {
  float: right; max-width: 48%;
  margin: 4px 0 var(--sp-3) var(--sp-5);
}
/* enfeites */
figure.post-fig--borda img  { border: 1px solid var(--border); }
figure.post-fig--arred img  { border-radius: 18px; }
figure.post-fig--sombra img { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14); }
/* legenda */
figure.post-fig figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-mute);
  text-align: center;
}
/* clearfix pros floats nao vazarem do corpo do post/editor */
.post-body::after, .rt-area::after { content: ""; display: block; clear: both; }
/* Quebra baseada na largura da PROPRIA coluna (container query), nao da viewport:
   assim a imagem flutuante vira bloco centralizado no mesmo ponto no editor e no
   publico, mesmo com larguras de coluna diferentes. */
.post-body, .rt-area { container-type: inline-size; }
@container (max-width: 520px) {
  figure.post-fig--flut-esq, figure.post-fig--flut-dir {
    float: none; max-width: 100%;
    margin-left: auto; margin-right: auto;
  }
}

.post-body h3 { margin-top: var(--sp-5); }
.post-body pre {
  background: var(--text);
  color: #fff;
  padding: var(--sp-4);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.post-body code { font-size: 15px; }
.post-cta {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ===== Sobre / equipe ===== */
.prosa h2 { margin-top: var(--sp-7); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
}
.team-card { text-align: center; }
.team-card h4 { margin-bottom: 4px; }
.team-card p { font-size: 13px; color: var(--text-dim); margin: 0; }
.avatar-ph {
  width: 100px; height: 100px;
  background: var(--accent-soft);
  border-radius: 50%;
  margin: 0 auto var(--sp-3);
}

/* ===== Paginas de erro ===== */
.erro { padding: var(--sp-9) 0; text-align: center; }
.erro .container { max-width: 560px; }
.erro-num { font-size: 120px; font-weight: 800; line-height: 1; display: inline-block; }

/* ===== Admin dashboard ===== */
.admin-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.admin-logo { height: 32px; margin-bottom: var(--sp-3); }
.admin-page { padding: var(--sp-6) 0; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}
.kpi-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-mute); font-weight: 600; margin: 0 0 4px;
}
.kpi-valor { font-size: 32px; font-weight: 700; margin: 0; color: var(--accent); }

/* Tabela padrao */
.tabela { width: 100%; border-collapse: collapse; }
.tabela th {
  text-align: left; padding: var(--sp-3);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.tabela td { padding: var(--sp-3); font-size: 14px; border-bottom: 1px solid var(--border); }
.tabela .dim { color: var(--text-dim); }

.vazio { color: var(--text-dim); text-align: center; padding: var(--sp-5); margin: 0; }

/* ===== Admin: paginas ===== */
.pag-cat {
  font-size: 14px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); font-weight: 700;
  margin: var(--sp-6) 0 var(--sp-3);
}
.pag-crumb {
  color: var(--text-dim); font-size: 13px; margin: 0 0 var(--sp-2);
}
.pag-crumb a { color: var(--text-dim); text-decoration: none; }
.pag-crumb a:hover { color: var(--accent); }

/* Botao "Voltar" (estilo Notion/Linear) */
.btn-voltar {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  margin-bottom: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-voltar:hover {
  background: white;
  color: var(--text);
  border-color: var(--text-dim);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.btn-voltar svg { transition: transform var(--transition); }
.btn-voltar:hover svg { transform: translateX(-2px); }

/* Chip discreto de categoria (ao lado do H1) */
.chip-cat {
  display: inline-block; vertical-align: middle;
  margin-left: 10px;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Botao voltar antigo (mantido caso ainda em uso) */
.voltar-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  margin-bottom: var(--sp-3);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}
.voltar-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.voltar-seta {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-hover);
  font-size: 14px; font-weight: 700; line-height: 1;
  transition: transform var(--transition);
}
.voltar-link:hover .voltar-seta {
  background: var(--accent); color: white;
  transform: translateX(-2px);
}

/* Versao compacta (usada no topbar sticky) */
.voltar-link-sm {
  padding: 4px 10px 4px 6px;
  font-size: 12px;
  margin-bottom: 4px;
}
.voltar-link-sm .voltar-seta { width: 16px; height: 16px; font-size: 12px; }

/* Tag da categoria destacada */
.tag-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-right: 6px;
}
.tag-cat::before {
  content: '';
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.mono { font-family: "Consolas", "Monaco", monospace; font-size: 13px; }
.badge-off {
  background: rgba(157, 156, 158, 0.15); color: var(--text-mute);
}
.pag-form { max-width: 820px; }
.pag-grupo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  margin-bottom: var(--sp-5);
  background: var(--surface);
}
.pag-grupo legend {
  padding: 4px 12px; font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-hover); background: var(--accent-soft);
  border-radius: var(--radius-pill);
}
.hint { color: var(--text-mute); font-size: 12px; font-weight: 400; }
.pag-form-acoes {
  display: flex; gap: var(--sp-3); flex-wrap: wrap;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-5);
}

/* ================================================================
   Editor visual de paginas
   ================================================================ */

/* Cores por grupo (evita CSS inline no template) */
.cor-hero        { --c: #FF7500; --cor-bloco: #FF7500; }
.cor-autoridade  { --c: #2ecc71; --cor-bloco: #2ecc71; }
.cor-kpis        { --c: #3387E9; --cor-bloco: #3387E9; }
.cor-canais      { --c: #D62976; --cor-bloco: #D62976; }
.cor-resultados  { --c: #F1C40F; --cor-bloco: #F1C40F; }
.cor-bloco-ia    { --c: #7C3AED; --cor-bloco: #7C3AED; }
.cor-ecossistema { --c: #FF7500; --cor-bloco: #FF7500; }
.cor-cta-final       { --c: #2D2926; --cor-bloco: #2D2926; }
.cor-sobre-o-joviano { --c: #FF7500; --cor-bloco: #FF7500; }
.cor-a-empresa       { --c: #2D2926; --cor-bloco: #2D2926; }
.cor-equipe          { --c: #3387E9; --cor-bloco: #3387E9; }
.cor-formulario      { --c: #2ecc71; --cor-bloco: #2ecc71; }
.cor-estado-vazio    { --c: #F1C40F; --cor-bloco: #F1C40F; }
.cor-layout-do-post  { --c: #D62976; --cor-bloco: #D62976; }
.cor-geral           { --c: #7F7F7F; --cor-bloco: #7F7F7F; }

/* ===== Topbar sticky ===== */
.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: var(--sp-4) 0 var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.editor-topbar.flutuando {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.editor-topbar .btn-voltar { margin-bottom: var(--sp-3); }

.editor-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
}
.editor-topbar-titulo {
  margin: 0; font-size: 24px; line-height: 1.2;
  display: inline-flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap;
}
.et-acoes { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.et-status {
  font-size: 12px; font-weight: 600;
  color: var(--text-mute);
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(157, 156, 158, 0.12);
}
.et-status.mudou {
  color: var(--accent-hover); background: var(--accent-soft);
}
.btn.destaque {
  box-shadow: 0 0 0 4px var(--accent-glow), 0 6px 16px var(--accent-glow);
  animation: pulseSalvar 2s ease-in-out infinite;
}
@keyframes pulseSalvar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* ===== Layout 2 colunas: TOC + corpo ===== */
.editor-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-6);
  align-items: start;
}
.editor-toc {
  position: sticky;
  top: 84px;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-mute); margin: 0 0 var(--sp-3);
}
.toc-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-5); }
.toc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.toc-item:hover {
  background: rgba(45, 41, 38, 0.04);
  color: var(--text);
}
.toc-item.ativo {
  background: var(--text);
  color: white;
  font-weight: 600;
}
.toc-item.ativo:hover { color: white; }
.toc-ico {
  width: 24px; height: 24px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c, var(--accent));
  color: white; font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.toc-count {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--text-mute);
  padding: 2px 6px; border-radius: 4px;
  background: rgba(157, 156, 158, 0.15);
}
.toc-item.ativo .toc-count {
  background: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.8);
}
.toc-atalhos { border-top: 1px solid var(--border); padding-top: var(--sp-3); }
.toc-atalho {
  display: block; padding: 6px 10px; border-radius: 6px;
  color: var(--text-dim); font-size: 12px; font-weight: 500;
  text-decoration: none;
}
.toc-atalho:hover { background: rgba(45, 41, 38, 0.04); color: var(--accent); }

/* ===== Corpo do editor ===== */
.editor-corpo { display: flex; flex-direction: column; gap: var(--sp-6); }

/* ===== Bloco (grupo) ===== */
.ed-bloco {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  scroll-margin-top: 100px;
  transition: box-shadow var(--transition);
}
.ed-bloco:hover { box-shadow: var(--shadow); }

.ed-bloco-head {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg, var(--cor-bloco, var(--accent)) 0%, transparent 200%);
  color: white;
  position: relative;
  overflow: hidden;
}
.ed-bloco-head::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 0;
}
.ed-bloco-head > * { position: relative; z-index: 1; }
.ed-bloco-ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--cor-bloco, var(--accent));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.ed-bloco-info { flex: 1; }
.ed-bloco-info h2 {
  margin: 0 0 2px; font-size: 20px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}
.ed-bloco-info p {
  margin: 0; font-size: 13px; color: var(--text-dim);
}
.ed-bloco-count {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dim);
  border: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.ed-bloco-corpo {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-4);
}

/* ===== Subgrupo (KPI 1, YouTube, Depoimento 1, etc) ===== */
.ed-sub {
  background: rgba(45, 41, 38, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.ed-sub-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--sp-3);
}
.ed-sub-marker {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cor-bloco, var(--accent));
}
.ed-sub-head h3 {
  margin: 0; font-size: 14px; font-weight: 700;
  color: var(--text); text-transform: uppercase; letter-spacing: 0.05em;
}
.ed-sub-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-3);
}

/* ===== Campo individual ===== */
.ed-campo {
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.ed-campo label {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
}
.ed-campo-label {
  font-size: 13px; font-weight: 500; color: var(--text);
}
.ed-campo-tipo {
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(45, 41, 38, 0.05);
  color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-family: "Consolas", monospace;
}
.ed-campo input[type="text"],
.ed-campo input[type="url"],
.ed-campo textarea {
  width: 100%;
  padding: 10px 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit; font-size: 14px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ed-campo input:focus,
.ed-campo textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ed-campo textarea {
  resize: vertical; min-height: 80px; line-height: 1.5;
}
.ed-campo input.alterado,
.ed-campo textarea.alterado {
  border-color: var(--accent);
  background: rgba(255, 117, 0, 0.03);
}

.ed-ajuda { font-size: 11px; color: var(--text-mute); margin: 4px 0 0; }
.ed-contador {
  font-size: 11px; color: var(--text-mute);
  align-self: flex-end;
  font-family: "Consolas", monospace;
}

/* Preview de favicon em URLs */
.ed-link-preview {
  display: none;
  align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
  padding: 4px 8px; border-radius: 6px;
  background: rgba(45, 41, 38, 0.04);
  margin-top: 4px;
  align-self: flex-start;
}
.ed-link-preview.ativo { display: inline-flex; }
.ed-link-preview img { width: 16px; height: 16px; border-radius: 3px; }

/* Toggle bonito */
.ed-toggle { display: flex; gap: 6px; background: rgba(45, 41, 38, 0.04); padding: 4px; border-radius: 10px; }
.ed-toggle-opt {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  cursor: pointer; transition: all var(--transition);
}
.ed-toggle-opt input { display: none; }
.ed-toggle-opt:has(input:checked) {
  background: white; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Cor com preview */
.ed-cor { display: flex; gap: 8px; align-items: center; }
.ed-cor input[type="color"] {
  width: 44px; height: 44px; padding: 2px;
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; background: transparent;
}
.ed-cor input[type="text"] { flex: 1; font-family: "Consolas", monospace; }

/* ===== Campo IMAGEM (preview + upload + URL) ===== */
.ed-campo-imagem { grid-column: 1 / -1; }
.ed-imagem {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: stretch;
}
.ed-imagem-preview {
  width: 120px; height: 120px;
  border-radius: var(--radius);
  background: rgba(45, 41, 38, 0.04);
  border: 1.5px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--text-mute); font-size: 12px; font-weight: 500;
}
.ed-imagem-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.ed-imagem-vazio { color: var(--text-mute); font-size: 12px; }

.ed-imagem-controles {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.ed-imagem-linha {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.ed-imagem-btn-enviar {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 0;
}
.ed-imagem-btn-enviar:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-glow);
}
.ed-imagem-btn-enviar.carregando {
  background: var(--accent-light);
  cursor: wait;
  animation: pulseCarregando 1.2s ease-in-out infinite;
}
@keyframes pulseCarregando {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.ed-imagem-btn-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px; font-weight: 800;
}
.ed-imagem-file { display: none; }
.ed-imagem-btn-limpar {
  padding: 6px 12px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.ed-imagem-btn-limpar:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.ed-imagem-info {
  font-size: 11px; color: var(--text-mute); margin: 0;
}

@media (max-width: 640px) {
  .ed-imagem { grid-template-columns: 1fr; }
  .ed-imagem-preview { width: 100%; height: 180px; }
}

/* ===== Rodape do editor ===== */
.editor-rodape {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: var(--sp-4);
}
.editor-rodape-msg p { margin: 0; font-size: 13px; }

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-toc { position: static; margin-bottom: var(--sp-4); }
  .toc-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px; }
  .toc-atalhos { display: none; }
  .editor-topbar { margin: calc(var(--sp-4) * -1) calc(var(--sp-4) * -1) var(--sp-4); padding: var(--sp-3) var(--sp-4); }
  .et-info h1 { font-size: 18px; }
  .ed-sub-campos { grid-template-columns: 1fr; }
}
