/* === FONDO GENERAL === */
body {
    background-color: #ECEDFF; /* Fondo claro suave */
    color: #2C346C; /* Color base para textos */
}

/* === GR�FICOS (canvas) === */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* === TARJETAS DEL DASHBOARD === */
.dashboard-wrapper .card {
    border-radius: 25px;
    background: #ffffff; 
    box-shadow: 8px 8px 16px #d6dae8, -8px -8px 16px #ffffff;
    padding: 30px 25px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease-in-out;
    border: 1px solid #e3e6ef;
}

    .dashboard-wrapper .card:hover {
        transform: translateY(-3px);
    }

/* Espaciado interno del contenido de tarjeta */
.card .card-body {
    padding: 0 10px 10px 10px;
}

/* Encabezado de tarjeta */
.card-header {
    text-align: center;
    background-color: transparent;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2C346C;
    border-bottom: none;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

/* Centrado de canvas */
.card .chart-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === CONTROL RESPONSIVO === */
@media (min-width: 768px) {
    .dashboard-wrapper > * {
        /* Permitir uso libre de col-md-6/4 sin sobrescribir */
    }
}

/* === SIDEBAR (desktop) === */
.sidebar {
    background-color: #272D5D !important;
    border-radius: 0 15px 15px 0;
    padding: 1rem 0.75rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1020;
}

    .sidebar h5 {
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 1rem;
    }

    .sidebar .nav-link.sidebar-link {
        font-size: 1rem;
        padding: 14px 22px;
        display: flex;
        align-items: center;
        gap: 12px;
        border-radius: 8px;
        color: #ffffff;
        transition: background 0.3s;
    }

        .sidebar .nav-link.sidebar-link:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }

        .sidebar .nav-link.sidebar-link i {
            font-size: 1.0rem;
        }

.sidebar-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 5px;
}

/* === SIDEBAR M�VIL === */
.offcanvas-start.bg-dark {
    background-color: #272D5D  !important;
    color: #ffffff;
}

.offcanvas .offcanvas-title {
    font-size: 1.9rem;
    font-weight: bold;
}

.offcanvas .nav-link {
    font-size: 1.6rem;
    padding: 12px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .offcanvas .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .offcanvas .nav-link i {
        font-size: 1.6rem;
    }

/* === TABLAS (estilo limpio para res�menes) === */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

    .table thead th {
        background-color: #ECEDFF;
        border: none;
        color: #2C346C;
        font-weight: 600;
    }

    .table tbody td {
        background-color: #ffffff;
        border: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
        color: #2C346C;
        vertical-align: middle;
    }

    .table thead th,
    .table tbody td {
        font-size: 20px;
        padding: 12px 16px;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9fbff;
}

/* Opcional: ajustar la tarjeta para que no limite el crecimiento */
.card {
    padding: 20px 24px;
}


/* Centrar la tabla dentro de la tarjeta */
.card .table {
    margin: 0 auto;
    width: 90%;
}

/* === SCROLL PARA REPORTES === */
.reporte-scrollable {
    max-height: 400px;
    overflow-y: auto;
}

/* === GR�FICOS EN DISPOSITIVOS PEQUE�OS === */
@media (max-width: 768px) {
    .chart-container canvas {
        max-width: 100% !important;
    }

    .chart-container {
        padding: 0 10px;
    }

    .chartjs-legend li {
        font-size: 13px !important;
        line-height: 1.2;
        white-space: normal;
        max-width: 130px;
    }


    .table thead th,
    .table tbody td {
        font-size: 15px!important;
        padding: 12px 16px;
    }
   
}
/*kpis*/
.card {
    background-color: #ffffff !important;
    border-radius: 25px;
    box-shadow: 5px 5px 15px #d9dce3, -5px -5px 15px #ffffff;
    border: 1px solid #e3e6ef;
}
    .card.kpi {
        background: #ffffff;
        border-radius: 25px;
        box-shadow: 5px 5px 15px #d9dce3, -5px -5px 15px #ffffff;
        padding: 20px;
        border: 1px solid #e3e6ef;
        font-family: 'Poppins', sans-serif;
        color: #2C346C;
        text-align: center;
        transition: all 0.3s ease-in-out;
    }

        .card.kpi h4 {
            font-size: 1.6rem;
            font-weight: bold;
            color: #2C346C;
        }

        .card.kpi h6 {
            font-size: 0.95rem;
            font-weight: 500;
            color: #6c757d;
        }
        /*Botones de fecha en el dasboard*/
.btn-mes {
    background-color: #ffffff;
    color: #2C346C;
    border: 1px solid #e3e6ef;
    border-radius: 25px;
    box-shadow: 5px 5px 15px #d9dce3, -5px -5px 15px #ffffff;
    font-weight: 500;
    padding: 6px 16px;
    transition: all 0.2s ease-in-out;
}

    .btn-mes:hover {
        background-color: #f4f6ff;
    }

    .btn-mes.active {
        background-color: #2C346C;
        color: #ffffff;
        border: 1px solid #2C346C;
        box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
    }
    .btn-mes:disabled {
        opacity: 1 !important;
        cursor: default;
        box-shadow: 5px 5px 15px #d9dce3, -5px -5px 15px #ffffff;
        background-color: #ffffff !important;
        color: #2C346C !important;
    }

    /*Menus*/
.card-header.menu-header {
    background-color: #272D5D;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    font-size: 1.3rem;
    border-radius: 12px 12px 0 0;
    padding: 12px 20px;
}

.scrollable-table {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e3e6ef;
    border-radius: 12px;
}

