/* SAMAI - ESTADÍSTICAS DE GESTIÓN SECRETARIAL
/* CONTENEDOR PRINCIPAL */

.wgs-graficas {
    --wgs-primary: #183446;
    --wgs-primary-light: #264657;
    --wgs-green: #477c60;
    --wgs-background: #f4f7f8;
    --wgs-white: #ffffff;
    --wgs-text: #203543;
    --wgs-muted: #677b86;
    --wgs-border: #e1e9ed;
    max-width: 1400px;
    margin: 20px auto 35px;
    padding: 27px 25px 35px;
    background: var(--wgs-background);
    color: var(--wgs-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    border-radius: 12px;
}

    .wgs-graficas,
    .wgs-graficas * {
        box-sizing: border-box;
    }


/* ENCABEZADO */

.wgs-graficas-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.wgs-graficas-eyebrow {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.6px;
    color: var(--wgs-green);
    margin-bottom: 8px;
}

.wgs-graficas-head h1 {
    color: var(--wgs-primary);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
}

.wgs-graficas-subtitle {
    font-size: 14px;
    color: var(--wgs-muted);
    margin: 0 0 13px;
}

.wgs-graficas-dependencia {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    background: #e9f1ed;
    color: #36644e;
    padding: 8px 13px;
    border-radius: 25px;
    font-size: 12px;
}

.wgs-graficas-dependencia-icon {
    font-size: 13px;
    color: #477c60;
}

.wgs-graficas-head-status {
    display: flex;
    align-items: center;
    gap: 9px;
    background: white;
    border: 1px solid var(--wgs-border);
    padding: 12px 15px;
    border-radius: 11px;
    color: #5b7482;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wgs-graficas-status-dot {
    width: 8px;
    height: 8px;
    background: #64a781;
    border-radius: 50%;
}


/* CONTEXTO DEL USUARIO */

.wgs-graficas-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #edf2f4;
    border: 1px solid #dce6eb;
    border-radius: 9px;
    color: #617684;
    font-size: 12px;
}

    .wgs-graficas-user strong {
        color: #304e5e;
    }


/* FILTROS */

.wgs-graficas-filtros {
    background: var(--wgs-white);
    border: 1px solid var(--wgs-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 28px rgba(27, 53, 68, 0.05);
}

.wgs-graficas-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 17px;
}

    .wgs-graficas-section-head h2 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--wgs-primary-light);
    }

    .wgs-graficas-section-head span {
        color: #7c919b;
        font-size: 11px;
    }

.wgs-graficas-filtros-grid {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.2fr) minmax(220px, 2fr) auto;
    align-items: end;
    gap: 14px;
}

.wgs-graficas-field {
    min-width: 0;
}

    .wgs-graficas-field label {
        display: block;
        margin-bottom: 7px;
        color: #536c78;
        font-size: 12px;
        font-weight: 700;
    }

.wgs-graficas-required {
    color: #b24d45;
}

.wgs-graficas-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cfdae0;
    border-radius: 9px;
    background: #fcfdfd;
    color: var(--wgs-text);
    font-size: 13px;
}

    .wgs-graficas-field select:focus {
        outline: none;
        border-color: var(--wgs-green);
        box-shadow: 0 0 0 3px #d9eade;
    }

    .wgs-graficas-field select:disabled {
        background: #f5f7f8;
        color: #8798a1;
        cursor: not-allowed;
    }

.wgs-graficas-btn {
    width: 100%;
    min-width: 170px;
    height: 42px;
    border: none;
    border-radius: 9px;
    background: var(--wgs-green);
    color: white;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

    .wgs-graficas-btn:hover:not(:disabled) {
        background: #315e48;
    }

    .wgs-graficas-btn:disabled {
        background: #98afa2;
        cursor: not-allowed;
    }

.wgs-graficas-filtros-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid #edf1f3;
    margin-top: 17px;
    padding-top: 14px;
}

.wgs-graficas-consulta-estado {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #667b85;
    font-size: 12px;
}

.wgs-graficas-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #f1f4f5;
    color: #697c84;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.wgs-graficas-ultima-consulta {
    font-size: 11px;
    color: #81929c;
}


/* TARJETAS DE INDICADORES */

.wgs-graficas-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.wgs-graficas-kpi {
    position: relative;
    overflow: hidden;
    min-height: 140px;
    padding: 17px;
    background: white;
    border: 1px solid var(--wgs-border);
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(27, 53, 68, 0.05);
}

    .wgs-graficas-kpi::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--wgs-kpi-color);
    }

.wgs-graficas-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    color: #607682;
    font-size: 12px;
    font-weight: 700;
}

.wgs-graficas-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    background: var(--wgs-kpi-background);
    color: var(--wgs-kpi-color);
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
}

.wgs-graficas-kpi-value {
    margin: 12px 0 6px;
    color: #203946;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.wgs-graficas-kpi-description {
    font-size: 11px;
    line-height: 1.5;
    color: #8b9ba4;
}


/* COLORES POR INDICADOR */

