
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-size: 14px;
    font-family: 'Urbanist', Arial, sans-serif;
    padding-top: 30px !important; /* Adjust this value to match the height of your header */
    touch-action: pan-y;
    /*margin-top: 70px !important; */ /* Ajusta este valor según la altura de tu header */
}
:root {
    --color-bee: #FFE500;
    --color-gris-oscuro: #d7d7d7;
    --color-gris-claro: #e9e9e9;
    --color-casi-negro: #434343;
    --color-casi-blanco: #f8f9fa;
    --color-bg-estado-ok: #d4edda;
}

/*html, body {
    touch-action: pan-y;
}
*/
.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.min-vh-100 {
    min-height: 100vh !important;
}
.vh-70 {
    min-height: 70vh !important;
}
main.flex-fill {
    margin-bottom: 40px;
}
.flex-fill {
    flex: 1 1 auto;
}
.text-center {
    margin-top: 1px;
    margin-bottom: 1px;
    /*border: 3px solid green;*/
}
.text-left {
    margin-bottom: 2px;
    /*border: 3px solid red;*/
}

/* Estilos para el panel de opciones */
.option-panel {
    padding: 1px;
    /*margin-bottom: 10px;*/
}

input[type="text"] {
    margin-left: 5px;
    width: 230px;
}

/* Estilo para el selector de organizaciones */
select[class="form-control"] {
    margin-left: 5px;
    width: 250px; /* Ajusta el ancho según tus necesidades */
}



input[type="miemail"] {
    margin-left: 5px;
    width: 300px;
}

input[type="number"] {
    margin-left: 5px;
    width: 80px;
    text-align: right;
}

input[type="radio"] {
    margin-left: 2px;
    width: 20px;
}

text {
    width: 250px;
}

/* Estilos para los elementos del panel */
.option-label {
    display: block;
    margin-bottom: 3px;
}

.option-select {
    padding: 3px;
    width: 150px; /* Ancho del select según sea necesario */
}


.container {
    display: flex;
    flex-direction: row;
    gap: 5px;
/*    text-align: center;
*/    padding: 3px;
}

.left-column,
.right-column {
    flex: 1;
}

.button-container {
    margin-top: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px; /* Altura del contenedor */
}

button {
    font-size: 14px;
    border-radius: 6px;
    background-color: lightgray;
    display: block;
    margin-top: 2px;
    margin-inline: 8px;
}

/*Esto es para el boton azul de las páginas, para que no se comporte como un enlace*/
.btn-s.col-azul:hover {
    background-color: #2196F3;
    border-color: #2196F3;
    color: #fff;
}

.btn-s.col-verde:hover {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.btn-secundario {
    color: #ccc;
    background-color: var(--bs-gray-300);
    border-color: var(--bs-gray-300);
}

    btn-secundario:hover {
        color: #ccc;
        background-color: var(--bs-gray-600);
        border-color: var(--bs-gray-600) ;
    }

.recuadro-centrado {
    width: 40%;
    min-height: 370px;
    background: var(--bs-gray-100);
    border-radius: 18px;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/*table {
    border-collapse: collapse;
    height: 8px;*/
    /*margin: 0 auto;*/
    
    /*width: 80%;
    table-layout: auto;*/ /* Permite que la tabla ajuste automáticamente el ancho de las columnas */
/*}

th, td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

th {
    background-color: #f2f2f2;
}*/

h1,h2 {
    padding-bottom: 5px;
    margin-top: 10px;
    margin-left: 20px;
}


h4, h5 {
    padding-bottom: 3px;
    margin-top: 15px;
}
/* wwwroot/css/styles.css */


.button-group {
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px; /* Espacio interior del marco */
    border: 1px solid #ccc; /* Color y grosor del marco */
    border-radius: 10px; /* Radio de las esquinas del marco */
}

.btn {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 15px; /* Radio en las esquinas */
    cursor: pointer;
    color: var(--color-casi-negro);
    font-size: 16px;
}

.btn-s {
    padding: 5px 10px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 5px; /* Radio en las esquinas */
    cursor: pointer;
    color: #fff;
    font-size: 14px;
}


.col-verde {
    background-color: #4CAF50; /* Verde */
    text-decoration: none;
}

.col-azul {
    background-color: #2196F3; /* Azul */
    text-decoration: none;
}

.col-rojo {
    background-color: #f44336; /* Rojo */
    text-decoration: none;
}

.col-naranja {
    background-color: #ff9800; /* Naranja */
    text-decoration: none;
}

.col-purpura {
    background-color: #9c27b0; /* Púrpura */
    text-decoration: none;
}

.col-amarillo {
    background-color: #ffeb3b; /* Amarillo */
    text-decoration: none;
}

.col-celeste {
    background-color: #00bcd4; /* Celeste */
    text-decoration: none;
}

.col-rosa {
    background-color: #e91e63; /* Rosa */
    text-decoration: none;
}

.col-lima {
    background-color: #cddc39; /* Lima */
    text-decoration: none;
}

.col-cian {
    background-color: #00bcd4; /* Cian */
    text-decoration: none;
}

.col-marron {
    background-color: #795548; /* Marrón */
    text-decoration: none;
}

.col-gris {
    background-color: #9e9e9e; /* Gris */
    text-decoration: none;
}

.col-negro {
    background-color: #000000; /* Negro */
    text-decoration: none;
}

.col-blanco {
    background-color: #ffffff; /* Blanco */
    text-decoration: none;
}

.col-ambar {
    background-color: #ffc107; /* Ámbar */
    text-decoration: none;
}

.col-azul-marino {
    background-color: #3f51b5; /* Azul Marino */
    text-decoration: none;
}

.col-oliva {
    background-color: #808000; /* Oliva */
    text-decoration: none;
}

.col-violeta {
    background-color: #8a2be2; /* Violeta */
    text-decoration: none;
}

.col-magenta {
    background-color: #ff00ff; /* Magenta */
    text-decoration: none;
}

.col-turquesa {
    text-decoration: none;
    background-color: #40e0d0; /* Turquesa */
}


.error {
    border: 2px solid red;
}

.flex-fill {
    flex: 1 1 auto;
}

/* Ajusta la altura del navbar */
.navbar {
    height: 60px; /* Ajusta este valor según sea necesario */
    padding: 3px; /* Elimina el padding para reducir la altura */
    margin-bottom: 0 !important; /* Override the default margin */
    /*background: #E8E8E8; */
    background: white;
}

.navbar-light {
    background-color: #ffc107 important!;    /* Color mostaza */
}

.form-group {
    margin-left: 60px;
}
/* Ajusta el espaciado entre los controles */
.form-group.row {
    margin-bottom: 3px; /* Reduce el margen inferior */
}




#textbox-direccion {
    width: 90%;
}


/* site.css */
.full-width-form {
    margin-left: 0 !important;
    width: 100% !important;
}


.full-width-form .form-control {
    width: 100%;

}
.dropdown-icon {
    /* Estilo básico del selector */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="black" stroke="currentColor" stroke-width=".5" d="M2 3L0 0h4z"/></svg>') no-repeat right 0.75rem center/8px 10px;
    padding-right: 2rem; /* Espacio para el icono */
    margin-right: 20px;
}

.manage-nav .nav-item {
    background-color: var(--color-gris-claro);
    border-radius: 10px;
    margin-top: 15px;
    margin-left: 15px;
}


.manage-nav .nav-link {
    color: var(--color-casi-negro);
}
    .manage-nav .nav-link.active,
    .manage-nav .nav-link:focus,
    .manage-nav .nav-link:hover {
        background-color: var(--color-bee);
        color: var(--color-casi-negro);
        border-radius: 10px;
    }

/*Introduzco estilos puestos en BClient para temas de autenticación*/

.manage-panel-options {
    position: flex;
    width: %;
    height: 100%;
    margin: 20px 20px 100px 20px;
    left: 0;
    top: 0;
    transform: none;
    background-color: var(--color-casi-negro);
    color: var(--color-gris-claro);
    border-radius: 15px;
    z-index: 1000;
    border: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /*center;*/
    align-items: center;
    padding: 35px;
    background-image: url('/images/erlea.png');
    background-repeat: no-repeat;
    background-size: 150%; /* Ajusta la imagen para cubrir todo el div */
    background-position: 20% 28%; /* Centra la imagen */
}



.footer {
    position: relative !important; /* Establece la posición relativa */
    bottom: 0 !important; /* Lo coloca al final del contenido */
    width: 100% !important; /* Ancho completo */
    padding-left: 215px !important;
    padding-right: 15px;
    padding-top: 5px !important;
}


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000000;
    background: white;
    padding: 0 16px;
    min-height: 60px;
    box-sizing: border-box;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(33,33,33,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}



.logo, .org-logo {
    height: 40px;
    width: auto;
}



/*header {
    position: fixed;    
    top: 0;
    width: 100%;
    z-index: 1000000;*/*/ /* Asegúrate de que el header esté por encima de otros elementos */
/*}*/

.navbar-brand {
color: black;
}

/*.login-main {*/
    /*background-image: url("/images/TeamsBackground.png");*/
    /*background-size: cover;
    background-position: top;
    min-height: 100vh;*/ /* Ajusta la altura mínima para que ocupe toda la ventana del navegador */
/*}*/
.login-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    margin: 0;
    padding: 0;
    background-size: cover;
    background-position: top;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Asegura que esté por encima de otros elementos */
}
#LoginIcon {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 3000;
}


/* Oculta header y footer solo en la página de login */
body[data-page="login"] header,
body[data-page="login"] .footer {
    display: none !important;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    //height: 100%;
    width: 100%;
    margin-top: 20px;
    /*height: 100vh;*/ /* sets the height of the container to 100% of the viewport height */
}

.form-label {
    text-align: left;
    color: rgb(204, 204, 220);
}

.inputLogin {
    display: flex;
    justify-content: center;
    align-items: center;
    /*max-width: 100%;*/
    /*max-height: 100%;*/
    width: 100%;
    /* height: 500%; */
    /* border: 5px solid red; */
}

#emailInputGroup,
#passConfInputGroup,
#passInputGroup {
    width: 80%;
    height: 10%;
}

.dialogo-login {
    position: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    left: 0;
    top: 0;
    transform: none;
    background-color: var(--color-casi-negro);
    /*border-radius: 10px;*/
    z-index: 1000;
    border: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;/*center;*/
    align-items: center;
    padding: 35px;
    background-image: url('/images/erlea.png');
    background-repeat: no-repeat;
    background-size: 250%; /* Ajusta la imagen para cubrir todo el div */
    background-position: 20% 28%; /* Centra la imagen */
}

