/* =====================================================
   WGestionSecretarial.css
   Módulo de Gestión Secretarial
   ===================================================== */
/* =====================================================
   1. CONTENEDOR PRINCIPAL DEL MONITOR
   ===================================================== */

.wgs-monitor {
    margin: 5px 0 28px 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* =====================================================
   2. ENCABEZADO DEL MONITOR
   ===================================================== */

.wgs-monitor-header {
    margin-bottom: 20px;
}

.wgs-monitor-title {
    margin: 0;
    color: #173b67;
    font-size: 26px;
    font-weight: 700;
}

.wgs-monitor-subtitle {
    margin: 5px 0 0 0;
    color: #64748b;
    font-size: 15px;
}

/* =====================================================
   3. TARJETAS DE INDICADORES
   ===================================================== */

.wgs-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.wgs-card {
    position: relative;
    min-height: 108px;
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .wgs-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09);
    }

    .wgs-card::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 4px;
        background: var(--wgs-color);
    }

/* =====================================================
   4. ICONOS
   ===================================================== */

.wgs-card-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--wgs-color);
    background: var(--wgs-soft);
    font-size: 24px;
}


/* =====================================================
   5. TEXTO Y VALORES
   ===================================================== */

.wgs-card-content {
    min-width: 0;
}

.wgs-card-label {
    margin-bottom: 3px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.wgs-card-value {
    color: var(--wgs-color);
    font-size: 31px;
    line-height: 1;
    font-weight: 700;
}

/* =====================================================
   6. COLORES POR ESTADO
   ===================================================== */

.wgs-card-asignar {
    --wgs-color: #1769d2;
    --wgs-soft: #eaf3ff;
}

.wgs-card-mios {
    --wgs-color: #168447;
    --wgs-soft: #eaf8ef;
}

.wgs-card-gestion {
    --wgs-color: #6a42c2;
    --wgs-soft: #f1ecfb;
}

.wgs-card-novedad {
    --wgs-color: #e58200;
    --wgs-soft: #fff5e6;
}

.wgs-card-vencer {
    --wgs-color: #0794aa;
    --wgs-soft: #e7f8fb;
}

.wgs-card-vencidos {
    --wgs-color: #d83b45;
    --wgs-soft: #fdecee;
}

/* =====================================================
   7. RESPONSIVE
   ===================================================== */

@media (max-width: 1200px) {
    .wgs-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .wgs-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .wgs-cards {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   8. FILTROS DEL MONITOR
   ===================================================== */

.wgs-filters {
    margin-top: 18px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.wgs-filters-title {
    margin: 0 0 15px 0;
    color: #173b67;
    font-size: 16px;
    font-weight: 700;
}

.wgs-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.wgs-filter-group {
    min-width: 0;
}

.wgs-filter-label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.wgs-filter-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
    outline: none;
}

    .wgs-filter-control:focus {
        border-color: #1769d2;
        box-shadow: 0 0 0 3px rgba(23, 105, 210, 0.10);
    }

/* =====================================================
   9. BÚSQUEDA DEL MONITOR
   ===================================================== */

.wgs-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 14px;
}

.wgs-search-box {
    position: relative;
}

.wgs-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
    pointer-events: none;
}

.wgs-search-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
    outline: none;
}

    .wgs-search-input:focus {
        border-color: #1769d2;
        box-shadow: 0 0 0 3px rgba(23, 105, 210, 0.10);
    }

.wgs-filter-button {
    min-width: 120px;
    height: 42px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: #1769d2;
    border: 1px solid #1769d2;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .wgs-filter-button:hover {
        background: #1259b3;
        border-color: #1259b3;
    }

/* =====================================================
   10. RESPONSIVE - FILTROS
   ===================================================== */

