/* PCP › Materiais — Estrutura de materiais (09/11/2026, desenho da conversa Design: RR Escritório, claro e escuro).
   Tudo escopado em #page-pcp .est: a página usa as variáveis do pcp.css (--pc-*) e só acrescenta as semânticas abaixo
   (as mesmas da especificação: ok/warn/danger/info/neutro), redefinidas no escuro. Nenhuma cor de marca nova. */
#page-pcp .est {
  --est-ok: #15803d; --est-ok-bg: #dcfce7;
  --est-warn: #b45309; --est-warn-bg: #fef3c7;
  --est-danger: #b91c1c; --est-danger-bg: #fee2e2;
  --est-info: #1341a8; --est-info-bg: #dbeafe;
  --est-neu: #4b5563; --est-neu-bg: #f3f4f6;
  --est-bar: #15293a;
}
[data-theme="dark"] #page-pcp .est {
  --est-ok: #63c58c; --est-ok-bg: #14532d;
  --est-warn: #e9ac5c; --est-warn-bg: #78350f;
  --est-danger: #f58a80; --est-danger-bg: #7f1d1d;
  --est-info: #8ab4f8; --est-info-bg: #1e3a5f;
  --est-neu: #d1d5db; --est-neu-bg: #374151;
  --est-bar: #f3934f;
}
#page-pcp .est { font-variant-numeric: tabular-nums; --tbl-fundo: var(--pc-surface); --tbl-fundo-cab: var(--pc-surface-2); }
#page-pcp .est .card { margin-bottom: 14px; }
#page-pcp .est .est-semborda { padding: 0; overflow: hidden; }
#page-pcp .est .est-rolar { overflow-x: auto; }
#page-pcp .est .est-bloco { margin-bottom: 14px; }

/* barra de cima: título, busca, controle segmentado, ação primária à direita */
#page-pcp .est .est-tb { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }
#page-pcp .est .est-tb0 { margin-bottom: 0; }
#page-pcp .est .est-ti { font-size: 1.4rem; font-weight: 700; margin: 0 8px 0 0; letter-spacing: -0.02em; }
#page-pcp .est .est-ct { font-size: 1rem; font-weight: 600; margin: 0 8px 0 0; }
#page-pcp .est .est-dir { margin-left: auto; }
#page-pcp .est .est-busca { min-width: 280px; }
#page-pcp .est .est-mu { color: var(--pc-muted); }
#page-pcp .est .est-mini { font-size: 0.76rem; color: var(--pc-muted); }
#page-pcp .est .est-nota { font-size: 0.78rem; margin-top: 10px; max-width: 90ch; }
#page-pcp .est .est-centro { text-align: center; padding: 18px; }
#page-pcp .est .est-nowrap { white-space: nowrap; }
#page-pcp .est .r { text-align: right; }
#page-pcp .est .est-neg { color: var(--est-danger); }
#page-pcp .est .est-pos { color: var(--est-ok); }
#page-pcp .est .est-erro { color: var(--est-danger); font-weight: 700; }
#page-pcp .est .est-warn { color: var(--est-warn); }

/* controle segmentado */
#page-pcp .est .est-seg { display: inline-flex; gap: 2px; background: var(--pc-fill); border-radius: 10px; padding: 3px; }
#page-pcp .est .est-seg button { font: inherit; font-size: 0.82rem; font-weight: 500; color: var(--pc-ink-2); background: none; border: 0; border-radius: 8px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
#page-pcp .est .est-seg button.on { background: var(--pc-surface); color: var(--pc-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); font-weight: 600; }
#page-pcp .est .est-seg button:focus-visible { outline: 2px solid var(--pc-tint); outline-offset: 1px; }