.dialogo-login form {
    width: 60%;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

#login-submit.btn-primary {
    background-color: var(--color-casi-blanco) !important;
    color: var(--color-casi-negro) !important;
    border: 1px solid var(--color-casi-negro) !important;
}

    #login-submit.btn-primary:hover,
    #login-submit.btn-primary:focus {
        background-color: var(--color-bee) !important;
        color: black !important; /* Azul para resaltar en hover */
        border: 1px solid #2196F3 !important;
    }

.login-divider {
    margin-top: 200px; /* Margen grande superior */
    margin-bottom: 24px; /* Margen inferior opcional */
    border: none;
    background: none;
    /*border-top: 2px solid var(--color-gris-oscuro);*/
    width: 80%; /* Ajusta el ancho si lo deseas */
    align-self: center; /* Centra el divisor si el contenedor es flex */
   
}

#cultureSelectLogin {
    background-color: var(--color-casi-negro) !important;
    color: var(--color-gris-claro) !important;
    border: 1px solid var(--color-gris-claro);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 1em;
    outline: none;
}

    #cultureSelectLogin option {
        background-color: var(--color-casi-negro) !important;
        color: var(--color-gris-claro) !important;
    }

        #cultureSelectLogin option:hover {
            background-color: var(--color-bee) !important;
            color: var(--color-gris-oscuro) !important;
        }



    /* Opcional: mejora la apariencia al enfocar */
    #cultureSelectLogin:focus {
        border-color: var(--color-bee);
    }




.gris-claro {
color: var(--color-gris-claro);
}

/*.login-arrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    vertical-align: middle;
}*/

/*    .login-arrow-icon svg {
        border-radius: 50%;
        background: var(--color-bee);
        display: block;
    }*/

.login-btn-custom {
    width: 120px; /* Ajusta el valor según lo que necesites */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

#login-submit {
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
    gap: 12px;
}

.login-arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0px;
    min-width: 32px;
    min-height: 32px;
}

    .login-arrow-icon svg {
        display: block;
        width: 32px;
        height: 32px;
    }

.forgot-password-separator {
    margin-top: 25px; /* Ajusta el valor según lo que necesites */
    text-align: center;
}


.dialogo-register {
    position: relative;
    margin-top: 20vh; /*20% del alto de la ventana del navegador */
    left: 50%;
    transform: translateX(-50%);
    background-color: #181b1fb3;
    border-radius: 10px;
    width: 50%;
    height: 50%;
    z-index: 1000;
    border: 5px;
}

#WelcomeText {
    text-align: center;
    color: #ffffff; /*rgb(204, 204, 220);*/

    /*font-family: 'Lato';*/
}

#beeplanetIcon {
    width: 30%;
    height: 30%;
    text-align: center;
    padding-top: 20px; /* add padding to the top */
    /* padding-top: -20%; /* add padding to the top */ */ max-width: 100%;
    max-height: 100%;
    clip-path: polygon(1% 0%, 90% 0, 99% 100%, 3% 97%);
    /*border: 2px solid red;*/
}

#forgot-password {
    color: var(--color-gris-claro);
}

.language-selector-login {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

    .language-selector-login select {
        color: var(--color-gris-claro) !important;
        background: transparent;
        border: 1px solid var(--color-gris-claro);
        border-radius: 8px;
        padding: 4px 12px;
        font-size: 1em;
    }


/*Fechas*/

/*.date-picker {
    width: auto;
    display: inline-block;
    min-width: 150px;*/ /* Ajusta este valor según sea necesario */
    /*margin-left: 10px;
}*/
.date-label {
    margin-left: 20px; /* Ajusta este valor según sea necesario */
}

.gold {
    background-color: gold;
}

.installation-selector {
    margin-top: 5px; /* Ajusta este valor según sea necesario */
    height: 24px;
    margin-right: 40px;
}


/*Animación de espera*/
#loading-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    z-index: 1000; /* Asegúrate de que esté por encima de otros elementos */
}

.dot {
    width: 20px;
    height: 20px;
    margin: 0 5px;
    background-color: #ffdb58;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

    .dot:nth-child(1) {
        animation-delay: 0s;
    }

    .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}


/*  Panel vertical */
.vertical-panel {    
    margin-top: 138px;
    padding-top: 0px;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 200px;
    height: 100vh;
    background: var(--color-gris-claro);
    z-index: 10000; /* Asegúrate de que esté en primer plano */
    transition: width 0.3s, left 0.3s;
    /*border-right: 1px solid #ccc; */
}

    .vertical-panel.collapsed {
        width: 0;
        overflow: hidden;
        padding: 0;
    }

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 0.7em; /* Cambia este valor para ajustar el tamaño, por ejemplo 1.2em o 20px */
    padding: 2px 8px; /* Ajusta el padding para que no sea tan grande */
    cursor: pointer;
    margin-right: 10px;
    color: #888;
    z-index: 20001;
    line-height: 1;
    height: auto; /* Altura máxima recomendada */
    width: auto; /* Ancho máximo recomendado */
    border-radius: 8px; /* Opcional: bordes redondeados */
    align-self: center; /* Esto es clave para flexbox */
}


/*@media (max-width: 768px) {*/
@media (max-width: 1350px) {

    .sidebar-toggle-btn {
        display: block;
    }

    .vertical-panel.show {
        width: 200px !important;
        overflow: auto;
        padding: initial;
    }


    .vertical-panel {
        transition: width 0.3s, left 0.3s;
        margin-top: 130px !important;
        width: 0 !important;
        overflow: hidden;
        padding: 0 !important;
        overflow-y: auto;        
    }

    #mainContainer {
        margin-left: 0 !important;
        width: 100% !important;        
    }

    .nombre-instalacion {
        padding-left: 0 !important;
    }

    .curva-separadora {
        display: none !important;
    }
}

.curva-separadora.sombreada {
    filter: brightness(0.82);
    /* O usa fill si quieres cambiar el color de fondo */
    /* fill: #cccccc; */
    /* O usa un overlay con mix-blend-mode si quieres un efecto más avanzado */
}

/* Habilita el scroll vertical */
@media (max-width: 1200px) {
    .plant-chart canvas,
    .PieChart canvas,
    .soc-chart-wrapper canvas,
    .power-chart-wrapper canvas,
    .chart-width100 canvas,
    #gridPowerChart,
    #activeGridPowerChart,
    #reactiveGridPowerChart,
    #VatimetrosEnergia15m,
    #VatimetrosPotenciaMax15m {
        touch-action: pan-y !important;
    }
}







.panel-item {
    margin: 0px 5px 0px 25px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #767272;
    padding: 3px;
}
.panel-item-title {
    margin: 10px;
    display: flex;
    text-decoration: none;
    /*background-color: lightblue;*/
    color: #746f6f;
    padding: 5px;
    border-radius: 15px;
    border: 1px solid #ccc;
}

.panel-item.active {
    background-color: #FFF9CC; /* Amarillo muy suave */
    border-radius: 10px;
    color: #333;
}

.icon {
    width: 32px;
    height: 32px;
    margin-left: 3px;
}

.icon-text {
    display: inline;
    font-size: 16px;
    padding-left: 15px;
    line-height: 1.1; /* Reduce el espacio entre líneas */
    word-break: break-word; /* Permite el salto de línea si es necesario */
}

.icon-text-title {
    display: flex;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    padding-left: 10px;
    border-radius: 15px;
}

/*Selector tipo toogle-switch  **/

.toggle-switch-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    margin-left: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
    margin-right: 3px;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 13px;
        width: 13px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: var(--color-bee);
}

    input:checked + .slider:before {
        transform: translateX(13px);
    }

.toggle-label {
    font-size: 14px;
    color: #000; /* Ajusta el color del texto según sea necesario */
    margin-left: 10px; /* Añade un margen para separar el texto del switch */
}

.flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ajusta esto según sea necesario */
    flex-wrap: wrap; /* Permite que los elementos se envuelvan si es necesario */
}


.info {
    color: gray; /* Color del texto en gris */
    border-radius: 10px; /* Bordes redondeados */
    display: flex; /* Usar flexbox para centrar el contenido */
    justify-content: center; /* Centrar horizontalmente */
    align-items: center; /* Centrar verticalmente */
}

.codigo {
    font-family: "Courier New", Courier, monospace; /* Fuente Courier New */
    font-size: 12px; /* Tamaño de letra de 12px */
    border: 1px solid #ccc; /* Marco con color gris claro */
    border-radius: 5px; /* Bordes redondeados */
    padding: 10px; /* Espaciado interno */
    background-color: #f9f9f9; /* Fondo ligeramente gris */
    white-space: pre-wrap; /* Mantener los saltos de línea y espacios en blanco */
}

.html-display {
    border: 2px solid #ccc; /* Marco con color gris claro */
    border-radius: 5px; /* Bordes redondeados */
    padding: 10px; /* Espaciado interno */
    background-color: #f9f9f9; /* Fondo ligeramente gris */
    box-shadow: 3px -3px 5px rgba(0, 0, 0, 0.1); /* Sombreado hacia la parte superior derecha */
    white-space: pre-wrap; /* Mantener los saltos de línea y espacios en blanco */
}

/*Divisor para mostrar algún detalle*/

.info-div {
    position: fixed;
    top: 10%;
    right: 2%;
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    z-index: 1000;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateY(-20px);
    opacity: 0;
}

    .info-div.show {
        transform: translateY(0);
        opacity: 1;
    }

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.close-button:hover {
    color: #ff0000;
}