@media (max-width: 992px) {

    .wgs-filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {

    .wgs-filters-grid {
        grid-template-columns: 1fr;
    }

    .wgs-search-row {
        grid-template-columns: 1fr;
    }

    .wgs-filter-button {
        width: 100%;
    }
}

/* =====================================================
   11. BANDEJA DE CASOS SECRETARIALES
   ===================================================== */

.wgs-case-tray {
    margin-top: 18px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.wgs-case-tray-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.wgs-case-tray-title {
    margin: 0;
    color: #173b67;
    font-size: 16px;
    font-weight: 700;
}

.wgs-case-tray-description {
    margin: 4px 0 0 0;
    color: #64748b;
    font-size: 13px;
}


/* =====================================================
   12. TABLA DE CASOS
   ===================================================== */

.wgs-table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.wgs-case-table {
    width: 100%;
    min-width: 1250px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13px;
}

    .wgs-case-table thead th {
        padding: 11px 10px;
        color: #ffffff;
        background: #174f91;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 12px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }

        .wgs-case-table thead th:last-child {
            border-right: none;
        }

    .wgs-case-table tbody td {
        padding: 11px 10px;
        color: #334155;
        border-right: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
        vertical-align: middle;
    }

        .wgs-case-table tbody td:last-child {
            border-right: none;
        }

    .wgs-case-table tbody tr:last-child td {
        border-bottom: none;
    }

    .wgs-case-table tbody tr:hover {
        background: #f8fafc;
    }

.wgs-case-radicado {
    white-space: nowrap;
}

.wgs-case-unassigned {
    color: #94a3b8;
    font-style: italic;
}


/* =====================================================
   13. ESTADOS Y PRIORIDADES
   ===================================================== */

.wgs-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wgs-status-unassigned {
    color: #1769d2;
    background: #eaf3ff;
    border: 1px solid #b8d5fa;
}

.wgs-status-progress {
    color: #6a42c2;
    background: #f1ecfb;
    border: 1px solid #d8caf7;
}

.wgs-status-issue {
    color: #c96f00;
    background: #fff5e6;
    border: 1px solid #ffd79d;
}

.wgs-priority-normal {
    color: #168447;
    background: #eaf8ef;
    border: 1px solid #bee6cc;
}

.wgs-priority-high {
    color: #c9343d;
    background: #fdecee;
    border: 1px solid #f6c3c7;
}


/* =====================================================
   14. NOVEDADES Y ACCIONES
   ===================================================== */

.wgs-issue-text {
    color: #c96f00;
    font-weight: 600;
}

.wgs-case-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wgs-action-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #174f91;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .wgs-action-button:hover {
        background: #edf5ff;
        border-color: #8bb8eb;
    }


/* =====================================================
   15. PIE DE LA BANDEJA
   ===================================================== */

.wgs-case-tray-footer {
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
}

    .wgs-case-tray-footer strong {
        color: #334155;
    }

/* =====================================================
   16. INTERACCIÓN DEL MONITOR
   ===================================================== */

.wgs-card[role="button"] {
    cursor: pointer;
}

.wgs-card.wgs-card-active {
    border-color: var(--wgs-color);
    box-shadow: 0 0 0 2px var(--wgs-color);
}

.wgs-card[role="button"]:focus-visible {
    outline: 3px solid rgba(23, 105, 210, 0.25);
    outline-offset: 3px;
}

.wgs-case-row.wgs-row-hidden {
    display: none;
}

.wgs-no-results {
    padding: 24px !important;
    color: #64748b !important;
    background: #f8fafc;
    text-align: center;
    font-size: 13px;
}

    .wgs-no-results i {
        margin-right: 6px;
        color: #1769d2;
    }

/* =====================================================
   17. CONTEXTO ADMINISTRATIVO DE LA SOLICITUD
   ===================================================== */

.wgs-request-detail {
    margin-top: 18px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #1769d2;
    border-radius: 10px;
}

.wgs-request-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.wgs-request-detail-kicker {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.wgs-request-detail-title {
    margin: 0;
    color: #173b67;
    font-size: 21px;
    font-weight: 700;
}

.wgs-request-detail-service {
    margin-top: 4px;
    color: #64748b;
    font-size: 14px;
}

.wgs-request-detail-close {
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .wgs-request-detail-close:hover {
        background: #f8fafc;
    }

.wgs-request-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wgs-detail-item {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.wgs-detail-label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.wgs-detail-item strong {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.wgs-detail-item-wide {
    grid-column: span 3;
}

@media (max-width: 900px) {

    .wgs-request-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wgs-detail-item-wide {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {

    .wgs-request-detail-header {
        flex-direction: column;
    }

    .wgs-request-detail-grid {
        grid-template-columns: 1fr;
    }

    .wgs-detail-item-wide {
        grid-column: auto;
    }
}

/* =====================================================
   18. PUENTE HACIA LA OPERACIÓN HEREDADA
   ===================================================== */

.wgs-request-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wgs-request-detail-primary {
    height: 38px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #ffffff;
    background: #1769d2;
    border: 1px solid #1769d2;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .wgs-request-detail-primary:hover {
        background: #1259b3;
        border-color: #1259b3;
    }

.wgs-operation-anchor {
    scroll-margin-top: 90px;
}

@media (max-width: 576px) {

    .wgs-request-detail-actions {
        width: 100%;
    }

    .wgs-request-detail-primary,
    .wgs-request-detail-close {
        width: 100%;
        justify-content: center;
    }
}