html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-image: url('../img/dashboard_background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* HEADER */
header nav {
    background-color: #030531;
    color: white;
}

.nav-link.active {
    text-decoration: underline;
    text-decoration-style: double;
}

#btnCerrarSesion {
    display: none;
}

/* MAIN */
main {
    flex: 1;
}

/* FOOTER */
footer {
    background-color: #030531;
    color: white;
    text-align: center;
    padding: 10px 0;
}

/* STATS */
.stats {
    color: white;
    font-weight: 600;
    font-size: 1.3em;
}

#stats-ventas-usd, #stats-margenBruto-usd, #stats-gastos-usd, #stats-margenNeto-usd {
    font-size: 0.9em;
}

/* CHART */
.chart-card {
    width: 80%;
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
}

#comparacionKilos, #gastosRRHH-Fijos {
    max-height: 400px;
}

/* TABLE */
.table-card {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
    max-height: 350px;
    overflow-y: auto;
}

.table th, .table td {
    text-align: center;
}

th {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

#selectCentroCosto {
    width: 15%;
}

.table-responsive {
    overflow-x: auto;
    max-width: 100%;
    display: inline-block; 
}

/* --- Media Query --- */
@media (max-width: 768px) {
    .stats {
        font-size: 1em;
    }

    #selectCentroCosto {
        width: 80%;
    }
}

/* Responsive design para tablas y gráficos */
@media (max-width: 768px) {
    .table-card, .chart-card {
        width: 100%;
    }

    .container .row {
        flex-direction: column;
    }
}