.info-div h2 {
    margin-top: 0;
    font-size: 24px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.info-div table {
    width: 100%;
    border-collapse: collapse;
}

.info-div table th, .info-div table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.info-div table th {
    background-color: #f2f2f2;
    font-weight: bold;
}




/*Estados*/
.estado-sin-comunicacion {
    background-color: #e0e0e0; /* Gris clarito */
    color: #555555; /* Gris oscuro para el texto */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    white-space: nowrap;
    border: 1px solid #888888; /* Borde gris medio */
    font-size: 14px;
    font-weight: bold;
}



.estado-errores-correcto {
    background-color: var(--color-bg-estado-ok); /* Verde muy clarito */
    color: #155724; /* Verde más fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}

.estado-errores-error {
    background-color: #f8d7da; /* Rojo suave */
    color: #721c24; /* Rojo fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}

.caja-errores {        
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}

.estado-errores-error {
    background-color: #f8d7da; /* Rojo suave */
    color: #721c24; /* Rojo fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}
.estado-errores-warning {
    background-color: orange; /* Rojo suave */
    color: black; /* Rojo fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}


.estado-correcto {
    background-color: var(--color-bg-estado-ok); /* Verde muy clarito */
    color: #155724; /* Verde más fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}

.estado-error {
    background-color: #f8d7da; /* Rojo suave */
    color: #721c24; /* Rojo fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}

.estado-warning {
    background-color: orange; /* Rojo suave */
    color: black; /* Rojo fuerte */
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px; /* Esquinas redondeadas */
    white-space: nowrap; /* Ocupa el ancho necesario */
    border: 1px solid #000000; /* Marco negro */
    font-size: 14px;
}


.estado-icono {
    margin-right: 0.5rem;
}

/* Ajusta el margen de la izquierda de la tabla */
.table-container {
    margin-top: 10px;
    overflow-x: auto; /* Asegura que la tabla sea desplazable horizontalmente si es necesario */
}

.table {
    width: 100%;
    margin-top: 10px;
    border-collapse: separate !important;
    border-spacing: 0;
}

@media (max-width: 1000px) {
    
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }    

}
    .table-instalaciones thead tr th {
        background-color: var(--color-casi-negro) !important;
        color: #fff !important;
    }
    .table-instalaciones tbody tr:nth-child(even) {
        background-color: var(--color-gris-oscuro) !important;
    }
    .table-instalaciones tbody tr:nth-child(odd) {
        background-color: var(--color-gris-claro) !important;
    }










    .table th, .table td {
        border-bottom: 0px solid #ddd; /* Solo líneas horizontales */
        padding: 6px 6px; /* Más espacio en las celdas */
        text-align: center; /* Centrar el texto */
        vertical-align: middle;
        line-height: 2;
    }

    .table tbody tr:hover td {
        background-color: #fff8dc; /* Mostaza muy suave */
        cursor: pointer; /* Mostrar el puntero de mano */
    }

    .alerts-table th, .table th {
        background-color: #f2f2f2;
        font-weight: bold;
    }

    .table tbody tr:nth-child(even) {
        background-color: #f9f9f9; /* Color de fondo para filas pares */
    }

    .table tbody tr:nth-child(odd) {
        background-color: #ffffff; /* Color de fondo para filas impares */
    }

    /*.table td, .table th {
        border-left: none;*/ /* Eliminar borde izquierdo */
        /*border-right: none;*/ /* Eliminar borde derecho */
    /*}*/


.alerts-table-no-hover tbody tr:hover td,
.table-no-hover tbody tr:hover td {
    background-color: transparent; /* Elimina el cambio de color */
    cursor: default; /* Cambia el puntero */
}

.alerts-table tbody tr td:first-child, 
.table tbody tr td:first-child {
    border-top-left-radius: 10px !important;
}

.alerts-table tbody tr td:last-child, 
.table tbody tr td:last-child {
    border-top-right-radius: 10px !important;
}

.alerts-table tbody tr td:first-child ,
.table tbody tr td:first-child {
    border-bottom-left-radius: 10px !important;
}

.alerts-table tbody tr td:last-child,
.table tbody tr td:last-child {
    border-bottom-right-radius: 10px !important;
}


.alerts-table thead tr:first-child th:first-child ,
.table thead tr:first-child th:first-child {
    border-top-left-radius: 10px !important;
}

.alerts-table thead tr:first-child th:last-child, .table thead tr:first-child th:last-child {
    border-top-right-radius: 10px !important;
}

.alerts-table thead tr:last-child th:first-child, .table thead tr:last-child th:first-child {
    border-bottom-left-radius: 10px !important;
}

.alerts-table thead tr:last-child th:last-child , .table thead tr:last-child th:last-child {
    border-bottom-right-radius: 10px !important;
}


.alerts-table {
    border-collapse: collapse;
    margin-left: 0;
    width: auto; /* Solo ocupa el espacio necesario */
    min-width: 400px; /* Opcional: ancho mínimo */
    max-width: 100%; /* No excede el contenedor */
    background: white;
}



    .alerts-table th, .alerts-table td
{
    border-bottom: 0px solid #ddd; /* Solo líneas horizontales */
    padding: 6px 6px; /* Más espacio en las celdas */
    text-align: left;
    vertical-align: middle;
    line-height: 2;
}

        .alerts-table th.desc-col,
        .alerts-table td.desc-col {
            text-align: left;
            width: 60%; /* Ajusta según el contenido */
        }

        .alerts-table th.center-col,
        .alerts-table td.center-col {
            text-align: center;
            width: 20%; /* Ajusta según el contenido */
        }

    .alerts-table tbody tr:nth-child(even) {
        background-color: #f8f9fa; /* Gris muy claro */
    }

    .alerts-table tbody tr:nth-child(odd) {
        background-color: #ffffff; /* Blanco */
    }





.fondo-gris-claro {
    background-color: #e9e9e9 !important;
    padding: 20px;
}

/* --------------------- FUNCIONES PARA El NOMBRE DE LA INSTALACION -------------------------*/


     #mainContainer {
        padding: 90px 10px 10px 10px ;
        position: relative;
        /*height: 100%;  */
        width: calc(100%-200px); /*calc(99% - var(--sidebar-width));*/
        margin-left: 200px; /*var(--sidebar-width);*/
        margin-right: 0;
        display: flex;
        flex-direction: column;
        min-height: 80vh;
        overflow: auto;
     }



    .nombre-instalacion {
        position: fixed;
        top: 59px; /* O ajusta según la altura de tu header si lo tienes */
        width: 100%; /* Resta el ancho de la barra lateral */
        height: 80px;
        display: flex;
        padding-left: 200px;
        justify-content: left;
        align-items: center;
        text-align: center;
        font-size: 50px;
        color: black;
        background: var(--color-gris-claro);
        z-index: 1001; /* Por encima del contenido, pero debajo del header si lo tienes */
        /*border-bottom: 1px solid #ccc; */
    }



    .instalacion-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .instalacion-izq {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .instalacion-izq h2 {
            font-size: 0.6em;
            margin: 0 0 0 10px;
            font-weight: bold;
            /* Si quieres que el nombre ocupe el máximo posible: */
            /* flex: 1 1 auto; */
        }

    #sidebarModoOperacion {
        font-weight: bold;
        z-index: 1000;
        margin-right: 35px;
        /* No position aquí, el flex lo alinea a la derecha */
    }



    @media (max-width: 900px) {
        
        #instalacionForm {
            left: 60px !important;
            top: 80px !important;
        }       

        #mainContainer {
            padding: 0px 10px 10px 10px;
            position: relative;
            /*height: 100%;  */
            width: calc(100%-200px); /*calc(99% - var(--sidebar-width));*/
            margin-left: 200px; /*var(--sidebar-width);*/
            margin-right: 0;
            display: flex;
            flex-direction: column;
            min-height: 80vh;
            overflow: auto;
        }



        .nombre-instalacion {
            position: sticky !important;
            height: 48px;
            font-size: 1.3em;
            padding-left: 0;
            box-shadow: 0 2px 6px rgba(0,0,0,0.07);
        }

        .instalacion-izq h2 {
            font-size: 1em;
        }


        #sidebarModoOperacion {
            font-size: 0.9em;
            margin-right: 8px;
        }


        .vertical-panel {
            margin-top: 107px !important;
        }





        .footer {
            padding-left: 10px !important;
            font-size: 0.7em !important;
        }



    }




    /*.nombre-instalacion::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 60%;
    height: 3px;*/ /* Ajusta la altura del subrayado según sea necesario */
    /*background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));*/ /* Gradiente para el difuminado */
    /*box-shadow: 0 0 10px rgba(0, 128, 128, 0.5);*/ /* Sombra difuminada */
    /*transform: translateX(-50%);*/ /* Centra el pseudo-elemento horizontalmente */
    /*}*/





    /*.titulo-pagina {
    font-size: 50%;
    color: black;
    height: 100%;
    position: relative;*/ /* Necesario para que el pseudo-elemento ::after se posicione correctamente */

    /*}*/

    .titulo-pagina {
        /*font-family: 'Urbanist';*/
        /*font-weight: 700;*/
        font-weight: bold;
        font-size: 32px;
        color: black;
        height: 100%;
        position: relative; /* Necesario para que el pseudo-elemento ::after se posicione correctamente */
        margin-left: 10px;
    }


    /*.titulo-pagina::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 5;
    width: 100%;
    height: 2px;*/ /* Ajusta la altura del subrayado según sea necesario */
    /*background: linear-gradient(to right, rgba(0, 0, 16, 0), rgba(0, 128, 128, 0.5), rgba(0, 0, 16, 0));*/ /* Gradiente para el difuminado */
    /*box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);*/ /* Sombra difuminada */
    /*}*/





    .wrapperName {
        position: relative;
        font-size: 50px; /* remove white space between inline-block elements */
        display: flex;
        height: 100%;
        flex: 1 1 80%;
        box-sizing: border-box;
        align-items: center;
    }

    .wrapperStatus {
        position: absolute;
        padding: 1px 1px;
        font-size: 30px;
        display: flex;
        /*height: 100%;*/
        /*flex: 0 0 65%;*/
        box-sizing: border-box;
    }

    /*#installationStatus {
    align-self: flex-start;*/ /* Opcional: lo alinea a la izquierda si lo prefieres */
    /*margin-bottom: 8px;*/ /* Espacio opcional respecto al SVG */
    /*}*/



    .settingsPanel {
        flex: 0 0 20%;
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrar los elementos hijos horizontalmente */
        justify-content: center; /* Centrar los elementos hijos verticalmente */
        height: auto;
    }


        .settingsPanel h3 {
            margin-bottom: 20px;
        }


    .info-message {
        display: flex;
        align-items: center;
        background-color: #eee;
        color: #807d7d;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 10px 16px;
        margin: 10px auto 10px auto;
        max-width: 700px;
        font-size: 0.9em;
    }

    .info-icon {
        font-size: 1.5em;
        margin-right: 10px;
        color: #807d7d;
        font-weight: bold;
    }


    #divEVGraphPlusSquares {
        flex: 0 0 50%;
        display: flex;
        width: 100%;
        height: 500px;
        margin: 10px;
        gap: 15px;
    }

    .squares {
        width: 300px;
        height: 400px;
        display: flex;
        flex-direction: column;
        /*background-color: #ddd;*/
        border-radius: 20px;
    }

    /*.squares {
    flex: 0 0 90%;
    max-width: 90%;
    display: grid;
    padding: 80px;
    gap: 15px;
    height: 100%;*/
    /* box-sizing: border-box; */
    /*}*/

    .square {
        background-color: #ddd;
        display: flex;
        align-items: center; /* Vertically center the content */
        justify-content: center; /* Horizontally center the content */
        /*box-sizing: border-box;*/
        text-align: center;
        border-radius: 15px; /* Adjust the radius value to make the corners rounder */
        flex-direction: row; /* Stack children vertically */
        margin-bottom: 10px;
    }

    /*#chargerTotal {
    border: 2px solid #4CAF50;
    background: #eaffea;
    font-weight: bold;
}*/

    #chargerTotal {
        border: 2px solid #FFD600;
        background: #FFFDE7;
        font-weight: bold;
        color: #333;
        box-shadow: 0 2px 8px 0 rgba(255, 229, 0, 0.15);
        transition: background 0.3s;
    }




    #lineChartEVCharge {
        height: 300px;
        max-height: 300px;
        width: 100%;
    }


    .bhive-input {
        max-width: 100% !important;
        border-radius: 5px !important;
        border: 1px solid #ccc !important;
        background-color: #f8f9fa !important;
        color: #333 !important;
        /*padding: 8px !important;*/
        box-sizing: border-box !important;
    }

        .bhive-input:disabled,
        .bhive-input[readonly] {
            background-color: #f0f0f0 !important; /* Gris más oscuro */
            color: #888 !important; /* Texto más apagado */
            border: 1px solid #bbb !important; /* Borde algo más oscuro */
            cursor: not-allowed;
        }


    .read-only {
        background-color: #f0f0f0 !important;
        color: #555;
        border: 1px solid #ccc;
        cursor: not-allowed;
    }

    .modified {
        background-color: #fff3cd !important; /* Amarillo claro */
        border-color: #ffc107 !important;
        transition: background-color 0.3s, border-color 0.3s;
    }

    .charts-wrapper {
        display: flex;
        flex-direction: row;
        gap: 20px;
        width: 100%;
    }

    .soc-chart-wrapper,
    .power-chart-wrapper {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }


.chart_wrapper,
.soc-chart-wrapper,
.soh-chart-wrapper,
.power-chart-wrapper,
.grid-power-chart-wrapper,
.active-grid-power-chart-wrapper,
.reactive-grid-power-chart-wrapper {
    margin-left: 10px;
    margin-bottom: 10px;
    width: 50%; /* Ajusta el ancho según sea necesario */
    height: 100%;
    padding: 0px;
    box-sizing: border-box;
    border-radius: 20px;
    background-color: #ddd;
    position: relative;
}


@media (max-width: 1000px) {
    .charts-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .soc-chart-wrapper,
    .power-chart-wrapper {
        width: 100%;
        min-width: 0;
    }
}

/*@media (max-width: 1000px) {
    .soc-chart-wrapper,
    .power-chart-wrapper {
        min-height: 350px;
        height: 45vw;*/ /* Ajusta este valor según lo que veas en tu móvil */
        /*max-height: 500px;
    }
    .soc-chart-wrapper canvas,
    .power-chart-wrapper canvas {
        min-height: 300px;
        height: 100% !important;
        max-height: 500px;
    }
}*/




.chart-width100 {
    margin-left: 10px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background-color: #ddd;
    padding: 20px;
    position: relative;
}

    /* Monitorización de planta */
    .plant-chart {
        /*flex: 0 0 80%;*/
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        /*z-index: 100;*/
        position: relative;
        /*width: 100%;*/
        /*max-height: 100%;*/
        /*max-width: 100%;*/
        margin: 0px;
        /*padding: 5px;*/
        border-radius: 20px;
        background-color: #ddd;
        height: 400px;
        max-height: 400px;
        max-width: 80%;
    }




    #GraphByDays {
        width: 100%;
        flex: 1; /* Permite que la gráfica crezca para llenar el espacio disponible */
        height: 500px;
        max-height: 500px;
    }

    #GraphByMonths {
        width: 100%;
        height: 500px;
        max-height: 500px;
    }


    .graphPlusCSVButton {
        position: relative;
        display: flex;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }

    #divContent {
        width: calc(100% - 45px); /*calc(99% - var(--sidebar-width));*/
        flex: 1; /* Permite que este div crezca para llenar el espacio disponible */
        margin-left: 0px; /*var(--sidebar-width);*/
        margin-right: 0;
        display: flex;
        flex-direction: column;
    }


    .contentWrapper {
        display: flex;
        width: 100%;
        /* height: 680px; */
        height: auto;
        position: relative;
        flex-direction: column;
        padding: 20px;
    }


    .config-button {
        display: block;
        width: 70%;
        padding: 10px;
        margin-bottom: 10px;
        background-color: var(--color-bee);
        color: black; /* Color del texto blanco */
        border: none;
        cursor: pointer; /* Cambiar el cursor al pasar sobre el botón */
        text-align: center; /* Centrar el texto */
        border-radius: 18px; /* Bordes redondeados */
        transition: background-color 0.3s, transform 0.3s; /* Transiciones suaves */
    }

        .config-button:hover {
            background-color: var(--color-bee); /* Color de fondo al pasar el ratón */
            transform: scale(1.1); /* Aumentar el tamaño al pasar el ratón */
        }

        .config-button:active {
            background-color: var(--color-bee); /* Color de fondo al hacer clic */
            transform: scale(1.0); /* Reducir el tamaño al hacer clic */
        }



.export-header-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

#exportCsvButton {
    flex: 0 0 19%;
    /*min-width: 120px;
    max-width: 250px;*/
    width: auto;
}

#exportButton3Days,
#exportButton15Days,
#exportButtonMonths,
#exportButtonPricePrediction {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #exportButton3Days:hover,
    #exportButton15Days:hover,
    #exportButtonMonths:hover,
    #exportButtonPricePrediction:hover,
    #exportButtonPricePrediction:focus,
    #exportButton3Days:focus,
    #exportButton15Days:focus,
    #exportButtonMonths:focus {
        background: #FFE500 !important;
    }





    .configuration-panel {
        display: flex;
        width: 100%;
        align-items: flex-start;
    }

    .left-panel {
        width: 100%;
        max-width: 100%;
        flex: 1 1 0;
    }

    .right-panel {
        width: 20%;
    }


    .left-panel, .right-panel {
        margin: 10px;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 10px;
        background-color: #ddd
    }

    .left-panel-inner {
        margin: 10px;
        padding: 10px;
        border: none;
        border-radius: 10px;
        background: transparent;
        border: 1px solid #ccc;
    }


    .section {
        margin-bottom: 10px;
        flex-direction: column;
    }

        .section h4 {
            margin-bottom: 10px;
        }

        .section input[type="text"] {
            flex: 1;
            padding: 5px;
        }

        .section p {
            margin: 0;
            font-size: 0.9em;
            color: #666;
        }

        .section .input-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 0px;
        }

    .right-panel .section {
        display: flex;
        align-items: center;
    }

        .right-panel .section label {
            display: flex;
            align-items: center;
            gap: 10px;
        }

    .input-container {
        display: flex;
        align-items: center;
    }

    .no-chargers-message {
        color: red;
        font-size: 1.5em;
        text-align: center;
    }

    /*#svgContainer {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start; 
    width: 100%; 
    height: auto;
}
*/
    #svgContainer {
        position: relative;
        width: 100%;
        max-width: 100%; /* Ajusta según tu diseño */
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }

        #svgContainer .overlay-img {
            position: absolute;
            /* top, left y width se definen en el atributo style de cada imagen */
            pointer-events: none; /* Opcional: para que no interfieran con el ratón */
        }


    svg.overlay-img .shine-effect {
        stroke-dasharray: 30 80; /* 30 = longitud del brillo, 80 = resto de la línea */
        stroke-dashoffset: 0;
        animation: shine-move 1.5s linear infinite;
        pointer-events: none;
    }

    /*@keyframes shine-move {
    0% {
        stroke-dashoffset: 150;
    }

    100% {
        stroke-dashoffset: 0;
    }
}*/

    @keyframes shine-move {
        0% {
            stroke-dashoffset: 110;
            opacity: 1;
        }
        /*    80% {
        opacity: 1;
    }
*/
        100% {
            stroke-dashoffset: 0;
            opacity: 0;
        }
    }

    /* Secuencia: cada línea empieza después de la anterior */
    svg.overlay-img .shine-effect:nth-of-type(2) {
        animation-delay: 0s;
    }

    svg.overlay-img .shine-effect2 {
        stroke-dasharray: 30 80;
        stroke-dashoffset: 0;
        animation: shine-move2 1.5s linear infinite;
        pointer-events: none;
    }

        /* Secuencia: cada línea empieza después de la anterior */
        svg.overlay-img .shine-effect2:nth-of-type(3) {
            animation-delay: 0s;
        }

        svg.overlay-img .shine-effect2:nth-of-type(4) {
            animation-delay: 0.75s;
        }


    @keyframes shine-move2 {
        0% {
            stroke-dashoffset: 110;
            opacity: 1;
        }

        80% {
            opacity: 1;
        }

        100% {
            stroke-dashoffset: 0;
            opacity: 0;
        }
    }

    svg.overlay-img .shine-effect3 {
        stroke-dasharray: 30 80;
        stroke-dashoffset: 0;
        animation: shine-move3 1.5s linear infinite;
        pointer-events: none;
    }

        /* Secuencia: cada línea empieza después de la anterior */
        svg.overlay-img .shine-effect3:nth-of-type(4) {
            animation-delay: 0s;
        }

        svg.overlay-img .shine-effect3:nth-of-type(5) {
            animation-delay: 0.5s;
        }

        svg.overlay-img .shine-effect3:nth-of-type(6) {
            animation-delay: 1s;
        }

    @keyframes shine-move3 {
        0% {
            stroke-dashoffset: 110;
            opacity: 1;
        }

        80% {
            opacity: 1;
        }

        100% {
            stroke-dashoffset: 0;
            opacity: 0;
        }
    }



    .responsive-svg {
        width: auto;
        height: 100%;
        max-heigth: 100%;
        display: block;
    }

    #installationStatus {
        margin-bottom: 8px; /* Espacio entre el estado y el SVG */
        font-weight: bold;
        color: black;
    }




    .flex-hist-pie {
        margin: 10px;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
        height: auto;
        gap: 15px; /* Espacio entre los paneles, opcional */
    }

    #divLiveDataPlusHist {
        flex: 0 0 100%;
        max-width: %;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }










/* -------------------------- INICIO DE CSS DE DIVS GENERALES --------------------------------*/




#wrapperDatePickerPlusLiveDataPlusHist {
    font-size: 0; /* remove white space between inline-block elements */
    display: flex;
    width: 100%;
    flex: 1; /* Permite que este div crezca para llenar el espacio disponible */
    /*padding: 10px;*/
    max-width: 100%;
    flex-direction: column;
}

.wrapper {
    display: flex;
    width: 100%;
    flex: 1; /* Permite que este div crezca para llenar el espacio disponible */
}




/* ++++++++++++++++++++++++++ FIN DE CSS DE DIVS GENERALES +++++++++++++++++++++++++++++ */




/* ------------------------- INICIO DE VARIABLES GLOBALES ------------------------------ */



:root {
    --sidebar-width: 13%;
}



/* ++++++++++++++++++++++++++ FIN DE VARIABLES GLOBALES +++++++++++++++++++++++++++++ */




.wrapperPriceValues {
    display: grid;
    width: 20%;
    height: 400px;
    background-color: #ddd;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 20px 0;
    grid-template-areas:
        "mean mean"
        "max min";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0px 10px;
    align-items: center;
    justify-items: center;
}


