/* =========================================================
   CUSTOM MODULES CSS - ESTILOS MODERNOS SAT
   ========================================================= */

/* ===========================
   1. RESET Y ENLACES
   =========================== */
.module-link {
    display: block;
    text-decoration: none;
    outline: none;
}

    .module-link:focus, .module-link:hover {
        text-decoration: none;
        outline: none;
    }

/* ===========================
   2. TARJETAS DE MÓDULOS (BASE)
   =========================== */
.module-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 6px rgba(10,25,50,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    position: relative;
    min-height: 110px;
    margin-bottom: 18px;
    word-break: break-word;
}

.module-link:hover .module-card,
.module-link:focus .module-card {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(10, 30, 60, 0.12);
    z-index: 2;
}

/* ===========================
   3. CONTENIDO DE LAS TARJETAS (TEXTOS)
   =========================== */
.module-card .inner {
    padding: 18px 16px;
    padding-right: 75px; /* Espacio reservado para el círculo del ícono */
    position: relative;
    z-index: 2;
}

    .module-card .inner h3 {
        color: #0b3d91; /* Azul institucional inicial */
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 6px 0;
        line-height: 1.2;
        white-space: normal;
    }

    .module-card .inner p {
        color: #6f7b87; /* Gris secundario */
        font-size: 13px;
        margin-top: 8px;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ===========================
   4. ICONOS DE LAS TARJETAS (MODERNOS, SIN CÍRCULO)
   =========================== */
.module-card .icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

/* Soporta tanto <i> como <svg> (si usas SVG inline debe respetar `currentColor`) */
.module-card .icon i,
.module-card .icon svg {
    font-size: 34px;      /* tamaño mayor en escritorio */
    width: 34px;
    height: 34px;
    color: var(--accent);
    transition: color 0.18s ease, transform 0.18s ease;
    fill: currentColor;   /* para SVGs inline */
    line-height: 1;
}

/* Hover / foco: eleva tarjeta y resalta el icono */
.module-link:hover .module-card,
.module-link:focus .module-card {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow);
}

.module-link:hover .module-card .icon i,
.module-link:focus .module-card .icon i,
.module-link:hover .module-card .icon svg,
.module-link:focus .module-card .icon svg {
    color: var(--accent-dark);
    transform: translateY(-4px) scale(1.08);
}

/* Foco accesible para enlaces-tarjeta */
.module-link:focus {
    outline: 3px solid rgba(11,61,145,0.12);
    outline-offset: 3px;
}

/* Ajustes para móvil: icono más pequeño y posición ajustada */
@media (max-width: 767px) {
    .module-card .icon {
        right: 12px;
    }

    .module-card .icon i,
    .module-card .icon svg {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
}

/* ===========================
   5. NOTIFICACIONES (BADGE DINÁMICO)
   =========================== */
.module-card .module-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background-color: #00c0ef; /* Color teal/aqua inicial para alertas */
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 192, 239, 0.4);
    z-index: 3;
}

/* ===========================
   6. BARRAS SUPERIOR Y LATERAL 
   =========================== */
.top-bar, .navbar {
    box-shadow: 0 2px 6px rgba(10, 25, 50, 0.06);
    z-index: 1030;
}

.side-bar, .sidebar {
    box-shadow: 2px 0 8px rgba(10, 25, 50, 0.06);
    z-index: 1020;
}

/* ===========================
   7. POPUP DEL PERFIL DE USUARIO (OVERRIDE ADMINLTE)
   =========================== */
.navbar-nav > .user-menu > .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(10, 30, 60, 0.15) !important;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
    width: 280px;
    margin-top: 10px;
}

    .navbar-nav > .user-menu > .dropdown-menu > li.user-header {
        height: auto;
        padding: 25px 15px 15px 15px;
        background-color: #ffffff !important;
        border-bottom: 1px solid #f0f3f5;
    }

        .navbar-nav > .user-menu > .dropdown-menu > li.user-header > img {
            border: 3px solid rgba(11, 61, 145, 0.08);
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }

        .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p {
            color: #0b3d91 !important;
            font-weight: 700;
            font-size: 16px;
            margin-top: 12px;
            text-shadow: none !important;
        }

            .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small {
                color: #6f7b87 !important;
                font-weight: 400;
                font-size: 13px;
                margin-top: 5px;
            }

    /* Corrección de Floats y Centrado del Footer */
    .navbar-nav > .user-menu > .dropdown-menu > .user-footer {
        background-color: #f8f9fb !important;
        padding: 15px;
        border-top: none;
        text-align: center !important;
    }

        .navbar-nav > .user-menu > .dropdown-menu > .user-footer > div {
            float: none !important;
            width: 100% !important;
        }

        /* Botón "Cerrar Sesión" centrado y expandido */
        .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn,
        .navbar-nav > .user-menu > .dropdown-menu > .user-footer a {
            background-color: #ffffff !important;
            color: #d9534f !important;
            border: 1px solid #d4cfcf !important;
            border-radius: 8px !important;
            font-weight: 600;
            padding: 10px 15px;
            transition: all 0.3s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            display: block;
            width: 100%;
            margin: 0 auto !important;
            text-align: center;
        }

            .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn:hover,
            .navbar-nav > .user-menu > .dropdown-menu > .user-footer a:hover {
                background-color: #d9534f !important;
                color: #ffffff !important;
                border-color: #d43f3a !important;
            }

/* ===========================
   8. AJUSTES RESPONSIVOS (MÓVILES)
   =========================== */
