/* =========================================================
   Módulo A — Vagas, assistente de vaga, templates e fluxos
   ========================================================= */

/* Tamanho padrão de ícones (especificidade zero: qualquer regra mais específica vence) */
:where(svg.ic) { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }

/* ---------------- Lista de vagas ---------------- */
.vg-foot-warn { color: var(--danger); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.vg-panel { overflow: hidden; }
.vg-panel .tabs { padding: 0 12px; }
.vg-tabs .tab svg { color: var(--star); }
.vg-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 16px; }
.vg-chips:not(:empty) { padding-bottom: 12px; }
.vg-chips .tag { animation-delay: calc(var(--i, 0) * 40ms); }
.vg-count { padding: 0 18px 8px; }
.vg-table td { padding-top: 14px; padding-bottom: 14px; }
.vg-name { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.vg-ico, .vg-card-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--primary); font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
  transition: transform .3s var(--ease-spring);
}
.vg-card-ico svg { width: 19px; height: 19px; }
.vg-card-ico.lg { width: 52px; height: 52px; border-radius: 15px; }
.vg-card-ico.lg svg { width: 24px; height: 24px; }
tr:hover .vg-ico { transform: rotate(-6deg) scale(1.06); }
.vg-title { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vg-new { height: 20px; font-size: 10.5px; animation: pop .35s var(--ease-spring); }
.vg-pos { display: flex; flex-direction: column; gap: 6px; min-width: 70px; }
.vg-pos .progress { height: 6px; }
.vg-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.vg-inline svg { width: 15px; height: 15px; color: var(--muted); }
.vg-status { display: flex; flex-wrap: wrap; gap: 4px; }
.vg-more { background: var(--surface-3); color: var(--text-2); font-size: 10px; }

/* Cards (grid) */
.vg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; padding: 4px 16px 18px; }
.vg-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  animation: fade-up .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.vg-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--primary-solid), var(--primary-solid-2) 78%, var(--accent)); box-shadow: 0 0 14px var(--primary-ring); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.vg-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -90px; top: -90px; border-radius: 50%; background: radial-gradient(circle, var(--primary-100), transparent 70%); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.vg-card > * { position: relative; }
.vg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--glow); border-color: var(--primary-100); }
.vg-card:hover::after { opacity: 1; }
.vg-card:hover::before { transform: scaleX(1); }
.vg-card:hover .vg-card-ico { transform: rotate(-8deg) scale(1.08); }
.vg-card-top { display: flex; align-items: center; gap: 4px; }
.vg-card-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.vg-card-status { display: flex; flex-wrap: wrap; gap: 6px; }
.vg-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--text-2); }
.vg-card-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-card-meta svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.vg-card-pos .progress { margin-top: 6px; }
.vg-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.vg-card-stats div { display: flex; flex-direction: column; align-items: center; }
.vg-card-stats b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vg-card-stats span { font-size: 11px; color: var(--muted); }
.vg-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--border); padding-top: 10px; }

.vg-tpl-choice .choice { animation-delay: calc(var(--i, 0) * 50ms); }
.vg-tpl-new { border-style: dashed; }

