/* Página /esteira — tudo escopado por .est-page / prefixo est- (as classes genéricas do style.css vazam). */
.est-page .est-main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.est-page .est-titulo { font-size: 15px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 10px; }
.est-page .est-fonte { color: var(--text-muted); font-size: 12px; margin: 0 0 4px; }

.est-page .est-aviso { background: rgba(210, 153, 34, .12); border: 1px solid var(--yellow); color: var(--text-primary); padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.est-page .est-aviso-erro { background: rgba(248, 81, 73, .12); border-color: var(--red); }

.est-page .est-agentes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.est-page .est-agente { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.est-page .est-agente-head { display: flex; align-items: center; gap: 10px; }
.est-page .est-icone { font-size: 22px; }
.est-page .est-agente-nome { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.est-page .est-agente-nome strong { font-size: 16px; }

.est-page .est-st { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.est-page .est-st-ok { background: rgba(63, 185, 80, .18); color: var(--green); }
.est-page .est-st-fila { background: rgba(88, 166, 255, .18); color: var(--blue); }
.est-page .est-st-ocioso { background: rgba(110, 118, 129, .2); color: var(--text-secondary); }
.est-page .est-st-alerta { background: rgba(210, 153, 34, .18); color: var(--yellow); }
.est-page .est-st-erro { background: rgba(248, 81, 73, .18); color: var(--red); }

.est-page .est-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; font-size: 12px; }
.est-page .est-dados dt { color: var(--text-muted); }
.est-page .est-dados dd { margin: 0; color: var(--text-primary); overflow-wrap: anywhere; }

.est-page .est-bloco { border-top: 1px solid var(--border); padding-top: 8px; font-size: 13px; min-width: 0; }
.est-page .est-bloco-tit { color: var(--text-secondary); font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.est-page .est-n { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 0 7px; margin-left: 4px; font-weight: 400; }
.est-page .est-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.est-page .est-lista li { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; min-width: 0; }
.est-page .est-mais { color: var(--text-muted); font-size: 12px; }
.est-page .est-vazio { color: var(--text-muted); font-size: 12px; }

.est-page .est-card-link { color: var(--blue); text-decoration: none; font-weight: 600; }
.est-page .est-card-link:hover { text-decoration: underline; }
.est-page .est-card-tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: inline-block; vertical-align: bottom; }
.est-page .est-card-meta { color: var(--text-muted); font-size: 11px; }
.est-page .est-dono { overflow-wrap: anywhere; }
.est-page .est-proc { background: var(--bg-secondary); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 4px; padding: 6px 8px; margin-bottom: 4px; min-width: 0; }
.est-page .est-proc-alerta { border-left-color: var(--red); }
.est-page .est-txt-erro { color: var(--red); }

.est-page .est-colunas { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.est-page .est-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
.est-page .est-col-agente { border-top: 3px solid var(--purple); }
.est-page .est-col-humano { border-top: 3px solid var(--gray); }
.est-page .est-col-nome { font-size: 12px; color: var(--text-secondary); }
.est-page .est-col-total { font-size: 22px; font-weight: 600; }

.est-page .est-tabela-wrap { overflow-x: auto; }
.est-page .est-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.est-page .est-tabela th, .est-page .est-tabela td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.est-page .est-tabela th { color: var(--text-secondary); font-weight: 600; }
.est-page .est-tabela td .est-card-tit { max-width: 480px; }

.est-page .est-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 10px; }
.est-page .est-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.est-page .est-filtros label.est-f-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 6px; }
.est-page .est-filtros select, .est-page .est-filtros input[type=search], .est-page .est-filtros input[type=text] {
  background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.est-page .est-f-busca { flex: 1 1 240px; max-width: 420px; }
.est-page .est-f-busca input { width: 100%; box-sizing: border-box; }
.est-page .est-mais-btn { margin-top: 10px; }
.est-page .est-nowrap { white-space: nowrap; }
.est-page .est-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.est-page .est-it-estado { color: var(--blue); font-weight: 600; }
.est-page .est-it-lock { color: var(--text-muted); }
.est-page .est-it-tag { color: var(--yellow); }
.est-page .est-it-vinculo { color: var(--purple); }
.est-page .est-it-comentario { color: var(--text-primary); background: var(--bg-secondary); border-left: 2px solid var(--border); padding: 2px 6px; border-radius: 3px; overflow-wrap: anywhere; }
.est-page .est-it-criou { color: var(--green); font-weight: 600; }
.est-page .est-hist-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue); font: inherit; font-weight: 600; }
.est-page .est-hist-btn:hover { text-decoration: underline; }
.est-page .est-azure { color: var(--blue); text-decoration: none; font-size: 12px; margin: 0 2px 0 3px; padding: 0 4px; border: 1px solid var(--border); border-radius: 4px; opacity: .85; }
.est-page .est-azure:hover { opacity: 1; border-color: var(--blue); }
.est-page .est-abrir-azure { font-size: 12px; font-weight: 400; color: var(--blue); margin-left: 8px; white-space: nowrap; }
.est-page .est-hist-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.est-page .est-hist-card h3 { margin: 0 0 4px; font-size: 15px; overflow-wrap: anywhere; }
.est-page .est-humano { color: var(--text-secondary); }
.est-page .est-agente-acoes { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.est-page td.est-oque { min-width: 260px; }

/* Bloqueados */
.est-page .est-col-bloq { border-top: 3px solid var(--red); text-decoration: none; color: inherit; }
.est-page .est-col-bloq .est-col-total { color: var(--red); }
.est-page .est-col-bloq:hover { border-color: var(--red); }
.est-page .est-bloq { margin-top: 12px; scroll-margin-top: 12px; }
.est-page .est-bloq-tit { font-size: 14px; margin: 0 0 8px; color: var(--red); }
.est-page .est-bloq-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.est-page .est-bloq-card { background: var(--bg-card); border: 1px solid var(--border); border-left: 5px solid var(--red); border-radius: 8px; padding: 12px 14px; font-size: 13px; min-width: 0; }
.est-page .est-bloq-cab { font-size: 14px; margin-bottom: 2px; min-width: 0; }
.est-page .est-bloq-motivo { margin-top: 8px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.est-page .est-bloq-selo { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.est-page .est-bloq-ok { background: rgba(63, 185, 80, .18); color: var(--green); }
.est-page .est-bloq-espera { background: rgba(210, 153, 34, .18); color: var(--yellow); }
.est-page .est-bloq-passos { margin: 4px 0 0; padding-left: 20px; color: var(--text-secondary); }
.est-page .est-bloq-passos li { margin: 3px 0; }
.est-page .est-bloq-passos b { color: var(--text-primary); }
.est-page .est-bloq-trecho { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.est-page .est-bloq-trecho summary { cursor: pointer; color: var(--text-muted); }
.est-page .est-bloq-trecho p { margin: 6px 0 0; background: var(--bg-secondary); border-radius: 4px; padding: 6px 8px; overflow-wrap: anywhere; }
.est-page .est-bloq-vazio { color: var(--text-muted); font-size: 12px; }

/* Caminho do card (clone do diagrama no histórico) */
.est-page .est-hist-fluxo { margin: 0 0 12px; }
.est-page .est-hist-fluxo summary { cursor: pointer; margin-bottom: 6px; }
.est-page .est-hist-seq { overflow-wrap: anywhere; }
.est-page .est-hist-svg { position: static; max-width: 640px; margin: 0 auto; }
.est-page .est-fx-svg-card .fx-off { opacity: .16; }
.est-page .est-fx-svg-card path.fx-on { stroke-width: 3.2; }
.est-page .est-fx-svg-card .fx-no.fx-on rect { stroke-width: 2.5; }
.est-page .est-fx-svg-card .fx-no.fx-atual rect { stroke: var(--green); stroke-width: 4; fill: rgba(63, 185, 80, .12); }
.est-page .est-fx-svg-card .fx-dec.fx-on polygon { stroke-width: 2.5; }
.est-page .est-fx-svg-card .fx-rot-apagado { opacity: .45; }
.est-page .est-fx-svg-card .fx-cont { fill: var(--text-primary); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--bg-card); stroke-width: 4px; }

/* Fluxograma vertical */
.est-page .est-fx-h { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.est-page .est-fx-etapa ul.est-fx-ops { list-style: none; padding-left: 0; }
.est-page .est-fx-ops li { display: flex; gap: 8px; align-items: baseline; }
.est-page .est-fx-op-dest { flex: 0 0 150px; font-weight: 600; color: var(--blue); font-size: 12px; }
.est-page .est-fx-alerta { margin-top: 8px; font-size: 12px; color: var(--red); background: rgba(248, 81, 73, .08); border-radius: 4px; padding: 4px 8px; }
.est-page .est-fx-semuso { opacity: .8; border-style: dashed; }
.est-page .est-fx-desbloq { border-left-color: var(--yellow); }
.est-page .est-fx-riscos { border-left-color: var(--red); }
.est-page .est-fx-riscos-lista { margin: 6px 0; padding-left: 22px; color: var(--text-secondary); }
.est-page .est-fx-riscos-lista li { margin: 6px 0; }
.est-page .est-fx-riscos-lista b { color: var(--text-primary); }
.est-page .est-fx-lg-alerta { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; }
.est-page .est-fx-svg .fx-alerta circle { fill: var(--red); stroke: var(--bg-card); stroke-width: 2; }
.est-page .est-fx-svg .fx-alerta text { fill: #fff; font-size: 11px; font-weight: 700; }
.est-page .est-fx-svg .fx-alerta { cursor: help; }
.est-page .est-fluxo summary { cursor: pointer; list-style: revert; }
.est-page .est-fluxo code { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.est-page .est-fx-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.est-page .est-fx-chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); border-left-width: 4px; }
.est-page .est-fx-chip.est-fx-agente { border-left-color: var(--purple); }
.est-page .est-fx-chip.est-fx-humano { border-left-color: var(--gray); }
.est-page .est-fx-chip.est-fx-ci { border-left-color: var(--blue); }
.est-page .est-fx-chip.est-fx-volta { border-left-color: var(--yellow); }
.est-page .est-fx { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-direction: column; align-items: stretch; }
.est-page .est-fx-etapa { background: var(--bg-card); border: 1px solid var(--border); border-left: 5px solid var(--gray); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.est-page .est-fx-etapa.est-fx-agente, .est-page .est-fx-sub.est-fx-agente { border-left-color: var(--purple); }
.est-page .est-fx-etapa.est-fx-ci { border-left-color: var(--blue); }
.est-page .est-fx-etapa ul, .est-page .est-fx-regras ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-secondary); }
.est-page .est-fx-etapa li, .est-page .est-fx-regras li { margin: 2px 0; }
.est-page .est-fx-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.est-page .est-fx-cab strong { font-size: 15px; flex: 1; }
.est-page .est-fx-quem { font-size: 11px; font-weight: 600; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.est-page .est-fx-n { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.est-page .est-fx-n b { color: var(--text-primary); font-size: 14px; }
.est-page .est-fx-saidas { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.est-page .est-fx-saida { color: var(--green); }
.est-page .est-fx-saida.est-fx-fim { color: var(--text-secondary); }
.est-page .est-fx-saida.est-fx-volta { color: var(--yellow); }
.est-page .est-fx-sub { margin: 8px 0 0 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-left: 4px solid var(--purple); border-radius: 6px; padding: 8px 12px; }
.est-page .est-fx-seta { text-align: center; color: var(--text-muted); font-size: 20px; line-height: 1; padding: 4px 0; }
.est-page .est-fx-seta-ci span { display: block; font-size: 11px; color: var(--blue); margin-top: 2px; }
.est-page .est-fx-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.est-page .est-fx-col { min-width: 0; }
.est-page .est-fx-col-tit { color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-bottom: 8px; text-align: center; }
.est-page .est-fx-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); margin-right: 8px; }
.est-page .est-fx-lg i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; }
.est-page .est-fx-lg-seg { border-color: var(--green) !important; }
.est-page .est-fx-lg-volta { border-color: var(--yellow) !important; border-top-style: dashed !important; }
.est-page .est-fx-lg-bug { border-color: var(--red) !important; }
.est-page .est-fx-lg-ci { border-color: var(--blue) !important; border-top-style: dotted !important; }
.est-page .est-fx-lg-fim { border-color: var(--gray) !important; }
.est-page .est-fx-lg-dec { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--yellow); transform: rotate(45deg); margin: 0 3px; }
.est-page .est-fx-svg-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 8px; position: sticky; top: 8px; }
.est-page .est-fx-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.est-page .est-fx-svg .fx-no rect { fill: var(--bg-secondary); stroke: var(--gray); stroke-width: 1.5; }
.est-page .est-fx-svg .fx-agente rect { stroke: var(--purple); stroke-width: 2; }
.est-page .est-fx-svg .fx-ci rect { stroke: var(--blue); stroke-width: 2; }
.est-page .est-fx-svg .fx-bug rect { stroke: var(--red); stroke-width: 2; }
.est-page .est-fx-svg .fx-espera rect { stroke: var(--yellow); stroke-dasharray: 4 3; }
.est-page .est-fx-svg .fx-fim rect { stroke: var(--gray); stroke-dasharray: 4 3; }
.est-page .est-fx-svg .fx-tit { fill: var(--text-primary); font-size: 14px; font-weight: 600; }
.est-page .est-fx-svg .fx-quem { fill: var(--text-secondary); font-size: 11px; }
.est-page .est-fx-svg .fx-n { fill: var(--text-primary); font-size: 12px; font-weight: 600; }
.est-page .est-fx-svg .fx-dec polygon { fill: var(--bg-card); stroke: var(--yellow); stroke-width: 1.5; }
.est-page .est-fx-svg .fx-dec text { fill: var(--text-primary); font-size: 11px; }
.est-page .est-fx-svg path.fx-l { fill: none; stroke-width: 1.8; }
.est-page .est-fx-svg path.fx-seg { stroke: var(--green); }
.est-page .est-fx-svg path.fx-volta { stroke: var(--yellow); stroke-dasharray: 6 4; }
.est-page .est-fx-svg path.fx-bug { stroke: var(--red); }
.est-page .est-fx-svg path.fx-ci { stroke: var(--blue); stroke-dasharray: 2 3; }
.est-page .est-fx-svg path.fx-fim { stroke: var(--gray); }
.est-page .est-fx-svg .fx-m-seg { fill: var(--green); }
.est-page .est-fx-svg .fx-m-volta { fill: var(--yellow); }
.est-page .est-fx-svg .fx-m-bug { fill: var(--red); }
.est-page .est-fx-svg .fx-m-ci { fill: var(--blue); }
.est-page .est-fx-svg .fx-m-fim { fill: var(--gray); }
.est-page .est-fx-svg .fx-rot { font-size: 11px; fill: var(--text-secondary); }
.est-page .est-fx-svg .fx-rot-volta { fill: var(--yellow); }
.est-page .est-fx-svg .fx-rot-bug { fill: var(--red); }
.est-page .est-fx-svg .fx-rot-ci { fill: var(--blue); }
.est-page .est-fx-regras { margin: 14px 0 0; background: var(--bg-card); border: 1px solid var(--border); border-left: 5px solid var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; }

@media (max-width: 640px) {
  .est-page .est-main { padding: 12px 16px; }
  .est-page .est-agentes { grid-template-columns: 1fr; }
  .est-page .est-dados { grid-template-columns: 1fr; }
  .est-page .est-tabela td .est-card-tit { max-width: 180px; }
  .est-page .est-f-busca { max-width: none; }
  .est-page .est-fx-grade { grid-template-columns: 1fr; }
  .est-page .est-bloq-lista { grid-template-columns: 1fr; }
  .est-page .est-fx-ops li { flex-direction: column; gap: 0; }
  .est-page .est-fx-op-dest { flex: none; }
  .est-page .est-fx-svg-wrap { position: static; overflow-x: auto; }
  .est-page .est-fx-svg { min-width: 560px; }
  /* Tabelas viram blocos: data, quando, quem e coluna numa linha; "o que fez" embaixo, largura toda. */
  .est-page .est-tabela thead { display: none; }
  .est-page .est-tabela tr { display: block; border-bottom: 1px solid var(--border); padding: 6px 0; }
  .est-page .est-tabela td { display: inline-block; border: 0; padding: 2px 8px 2px 0; }
  .est-page .est-tabela td.est-oque { display: block; min-width: 0; padding-top: 4px; }
  .est-page .est-tabela td .est-card-tit { max-width: 100%; white-space: normal; }
}
