/* V1632 — PPAP (usa a base .pq do Planejamento da Qualidade). Sem rolagem horizontal. */
.pq-pill-azul { background: var(--tq-azul-50, #eff6ff); color: var(--tq-azul-600, #1766b3); }
.pp-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pp-kpi { background: #fff; border: 1px solid var(--tq-borda, #d5dde8); border-left: 4px solid var(--tq-azul-600, #1766b3); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pp-kpi span { font-size: 11.5px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .02em; }
.pp-kpi strong { font-size: 22px; color: #0f172a; }
.pp-kpi-ok { border-left-color: #16a34a; } .pp-kpi-am { border-left-color: #f59e0b; } .pp-kpi-err { border-left-color: #dc2626; }
.pp-alerta { grid-column: 1 / -1; padding: 8px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12.5px; margin-top: 8px; }
.pp-filtros { margin-bottom: 0; }
.pp-filtros input { min-width: 260px; }
.pp-tab-lista col.c1 { width: 30%; } .pp-tab-lista col.c2 { width: 20%; } .pp-tab-lista col.c3 { width: 16%; } .pp-tab-lista col.c4 { width: 13%; } .pp-tab-lista col.c5 { width: 9%; } .pp-tab-lista col.c6 { width: 12%; }
.pp-nivel { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #16304f; color: #fff; font-size: 11.5px; font-weight: 700; }
.pp-prog { display: flex; align-items: center; gap: 8px; }
.pp-prog-barra { flex: 1; height: 7px; border-radius: 999px; background: #e7edf5; overflow: hidden; min-width: 40px; }
.pp-prog-barra span { display: block; height: 100%; background: linear-gradient(90deg, #1766b3, #16a34a); }
.pp-prog-txt { font-size: 12px; font-weight: 700; color: #334155; white-space: nowrap; }
.pp-atrasado { color: #b42318; font-weight: 700; }
.pp-cab { display: flex; flex-direction: column; gap: 12px; }
.pp-cab-info { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pp-cab-info > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pp-cab-info small { color: #64748b; font-size: 11.5px; overflow-wrap: anywhere; }
.pp-cab-acoes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid #edf1f6; padding-top: 12px; }
.pp-dossie { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-tab-el col.c-n { width: 5%; } .pp-tab-el col.c-el { width: 37%; } .pp-tab-el col.c-ex { width: 11%; } .pp-tab-el col.c-ev { width: 9%; } .pp-tab-el col.c-val { width: 10%; } .pp-tab-el col.c-resp { width: 14%; } .pp-tab-el col.c-sit { width: 14%; }
.pp-tab-el tr.pp-off td { opacity: .6; }
.pp-ex { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.pp-ex-s { background: #16304f; color: #fff; } .pp-ex-r { background: #e7edf5; color: #334155; } .pp-ex-na { background: #f1f5f9; color: #94a3b8; } .pp-ex-x { background: #fff4e5; color: #b45309; }
.pp-val { font-weight: 700; font-size: 12.5px; } .pp-val.ok { color: #15803d; } .pp-val.err { color: #b42318; }
.pp-validacoes { display: flex; flex-direction: column; gap: 4px; }
.pp-v { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; }
.pp-v span { font-weight: 800; }
.pp-v.ok { background: #effaf3; color: #166534; } .pp-v.err { background: #fdecec; color: #8a1c13; } .pp-v.aviso { background: #fff7ed; color: #9a3412; }
.pp-evids { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-evid { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--tq-borda, #d5dde8); border-radius: 8px; }
.pp-evid-tipo { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #1766b3; padding-top: 2px; }
.pp-evid-txt { min-width: 0; overflow-wrap: anywhere; }
.pp-evid-txt small { display: block; color: #64748b; font-size: 11.5px; }
.pp-add { margin-top: 10px; border: 1px dashed var(--tq-borda, #d5dde8); border-radius: 10px; padding: 10px; }
.pp-add-abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pq-drawer button.pq-aba { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--tq-borda, #d5dde8); background: #fff; color: #475569; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.pq-drawer button.pq-aba.is-on { background: var(--tq-azul-600, #1766b3); border-color: var(--tq-azul-600, #1766b3); color: #fff; }
.pp-add-corpo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-add-corpo[hidden] { display: none !important; }
.pp-add-corpo select, .pp-add-corpo textarea { flex: 1 1 320px; min-width: 0; }
.pp-add-corpo small { flex-basis: 100%; }
.pp-csr { display: flex; flex-direction: column; gap: 6px; }
.pp-csr-l { display: grid; grid-template-columns: minmax(0, 1fr) 130px minmax(0, .8fr); gap: 8px; align-items: center; font-size: 12.5px; }
.pp-coment { display: flex; gap: 8px; margin-top: 8px; } .pp-coment input { flex: 1; min-width: 0; }
.pp-psw .pq-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-chks { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.pp-declaracao { font-size: 12.5px; color: #475569; background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.pp-tab-pac col.c1 { width: 13%; } .pp-tab-pac col.c2 { width: 16%; } .pp-tab-pac col.c3 { width: 22%; } .pp-tab-pac col.c4 { width: 37%; } .pp-tab-pac col.c5 { width: 12%; }
.pp-hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #475569; }
.pp-decs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pp-dec { border: 1px solid var(--tq-borda, #d5dde8); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.pp-hist { list-style: none; margin: 0; padding: 0; }
.pp-hist li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.pp-hist li span { color: #64748b; font-size: 12px; }
.pp-hist small { display: block; color: #64748b; font-size: 11.5px; }
.pp-niveis, .pp-decisao-ops { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pp-decisao-ops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pq label.pp-nivel-op, .pq-drawer label.pp-nivel-op { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--tq-borda, #d5dde8); border-radius: 8px; cursor: pointer; font-weight: 400; }
.pp-nivel-op input { width: auto !important; align-self: flex-start; }
.pp-nivel-op strong { font-size: 12.5px; color: #0f172a; }
.pp-nivel-op span { font-size: 11px; color: #64748b; line-height: 1.3; }
.pp-nivel-op:has(input:checked) { border-color: var(--tq-azul-600, #1766b3); background: var(--tq-azul-50, #eff6ff); }
.pp-info { padding: 8px 12px; border-radius: 8px; background: var(--tq-azul-50, #eff6ff); color: #1e3a8a; font-size: 12.5px; }
.pp-tab-matriz col.c-n { width: 5%; } .pp-tab-matriz col.c-el { width: 40%; }
.pp-tab-matriz td.pp-dif { background: #fff7ed !important; }
.pp-tab-matriz select { padding: 3px 4px; height: 30px; }
.pp-csr-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--tq-borda, #d5dde8); border-radius: 10px; margin-top: 8px; }
.pp-csr-card small { display: block; color: #64748b; font-size: 12px; }
@media (max-width: 980px) { .pp-kpis, .pp-cab-info { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pp-niveis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pp-kpis, .pp-cab-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-csr-l, .pp-evid { grid-template-columns: 1fr; } .pp-psw .pq-form-3 { grid-template-columns: 1fr; } }

/* atributo hidden vence o display dos rótulos do formulário */
.pq [hidden], .pq-drawer [hidden] { display: none !important; }

/* V1633 — aprovação por peça, alertas, exigência na produção e PPAPs recebidos */
.pp-modo { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; border: 1px solid var(--tq-borda, #d5dde8); background: #fff; }
.pp-modo-bloqueio { border-color: #f5b5b5; background: #fdecec; color: #8a1c13; }
.pp-modo-alerta { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.pp-modo-desligado { color: #475569; }
.pp-alertas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-al { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--tq-borda, #d5dde8); border-left-width: 4px; font-size: 13px; }
.pp-al-alta { border-left-color: #dc2626; } .pp-al-media { border-left-color: #f59e0b; } .pp-al-info { border-left-color: #1766b3; }
.pp-al-tipo { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #475569; }
.pp-al-txt { min-width: 0; overflow-wrap: anywhere; }
.pp-tab-aprov col.c1 { width: 28%; } .pp-tab-aprov col.c2 { width: 24%; } .pp-tab-aprov col.c3 { width: 18%; } .pp-tab-aprov col.c4 { width: 16%; } .pp-tab-aprov col.c5 { width: 14%; }
.pp-tab-rec col.c1 { width: 30%; } .pp-tab-rec col.c2 { width: 22%; } .pp-tab-rec col.c3 { width: 16%; } .pp-tab-rec col.c4 { width: 18%; } .pp-tab-rec col.c5 { width: 14%; }
.pp-clis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 4px; }
.pp-pareceres { display: flex; flex-direction: column; gap: 4px; }
.pp-par { display: grid; grid-template-columns: minmax(0, 1.4fr) 180px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid #edf1f6; }
.pp-par input, .pp-par select { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .pp-al, .pp-par { grid-template-columns: 1fr; } }

/* ===================================================== V1634 · canal + CQI */
.pp-canal-info { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--pq-azul-50, #eff6ff); color: var(--pq-azul, #1766b3); font-size: 12.5px; }
.pp-canal-rec { margin-top: 12px; padding: 12px; border: 1px solid var(--pq-borda, #d5dde8); border-radius: 12px; background: var(--pq-fundo, #f6f8fb); }
.pp-psw-res { font-size: 12.5px; color: var(--pq-texto2, #475569); }
.pp-ok { color: #15803d; font-weight: 600; }
.pp-canais { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 12px; }
.pp-canal { border: 1px solid var(--pq-borda, #d5dde8); border-radius: 12px; padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pp-canal header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pp-canal header strong { display: block; font-size: 14px; color: var(--pq-texto, #0f172a); overflow-wrap: anywhere; }
.pp-canal header small { display: block; font-size: 12px; color: var(--pq-muted, #64748b); margin-top: 2px; }
.pp-canal p { margin: 0; }
.pp-canal-vinc { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--pq-texto2, #475569); }
.pp-canal-vinc select { width: 100%; }
.pp-tab-sol { table-layout: fixed; width: 100%; margin-top: 6px; }
.pp-tab-sol .c1 { width: 30%; } .pp-tab-sol .c2 { width: 22%; } .pp-tab-sol .c3 { width: 18%; } .pp-tab-sol .c4 { width: 12%; } .pp-tab-sol .c5 { width: 18%; }
.pp-tab-cqi { table-layout: fixed; width: 100%; margin-top: 12px; }
.pp-tab-cqi .c1 { width: 24%; } .pp-tab-cqi .c2 { width: 24%; } .pp-tab-cqi .c3 { width: 22%; } .pp-tab-cqi .c4 { width: 14%; } .pp-tab-cqi .c5 { width: 16%; }
.pp-tab-plano { table-layout: fixed; width: 100%; margin-top: 12px; }
.pp-tab-plano .c1 { width: 9%; } .pp-tab-plano .c2 { width: 37%; } .pp-tab-plano .c3 { width: 18%; } .pp-tab-plano .c4 { width: 14%; } .pp-tab-plano .c5 { width: 15%; } .pp-tab-plano .c6 { width: 7%; }
.pp-tab-plano input, .pp-tab-plano select { width: 100%; min-width: 0; }
.cqi-itens { display: flex; flex-direction: column; }
.cqi-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) 170px minmax(0, 0.8fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--pq-borda, #e3e8ef); }
.cqi-item:last-child { border-bottom: 0; }
.cqi-txt { font-size: 13px; color: var(--pq-texto, #0f172a); line-height: 1.4; }
.cqi-item select, .cqi-item input { width: 100%; min-width: 0; }
@media (max-width: 900px) { .cqi-item { grid-template-columns: 40px minmax(0, 1fr); } .cqi-item select, .cqi-item input { grid-column: 2; } }
.pp-canal-rec small { display: block; margin-top: 4px; font-size: 12px; color: var(--pq-texto2, #475569); }
.pp-cab-info .pq-pill { justify-self: start; width: fit-content; }

/* ===================================================== V1635 · estudos, correção, avisos */
.pp-canal-resp { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--pq-texto2, #475569); }
.pp-tab-est { table-layout: fixed; width: 100%; margin-top: 12px; }
.pp-tab-est .c1 { width: 26%; } .pp-tab-est .c2 { width: 26%; } .pp-tab-est .c3 { width: 18%; } .pp-tab-est .c4 { width: 18%; } .pp-tab-est .c5 { width: 12%; }
.est-tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.est-tipos .pp-nivel-op span { font-size: 11.5px; }
.est .pp-cab-info { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.est .pp-cab-info strong { overflow-wrap: anywhere; }
.est-cfg { grid-template-columns: minmax(0, 2fr) minmax(0, 0.7fr) minmax(0, 0.7fr) auto; align-items: end; }
.est-cfg-b { display: flex; gap: 8px; }
.est-grade { max-width: 100%; overflow-x: auto; margin-top: 12px; border: 1px solid var(--pq-borda, #d5dde8); border-radius: 10px; }
.est-grade .pq-tab { margin: 0; width: auto; min-width: 0; table-layout: auto; }
.est-grade .pq-tab th, .est-grade .pq-tab td { padding: 4px 6px; text-align: center; white-space: nowrap; }
.est-grade .pq-tab td:first-child, .est-grade .pq-tab th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.est-tab-dim td:first-child { text-align: left; white-space: normal; min-width: 180px; }
.est-tab-dim td:nth-child(2) { white-space: normal; min-width: 120px; text-align: left; }
.est .est-cel, .pq .est-grade input.est-cel { width: 72px !important; min-width: 72px; text-align: right; padding: 4px 6px; height: 30px; }
.pq .est-grade select.est-cel, .pq .est-tab-att select { width: 70px !important; min-width: 70px; height: 30px; padding: 2px 4px; }
.est-imp { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--pq-borda, #d5dde8); border-radius: 10px; background: var(--pq-fundo, #f6f8fb); }
.est-imp strong { width: 100%; font-size: 12.5px; color: var(--pq-texto, #0f172a); }
.est-imp label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--pq-texto2, #475569); }
.est-tab-res { table-layout: fixed; width: 100%; }
.est-tab-res .c1 { width: 28%; } .est-tab-res .c2 { width: 26%; } .est-tab-res .c3 { width: 16%; } .est-tab-res .c4 { width: 24%; } .est-tab-res .c5 { width: 6%; }
.est-tab-res input, .est-tab-res select { width: 100%; min-width: 0; }
.est-mat-lista { display: flex; flex-direction: column; gap: 10px; }
.est-mat { border: 1px solid var(--pq-borda, #d5dde8); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.est-mat-a, .est-mat-b { display: grid; gap: 8px; align-items: end; }
.est-mat-a { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, .7fr) 80px; }
.est-mat-b { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .9fr) auto auto; }
.est-mat label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--pq-texto2, #475569); min-width: 0; }
.est-mat label.pq-check { flex-direction: row; align-items: center; }
.est-mat input, .est-mat select { width: 100%; min-width: 0; }
.est-mat-conf { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.est-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }
.est-duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.est-graf { margin: 0; border: 1px solid var(--pq-borda, #d5dde8); border-radius: 10px; padding: 8px 10px; background: #fff; }
.est-graf figcaption { font-size: 12px; font-weight: 600; color: var(--pq-texto2, #475569); margin-bottom: 4px; }
.est-graf svg { width: 100%; height: auto; display: block; font-family: inherit; }
.est-barras { display: flex; flex-direction: column; gap: 8px; }
.est-barra { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: 12.5px; }
.est-barra > div { height: 12px; border-radius: 6px; background: var(--pq-fundo, #eef2f7); overflow: hidden; }
.est-barra i { display: block; height: 100%; border-radius: 6px; }
.est-barra strong { text-align: right; }
.est-tab-comp { width: 100%; }
.est-crit summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--pq-texto, #0f172a); }
@media (max-width: 900px) {
  .est .pp-cab-info, .est-duas, .est-tipos { grid-template-columns: minmax(0, 1fr) !important; }
  .est-cfg, .est-mat-a, .est-mat-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
