.evolucion-historica-container {
  font-family: Arial, sans-serif;
  padding: 10px;
}

.evolucion-historica-container .table-container {
  width: fit-content;
  overflow-x: auto;
  margin: 0 auto 20px;
  border: 6px solid black;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.435);
  max-height: 410px; 
  overflow-y: auto;
}

.evolucion-historica-container table {
  width: auto;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
}

.evolucion-historica-container th,
.evolucion-historica-container td {
  padding: 4px 10px;
  text-align: center;
}
.evolucion-historica-container table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: black;
  color: #5CE3DE;
  border: none;
}
/* CABECERA – separadores verticales */
.evolucion-historica-container thead th:first-child {
  box-shadow: inset -0.8px 0 0 white;
}

.evolucion-historica-container thead th:not(:first-child):not(:last-child) {
  box-shadow:
    inset 0.8px 0 0 white,
    inset -0.8px 0 0 white;
}

.evolucion-historica-container thead th:last-child {
  box-shadow:
    inset 0.8px 0 0 white,
    inset 0 -1px 0 white;
}
.evolucion-historica-container tbody td {
  border: 1.5px solid black;
}
.evolucion-historica-container tbody td:last-child {
  border: none;
  position: relative;
  box-shadow: inset 0 -1px 0 white;
}
.evolucion-historica-container tbody tr:first-child td:last-child {
  box-shadow:
    inset 0 1px 0 white,
    inset 0 -1px 0 white;
}
.evolucion-historica-container tbody tr:not(:last-child) td:last-child {
  box-shadow: inset 0 -1px 0 white;
}
.evolucion-historica-container tbody tr:last-child td:last-child {
  box-shadow: inset 0 -1px 0 white;
}
.evolucion-historica-container tbody a {
  color: black;
  text-decoration: underline;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.3s ease, color 0.2s ease;
}

.evolucion-historica-container .action-btn {
  padding: 3px 6px;
  margin: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.evolucion-historica-container .delete-btn,
.evolucion-historica-container .edit-btn {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: red;
  border: none;
  cursor: pointer;
  font-weight: bold;
  background-color: transparent;
}
.evolucion-historica-container .edit-btn { color: #5CE3DE; }
.evolucion-historica-container .delete-btn:hover,
.evolucion-historica-container .edit-btn:hover { transform: scale(1.4); }

.evolucion-historica-container .boton-agregar-EH {
    display: flex;         
    gap: 15px;              
    align-items: center;    
    justify-content: center;
}

.evolucion-historica-container .boton-agregar-EH button {
  background-color: #5CE3DE;
  color: black;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
}

.evolucion-historica-container .boton-agregar-EH button:hover {
  color: white;
  background-color: #11c4be;
}

.evolucion-historica-container .modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 100px;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.evolucion-historica-container .modal-contenido {
  position: relative;
  background-color: #fff;
  margin: 50px auto;
  padding: 15px;
  border-radius: 10px;
  max-width: 350px;
  max-height: 350px;
  width: 90%;
  text-align: center;
}

.evolucion-historica-container .cerrar {
  position: absolute;
  top: 0.5px; right: 5px;
  color: black;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.evolucion-historica-container .cerrar:hover { color: red; transform: scale(1.2); transition: all 0.2s ease; }

.evolucion-historica-container .formulario .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

/* Fila fecha ocupa todo el ancho */
.evolucion-historica-container .formulario .form-row.fecha-row {
  width: 250px;
  position: relative; /* necesario para el icono */
}

/* Fila BP Bruta y BP Neta lado a lado */
.evolucion-historica-container .formulario .form-row.bp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
  width: 84%;
}

.evolucion-historica-container .formulario .form-row.bp-row input {
  flex: 1;
  min-width: 100px;
  height: 30px;
}

.evolucion-historica-container .formulario input {
  border: 1px solid black;
  border-radius: 5px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
  height: 30px;
}

.evolucion-historica-container .formulario input:hover {
  border-color: #5CE3DE;
}

.evolucion-historica-container .formulario input.filled {
  background-color: #e0faf9;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: black;
}

.evolucion-historica-container .botones-modal {
  margin-top: 25px;
  width: 250px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
/* Solo B/P Neta del modal Añadir */
#modalFormularioEH #bpnetoEH {
    max-width: 125px;      
}
#modalFiltroEH .form-row.fecha-row {
    width: 250px;
}
.evolucion-historica-container .botones-modal button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 10px;
  font-weight: normal;
  height: 30px;
  font-size: 14px;
  border-radius: 5px;
  background-color: #5CE3DE;
  color: black;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
  cursor: pointer;
}