/* Drawer de detalhes */
.vd-head { padding-bottom: 16px; }
.vd-title { font-size: 20px; font-weight: 800; margin-top: 2px; }
.vd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.vd-kpis > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.vd-kpis span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.vd-kpis b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-body { display: flex; flex-direction: column; gap: 14px; }
.vd-sec { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.vd-sec h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14.5px; }
.vd-sec h3 svg { width: 18px; height: 18px; color: var(--primary); }
.vd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.vd-kv { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; min-width: 0; }
/* Só o rótulo direto: com ".vd-kv span" os avatares e as letras de perfil (A, P...) dentro do valor herdavam cinza sobre o fundo colorido */
.vd-kv > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.vd-kv b { font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }
.vd-kv .prof span.P { color: #0b0b0b; } /* letra branca sobre o verde do perfil Planejador: 2,8:1 */
.vd-desc { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; font-size: 13px; color: var(--text-2); line-height: 1.6; max-height: 260px; overflow: auto; }
.vd-ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vd-aprovs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.vd-aprov { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.vd-etapas { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; position: relative; }
.vd-etapa { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); animation: fade-up .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.vd-etapa-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-weight: 800; font-size: 12px; flex: none; }
.vd-link { display: flex; gap: 8px; }
.vd-link .input { flex: 1; font-size: 12.5px; color: var(--text-2); }

/* Modais de ação */
.vg-conc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vg-conc-kpis div { padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.vg-conc-kpis b { display: block; font-size: 26px; font-weight: 800; }
.vg-conc-kpis span { font-size: 12px; color: var(--muted); }
.vg-switch-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.vg-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.vg-timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--primary), var(--border)); border-radius: 2px; }
.vg-timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 16px; animation: fade-up .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.vg-tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); margin-top: 4px; flex: none; position: relative; z-index: 1; }
.vg-timeline li:first-child .vg-tl-dot { background: var(--primary); box-shadow: 0 0 0 5px var(--primary-ring); }
.vg-qr { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* O QR Code precisa de fundo claro para ser lido pela câmera: o branco é intencional nos dois temas */
.vg-qr-box { width: 252px; height: 252px; display: grid; place-items: center; border-radius: 20px; background: #fff; border: 1px solid var(--primary-100); box-shadow: var(--shadow), var(--glow); padding: 16px; }
.vg-qr-box.ok { animation: pop .4s var(--ease-spring); }
.vg-qr-box .spinner { color: var(--primary); width: 28px; height: 28px; }
.vg-qr .vd-link { width: 100%; margin-top: 12px; }
.vg-roteiro { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); }
.vg-roteiro h3 { display: flex; align-items: center; gap: 8px; }
.vg-roteiro h3 svg { color: var(--primary); width: 18px; height: 18px; }
.vg-roteiro ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; counter-reset: q; }
.vg-roteiro li { padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); transition: border-color .2s, box-shadow .2s; }
.vg-roteiro li:hover { border-color: var(--primary-100); box-shadow: 0 0 0 3px var(--primary-50); }
.vg-roteiro li::marker { color: var(--primary); font-weight: 800; }
.vg-ap-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vg-ap-list { display: flex; flex-direction: column; gap: 8px; }
.vg-ap-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); }
.vg-ap-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.vg-ap-obs { width: 100%; font-size: 12.5px; color: var(--text-2); font-style: italic; padding-left: 46px; }

/* Confete */
.vg-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.vg-confetti i { position: absolute; top: -20px; display: block; opacity: .95; animation: vg-fall 2s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes vg-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .2; } }

/* ---------------- Assistente (wizard) ---------------- */
.wz-steps { position: relative; overflow: hidden; margin-bottom: 16px; }
.wz-steps .step { padding: 0 4px; }
.wz-progress { height: 3px; background: var(--surface-3); }
.wz-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary-solid), var(--primary-solid-2)); box-shadow: 0 0 10px var(--primary-ring); transition: width .5s var(--ease); }
.wz-alerts { display: flex; flex-direction: column; gap: 10px; }
.wz-alerts:not(:empty) { margin-bottom: 16px; }
.wz-body { display: flex; flex-direction: column; gap: 16px; }
.wz-body > * { animation: wz-in-next .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.wz-body.wz-anim-prev > * { animation-name: wz-in-prev; }
@keyframes wz-in-next { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes wz-in-prev { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.wz-card { margin: 0 !important; }
.wz-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.wz-card-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-50); color: var(--primary); transition: transform .35s var(--ease-spring); }
.wz-card-ico svg { width: 20px; height: 20px; }
.wz-card:hover .wz-card-ico { transform: rotate(-8deg) scale(1.08); }
.wz-card .section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wz-counter { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 2px; background: var(--surface); }
.wz-counter .input { border: 0; text-align: center; height: 34px; padding: 0 4px; box-shadow: none !important; font-weight: 800; -moz-appearance: textfield; }
.wz-counter .input::-webkit-inner-spin-button, .wz-counter .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.wz-desc { min-height: 220px; }
.wz-typing { border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--primary-ring) !important; background-image: linear-gradient(90deg, transparent, var(--primary-50), transparent); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.wz-flash { animation: wz-flash .9s var(--ease); }
@keyframes wz-flash { 0% { background: var(--primary-100); } 100% { background: var(--surface); } }
.wz-end { overflow: hidden; max-height: 900px; opacity: 1; transition: max-height .45s var(--ease), opacity .3s; }
.wz-end.is-hidden { max-height: 0; opacity: 0; }
.wz-cep-load { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--primary); border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -1px; }
.wz-salref { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-50); color: var(--text-2); font-size: 13px; }
.wz-salref svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 1px; }
.wz-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* O núcleo não define .c-5/.c-7: sem isto os campos Endereço, E-mail do responsável e Provas ficavam com 1 coluna */
.wz-body .form-grid .c-5 { grid-column: span 5; }
.wz-body .form-grid .c-7 { grid-column: span 7; }
/* Campo + botão na mesma linha: no celular o botão encolhia e cortava "Adicionar" (perguntas adicionais, aprovadores do fluxo) */
:is(.wz-body, .fx-form-grid) .row.nowrap > .btn { flex: none; }
:is(.wz-body, .fx-form-grid) .row.nowrap > :is(.input, .select) { flex: 1; min-width: 0; }
.ms-box.invalid, [data-rec].invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 4px var(--danger-50) !important; animation: shake .35s; }
/* O núcleo pinta texto branco sobre var(--primary), que no tema escuro é lavanda clara (~3:1): bolinhas do stepper,
   chips selecionados e o check dos cartões de escolha. Nas telas deste módulo eles usam o roxo sólido da marca. */