.PriceChart.mean {
    grid-area: mean;
    width: 90%;
    justify-self: center;
    align-self: start; /* Mueve el bloque superior hacia abajo */
    margin-top: 16px; /* Ajusta según lo que necesites */
}

.PriceChart.max {
    grid-area: max;
    width: 90%;
    justify-self: end;
    align-self: end; /* Mueve los bloques inferiores hacia arriba */
    margin-bottom: 16px; /* Ajusta según lo que necesites */
}

.PriceChart.min {
    grid-area: min;
    width: 90%;
    justify-self: start;
    align-self: end; /* Mueve los bloques inferiores hacia arriba */
    margin-bottom: 16px; /* Ajusta según lo que necesites */
}



.PriceChart {
    display: flex;
    flex-direction: column; /* vertical */
    align-items: center; /* centra horizontalmente */
    justify-content: center; /* centra verticalmente */
    font-size: 1.5em;
    font-weight: 600;
    color: #000 !important;
    background: transparent;
    min-height: 48px;
    border-bottom: none;
    width: 100%;
    height: 100%;
}

    .PriceChart .label {
        font-size: 0.7em;
        color: #222;
        font-weight: 500;
        margin-bottom: 4px; /* separa el label del valor */
        text-align: center;
        width: 100%;
    }

    .PriceChart span[id^="price"] {
        font-size: 0.95em;
        color: #000;
        font-weight: bold;
        text-align: center;
        width: 100%;
    }





.wrapperPieChart {
        display: grid;
        width: 340px;
        height: 400px;
        max-width: 100vw;
        max-height: 100vw;
        grid-template-areas: "autocons autocons" "consumption solar";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 20px;
        justify-items: center;
        align-items: center;
        background-color: #ddd;
        border-radius: 20px;
        margin: 0 auto;
    }

    .PieChart {
        width: 160px;
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .PieChart canvas {
            width: 100% !important;
            height: 100% !important;
            max-width: 100%;
            max-height: 100%;
            display: block;
        }

        .PieChart:nth-child(1) {
            grid-area: autocons;
            justify-self: center;
        }

        .PieChart:nth-child(2) {
            grid-area: consumption;
        }

        .PieChart:nth-child(3) {
            grid-area: solar;
        }



    @media (max-width: 1000px) {

        .wrapperPriceValues {
            width: 100% !important;
            height: auto !important;
            display: flex !important;
            flex-direction: row !important;
            align-items: stretch !important;
            padding: 10px 0 !important;
            gap: 10px 0 !important;
        }

        .PriceChart.mean,
        .PriceChart.max,
        .PriceChart.min {
            width: 100% !important;
            margin: 0 0 8px 0 !important;
            justify-self: stretch !important;
            align-self: stretch !important;
        }        

        .wrapperPieChart {
            display: flex !important;
            flex-direction: row !important;
            justify-content: space-between; /* reparte el espacio entre los gráficos */
            align-items: center;
            width: 100% !important;
            height: auto;
            max-width: 100vw;
            margin: 0 auto;
        }
        

        .PieChart {
            flex: 1 1 0;
            min-width: 0;
            width: 100% !important;
            max-width: 100px; /* o el tamaño que prefieras */
            height: 150px;
            margin: 0 10px; /* <-- margen lateral para separar de los bordes */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .flex-hist-pie {
            width: 100%;
            flex-direction: column;
            align-items: stretch;            
        }

        .plant-chart {
            width: 100% !important;
            max-width: 100vw !important;
            min-width: 0 !important;
            margin: 0 auto 10px auto;
            padding: 20px;
        }


        #divEVGraphPlusSquares {
            flex-direction: column !important;
            height: auto !important;
            gap: 0 !important;
        } 

        .squares {
            width: 100% !important;
            height: auto !important;
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: wrap !important;
            justify-content: stretch !important;
            align-items: stretch !important;
            margin: 0 !important;
            gap: 10px !important;
        }

        .square {
            flex: 1 1 120px;
            min-width: 90px;
            max-width: 100vw;
            margin-bottom: 10px;
            box-sizing: border-box;            
            padding: 6px; 
        }

        .square h2, .square h4 {
            font-size: 1em;
        }

        
        #divContent{
            width: 100%;
        }


        .contentWrapperLocal {
            margin-left: 15px !important;
            margin-right: 15px !important;
        }


        #exportCsvButton {
            flex: 1 1 19%;            
            width: auto;
        }



    }


#gridPowerChart,
#activeGridPowerChart,
#reactiveGridPowerChart,
#VatimetrosEnergia15m,
#VatimetrosPotenciaMax15m,
#socChart,
#powerChart,
#sohChart,
#lineChartEVCharge {
    width: 100% !important;
    height: 350px !important; /* Altura fija y razonable */
    max-height: 400px !important;
    display: block;
}





@media (max-width: 900px) {
    #gridPowerChart,
    #activeGridPowerChart,
    #reactiveGridPowerChart,
    #VatimetrosEnergia15m,
    #VatimetrosPotenciaMax15m,
    #socChart,
    #powerChart,
    #sohChart,
    #lineChartEVCharge {
        height: 280px !important; /* O el valor que prefieras */
        max-height: 280px !important;
    }

    #lineChartEVCharge {
        height: 320px !important; /* O el valor que prefieras */
        max-height: 320px !important;
    }




}


    @media (max-width: 1000px) {
        body,
        .mainContainer,
        .contentWrapper,
        .contentWrapperLocal,
        .table,
        .table th,
        .table td,
        .title {
            font-size: 14px !important;
        }

        .titulo-pagina {
            font-size: 20px !important;
        }

        #dynamicTitle {
            font-size: 18px !important;
        }

        .title {
            font-size: 18px !important;
        }
    }



    .custom-navbar {
        background: #fff;
        border-bottom: 1px solid #ddd;
        position: relative;
    }

    /* Oculta el menú hamburguesa en escritorio */
    .hamburger {
        display: none;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        margin-left: 16px;
        margin-right: 0;
        z-index: 1101;
    }

    .custom-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        position: relative;
        z-index: 1001;
    }


    .menu-left, .menu-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }


    /* Responsive: menú móvil */
    @media (max-width: 1000px) {
        .custom-menu {
            display: none;
            flex-direction: column;
            align-items: stretch;
            width: 35vw;
            background: var(--color-gris-claro);
            position: absolute;
            right: 0;
            top: 100%;
            z-index: 1000;
            border-bottom: 1px solid #ddd;
            padding: 16px 0;
            overflow-y: auto;
            max-height: 80vh;
        }

            .custom-menu.active {
                display: flex;
            }

        .menu-left, .menu-right {
            flex-direction: column;
            align-items: center;
            gap: 0;
            width: 100%;
        }

        .custom-menu a,
        .custom-menu .nav-link,
        .custom-menu .dropdown-item {
            width: 90%;
            margin: 6px 0;
            padding: 8px 24px;
            text-align: center;
            border-radius: 8px;
            background: transparent;
            display: block;
        }

        .custom-menu-section {
            width: 100%;
            padding: 12px 0;
            display: flex;
            justify-content: center;
            align-items: center;
            background: transparent;
        }

        .hamburger {
            display: block;
            margin-left: auto;
            margin-right: 0;
            position: relative;
            z-index: 1101;
        }


    }




    @media (max-width: 400px) {
        .custom-menu {
            width: 50vw;
        }
    }

    /*Esto es para la altura de los graficos en modo movil*/

    @media (max-width: 900px) {
        .plant-chart canvas {
            min-height: 380px;
            height: 40vh;
        }
    }

    /* Ajuste para el nav principal */
    nav.navbar {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0;
        right: 0;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    #pieChartConsumption,
    #pieChartSolarGen,
    #pieChartAutocons {
        max-width: 100%; /* Set maximum width */
        max-height: 100%; /* Set maximum height */
        /*border: 1px solid green; /* Add a border if needed */
    }