.evolucion-historica-container .botones-modal button:hover {
  opacity: 0.85; 
  color: white;
  background-color: #11c4be;
}

/* DATE PICKER */
.flatpickr-input {
  border: 1px solid black;
  border-radius: 4px;
  text-align: center;
  height: 30px;
  font-size: 14px;
  width: auto !important;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
}
.flatpickr-input:hover { border-color: #5CE3DE; }
.flatpickr-calendar { font-family: Arial, sans-serif; border: 4px solid #5CE3DE; border-radius: 6px; box-shadow: none !important; outline: none !important; width: auto !important;}
.flatpickr-months .flatpickr-month { background-color: #5CE3DE; color: black; }
.flatpickr-weekdays { background-color: #e0faf9 !important; }
.flatpickr-day:hover { background-color: #e0faf9 !important; border-color: #5CE3DE !important; }
.flatpickr-day.selected { background-color: #5CE3DE !important; color: black !important; border: none; }
.flatpickr-day.today { border-color: #5CE3DE !important; color: black !important; }
.flatpickr-current-month .numInputWrapper {
    pointer-events: all !important;
}
.flatpickr-day.startRange { background: #e0faf9 !important; color: #000 !important; border: 1px solid #5CE3DE !important; border-top-left-radius: 50% !important; border-bottom-left-radius: 50% !important; border-bottom-right-radius: 0 !important; box-shadow: none !important; z-index: 2 !important; }
.flatpickr-day.endRange { background: #e0faf9 !important; color: #000 !important; border: 1px solid #5CE3DE !important; border-top-right-radius: 50% !important; border-bottom-right-radius: 50% !important; border-bottom-left-radius: 0 !important; box-shadow: none !important; z-index: 2 !important; }
.flatpickr-day.inRange { background: #e0faf9 !important; color: #000 !important; border: none !important; box-shadow: none !important; z-index: 1 !important; }
.flatpickr-current-month .numInputWrapper input,
.flatpickr-current-month .numInputWrapper span {
    background-color: #5CE3DE !important;
    font-weight: bold !important;
}
.flatpickr-current-month span:hover,
.flatpickr-monthDropdown-months:hover {
    background-color: #5CE3DE !important;
    color: black !important;
    cursor: default !important;
}

/* Input de fecha */
.evolucion-historica-container .date-input {
  width: 100%;
  text-align: center;
}

/* Icono del calendario */
.evolucion-historica-container .date-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #5CE3DE;
  z-index: 2;
}

.evolucion-historica-container .date-icon svg {
  stroke: currentColor; /* usa el color del CSS */
  width: 100%;  
  height: 100%;
}

/* Modal confirmación */
#modalConfirmarEliminarEH {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
#modalConfirmarEliminarEH .modal-contenidoEH {
    background: white;
    margin: 15% auto;
    padding: 20px;
    width: 350px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}
#modalConfirmarEliminarEH h2 {
    font-size: 25px;
    margin-bottom: 10px;
    line-height: 1.2;
}
#modalConfirmarEliminarEH p {
    font-size: 15px;
    margin-top: 10px;
    line-height: 1.2;
}
/* Botones */
#modalConfirmarEliminarEH .botones-modal {
    width: 100%;
    display: flex;
    justify-content: center; 
    gap: 12px;
    margin-top: -15px;
}
#modalConfirmarEliminarEH .btn-modal {
    border-radius: 6px;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-weight: normal;
}
#modalConfirmarEliminarEH .btn-modal.cancelar {
    background-color: #ddd;
    color: black;
    text-align: center;
    justify-content: center;
    align-items: center;
}
#modalConfirmarEliminarEH .btn-modal.eliminar {
    background-color: #5CE3DE;
    color: black;
    text-align: center;
    justify-content: center;
    align-items: center;
}
#modalConfirmarEliminarEH .btn-modal.cancelar:hover {
    background-color: #bbbbbbff;
    color: white;
}
#modalConfirmarEliminarEH .btn-modal.eliminar:hover {
    background-color: #11c4be;
    color: white;
}

  /* Ajustes para 3 columnas en filtro (Bruta, Neta, Resultado) */