.wz-steps .step.done .dot, .wz-steps .step.active .dot { background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); }
.wz-steps .step.active .dot { box-shadow: 0 0 0 6px var(--primary-ring), 0 6px 18px var(--primary-ring); }
:is(.wz-body, #ff-mod) .chip.on { background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); border-color: transparent; color: var(--on-primary); box-shadow: 0 4px 12px -4px var(--primary-ring); }
:is(.wz-body, .fx-form-grid, .vg-tpl-choice) :is(.choice.selected, .choice:has(input:checked)) .ch-check { background: var(--primary-solid); border-color: var(--primary-solid); color: var(--on-primary); box-shadow: 0 0 10px var(--primary-ring); }

/* Cartões de nível */
.lvl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lvl-grid.four { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.lvl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s, background .2s; }
.lvl-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.lvl-card b { font-size: 13px; }
.lvl-card span { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }
.lvl-card.on { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 4px var(--primary-ring); }
.lvl-bars { display: flex; gap: 3px; align-items: flex-end; height: 14px; margin-bottom: 4px; }
.lvl-bars i { width: 5px; border-radius: 2px; background: var(--border-strong); }
.lvl-bars i:nth-child(1) { height: 5px; } .lvl-bars i:nth-child(2) { height: 7px; } .lvl-bars i:nth-child(3) { height: 9px; } .lvl-bars i:nth-child(4) { height: 11px; } .lvl-bars i:nth-child(5) { height: 13px; } .lvl-bars i:nth-child(6) { height: 14px; }
.lvl-bars i.on { background: var(--primary); }

/* Listas de itens adicionados */
.wz-items { display: flex; flex-direction: column; gap: 8px; }
.wz-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); transition: border-color .2s, background .2s; }
.wz-item:hover { border-color: var(--border-strong); background: var(--surface); }
.wz-item-q { align-items: flex-start; }
.wz-item-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.wz-item-ico svg { width: 16px; height: 16px; }
.wz-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); font-weight: 800; font-size: 12px; flex: none; box-shadow: 0 4px 10px var(--primary-ring); }
.wz-mini-sel { width: auto; height: 32px; font-size: 12.5px; padding-left: 10px; }
.wz-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 12px; border: 1.5px dashed var(--border-strong); color: var(--muted); font-size: 13px; }
.wz-empty svg { width: 18px; height: 18px; }
.wz-fx-type { cursor: default; }
.wz-fx-type:hover { transform: none; }