/* pílula: texto + cor (nunca só cor) */
#page-pcp .est .est-pl { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
#page-pcp .est .est-pl.ok { background: var(--est-ok-bg); color: var(--est-ok); }
#page-pcp .est .est-pl.warn { background: var(--est-warn-bg); color: var(--est-warn); }
#page-pcp .est .est-pl.danger { background: var(--est-danger-bg); color: var(--est-danger); }
#page-pcp .est .est-pl.info { background: var(--est-info-bg); color: var(--est-info); }
#page-pcp .est .est-pl.neu { background: var(--est-neu-bg); color: var(--est-neu); }
#page-pcp .est .est-al { display: inline-flex; gap: 4px; flex-wrap: wrap; }
#page-pcp .est .est-tg { font-size: 0.7rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
/* ESPEC-12 2.2: PRODUZIDO azul (tem estrutura própria), COMPRADO cinza. */
#page-pcp .est .est-tg.al { background: var(--est-neu-bg); color: var(--est-neu); }
#page-pcp .est .est-tg.pr { background: var(--est-info-bg); color: var(--est-info); }
#page-pcp .est .est-tg.sv { background: var(--est-neu-bg); color: var(--est-neu); }
#page-pcp .est .est-sug { font-size: 0.68rem; font-weight: 700; color: var(--est-warn); background: var(--est-warn-bg); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
#page-pcp .est .est-sujo { font-size: 0.8rem; color: var(--est-warn); font-weight: 600; }
#page-pcp .est .est-salva { font-size: 0.8rem; }

/* tabelas */
#page-pcp .est table.est-tab { width: 100%; font-size: 0.84rem; }
#page-pcp .est table.est-tab td { vertical-align: middle; }
#page-pcp .est .est-cmp { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#page-pcp .est .est-cmp b { font-weight: 600; }
#page-pcp .est .est-cmp > span { font-size: 0.76rem; color: var(--pc-muted); }
#page-pcp .est tr.est-hv { cursor: pointer; }
#page-pcp .est tr.est-hv:focus-visible { outline: 2px solid var(--pc-tint); outline-offset: -2px; }
#page-pcp .est tr.est-dim td { opacity: 0.42; }
#page-pcp .est tr.est-dim td:first-child, #page-pcp .est tr.est-dim td:last-child { opacity: 1; }
#page-pcp .est tr.est-tr-erro td { background: var(--est-danger-bg); }
#page-pcp .est tr.est-tr-sl td { background: var(--pc-surface-2); }
#page-pcp .est tr.est-n2 td { background: var(--pc-surface-2); }
/* A linha aberta é UMA célula na largura toda (acabamento do mutirão, 12/11/2026): o recuo da coluna da seta (42 px) vira
   padding — no PC fica igual. No celular o recuo sai (bloco ≤640) e o "Quem segura" preso alcança até o fim da tabela que rola. */
#page-pcp .est tr.est-n2 > td.est-n2-c { padding-left: 52px; }
#page-pcp .est .est-nao { font-size: 0.72rem; color: var(--pc-muted); margin-top: 2px; }
#page-pcp .est .est-lk { background: none; border: 0; color: var(--pc-tint); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-align: left; }
#page-pcp .est .est-lk.d { color: var(--est-danger); }
#page-pcp .est .est-lk:focus-visible { outline: 2px solid var(--pc-tint); outline-offset: 2px; border-radius: 4px; }
#page-pcp .est .est-chev { background: none; border: 0; cursor: pointer; color: var(--pc-muted); font-size: 14px; width: 22px; height: 22px; border-radius: 6px; transition: transform 0.12s; }
#page-pcp .est .est-chev:hover { background: var(--pc-fill); }
#page-pcp .est .est-chev.o { transform: rotate(90deg); }
#page-pcp .est .est-chips { display: flex; flex-wrap: wrap; gap: 4px; }
#page-pcp .est .est-chp { font: inherit; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--pc-fill); color: var(--pc-ink-2); white-space: nowrap; border: 0; }
#page-pcp .est .est-chp.on { background: var(--est-info-bg); color: var(--est-info); }
#page-pcp .est button.est-chp { cursor: pointer; padding: 3px 10px; }
#page-pcp .est .est-tot { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: flex-end; margin-top: 12px; }
#page-pcp .est .est-tot b { font-size: 1.25rem; }