.divButtonCSV {
        display: inline-flex; /* Habilita Flexbox y ajusta el tamaño al contenido */
        justify-content: center; /* Centra horizontalmente */
        align-items: center; /* Centra verticalmente */
        position: absolute;
        bottom: 2%;
        right: 1%;
        padding: 10px;
        margin: 0; /* Elimina cualquier margen adicional */
        box-sizing: border-box; /* Asegura que el padding y el borde se incluyan en el tamaño total */
    }


    .btnGenCSVBigGraph {
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        background-color: #4CAF50;
        color: #FFFFFF;
        border: none;
        border-radius: 4px;
        margin: 0;
        -webkit-user-select: none; /* Safari */
        -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
        user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Edge */
    }

    .button-bottom-right {
        position: absolute;
        bottom: -5px; /* Ajusta la distancia al borde inferior */
        right: 0px; /* Ajusta la distancia al borde derecho */
        width: 200px;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0;
        margin: 0;
        background: none;
        box-shadow: none;
    }

    .button-top-right {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10;
    }

    .reset-zoom-btn {
        background: transparent;
        border: none;
        padding: 4px;
        cursor: pointer;
        transition: background 0.2s;
    }

        .reset-zoom-btn:hover {
            background: #FFE500;
            border-radius: 50%;
        }




    .warning-icon {
        position: absolute;
        font-size: 2em; /* o usa width/height si es imagen */
        color: orange;
        z-index: 30;
        display: none; /* Oculto por defecto */
        pointer-events: none;
    }

    /* Ajusta estos valores para que el icono quede cerca de cada elemento */
    #warning-charger {
        top: 42%;
        left: 23%;
    }

    #warning-factory {
        top: 91%;
        left: 45%;
    }

    #warning-solar {
        top: 35%;
        left: 59%;
    }

    #warning-battery {
        top: 60%;
        left: 56%;
    }

    #warning-grid {
        top: 85%;
        left: 75%;
    }



    .arrow-label {
        display: block;
        width: 100%;
        text-align: center;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 2;
        pointer-events: none;
        font-size: 18px;
    }

    .arrow-label-soc {
        display: block;
        width: 100%;
        text-align: center;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 2;
        pointer-events: none;
        font-size: 18px;
    }

    .fv-label, .load-label {
        display: block;
        width: 100%;
        text-align: center;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 2;
        pointer-events: none;
        font-size: 24px;
    }
    /*.fv-label {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 24px;
    pointer-events:none;
}*/

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }



    /* Para pantallas menores de 900px */
    @media (max-width: 1400px) {
        .arrow-label-soc,
        .arrow-label {
            font-size: 0.90em;
        }
    }

    /* Para pantallas menores de 900px */
    @media (max-width: 1200px) {
        .arrow-label-soc,
        .arrow-label {
            font-size: 0.8em;
        }
    }

    /* Para pantallas menores de 600px (móviles) */
    @media (max-width: 900px) {
        .arrow-label-soc,
        .arrow-label {
            font-size: 0.7em;
        }
    }

    @media (max-width: 600px) {
        .arrow-label-soc,
        .arrow-label {
            font-size: 0.6em;
        }
    }


    /* Para pantallas menores de 1200px */
    @media (max-width: 1400px) {
        .fv-label,
        .load-label {
            font-size: 0.85em;
        }
    }

    /* Para pantallas menores de 900px */
    @media (max-width: 1200px) {
        .fv-label,
        .load-label {
            font-size: 0.7em;
        }
    }

    /* Para pantallas menores de 600px (móviles) */
    @media (max-width: 900px) {
        .fv-label,
        .load-label {
            font-size: 0.55em;
        }
    }

    @media (max-width: 600px) {
        .fv-label,
        .load-label {
            font-size: 0.4em;
        }
    }


    #cultureSelect {
        border-radius: 12px; /* Bordes redondeados */
        background: transparent; /* Fondo transparente */
        border: 1px solid #4D5352; /* Borde suave, puedes cambiar el color */
        padding: 4px 12px; /* Espaciado interno */
        color: inherit; /* Hereda el color del texto */
        font-size: 1em; /* Tamaño de fuente coherente */
        outline: none; /* Quita el borde azul al hacer clic */
        transition: border-color 0.2s;
    }

        #cultureSelect:focus {
            border-color: var(--color-bee); /* Color de borde al enfocar */
        }

    .btn-link {
        border-radius: 12px; /* Bordes redondeados */
        background-color: var(--color-bee); /* Fondo dorado */
        color: #333 !important; /* Color de texto oscuro para contraste */
        padding: 4px 20px; /* Espaciado interno */
        text-decoration: none !important; /* Quita el subrayado típico de los enlaces */
        transition: background 0.2s, color 0.2s;
        border: none; /* Sin borde */
        box-shadow: none; /* Sin sombra por defecto */
    }

        .btn-link:hover, .btn-link:focus {
            background-color: #ffd700; /* Un dorado más intenso al pasar el ratón */
            color: #000 !important;
            text-decoration: none;
        }

    .panel-flujo {
        /*background-color: var(--color-gris-claro);*/
        border-radius: 15px;
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 20;
        pointer-events: none;
        font-size: 24px;
        /*box-shadow: 8px 8px 32px 0 rgba(0,0,0,0.35);*/
    }

    #imagen-flujos {
        border-radius: 15px;
    }

    .legal-note {
        margin-top: 1em;
        color: #555;
        font-size: 0.70em;
    }








    /* ------------------- INICIO DE DATEPICKER Y FLECHAS DE CAMBIO DE DIA ---------------------- */


    .mainWrapperName {
        position: relative;
        font-size: 50px; /* remove white space between inline-block elements */
        display: flex;
        height: 100%;
        flex: 0 0 80%;
        box-sizing: border-box;
    }

    #datePicker {
        font-size: 1rem;
        /*font-weight: bold;*/
        text-align: center;
        text-decoration: none;
        color: #000000;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex-basis: 80%;
        max-width: 100%;
        border: 1px solid #bbb; /* Borde fino y color suave */
        padding: 0px 8px;
    }


    .datePickerWrapper {
        /*padding: 5px;*/
        display: flex;
        width: 100%;
        position: relative;
        flex: 0 0 20%;
        padding-top: 10px;
        padding-bottom: 10px;
        /*box-sizing: border-box;*/
        align-items: stretch;
    }

    .arrowButton {
        cursor: pointer;
        flex-basis: 20%;
        box-sizing: border-box;
        display: flex; /* Para alinear al centro */
        justify-content: center; /* Para alinear al centro */
        align-items: center; /* Para alinear al centro */
        height: 32px !important;
        max-height: 32px !important;
        padding: 0; /* Elimina el margen */
        background: none; /* Elimina fondo */
        padding-top: 0px;
        border: none; /* Elimina bordes */
    }



    #arrowIcon {
        max-height: 32px;
        max-width: 32px;
        text-align: center;
        width: auto;
        height: auto;
    }


    /* ++++++++++++++++++++ FIN DE DATEPICKER Y FLECHAS DE CAMBIO DE DIA +++++++++++++++++++++++ */






    /* ------------ ESTE DIVISOR ABARCA EL NOMBRE DE LA INSTALACION Y EL DATEPICKER -------------- */



#divInstNamePlusDatePicker {
    display: flex;
    flex: 1;
    width: 100%;
    /*height: 15%;*/
    align-items: center;
    padding: 3px 3px;
    box-sizing: border-box;
}


    /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

    .chart-title {
        text-align: center;
    }

    .title-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }


    @media (max-width: 400px) {
        .title-wrapper {
            display: table-row;
        }


        .export-header-container{
            display: table-row;
        }

        #exportCsvButton{
            width: 100%;
        }

    }



    .curva-separadora {
        position: fixed;
        top: 139px;
        left: 200px;
        margin: 0;
        padding: 0;
        border: none;
        z-index: 1000002; /* Ajusta según tu estructura */
        display: block;
        pointer-events: none; /* No interfiere con el ratón */
    }

    .mainContainer {
        position: relative;
    }




/* === Ajustes específicos para Index: evitar solapado tabla/mapa === */

/* (Opcional) Si quieres que también en escritorio la tabla NO tenga scroll interno, descomenta:
.scrollable-table {
    height: auto;
    overflow: visible;
}
*/

@media (max-width: 1000px) {

    /* Quitar scroll interno y altura fija en móvil */
    .scrollable-table {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 10px;
        position: relative;
        z-index: 2;
    }

    /* Margen entre tabla y mapa cuando se apilan */
    .map-column,
    .map-col {
        margin-top: 28px !important;
    }

        /* Asegurar mapa fluye como bloque normal y no “flota” */
        .map-column #map,
        .map-col #map {
            position: relative;
            z-index: 1;
            width: 100% !important;
            height: 55vh;
        }

    /* Ocultar panel usuarios conectados en móvil */
    .fixed-right {
        display: none !important;
    }

    /* Si usas la clase para la columna de tabla (añádela en el markup):
       Esto fuerza apilado sin efectos colaterales de flex row original */
    .row.fondo-gris-claro {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

        .row.fondo-gris-claro .table-col {
            width: 100% !important;
            order: 1;
        }

        .row.fondo-gris-claro .map-col {
            width: 100% !important;
            order: 2;
        }



    .filters-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

        .filters-row > div {
            flex: 1 1 100%;
            max-width: 100% !important;
            padding-left: 0;
            padding-right: 0;
        }

        /* Sobrescribe anchos fijos heredados */
        .filters-row input.form-control,
        .filters-row select.form-control {
            width: 100% !important;
            margin-left: 0 !important;
        }




    #map {
        width: 90% !important;
        height: 60vh !important;
        border-radius: 15px !important;
        display: block !important;
        margin: 0 auto !important;
    }

}


/* Pantallas muy estrechas: reduce el gap si hace falta */
@media (max-width: 400px) {
    .filters-row {
        gap: 6px;
    }
}

/* Mitigar solapados z-index (si aún notas la tabla “por detrás” al volver a subir) */
.table-instalaciones,
.scrollable-table,
.scrollable-table .table-responsive {
    position: relative;
    z-index: 3;
}

#map {
    position: relative;
    z-index: 1;
}



.filters-row {
    padding-bottom: 17px;
    margin-bottom: 0;
}

    .filters-row + .table-container {
        margin-top: 0;
    }





/* <========================================= PAGINAS DE CONFIGURACIÓN ============================================>*/


/* Header configuración (aislado, no afecta a otros .titulo-pagina) */
.cfg-header {
    --title-width: 65%;
    --actions-width: 35%;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    /* gap eliminado */
}

.cfg-header-title {
    flex: 0 0 var(--title-width);
    max-width: var(--title-width);
    min-width: 0;
}

.cfg-header-actions {
    flex: 0 0 var(--actions-width);
    max-width: var(--actions-width);
    display: flex;
    /* Centrado horizontal y vertical */
    justify-content: flex-end;
    align-items: center;
    /* gap eliminado */
    flex-wrap: nowrap; /* evita saltos verticales si caben */
    min-height: 48px; /* opcional: asegura algo de altura para el centrado */
}

    .cfg-header-actions .config-button {
        width: 30%; /* liberar el 35% para que se centren mejor */
        min-width: 110px;
        padding: 10px 18px;
        margin: 0 15px; /* separación manual entre botones */
        border-radius: 5px;
    }

/* Responsive: apilar */
@media (max-width: 900px) {
    .cfg-header {
        flex-wrap: wrap;
    }

    .cfg-header-title,
    .cfg-header-actions {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .cfg-header-actions {
        justify-content: flex-start; /* en móvil puede ser más usable alinear a la izquierda */
        align-items: center;
        flex-wrap: wrap;
    }

        .cfg-header-actions .config-button {
            margin: 4px 6px;
        }
}


/* <========================================= PAGINA DE CONFIGURACIÓN DE RED ============================================>*/


/* =================== OVERRIDES SOLO PARA MOVIL (no altera escritorio) =================== */
@media (max-width: 1000px) {

    /* Cambia el contenedor a grid en móvil; en escritorio sigue siendo flex */
    #configurationPanel.configuration-panel {
        display: grid;
        grid-template-columns: 1fr; /* una columna */
        gap: 20px;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* Cada bloque ocupa toda la anchura */
    #configurationPanel .left-panel {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        padding: 12px 14px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

        #configurationPanel .left-panel h4 {
            margin: 0 0 4px 0;
            font-size: 1.05em;
        }

        /* Secciones compactas */
        #configurationPanel .left-panel .section {
            margin: 0 0 10px 0;
            padding: 6px 0;
            border-bottom: 1px solid #ccc;
        }

            #configurationPanel .left-panel .section:last-child {
                border-bottom: none;
            }

            #configurationPanel .left-panel .input-container h5 {
                flex: 1 1 220px;
                margin: 0;
                font-size: 0.9em;
            }

            #configurationPanel .left-panel .input-container input[type="number"],
            #configurationPanel .left-panel .input-container input[type="checkbox"] {
                flex: 1 1 auto;
            }

        /* Mensajes informativos más pequeños */
        #configurationPanel .left-panel .info-message {
            margin: 4px 0 0 0;
            font-size: 0.75em;
            max-width: 100%;
        }

    /* Excedentes panel desactivado visualmente (si lo marcas en JS con clase) */
    #excedentesPanel.is-inactive {
        opacity: 0.55;
        pointer-events: none;
    }
}

/* Opcional: si quieres dos columnas en tablets (entre 601 y 900px) descomenta:
@media (min-width: 601px) and (max-width: 900px) {
    #configurationPanel.configuration-panel {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}
*/