/* Perfil comportamental */
.perfil-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.perfil-card { --pc: var(--p-A); position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px 16px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.perfil-card.pf-E { --pc: var(--p-E); } .perfil-card.pf-C { --pc: var(--p-C); } .perfil-card.pf-P { --pc: var(--p-P); } .perfil-card.pf-A { --pc: var(--p-A); }
.perfil-card::before { content: ""; position: absolute; inset: 0; background: var(--pc); opacity: 0; transition: opacity .3s; }
.perfil-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--pc); }
.perfil-card > * { position: relative; }
.perfil-card span:not(.perfil-letter):not(.perfil-ord) { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }
.perfil-letter { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 6px 16px color-mix(in srgb, var(--pc) 40%, transparent); transition: transform .35s var(--ease-spring); }
/* Amarelo (C) e verde (P) são claros demais para letra branca (verde: 2,8:1) */
.perfil-card.pf-C .perfil-letter, .perfil-card.pf-P .perfil-letter { color: #0b0b0b; }
.perfil-card:hover .perfil-letter { transform: scale(1.1) rotate(-6deg); }
.perfil-card.on { border-color: var(--pc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 25%, transparent); }
.perfil-card.on::before { opacity: .08; }
.perfil-ord { position: absolute !important; top: 10px; right: 10px; padding: 2px 8px; border-radius: 99px; background: var(--pc); color: #fff; font-size: 11px; font-weight: 800; animation: pop .35s var(--ease-spring); }
.perfil-card.pf-C .perfil-ord, .perfil-card.pf-P .perfil-ord { color: #0b0b0b; }

/* Etapas */
.etp-list { display: flex; flex-direction: column; gap: 8px; position: relative; }
.etp-list::before { content: ""; position: absolute; left: 27px; top: 20px; bottom: 20px; width: 2px; background: var(--border); }
.etp, .etp-hint { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); transition: border-color .2s, box-shadow .2s; }
.etp-fixa { background: var(--surface-2); }
.etp-custom { border-color: var(--primary-100); }
.etp-custom:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.etp-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); font-weight: 800; font-size: 12.5px; z-index: 1; box-shadow: 0 0 0 4px var(--surface); }
.etp-fixa .etp-n { background: var(--surface-3); color: var(--text-2); }
.etp-main { flex: 1; min-width: 0; }
.etp-main .input { height: 36px; }
.etp .icon-btn:disabled { opacity: .3; pointer-events: none; }
.etp-del:hover { color: var(--danger); background: var(--danger-50); }
.etp-hint { border-style: dashed; color: var(--muted); font-size: 13px; padding-left: 16px; background: transparent; }
.etp-hint svg { width: 18px; height: 18px; background: var(--surface); border-radius: 50%; z-index: 1; }
#et-sug .chip svg { width: 13px; height: 13px; }

/* Canais */
.canal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.canal-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: all .2s var(--ease); animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.canal-card:hover:not(.locked):not(:disabled) { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.canal-card.on { border-color: var(--primary); background: var(--primary-50); }
.canal-card.locked { cursor: default; grid-column: span 2; }
.canal-card:disabled { opacity: .45; cursor: not-allowed; }
.canal-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); transition: background .2s, color .2s; }
.canal-ico svg { width: 17px; height: 17px; }
.canal-card.on .canal-ico { background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); box-shadow: 0 4px 12px var(--primary-ring); }
.canal-card.on:not(.locked) { box-shadow: 0 0 0 3px var(--primary-ring); }
.canal-card b { font-size: 13px; flex: 1; }
.canal-card.on .muted { color: var(--text-2); } /* cinza --muted sobre lavanda (tema claro) ficava em 3,5:1 */
.canal-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; transition: all .2s var(--ease-spring); }
.canal-check svg { width: 12px; height: 12px; opacity: 0; color: var(--on-primary); }
.canal-card.on .canal-check { background: var(--primary-solid); border-color: var(--primary-solid); transform: scale(1.1); }
.canal-card.on .canal-check svg { opacity: 1; }

