/* .nsFull de la plataforma fuerza width:97.5% y deja un hueco a la derecha: en Coste se usa ancho completo */
.costeFilaCompleta { position: absolute; height: 100%; width: 100%; margin: 0; }
.costeContenidoCompleto { width: 100%; }
/* Pestaña Energía > Coste (fast/js/coste.js). El modo oscuro del fast invierte colores con filter. */
.clsCosteBloque { height: 100%; overflow: auto; padding: 6px 14px 8px 14px; font-size: 13px; color: #1f2a3c; }
/* Tiles sin título (barra y KPIs): margen interior también arriba para que no queden pegados al borde */
.clsCosteBloque[data-bloque="barra"], .clsCosteBloque[data-bloque="kpis"] { padding: 12px 16px; }
.clsCosteBloque[data-bloque="barra"] { display: flex; align-items: center; }
.clsCosteBloque[data-bloque="barra"] .costeBarra { width: 100%; }
.clsCosteBloque.costeCargando { opacity: .55; transition: opacity .2s; }

.costeEsqueleto span { display: block; height: 14px; margin: 10px 0; border-radius: 6px;
  background: linear-gradient(90deg, #eef1f6 25%, #f8f9fb 50%, #eef1f6 75%); background-size: 200% 100%;
  animation: costeBrillo 1.2s infinite; }
.costeEsqueleto span:nth-child(2) { width: 80%; }
.costeEsqueleto span:nth-child(3) { width: 60%; }
@keyframes costeBrillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.costeMensaje { padding: 18px; text-align: center; color: #5b6475; }
.costeMensajeError { color: #b42318; }
.costeNota { font-size: 11px; color: #5b6475; margin-top: 8px; }
.costeEtiqueta { font-size: 11px; color: #5b6475; margin-bottom: 2px; }
.costeUnidad { color: #9aa4b5; }
.costeDerecha { text-align: right; }

/* Barra de periodo y acciones */
.costeBarra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.costeBarraPeriodo, .costeBarraAcciones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.costeMarca { display: flex; align-items: center; gap: 10px; }
.costeMarca img { height: 44px; width: auto; }
.costeMarcaTitulo { font-size: 16px; font-weight: 600; color: #1d2b4f; line-height: 1.2; }
.costeMarcaLema { font-size: 11px; color: #4a7cc0; }
.costeBarraPeriodo .form-select { width: auto; min-width: 200px; }
.costeBarraPeriodo input[type=date] { width: 140px; }
@media (max-width: 1500px) {
  .costeMarcaLema, .costeEtiqueta.costeEtiquetaPeriodo { display: none; }
  .costeMarca img { height: 36px; }
}
.costeSeparador, .costeInfoPeriodo { color: #5b6475; font-size: 12px; }
.costeBotonPdf, .costeBotonGuardar { background: #e8742a; color: #fff; border: 0; }
.costeBotonPdf:hover, .costeBotonGuardar:hover { background: #cf6220; color: #fff; }

/* KPIs */
.costeKpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.costeKpi { background: #f3f5f8; border-radius: 12px; padding: 10px 14px; }
.costeKpiPrincipal { background: #fff4ec; }
.costeKpiPrincipal .costeKpiValor { color: #e8742a; }
.costeKpiAlerta { background: #fdf0e6; box-shadow: inset 3px 0 0 #e8742a; }
.costeKpiEtiqueta { font-size: 11px; color: #5b6475; text-transform: uppercase; letter-spacing: .04em; }
.costeKpiValor { font-size: 24px; font-weight: 600; color: #1d2b4f; line-height: 1.25; }
.costeKpiDetalle { font-size: 11px; color: #5b6475; }
.costeAvisos { margin-top: 8px; font-size: 12px; color: #8a4b08; background: #fff8e6; border-radius: 8px; padding: 6px 10px; }

/* Tablas */
.costeTabla { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.costeTabla th { background: #eef1f6; color: #1d2b4f; padding: 6px 8px; font-weight: 600; position: sticky; top: 0; }
.costeTabla td { padding: 5px 8px; border-bottom: 1px solid #eef1f6; }
.costeCalculo { color: #5b6475; }
.costeFilaSubtotal td { font-weight: 600; border-top: 1px dotted #9aa4b5; }
.costeFilaTotal td { font-weight: 700; font-size: 15px; color: #1d2b4f; border-top: 2px solid #1d2b4f; }
.costeBarraUso { height: 4px; background: #eef1f6; border-radius: 2px; margin-top: 3px; }
.costeBarraUso span { display: block; height: 100%; background: #e8742a; border-radius: 2px; }
.costeAhorro { margin-top: 10px; background: #eaf5d6; color: #3d6b00; border-radius: 10px; padding: 8px 12px; }

.costeGrafico { position: relative; height: 100%; min-height: 0; }
.clsCosteBloque[data-bloque="potencia"] { display: flex; flex-direction: column; }
.costeGraficoPotencia { position: relative; flex: 1 1 auto; min-height: 160px; margin-top: 8px; }

/* Recomendaciones */
.costePuntos { padding-left: 18px; margin-bottom: 8px; }
.costePuntos li { margin-bottom: 6px; line-height: 1.4; }
.costePuntos .costePunto-aviso { color: #8a4b08; }
.costeConsejo { background: #92d050; border-radius: 14px; padding: 12px 18px; color: #14210a; }
.costeConsejoTitulo { color: #c00000; font-size: 20px; margin-bottom: 2px; }

/* Formulario de tarifa */
.costeSubtitulo { font-weight: 600; color: #e8742a; margin-top: 8px; border-bottom: 1px solid #eef1f6; }
.costePeriodosFila { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.costeErrorFormulario { color: #b42318; font-size: 12px; min-height: 16px; }
.costeHistorial { margin-top: 10px; font-size: 12px; color: #5b6475; }