/* =================== EVChargers – overrides SOLO móvil (mantiene escritorio) =================== */
@media (max-width: 1000px) {

    /* Apilar paneles */
    #configurationPanel.configuration-panel {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* Ambos bloques a ancho completo */
    #configurationPanel .left-panel,
    #configurationPanel .right-panel {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        padding: 12px 14px;
        box-sizing: border-box;
    }

        /* Compactar títulos */
        #configurationPanel .left-panel h4,
        #configurationPanel .right-panel h4 {
            margin: 0 0 6px 0;
            font-size: 1.02em;
        }

        /* Secciones más compactas */
        #configurationPanel .left-panel .section,
        #configurationPanel .right-panel .section {
            margin: 0 0 10px 0;
            padding: 6px 0;
            border-bottom: 1px solid #ccc;
        }

            #configurationPanel .left-panel .section:last-child,
            #configurationPanel .right-panel .section:last-child {
                border-bottom: none;
            }

        /* Contenedor inputs flexible */
        #configurationPanel .left-panel .input-container {
            display: flex;
            /*flex-wrap: wrap;*/
            flex-direction: row;
            gap: 8px;
            align-items: center;
        }

            #configurationPanel .left-panel .input-container h4 {
                flex: 1 1 220px;
                margin: 0;
                font-size: 0.95em;
            }

        /* Mensajes informativos más pequeños */
        #configurationPanel .left-panel .info-message,
        #configurationPanel .right-panel .info-message {
            font-size: 0.72em;
            margin: 6px 0 4px 0;
            padding: 8px 12px;
        }

    /* Grid adaptativo para los cargadores dentro del panel derecho */
    #configurationPanel .right-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        align-items: start;
    }

        /* Título e info ocupan todo el ancho en la rejilla */
        #configurationPanel .right-panel > h4,
        #configurationPanel .right-panel > .info-message {
            grid-column: 1 / -1;
        }

        /* Cada sección de cargador como tarjeta */
        #configurationPanel .right-panel .section {
            border-bottom: none;
            background: rgba(255,255,255,0.35);
            padding: 8px 10px;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

            #configurationPanel .right-panel .section label {
                display: flex;
                flex-direction: row;
                gap: 4px;
                font-size: 0.75rem;
            }

            #configurationPanel .right-panel .section input.bhive-input {
                width: 100% !important;
                margin-left: 0;
                text-align: left;
            }

    /* Ajuste inputs generales */
    #configurationPanel input.bhive-input {
        flex: 1 1 140px;
        min-width: 100px;
        width: 50%;
        margin-left: 0;
    }

    /* Mensaje sin cargadores */
    #configurationPanel .no-chargers-message {
        font-size: 0.9em;
        grid-column: 1 / -1;
        margin: 4px 0;
    }
}

/* <========================================= PAGINA DE CONFIGURACION DE BATERIAS ============================================>*/

/* <========================================= PAGINA DE CONFIGURACION DE BATERIAS (COMPactado) ============================================>*/

/* Escritorio: muestra solo tabla (cards ocultas) */
@media (min-width: 901px) {
    .battery-cards,
    .battery-toggle-view {
        display: none !important;
    }
}

/* Móvil: tabla oculta por defecto, vista cards + opción mostrar tabla completa */
@media (max-width: 900px) {

    /* Contenedor principal */
    .battery-table-wrapper {
        width: 100%;
        position: relative;
    }

    /* Tabla completa (solo si se activa) */
    .battery-table {
        display: none;
    }

        .battery-table.show-full {
            display: table;
            width: 100%;
            border-collapse: collapse;
        }

            .battery-table.show-full thead {
                position: sticky;
                top: 0;
                background: #f5f5f5;
                z-index: 2;
            }

            .battery-table.show-full th,
            .battery-table.show-full td {
                font-size: 0.72em;
                padding: 4px 6px;
                white-space: nowrap;
            }

                .battery-table.show-full th:first-child,
                .battery-table.show-full td:first-child {
                    position: sticky;
                    left: 0;
                    background: #fff;
                    z-index: 3;
                    box-shadow: 2px 0 3px rgba(0,0,0,0.08);
                }

    /* Toggle vista */
    .battery-toggle-view {
        margin: 6px 0 12px;
        display: inline-flex;
        gap: 8px;
    }

        .battery-toggle-view button {
            background: var(--color-bee);
            border: none;
            padding: 4px 10px;
            border-radius: 18px;
            font-size: 0.7em;
            cursor: pointer;
        }

            .battery-toggle-view button:hover {
                filter: brightness(1.1);
            }

    /* Cards */
    .battery-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 8px;
    }

    .battery-card {
        background: #ddd;
        border-radius: 12px;
        padding: 6px 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        box-shadow: 0 2px 6px rgba(0,0,0,.08);
    }

    .battery-card-header {
        font-weight: 600;
        font-size: 0.9em;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Grid principal de valores clave */
    .battery-card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 4px 6px;
    }

        /* Campos clave compactos: etiqueta+input en línea */
        .battery-card-grid .battery-field {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 4px;
            margin: 0;
            padding: 0;
            line-height: 1;
        }

            .battery-card-grid .battery-field label {
                margin: 0;
                font-size: 0.66em;
                font-weight: 600;
                white-space: nowrap;
            }

            .battery-card-grid .battery-field input.bhive-input {
                padding: 2px 4px !important;
                height: 20px !important;
                line-height: 18px !important;
                font-size: 0.66em !important;
                margin: 0 !important;
                flex: 0 0 58px;
                text-align: right;
            }

            .battery-card-grid .battery-field input[type="number"] {
                width: 58px !important;
                min-width: 58px !important;
            }

    /* Bloque avanzado plegable (Conexiones) */
    .battery-advanced {
        margin-top: 2px;
        font-size: 0.63em;
    }

        .battery-advanced summary {
            cursor: pointer;
            font-weight: 600;
            padding: 2px 0;
            line-height: 1;
            list-style: none;
        }

    .battery-advanced-content {
        margin-top: 2px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px 6px;
    }

        .battery-advanced-content .battery-field {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin: 0;
            padding: 0;
        }

            .battery-advanced-content .battery-field label {
                font-size: 0.58em;
                font-weight: 600;
                margin: 0;
                line-height: 1;
                white-space: nowrap;
            }

            .battery-advanced-content .battery-field input.bhive-input {
                width: 70px !important;
                min-width: 70px !important;
                padding: 2px 4px !important;
                height: 20px !important;
                font-size: 0.58em !important;
                text-align: right;
                margin: 0 !important;
            }

    /* Asegurar line-height mínimo */
    .battery-card input,
    .battery-card label {
        line-height: 1 !important;
    }
}


/* <========================================= FIN DE PAGINA DE CONFIGURACION DE BATERIAS ============================================>*/










/* <========================================= PAGINA DE OPERACION ============================================>*/



/* ===== BLOQUE MÓVIL OPERACIÓN (scroll horizontal config/días/periodos) ===== */
@media (max-width: 1000px) {



    .operationModeContainer {
        border-radius: 20px !important;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px !important;
        margin-top: 10px;
    }

    .divOperationModeTitlePlusSelector {
        flex: 0 0 100% !important;
        width: 100%;
        justify-content: space-between;
        margin: 0;
    }

    .startStopButtonDiv {
        flex: 0 0 100% !important;
        width: 100%;
        justify-content: center !important;
        gap: 16px;
        margin-top: 4px;
        padding: 0;
    }

    #startButton,
    #stopButton {
        width: 45% !important;
        max-width: 220px;
        flex: 1 1 140px;
        font-size: 15px;
        padding: 10px 14px;
    }

    .scroll-x {
        display: flex;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 4px 4px 10px 4px;
        scrollbar-width: none;
        position: relative;
    }

        .scroll-x::-webkit-scrollbar {
            display: none;
        }

        .scroll-x > * {
            flex: 0 0 auto;
            scroll-snap-align: start;
        }

    .configContainer.scroll-x .configPanel {
        min-width: 100px;
        max-width: 100px;
    }


    .panelWrapper.scroll-x .panel {
        width: 230px;
        flex: 0 0 230px;
        margin: 4px 6px;
    }

    .panelWrapper.scroll-x {
        flex-wrap: nowrap !important;
    }

    .scroll-x.fade::before,
    .scroll-x.fade::after {
        content: "";
        position: sticky;
        top: 0;
        width: 32px;
        height: 100%;
        pointer-events: none;
        z-index: 2;
    }

    .scroll-x.fade::before {
        left: 0;
        background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
    }

    .scroll-x.fade::after {
        right: 0;
        background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
    }

    .scroll-x.fade.no-left::before {
        opacity: 0;
    }

    .scroll-x.fade.no-right::after {
        opacity: 0;
    }

    .panel .period-field {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 2px 0;
        margin: 0;
    }

        .panel .period-field > label {
            flex: 1 1 55%;
            margin: 0;
            font-size: 0.68rem;
            line-height: 1.1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .panel .period-field input[type="number"],
        .panel .period-field input[type="time"],
        .panel .period-field select {
            flex: 0 0 35%;
            max-width: 35%;
            min-width: 0;
            font-size: 0.68rem;
            padding: 2px 4px;
            box-sizing: border-box;
        }

        .panel .period-field .unit {
            flex: 0 0 auto;
            font-size: 0.62rem;
            margin-left: 2px;
            color: #333;
            line-height: 1;
            white-space: nowrap;
        }

    .panel h3 {
        margin: 0 0 4px 0;
        font-size: 0.75rem;
    }

    .panel {
        padding: 10px 8px;
    }

    .day-selector {
        width: 90% !important;
    }



    #startButton, #stopButton {
        font-size: 11px !important;
    }

    .configPanel h3 {
        font-size: 13px !important;
    }

    .remove-config-button {
        width: 13px !important;
        height: 13px !important;
        font-size: 9px !important;
        top: 2px !important;
        right: 3px !important;
        margin-right: 1px !important;
        margin-left: 1px !important;
    }


    .add-config-button {
        width: 20px !important;
        height: 20px !important;
        border-radius: 5px !important;
    }

    .add-config-icon {
        font-size: 18px !important;
    }


    .contentWrapper {
        min-height: 300px !important;
    }


    .InfoIcon {
        margin-right: 0px !important;
        width: 18px !important;
        height: 18px !important;
    }

    .help-button {
        display: none !important;
        /*font-size: 0 !important;
        min-width: 50px !important;
        max-width: 10px !important;*/
    }


    .day-selector {
        margin-bottom: 5px !important;
    }


    .close-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 5px !important;
        right: 5px !important;
        width: 17px !important;
        height: 17px !important;
        font-size: 10px !important;
    }


    .add-panel-button {
        width: 20px !important;
        height: 20px !important;
        border-radius: 6px !important;
    }

    .add-panel-icon {
        font-size: 18px !important;
    }


    .cloud-left .cloud-section {
        margin-bottom: 12px !important;
    }

}