/* cabeçalho do item (ESPEC-12 2.1): duas colunas no PC (ações à direita); no celular empilha */
#page-pcp .est .est-fg { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--pc-ink-2); }
#page-pcp .est .est-fg-row { flex-direction: row; align-items: center; gap: 6px; }
/* O pcp.css limita todo .pcp-inp a 150 px (bom nas tabelas da Carteira); aqui os campos largos precisam da linha inteira. */
#page-pcp .est input.est-busca, #page-pcp .est input[data-busca] { max-width: none; }
#page-pcp .est input[data-busca] { width: 100%; }
#page-pcp .est input.est-larga { width: 100%; max-width: 520px; margin-bottom: 10px; }
#page-pcp .est .est-ti-s { font-size: 1.05rem; color: var(--pc-ink-2); font-weight: 600; letter-spacing: 0; }
#page-pcp .est .est-cab-g { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: start; }
#page-pcp .est .est-cab-e { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#page-pcp .est .est-cab-t { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
#page-pcp .est .est-cab-c { font-size: 0.82rem; }
#page-pcp .est .est-cab-p { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#page-pcp .est .est-med { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
#page-pcp .est .est-med-l { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#page-pcp .est .est-med-x { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#page-pcp .est input.est-medida { width: 120px; }
#page-pcp .est .est-falta-t { margin: 0; font-weight: 600; }
#page-pcp .est button.est-pl-b { border: 0; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
#page-pcp .est button.est-pl-b:focus-visible { outline: 2px solid var(--pc-tint); outline-offset: 2px; }
#page-pcp .est .est-reserva { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 2px; }
#page-pcp .est .est-cab-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: 640px; }
#page-pcp .est .est-selo { flex-basis: 100%; text-align: right; min-height: 1em; }
#page-pcp .est .est-selo:empty { display: none; }
#page-pcp .est .est-apoio { font-size: 12.5px; color: var(--pc-muted); margin: 10px 0 0; max-width: 90ch; }
#page-pcp .est .est-n { width: 96px; text-align: right; }
#page-pcp .est .est-un { width: 80px; }
#page-pcp .est .est-falta { border-color: var(--est-warn) !important; }
#page-pcp .est .est-alerta { border-radius: 10px; padding: 8px 12px; font-size: 0.84rem; margin-bottom: 10px; border-left: 5px solid var(--est-danger); background: var(--est-danger-bg); color: var(--pc-ink); }
/* aviso azul (informação) e a faixa do resultado do "Trocar em vários" (verde) */
#page-pcp .est .est-aviso { border-radius: 10px; padding: 8px 12px; font-size: 0.84rem; margin: 0 0 12px; border-left: 5px solid var(--est-info); background: var(--est-info-bg); color: var(--pc-ink); }
#page-pcp .est .est-aviso.ok { border-left-color: var(--est-ok); background: var(--est-ok-bg); font-weight: 600; }
#page-pcp .est .est-aviso-f { margin-top: 4px; font-weight: 500; color: var(--est-warn); }
[data-theme="dark"] #page-pcp .est .est-aviso-f { color: var(--pc-ink); }
#page-pcp .est .est-rodape { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: -4px; }
#page-pcp .est .est-perigo { color: var(--est-danger); margin-left: auto; }
#page-pcp .est .est-tot2 { text-align: right; font-size: 0.8rem; margin-top: 4px; }
/* lista de itens */
#page-pcp .est .est-seg-n { font-weight: 700; color: var(--pc-muted); margin-left: 2px; }
#page-pcp .est .est-seg-n:empty { display: none; }
#page-pcp .est .est-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
#page-pcp .est .est-mais { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; margin: -4px 0 14px; font-size: 0.84rem; }
#page-pcp .est td.tc-acoes { white-space: nowrap; }
#page-pcp .est td.tc-acoes .est-lk + .est-lk { margin-left: 12px; }
#page-pcp .est .est-lk-a { font-size: 0.78rem; margin-top: 2px; align-self: flex-start; }
#page-pcp .est .est-vazio-p .est-lk { display: inline; }
/* copiar de outro item */
#page-pcp .est table.est-cp tr.sel td { background: var(--est-info-bg); }
#page-pcp .est .est-cp-ok { color: var(--est-info); }
#page-pcp .est .est-cp-rola { max-height: 340px; overflow: auto; }
#page-pcp .est .est-volta-nome { max-width: 320px; min-width: 0; }
#page-pcp .est .est-volta-nome > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#page-pcp .est .card > .est-ct { margin-bottom: 10px; }
#page-pcp .est .card .est-aviso { margin: 12px 0 0; }
#page-pcp .est .est-pe-bt { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
/* trocar em vários */
#page-pcp .est .est-tr-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
#page-pcp .est .est-tr-de { margin-bottom: 6px; }
#page-pcp .est .est-tr-de > span { font-size: 0.8rem; }
#page-pcp .est .est-tr-por { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#page-pcp .est .est-tr-por .est-apoio { margin: 0; }
#page-pcp .est .est-tr-bt { display: inline-flex; gap: 8px; margin-left: auto; }
#page-pcp .est th.est-tr-c, #page-pcp .est td.est-tr-c { width: 44px; text-align: center; }
#page-pcp .est td.est-tr-c input[type="checkbox"] { width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--pc-tint); }
#page-pcp .est tr.est-tr-bloq td.est-tr-c input { cursor: not-allowed; }
#page-pcp .est tr.est-dim td:last-child { opacity: 1; }
#page-pcp .est .est-tr-pe { position: sticky; bottom: 8px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 12px 16px; box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.12); }
#page-pcp .est .est-tr-pe .est-pe-bt { margin-top: 0; }
#page-pcp .est .est-tr-conta { font-size: 0.95rem; }