/* Revisão */
.rv-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.rv-card { overflow: hidden; }
/* Prévia do anúncio: degradê sempre escuro (texto branco legível nos dois temas), derivado da cor da página da empresa */
.rv-hero { --c: var(--primary-solid); position: relative; padding: 26px 26px 22px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 42%, #12052b) 0%, color-mix(in srgb, var(--c) 88%, #12052b) 48%, color-mix(in srgb, var(--c) 45%, #b21fd1) 100%); overflow: hidden; isolation: isolate; }
.rv-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 220px at 0% 120%, color-mix(in srgb, var(--c) 60%, transparent), transparent 70%), radial-gradient(160px 120px at 92% 108%, rgba(255,138,0,.22), transparent 70%); pointer-events: none; }
.rv-hero::after { content: ""; position: absolute; z-index: -1; width: 240px; height: 240px; border-radius: 50%; right: -70px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,.04) 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.10); animation: float 8s ease-in-out infinite; }
.rv-hero h2 { color: #fff; font-size: 22px; font-weight: 800; margin: 10px 0 12px; position: relative; }
.rv-emp { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; opacity: .95; position: relative; }
.rv-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.2); font-weight: 800; overflow: hidden; }
.rv-logo img { width: 100%; height: 100%; object-fit: contain; background: transparent; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
/* Logo com imagem (emblema circular do escritório, fundo transparente): selo redondo com brilho */
.rv-logo:has(img) { width: 42px; height: 42px; border-radius: 50%; padding: 3px; background: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 0 22px rgba(178,31,209,.45); overflow: visible; }
.rv-logo:has(img) img { border-radius: 50%; }
.rv-logo svg { width: 16px; height: 16px; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.rv-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }
.rv-tags svg { width: 14px; height: 14px; }
.rv-badge { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.18); z-index: 1; }
.rv-badge svg { width: 13px; height: 13px; }
/* Empresa com "Cor da fonte: preta" (Configurações > Página de carreiras), usada com cores de página claras:
   a prévia segue a página de carreiras, com degradê claro e texto escuro, em vez de branco ilegível */
.rv-hero.fg-dark { color: #0b0b0b; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, var(--c) 60%, color-mix(in srgb, var(--c) 88%, #000) 100%); }
.rv-hero.fg-dark h2 { color: #0b0b0b; }
.rv-hero.fg-dark::before { background: radial-gradient(420px 220px at 0% 120%, rgba(255,255,255,.35), transparent 70%); }
.rv-hero.fg-dark .rv-tags span, .rv-hero.fg-dark .rv-logo { background: rgba(0,0,0,.08); }
.rv-hero.fg-dark .rv-logo:has(img) { box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.rv-hero.fg-dark .rv-badge { background: rgba(255,255,255,.5); }
.rv-body { padding: 20px 26px 24px; }
.rv-body h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rv-body h4:first-child { margin-top: 0; }
.rv-desc { white-space: pre-wrap; color: var(--text-2); line-height: 1.65; font-size: 13.5px; }
.rv-body .tag svg { width: 13px; height: 13px; }
.rv-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }
.rv-step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); font-size: 11px; font-weight: 800; }
.rv-prazo { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border-radius: 10px; background: var(--warning-50); color: var(--warning); font-weight: 700; font-size: 12.5px; }
.rv-prazo svg { width: 15px; height: 15px; }
.rv-side { position: sticky; top: 80px; }
.rv-score { display: flex; align-items: center; gap: 16px; }
.rv-ring { position: relative; width: 104px; height: 104px; flex: none; }
.rv-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rv-ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.rv-ring-fg { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--primary-ring)); transition: stroke-dashoffset 1.1s var(--ease); }
.rv-ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rv-ring-val b { font-size: 22px; font-weight: 800; }
.rv-ring-val span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rv-check { display: flex; flex-direction: column; gap: 6px; }
.rv-ck { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: var(--warning-50); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: transform .2s var(--ease), background .2s; animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.rv-ck svg { width: 17px; height: 17px; color: var(--warning); flex: none; }
.rv-ck.ok { background: var(--success-50); cursor: default; }
.rv-ck.ok svg { color: var(--success); }
.rv-ck:not(.ok):hover { transform: translateX(3px); }
.rv-ck span { flex: 1; }
.rv-ck em { font-style: normal; font-weight: 700; font-size: 12px; color: var(--warning); }
.rv-sum-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rv-sum-row:last-of-type { border-bottom: 0; }
.rv-sum-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.rv-sum-ico svg { width: 16px; height: 16px; }

/* Rodapé fixo do assistente */
.wz-foot { position: sticky; bottom: 0; z-index: 20; margin: 22px -32px -60px; padding: 0 32px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--border); box-shadow: 0 -10px 28px -14px var(--primary-ring); }
.wz-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; flex-wrap: wrap; max-width: 1440px; margin: 0 auto; }
.wz-foot-left, .wz-foot-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wz-foot-step { padding-left: 4px; }