@media (max-width: 767px) {
    .module-card {
        min-height: auto;
    }

        .module-card .inner {
            padding: 14px 12px;
            padding-right: 65px;
        }

            .module-card .inner h3 {
                font-size: 15px;
            }

        /* Achicamos el círculo en celulares para que no estorbe al texto */
        .module-card .icon {
            width: 40px;
            height: 40px;
            right: 12px;
        }

            .module-card .icon i {
                font-size: 26px; /* Agrandado en móvil */
            }

    /* Blindaje del Popup para Celulares */
    .navbar-custom-menu .navbar-nav > li.user-menu > .dropdown-menu {
        border-radius: 12px !important;
        margin: 10px !important;
        width: calc(100% - 20px) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
        background-color: #ffffff !important;
    }

    .navbar-nav > .user-menu > .dropdown-menu > li.user-header {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: auto !important;
    }

    .navbar-nav .open .dropdown-menu > li.user-header > p,
    .navbar-nav .open .dropdown-menu > li.user-header > p > small {
        color: #0b3d91 !important;
        text-align: center !important;
    }
}
/* =========================================================
   9. SECCIÓN DE ESTADO Y SERVICIOS ANEXOS (CAJAS SUPERIORES)
   ========================================================= */

/* Las cajas de fondo independiente */
.status-card {
    background-color: #eef6ff; /* un poco más visible, tono azul muy sutil */
    border-radius: 10px;
    padding: 18px 25px;
    height: 100%; /* Ayuda a equilibrar las alturas */
    min-height: 85px;
    margin-bottom: 15px; /* Separación cuando colapsan en celular */
    border: 1px solid rgba(11, 61, 145, 0.08); /* borde ligeramente más marcado */
}

    /* Distribución Caja Izquierda (Fila) */
    .status-card.flex-row-between {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 15px;
    }

    /* Distribución Caja Derecha (Columna) */
    .status-card.flex-col-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 12px 20px; /* Un poco menos de padding vertical para centrar el texto chico */
    }

/* Tipografía viva y saturada */
.status-text-main {
    color: #0b3d91; /* Tu azul institucional vivo */
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.status-text-secondary {
    color: #4a5568; /* Gris oscuro para lectura */
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Estilos base para los botones superiores */
.btn-status {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
}

/* Botón Primario (Fondo Azul Institucional) */
.btn-status-primary {
    background-color: #0b3d91;
    color: #ffffff;
}

    .btn-status-primary:hover,
    .btn-status-primary:focus {
        background-color: #082b66; /* Azul más oscuro al pasar el cursor */
        color: #ffffff;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(11, 61, 145, 0.25);
        transform: translateY(-2px);
    }

/* Botón Secundario / Outline (Fondo Blanco, Borde Azul) */
.btn-status-outline {
    background-color: #ffffff;
    color: #0b3d91;
    border-color: #0b3d91;
    width: 100%;
    max-width: 280px;
}

    .btn-status-outline:hover,
    .btn-status-outline:focus {
        background-color: #0b3d91;
        color: #ffffff;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(11, 61, 145, 0.2);
    }
.saludo-tittle {
    font-size: 24px;
    color: #2d3748;
    margin-top: 0px;
}
/* ===========================
   Ajustes Responsivos (Móvil)
   =========================== */
@media (max-width: 767px) {
    /* En celulares, la caja izquierda apila el texto y el botón al centro */
    .status-card.flex-row-between {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .status-text-main {
        font-size: 16px;
    }

    .btn-status {
        width: 100%; /* Botones ocupan todo el ancho en el celular */
    }

    /* Mobile: restaurar apilamiento vertical para la fila específica */
    .content > .row[style*="margin-bottom: 40px"] {
        display: block; /* volver a comportamiento por defecto para que las columnas apilen */
        table-layout: auto;
    }

    .content > .row[style*="margin-bottom: 40px"] > [class*="col-"] {
        display: block;
        float: none; /* restaura float por defecto en Bootstrap móvil */
        width: 100%; /* cada columna ocupa todo el ancho */
        vertical-align: top;
    }

    .content > .row[style*="margin-bottom: 40px"] .status-card {
        height: auto; /* evitar forzar altura fija en móviles */
        justify-content: center; /* mantiene el contenido centrado como antes */
        align-items: center;
        margin-bottom: 12px;
    }
    .saludo-tittle {
      
        margin-top: 50px;
    }
}

/* Igualar altura de las dos columnas en la fila superior (la que tiene inline style "margin-bottom: 40px") */
.content > .row[style*="margin-bottom: 40px"] {
    display: table;
    width: 100%;
    table-layout: fixed; /* mantiene proporción de columnas */
}

.content > .row[style*="margin-bottom: 40px"] > [class*="col-"] {
    display: table-cell;
    float: none; /* anula float de bootstrap en esta fila para permitir celdas iguales */
    vertical-align: middle; /* centra verticalmente el contenido */
}

/* Asegurar que la tarjeta ocupe toda la altura de la celda */
.content > .row[style*="margin-bottom: 40px"] .status-card {
    height: 100%;
    min-height: 85px; /* conserva mínimo */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Moderniza el modal de confirmación */
.modal-content {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(10, 30, 60, 0.18) !important;
    border: none !important;
}

.modal-footer, .modal-header {
    border: none !important;
    border-radius: 0 0 16px 16px !important;
}

.btn {
    border-radius: 8px !important;
    font-weight: 600;
    min-width: 64px;
}