.ecm-page{color:#19334d}.ecm-head{background:linear-gradient(120deg,#0b1b36,#183853);border-radius:13px;padding:19px 24px;color:#fff;margin-bottom:14px}.ecm-head h2{color:#fff;margin:0 0 5px;font-size:21px}.ecm-head p{margin:0;color:#c9d7e4;font-size:12px}.ecm-controls{display:flex;flex-wrap:wrap;gap:13px;align-items:end;margin:12px 0}.ecm-controls label{display:grid;gap:5px;color:#617489;font-size:11px;font-weight:700}.ecm-controls select,.ecm-controls input{min-width:190px;max-width:250px;border:1px solid #cfdce8;border-radius:8px;background:#fff;padding:9px 11px;color:#18324d}.ecm-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:13px 0}.ecm-kpi{background:#fff;border:1px solid #dce5ee;border-top:3px solid #118777;border-radius:10px;padding:13px 16px}.ecm-kpi span{display:block;font-size:10px;color:#64748b;font-weight:700}.ecm-kpi b{display:block;font-size:23px;color:#0b1b36;margin:5px 0}.ecm-kpi small{color:#72849a;font-size:10px}.ecm-grid{display:grid;grid-template-columns:1fr 1.5fr;gap:14px}.ecm-panel{border:1px solid #dce5ee;border-radius:12px;background:#fff;padding:15px;min-width:0}.ecm-panel h3{margin:0 0 12px;color:#18324d;font-size:14px}.ecm-table{width:100%;border-collapse:collapse;font-size:11px}.ecm-table th{background:#176a90;color:#fff;text-align:left;padding:8px 6px;white-space:nowrap}.ecm-table td{padding:7px 6px;border-bottom:1px solid #e9eff4}.ecm-table td:not(:first-child){text-align:right}.ecm-chart{display:grid;gap:12px}.ecm-chart-row{display:grid;grid-template-columns:minmax(120px,165px) 1fr;gap:10px;align-items:center}.ecm-chart-name{font-size:11px;color:#43576a;overflow-wrap:anywhere}.ecm-chart-bars{display:grid;gap:4px}.ecm-bar-track{height:15px;background:#edf2f6;border-radius:4px;position:relative;overflow:visible}.ecm-bar{height:100%;border-radius:4px;background:#176a90}.ecm-bar.real{background:#eb7a38}.ecm-bar-label{position:absolute;top:-1px;font-size:10px;font-weight:700;color:#1b3045;white-space:nowrap}.ecm-legend{display:flex;gap:18px;font-size:11px;margin-bottom:13px}.ecm-dot{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;background:#176a90}.ecm-dot.real{background:#eb7a38}.ecm-note{background:#eff5f8;border-left:3px solid #118777;padding:10px 13px;font-size:11px;color:#526779;margin:13px 0}.ecm-import-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ecm-import-box{border:1px solid #dce5ee;border-radius:12px;padding:18px;background:#fff}.ecm-import-box input{width:100%;margin:14px 0}.ecm-import-box button{background:#118777;border:0;border-radius:8px;padding:10px 15px;color:white;font-weight:700;cursor:pointer}.ecm-import-box button:disabled{opacity:.4;cursor:not-allowed}.ecm-meta{font-size:11px;color:#6b7e92}.ecm-overflow{overflow-x:auto}.ecm-table .ecm-strong{font-weight:800;color:#0d786a}.ecm-tag{display:inline-block;border-radius:7px;background:#e6f3ef;color:#117967;padding:3px 7px;font-size:10px}.ecm-status{font-size:12px;padding:10px;border-radius:8px;background:#edf4f8;margin:10px 0}.ecm-status.err{color:#9e2531;background:#fff0f0}.ecm-status.ok{color:#08735e;background:#e9f7f1}@media(max-width:1100px){.ecm-grid,.ecm-import-grid{grid-template-columns:1fr}.ecm-kpis{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.ecm-kpis{grid-template-columns:1fr}.ecm-chart-row{grid-template-columns:100px 1fr}}

/* V395 — etiquetas legíveis fora das barras */
.ecm-chart-bar-line{display:grid;grid-template-columns:minmax(0,1fr) 55px;align-items:center;gap:8px;min-width:0}
.ecm-chart-bar-line .ecm-bar-track{overflow:hidden;height:15px}
.ecm-value-label{font-size:11px;font-weight:800;color:#19334d;background:#fff;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ecm-report-actions{display:flex;align-items:center;gap:14px;margin:5px 0 12px}
.ecm-report-actions button,.ecm-report-print{background:#176a90;border:0;color:#fff;border-radius:7px;padding:9px 15px;cursor:pointer;font-weight:700}
.ecm-report-actions small{color:#60778b;font-size:11px}
.ecm-report-modal{position:fixed;inset:0;z-index:999999;background:rgba(8,20,38,.8);overflow:auto;padding:18px}
.ecm-report-shell{max-width:1480px;margin:0 auto;background:#f0f4f7;border-radius:10px;min-height:90vh;padding:18px}
.ecm-report-top{display:flex;align-items:center;justify-content:space-between;background:#102b46;color:white;padding:12px 17px;border-radius:6px}
.ecm-report-top button{background:#e5edf4;border:0;border-radius:5px;padding:7px 12px;cursor:pointer}
.ecm-report-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:end;padding:14px 0}
.ecm-report-filters label{font-size:11px;font-weight:700;color:#2b4861;display:grid;gap:5px}
.ecm-report-filters select,.ecm-report-filters input{border:1px solid #bfcfdd;border-radius:5px;padding:8px;background:white;color:#123}
.ecm-report-filters .ecm-report-check{display:flex;align-items:center;gap:7px}
.ecm-report-paper{background:#fff;padding:25px;min-height:600px;color:#1b3045}
.ecm-print-head{display:flex;gap:22px;align-items:center;border-bottom:3px solid #176a90;padding-bottom:12px;margin-bottom:16px}
.ecm-print-head img{max-width:155px;max-height:70px;object-fit:contain}
.ecm-print-head h1{font-size:17px;color:#102b46;margin:0 0 6px}
.ecm-print-head h2{font-size:13px;margin:0 0 6px;color:#176a90}
.ecm-print-head p{font-size:11px;margin:0}
.ecm-report-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0 24px}
.ecm-report-summary>div{background:#eaf2f7;border-top:3px solid #118777;padding:10px}
.ecm-report-summary span{display:block;font-size:10px;color:#547088}
.ecm-report-summary b{font-size:20px;color:#102b46}
.ecm-report-paper h3{font-size:12px;color:#102b46;margin:22px 0 8px}
.ecm-report-table{width:100%;border-collapse:collapse;font-size:10px}
.ecm-report-table th{background:#176a90;color:#fff;text-align:left;padding:7px}
.ecm-report-table td{padding:5px 7px;border-bottom:1px solid #dce5ee;overflow-wrap:anywhere}
.ecm-report-table tr:nth-child(even) td{background:#f4f7fa}
.ecm-report-foot{margin-top:18px;border-top:1px solid #aebdcc;padding-top:8px;font-size:9px;color:#546779}
@media print{@page{size:A4 landscape;margin:10mm}body *{visibility:hidden!important}.ecm-report-modal,.ecm-report-modal *{visibility:visible!important}.ecm-report-modal{position:absolute!important;inset:0!important;padding:0!important;overflow:visible!important;background:white!important}.ecm-report-shell{padding:0!important;min-height:0!important;background:white!important;max-width:none!important}.ecm-report-top,.ecm-report-filters{display:none!important}.ecm-report-paper{padding:0!important;min-height:0!important}.ecm-report-table{font-size:8px}.ecm-report-table thead{display:table-header-group}.ecm-report-table tr{break-inside:avoid}.ecm-report-summary>div{-webkit-print-color-adjust:exact;print-color-adjust:exact}.ecm-report-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* V396 — relatório executivo de gráficos, com detalhamento opcional */
.ecm-report-graphs{display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:start;margin:12px 0}
.ecm-report-graph{border:1px solid #d8e3eb;border-radius:6px;padding:11px;min-width:0;break-inside:avoid;page-break-inside:avoid}
.ecm-report-graph h3{margin:0 0 8px!important;font-size:12px!important}
.ecm-report-legend{display:flex;gap:15px;font-size:9px;margin:0 0 8px}
.ecm-report-legend span:first-child{color:#14668a}.ecm-report-legend span:last-child{color:#eb7634}
.ecm-report-graph-row{display:grid;grid-template-columns:31% minmax(0,1fr) 54px;gap:7px;align-items:center;margin-bottom:8px;break-inside:avoid}
.ecm-report-graph-name{font-size:9px;overflow-wrap:anywhere}
.ecm-report-graph-bars{display:grid;gap:3px}
.ecm-report-graph-track{height:9px;background:#edf2f6;position:relative;border-radius:2px;overflow:hidden}
.ecm-report-graph-fill{display:block;height:100%;border-radius:2px}
.ecm-report-graph-fill.planned{background:#14668a}.ecm-report-graph-fill.actual{background:#eb7634}
.ecm-report-graph-numbers{display:grid;gap:2px;font-size:9px;font-weight:700;text-align:right;color:#16334c}
@media print{.ecm-report-graphs{grid-template-columns:1fr 1fr!important}.ecm-report-graph-fill{-webkit-print-color-adjust:exact;print-color-adjust:exact}.ecm-report-graph{break-inside:avoid}.ecm-report-summary>div{-webkit-print-color-adjust:exact;print-color-adjust:exact}}


/* V400 — quadros de avanço por tipo e disciplina: colunas alinhadas, valores centralizados e grade visível */
.ecm-panel .ecm-overflow{width:100%;overflow-x:auto}
.ecm-panel .ecm-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  border:1px solid #cddbe6;
  font-variant-numeric:tabular-nums;
}
.ecm-panel .ecm-table th,
.ecm-panel .ecm-table td{
  box-sizing:border-box;
  border:1px solid #d7e2eb;
  padding:9px 8px;
  vertical-align:middle;
  text-align:center;
}
.ecm-panel .ecm-table th{
  background:#eaf1f7;
  color:#18324d;
  font-size:10px;
  font-weight:800;
  white-space:normal;
  line-height:1.25;
}
.ecm-panel .ecm-table td:not(:first-child){text-align:center}
.ecm-panel .ecm-table th:first-child,
.ecm-panel .ecm-table td:first-child{
  width:34%;
  text-align:left;
  overflow-wrap:break-word;
}
.ecm-panel .ecm-table tbody tr:nth-child(even){background:#f8fbfd}
.ecm-panel .ecm-table tbody tr:hover{background:#edf6fa}
@media(max-width:750px){
  .ecm-panel .ecm-table{min-width:560px}
}

/* V401: Quadros de avanço por tipo e disciplina no relatório */
.ecm-report-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;margin:14px 0}
.ecm-report-summary-section{min-width:0;border:1px solid #d8e3eb;border-radius:6px;padding:9px;break-inside:avoid}
.ecm-report-summary-section h3{font-size:11px!important;color:#14304b;margin:0 0 7px!important}
.ecm-report-summary-table{border-collapse:collapse;width:100%;table-layout:fixed;font-variant-numeric:tabular-nums}
.ecm-report-summary-table th,.ecm-report-summary-table td{border:1px solid #d5e1eb;padding:5px 4px;text-align:center;font-size:9px;line-height:1.3}
.ecm-report-summary-table th{background:#edf3f8;color:#14304b;font-size:8px;overflow-wrap:anywhere}
.ecm-report-summary-table th:first-child,.ecm-report-summary-table td:first-child{text-align:left;width:32%;overflow-wrap:anywhere}
.ecm-report-summary-table tbody tr:nth-child(even){background:#f7fafc}
.ecm-report-summary-table td:last-child{font-weight:700;color:#087b74}
@media print{.ecm-report-summary-grid{grid-template-columns:1fr 1fr!important}.ecm-report-summary-section{break-inside:avoid;page-break-inside:avoid}.ecm-report-summary-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media(max-width:760px){.ecm-report-summary-grid{grid-template-columns:1fr}}

/* V402 — limitar rigidamente as tabelas à largura da página do relatório */
.ecm-report-paper,.ecm-report-summary-grid,.ecm-report-summary-section{box-sizing:border-box;min-width:0;max-width:100%}
.ecm-report-summary-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;width:100%!important;gap:12px!important;align-items:start}
.ecm-report-summary-section{width:100%!important;overflow:hidden!important;padding:8px!important}
.ecm-report-summary-section .ecm-report-summary-table{
 display:table!important;position:static!important;float:none!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 table-layout:fixed!important;border-collapse:collapse!important;margin:0!important
}
.ecm-report-summary-table tr{display:table-row!important}
.ecm-report-summary-table th,.ecm-report-summary-table td{
 display:table-cell!important;box-sizing:border-box!important;position:static!important;
 min-width:0!important;max-width:none!important;width:auto!important;
 padding:5px 3px!important;text-align:center!important;
 overflow-wrap:anywhere!important;word-break:normal!important;white-space:normal!important;
 font-size:9px!important;line-height:1.3!important
}
.ecm-report-summary-table th:first-child,.ecm-report-summary-table td:first-child{
 width:38%!important;text-align:left!important
}
.ecm-report-summary-table th:not(:first-child),.ecm-report-summary-table td:not(:first-child){width:auto!important}
@media print{
 .ecm-report-paper{width:100%!important;overflow:visible!important}
 .ecm-report-summary-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 .ecm-report-summary-section{overflow:hidden!important}
}
@media(max-width:700px){
 .ecm-report-summary-grid{grid-template-columns:minmax(0,1fr)!important}
}

/* V403: uma única origem ativa para Engenharia — LD */
.ecm-import-ld-only{display:grid!important;grid-template-columns:minmax(0,1fr)!important;max-width:820px}

/* V404: Engenharia LD — cabeçalho único, sem barra de título duplicada */
body:has(.ecm-page:not(.hidden)) .topbar #moduleSubtitle{display:block!important;color:#cbd5e1!important;margin-top:3px!important}
body:has(.ecm-page:not(.hidden)) .topbar #pageTitle{font-size:clamp(16px,1.65vw,23px)!important;line-height:1.3!important;letter-spacing:0!important}
#engenhariaLD .ecm-head,#engenhariaImportar .ecm-head,#engenhariaHistorico .ecm-head{display:none!important}
#engenhariaLD .ecm-controls,#engenhariaImportar .ecm-controls,#engenhariaHistorico .ecm-controls{margin-top:4px!important}

/* V410 — Engenharia ECM: identidade visual alinhada ao Pré-FID.
   Planejado = cinza-azulado; realizado = verde-petróleo. */
#engenhariaLD,#engenhariaImportar,#engenhariaHistorico{--ecm-planned:#94a3b8;--ecm-actual:#0f8278;--ecm-accent:#0f8278}
.ecm-page .ecm-kpi,.ecm-page .ecm-report-kpi{border-top-color:#0f8278!important}
.ecm-page .ecm-bar:not(.real),.ecm-report-paper .ecm-bar:not(.real){background:#94a3b8!important}
.ecm-page .ecm-bar.real,.ecm-report-paper .ecm-bar.real{background:#0f8278!important}
.ecm-page .ecm-dot:not(.real),.ecm-report-paper .ecm-dot:not(.real){background:#94a3b8!important}
.ecm-page .ecm-dot.real,.ecm-report-paper .ecm-dot.real{background:#0f8278!important}
.ecm-page .ecm-table th{background:#f2f5f8!important;color:#0b1b36!important;border:1px solid #d5e1eb!important}
.ecm-page .ecm-table td{border:1px solid #d5e1eb!important}
.ecm-page .ecm-table .ecm-strong,.ecm-report-paper .ecm-report-summary-table td:last-child{color:#0f8278!important}
.ecm-page .ecm-report-actions button,.ecm-page .ecm-report-print,.ecm-page .ecm-import-box button{background:#0f8278!important}
.ecm-page .ecm-note{border-left-color:#0f8278!important}
.ecm-page .ecm-tag{background:#e6f3f1!important;color:#0f8278!important}
.ecm-page .ecm-chart-bar-line .ecm-value-label{color:#19334d!important}
.ecm-report-paper .ecm-report-summary-table th{background:#f2f5f8!important;color:#0b1b36!important}
@media print{.ecm-report-paper .ecm-bar:not(.real){background:#94a3b8!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.ecm-report-paper .ecm-bar.real{background:#0f8278!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* V411: aplicar identidade Pré-FID também ao relatório, incluindo visualização e impressão */
.ecm-report-paper .ecm-report-graph-fill.planned{background:#94a3b8!important}
.ecm-report-paper .ecm-report-graph-fill.actual{background:#0f8278!important}
.ecm-report-paper .ecm-report-legend span:first-child{color:#64748b!important}
.ecm-report-paper .ecm-report-legend span:last-child{color:#0f8278!important}
.ecm-report-paper .ecm-print-head{border-bottom-color:#0f8278!important}
.ecm-report-paper .ecm-print-head h2{color:#0f8278!important}
.ecm-report-paper .ecm-report-summary>div{border-top-color:#0f8278!important;background:#edf3f5!important}
.ecm-report-paper .ecm-report-summary-table td:last-child{color:#0f8278!important}
.ecm-report-paper .ecm-report-table th{background:#edf3f5!important;color:#17344d!important;border:1px solid #d5e1eb!important}
.ecm-report-modal .ecm-report-print{background:#0f8278!important;color:#fff!important}
@media print{
 .ecm-report-paper .ecm-report-graph-fill.planned{background:#94a3b8!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .ecm-report-paper .ecm-report-graph-fill.actual{background:#0f8278!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .ecm-report-paper .ecm-report-summary>div{background:#edf3f5!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* V412 — Engenharia LD: tabelas fluidas, sem rolagem horizontal no notebook.
   Usa largura do próprio painel (container queries), não apenas viewport. */
.ecm-page .ecm-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}
.ecm-page .ecm-panel{min-width:0;container-type:inline-size}
.ecm-page .ecm-panel .ecm-overflow{width:100%;max-width:100%;overflow-x:visible!important}
.ecm-page .ecm-panel .ecm-table{width:100%!important;min-width:0!important;max-width:100%;table-layout:fixed!important}
.ecm-page .ecm-panel .ecm-table th,.ecm-page .ecm-panel .ecm-table td{min-width:0!important;max-width:none;padding:8px 3px;font-size:clamp(9px,.75vw,11px);white-space:normal!important;overflow-wrap:anywhere;word-break:normal;line-height:1.35}
.ecm-page .ecm-panel .ecm-table th:first-child,.ecm-page .ecm-panel .ecm-table td:first-child{width:34%}
@container (max-width:610px){
 .ecm-panel .ecm-table th,.ecm-panel .ecm-table td{padding:7px 2px!important;font-size:10px!important}
 .ecm-panel .ecm-table th:first-child,.ecm-panel .ecm-table td:first-child{width:30%!important}
}
/* Empilha os painéis antes de suas seis colunas ficarem comprimidas. */
@media (max-width:1450px){.ecm-page .ecm-grid{grid-template-columns:minmax(0,1fr)!important}}
@media (max-width:700px){.ecm-page .ecm-panel{padding:10px}.ecm-page .ecm-panel .ecm-table th,.ecm-page .ecm-panel .ecm-table td{font-size:9px!important;padding:6px 2px!important}.ecm-page .ecm-panel .ecm-table th:first-child,.ecm-page .ecm-panel .ecm-table td:first-child{width:29%!important}}