/* ---------------- Templates ---------------- */
.tp-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 28px; border-radius: var(--radius-xl); color: #fff; background: var(--grad-brand); background-size: 200% 200%; animation: gradient-pan 14s ease infinite; box-shadow: var(--glow); isolation: isolate; }
.tp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px 200px at 100% 0%, rgba(255,255,255,.16), transparent 70%), radial-gradient(180px 120px at 6% 110%, rgba(255,138,0,.20), transparent 70%); pointer-events: none; }
.tp-hero::after { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; right: 20%; bottom: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), rgba(255,255,255,.03) 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); animation: float 9s ease-in-out infinite; }
.tp-hero h2 { color: #fff; font-size: 20px; font-weight: 800; }
.tp-hero p { color: rgba(255,255,255,.86); margin: 6px 0 0; max-width: 560px; }
.tp-hero-kpis { display: flex; gap: 12px; position: relative; z-index: 1; }
.tp-hero-kpis div { padding: 12px 18px; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); text-align: center; min-width: 120px; transition: transform .25s var(--ease), background .25s; }
.tp-hero-kpis div:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); }
.tp-hero-kpis b { display: block; font-size: 26px; font-weight: 800; }
.tp-hero-kpis span { font-size: 12px; opacity: .9; }
.tp-toolbar { padding: 0 0 16px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tp-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); cursor: pointer; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; animation: fade-up .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); color: var(--text); text-decoration: none !important; }
.tp-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--grad-soft); transition: transform .5s var(--ease); }
.tp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--glow); border-color: var(--primary-100); }
.tp-card:hover::after { transform: scale(1.6); }
.tp-card > * { position: relative; z-index: 1; }
.tp-card-top { display: flex; align-items: center; gap: 8px; }
.tp-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-brand); color: var(--on-primary); box-shadow: 0 8px 18px var(--primary-ring), inset 0 0 0 1px rgba(255,255,255,.10); transition: transform .35s var(--ease-spring); }
.tp-ico svg { width: 20px; height: 20px; }
.tp-card:hover .tp-ico { transform: rotate(-8deg) scale(1.08); }
.tp-title { font-size: 16px; font-weight: 800; }
.tp-desc { color: var(--text-2); font-size: 13px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.tp-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.tp-meta span { display: flex; align-items: center; gap: 8px; }
.tp-meta svg { width: 14px; height: 14px; color: var(--muted); }
.tp-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-stats span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.tp-stats svg { width: 12px; height: 12px; }
.tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; margin-top: auto; border-top: 1px dashed var(--border); }
.tp-new { align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--border-strong); background: transparent; min-height: 260px; gap: 6px; }
.tp-new:hover { border-color: var(--primary); background: var(--primary-50); }
.tp-new-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 6px; transition: transform .35s var(--ease-spring); }
.tp-new-ico svg { width: 24px; height: 24px; }
/* No hover o fundo do cartão vira --primary-50, igual ao do ícone: o círculo some. Ele passa a ser roxo sólido com brilho */
.tp-new:hover .tp-new-ico { transform: rotate(90deg) scale(1.1); background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); box-shadow: 0 8px 20px var(--primary-ring); }
.tp-new:hover .muted { color: var(--text-2); }

/* ---------------- Fluxos de aprovação ---------------- */
.fx-diag { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.fx-node { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.fx-node svg { width: 36px; height: 36px; padding: 9px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--primary); box-sizing: border-box; }
.fx-node.ok svg { background: linear-gradient(135deg, var(--primary-solid), var(--primary-solid-2)); color: var(--on-primary); border-color: transparent; box-shadow: 0 6px 14px var(--primary-ring); }
.fx-arrow { flex: 1; min-width: 22px; height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--primary) 0 6px, transparent 6px 10px); background-size: 20px 2px; animation: fx-dash 1s linear infinite; }
.fx-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--primary); }
@keyframes fx-dash { to { background-position: 20px 0; } }
.fx-par { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 18px; border-radius: 12px; border: 1.5px dashed var(--primary); background: var(--surface); min-width: 120px; }
.fx-par-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; animation: fade-up .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.fx-par-item svg { width: 16px; height: 16px; }
.fx-par-label { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); padding: 0 8px; background: var(--surface-2); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); white-space: nowrap; }
.fx-diag.compact .fx-node { min-width: 70px; font-size: 11px; }
/* Em colunas estreitas (prévia lateral do formulário, celular) o diagrama horizontal não cabia e "Publicação" ficava cortado:
   abaixo de 400px de largura útil o fluxo passa a ser vertical */
