
:root {
    --azul: #376C9A;
    --verde: #A7E300;
    --gris-claro: #f4f6f9;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--gris-claro);
    font-family: "Poppins", "Roboto", sans-serif;
}

.navbar {
    background-color: var(--verde);
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    padding: 0px;
    padding-left: 5px;
    padding-right: 10px;
}
.navbar-container {
    padding: 0px;
    align-items:flex-end!Important;
}
.img-logo {
    height: 105px;
}
.main-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.sidebar {
    background-color: var(--azul);
    height: 100%;
    color: white;
}

    .sidebar a {
        color: white;
        text-decoration: none;
        display: block;
        padding: 12px 20px;
        transition: background 0.2s;
    }

        .sidebar a:hover {
            background-color: rgba(255, 255, 255, 0.15);
            border-left: 4px solid var(--verde);
        }

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--gris-claro);
}

/* Botón flotante */
.btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--verde);
    color: #fff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1050;
}

    .btn-float:hover {
        background-color: #8cd100;
    }

.table th {
    background-color: #eaf2f8;
}

.status-dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
}

.activo {
    background-color: #5cb85c;
}

.inactivo {
    background-color: #d9534f;
}

.chart-row {
    background-color: #f9fafb;
}

/* Tarjetas móviles */
.sensor-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    padding: 15px;
}

    .sensor-card .title {
        font-weight: 600;
        color: var(--azul);
        font-size: 1.1rem;
    }

    .sensor-card small {
        color: gray;
    }

.card-toggle {
    cursor: pointer;
    color: var(--azul);
    transition: transform 0.2s;
}

    .card-toggle.rotate {
        transform: rotate(180deg);
    }

.chart-container {
    display: none;
    margin-top: 10px;
    transition: opacity 0.3s ease;
}

.navbar-brand {
    align-items: flex-end;
}
.header-title {
    font-size:40pt;
}
.nav-link {
    padding:0px;
}
.menu-collapsible i.rotate {
    transform: rotate(180deg);
    transition: transform 0.3s;
}
.dropdown-menu {
    border-radius: 10px;
    border: none;
    padding: 8px 0;
}

.dropdown-item {
    font-size: 0.9rem;
    padding: 8px 16px;
    color: #333;
}

    .dropdown-item:hover {
        background-color: var(--gris-claro);
    }

.dropdown-header {
    font-size: 0.75rem;
    text-transform: uppercase;
}
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .submenu {
    position: absolute;
    top: 0;
    right: 100%; /* 👈 hacia la izquierda */
    margin-right: .15rem;
    display: none;
    min-width: 160px;
    border-radius: 10px;
    border: none;
    z-index: 1000;
}

    .dropdown-submenu > .submenu.show {
        display: block;
    }

/* opcional: feedback visual en la flecha */
.dropdown-submenu > a .bi-chevron-left {
    transition: transform .2s;
}

.dropdown-submenu > a.active .bi-chevron-left {
    transform: translateX(-3px);
}

.dropdown-item.active, .dropdown-item:active {
    color: #000;
    background-color:#e0e0e0;
}
.area-main-table {
    top:220px;
    height: Calc(100% - 250px);
    overflow: auto;
    width: Calc(100% - 290px);
    position: fixed;
    padding:0px;
    margin-top:10px;
}

    .area-main-table thead th {
        position: sticky;
        top: 0;
        z-index: 10; /* mantiene el header encima */
    }


#clearSearch i {
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

#clearSearch:hover i {
    color: var(--verde);
}

#txtSearch {
    padding-right: 2rem !important;
}
@media (max-width: 991px) {
    .sidebar {
        display: none;
    }

    .desktop-view {
        display: none !important;
    }
    .full-view .area-main-table{
        width:calc( 100% - 40px);
        top:150px;
    }
    .mobile-view {
        display: block !important;
    }

    .img-logo {
        height: 30px;
    }

    .navbar-brand {
        width: Calc(100% - 130px);
    }

    .hamburguer {
        margin-right: 0px !Important;
    }

    .header-title {
        font-size: 14pt;
    }

    .header-toolbar {
        margin-bottom: 5px;
    }
}

@media (min-width: 992px) {
    .mobile-view {
        display: none !important;
    }

    .header-toolbar {
        margin-bottom: 15px;
        margin-right: 20px;
    }
}