/* === Scroll horizontal para selector de configuraciones SOLO en < 1000px === */
/* Scroll horizontal SIMPLE para las configuraciones en móvil */
/* Scroll horizontal SIMPLE con !important para configuraciones en móvil */
@media (max-width: 1000px) {
    /* Contenedor principal de configs: no flex que estire, solo bloque */
    #configContainer {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important; /* evita que se expanda fuera */
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

        /* Fila interna */
        #configContainer .config-row {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            overflow: hidden !important;
        }

    /* El verdadero área scrollable */
    .config-panels {
        display: flex !important;
        flex: 0 0 auto !important; /* NO crecer */
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: nowrap !important; /* una sola línea */
        overflow-x: auto !important; /* scroll horizontal */
        overflow-y: hidden !important;
        gap: 12px !important;
        padding: 4px 4px 8px 4px !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        scrollbar-width: none;
    }

        .config-panels::-webkit-scrollbar {
            display: none !important;
        }

    .cloud-content-wrapper {
        margin-bottom: 0px !important;
        margin-top: 0px !important;
        min-height: auto !important;
        padding: 20px 0px 20px 0px !important;
    }

    .cloud-left {           
        height: fit-content !important;
    }


    .cloud-modes label,
    .radio-group label {
        font-size: 0.78rem !important;
    }

    .sidebar-modo-label {
        font-size: 11px !important;        
    }

    #modoOperacionTexto {
        font-size: 15px !important;
    }


}

/* ===== FIN BLOQUE MÓVIL OPERACIÓN ===== */




/* ======================= Identity Manage: overrides SOLO móvil ======================= */
@media (max-width: 1000px) {
    .row > .col-md-3 + .col-md-9 {
        margin-top: 28px; /* Ajusta el espacio horizontal */
    }

    /* Contenedor general: apilar y ajustar márgenes/padding */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;       
    }

    /* Títulos más compactos y con mejor separación */
    .row h3,
    h3 {
        font-size: 1.2rem !important;
        margin: 8px 0 12px 0 !important;
        padding: 0 !important;
        text-align: left;
    }

    /* Panel de opciones de gestión (caja gris oscura en tus páginas Manage) */
    .manage-panel-options {
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 16px 0 !important;
        padding: 14px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

        /* Formularios: ocupar ancho completo y tipografía/paddings más cómodos */
        .manage-panel-options form,
        .manage-panel-options .form-floating {
            width: 100% !important;
            max-width: 100% !important;
        }

            .manage-panel-options .form-floating .form-control {
                width: 100% !important;
                font-size: 0.95rem !important;
                padding: 10px 12px !important;
                margin: 0 !important;
                box-sizing: border-box !important;
            }

    .form-label {
        font-size: 0.85rem !important;
    }

    /* Validaciones: que no desborden */
    .text-danger {
        font-size: 0.85rem !important;
        white-space: normal !important;
    }

    /* Botones principales grandes y accesibles */
    .manage-panel-options .btn,
    .manage-panel-options .btn-primary,
    .manage-panel-options .btn-lg {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 1rem !important;
        padding: 10px 14px !important;
        margin: 6px 0 !important;
        border-radius: 10px !important;
    }

    /* Alineación de grupos de acciones en TwoFactorAuthentication */
    /* Botones como bloque vertical */
    .manage-panel-options a.btn.btn-primary,
    .manage-panel-options form button.btn.btn-primary {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Alertas: asegurar legibilidad y espaciado */
    .alert {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        padding: 10px 12px !important;
        margin: 8px 0 !important;
        border-radius: 10px !important;
    }

        /* Enlaces dentro de texto de alertas */
        .alert a {
            display: inline-block;
            margin-top: 6px;
        }

    /* Párrafos informativos */
    .manage-panel-options p {
        margin: 8px 0 !important;
        font-size: 0.95rem !important;
    }

    /* Espaciado entre grupos de campos en ChangePassword */
    #change-password-form .mb-3 {
        margin-bottom: 12px !important;
    }

    /* PersonalData: botón Eliminar cuenta destacado y a ancho completo */
    #delete.btn {
        width: 100% !important;
        font-weight: 600 !important;
    }

    /* TwoFactorAuthentication: títulos secundarios */
    .manage-panel-options h4 {
        font-size: 1.05rem !important;
        margin: 10px 0 !important;
    }

}

/* Pantallas muy estrechas: todavía más compacto */
@media (max-width: 400px) {
    .manage-panel-options {
        padding: 12px !important;
    }

        .manage-panel-options .btn,
        .manage-panel-options .btn-primary,
        .manage-panel-options .btn-lg {
            font-size: 0.95rem !important;
            padding: 9px 12px !important;
        }

        .manage-panel-options .form-floating .form-control {
            font-size: 0.9rem !important;
            padding: 9px 10px !important;
        }
}




/* ======================= VideoModal: overrides SOLO móvil ======================= */
@media (max-width: 1000px) {

    /* Contenedor del overlay */
    #videoModal {
        display: none; /* preserva el comportamiento por defecto */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0,0,0,0.75) !important;
        z-index: 9999 !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10px !important; /* pequeño padding para evitar pegado a los bordes */
        box-sizing: border-box !important;
    }

        /* Caja interior del modal (el div blanco) */
        #videoModal > div {
            width: 100% !important;
            max-width: 92vw !important;
            max-height: 90vh !important;
            overflow-y: auto !important;
            margin: 0 auto !important;
            padding: 14px !important;
            border-radius: 10px !important;
        }

    /* Título y descripción */
    #videoTitle {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    #videoDescr {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }

    /* Vídeo: ocupa todo el ancho disponible y mantiene proporción */
    #video {
        width: 100% !important;
        height: auto !important;
        max-height: 50vh !important; /* evita que crezca demasiado en vertical */
        display: block !important;
        border-radius: 8px !important;
    }

    /* Dots de navegación */
    #videoDots {
        display: flex !important;
        justify-content: center !important;
        gap: 6px !important;
        margin: 10px 0 !important;
    }

    .video-dot {
        width: 10px !important;
        height: 10px !important;
        margin: 0 3px !important;
    }

    /* Botonera: vertical y a ancho completo en móvil */
    #videoModal > div > div[style*="justify-content: center"][style*="margin-top: 15px"] {
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 12px !important;
    }

    #prevBtn,
    #nextBtn,
    #videoModal button {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 1rem !important;
        padding: 10px 14px !important;
        border-radius: 10px !important;
    }

    h1 {       
        margin-left: 0px !important;
    }
}

/* Pantallas muy estrechas: ajustes extra */
@media (max-width: 400px) {
    #videoModal > div {
        max-width: 95vw !important;
        padding: 12px !important;
    }

    #video {
        max-height: 45vh !important;
    }

    #videoTitle {
        font-size: 1rem !important;
    }

    #videoDescr {
        font-size: 0.9rem !important;
    }
}






/* ================== TIPOGRAFÍA MÁS COMPACTA EN MÓVIL ================== */

@media (max-width: 1000px) {

    /* 1. Base: bajar ligeramente (de 14px a ~12.5–13px) */
    html {
        font-size: 13px; /* Ajusta 12.5px si quieres aún más compacto */
    }

    body {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    /* 2. Encabezados (evita que ocupen demasiadas líneas) */
    h1 {
        font-size: clamp(1.25rem, 5vw, 1.55rem);
    }

    h2 {
        font-size: clamp(1.1rem, 4.2vw, 1.4rem);
    }

    h3 {
        font-size: clamp(1rem, 3.8vw, 1.2rem);
    }

    h4 {
        font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    }

    h5, h6 {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
    }

    /* 3. Contenedores clave */
    .operationModeContainer {
        font-size: 0.9rem;
    }

    .divOperationModeTitlePlusSelector > div {
        font-size: 0.95rem !important;
    }

    /* 4. Selects, inputs y botones: reducir padding y tipografía */
    select,
    input,
    button {
        font-size: 0.85rem;
    }

    #operationModeSelector {
        font-size: 0.85rem !important;
        padding: 4px 6px;
    }

    #startButton,
    #stopButton {
        font-size: 0.85rem;
        padding: 8px 8px;
    }

    /* 5. Paneles / tarjetas */
    .panel {
        font-size: 0.8rem;
        padding: 10px 10px 12px;
    }

        .panel h3 {
            font-size: 0.9rem;
            margin-bottom: 4px;
        }

        .panel label {
            font-size: 0.72rem;
            margin-top: 6px;
        }

    .configPanel h3 {
        font-size: 0.85rem;
    }

    .configPanel {
        padding: 6px 8px;
    }

    /* 6. Día selector */
    .day-selector {
        width: 100%;
        font-size: 0.8rem;
        padding: 6px 4px;
    }

    .day-selector-label {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .day-cell {
        font-size: 0.7rem;
        padding: 6px 4px;
        border-radius: 1px;
    }

        .cloud-section .section-title {
            font-size: 0.9rem;
        }

    .cloud-modes input[type="radio"] {
        width: 14px;
        height: 14px;
    }

        .cloud-modes input[type="radio"]:checked::before {
            width: 7px;
            height: 7px;
        }

    /* 8. Inputs dentro de paneles: más compactos */
    .panel input[type="number"],
    .panel input[type="time"],
    .panel select {
        font-size: 0.75rem;
        padding: 2px 4px;
    }

    /* 9. Botón ayuda / utilitarios */
    .help-button {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: 90px;
    }

    /* 10. Modales (si aparecen muy grandes) */
    .modal-content {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    /* 11. Evitar que algo heredado “explote” usando clamp */
    .max-consumption,
    .max-injection,
    .charge-power,
    .discharge-power,
    .max-charge-soc,
    .min-discharge-soc {
        font-size: 0.75rem;
    }

    /* 12. Ajustar tabla si la usas en esta vista */
    table,
    .table,
    .table th,
    .table td {
        font-size: 0.75rem;
    }
}

/* Vista móvil: mostrar solo la primera letra de los días */
.day-cell .day-name-short {
    display: none;
}

@media (max-width: 1000px) {
    .day-cell .day-name-full {
        display: none;
    }

    .day-cell .day-name-short {
        display: inline;
        font-weight: 600;
    }

    .day-selector.scroll-x .day-cell {
        flex: 0 0 2.2ch;
        min-width: 6.5ch;
        width: 6.5ch;
        padding: 8px 4px;
        text-align: center;
    }

    /* === Centrar el bloque de días dentro de su padre en móvil === */
    #configPlusPeriodsDiv {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centra horizontalmente hijos (incluye day-selector) */
    }

    .day-selector.scroll-x {
        margin-left: auto;
        margin-right: auto;
        justify-content: center; /* Centra el contenido interno si usa flex */
    }

        .day-selector.scroll-x .day-table {
            justify-content: center; /* Centra las celdas dentro del inline-flex */
        }
}