/* =========================
   CONFIGURACIÓN GENERAL
   ========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f1f5f9;

    display: flex;
}


/* =========================
   ESTRUCTURA DEL DASHBOARD
   ========================= */

.dashboard {
    display: flex;
    min-height: 100vh;
}


/* =========================
   MENÚ LATERAL
   ========================= */

.sidebar {
    width: 250px;
    min-height: 100vh;
    padding: 25px 18px;
    box-sizing: border-box;

    background: linear-gradient(
        180deg,
        #0f766e 0%,
        #155e75 50%,
        #4c1d95 100%
    );

    color: white;
    flex-shrink: 0;
}


/* Título */

.sidebar h2 {
    margin: 0 0 40px 0;
    text-align: center;
    font-size: 24px;
    color: white;
}


/* =========================
   MENÚ
   ========================= */

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.sidebar nav a {
    display: block;

    padding: 14px 16px;

    color: white;
    text-decoration: none;

    border-radius: 10px;

    font-size: 16px;

    transition: 0.2s;
}


/* Cuando pasamos el mouse */

.sidebar nav a:hover {
    background-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.sidebar nav a.active {
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: bold;
}

/* =========================
   CONTENIDO PRINCIPAL
   ========================= */

.main-content {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    min-width: 0;
}

/* Título principal */

.main-content h1 {
    margin-top: 0;

    font-size: 36px;

    color: #183b56;
}


/* Texto */

.main-content p {
    font-size: 18px;
    color: #52616b;
}





/* =========================
   EFECTO DEL MENÚ
   ========================= */

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 20px;
    margin: 8px 0;

    border-radius: 12px;

    color: white;
    text-decoration: none;

    transition: all 0.25s ease;
}

/* Cuando pasamos el mouse */
.sidebar a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(5px);
}

/* Página actualmente seleccionada */
.sidebar a.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: bold;
}

/* ==============================
   TARJETAS KPI
   ============================== */

.kpi-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 35px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #188b83;
}

.kpi-card h3 {
    margin: 0 0 15px 0;
    color: #52616b;
    font-size: 16px;
}

.kpi-card strong {
    display: block;
    font-size: 32px;
    color: #183b56;
    margin-bottom: 8px;
}

.kpi-card span {
    color: #52616b;
    font-size: 14px;
}


/* ==============================
   GRÁFICOS
   ============================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-card h2 {
    margin-top: 0;
    color: #183b56;
    font-size: 20px;
}

.chart-placeholder {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fa;
    border-radius: 10px;
    color: #52616b;
}


/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 1000px) {

    .kpi-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    .kpi-container {
        grid-template-columns: 1fr;
    }


}

/* ========================================
   KPI CORRECTIVOS
======================================== */

#kpis-correctivos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.kpi-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-left: 5px solid #1f4e79;
}

.kpi-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #555;
}

.kpi-card span {
    font-size: 32px;
    font-weight: bold;
    color: #1f4e79;
}
