/* V984 — Planejamento Estratégico: SWOT, Matriz de Priorização, Plano de Mudanças, Painel 9.3 */

/* V986: etapas numeradas (padrão do modelo) */
.pe-fluxo { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px; margin: 0 0 16px; }
.pe-passo { flex: 1 1 170px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 48px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: #0f172a; }
.pe-passo:hover { background: #f8fafc; }
.pe-passo-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #f1f5f9; color: #475569; }
.pe-passo-txt { display: flex; flex-direction: column; min-width: 0; }
.pe-passo-txt b { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.pe-passo-txt small { font-size: 12px; line-height: 1.3; color: #64748b; white-space: nowrap; }
.pe-passo.ativo { background: #fff7ed; box-shadow: inset 0 0 0 1.5px #f97316; }
.pe-passo.ativo .pe-passo-n { background: #f97316; color: #fff; }

/* V986: estratégia indicada + matriz de cruzamento */
.pe-estr { display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid #e2e8f0; border-top: 3px solid #f97316; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.pe-estr-txt { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pe-estr-txt h2 { margin: 0; font-size: 16px; font-weight: 600; color: #0f172a; background: none; padding: 0; border: 0; text-transform: none; letter-spacing: 0; }
.pe-estr-nome { font-size: 20px; font-weight: 700; }
.pe-estr-vazia { color: #94a3b8; }
.pe-estr-txt p { margin: 0; font-size: 13px; color: #475569; line-height: 1.45; }
.pe-cruz { flex: 0 0 auto; width: 260px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pe-cruz > div { display: flex; flex-direction: column; gap: 2px; border-radius: 8px; padding: 8px 10px; background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; font-size: 12px; }
.pe-cruz b { font-size: 12px; font-weight: 700; }
.pe-cruz > div.ativo { color: #fff; border-color: transparent; }
.pe-c-SO { --c: #15803d; } .pe-c-WO { --c: #c2410c; } .pe-c-ST { --c: #1d4ed8; } .pe-c-WT { --c: #b91c1c; }
.pe-estr-nome[class*="pe-c-"] { color: var(--c); }
.pe-cruz > div.ativo { background: var(--c); }

/* V986: grade SWOT */
.pe-swot { display: grid; grid-template-columns: 48px repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.pe-colhead { font-size: 12px; font-weight: 600; color: #475569; letter-spacing: .04em; padding-left: 4px; }
.pe-eixo { display: flex; align-items: center; justify-content: center; background: #1e3a5f; border-radius: 12px; padding: 16px 0; box-shadow: 0 2px 6px rgba(15, 23, 42, .18); }
.pe-eixo-ext { background: #334e73; }
.pe-eixo > span { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .12em; white-space: nowrap; }
.pe-eixo svg { transform: rotate(90deg); }
.pe-quad { --q: #15803d; --qf: #dcfce7; background: #fff; border: 1px solid #e2e8f0; border-top: 3px solid var(--q); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pe-q-fraqueza { --q: #c2410c; --qf: #ffedd5; } .pe-q-oportunidade { --q: #1d4ed8; --qf: #dbeafe; } .pe-q-ameaca { --q: #b91c1c; --qf: #fee2e2; }
.pe-quad > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pe-quad-tit { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pe-sigla { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: var(--qf); color: var(--q); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.pe-quad h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--q); background: none; padding: 0; border: 0; text-transform: none; letter-spacing: 0; }
.pe-quad-tit small { display: block; font-size: 12px; color: #64748b; }
.pe-quad-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pe-pill { font-size: 12px; font-weight: 600; color: #334155; background: #f1f5f9; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pe-pill-q { color: var(--q); background: var(--qf); }
.pe-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pe-itens > li { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 6px 6px 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.pe-item-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pe-item-txt { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.4; color: #0f172a; overflow-wrap: anywhere; cursor: pointer; }
.pe-item-txt:hover { color: var(--q); }
.pe-imp { font-size: 12px; font-weight: 600; color: #334155; background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pe-ico { width: 30px; height: 30px; min-width: 0; min-height: 0; flex: 0 0 auto; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 14px; }
.pe-ico:hover { background: #eef2f7; color: #334155; }
.pe-ico-x:hover { background: #fee2e2; color: #b91c1c; }
.pe-item-an { font-size: 12px; color: #475569; padding-right: 70px; }
.pe-item-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; padding: 2px 0 2px; }
.pe-item-meta:empty { display: none; }
.pe-acao { border: 1px solid #e2e8f0; background: #fff; color: #475569; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer; min-height: 0; height: auto; line-height: 1.6; }
.pe-acao:hover { border-color: var(--q); color: var(--q); }
.pe-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: #334155; line-height: 1.6; }
.pe-tag-pri { background: var(--qf); border-color: transparent; color: var(--q); }
.pe-link { border: 0; background: none; padding: 1px 4px; font-size: 11.5px; font-weight: 600; color: #0b5cad; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; min-height: 0; }
.pe-vazio { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 14px; font-size: 13px; color: #64748b; text-align: center; line-height: 1.45; }
.pe-novo { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.pe-novo label { display: flex; margin: 0; }
.pe-novo-txt { flex: 1 1 200px; min-width: 0; }
.pe-novo input, .pe-novo select { height: 40px; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; color: #0f172a; background: #fff; margin: 0; }
.pe-novo input { flex: 1 1 auto; min-width: 0; width: 100%; padding: 0 12px; }
.pe-novo select { padding: 0 8px; font-size: 13px; width: auto; }
.pe-novo input:focus, .pe-novo select:focus { outline: 2px solid #f97316; outline-offset: 1px; }
.pe-add { height: 40px; border: 0; border-radius: 8px; padding: 0 14px; font-size: 14px; font-weight: 600; color: #fff; background: var(--q); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.pe-add:hover { filter: brightness(.95); }
.pe-add[disabled] { opacity: .6; }
.pe-perguntas { border-top: 1px solid #eef2f7; padding-top: 8px; }
.pe-perguntas summary { list-style: none; cursor: pointer; padding: 6px 0; font-size: 13px; font-weight: 500; color: #475569; display: flex; align-items: center; gap: 6px; }
.pe-perguntas summary::-webkit-details-marker { display: none; }
.pe-perguntas summary::before { content: "▸"; width: 12px; transition: transform .15s; }
.pe-perguntas[open] summary::before { transform: rotate(90deg); }
.pe-perguntas ul { margin: 2px 0 4px; padding-left: 36px; font-size: 13px; color: #1d4ed8; line-height: 1.6; }
.pe-legenda { display: flex; flex-wrap: wrap; gap: 6px 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; margin-top: 20px; font-size: 12px; color: #475569; }
.pe-legenda b { color: #0f172a; }
.pe-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pe-x { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 7px; border: 1px solid #f3c7c2; background: #fff; color: #c8372d; font-size: 17px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.pe-x:hover { background: #fbe3e1; }
.pe-nec-lig .small, .pe-pcard .small { padding: 3px 9px; font-size: 12px; border-radius: 7px; min-height: 0; height: auto; white-space: nowrap; }
.pe-nota { font-size: 12px; color: #64748b; margin: 12px 0 0; line-height: 1.5; }

/* Matriz */
.pe-matriz { display: flex; flex-direction: column; gap: 8px; }
.pe-nec { display: grid; grid-template-columns: 74px minmax(0, 1.6fr) auto minmax(0, 1fr); grid-template-areas: "ord txt notas dec" "ord lig lig lig"; gap: 8px 12px; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; background: #fff; }
.pe-nec-ordem { grid-area: ord; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.pe-nec-ordem b { font-size: 20px; color: #12315e; }
.pe-nec-ordem small { font-size: 11px; color: #64748b; }
.pe-barra { display: block; width: 100%; height: 5px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.pe-barra i { display: block; height: 100%; background: var(--mp-orange, #f07c1b); }
.pe-nec-txt { grid-area: txt; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pe-nec-txt > b { font-size: 13.5px; color: #1e293b; overflow-wrap: anywhere; }
.pe-nec-txt textarea, .pe-nec-dec input, .pe-nec-dec select { width: 100%; font-size: 12.5px; box-sizing: border-box; }
.pe-nec-txt textarea { resize: vertical; min-height: 38px; }
.pe-nec-origem { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pe-nec-origem small { font-size: 11.5px; color: #64748b; }
.pe-nec-notas { grid-area: notas; display: grid; grid-template-columns: repeat(5, 52px); gap: 4px; align-self: start; }
.pe-nec-notas label { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pe-nec-notas span { font-size: 11px; font-weight: 700; color: #475569; }
.pe-nec-notas select { width: 100%; padding: 4px 2px; font-size: 12.5px; text-align: center; }
.pe-nec-dec { grid-area: dec; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pe-dec-sim { background: #e3f4ea; color: #1e6b40; border-color: #9fd3b4; font-weight: 600; }
.pe-dec-nao { background: #fbe3e1; color: #9f2a20; border-color: #f3c7c2; font-weight: 600; }
.pe-dec-aguardar { background: #fdf3d8; color: #7a5300; border-color: #f1d999; font-weight: 600; }
.pe-dec-acompanhar { background: #e6eefb; color: #12315e; border-color: #bcd0f0; font-weight: 600; }
.pe-nec-lig { grid-area: lig; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; border-top: 1px dashed #e2e8f0; padding-top: 6px; }
.pe-nec-lig .pe-x { margin-left: auto; }
.pe-nec-lig .small[disabled] { opacity: .5; cursor: not-allowed; }

/* Mudanças */
.pe-mud-tab { table-layout: fixed; width: 100%; }
.pe-mud-tab .c-n { width: 54px; }
.pe-mud-tab .c-quem { width: 15%; }
.pe-mud-tab .c-onde { width: 13%; }
.pe-mud-tab .c-quando { width: 104px; }
.pe-mud-tab .c-quanto { width: 112px; }
.pe-mud-tab .c-st { width: 128px; }
.pe-mud-tab tbody tr { cursor: pointer; }
.pe-mud-tab td { overflow: hidden; text-overflow: ellipsis; }
.pe-mud-tab .ocl-tag { margin-left: 4px; }

/* Modal */
.pe-modal-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 1200; padding: 16px; }
.pe-modal { background: #fff; border-radius: 14px; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.pe-modal-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; }
.pe-modal-cab h3 { margin: 0; font-size: 16px; color: #12315e; }
.pe-modal-corpo { padding: 14px 18px; overflow-y: auto; }
.pe-modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #e2e8f0; }
.pe-modal-extra { margin-top: 12px; }
.pe-modal-extra .danger-ghost { background: #fff; border: 1px solid #f3c7c2; color: #c8372d; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.pe-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.pe-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pe-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pe-campo > span { font-size: 12px; font-weight: 600; color: #475569; }
.pe-campo input, .pe-campo select, .pe-campo textarea { width: 100%; box-sizing: border-box; }
.pe-largo { grid-column: 1 / -1; }
.pe-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; }
.pe-check input { width: auto; margin: 0; }
.pe-ou { grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; text-align: center; border-top: 1px dashed #e2e8f0; padding-top: 8px; }

/* Painel 9.3 */
.pe-painel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pe-pcard { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pe-pcard h3 { margin: 0; font-size: 14.5px; color: #12315e; }
.pe-pts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.pe-pts > div { border-left: 4px solid var(--q); background: #f8fafc; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.pe-pts small, .pe-pts span { font-size: 11px; color: #64748b; }
.pe-pts b { font-size: 18px; color: #12315e; }
.pe-lista { margin: 0; padding-left: 18px; font-size: 13px; color: #334155; display: flex; flex-direction: column; gap: 3px; }
.pe-top { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.pe-top li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.pe-top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-top li b { color: var(--mp-orange-dark, #c8620c); }
.pe-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; width: 100%; }
.pe-st > div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* Responsivo */
@media (max-width: 1200px) {
  .pe-nec { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "ord txt notas" "ord dec dec" "ord lig lig"; }
}
@media (max-width: 900px) {
  .pe-swot { grid-template-columns: minmax(0, 1fr); }
  .pe-colhead { display: none; }
  .pe-eixo { padding: 8px 12px; justify-content: flex-start; }
  .pe-eixo > span { writing-mode: horizontal-tb; transform: none; font-size: 12.5px; }
  .pe-eixo svg { transform: none; }
  .pe-estr { flex-direction: column; align-items: stretch; }
  .pe-estr-txt { flex: none; }
  .pe-cruz { width: auto; }
  .pe-painel { grid-template-columns: minmax(0, 1fr); }
  .pe-mud-tab .c-onde, .pe-mud-tab .c-quanto { display: none; }
}
@media (max-width: 640px) {
  .pe-passo { flex: 1 1 calc(50% - 8px); padding: 6px 8px; }
  .pe-passo-txt b { white-space: normal; font-size: 13px; }
  .pe-item-l1 { flex-wrap: wrap; }
  .pe-item-txt { flex-basis: 100%; }
  .pe-imp { margin-right: auto; }
  .pe-item-an { padding-right: 0; }
  .pe-novo select, .pe-add { flex: 1 1 auto; }
  .pe-add { justify-content: center; }
  .pe-nec { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ord" "txt" "notas" "dec" "lig"; }
  .pe-nec-ordem { flex-direction: row; justify-content: flex-start; }
  .pe-nec-ordem .pe-barra { flex: 1; }
  .pe-nec-notas { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pe-form, .pe-form-3 { grid-template-columns: minmax(0, 1fr); }
  .pe-pts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pe-mud-tab .c-quem { display: none; }
}

/* V1295 — SWOT: cabeçalho com revisão, matriz 2×2 com pontuação, balanço, peso colorido, perguntas clicáveis */
.pe-swot-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.pe-swot-top h2{margin:0;font-size:18px;font-weight:700;color:#173f68;background:none;padding:0;border:0;text-transform:none;letter-spacing:0}
.pe-swot-top span{color:#64748b;font-size:12.5px}.pe-swot-top span b{color:#173f68}
.pe-swot-acoes{display:flex;gap:8px;flex-wrap:wrap}
.pe-bt{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#1d4f91;font-weight:700;font-size:12.5px;cursor:pointer;white-space:nowrap}
.pe-bt:hover{background:#eef4fc;border-color:#1d4f91}
.pe-swot-top+.pe-legenda{margin:0 0 12px}
.pe-res{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px;margin-bottom:20px}
.pe-res-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.pe-res-lbl{font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#64748b}
.pe-mx{display:grid;grid-template-columns:110px minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:stretch}
.pe-mx-h{font-size:11.5px;font-weight:700;color:#64748b;text-align:center;align-self:end}
.pe-mx-l{font-size:11.5px;font-weight:700;color:#64748b;display:flex;align-items:center}
.pe-mx-cel{border:1px solid #e2e8f0;background:#f8fafc;border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.pe-mx-cel b{font-size:13px;color:#173f68}.pe-mx-cel small{font-size:11.5px;color:#64748b}
.pe-mx-cel.ativo{background:var(--c);border-color:transparent}.pe-mx-cel.ativo b,.pe-mx-cel.ativo small{color:#fff}
.pe-estr-frase{border-radius:8px;padding:9px 12px;font-size:12.5px;line-height:1.45;background:#effaf3;border:1px solid #bfe3cc;color:#1e5b38}
.pe-estr-frase span{color:#4b6b58}.pe-estr-frase.vazia{background:#f8fafc;border-color:#e2e8f0;color:#64748b}
.pe-bal{display:flex;flex-direction:column;gap:4px}
.pe-bal-l{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:#64748b}.pe-bal-l span:first-child{font-weight:700;color:#334155}
.pe-bal-bar{display:flex;height:22px;border-radius:6px;overflow:hidden;font-size:11px;font-weight:800;color:#fff;background:#f1f5f9}
.pe-bal-bar i{font-style:normal;display:flex;align-items:center;padding:0 8px;white-space:nowrap;overflow:hidden}
.pe-bal-bar i.f{background:#2f9d6f}.pe-bal-bar i.fr{background:#e8741c}.pe-bal-bar i.o{background:#2f6fe0}.pe-bal-bar i.a{background:#c8372d}
.pe-bal-bar.vazia{color:#94a3b8;font-weight:600;align-items:center;padding:0 8px}
.pe-bal-resumo{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11.5px;color:#64748b;margin-top:2px}.pe-bal-resumo b{color:#173f68}
.pe-peso{flex:0 0 auto;min-width:28px;height:22px;padding:0 6px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#fff;background:var(--q)}
.pe-peso-7{opacity:.82}.pe-peso-3{opacity:.62}.pe-peso-1{opacity:.45}
.pe-tag-tema{background:#eef2ff!important;color:#3730a3!important}
.pe-perg-chips{display:flex;flex-wrap:wrap;gap:6px;border-top:1px solid #eef2f7;padding-top:10px}
.pe-perg{border:1px dashed #b9cbe0;background:#fbfdff;color:#475569;border-radius:999px;padding:4px 10px;font-size:11.5px;cursor:pointer;text-align:left}
.pe-perg:hover,.pe-perg.ativa{border-style:solid;border-color:var(--q);color:var(--q);background:#fff}
.pe-hist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-width:min(560px,80vw)}
.pe-hist li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px}
.pe-hist li small{display:block;color:#64748b;font-size:12px;margin-top:2px}
@media(max-width:1000px){.pe-res{grid-template-columns:minmax(0,1fr)}}
@media(max-width:560px){.pe-mx{grid-template-columns:80px minmax(0,1fr) minmax(0,1fr)}}

/* V1296 — etapas do planejamento: colunas iguais, títulos em uma linha, setas entre etapas */
.pe-fluxo{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:6px;flex-wrap:nowrap}
.pe-passo{position:relative;flex:none;min-height:56px;padding:8px 22px 8px 10px;gap:9px;border-radius:9px;transition:background .15s}
.pe-passo:not(:last-child)::after{content:"";position:absolute;right:6px;top:50%;width:7px;height:7px;border-top:2px solid #cbd5e1;border-right:2px solid #cbd5e1;transform:translateY(-50%) rotate(45deg)}
.pe-passo-n{width:28px;height:28px;font-size:13px;box-shadow:inset 0 0 0 1px #e2e8f0}
.pe-passo-txt{gap:2px}
.pe-passo-txt b{display:block;font-size:13px;font-weight:700;color:#173f68;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pe-passo-txt small{display:flex;align-items:center;gap:6px;font-size:11.5px}
.pe-passo-iso{overflow:hidden;text-overflow:ellipsis}
.pe-passo-sai{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:4px;background:#eef2f7;color:#1d4f91;font-size:10.5px;font-weight:800;flex:0 0 auto}
.pe-passo:hover{background:#f4f8fd}
.pe-passo:hover .pe-passo-n{background:#e8f0fb;color:#1d4f91}
.pe-passo.ativo{background:#fff7ed;box-shadow:inset 0 0 0 1.5px #f97316}
.pe-passo.ativo .pe-passo-n{box-shadow:none}
.pe-passo.ativo .pe-passo-txt b{color:#9a3412}
.pe-passo.ativo::after{border-color:#f97316}
@media(max-width:900px){.pe-fluxo{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:4px}.pe-passo:nth-child(3n)::after{display:none}}
@media(max-width:640px){.pe-fluxo{grid-template-columns:repeat(2,minmax(0,1fr))}.pe-passo:nth-child(3n)::after{display:block}.pe-passo:nth-child(2n)::after{display:none}}
@media(max-width:1280px){.pe-passo{padding:8px 16px 8px 8px;gap:7px}.pe-passo-n{width:24px;height:24px;font-size:12px}.pe-passo-txt b{font-size:12.5px}.pe-passo-txt small{font-size:11px}.pe-passo:not(:last-child)::after{right:4px;width:6px;height:6px}}

/* V1297 — Matriz e Plano de Mudanças: cabeçalho no padrão, critérios em linha, abas de filtro e estado vazio guiado */
.pe-tela{display:flex;flex-direction:column;gap:12px}
.pe-tela-cab{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pe-tela-cab>div:first-child{display:flex;flex-direction:column;gap:2px;padding-left:10px;border-left:3px solid #f97316}
.pe-tela-tit{margin:0!important;padding:0!important;background:none!important;border:0!important;text-transform:none!important;letter-spacing:0!important;font-size:16px!important;font-weight:800!important;color:#1d4f91!important}
.pe-tela-cab span{color:#64748b;font-size:12px}
.pe-tela-acoes{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pe-tela-acoes .primary{min-height:36px;padding:0 16px;white-space:nowrap}
.pe-crit{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pe-crit span{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 4px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;font-size:12px;color:#475569}
.pe-crit span b{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#1d4f91;color:#fff;font-size:11px}
.pe-crit span.pe-crit-f{margin-left:auto;padding:4px 10px;background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.pe-crit span.pe-crit-f b{width:auto;height:auto;background:none;color:#9a3412;font-size:12px}
.pe-abas{display:inline-flex;gap:4px;padding:4px;border:1px solid #d8e5f5;border-radius:10px;background:#f5f8fc;flex-wrap:wrap}
.pe-aba{display:inline-flex!important;align-items:center;gap:7px;height:32px!important;min-height:32px!important;margin:0!important;padding:0 12px!important;border:0!important;border-radius:7px!important;background:transparent!important;box-shadow:none!important;color:#33485f!important;font-size:12.5px!important;font-weight:650!important;cursor:pointer;white-space:nowrap}
.pe-aba:hover{background:#e9f1fb!important}
.pe-aba .n{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:0 5px;border-radius:999px;background:#e3ebf5;color:#1d4f91;font-size:11px;font-weight:800}
.pe-aba.t-normal .n{background:#dcfce7;color:#15803d}.pe-aba.t-atencao .n{background:#fef3c7;color:#b45309}.pe-aba.t-critico .n{background:#fee2e2;color:#b91c1c}.pe-aba.t-azul .n{background:#dbeafe;color:#1d4ed8}
.pe-aba.ativo{background:#f97316!important;color:#fff!important}
.pe-aba.ativo .n{background:rgba(255,255,255,.28)!important;color:#fff!important}
.pe-filtros-linha{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pe-busca{flex:1 1 260px;display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;margin:0}
.pe-busca span{color:#94a3b8;font-size:16px}
.pe-busca input{flex:1;border:0!important;outline:0;height:36px;font-size:13px;background:transparent;box-shadow:none!important;padding:0!important}
.pe-vazio-tela{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:30px 20px;border:1px dashed #cbd5e1;border-radius:12px;background:#fbfdff}
.pe-vazio-ico{width:44px;height:44px;border-radius:12px;background:#e8f0fb;color:#1d4f91;display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:4px}
.pe-vazio-tela strong{color:#173f68;font-size:15px}
.pe-vazio-tela span{max-width:620px;color:#64748b;font-size:13px;line-height:1.5}
.pe-vazio-tela span b{color:#334155}
.pe-vazio-acoes{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:8px}
.pe-vazio-acoes .primary{min-height:36px;padding:0 16px}