#fx-prev, .fx-card { container: fxd / inline-size; }
@container fxd (max-width: 400px) {
  .fx-diag { flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px 20px; overflow: visible; }
  .fx-node, .fx-diag.compact .fx-node { min-width: 0; }
  .fx-arrow { flex: none; width: 2px; min-width: 0; height: 22px; background: repeating-linear-gradient(180deg, var(--primary) 0 6px, transparent 6px 10px); background-size: 2px 20px; animation-name: fx-dash-y; }
  .fx-arrow::after { right: auto; top: auto; left: -4px; bottom: -8px; border-left-color: transparent; border-top-color: var(--primary); }
  .fx-par { align-self: stretch; min-width: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 12px 12px 18px; }
}
@keyframes fx-dash-y { to { background-position: 0 20px; } }
.fx-pend .card-head h3 svg { width: 18px; height: 18px; color: var(--warning); }
.fx-pend-list { display: flex; flex-direction: column; gap: 10px; }
.fx-pend-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; transition: border-color .2s, box-shadow .2s; }
.fx-pend-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.fx-pend-aps { display: flex; gap: 6px; }
.fx-ap { position: relative; border-radius: 50%; padding: 2px; }
.fx-ap::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface-2); }
.fx-ap.ok { box-shadow: 0 0 0 2px var(--success); } .fx-ap.ok::after { background: var(--success); }
.fx-ap.no { box-shadow: 0 0 0 2px var(--danger); } .fx-ap.no::after { background: var(--danger); }
.fx-ap.wait { box-shadow: 0 0 0 2px var(--warning); } .fx-ap.wait::after { background: var(--warning); animation: pulse-dot 1.6s infinite; color: var(--warning); }
.fx-pend-prog { display: flex; flex-direction: column; gap: 4px; width: 110px; }
.fx-pend-prog .progress { height: 6px; }
.fx-filtros { align-items: flex-end; }
.fx-filtros .field { flex: 1; min-width: 220px; }
.fx-filtro-acts { display: flex; gap: 8px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.fx-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; animation: fade-up .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.fx-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), var(--glow); border-color: var(--primary-100); }
.fx-card-top { display: flex; align-items: center; gap: 12px; }
.fx-card-top h3 { font-size: 15.5px; font-weight: 800; }
.fx-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-brand); color: var(--on-primary); flex: none; box-shadow: 0 8px 18px var(--primary-ring), inset 0 0 0 1px rgba(255,255,255,.10); }
.fx-ico svg { width: 20px; height: 20px; }
.fx-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; margin-top: auto; border-top: 1px dashed var(--border); }
.fx-form-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.fx-type { cursor: default; }
.fx-type:hover { transform: none; }
.fx-side { position: sticky; top: 80px; }
.fx-vlink { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; transition: background .15s; }
.fx-vlink:hover { background: var(--surface-3); }
.fx-vlink svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.fx-vlink .ellipsis { flex: 1; }

/* ---------------- Responsivo ---------------- */
@media (max-width: 1100px) {
  .rv-grid, .fx-form-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-side, .fx-side { position: static; }
  .perfil-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wz-foot { margin: 18px -16px -48px; padding: 0 16px; }
  .wz-foot-step { display: none; }
  .wz-foot-left .btn span, .wz-foot-left .btn { font-size: 12.5px; }
  .vd-kpis { grid-template-columns: repeat(2, 1fr); }
  .vd-grid, .wz-two { grid-template-columns: minmax(0, 1fr); }
  .wz-body .form-grid .c-5, .wz-body .form-grid .c-7 { grid-column: span 12; }
  .canal-card.locked { grid-column: auto; }
  .fx-grid { grid-template-columns: minmax(0, 1fr); }
  .vg-grid { padding: 4px 12px 14px; }
  .tp-hero-kpis { width: 100%; }
  .tp-hero-kpis div { flex: 1; min-width: 0; }
  .fx-pend-prog { width: 100%; }
  .vg-ap-obs { padding-left: 0; }
}
@media (max-width: 560px) {
  .perfil-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stepper { padding: 14px 4px; }
  .step .dot { width: 28px; height: 28px; font-size: 12px; }
  .step:not(:last-child)::after { top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); }
  .vg-card-meta { grid-template-columns: minmax(0, 1fr); }
  .rv-hero { padding: 50px 20px 20px; }
  .rv-body { padding: 18px 20px 22px; }
  .wz-foot-in .btn { padding: 0 12px; }
}