.wgs-graficas-kpi-recibidas {
    --wgs-kpi-color: #628fa9;
    --wgs-kpi-background: #eaf3f8;
}

.wgs-graficas-kpi-asignadas {
    --wgs-kpi-color: #8874af;
    --wgs-kpi-background: #f0edfa;
}

.wgs-graficas-kpi-cerradas {
    --wgs-kpi-color: #589871;
    --wgs-kpi-background: #eaf7ee;
}

.wgs-graficas-kpi-pendientes {
    --wgs-kpi-color: #b28c52;
    --wgs-kpi-background: #faf3e6;
}

.wgs-graficas-kpi-vencidas {
    --wgs-kpi-color: #c16f67;
    --wgs-kpi-background: #faeeec;
}


/* CONTENEDORES DE GRÁFICAS */

.wgs-graficas-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.wgs-graficas-chart-card {
    min-width: 0;
    padding: 21px;
    background: white;
    border: 1px solid var(--wgs-border);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(27, 53, 68, 0.05);
}

.wgs-graficas-chart-full {
    grid-column: 1 / -1;
}

.wgs-graficas-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

    .wgs-graficas-chart-header h2 {
        margin: 0;
        color: var(--wgs-primary-light);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.4;
    }

    .wgs-graficas-chart-header p {
        margin: 6px 0 0;
        color: #80919b;
        font-size: 12px;
        line-height: 1.5;
    }

.wgs-graficas-chart-badge {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid #e3ece9;
    border-radius: 20px;
    background: #f0f7f3;
    color: #5d8973;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.wgs-graficas-chart-area {
    width: 100%;
    height: 310px;
    margin-top: 18px;
}

.wgs-graficas-chart-full .wgs-graficas-chart-area {
    height: 340px;
}

.wgs-graficas-chart-area.wgs-graficas-chart-short {
    height: 250px;
}


/* ESPACIOS VACÍOS DE GRÁFICAS */

.wgs-graficas-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 25px;
    border: 1px dashed #d3e0e4;
    border-radius: 11px;
    background: linear-gradient( 125deg, #fbfdfe, #f8fbfc );
    color: #90a4ae;
    text-align: center;
}

.wgs-graficas-placeholder-icon {
    margin-bottom: 12px;
    font-size: 34px;
    line-height: 1;
    opacity: 0.65;
}

.wgs-graficas-placeholder strong {
    margin-bottom: 6px;
    color: #718c9a;
    font-size: 13px;
    font-weight: 700;
}

.wgs-graficas-placeholder p {
    max-width: 320px;
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}


/* NOTA INFORMATIVA */

.wgs-graficas-nota {
    margin-top: 21px;
    padding: 16px 18px;
    background: #eaf1f3;
    border-radius: 11px;
    color: #56707d;
    font-size: 12px;
    line-height: 1.7;
}


/* ACCESO DENEGADO */

.wgs-graficas-acceso-denegado {
    padding: 25px;
    background: #fdf1ef;
    border: 1px solid #f0d6cf;
    border-left: 4px solid #c16f67;
    border-radius: 11px;
    color: #9a4a43;
}

    .wgs-graficas-acceso-denegado h3 {
        margin: 0 0 12px;
        font-size: 19px;
    }

    .wgs-graficas-acceso-denegado p {
        margin: 0;
        font-size: 13px;
    }


/* DISEÑO RESPONSIVO */

@media (max-width: 1100px) {

    .wgs-graficas-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wgs-graficas-filtros-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wgs-graficas-btn {
        width: 100%;
    }
}