/* edição da linha (.est-inl): abre sob a linha */
#page-pcp .est .est-inl { background: var(--pc-surface-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
#page-pcp .est .est-inl .est-l, #page-pcp .est .est-l { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
#page-pcp .est .est-radios { display: flex; flex-wrap: wrap; gap: 6px; }
#page-pcp .est .est-radios label { display: flex; gap: 6px; align-items: center; border: 1px solid var(--pc-sep); border-radius: 9px; padding: 6px 10px; font-size: 0.84rem; cursor: pointer; background: var(--pc-surface); font-weight: 500; }
#page-pcp .est .est-radios label.on { border-color: var(--pc-tint); box-shadow: 0 0 0 3px var(--pc-focus); }
#page-pcp .est .est-btl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#page-pcp .est .est-res { border: 1px solid var(--pc-sep); border-radius: 10px; max-height: 220px; overflow: auto; background: var(--pc-surface); margin-top: 4px; }
#page-pcp .est .est-res button { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; width: 100%; text-align: left; font: inherit; font-size: 0.82rem; padding: 7px 10px; background: none; border: 0; cursor: pointer; color: inherit; }
#page-pcp .est .est-res button:hover, #page-pcp .est .est-res button:focus-visible { background: var(--pc-hover); outline: none; }
#page-pcp .est .est-res .est-c { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.76rem; color: var(--pc-muted); }
#page-pcp .est .est-res .est-o { font-size: 0.72rem; color: var(--pc-muted); white-space: nowrap; }
#page-pcp .est .est-res-vazio { padding: 8px 10px; }
#page-pcp .est .est-slcard { padding: 12px 18px; }

/* explosão (.est-arv) */
#page-pcp .est .est-fx { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 0.86rem; }
#page-pcp .est .est-xb { min-width: 320px; flex: 1; max-width: 520px; }
#page-pcp .est table.est-arv td.est-nv { padding-left: calc(10px + var(--nv, 0) * 22px); }
#page-pcp .est table.est-arv tr.est-raiz td { background: var(--pc-surface-2); font-weight: 600; }
#page-pcp .est .est-avisos { padding: 8px 14px 12px; font-size: 0.8rem; color: var(--est-warn); }
#page-pcp .est .est-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
#page-pcp .est .est-kpi { background: var(--pc-surface-2); border-radius: 12px; padding: 10px 12px; }
#page-pcp .est .est-kpi small { display: block; color: var(--pc-muted); font-size: 0.74rem; }
#page-pcp .est .est-kpi b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
#page-pcp .est .est-kpi.warn b { color: var(--est-warn); }
#page-pcp .est .est-kpi.danger b { color: var(--est-danger); }
#page-pcp .est .est-kpi.ok b { color: var(--est-ok); }
#page-pcp .est .est-c3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
#page-pcp .est .est-c3 .card { box-shadow: none; background: var(--pc-surface-2); margin: 0; }
#page-pcp .est .est-c3 h5 { margin: 0 0 6px; font-size: 0.88rem; display: flex; justify-content: space-between; align-items: center; }
#page-pcp .est .est-c3 ul { list-style: none; margin: 0; padding: 0; font-size: 0.84rem; display: flex; flex-direction: column; gap: 4px; }
#page-pcp .est .est-c3 li { display: flex; justify-content: space-between; gap: 8px; }

