/* PAINEL DE INDICADORES OPERACIONAIS — estilos próprios do Painel, na identidade URA/ADP CERCI (tokens de app.css).
 * 1) relatório do V41 (.rv41) com o acabamento da casca: cartões brancos, borda leve, raio 10, Segoe UI, verde CERCI
 * 2) painel executivo, importações, regras e gerenciador do Painel
 * 3) modo apresentação (complementos do .apresentacao de app.css)
 */

/* ---------- 1. relatório do V41 na casca nova ---------- */
.area-relatorio { min-width: 0; }
.rv41 { font-family: var(--fonte); color: var(--texto); font-size: 14px; }
.rv41 [hidden] { display: none !important; }
.rv41 .panel, .rv41 .chart-panel, .rv41 .continuity-master-panel, .rv41 .adp-report-section, .rv41 .table-panel, .rv41 .quality-panel,
.rv41 .volume-average-panel, .rv41 .month-visibility-panel, .rv41 .annual-data-panel, .rv41 .public-report-panel {
  background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra);
}
.rv41 .chart-panel { padding: 16px 18px; }
.rv41 .chart-head h2, .rv41 .continuity-master-head h2, .rv41 .adp-report-header h2 { font-size: 16px; font-weight: 700; color: var(--texto); letter-spacing: 0; }
.rv41 .chart-head span, .rv41 .continuity-master-head p { color: var(--texto-2); font-size: 12.5px; }
.rv41 .chart-eyebrow, .rv41 .section-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--verde); font-weight: 700; }
.rv41 .chart-tag { background: var(--verde-claro); color: var(--verde-escuro); border-radius: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; }
.rv41 .data-scope-banner, .rv41 .data-scope-banner.institutional-heading { margin: 22px 0 12px; padding: 0 0 10px 14px; border: 0; border-left: 4px solid var(--verde); border-bottom: 1px solid var(--borda); border-radius: 0; background: transparent; box-shadow: none; }
.rv41 .data-scope-banner h2 { font-size: 18px; font-weight: 700; color: var(--verde-escuro); }
.rv41 .data-scope-banner p:not(.section-kicker) { color: var(--texto-2); font-size: 13px; max-width: 1100px; }
.rv41 > .message { display: none !important; }      /* as mensagens do relatório viram avisos (toast) da casca */
.rv41 .kpi { background: var(--painel); border: 1px solid var(--borda); border-left: 3px solid var(--verde); border-radius: var(--raio); box-shadow: var(--sombra); display: block; }
.rv41 .kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--texto-2); }
.rv41 .kpi-value, .rv41 .kpi-pair-metric strong { color: var(--texto); font-variant-numeric: tabular-nums; }
.rv41 .annual-goal-card { border: 1px solid var(--borda); border-radius: var(--raio); background: linear-gradient(180deg, #fff, var(--painel-2)); }
.rv41 .annual-data-card { border: 1px solid var(--borda); border-radius: var(--raio-p); background: var(--painel); }
.rv41 .annual-data-card.meta { border-left: 3px solid var(--verde); }
.rv41 .ghost-button, .rv41 .secondary-button, .rv41 .primary-button, .rv41 .scope-view-button {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borda-forte); background: var(--painel); color: var(--texto);
  border-radius: var(--raio-p); padding: 6px 12px; font-weight: 600; font-size: 13px; min-height: 0; box-shadow: none; }
.rv41 .primary-button { background: var(--verde); border-color: var(--verde); color: #fff; }
.rv41 .ghost-button:hover, .rv41 .secondary-button:hover { background: var(--painel-2); }
.rv41 select, .rv41 input[type=text], .rv41 input[type=number] { border: 1px solid var(--borda-forte); border-radius: var(--raio-p); padding: 6px 8px; background: #fff; }
.rv41 .series-toggle { border: 1px solid var(--borda); border-radius: 999px; background: var(--painel-2); font-size: 12px; }
.rv41 .month-pill { border-radius: 999px; }
.rv41 .rule-box, .rv41 .adp-method-box { background: var(--painel-2); border: 1px solid var(--borda); border-radius: var(--raio-p); color: var(--texto-2); font-size: 12.5px; }
.rv41 table th { background: var(--painel-2); color: var(--texto-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.rv41 .chart-fullscreen-button { display: none !important; }   /* trocado pelo botão Apresentar */
.rv41 svg { max-width: 100%; height: auto; }
.rv41 .chart-host, .rv41 .master-chart-host, .rv41 .adp-chart-host { min-width: 0; overflow-x: auto; }
.rv41 .annual-year-selector { display: none; }
.rv41 .details-grid, .rv41 .chart-grid, .rv41 .adp-chart-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1200px) { .rv41 .chart-grid.annual-chart-grid, .rv41 .chart-grid.monthly-chart-grid, .rv41 .chart-grid.historical-global-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rv41 .adp-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rv41 .table-wrap, .rv41 .access-table-wrap, .rv41 .aneel-targets-table-wrap { overflow-x: auto; max-width: 100%; }
.rv41 .chart-head, .rv41 .continuity-master-head, .rv41 .adp-report-header, .rv41 .volume-average-head { flex-wrap: wrap; min-width: 0; }
.rv41 .chart-head > div, .rv41 .continuity-master-head > div { min-width: 0; }
.rv41 .panel, .rv41 .chart-panel, .rv41 section, .rv41 article { min-width: 0; max-width: 100%; }   /* o ano fica na barra do topo, valendo para todas as telas */

/* ---------- 2. barra do topo, painel executivo ---------- */
.filtro-rotulo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--texto-2); font-weight: 600; }
.filtro-topo { padding: 6px 8px; border: 1px solid var(--borda-forte); border-radius: var(--raio-p); background: #fff; font-weight: 600; min-width: 92px; }
/* filtros de dados dentro da página (ex.: ENEL RIO, logo abaixo do quadro anual) */
.filtros-conteudo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 6px 0 14px; }
.filtros-dica { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.saudacao { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 2px 0 14px; }
.saudacao h2 { font-size: 20px; color: var(--verde-escuro); }
.saudacao span { color: var(--texto-3); font-size: 13px; }
.kpis-executivo { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1680px) { .kpis-executivo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpis-executivo .kpi .rot { white-space: normal; line-height: 1.25; }
@media (max-width: 640px) { .kpis-executivo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis-executivo .kpi .sub { white-space: normal; }
.grade-executivo { margin-bottom: 16px; }
.cartao-grafico .card-corpo { padding-top: 10px; }
.grafico-host { width: 100%; min-width: 0; }
.grafico-novo { width: 100%; height: auto; display: block; }
.grafico-novo .g-grade { stroke: #e3e9e5; stroke-width: 1; }
.grafico-novo .g-eixo { font: 600 12px var(--fonte); fill: var(--texto-3); }
.grafico-novo .g-valor { font: 800 12px var(--fonte); }
.grafico-novo .g-valor-seg { font: 700 10.5px var(--fonte); fill: #fff; pointer-events: none; }
.grafico-novo .g-valor-sep { font: 700 10px var(--fonte); fill: var(--texto-2); }
/* amostragem mês a mês da supridora ENEL RIO (ano e mês) */
.ap-amostragem { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 14px; padding: 10px 14px; background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio-p); }
.ap-amostragem label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto-2); }
.ap-seletor { padding: 6px 8px; border: 1px solid var(--borda-forte); border-radius: var(--raio-p); background: var(--painel); color: var(--texto); font: inherit; }
.grafico-novo .g-legenda { font: 600 12.5px var(--fonte); fill: var(--texto-2); }
.grafico-novo .g-limite { stroke-width: 2; stroke-dasharray: 8 6; }
.grafico-novo .g-faixa { stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .7; }
.grafico-novo .g-ref { font: 700 12px var(--fonte); }
.nota-grafico { margin: 8px 0 0; font-size: 12px; color: var(--texto-3); }
.vazio-grafico { padding: 40px 10px; text-align: center; color: var(--texto-3); }
.lista-conferencia { list-style: none; margin: 0; padding: 0; }
.lista-conferencia li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 18px; border-top: 1px solid var(--borda); font-size: 13px; }
.lista-conferencia li:first-child { border-top: 0; }
.lista-conferencia li > span:nth-child(2) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lista-conferencia .selo { flex: 0 0 auto; min-width: 92px; justify-content: center; }
.lista-conferencia .conf-ir { white-space: nowrap; font-size: 12.5px; }
.lista-conferencia li.conf-erro { background: var(--vermelho-claro); }
.lista-conferencia li.conf-aviso { background: var(--ambar-claro); }

/* ---------- importações, regras, gerenciador ---------- */
.grade-importacao { align-items: start; }
.cartao-importacao .card-corpo > .ajuda { margin-top: 0; }
.zona-arquivo { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--borda-forte); border-radius: var(--raio); padding: 14px 16px; background: var(--painel-2); cursor: pointer; color: var(--texto-2); transition: border-color .12s, background .12s; }
.zona-arquivo:hover, .zona-arquivo:focus-visible, .zona-arquivo.arrastando { border-color: var(--verde); background: var(--verde-claro); outline: none; }
.zona-arquivo svg { color: var(--verde); flex: 0 0 auto; }
.acoes-linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.saida-importacao .tab { margin-top: 8px; }
.saida-importacao, .saida-importacao > div { min-width: 0; overflow-x: auto; }
.mudanca s { margin-right: 2px; }
.lista-causas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin-top: 12px; max-height: 60vh; overflow: auto; }
.causa { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--borda); border-radius: var(--raio-p); font-size: 13px; cursor: pointer; background: #fff; min-width: 0; }
.causa span:first-of-type { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.causa.marcada { border-color: #e7c98e; background: var(--ambar-claro); }
.passos { margin: 0 0 14px; padding-left: 20px; color: var(--texto-2); }
.passos li { margin: 4px 0; }
.ajuda { color: var(--texto-2); font-size: 13px; }

/* ---------- 3. apresentação ---------- */
.ap-botao-slide { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; border: 1px solid var(--borda-forte); background: #fff; color: var(--verde-escuro); border-radius: var(--raio-p); padding: 4px 9px; font: 600 12px var(--fonte); cursor: pointer; white-space: nowrap; }
.ap-botao-slide:hover, .ap-botao-slide:focus-visible { background: var(--verde-claro); border-color: var(--verde); outline: none; }
.rv41 .chart-head .ap-botao-slide, .rv41 .continuity-master-head .ap-botao-slide { align-self: flex-start; }
.apresentacao .ap-copia { border: 0 !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; margin: 0 !important; width: 100%; }
.apresentacao .ap-copia svg { width: 100%; height: auto; max-height: calc(100vh - 290px); }
.apresentacao .ap-copia .chart-host, .apresentacao .ap-copia .master-chart-host, .apresentacao .ap-copia .adp-chart-host { min-height: 0; overflow: visible; }
.apresentacao .ap-copia table { font-size: 15px; }
.apresentacao .ap-copia .kpi .val, .apresentacao .ap-copia .kpi-value { font-size: clamp(24px, 2.6vw, 40px); }
.apresentacao .ap-copia.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.apresentacao .ap-copia .kpi .sub { white-space: normal; font-size: 13px; }
.apresentacao .ap-copia .lista-conferencia li { font-size: 16px; padding: 12px 6px; }
.ap-cortina { position: absolute; inset: 0; z-index: 5; cursor: none; }
.ap-cortina.preta { background: #000; }
.ap-cortina.branca { background: #fff; }
body.apresentando { overflow: hidden; }

/* ---------- impressão: só o conteúdo ---------- */
@media print {
  .lateral, .topo, .ap-botao-slide, .chart-display-controls, .series-controls { display: none !important; }
  .app { display: block; }
  .rv41 .chart-panel, .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .ap-botao-slide span { display: none; }
  .filtro-rotulo span { display: none; }
  .lista-conferencia li { flex-wrap: wrap; padding: 10px 12px; }
  .rv41 .chart-panel { padding: 12px; }
}

/* ---------- nada alarga a página no celular (tabelas largas rolam dentro do cartão) ---------- */
.grade > *, .mestre-detalhe > * { min-width: 0; }
.card-corpo.sem-pad, .card-corpo { overflow-x: auto; }
.rv41 .details-grid > *, .rv41 .table-panel, .rv41 .quality-panel { min-width: 0; overflow-x: auto; }
.abas { max-width: 100%; overflow-x: auto; }
.rv41 .public-report-panel .download-sections, .rv41 .inline-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rv41 .public-report-panel, .rv41 .download-box { min-width: 0; overflow-x: hidden; }
.apresentacao .ap-rv41 { background: transparent; }
.apresentacao .ap-rv41 .annual-goal-grid, .apresentacao .ap-rv41 .adp-executive-grid { font-size: 18px; }
.apresentacao .ap-rv41 .goal-card-head strong, .apresentacao .ap-rv41 .adp-stat-value { font-size: clamp(30px, 3.4vw, 54px); }
.apresentacao .ap-rv41 .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* revisão de design (v1.0.0) */
/* a instrução "Selecione as séries..." repetia em todo gráfico: as caixas de marcar já se explicam */
.rv41 .chart-control-instruction { display: none; }
/* slide de indicadores: cartões em proporção de tela, valores grandes, conteúdo centralizado */
.apresentacao .ap-copia.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-content: center; min-height: calc(100vh - 300px); }
.apresentacao .ap-copia.kpis .kpi { min-height: clamp(150px, 22vh, 260px); padding: 24px 26px; align-items: center; }
.apresentacao .ap-copia.kpis .kpi .rot { font-size: clamp(14px, 1.2vw, 19px); white-space: normal; }
.apresentacao .ap-copia.kpis .kpi .val { font-size: clamp(32px, 3.6vw, 60px); line-height: 1.1; }
.apresentacao .ap-copia.kpis .kpi .sub { font-size: clamp(13px, 1vw, 17px); }
@media (max-width: 760px) { .apresentacao .ap-copia.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; } }

/* ---------- relatório para imprimir / PDF ---------- */
.ap-botao-slide + .ap-botao-slide { margin-left: 6px; }
.rel-botao.dentro { background: var(--verde); color: #fff; border-color: var(--verde); }
.rel-botao.dentro:hover { background: var(--verde-escuro); }
.rel-cont { background: var(--verde); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; margin-left: 2px; }
.rel-montagem .rel-opcoes { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; padding-bottom: 6px; }
.rel-montagem .rel-opcoes label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.rel-h { margin: 14px 0 6px; font-size: 13px; color: var(--verde-escuro); }
.rel-lista { border: 1px solid var(--borda); border-radius: var(--raio); max-height: 320px; overflow: auto; background: #fff; }
.rel-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--borda); }
.rel-item:last-child { border-bottom: 0; }
.rel-item.fora { opacity: .55; }
.rel-marca { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.rel-tit { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-sub { font-size: 11.5px; color: var(--texto-3); white-space: nowrap; }
.rel-acoes { display: flex; gap: 2px; flex: 0 0 auto; }
.rel-vazio { padding: 22px; text-align: center; color: var(--texto-3); font-size: 13px; }
.rel-nota { font-size: 12px; margin: 10px 0 0; }

/* pré-visualização na tela: folha branca sobre fundo cinza */
#relatorio-impressao { position: fixed; inset: 0; z-index: 400; background: #dfe5e1; display: flex; flex-direction: column; }
#relatorio-impressao .imp-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--borda); }
#relatorio-impressao .imp-barra strong { color: var(--verde-escuro); }
#relatorio-impressao .imp-dica { color: var(--texto-3); font-size: 12px; }
#relatorio-impressao .imp-barra-acoes { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
#relatorio-impressao .imp-area { flex: 1; overflow: auto; padding: 22px 12px 40px; }
.imp-folha { background: #fff; margin: 0 auto; padding: 12mm; box-shadow: 0 6px 24px rgba(0, 40, 20, .18); font-family: var(--fonte); color: var(--texto); box-sizing: border-box; }
.imp-folha.imp-paisagem { width: min(100%, 297mm); }
.imp-folha.imp-retrato { width: min(100%, 210mm); }
.imp-cab { display: flex; align-items: center; gap: 16px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 3px solid var(--verde-escuro); }
.imp-logo { width: 64px; height: 64px; object-fit: contain; flex: 0 0 auto; }
.imp-org { font-size: 11px; letter-spacing: .9px; font-weight: 700; color: var(--verde); text-transform: uppercase; }
.imp-cab h1 { margin: 2px 0 0; font-size: 26px; color: var(--verde-escuro); line-height: 1.15; }
.imp-sub { margin: 4px 0 0; font-size: 14px; color: var(--texto-2); }
.imp-meta { margin: 4px 0 0; font-size: 11.5px; color: var(--texto-3); }
.imp-capa { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 28px; break-after: page; }
.imp-capa .imp-cab { border-bottom-width: 5px; }
.imp-capa .imp-cab h1 { font-size: 36px; }
.imp-sumario { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.imp-sumario li span { margin-left: 10px; color: var(--texto-3); font-size: 12px; }
.imp-item { margin: 0 0 8mm; break-inside: avoid; page-break-inside: avoid; }
.imp-item.imp-longo { break-inside: auto; page-break-inside: auto; }
.imp-rotulo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: var(--verde); }
.imp-item h2 { margin: 2px 0 4px; font-size: 18px; color: var(--verde-escuro); padding-bottom: 5px; border-bottom: 2px solid var(--verde-escuro); }
.imp-nota { margin: 0 0 8px; font-size: 12px; color: var(--texto-2); }
.imp-corpo { margin-top: 6px; }
.imp-corpo svg { display: block; width: 100%; height: auto; max-height: 100mm; }
.imp-corpo .kpi-grid, .imp-corpo .kpis, .imp-corpo .adp-executive-grid, .imp-corpo .annual-goal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
.imp-corpo .ap-copia { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; width: 100%; }
.imp-corpo .kpis, .imp-corpo.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.imp-corpo table { font-size: 11px; }
.imp-pe { margin-top: 4px; font-size: 10px; color: var(--texto-3); text-align: right; }
.imp-pagina-item .imp-item { break-after: page; page-break-after: always; min-height: 60vh; }
.imp-pagina-item .imp-item:last-child { break-after: auto; page-break-after: auto; }
body.previa-relatorio { overflow: hidden; }

@media print {
  body > *:not(#relatorio-impressao) { display: none !important; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  #relatorio-impressao { position: static !important; display: block !important; background: #fff !important; overflow: visible !important; }
  #relatorio-impressao .imp-barra { display: none !important; }
  #relatorio-impressao .imp-area { overflow: visible !important; padding: 0 !important; }
  .imp-folha { box-shadow: none !important; width: auto !important; padding: 0 !important; margin: 0 !important; }
  .imp-folha, .imp-folha * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp-corpo svg { max-height: 98mm; }
  .imp-capa { min-height: 150mm; }
  .imp-pagina-item .imp-item { min-height: 0; }
}

/* ---------- caminhos de leitura (Gerenciador › Caminhos e cartões de importação) ---------- */
.caminho-item { border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.caminho-tit { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.caminho-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.caminho-linha input { flex: 1; min-width: 220px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.caminho-item .acoes-linha { margin-top: 8px; align-items: center; }
.caminho-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; margin-left: 6px; }
.caminho-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--borda); }
.caminho-salvo code, .caminho-item code, .caminho-vazio code { display: block; overflow-wrap: anywhere; word-break: break-all; white-space: normal; font-size: 12px; margin: 3px 0 6px; }
.proc .proc-barra { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.proc .proc-caminho { font-size: 12.5px; overflow-wrap: anywhere; }
.proc-lista { border: 1px solid var(--borda); border-radius: var(--raio); max-height: 360px; overflow: auto; }
.proc-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--borda); background: #fff; text-align: left; cursor: pointer; font: 500 13.5px var(--fonte); color: var(--texto); }
.proc-item:last-child { border-bottom: 0; }
.proc-item:hover, .proc-item:focus-visible { background: var(--verde-claro); outline: none; }
.proc-item.arquivo.sel { background: var(--verde-claro); box-shadow: inset 3px 0 0 var(--verde); font-weight: 700; }
.proc-item small { margin-left: auto; color: var(--texto-3); font-size: 11.5px; white-space: nowrap; }
.proc-item.pasta span { font-weight: 600; }

/* composição do DEC por mês: gráfico baixo + tabela enxuta */
.comp-grafico svg { width: 100%; height: auto; display: block; }
.comp-tabela-wrap { overflow-x: auto; margin-top: 6px; }
.comp-tabela { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.comp-tabela th, .comp-tabela td { padding: 3px 6px; border-bottom: 1px solid var(--borda); text-align: right; white-space: nowrap; line-height: 1.3; }
.comp-tabela thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-3); text-align: right; font-weight: 700; }
.comp-tabela tbody th { text-align: left; font-weight: 600; color: var(--texto); }
.comp-tabela tr.total th, .comp-tabela tr.total td { font-weight: 800; color: var(--verde-escuro); }
.comp-tabela tr.fora th, .comp-tabela tr.fora td { color: var(--texto-3); font-weight: 500; }
.comp-tabela .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.comp-tabela-wrap + .fraco, .comp-nota { font-size: 11.5px; }
/* quadro ENEL RIO ano a ano: cabe na largura do cartão (cabeçalho quebra linha; sem rolagem lateral) */
.comp-tabela.enel-anual { min-width: 0; }
.comp-tabela.enel-anual th, .comp-tabela.enel-anual td { white-space: normal; }
.comp-tabela.enel-anual thead th { vertical-align: bottom; line-height: 1.2; }

/* interruptor (liga/desliga) da leitura automática do ADP */
.interruptor-linha { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; }
.interruptor-adp { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; cursor: pointer; }
.interruptor-in { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.interruptor-trilho { position: absolute; inset: 0; background: #c9d2cd; border-radius: 999px; transition: background .2s; }
.interruptor-trilho::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.interruptor-in:checked + .interruptor-trilho { background: var(--verde); }
.interruptor-in:checked + .interruptor-trilho::after { transform: translateX(20px); }
.interruptor-in:disabled { cursor: not-allowed; }
.interruptor-in:focus-visible + .interruptor-trilho { outline: 2px solid var(--verde); outline-offset: 2px; }
.interruptor-txt { font-weight: 600; font-size: 13.5px; color: var(--texto-2); }
.caminho-link { display: block; font-size: 12px; color: var(--verde); word-break: break-all; margin: 0 0 6px; }

/* Motor mestre analítico: controles à esquerda, resultado à direita (empilha no celular) */
.motor-grade { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.motor-controles .motor-acoes { flex-direction: column; align-items: stretch; }
.motor-controles .motor-acoes .btn { justify-content: center; }
.motor-resultado { min-width: 0; }
.motor-resultado .tabela-wrap, .motor-resultado table { max-width: 100%; }
@media (max-width: 900px) { .motor-grade { grid-template-columns: 1fr; } }

/* painel do COD (telão): só leitura, letras grandes, legível a distância */
.tv { background: #0b1f1a; color: #e6f2ee; padding: 22px; border-radius: 12px; min-height: 70vh; }
.tv-cabeca { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tv-kicker { font-size: 14px; letter-spacing: .08em; color: #8fd3bd; }
.tv-mes { font-size: 40px; font-weight: 800; }
.tv-relogio { font-size: 14px; color: #a7c4bb; }
.tv-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.tv-grade-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-cartao { background: #12302a; border-radius: 10px; padding: 16px 18px; }
.tv-titulo { font-size: 15px; color: #a7c4bb; text-transform: uppercase; letter-spacing: .04em; }
.tv-valor { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 6px 0; }
.tv-detalhe { font-size: 15px; color: #cfe4dd; }
.tv-rodape { font-size: 13px; color: #8aa59c; margin-top: 8px; }
@media (max-width: 1100px) { .tv-grade, .tv-grade-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tv-grade, .tv-grade-2 { grid-template-columns: minmax(0, 1fr); } .tv-valor { font-size: 34px; } }

/* motor mestre: coluna lateral (controles + glossário abaixo) e resultado à direita */
.motor-coluna { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.glossario-lateral .glos-lista { max-height: 56vh; overflow: auto; padding-right: 4px; }
.glos-item { padding: 8px 0; border-bottom: 1px solid var(--borda); }
.glos-item:last-child { border-bottom: 0; }
.glos-def { font-size: 13px; margin-top: 2px; }
.glos-fonte { font-size: 12px; color: var(--texto-3); margin-top: 2px; }

/* ===================== BIBLIOTECA DE ESTUDOS ===================== */
/* lateral escura: ESTUDOS (glossário e biblioteca, sempre visível) */
.lateral .estudos { padding: 2px 10px 12px; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 6px; }
.lateral .estudos > .grupo-titulo { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #87b39a; padding: 12px 4px 6px; }
.estudos-campo { width: 100%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #f2f8f4; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.estudos-campo::placeholder { color: #9dc2ad; }
.estudos-campo:focus { outline: 2px solid #87b39a; outline-offset: 0; }
.lateral .estudos-area { max-height: 44vh; overflow-y: auto; margin-top: 8px; padding-right: 2px; }
.lateral .estudos-rotulo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: #87b39a; margin: 10px 2px 4px; }
.lateral .estudos-termo { border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 6px 2px; }
.lateral .estudos-termo summary { cursor: pointer; color: #eaf5ee; font-size: 13px; list-style: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lateral .estudos-termo summary::-webkit-details-marker { display: none; }
.lateral .estudos-termo summary::before { content: '▸'; color: #87b39a; }
.lateral .estudos-termo[open] summary::before { content: '▾'; }
.lateral .estudos-termo p { font-size: 12.5px; color: #cfe3d6; margin: 4px 0 0 14px; line-height: 1.4; }
.lateral .estudos-fonte { color: #9dc2ad !important; font-size: 11.5px !important; }
.lateral .estudos-grupo { font-size: 10.5px; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 1px 7px; color: #d6eadf; }
.lateral .estudos-doc { display: block; padding: 6px 4px; border-radius: 6px; color: #eaf5ee; font-size: 13px; }
.lateral .estudos-doc:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.lateral .estudos-doc b { font-weight: 600; display: block; margin-bottom: 2px; }
.lateral .estudos-trecho { display: block; font-size: 11.5px; color: #b7d6c3; margin-top: 3px; line-height: 1.35; }
.lateral .estudos-vazio { font-size: 12.5px; color: #b7d6c3; margin: 6px 2px; }
.lateral .estudos-mais { display: block; margin-top: 10px; font-size: 13px; color: #fff; font-weight: 600; padding: 8px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }

/* página da biblioteca (fundo claro) */
.biblio-busca { width: 100%; max-width: 680px; font-size: 15px; padding: 10px 12px; }
.biblio-resultado { margin-top: 10px; }
.biblio-resultado .estudos-rotulo { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--verde); font-weight: 700; margin: 12px 0 4px; }
.biblio-resultado .estudos-termo { border-bottom: 1px solid var(--borda); padding: 7px 2px; }
.biblio-resultado .estudos-termo summary { cursor: pointer; color: var(--texto); font-size: 14px; list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.biblio-resultado .estudos-termo summary::-webkit-details-marker { display: none; }
.biblio-resultado .estudos-termo summary::before { content: '▸'; color: var(--verde); }
.biblio-resultado .estudos-termo[open] summary::before { content: '▾'; }
.biblio-resultado .estudos-termo p { font-size: 13px; color: var(--texto-2, #374151); margin: 4px 0 0 16px; line-height: 1.45; }
.biblio-resultado .estudos-fonte { color: var(--texto-3) !important; font-size: 12px !important; }
.biblio-resultado .estudos-grupo { font-size: 11px; background: #e8f3ec; border-radius: 10px; padding: 1px 8px; color: var(--verde-escuro, #14532d); }
.biblio-achado { border-top: 1px solid var(--borda); padding: 9px 0; }
.biblio-achado .estudos-doc { display: block; color: var(--texto); font-size: 14px; }
.biblio-achado .estudos-doc:hover { text-decoration: underline; }
.biblio-achado .estudos-doc b { font-weight: 600; display: inline; margin-right: 8px; }
.biblio-achado .estudos-trecho { display: block; font-size: 12.5px; color: var(--texto-3); margin-top: 3px; line-height: 1.4; }
.biblio-trecho { font-size: 12.5px; color: var(--texto-2, #374151); margin: 4px 0 0 2px; line-height: 1.45; background: #f4f8f5; border-left: 3px solid var(--verde); padding: 6px 10px; border-radius: 4px; }

.biblio-grade { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.biblio-lista .card-corpo { max-height: 74vh; overflow-y: auto; }
.biblio-grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--verde); font-weight: 700; margin: 14px 0 4px; }
.biblio-grupo:first-child { margin-top: 0; }
.biblio-doc { border-top: 1px solid var(--borda); padding: 10px 2px; border-radius: 8px; }
.biblio-doc.ativo { background: #eef7f1; padding: 10px; border-top-color: transparent; }
.biblio-doc-tit { font-size: 14px; line-height: 1.35; }
.biblio-doc-desc { font-size: 12.5px; color: var(--texto-2, #374151); margin: 4px 0; line-height: 1.4; }
.biblio-doc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--texto-3); margin: 4px 0 6px; }
.biblio-leitor { min-height: 420px; }
.biblio-quadro { width: 100%; height: 72vh; min-height: 420px; border: 0; background: #fff; border-radius: 8px; display: block; }
.biblio-vazio { min-height: 320px; display: flex; align-items: center; justify-content: center; text-align: center; }
.biblio-inclusao { margin-top: 16px; }
.glos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 18px; margin-top: 10px; }
@media (max-width: 900px) { .biblio-grade { grid-template-columns: 1fr; } .biblio-quadro { height: 60vh; } }
/* ajustes da lateral ESTUDOS: campo escuro (o estilo global de input é claro) e termo em linha */
.lateral input.estudos-campo { background: rgba(255, 255, 255, .08); color: #f2f8f4; border: 1px solid rgba(255, 255, 255, .18); }
.lateral input.estudos-campo::placeholder { color: #9dc2ad; opacity: 1; }
.lateral .estudos-termo summary { display: block; line-height: 1.35; }
.lateral .estudos-termo summary b { font-size: 13px; font-weight: 600; }
.lateral .estudos-termo summary .estudos-grupo { margin-left: 4px; vertical-align: 1px; }

/* ===================== AJUDA CONTEXTUAL (? verde) ===================== */
.ajuda-ico { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 18px; height: 18px; margin-left: 6px; color: var(--verde); cursor: help; border-radius: 50%; flex: none; line-height: 0; }
.ajuda-ico svg { display: block; }
.ajuda-ico:hover, .ajuda-ico:focus-visible { color: var(--verde-escuro); outline: 2px solid var(--verde-claro, #9bd0ad); outline-offset: 2px; }
button + .ajuda-ico, a + .ajuda-ico { margin-left: 2px; }
.ajuda-pop { display: none; position: fixed; z-index: 2000; max-width: 360px; min-width: 240px; background: #fff; color: var(--texto); border: 1px solid var(--borda); border-left: 4px solid var(--verde); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16); padding: 12px 14px; font-size: 13px; line-height: 1.45; font-weight: 400; text-transform: none; letter-spacing: normal; }
.ajuda-tit { font-weight: 700; color: var(--verde-escuro); margin-bottom: 6px; font-size: 13.5px; }
.ajuda-pop p { margin: 4px 0; }
.ajuda-f { margin: 6px 0; }
.ajuda-f code { display: block; background: #f1f7f3; border-radius: 6px; padding: 5px 7px; font-size: 12px; white-space: normal; }
.ajuda-rodape { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--borda); }
.ajuda-rodape a { display: block; color: var(--verde); font-weight: 600; margin: 3px 0; text-decoration: none; }
.ajuda-rodape a:hover { text-decoration: underline; }
.ajuda-link { color: var(--verde); font-weight: 600; }
/* a explicação vive no ícone "?": o parágrafo que ficava embaixo do gráfico some da tela (continua no ícone e na apresentação) */
.card .nota-grafico { display: none !important; }

/* ===================== ESTUDOS EXPLICADOS ===================== */
.estudo { display: grid; gap: 14px; }
.estudo-resumo { font-size: 15px; color: var(--texto-2, #374151); margin: 0; line-height: 1.5; }
.estudo-h { font-size: 15px; color: var(--verde-escuro); margin: 0 0 6px; }
.estudo-secao p { font-size: 14px; line-height: 1.6; margin: 6px 0; color: var(--texto); }
.estudo-formula { background: #f1f7f3; border-left: 3px solid var(--verde); border-radius: 6px; padding: 8px 12px; font-size: 13.5px; margin: 8px 0; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; }
.estudo-fontes { margin-top: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.biblio-estudos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.biblio-estudo-item { display: block; border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; color: var(--texto); }
.biblio-estudo-item:hover { border-color: var(--verde); text-decoration: none; background: #f4faf6; }
.biblio-estudo-item b { display: block; color: var(--verde-escuro); font-size: 14px; margin-bottom: 4px; }
.biblio-estudo-item span { font-size: 12.5px; line-height: 1.4; }

/* ====== CERCI · cabeçalho em faixa verde com texto branco ====== */
.saudacao { position: relative; overflow: hidden; background: linear-gradient(118deg, var(--verde) 0%, var(--verde-escuro) 100%); color: #fff; border-radius: 16px; padding: 18px 24px; margin-bottom: 16px; box-shadow: 0 14px 34px rgba(21, 89, 42, .28); }
.saudacao::after { content: ''; position: absolute; right: -60px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(252, 220, 0, .30), rgba(252, 220, 0, 0) 68%); pointer-events: none; }
.saudacao h2 { color: #fff !important; font-size: 22px; }
.saudacao span { color: rgba(255, 255, 255, .88) !important; }

/* ====== PAINEL EXECUTIVO · estilo Power BI, cores CERCI ====== */
.pbi-topo { display: grid; gap: 16px; }
.pbi-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pbi-tile { position: relative; background: #fff; border-radius: 14px; padding: 16px 18px 10px; border-top: 4px solid var(--cor, var(--verde)); box-shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 6px 18px rgba(16, 40, 24, .08); transition: transform .25s ease, box-shadow .25s ease; animation: pbiEntrar .6s cubic-bezier(.2, .7, .2, 1) both; min-width: 0; }
.pbi-tile:hover { box-shadow: 0 18px 34px rgba(16, 40, 24, .18); }
.pbi-tile:nth-child(2) { animation-delay: .08s; }
.pbi-tile:nth-child(3) { animation-delay: .16s; }
.pbi-tile:nth-child(4) { animation-delay: .24s; }
.pbi-rot { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--texto-2); font-weight: 700; }
.pbi-val { font-size: 30px; font-weight: 800; color: var(--verde-escuro); margin: 4px 0 2px; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbi-chipline { margin: 4px 0 2px; }
.pbi-sub { font-size: 12.5px; color: var(--texto-2); min-height: 17px; }
.pbi-barra { height: 8px; border-radius: 6px; background: #e9f2ec; margin: 8px 0 2px; overflow: hidden; }
.pbi-barra i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--verde-medio), var(--verde)); transform-origin: left center; animation: pbiBarra 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.pbi-spark { height: 46px; margin: 4px -6px -6px; }
.pbi-linha { display: grid; gap: 16px; margin-top: 0; }
.pbi-l2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pbi-l3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pbi-card { background: #fff; border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 6px 18px rgba(16, 40, 24, .08); min-width: 0; animation: pbiEntrar .7s cubic-bezier(.2, .7, .2, 1) .25s both; }
.pbi-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.pbi-sobre { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--verde); font-weight: 700; }
.pbi-cab h3 { font-size: 16px; color: var(--texto); margin-top: 2px; }
.pbi-legenda-txt { font-size: 12px; color: var(--texto-3); align-self: center; }
.pbi-grafico { width: 100%; }
.pbi-medidores { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pbi-medidor { height: 210px; min-width: 0; }
.pbi-nota { font-size: 12px; color: var(--texto-3); margin: 6px 0 0; }
.pbi-3d { min-height: 300px; }
.pbi-card-3d { position: relative; }
@media (max-width: 1100px) { .pbi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pbi-l2, .pbi-l3 { grid-template-columns: minmax(0, 1fr); } }
/* cartões do painel executivo: sem barra de ações por cartão (apresentar e relatório ficam no topo da página) */
.pbi-card .ap-botao-slide, .pbi-card .rel-botao { display: none !important; }
@media (max-width: 640px) { .pbi-tiles { grid-template-columns: minmax(0, 1fr); } .pbi-val { font-size: 26px; } }

/* divisória entre o painel visual e o detalhamento */
.pbi-separador { display: flex; align-items: center; gap: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--verde-escuro); font-weight: 700; margin: 22px 2px 2px; }
.pbi-separador::after { content: ''; flex: 1; height: 1px; background: #cfe0d5; }

/* ====== gráfico 3D (WebGL) ====== */
.g3d { position: relative; width: 100%; overflow: hidden; cursor: grab; user-select: none; touch-action: none; }
.g3d.girando { cursor: grabbing; }
.g3d-canvas { display: block; position: absolute; left: 0; top: 0; }
.g3d-legenda { position: absolute; left: 4px; top: 0; display: flex; gap: 14px; font-size: 12px; color: var(--texto-2); z-index: 2; flex-wrap: wrap; }
.g3d-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.g3d-rotulos { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
.g3d-rotulos span { position: absolute; left: 0; top: 0; font-size: 12px; font-weight: 600; color: #4b5a51; white-space: nowrap; will-change: transform; }
.g3d-dica { position: absolute; z-index: 3; min-width: 170px; background: #fff; border: 1px solid var(--borda); border-left: 4px solid var(--verde); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 40, 24, .16); padding: 8px 11px; font-size: 12.5px; line-height: 1.5; white-space: pre-line; pointer-events: none; }
.g3d-dica[hidden] { display: none; }

/* ====== animações gerais dos gráficos e cartões ====== */
@keyframes pbiEntrar { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes pbiBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes desenhar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.grafico-host svg path[pathLength] { animation: desenhar 1.2s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .pbi-tile, .pbi-card, .pbi-barra i, .grafico-host svg path[pathLength] { animation: none !important; }
  .pbi-tile { transition: none !important; }
}

/* ====== consumo × meta: velocímetros do ano ====== */
.pbi-metas { margin-top: 0; }
.pbi-metas-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.pbi-meta-card { border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px 12px; background: #fff; min-width: 0; }
.pbi-meta-rot { font-size: 13.5px; font-weight: 700; color: var(--texto); }
.pbi-meta-sub { font-size: 11.5px; color: var(--texto-3); margin-bottom: 2px; }
.pbi-medidor-caixa { height: 210px; min-width: 0; }
.pbi-medidor-vazio { height: 210px; display: flex; align-items: center; justify-content: center; color: var(--texto-3); font-size: 13px; background: #f6f9f7; border-radius: 12px; }
.pbi-meta-txt { font-size: 12.5px; }
.pbi-meta-linha { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed #e3ebe6; }
.pbi-meta-linha span { color: var(--texto-2); }
.pbi-meta-falta { margin-top: 8px; font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; text-align: center; }
.pbi-meta-falta.ok { background: var(--verde-claro, #e7f4ec); color: var(--verde-escuro); }
.pbi-meta-falta.estouro { background: #fdecec; color: var(--vermelho); }
.pbi-parcial { margin-top: 6px; font-size: 11.5px; color: var(--ambar); }
@media (max-width: 1100px) { .pbi-metas-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pbi-metas-grade { grid-template-columns: minmax(0, 1fr); } }

/* ====== abertura do painel: desenvolvimento do DEC ====== */
@keyframes pbiSobe { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
.pbi-abertura { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 28% 18%, #2e9a4d 0%, #15592a 58%, #0b3a1a 100%); transition: opacity .6s ease; padding: 16px; }
.pbi-abertura.saindo { opacity: 0; pointer-events: none; }
.pbi-abertura-caixa { background: #fff; border-radius: 18px; padding: 20px 26px 16px; width: min(700px, 94vw); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); text-align: center; animation: pbiSobe .7s cubic-bezier(.2, .7, .2, 1) both; border-top: 6px solid #fcdc00; }
.pbi-abertura-logo { width: 58px; height: 58px; display: block; margin: 0 auto 4px; }
.pbi-abertura-caixa h2 { font-size: 22px; color: var(--verde-escuro); margin: 4px 0 2px; }
.pbi-abertura-sub { font-size: 12.5px; color: var(--texto-3); margin: 0 0 6px; }
.pbi-abertura-grafico { height: 250px; width: 100%; }
.pbi-abertura-valor { font-size: 40px; font-weight: 800; color: var(--verde-escuro); font-variant-numeric: tabular-nums; margin-top: 2px; }
.pbi-abertura-pular { margin-top: 6px; }

/* ====== editor de metas internas (Gerenciador › Regras do cálculo › Metas anuais) ====== */
.metas-editor { display: grid; gap: 12px; width: 100%; min-width: 0; box-sizing: border-box; }
.metas-ref { font-size: 13px; background: #f1f7f3; border-left: 3px solid var(--verde); padding: 8px 12px; border-radius: 8px; }
.metas-liberar { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--verde-escuro); }
.metas-sub { font-size: 14px; margin-top: 6px; color: var(--texto); }
.metas-seg { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 10px; display: grid; gap: 8px; }
.metas-seg-linha { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 150px; gap: 10px; align-items: end; }
.metas-seg-linha label { display: grid; gap: 3px; font-size: 12px; color: var(--texto-2); }
.metas-seg-linha input, .metas-seg-linha select { width: 100%; }
.metas-origem { font-size: 11.5px; }
.metas-meses { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.metas-meses input { width: 100%; }
@media (max-width: 640px) { .metas-seg-linha { grid-template-columns: minmax(0, 1fr); } .metas-meses { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metas-meses[hidden] { display: none; }

.metas-total { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metas-total label, .metas-seg-linha label { display: grid; gap: 3px; font-size: 12px; color: var(--texto-2); }
.metas-resumo { font-size: 13px; background: #f6faf7; border: 1px solid var(--borda); border-radius: 10px; padding: 9px 12px; display: grid; gap: 4px; }
.metas-falta { color: var(--verde-escuro); font-weight: 600; }
.metas-estouro { color: var(--vermelho); font-weight: 700; }
@media (max-width: 640px) { .metas-seg-linha { grid-template-columns: minmax(0, 1fr); } .metas-total { grid-template-columns: minmax(0, 1fr); } }

/* aviso do motor: cobre a tela enquanto o motor recalcula e valida; é removido quando a operação termina */
.motor-aviso { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(10, 40, 20, .55); backdrop-filter: blur(2px); cursor: progress; }
.motor-aviso-caixa { background: #fff; border-radius: 14px; padding: 28px 32px; max-width: 460px; width: calc(100% - 32px); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); border-top: 5px solid #208438; }
.motor-aviso-caixa b { display: block; font-size: 1.15rem; color: #15592a; margin: 14px 0 8px; }
.motor-aviso-caixa p { margin: 0; color: #4b5a51; font-size: .95rem; line-height: 1.45; }
.motor-giro { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 4px solid #e7f4ec; border-top-color: #208438; animation: motorGira 0.9s linear infinite; }
@keyframes motorGira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .motor-giro { animation-duration: 2.4s; } }

/* cartão sem meta interna: o consumo aparece em destaque, com a explicação embaixo */
.pbi-medidor-vazio { flex-direction: column; gap: 4px; text-align: center; }
.pbi-medidor-vazio span { font-size: .85rem; color: #4b5a51; }

/* ===================== DASHBOARD (diretoria / telão) ===================== */
.dash { --card: #ffffff; --txt: #15301f; --sub: #4b5a51; --linha: #dbe7df; --ok: #1c6b32; --ruim: #c53030; --sombra: 0 12px 34px rgba(7,40,18,.30); --topo: #ffffff; --topo-sub: #cfe9d8;
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 26px 16px; color: var(--txt); min-height: calc(100vh - 150px);
  background: radial-gradient(900px 420px at 12% -10%, rgba(159,216,177,.38), transparent 62%), radial-gradient(800px 480px at 100% 100%, rgba(252,220,0,.10), transparent 60%), linear-gradient(155deg, #15592a 0%, #208438 55%, #2a9a49 100%); }
.dash::before { content: ''; position: absolute; right: -90px; bottom: -110px; width: 560px; height: 560px; background: url('../img/logo.png') center / contain no-repeat; opacity: .10; pointer-events: none; filter: saturate(0) brightness(2.4); }
.dash > * { position: relative; z-index: 1; }
.dash[data-tema="claro"] { --topo: #15592a; --topo-sub: #4b5a51; --sombra: 0 8px 26px rgba(21,89,42,.14);
  background: radial-gradient(1100px 520px at 8% -12%, rgba(32,132,56,.14), transparent 60%), radial-gradient(900px 520px at 104% 0, rgba(252,220,0,.10), transparent 60%), #eef5f0; }
.dash[data-tema="claro"]::before { filter: none; opacity: .06; }
.dash-topo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; animation: dashDesce .7s cubic-bezier(.2,.8,.2,1) both; }
.dash-logo { width: 88px; height: 88px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 0 0 4px rgba(252,220,0,.85), 0 8px 30px rgba(0,0,0,.35); animation: dashAnel 3.2s ease-in-out infinite; }
.dash-titulos { flex: 1 1 280px; min-width: 0; }
.dash-kicker { font-size: .8rem; letter-spacing: 2.4px; text-transform: uppercase; color: var(--topo-sub); }
.dash-titulos h1 { margin: 2px 0 4px; font-size: clamp(1.9rem, 3.6vw, 3.1rem); font-weight: 800; line-height: 1.05; color: var(--topo); text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.dash-titulos h1::after { content: ''; display: block; width: 84px; height: 5px; margin-top: 8px; border-radius: 4px; background: #fcdc00; }
.dash-ref { display: inline-block; margin-top: 4px; font-size: .85rem; color: var(--topo); border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 2px 12px; }
.dash[data-tema="claro"] .dash-ref { border-color: var(--linha); }
.dash-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .85rem; color: var(--topo-sub); }
.dash-hora { font-variant-numeric: tabular-nums; color: var(--topo); font-weight: 600; }
.dash-vivo { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fcdc00; box-shadow: 0 0 0 0 rgba(63,209,111,.7); animation: dashPulso 2s infinite; margin-right: 6px; }
.dash-grade { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; transition: opacity .28s ease, transform .28s ease; }
.dash-grade.dash-sai { opacity: 0; transform: translateY(10px); }
.dash-card { --cor: #208438; position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--linha); border-top: 3px solid var(--cor); border-radius: 16px; padding: 16px 18px 14px; box-shadow: var(--sombra);
  opacity: 0; animation: dashEntra .75s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i, 0) * 90ms); transition: transform .25s ease, box-shadow .25s ease; }
.dash-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-120%); animation: dashBrilho 1.4s ease-out forwards; animation-delay: calc(var(--i, 0) * 90ms + .5s); }
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(7,40,18,.38), 0 0 0 1px var(--cor); }
.dash-largo { grid-column: span 2; }
.dash-kpi { min-height: 176px; }
.dash-card-tit { font-size: .78rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--sub); margin-bottom: 8px; }
.dash-valor { font-size: clamp(2.1rem, 3.5vw, 3.2rem); font-weight: 800; line-height: 1.05; color: var(--cor); font-variant-numeric: tabular-nums; }
.dash-valor.peq { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 4px 0; }
.dash-sub { color: var(--sub); font-size: .9rem; margin-top: 4px; }
.dash-barra { height: 7px; border-radius: 6px; background: var(--linha); margin-top: 12px; overflow: hidden; }
.dash-barra i { display: block; height: 100%; border-radius: 6px; animation: dashBarra 1.4s cubic-bezier(.2,.8,.2,1) both; }
.dash-spark { height: 56px; margin: 8px -6px -4px; }
.dash-gauge { height: 220px; }
.dash-linha { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--linha); font-size: .92rem; color: var(--sub); }
.dash-linha b { color: var(--txt); }
.dash-falta { margin-top: 10px; padding: 8px 10px; border-radius: 10px; text-align: center; font-weight: 700; }
.dash-falta.ok { background: #e7f4ec; color: var(--ok); }
.dash-falta.estouro { background: #fdeaea; color: var(--ruim); }
.dash-vazio { height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; border-radius: 12px; background: #f3f8f5; }
.dash-vazio span { color: var(--sub); font-size: .9rem; }
.dash-nota { color: var(--sub); font-size: .82rem; margin-top: 8px; line-height: 1.35; }
.dash-grafico { height: 300px; }
.dash-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-rodape { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dash-pontos { display: flex; gap: 8px; }
.dash-ponto { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.45); cursor: pointer; transition: width .3s ease, background .3s ease; }
.dash[data-tema="claro"] .dash-ponto { background: #c9d9cf; }
.dash-ponto.ativo { width: 30px; background: #fcdc00; }
.dash-progresso { flex: 1 1 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.dash-progresso i { display: block; height: 100%; width: 0; background: #fcdc00; animation: dashProg linear forwards; }
.dash-nota-rodape { margin-left: auto; font-size: .78rem; color: var(--topo-sub); }
body.dash-fs .lateral, body.dash-fs .topo { display: none !important; }
body.dash-fs .conteudo { padding: 0 !important; }
body.dash-fs .dash { border-radius: 0; min-height: 100vh; padding: 28px 34px 18px; }
@keyframes dashEntra { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dashDesce { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes dashBrilho { to { transform: translateX(120%); } }
@keyframes dashBarra { from { width: 0 !important; } }
@keyframes dashProg { to { width: 100%; } }
@keyframes dashPulso { 0% { box-shadow: 0 0 0 0 rgba(252,220,0,.75); } 70% { box-shadow: 0 0 0 11px rgba(252,220,0,0); } 100% { box-shadow: 0 0 0 0 rgba(252,220,0,0); } }
@keyframes dashAnel { 0%, 100% { box-shadow: 0 0 0 4px rgba(252,220,0,.85), 0 8px 30px rgba(0,0,0,.30); } 50% { box-shadow: 0 0 0 8px rgba(252,220,0,.40), 0 10px 44px rgba(0,0,0,.40); } }
@media (max-width: 760px) { .dash { padding: 16px; } .dash-largo { grid-column: span 1; } .dash-meta { align-items: flex-start; } .dash-duas { grid-template-columns: 1fr; } .dash-nota-rodape { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .dash-card, .dash-topo, .dash-barra i { animation: none; opacity: 1; } .dash-card::after, .dash-logo, .dash-vivo { animation: none; } .dash-progresso i { animation-duration: 1s !important; } }

/* configuração do Dashboard (Gerenciador) */
.dash-adm-tabela td, .dash-adm-tabela th { vertical-align: middle; }
.dash-adm-ordem { display: inline-flex; gap: 4px; }
.dash-adm-grupo { font-size: 11px; color: #6b7a71; text-transform: uppercase; letter-spacing: .6px; }

/* metas lado a lado: ANEEL e meta interna (DEC e FEC) */
.pbi-metas-par { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
@media (max-width: 640px) { .pbi-metas-par { grid-template-columns: minmax(0, 1fr); } }

/* DEC e FEC enviados à ANEEL */
.pbi-tiles-aneel { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.pbi-fonte-grafico { height: 300px; margin-top: 6px; }
@media (max-width: 640px) { .pbi-tiles-aneel { grid-template-columns: minmax(0, 1fr); } }

/* ===== Dashboard: grade livre (GridStack), edição e tela cheia ===== */
.dash .grid-stack { min-height: 120px; }
.dash .grid-stack-item-content { overflow: visible; inset: 0; }
.dash .grid-stack-item-content > .dash-card { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.dash .dash-card .dash-gauge, .dash .dash-card .dash-grafico { flex: 1 1 auto; height: auto; min-height: 110px; }
.dash .dash-card .dash-vazio { flex: 1 1 auto; height: auto; min-height: 90px; }
.dash .dash-card .dash-spark { flex: 0 0 auto; }
.dash .dash-largo { grid-column: auto; }
.dash-area { transition: opacity .28s ease, transform .28s ease; }
.dash-area.dash-sai { opacity: 0; transform: translateY(10px); }
.dash-botoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.dash-barra-edicao { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff8cc; color: #5b4a00; border: 2px dashed #e0b400; }
.dash-barra-edicao span { font-size: .88rem; flex: 1 1 280px; }
.dash-barra-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-barra-acoes select { max-width: 240px; }
.dash-editando .grid-stack-item > .grid-stack-item-content > .dash-card { outline: 2px dashed rgba(224,180,0,.95); outline-offset: -2px; cursor: grab; }
.dash-editando .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content > .dash-card { cursor: grabbing; box-shadow: 0 22px 50px rgba(0,0,0,.45); }
.dash-editando .grid-stack-placeholder > .placeholder-content { border: 3px dashed #fcdc00; background: rgba(252,220,0,.18); border-radius: 16px; }
.dash-editando .ui-resizable-handle { opacity: 1; }
.dash-editando .ui-resizable-se { width: 22px; height: 22px; right: 2px; bottom: 2px; background: linear-gradient(135deg, transparent 50%, #e0b400 50%); border-radius: 0 0 14px 0; cursor: nwse-resize; z-index: 5; }
.dash-editando .ui-resizable-e { width: 10px; right: 0; cursor: ew-resize; z-index: 4; }
.dash-editando .ui-resizable-s { height: 10px; bottom: 0; cursor: ns-resize; z-index: 4; }
.dash-tirar { position: absolute; top: 6px; right: 8px; z-index: 6; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #c53030; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.dash-tirar:hover { background: #8f1d1d; }
.dash-sair-fs { display: none; }
/* tela cheia: a tela cobre a janela inteira (mesmo se o navegador negar a API de tela cheia); Esc ou o botão saem */
body.dash-fs { overflow: hidden; }
body.dash-fs .dash { position: fixed; inset: 0; z-index: 9990; overflow: auto; border-radius: 0; min-height: 0; padding: 26px 34px 20px; }
body.dash-fs .dash-sair-fs { display: block; position: fixed; top: 12px; right: 14px; z-index: 9995; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; backdrop-filter: blur(4px); opacity: .55; transition: opacity .2s; }
body.dash-fs .dash-sair-fs:hover { opacity: 1; }
body.dash-fs .dash-botoes { display: none; }
@media (max-width: 760px) { .dash-barra-edicao { flex-direction: column; align-items: stretch; } }
.dash-editando .ui-resizable-autohide > .ui-resizable-handle, .dash-editando .grid-stack-item > .ui-resizable-handle { display: block !important; }

/* editor de metas internas: seções DEC e FEC */
.metas-secao { margin-bottom: 22px; padding-bottom: 6px; }
.metas-secao + .metas-secao { padding-top: 18px; border-top: 2px solid var(--borda); }
.pbi-metas-sub { margin: 18px 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-2); }

/* FAIXAS DE COR + velocímetro maior (Dashboard e Painel executivo) */
.dash-card-tit { font-size: clamp(.95rem, 1.25vw, 1.2rem); font-weight: 800; letter-spacing: .07em; }
.dash-medidor .dash-card-tit { font-size: clamp(1rem, 1.35vw, 1.3rem); letter-spacing: .05em; margin-bottom: 4px; }
.dash-medidor .dash-sub { font-size: 1rem; margin-bottom: 2px; }
.dash .dash-medidor .dash-gauge { min-height: 150px; }
.dash-medidor .dash-linha { font-size: .95rem; padding: 5px 0; }
.dash-medidor .dash-linha b { font-size: 1rem; }
.dash-falta { margin-top: 10px; padding: 9px 10px; border-radius: 12px; font-size: .95rem; line-height: 1.25; border: 0; }
.pbi-meta-falta { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.pbi-medidor-caixa { height: 240px; }
.pbi-faixas-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.pbi-faixas-leg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.faixas-adm-linha { display: grid; grid-template-columns: 110px 70px 150px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dotted var(--borda); }
.faixas-adm-linha input[type=color] { width: 56px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--borda-forte); background: #fff; cursor: pointer; }
.faixas-adm-previa { display: flex; height: 26px; border-radius: 13px; overflow: hidden; margin: 14px 0 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.faixas-adm-previa span { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
@media (max-width: 760px) { .faixas-adm-linha { grid-template-columns: 1fr 1fr; } }

/* Gerenciador › Tela de entrada: prévia em miniatura (1440 × 900 escalada) e prévia em tela cheia */
.entrada-previa { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; border: 1px solid var(--borda); background: #f2f7f3; }
.entrada-previa-palco { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; pointer-events: none; }
.entrada-previa-palco .ent { min-height: 900px; height: 900px; }
.entrada-previa .ent *, .entrada-previa .ent *::before { animation: none !important; }
.entrada-deslizante { display: flex; align-items: center; gap: 12px; }
.entrada-deslizante input[type=range] { flex: 1 1 auto; accent-color: var(--verde); }
.entrada-valor { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.entrada-info { margin: 4px 0 12px; line-height: 1.6; }
.entrada-info .selo { margin-left: 8px; }
.entrada-tela-cheia { position: fixed; inset: 0; z-index: 9995; overflow: auto; background: #f2f7f3; }
.entrada-tela-cheia .ent { min-height: 100vh; }
.entrada-tela-cheia-fechar { position: fixed; top: 14px; right: 14px; z-index: 9996; }

/* abas do Gerenciador: no computador quebram em duas linhas em vez de esconder as últimas; no celular continuam roláveis */
@media (min-width: 761px) { .abas { flex-wrap: wrap; overflow-x: visible; } }

/* ADP por tipo: cartões clicáveis e lista de atividades */
.adp-tipo-tile { text-align: left; cursor: pointer; font: inherit; border: 1px solid var(--borda); }
.adp-tipo-tile.ativo { box-shadow: 0 0 0 3px var(--cor); }
.adp-tipo-lista { max-height: 420px; overflow: auto; }
.adp-tipo-servico { max-width: 360px; }

.adp-tipo-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adp-tipo-lista td, .adp-tipo-lista th { text-align: left; vertical-align: top; }
.adp-tipo-lista td.num, .adp-tipo-lista th:nth-child(n+6) { text-align: right; white-space: nowrap; }
.adp-tipo-servico { max-width: 420px; white-space: normal; word-break: break-word; }
@media (max-width: 900px) { .adp-tipo-tiles { grid-template-columns: minmax(0, 1fr); } }
.adp-tipo-lista table { width: 100%; table-layout: auto; }
.adp-tipo-lista td, .adp-tipo-lista th { text-align: left !important; white-space: normal !important; }
.adp-tipo-lista td.num, .adp-tipo-lista th:nth-child(n+7) { text-align: right !important; white-space: nowrap !important; }
.adp-tipo-lista td.adp-tipo-servico { min-width: 260px; max-width: 460px; word-break: break-word; }
.adp-tipo-lista th:nth-child(n+7) { text-align: right !important; }
.adp-tipo-lista th:nth-child(6) { text-align: left !important; }

/* ===== Dashboard: cartões que se adaptam ao tamanho do quadro =====
 * Regra de prioridade: o TÍTULO e o GRÁFICO aparecem sempre. Conforme o quadro diminui, somem primeiro os textos de apoio
 * (Esperado → faixa de avanço → Consumido → notas/subtítulo), e a fonte do título e do valor encolhe junto com o quadro. */
.dash .grid-stack-item-content > .dash-card { container: dashcard / size; }
.dash .dash-kpi { min-height: 0; }
.dash .dash-card .dash-card-tit, .dash .dash-medidor .dash-card-tit {
  flex: 0 0 auto; margin-bottom: 4px; line-height: 1.15; letter-spacing: .04em; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  font-size: clamp(.66rem, min(5.4cqw, 7cqh), 1.3rem);
}
.dash .dash-card .dash-gauge, .dash .dash-card .dash-grafico, .dash .dash-medidor .dash-gauge { flex: 1 1 0; min-height: 0; height: auto; }
.dash .dash-card .dash-vazio { flex: 1 1 0; min-height: 0; height: auto; }
.dash .dash-card .dash-linha, .dash .dash-card .dash-falta, .dash .dash-card .dash-sub, .dash .dash-card .dash-nota, .dash .dash-card .dash-barra { flex: 0 0 auto; }
.dash .dash-valor { font-size: clamp(1.2rem, min(11cqw, 24cqh), 3.2rem); }
.dash .dash-vazio .dash-valor { font-size: clamp(1.1rem, min(10cqw, 18cqh), 2.4rem); }
.dash .dash-linha b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash .dash-falta { overflow: hidden; }

@container dashcard (max-height: 430px) { .dash-esp { display: none; } }
@container dashcard (max-height: 360px) { .dash-falta { display: none; } .dash-card-tit { -webkit-line-clamp: 2; } }
@container dashcard (max-height: 290px) { .dash-cons, .dash-nota, .dash-vazio span { display: none; } }
@container dashcard (max-height: 230px) { .dash-medidor .dash-sub { display: none; } .dash-card-tit { -webkit-line-clamp: 1; line-clamp: 1; } }
/* cartões de valor (KPI): o valor é o "gráfico"; somem primeiro a tendência, depois a barra e por fim o texto de apoio */
@container dashcard (max-height: 200px) { .dash-kpi .dash-spark { display: none; } }
@container dashcard (max-height: 150px) { .dash-kpi .dash-barra { display: none; } }
@container dashcard (max-height: 110px) { .dash-kpi .dash-sub { display: none; } }
@container dashcard (max-height: 170px) { .dash-card-tit { letter-spacing: 0; margin-bottom: 0; } }
@container dashcard (max-width: 260px) { .dash-linha { font-size: .8rem; } .dash-falta { font-size: .8rem; padding: 6px 8px; } }
@container dashcard (max-width: 200px) { .dash-esp, .dash-nota { display: none; } .dash-card-tit { -webkit-line-clamp: 2; letter-spacing: 0; } }
.dash .grid-stack-item-content > .dash-card { padding: clamp(6px, 4cqmin, 16px) clamp(8px, 5cqmin, 18px) clamp(6px, 3.5cqmin, 14px); }

.dash .dash-kpi .dash-spark { flex: 1 1 0; min-height: 0; height: auto; }

/* Conferência das regras de expurgo (Motor mestre analítico) */
.conf-comp { border: 1px solid var(--linha, #d9e2dc); border-radius: 12px; margin: 8px 0; background: var(--card, #fff); }
.conf-comp[open] { box-shadow: 0 2px 10px rgba(7,40,18,.08); }
.conf-cab { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; list-style: none; }
.conf-cab::-webkit-details-marker { display: none; }
.conf-cab::before { content: '▸'; color: #6b7a71; margin-right: 2px; }
.conf-comp[open] > .conf-cab::before { content: '▾'; }
.conf-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.conf-corpo { padding: 2px 16px 12px; }
.conf-regra { padding: 8px 0; border-top: 1px dotted var(--linha, #d9e2dc); }
.conf-regra:first-child { border-top: 0; }
.conf-itens { margin: 4px 0 0; padding-left: 18px; font-size: .88rem; color: var(--sub, #4b5b52); }
.conf-itens li { margin: 2px 0; overflow-wrap: anywhere; }

/* Supridora ENEL RIO: gráficos enxutos, dois por linha */
.enel-grade { align-items: start; }
.enel-grade > .card { margin: 0 !important; }
.enel-grade .card-cab { padding: 10px 14px 8px; }
.enel-grade .card-cab h2 { font-size: .95rem; line-height: 1.25; }
.enel-grade .card-corpo { padding: 8px 12px 10px; }
.enel-grade .grafico-host { max-width: 100%; }
.enel-grade .grafico-novo { width: 100%; height: auto; max-height: 300px; display: block; }
.enel-grade .grafico-novo .g-grade { stroke: #eef2ef; stroke-dasharray: 3 4; }
.enel-grade .grafico-novo .g-eixo { font-size: 11px; font-weight: 500; }
.enel-grade .grafico-novo .g-valor { font-size: 11px; font-weight: 700; fill: #33423a; }
.enel-grade .grafico-novo .g-valor-seg { font-size: 10px; }
.enel-grade .grafico-novo .g-legenda { font-size: 11px; font-weight: 500; }
@media (max-width: 1080px) { .enel-grade.grade.c2 { grid-template-columns: minmax(0, 1fr); } }
.enel-grade .card-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px; }
.enel-grade .card-cab .dir { display: flex; flex-wrap: nowrap; gap: 6px; }
.enel-grade .card-cab .btn { padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.enel-val .grafico-host { max-width: 660px; margin: 0 auto; }
.enel-val .grafico-novo { max-height: 300px; }
.enel-val .grafico-novo .g-eixo, .enel-val .grafico-novo .g-valor, .enel-val .grafico-novo .g-legenda { font-size: 11px; }

/* SCADA (desarmes e piques) e consulta de bases */
.grade.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grade.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grade.c4 { grid-template-columns: minmax(0, 1fr); } }
.scada-legenda { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.scada-chip { padding: 6px 12px; border-radius: 10px; font-size: .88rem; border: 1px solid transparent; }
.scada-chip.scada-vermelho { background: #fde8e8; color: #8f1d1d; border-color: #f3b4b4; }
.scada-chip.scada-laranja { background: #ffedd5; color: #9a3d06; border-color: #f7c590; }
.scada-chip.scada-cinza { background: #eceff1; color: #43524a; border-color: #cfd8dc; }
.scada-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.scada-caixa { border-radius: 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--linha, #d9e2dc); border-left-width: 5px; display: flex; flex-direction: column; gap: 2px; }
.scada-caixa b { font-size: 1.5rem; line-height: 1.1; }
.scada-caixa span { font-size: .8rem; color: var(--sub, #4b5b52); }
.scada-caixa.scada-vermelho { border-left-color: #c53030; } .scada-caixa.scada-laranja { border-left-color: #ea7a1c; } .scada-caixa.scada-ambar { border-left-color: #e0b400; }
.scada-caixa.scada-verde { border-left-color: #208438; } .scada-caixa.scada-azul { border-left-color: #1d4ed8; } .scada-caixa.scada-cinza { border-left-color: #94a3b8; } .scada-caixa.scada-roxo { border-left-color: #7b3fb0; }
.scada-tabela tr.scada-lin-interrupcao td:first-child { box-shadow: inset 5px 0 0 #c53030; }
.scada-tabela tr.scada-lin-interrupcao { background: #fff5f5; }
.scada-tabela tr.scada-lin-pique td:first-child { box-shadow: inset 5px 0 0 #ea7a1c; }
.scada-tabela tr.scada-lin-pique { background: #fff7ed; }
.scada-tabela tr.scada-lin-acima_48h td:first-child, .scada-tabela tr.scada-lin-aberto td:first-child { box-shadow: inset 5px 0 0 #94a3b8; }
.scada-tabela tr.scada-lin-acima_48h, .scada-tabela tr.scada-lin-aberto { background: #f4f6f7; }
.scada-tabela tr.scada-lin-somado td:first-child { box-shadow: inset 5px 0 0 #1d4ed8; }
.scada-previa { margin-top: 10px; }
.scada-cliente { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 10px 14px; border-radius: 12px; background: #f1f7f3; margin: 10px 0; }
tr.scada-pes-atendimento td:first-child { box-shadow: inset 4px 0 0 #1d4ed8; } tr.scada-pes-desarme td:first-child { box-shadow: inset 4px 0 0 #c53030; }
tr.scada-pes-pique td:first-child { box-shadow: inset 4px 0 0 #ea7a1c; } tr.scada-pes-suprida td:first-child, tr.scada-pes-supridora td:first-child { box-shadow: inset 4px 0 0 #7b3fb0; }
.bases-resumo { display: block; min-width: 200px; max-width: 380px; white-space: normal; overflow-wrap: anywhere; }

/* ---------- SEM BARRA DE ROLAGEM LATERAL: o texto quebra e cabe na largura da tela ---------- */
.tabela-rolagem, .table-wrap, .comp-tabela-wrap, .card-corpo, .card-corpo.sem-pad, .rv41 .table-panel, .saida-importacao, .saida-importacao > div { overflow-x: visible; max-width: 100%; }
table.tab { table-layout: auto; width: 100%; }
.tab th, .tab td { white-space: normal; overflow-wrap: anywhere; padding: 7px 8px; vertical-align: top; }
.tab th { font-size: 11px; letter-spacing: .2px; position: static; }
.tab td.num { white-space: nowrap; overflow-wrap: normal; }
.tab th.num { white-space: normal; }
.tab .nowrap { white-space: normal; }
.tab .fraco, .scada-sub { font-size: 12px; }
.scada-sub { margin-top: 2px; }
.comp-tabela { min-width: 0; width: 100%; table-layout: auto; }
.comp-tabela th, .comp-tabela td { white-space: normal; padding: 3px 4px; }
.rv41 table, .rv41 .table-wrap table, .rv41 .access-table-wrap table, .rv41 .aneel-targets-table-wrap table, .rv41 .aneel-targets-table { width: 100%; max-width: 100%; min-width: 0; table-layout: auto; }
.rv41 .tmae-audit-table td { white-space: normal; max-width: none; overflow: visible; text-overflow: clip; }
.rv41 .tmae-audit-table { max-height: none; }
.comp-tabela.enel-anual { font-size: 11px; }
.comp-tabela.enel-anual th, .comp-tabela.enel-anual td { padding: 3px 3px; }
.rv41 .table-wrap th, .rv41 .table-wrap td, .rv41 .access-table-wrap th, .rv41 .access-table-wrap td { white-space: normal; overflow-wrap: anywhere; padding-left: 5px; padding-right: 5px; }
.abas { flex-wrap: wrap; overflow-x: visible; }
/* tela estreita (celular): cada linha da tabela vira um cartão, com o nome da coluna ao lado do valor */
@media (max-width: 760px) {
  table.tab, .tab thead, .tab tbody, .tab tr, .tab td { display: block; width: 100%; box-sizing: border-box; }
  .tab thead { display: none; }
  .tab tr { border: 1px solid var(--borda); border-radius: 10px; margin: 0 0 8px; padding: 4px 10px; background: #fff; }
  .tab td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 4px 0; text-align: right; white-space: normal; }
  .tab td::before { content: attr(data-rot); flex: 0 0 38%; max-width: 38%; text-align: left; font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--texto-2); }
  .tab td:empty { display: none; }
  .tab td[colspan]::before { content: none; }
}
.comp-tabela th, .comp-tabela td { overflow-wrap: anywhere; }
.comp-tabela.enel-anual { font-size: 10.5px; }
.adp-tipo-lista td.adp-tipo-servico { min-width: 0; max-width: none; }
.tab input:not([type=checkbox]):not([type=radio]), .tab select, .tab textarea { max-width: 100%; min-width: 0; width: 100%; box-sizing: border-box; }
.tab input:not([type=checkbox]):not([type=radio]), .tab select, .tab textarea { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
@media (max-width: 600px) {
  .rv41 table, .comp-tabela { font-size: 10px; }
  .rv41 th, .rv41 td, .comp-tabela th, .comp-tabela td { padding: 3px 2px; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
  .adp-tipo-lista td.adp-tipo-servico { min-width: 0; }
  .rv41 .enel-share { min-width: 0; }
}
@media (max-width: 760px) {
  table.empilha, .empilha thead, .empilha tbody, .empilha tr, .empilha td { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
  .empilha thead { display: none; }
  .empilha tr { border: 1px solid var(--borda); border-radius: 10px; margin: 0 0 8px; padding: 4px 10px; background: #fff; }
  .empilha td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0 !important; padding: 4px 0; text-align: right; white-space: normal; }
  .empilha td::before { content: attr(data-rot); flex: 0 0 38%; max-width: 38%; text-align: left; font-weight: 700; font-size: 10px; text-transform: uppercase; color: var(--texto-2); }
  .empilha td:empty { display: none; }
}
@media (max-width: 600px) {
  .btn { white-space: normal; text-align: left; max-width: 100%; }
  .card, .card-cab, .card-corpo, .biblio-lista, .biblio-leitor { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .card-cab { flex-wrap: wrap; }
  .card-cab .dir { max-width: 100%; }
  .grade, .grade.c2, .grade.c3, .grade.c4, [class*="biblio"] { min-width: 0; }
  .grade > *, [class*="biblio"] > * { min-width: 0; }
}
@media (max-width: 600px) { .card-corpo, .biblio-lista li, .biblio-lista a { overflow-wrap: anywhere; } }
@media (min-width: 1280px) { .scada-tabela .scada-dt, .scada-tabela .nowrap { white-space: nowrap; } }
.scada-interruptor { display: inline-flex; align-items: center; gap: 8px; }
.scada-int-txt { font-size: 12.5px; }
.scada-int-txt { white-space: nowrap; }

/* ---------- gráfico comparativo DEC × FEC: um gráfico para cada, legenda, atalhos e tabela de valores ---------- */
.cm-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; width: 100%; }
.cm-presets-rot { font-weight: 700; color: var(--texto-2, #3f4f48); }
.cm-preset { border: 1px solid var(--borda-forte, #b9cbc0); background: #fff; color: var(--verde-escuro, #0f5c2e); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.cm-preset:hover { background: #eaf4ee; }
.cm-bloco { margin: 14px 0 6px; padding: 12px 14px 6px; border: 1px solid var(--borda, #dbe5de); border-radius: 12px; background: #fff; }
.cm-bloco svg { width: 100%; height: auto; display: block; }
.cm-titulo { font-size: 15px; color: var(--texto, #14221d); }
.cm-titulo b { font-size: 18px; margin-right: 4px; }
.cm-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 4px; }
.cm-leg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--texto-2, #3f4f48); }
.cm-leg-linha { display: inline-block; width: 30px; height: 0; border-top: 3px solid; }
.cm-tabela { margin: 10px 0 4px; }
.cm-tabela summary { cursor: pointer; font-weight: 700; color: var(--verde-escuro, #0f5c2e); padding: 6px 0; }
.cm-tabela-rolagem { overflow-x: visible; }
.cm-tabela table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; table-layout: auto; min-width: 0; }
.cm-tabela th, .cm-tabela td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--borda, #e2eae5); white-space: normal; overflow-wrap: anywhere; }
.cm-tabela thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .2px; vertical-align: bottom; background: #f4f8f5; }
.cm-tabela tbody th { text-align: left; font-weight: 700; }
.cm-aviso { margin: 6px 2px 0; font-size: 12.5px; color: var(--texto-2, #3f4f48); }
/* variação % e projeção: ocupa a largura inteira (em meia largura as letras do gráfico ficavam minúsculas) */
.rv41 .projection-panel { grid-column: 1 / -1; }

/* gráfico comparativo DEC × FEC dentro da apresentação e do relatório impresso: os dois gráficos têm de caber na mesma tela / página */
.ap-corpo .cm-bloco { margin: 6px 0 0; padding: 8px 12px 2px; }
.ap-corpo .cm-bloco svg { max-height: 27vh; }
.ap-corpo .cm-tabela { display: none; }
@media print {
  .imp-corpo .cm-bloco { margin: 2mm 0 0; padding: 2mm 3mm 0; break-inside: avoid; }
  .imp-corpo .cm-bloco svg { max-height: 44mm; }
  .imp-corpo .cm-titulo { font-size: 11pt; }
  .imp-corpo .cm-legenda { margin: 1mm 0; }
  .imp-corpo .cm-tabela { display: none; }
}
/* Scada: a coluna do equipamento e os títulos não quebram no meio da palavra (a coluna da situação tem texto longo) */
.scada-tabela th { overflow-wrap: normal; word-break: normal; }
@media (min-width: 1200px) {
  .scada-tabela th:first-child, .scada-tabela td:first-child { min-width: 104px; overflow-wrap: normal; }
  .scada-tabela td.num { min-width: 64px; }
}
/* Scada em tela média (tablet / janela estreita): a linha vira cartão já a partir de 1100 px (a coluna "Situação" tem texto longo, sobretudo em cascata) */
@media (min-width: 761px) and (max-width: 1100px) {
  table.scada-tabela, .scada-tabela thead, .scada-tabela tbody, .scada-tabela tr, .scada-tabela td { display: block; width: 100%; box-sizing: border-box; }
  .scada-tabela thead { display: none; }
  .scada-tabela tr { border: 1px solid var(--borda); border-radius: 10px; margin: 0 0 8px; padding: 4px 10px; }
  .scada-tabela td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 4px 0; text-align: right; white-space: normal; }
  .scada-tabela td::before { content: attr(data-rot); flex: 0 0 30%; max-width: 30%; text-align: left; font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--texto-2); }
  .scada-tabela td:empty { display: none; }
}

/* ---------- Supridora ENEL × CERCI (tela simples) ---------- */
.sup-filtros { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 14px; }
.sup-filtros select { margin-left: 6px; }
.sup-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sup-kpi { background: var(--card, #fff); border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sup-kpi-tit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #4a5a54; }
.sup-kpi-val { font-size: 22px; font-weight: 800; margin: 4px 0; color: #14221d; }
.sup-kpi-sub { font-size: 12px; color: #5d6b66; }
.sup-grafico { width: 100%; height: auto; display: block; }
.sup-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.sup-tabela th, .sup-tabela td { padding: 6px 8px; border-bottom: 1px solid #e3e9e6; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .sup-tabela thead { display: none; }
  .sup-tabela tr { display: block; border: 1px solid #e3e9e6; border-radius: 8px; margin-bottom: 8px; padding: 4px 0; }
  .sup-tabela td { display: flex; gap: 8px; border: 0; }
  .sup-tabela td::before { content: attr(data-rot); font-weight: 700; min-width: 42%; color: #4a5a54; }
}
@media (min-width: 761px) {
  .sup-tabela td, .sup-tabela th { white-space: nowrap; }
  .sup-tabela td:last-child, .sup-tabela th:last-child { white-space: normal; width: 45%; }
}

/* ---------- Apuração PRODIST ---------- */
.nuc-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.nuc-grade label { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; color: #4a5a54; gap: 4px; }
.nuc-grade input, .nuc-pad input { width: 100%; max-width: 160px; }
.nuc-pad { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; }

/* ---------- Histórico do consumidor (ressarcimento de danos elétricos) ---------- */
.res-ident { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; background: #e8f3ec; border-left: 4px solid var(--verde, #0b6e4f); border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
.res-ident .rot { font-size: 11px; color: #5d6b66; text-transform: uppercase; letter-spacing: .3px; }
.res-ident > div { min-width: 0; overflow-wrap: anywhere; }
.res-kpis { margin: 10px 0 12px; }
.res-topo-aba { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px 0; }
.res-topo-aba > b { margin-right: auto; color: var(--verde, #0b6e4f); }
.res-tab { table-layout: fixed; width: 100%; }
.res-tab td, .res-tab th { overflow-wrap: anywhere; white-space: normal; vertical-align: top; }
.res-tab .selo { white-space: normal; text-align: left; line-height: 1.3; }
.res-texto { font-size: 12px; color: #33433d; margin-top: 4px; background: #f6faf8; border-radius: 4px; padding: 4px 6px; }
.res-mesmo { margin-top: 4px; font-size: 12px; color: #8a5a00; }
tr.res-desl td { opacity: .45; }
.res-off { opacity: .5; }
@media (max-width: 760px) { .res-busca { grid-template-columns: 1fr; } .res-tab { table-layout: auto; } }
.res-cand td, .res-cand th { vertical-align: top; }
.res-cand td.nowrap, .res-cand th.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .res-cand td.nowrap, .res-cand th.nowrap { white-space: normal; overflow-wrap: anywhere; } }

/* ---------- Verificação dos cálculos ---------- */
.ver-grade { margin: 10px 0 14px; border: 1px solid #dfe8e3; border-radius: 8px; overflow: hidden; }
.ver-cab, .ver-lin { display: grid; grid-template-columns: minmax(150px, 2.4fr) repeat(auto-fit, minmax(26px, 1fr)); align-items: stretch; }
.ver-cab { background: var(--verde, #0b6e4f); color: #fff; font-size: 11px; font-weight: 600; }
.ver-cab > div, .ver-lin > div { padding: 5px 4px; text-align: center; min-width: 0; }
.ver-cab > div:first-child, .ver-tit { text-align: left !important; padding-left: 10px !important; }
.ver-lin:nth-child(even) { background: #f7fbf9; }
.ver-tit { font-size: 12px; overflow-wrap: anywhere; }
.ver-cel { font-weight: 700; font-size: 13px; cursor: default; }
.ver-cel.ok { color: #0b6e4f; } .ver-cel.alerta { color: #8a5a00; background: #fff4cc; } .ver-cel.erro { color: #fff; background: #b3261e; } .ver-cel.nd { color: #b9c6c0; }
.ver-geral { margin: 6px 0; font-size: 13px; }
.ver-formula { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; background: #e8f3ec; border-left: 4px solid var(--verde, #0b6e4f); border-radius: 6px; padding: 10px 14px; margin: 10px 0; }
.ver-formula .rot { font-size: 11px; color: #5d6b66; text-transform: uppercase; }
.ver-formula b { font-size: 15px; overflow-wrap: anywhere; }
.ver-tab { table-layout: fixed; width: 100%; } .ver-tab td, .ver-tab th { overflow-wrap: anywhere; white-space: normal; vertical-align: top; }
.ver-sub { color: var(--verde, #0b6e4f); margin: 18px 0 6px; font-size: 15px; }
@media (max-width: 760px) { .ver-cab, .ver-lin { grid-template-columns: minmax(110px, 1.6fr) repeat(auto-fit, minmax(20px, 1fr)); } .ver-cel { font-size: 11px; } .ver-tab { table-layout: auto; } }

/* ---------- Parecer técnico de ressarcimento ---------- */
.par-caso { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 6px 18px; margin-bottom: 8px; }
.par-linha { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px dashed #dfe8e3; padding: 3px 0; }
.par-eq { display: grid; grid-template-columns: 2fr 1.2fr 1.4fr 1.6fr auto auto; gap: 8px 12px; align-items: end; background: #f7fbf9; border: 1px solid #dfe8e3; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.par-res { margin-top: 14px; }
.par-conc { border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; border-left: 6px solid #8a5a00; background: #fff7d6; }
.par-conc.verde { border-color: #0b6e4f; background: #e8f3ec; } .par-conc.vermelho { border-color: #b3261e; background: #fbe9e7; }
.par-conc .rot { font-size: 11px; color: #5d6b66; text-transform: uppercase; } .par-conc b { font-size: 20px; }
.par-eqres { border: 1px solid #dfe8e3; border-radius: 6px; padding: 8px 12px; margin: 8px 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .par-eq { grid-template-columns: 1fr 1fr; } .par-caso { grid-template-columns: 1fr; } }
.notus-av { margin: 8px 0; } .notus-av summary { cursor: pointer; color: var(--verde, #0b6e4f); font-weight: 600; margin-bottom: 6px; }