@media (max-width: 768px) {

    .wgs-graficas {
        margin: 12px;
        padding: 20px 15px;
    }

    .wgs-graficas-head {
        flex-direction: column;
    }

        .wgs-graficas-head h1 {
            font-size: 24px;
        }

    .wgs-graficas-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wgs-graficas-layout {
        grid-template-columns: 1fr;
    }

    .wgs-graficas-chart-full {
        grid-column: auto;
    }

    .wgs-graficas-chart-header {
        flex-wrap: wrap;
    }

    .wgs-graficas-filtros-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


@media (max-width: 520px) {

    .wgs-graficas-filtros-grid {
        grid-template-columns: 1fr;
    }

    .wgs-graficas-kpis {
        grid-template-columns: 1fr;
    }

    .wgs-graficas-chart-card {
        padding: 15px;
    }

    .wgs-graficas-chart-area {
        height: 270px;
    }

    .wgs-graficas-chart-full .wgs-graficas-chart-area {
        height: 290px;
    }
}

/* CONTEXTO INSTITUCIONAL */

.wgs-graficas-saludo {
    width: calc(100% - 34px);
    margin: 18px auto 12px;
    color: #26394f;
    font-size: 14px;
    line-height: 1.6;
}

    .wgs-graficas-saludo strong {
        color: #173d70;
        font-weight: 700;
    }


/* CONTENEDOR PRINCIPAL */

.wgs-graficas {
    --wgs-primary: #123f77;
    --wgs-primary-light: #194e8b;
    --wgs-green: #1769d2;
    --wgs-background: #ffffff;
    --wgs-white: #ffffff;
    --wgs-text: #20364f;
    --wgs-muted: #6680a0;
    --wgs-border: #dfe6f0;
    max-width: none;
    width: calc(100% - 34px);
    margin: 0 auto 30px;
    padding: 20px 19px 26px;
    background: #ffffff;
    border: 1px solid #e0e6f0;
    border-radius: 11px;
    box-shadow: 0 2px 8px rgba(25, 55, 95, 0.04);
}


/* ENCABEZADO */

.wgs-graficas-head {
    margin-bottom: 20px;
}

    .wgs-graficas-head h1 {
        color: #123f77;
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 5px;
    }

.wgs-graficas-subtitle {
    color: #6280a8;
    font-size: 13px;
    margin: 0;
}

.wgs-graficas-head-status {
    background: #f6f9fe;
    border: 1px solid #dfe8f5;
    color: #426b9b;
    box-shadow: none;
}


/* FILTROS */

.wgs-graficas-filtros {
    border: 1px solid #dce5f2;
    border-radius: 10px;
    box-shadow: none;
    margin-bottom: 17px;
}

.wgs-graficas-section-head h2 {
    color: #123f77;
}

.wgs-graficas-field label {
    color: #244b7b;
}

.wgs-graficas-field select {
    border: 1px solid #cdd9e9;
    border-radius: 7px;
}

    .wgs-graficas-field select:focus {
        border-color: #1769d2;
        box-shadow: 0 0 0 3px rgba(23, 105, 210, 0.12);
    }


/* BOTÓN DE CONSULTA */

.wgs-graficas-btn {
    background: #1769d2;
    border-radius: 7px;
}

    .wgs-graficas-btn:hover:not(:disabled) {
        background: #1254ad;
    }

    .wgs-graficas-btn:disabled {
        background: #9fb2cc;
    }


/* TARJETAS DE INDICADORES */

.wgs-graficas-kpis {
    gap: 12px;
    margin-bottom: 22px;
}

.wgs-graficas-kpi {
    min-height: 145px;
    padding: 15px 13px;
    border: 1px solid #dce5f0;
    border-bottom: 4px solid var(--wgs-kpi-color);
    border-radius: 9px;
    box-shadow: none;
}


    /* Eliminar borde lateral anterior */

    .wgs-graficas-kpi::before {
        display: none;
    }


/* Colocar icono a la izquierda */

.wgs-graficas-kpi-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

    .wgs-graficas-kpi-header > span {
        color: #173e72;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

.wgs-graficas-kpi-icon {
    width: 41px;
    height: 41px;
    border-radius: 9px;
    font-size: 21px;
}


/* Alinear los valores con los títulos */

.wgs-graficas-kpi-value {
    margin: 0 0 2px 53px;
    color: var(--wgs-kpi-color);
    font-size: 28px;
    font-weight: 700;
}

.wgs-graficas-kpi-description {
    margin-left: 53px;
    color: #6883a6;
    font-size: 11px;
}


/* COLORES CONSISTENTES CON EL GESTOR */

.wgs-graficas-kpi-recibidas {
    --wgs-kpi-color: #1685ac;
    --wgs-kpi-background: #e6f4f9;
}

.wgs-graficas-kpi-asignadas {
    --wgs-kpi-color: #159653;
    --wgs-kpi-background: #e8f7ee;
}

.wgs-graficas-kpi-cerradas {
    --wgs-kpi-color: #687b96;
    --wgs-kpi-background: #eef1f6;
}

.wgs-graficas-kpi-pendientes {
    --wgs-kpi-color: #1769d2;
    --wgs-kpi-background: #e9f2ff;
}

.wgs-graficas-kpi-vencidas {
    --wgs-kpi-color: #df3851;
    --wgs-kpi-background: #fdeef1;
}


/* CONTENEDORES DE GRÁFICAS */

.wgs-graficas-chart-card {
    border: 1px solid #dce5f2;
    border-radius: 10px;
    box-shadow: none;
}

.wgs-graficas-chart-header h2 {
    color: #123f77;
}

.wgs-graficas-chart-header p {
    color: #6883a6;
}

.wgs-graficas-chart-badge {
    background: #edf4ff;
    border: 1px solid #dce8fb;
    color: #3368aa;
}


/* NOTA INFORMATIVA */

.wgs-graficas-nota {
    background: #edf4fc;
    color: #43668f;
    border: 1px solid #dce7f6;
}


/* RESPONSIVE */

@media (max-width: 768px) {

    .wgs-graficas {
        width: calc(100% - 20px);
        margin: 0 auto 20px;
        padding: 17px 13px;
    }

    .wgs-graficas-saludo {
        width: calc(100% - 20px);
        margin: 12px auto;
    }

    .wgs-graficas-kpi-value {
        margin-left: 53px;
    }

    .wgs-graficas-kpi-description {
        margin-left: 53px;
    }
}