/* comprometido: quadro das regras e "quem segura" */
#page-pcp .est .est-regras { background: var(--pc-surface-2); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.82rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
#page-pcp .est .est-regras-t { grid-column: 1 / -1; font-weight: 700; font-size: 0.84rem; }
#page-pcp .est .est-regras-l { grid-column: 1 / -1; }
#page-pcp .est .est-sub { margin: 4px 0 0; padding: 8px 10px; background: var(--pc-surface); border-radius: 10px; font-size: 0.8rem; }
#page-pcp .est .est-sub > div { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--pc-hairline); }
#page-pcp .est .est-sub > div:last-child { border-bottom: 0; }
/* quem segura: resumo, área de 320 px com rolagem própria, cabeçalho fixo, grupo por produto (Design, 09/11) */
#page-pcp .est .est-quem { padding: 0; overflow: hidden; }
/* (a regra geral .est-sub > div é flex: aqui as duas filhas são blocos, e as linhas da caixa é que são grid) */
#page-pcp .est .est-sub.est-quem > .est-quem-res { display: block; padding: 8px 12px; border-bottom: 1px solid var(--pc-hairline); }
#page-pcp .est .est-sub.est-quem > .est-quem-box { display: block; max-height: 320px; overflow: auto; padding: 0; border-bottom: 0; }
#page-pcp .est .est-quem-box > div, #page-pcp .est .est-quem-cab {
  display: grid; grid-template-columns: 96px minmax(0, 2.2fr) minmax(0, 1.6fr) 80px 64px 116px minmax(0, 1fr); gap: 2px 12px;
  align-items: center; padding: 5px 12px; border-bottom: 1px solid var(--pc-hairline); }
#page-pcp .est .est-quem-cab { position: sticky; top: 0; z-index: 1; background: var(--pc-surface-2); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--pc-muted); }
#page-pcp .est .est-quem .r { text-align: right; }
#page-pcp .est .est-quem-box > div.est-q6, #page-pcp .est .est-quem-cab.est-q6 { grid-template-columns: 96px minmax(0, 1.8fr) 80px 64px 116px minmax(0, 1.2fr); }
#page-pcp .est .est-grupo { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 0.82rem; color: inherit;
  background: var(--pc-surface-2); border: 0; border-bottom: 1px solid var(--pc-hairline); padding: 7px 12px; cursor: pointer; }
#page-pcp .est .est-grupo:focus-visible { outline: 2px solid var(--pc-tint); outline-offset: -2px; }
#page-pcp .est .est-grupo .est-chev { width: auto; height: auto; }
#page-pcp .est .est-raiz-x { font-weight: 500; }
#page-pcp .est tr.est-editando td { opacity: 0.42; }
/* base do Será Levado: hierarquia (produto 600, base 400, código mono cinza), ações discretas, cabeçalho fixo */
#page-pcp .est .est-caixa { max-height: calc(100vh - 300px); min-height: 240px; overflow: auto; }
#page-pcp .est .est-caixa thead th { position: sticky; top: 0; z-index: 1; background: var(--pc-surface-2); }
#page-pcp .est .est-cmp > .est-sl-p { color: var(--pc-ink); font-weight: 600; font-size: 0.84rem; }
#page-pcp .est .est-cmp > .est-sl-b { color: var(--pc-ink); font-weight: 400; font-size: 0.84rem; }
#page-pcp .est .est-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.74rem; color: var(--pc-muted); }
#page-pcp .est .est-sl-acoes { display: inline-flex; gap: 12px; }
#page-pcp .est .est-sl-acoes .est-lk:hover, #page-pcp .est .est-sl-acoes .est-lk:focus-visible { text-decoration: underline; }
#page-pcp .est .est-lk.est-discreto { color: var(--pc-ink-2); font-weight: 500; }
#page-pcp .est table.est-sl tbody tr:hover td { background: var(--pc-hover); }
#page-pcp .est .est-brk { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; }
#page-pcp .est .est-bar { grid-column: 1 / 4; height: 9px; border-radius: 5px; background: var(--pc-fill-2); overflow: hidden; }
#page-pcp .est .est-bar i { display: block; height: 100%; background: var(--est-bar); border-radius: 5px; }

/* vazio / carregando */
#page-pcp .est .est-vazio { text-align: center; padding: 36px 16px; color: var(--pc-muted); }
#page-pcp .est .est-vazio-p { padding: 18px 12px; }
#page-pcp .est .est-ic { font-size: 2.4rem; }

/* janela de 3 saídas (nasce no <body>, fora do #page-pcp): Voltar + secundária + principal */
.rr-perg-botoes.est-3 { flex-wrap: wrap; }
.rr-perg-botoes.est-3 .est-3-sec { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }

/* ≤ 900 px: cabeçalho do editor em uma coluna; ≤ 640 px: barras empilham, campos de 42 px, a página não rola de lado */
@media (max-width: 900px) {
  #page-pcp .est .est-cab-g { grid-template-columns: 1fr; }
  #page-pcp .est .est-cab-a { justify-content: flex-start; max-width: none; }
  #page-pcp .est .est-selo { text-align: left; }
  #page-pcp .est .est-tr-g { grid-template-columns: minmax(0, 1fr); }
  #page-pcp .est .est-tr-g > * { min-width: 0; }
  #page-pcp .est .est-c3 { grid-template-columns: 1fr; }
  #page-pcp .est .est-regras { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #page-pcp .est .est-tb { align-items: stretch; }
  #page-pcp .est .est-busca, #page-pcp .est .est-xb { min-width: 0; width: 100%; flex: 1 1 100%; }
  #page-pcp .est .est-dir { margin-left: 0; }
  #page-pcp .est .est-acao { margin-left: 0; width: 100%; }
  #page-pcp .est .pcp-inp, #page-pcp .est .btn { min-height: 44px; }
  #page-pcp .est .est-seg { max-width: 100%; overflow-x: auto; }
  #page-pcp .est .est-ti { font-size: 1.15rem; }
  /* tabela larga (Explosão, Comprometido, Custo, Será Levado) rola de lado DENTRO do cartão (a página não). As de ação
     (itens, componentes, copiar, trocar) são .tbl-cartoes: viram cartão (mobile.css 2.2), sem largura mínima. */
  #page-pcp .est table.est-tab:not(.tbl-cartoes) { min-width: 720px; }
  #page-pcp .est .est-ti-s { font-size: 1rem; }
  #page-pcp .est .est-volta-nome { max-width: 60vw; }
  #page-pcp .est .est-tr-bt { margin-left: 0; width: 100%; }
  #page-pcp .est .est-tr-bt .btn { flex: 1 1 0; }
  #page-pcp .est .est-mais .btn { width: 100%; }
  /* (o cartão de 2 colunas do "Quem segura" saiu daqui: vale de 0 a 1000 px e no celular deitado — bloco no fim, Design 12/11) */
  /* A linha aberta (.est-n2) fica dentro da tabela de 720 px que rola: sem o recuo da seta, e o "Quem segura" fica preso à
     parte visível — senão a coluna da direita do cartão saía da tela (Design, 12/11/2026). A célula ocupa todas as colunas:
     com a 1ª célula vazia escondida a 8ª coluna ficava vazia e o preso parava 56 px antes do fim (acabamento, 12/11). */
  #page-pcp .est tr.est-n2 > td.est-n2-c { padding-left: 10px; }
  #page-pcp .est .est-n2 .est-quem { position: sticky; left: 0; max-width: calc(100vw - 48px); }
  /* Cartões (ESPEC-12 §5): a tabela some dentro do cartão branco; cada linha é o seu cartão. */
  #page-pcp .est .est-semborda:has(> .tbl-rola > table.tbl-cartoes) { background: none; box-shadow: none; border: 0; overflow: visible; }
  #page-pcp .est .est-bloco .tbl-rola:has(> table.tbl-cartoes) { overflow: visible; }
  #page-pcp .est table.tbl-cartoes > tbody > tr > td.tc-titulo .est-cmp > span { font-weight: 400; }
  #page-pcp #pcp-content .est table.tbl-cartoes > tbody > tr.est-tr-sl { background: var(--pc-fill-2); }
  #page-pcp #pcp-content .est table.tbl-cartoes > tbody > tr.est-tr-erro { background: var(--est-danger-bg); }
  #page-pcp #pcp-content .est table.est-cp.tbl-cartoes > tbody > tr.sel { border-color: var(--est-info); box-shadow: 0 0 0 1px var(--est-info); }
  #page-pcp .est table.tbl-cartoes > tbody > tr > td.tc-acoes .est-lk + .est-lk { margin-left: 0; }
  #page-pcp .est table.tbl-cartoes > tbody > tr > td.tc-acoes .est-lk { border: 1px solid var(--pc-sep); border-radius: 10px; padding: 0 10px; }
  #page-pcp .est table.tbl-cartoes > tbody > tr > td.tc-acoes .est-lk::before { display: none; }
  /* Trocar em vários: a caixa de 44 px no canto, nome do item em cima, "Hoje" e "Depois" em linhas com rótulo */
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr { position: relative; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr > td.est-tr-c { position: absolute; top: 2px; right: 2px; width: auto; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr > td.est-tr-c .tc-marca > span { display: none; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr > td.tc-titulo { padding-right: 44px; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr > td:not(.tc-titulo):not(.est-tr-c) { grid-column: 1 / -1; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr.est-dim > td { opacity: 1; }
  #page-pcp #pcp-content .est table.est-tr.tbl-cartoes > tbody > tr.est-dim { opacity: 0.7; }
  /* rodapé fixo no pé da tela, botão primário de 48 px; os 3 botões do "Copiar" empilham, o primário em cima */
  #page-pcp .est .est-tr-pe { bottom: 0; margin: 0 -4px; border-radius: 14px 14px 0 0; }
  #page-pcp .est .est-pe-bt { flex-direction: column-reverse; width: 100%; }
  #page-pcp .est .est-pe-bt .btn { width: 100%; min-height: 44px; }
  #page-pcp .est .est-pe-bt .btn-primary { min-height: 48px; }
  #page-pcp .est .est-so-pc { display: none; }
  #page-pcp .est .est-cab-a .btn { flex: 1 1 auto; }
  /* o segmento de 4 filtros vira 2 × 2 (no celular "Com alerta" ficava escondido à direita) */
  #page-pcp .est .est-seg.est-seg-4 { display: grid; grid-template-columns: 1fr 1fr; width: 100%; overflow: visible; }
  #page-pcp .est .est-tb > .est-ti-s { align-self: center; }
  /* nos cartões: texto à esquerda (o .r da tabela vence o text-align do mobile.css) e pílula que quebra linha */
  #page-pcp .est table.tbl-cartoes > tbody > tr > td.r { text-align: left; }
  #page-pcp .est table.tbl-cartoes .est-pl { white-space: normal; }
  /* "De qual item?": a lista rola dentro do cartão (sem isso invadia o cartão de baixo) */
  #page-pcp .est .est-bloco .tbl-rola.est-cp-rola:has(> table.tbl-cartoes) { overflow: auto; max-height: 380px; }
  #page-pcp .est table.est-cp tr.sel td { background: none; }
}
/* Toque (ESPEC-1 4.4): os links soltos ("Abrir estrutura ›", "Trocar o componente", "Escolher outro") com 44 px de área. */
@media (max-width: 1024px), (pointer: coarse) {
  #page-pcp .est button.est-pl-b { position: relative; }
  #page-pcp .est button.est-pl-b::before { content: ''; position: absolute; inset: -13px -2px; }
}
/* Tablet (641–1024): as tabelas rolam dentro do cartão com a ação presa à direita (mobile.css 2.2); as colunas de texto não
   se espremem. */
@media (min-width: 641px) and (max-width: 1024px), (min-width: 641px) and (pointer: coarse) {
  #page-pcp .est table.est-comp > :is(thead, tbody) > tr > :first-child { min-width: 220px; }
  #page-pcp .est table.est-comp > :is(thead, tbody) > tr > :nth-child(2) { min-width: 190px; }
  #page-pcp .est table.est-itens > :is(thead, tbody) > tr > :first-child { min-width: 200px; }   /* 240 fazia a ação presa cobrir o Custo (Design 12/11) */
  #page-pcp .est table.est-tr > :is(thead, tbody) > tr > :nth-child(2) { min-width: 240px; }
  #page-pcp .est .est-busca { flex: 1 1 260px; }   /* "Buscar item por código ou descrição…" cabe no 800 */
  #page-pcp .est td.est-tr-c .tc-marca { margin: -6px auto; }
}
@media (prefers-reduced-motion: reduce) { #page-pcp .est .est-chev { transition: none; } }

/* Comprometido: o que já saiu da reserva da OP (requisição com OP, 09/11/2026) — verde o que saiu, âmbar apagado o que falta. */
.est .est-saiu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 3px; color: var(--text, inherit); }
.est .est-barra { display: inline-block; width: 90px; height: 7px; border-radius: 4px; background: rgba(217, 119, 6, .35); overflow: hidden; vertical-align: middle; }
.est .est-barra > i { display: block; height: 100%; background: #0e9f6e; }

/* Comprometido (Design, 09/11 — ajuste 1): a coluna da saída com 280 px no mínimo e numa linha só; a conta da reserva desce
   para baixo do produto. */
.est .est-conta { display: block; margin-top: 1px; }
.est .est-saiu { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; }
.est .est-saiu-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.est .est-calc { min-width: 0; }
/* As grades de 6–7 colunas só no largo (mutirão celular/tablet, ESPEC-1 §5.2, 12/11/2026): vindas depois do bloco
   de 640, elas anulavam o cartão de 2 colunas (1fr 1fr, sem cabeçalho) que a Design desenhou para o celular em 09/11. */
/* 12/11/2026 (Design, conferência da Etapa 5): entre 641 e ~1000 px a grade de 7 colunas espremia Produto e Venda · cliente a
   0 px. A grade vale de 1001 px para cima (e não no celular deitado, até 480 px de altura com toque); abaixo, o cartão de 2 colunas. */
@media (max-width: 1000px), (max-height: 480px) and (pointer: coarse) {
  #page-pcp .est .est-quem-box > div, #page-pcp .est .est-quem-cab { grid-template-columns: 1fr 1fr; }
  /* A variante de 6 colunas tem seletor mais forte (div.est-q6): sem esta linha ficava com a grade do PC no celular (12/11/2026). */
  #page-pcp .est .est-quem-box > div.est-q6, #page-pcp .est .est-quem-cab.est-q6 { grid-template-columns: 1fr 1fr; }
  /* (1,2,1), como a regra da linha (.est-quem-box > div, display:grid): com (1,2,0) o cabeçalho continuava como linha de 69 px. */
  #page-pcp .est .est-quem-box > .est-quem-cab { display: none; }
}
@media (min-width: 1001px) and (min-height: 481px), (min-width: 1001px) and (pointer: fine) {
  #page-pcp .est .est-quem-box > div, #page-pcp .est .est-quem-cab {
    grid-template-columns: 96px minmax(0, 2.2fr) minmax(0, 1.6fr) 80px 64px 116px minmax(280px, 1.3fr); }
  #page-pcp .est .est-quem-box > div.est-q6, #page-pcp .est .est-quem-cab.est-q6 {
    grid-template-columns: 96px minmax(0, 1.8fr) 80px 64px 116px minmax(280px, 1.3fr); }
  #page-pcp .est .est-quem-box > div, #page-pcp .est .est-quem-cab {
    grid-template-columns: 96px minmax(0, 1.9fr) minmax(0, 1.4fr) 72px 56px 110px minmax(320px, 1.5fr); }
  #page-pcp .est .est-quem-box > div.est-q6, #page-pcp .est .est-quem-cab.est-q6 {
    grid-template-columns: 96px minmax(0, 1.7fr) 72px 56px 110px minmax(320px, 1.5fr); }
}

/* ══ Conferência da Design (12/11/2026) ══ */
/* 1. O rodapé "Vai mudar N de M" fica preso: o #pcp-content (pcp.css, overflow-y:auto) virava o contêiner do sticky e não rolava. */
#page-pcp #pcp-content:has(.est-tr-pe) { overflow: visible; }
/* 2. Alvos de 44 px no toque no módulo Materiais inteiro (o Guilherme exigiu o celular igual ao do mutirão; ESPEC-1 §4.4). */
@media (max-width: 1024px), (pointer: coarse) {
  #page-pcp .est .est-lk-a { min-height: 44px; display: inline-flex; align-items: center; padding: 0; margin-top: 0; }
  #page-pcp .est .est-vazio-p .est-lk { display: inline-flex; min-height: 44px; align-items: center; vertical-align: middle; }   /* fica na frase (Revisão 13/11) */
  #page-pcp .est .est-radios label { min-height: 44px; }
  #page-pcp .est .est-res button { min-height: 44px; align-items: center; }
  #page-pcp .est .est-seg button { min-width: 44px; min-height: 44px; }
  /* sem mudar o desenho: área de toque por ::before (as setas 22 × 22 e os links de 15 px do Será Levado; os dois links
     lado a lado, com 12 px entre eles, não invadem o vizinho) */
  #page-pcp .est .est-chev { position: relative; }
  #page-pcp .est .est-chev::before { content: ''; position: absolute; inset: -11px; }
  #page-pcp .est .est-sl-acoes .est-lk { position: relative; }
  #page-pcp .est .est-sl-acoes .est-lk::before, #page-pcp .est .est-sl-acoes .est-lk:only-child::before { content: ''; position: absolute; inset: -15px -5px; }
}