#modalFiltroEH .form-row.bp-row {
    width: 100%;
    gap: 8px;
}

#modalFiltroEH .form-row.bp-row input {
    flex: 1;
    min-width: 80px;
    height: 30px;
}  

.custom-selectEH {
    position: relative;          
    flex: 1;
    min-width: 110px;
    height: 30px;
}

.custom-selectEH__selected {
    width: 100%;
    height: 30px;
    cursor: pointer;             
    border: 1px solid black;
    border-radius: 5px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 5px 5px rgba(0,0,0,0.435);
    color: #666;
    font-size: 14px;
    font-family: Arial, sans-serif;
    font-weight: 400;
    text-align: center;
}
.custom-selectEH__selected:hover {
    border-color: #5CE3DE;   
}

.custom-selectEH__options {
    position: absolute;   
    font-size: 14px;
    cursor: pointer;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #5CE3DE;
    border-radius: 6px;
    display: none;                
    z-index: 999999;  
    overflow: hidden;
}
.custom-selectEH__option:hover {
    background-color: #5CE3DE;
}
.custom-selectEH__selected.filled {
    background-color: #e0faf9;
    color: black;
    font-weight: bold;
}
/* MOSTRAR SOLO CUANDO ESTÁ OPEN */
.custom-selectEH.open .custom-selectEH__options {
    display: block;
}
#mostrarGraficaEHBtn {
    background: transparent; 
    font-size: 40px !important;
    border: none;            
    padding: 0;           
    cursor: pointer;
    box-shadow: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#mostrarGraficaEHBtn:hover {
    transform: scale(1.2);
}


#graficaEH {
  position: relative;
  background: #fff;
  width: 100%;
  height: 100%;
}
.grafica-wrapper {
    position: relative;
    width: 100%;
    height: 570px;
}
.grafica-watermark {
    position: absolute;
    background-color: white;
    top: 91.5%;
    left: 6%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 10;
    pointer-events: none;

}
.modalEH {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-contenidoEH {
  background-color: #fff;
  margin: 5% auto;
  padding: 15px;
  border-radius: 10px;
  max-width: 1300px;
  text-align: center;
  position: relative;
  overflow: visible;
}

.cerrarEH {
  position: absolute;
  z-index: 10001;
  top: 3px;
  right: 15px;
  font-weight: bold;
  font-size: 24px;
  cursor: pointer;
}
.cerrarEH:hover {
  transform: scale(1.2);
  color: red;
  transition: all 0.2s ease;
}
.timeframe-selector {
  position: absolute;  
  top: 10px;            
  left: 50%;           
  transform: translateX(-50%);
  display: flex;        
  gap: 8px;             
  z-index: 10;  
  align-items: center;
}

.timeframe-selector button {
  padding: 8px;
  width: 25px;
  height: 25px;
  border: 1px solid black;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #5CE3DE;
  background: white;
  color: black;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
}
.timeframe-selector button:hover {
  background: #11c4be; 
}    
.timeframe-selector button.active {
  background: #5CE3DE;
  color: black;
  box-shadow: 0 5px 5px rgba(0,0,0,0.435);
}
/* Custom select SMA */
.sma-select {
    width: 120px;
    margin-left: 300px;
    z-index: 10;
    top: -5px;
}
.sma-select .custom-selectEH__selected {
    height: 25px;
    border: 2px solid #5CE3DE;
    transition: all 0.2s ease;
}
.sma-select .custom-selectEH__selected:hover {
    background: #11c4be;
    box-shadow: none;
    color: white;
}
.sma-select .custom-selectEH__options {
    border: 1px solid #5CE3DE;
}
.sma-select .custom-selectEH__option {
    display: flex;
    align-items: center;     
    justify-content: center; 
    height: 30px;
    text-align: center;
}

.sma-select .custom-selectEH__option.active {
    background-color: #e0faf9;
    font-weight: bold;
}

.sma-select .custom-selectEH__option::before {
    content: "✔";
    margin-right: 6px;
    opacity: 0;
}

.sma-select .custom-selectEH__option.active::before {
    opacity: 1;
}
#exportarCSV_EH,
#importarCSV_EH {
    background: transparent; 
    font-size: 40px;
    border: none;            
    padding: 0;           
    cursor: pointer;
    box-shadow: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
#exportarCSV_EH:hover,
#importarCSV_EH:hover {
    transform: scale(1.2);
}