/*=====================================
RESET
=====================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{

    height:100%;

    font-family:"Inter",sans-serif;

    background:#F4F7FB;

    color:#17375E;

}

/*=====================================
LAYOUT
=====================================*/

.layout{

    display:flex;

    min-height:100vh;

}

/*=====================================
SIDEBAR
=====================================*/

.sidebar{

    width:280px;

    background:#0075A9;

    color:#fff;

    display:flex;

    flex-direction:column;

    justify-content:flex-start;

    position:fixed;

    top:0;

    left:0;

    bottom:0;

    overflow:hidden;

    box-shadow:
        10px 0 30px rgba(0,0,0,.08);

}

/*=====================================
LOGO
=====================================*/

.sidebar-top{

    background:#FFFFFF;

    padding:22px;

    border-bottom:1px solid #E6EAF0;

}

.sidebar-logo{

    display:flex;

    align-items:center;

    gap:14px;

    text-decoration:none;

    color:#17375E;

}

.sidebar-logo img{

    width:72px;

    height:auto;

}

.sidebar-texto{

    display:flex;

    flex-direction:column;

    line-height:1.2;

}

.sidebar-titulo{

    font-size:18px;

    font-weight:800;

    color:#17375E;

}

.sidebar-subtitulo{

    font-size:13px;

    color:#6F7271;

}

/*=====================================
MENÚ
=====================================*/

.sidebar-menu{

    display:flex;

    flex-direction:column;

    margin-top:25px;

    gap:8px;

    padding:0 16px;

}

.sidebar-menu a{

    display:flex;

    align-items:center;

    gap:18px;

    padding:16px 20px;

    border-radius:14px;

    color:#fff;

    text-decoration:none;

    font-size:16px;

    font-weight:600;

    transition:.35s;

}

.sidebar-menu a i{

    width:22px;

    text-align:center;

    font-size:18px;

}

.sidebar-menu a:hover{

    background:#00638F;

    transform:translateX(8px);

}

.sidebar-menu a.active{

    background:#3DAE2B;

    box-shadow:0 8px 18px rgba(61,174,43,.35);
}

/*=====================================
USUARIO
=====================================*/

.sidebar-user{

    display:flex;

    align-items:center;

    gap:15px;

    margin:28px;

    padding:18px;

    border-radius:18px;

    background:rgba(255,255,255,.08);

}

.sidebar-avatar{

    width:54px;

    height:54px;

    border-radius:50%;

    background:#fff;

    color:#17375E;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:24px;

}

.sidebar-info{

    display:flex;

    flex-direction:column;

}

.sidebar-info span{

    font-weight:700;

}

.sidebar-info small{

    opacity:.7;

}

/*=====================================
CONTENIDO
=====================================*/

.layout-main{

    margin-left:280px;

    flex:1;

}

/*=====================================
HEADER
=====================================*/

.layout-header{

    height:82px;

    background:#fff;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 35px;

    box-shadow:
        0 8px 25px rgba(0,0,0,.05);

    position:sticky;

    top:0;

    z-index:500;

}

/*=====================================
BUSCADOR
=====================================*/

.header-left{

    display:flex;

    align-items:center;

    gap:25px;

}

.sidebar-toggle{

    display:none;

}

.header-buscador{

    width:360px;

    height:48px;

    background:#F4F7FB;

    border-radius:30px;

    display:flex;

    align-items:center;

    padding:0 18px;

    gap:12px;

}

.header-buscador i{

    color:#6F7271;

}

.header-buscador input{

    width:100%;

    border:none;

    outline:none;

    background:none;

    font-size:15px;

}

/*=====================================
ICONOS
=====================================*/

.header-right{

    display:flex;

    gap:12px;

}

.header-right button{

    width:46px;

    height:46px;

    border:none;

    border-radius:50%;

    background:#F4F7FB;

    cursor:pointer;

    transition:.3s;

    font-size:18px;

    color:#17375E;

}

.header-right button:hover{

    background:#0075A9;

    color:#fff;

}

/*=====================================
HEADER USER
=====================================*/

.header-user{

    display:flex;

    align-items:center;

    gap:14px;

    cursor:pointer;

    padding:8px 14px;

    border-radius:14px;

    transition:.3s;

}

.header-user:hover{

    background:#F5F7FA;

}

.header-avatar{

    width:46px;

    height:46px;

    border-radius:50%;

    background:#0075A9;

    color:#fff;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:18px;

}

.header-user-info{

    display:flex;

    flex-direction:column;

}

.header-user-info span{

    font-weight:700;

    color:#17375E;

    font-size:17px;

}

.header-user-info small{

    color:#7B8794;

    font-size:14px;

    margin-top:2px;

}

.header-icon{

    width:46px;

    height:46px;

}

/*=====================================
DROPDOWN USUARIO
=====================================*/

.header-user{

    position:relative;

}

.user-dropdown{

    position:absolute;

    top:70px;

    right:0;

    width:240px;

    background:#fff;

    border-radius:18px;

    box-shadow:0 15px 40px rgba(0,0,0,.12);

    padding:12px 0;

    opacity:0;

    visibility:hidden;

    transform:translateY(10px);

    transition:.25s;

    z-index:9999;

}

.user-dropdown.active{

    opacity:1;

    visibility:visible;

    transform:translateY(0);

}

.user-dropdown a{

    display:flex;

    align-items:center;

    gap:14px;

    padding:14px 20px;

    color:#17375E;

    text-decoration:none;

    font-weight:600;

    transition:.25s;

}

.user-dropdown a:hover{

    background:#F5F7FA;

}

.user-dropdown hr{

    margin:10px 0;

    border:none;

    border-top:1px solid #E8E8E8;

}

.user-dropdown .logout{

    color:#DF5929;

}

/*=====================================
REDES SOCIALES
=====================================*/

.sidebar-social{

    margin-top:35px;

    padding:0 20px;

}

.sidebar-social hr{

    border:none;

    border-top:1px solid rgba(255,255,255,.25);

    margin-bottom:22px;

}

.social-icons{

    display:grid;

    grid-template-columns:repeat(3, 42px);

    justify-content:center;

    align-items:center;

    gap:10px 14px;

    width:100%;

}

.social-icons a{

    width:42px;

    height:42px;

    display:flex;

    justify-content:center;

    align-items:center;

    color:#FFFFFF;

    font-size:20px;

    text-decoration:none;

    border-radius:50%;

    background:rgba(255,255,255,.12);

    transition:all .25s ease;

}

.social-icons a:hover{

    background:#3DAE2B;

    transform:translateY(-3px) scale(1.08);

    color:#FFFFFF;

}

/*=====================================
TÍTULO DEL PORTAL
=====================================*/

.header-title{

    display:flex;

    flex-direction:column;

    justify-content:center;

    min-width:180px;

    margin-right:20px;

}

.header-title-small{

    font-size:12px;

    font-weight:700;

    color:#6F7271;

    letter-spacing:1.5px;

    text-transform:uppercase;

}

.header-title-main{

    font-size:26px;

    font-weight:800;

    color:#17375E;

    line-height:1.1;

}

/*=====================================
NOTIFICACIONES
=====================================*/

.header-right{

    display:flex;

    align-items:center;

    gap:18px;

}

.header-notifications{

    width:48px;

    height:48px;

    border:none;

    background:none;

    position:relative;

    cursor:pointer;

    color:#17375E;

    font-size:24px;

    transition:.25s;

}

.header-notifications:hover{

    color:#0075A9;

}

.notification-dot{

    position:absolute;

    top:8px;

    right:8px;

    width:10px;

    height:10px;

    background:#DF5929;

    border-radius:50%;

    border:2px solid #FFFFFF;
  
    display: none;

}

/*=====================================
ANIMACIÓN CAMPANA - NUEVA NOTIFICACIÓN
=====================================*/

.header-notifications.notificacion-pendiente i {
    animation: campanaNotificacion 0.8s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes campanaNotificacion {

    0%,
    100% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(12deg);
    }

    40% {
        transform: rotate(-12deg);
    }

    60% {
        transform: rotate(8deg);
    }

    80% {
        transform: rotate(-8deg);
    }

}

/*=====================================
RESULTADOS DEL BUSCADOR
=====================================*/

.header-buscador{

    position:relative;

}

.search-results{

    position:absolute;

    top:58px;

    left:0;

    width:100%;

    background:#FFFFFF;

    border-radius:18px;

    box-shadow:0 18px 40px rgba(0,0,0,.12);

    overflow:hidden;

    display:none;

    z-index:3002;

    max-height:450px;

    overflow-y:auto;

}

.search-results.active{

    display:block;

}

.search-loading{

    padding:18px;

    color:#6F7271;

    text-align:center;

}

.search-empty{

    padding:18px;

    color:#6F7271;

    text-align:center;

}

.search-item{

    display:flex;

    flex-direction:column;

    gap:6px;

    padding:16px 18px;

    cursor:pointer;

    transition:.25s;

    border-bottom:1px solid #EDF1F5;

}

.search-item:last-child{

    border-bottom:none;

}

.search-item:hover{

    background:#F5F8FB;

}

.search-title{

    font-weight:700;

    color:#17375E;

}

.search-summary{

    font-size:13px;

    color:#6F7271;

    line-height:1.4;

}

.header-divider{

    width:1px;

    height:42px;

    background:#E3E8EF;

}

.search-news-image{

    width:70px;
    height:70px;

    border-radius:8px;

    object-fit:cover;

    margin-right:12px;

    flex-shrink:0;

}

.search-news-content{

    flex:1;

}

.search-news-date{

    margin-top:4px;

    font-size:12px;

    color:#6F7271;

}

.search-news-excerpt{

    margin-top:6px;

    font-size:13px;

    color:#666;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;

}

/*=====================================
MODAL INVENTARIO
=====================================*/

.modal-inventario{

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.45);

    display: none;

    justify-content: center;

    align-items: center;

    z-index: 99999;

    backdrop-filter: blur(4px);

}

.modal-inventario.active{

    display:flex;

}

.modal-inventario-content{

    position:relative;

    width:430px;

    max-width:90%;

    background:#fff;

    border-radius:22px;

    padding:35px;

    box-shadow:0 15px 45px rgba(0,0,0,.18);

    text-align:center;

    animation: modalOpen .25s ease;

}

@keyframes modalOpen{

    from{

        opacity:0;

        transform:scale(.9);

    }

    to{

        opacity:1;

        transform:scale(1);

    }

}

.modal-inventario-content h2{

    color:#1E3A5F;

    margin-bottom:25px;

    font-size:26px;

    font-weight:700;

}

.modal-close{

    position:absolute;

    top:18px;

    right:18px;

    width:38px;

    height:38px;

    border:none;

    border-radius:50%;

    background:#f3f5f8;

    cursor:pointer;

    transition:.2s;

}

.modal-close:hover{

    background:#DF5929;

    color:#fff;

}

#qrContainer{

    width:220px;

    height:220px;

    margin:auto;

    display:flex;

    justify-content:center;

    align-items:center;

    border:2px dashed #D9DDE3;

    border-radius:18px;

    color:#6F7271;

    font-size:15px;

    text-align:center;

}

#qrContainer p{

    margin:0 20px;

}

/*=====================================
QR LOGO
=====================================*/

#qrContainerWrapper{

    position:relative;

    display:flex;

    justify-content:center;

    align-items:center;

    width:220px;

    height:220px;

    margin:auto;

}

#qrLogo{

    display:none;

    position:absolute;

    width:42px;

    height:42px;

    object-fit:contain;

    background:#fff;

    border-radius:12px;

    padding:4px;

    box-shadow:0 2px 10px rgba(0,0,0,.15);

}

.qr-texto{

    margin-top:25px;

    color:#6F7271;

    font-size:15px;

    line-height:1.5;

}

/*=====================================
MODAL ACERCA
=====================================*/

#modalAcerca .modal-inventario-content{

    width:900px;

    max-width:92%;

    max-height:90vh;

    overflow-y:auto;

    padding:0;

    text-align:left;

    background:#F5F7FA;

}

.acerca-header{

    display:flex;

    align-items:center;

    gap:35px;

    padding:40px;

    background:linear-gradient(135deg,#0075A9,#005D87);

    color:#FFF;

}

.acerca-logo img{

    width:170px;

    height:auto;

}

.acerca-header-texto{

    flex:1;

}

.acerca-header-texto h2{

    margin:0;

    color:#FFF;

    font-size:44px;

    font-weight:700;

}

.acerca-header-texto p{

    margin:12px 0 20px;

    color:rgba(255,255,255,.9);

    font-size:19px;

}

.acerca-colores{

    display:flex;

    gap:8px;

}

.acerca-colores span{

    width:70px;

    height:6px;

    border-radius:20px;

}

.color-naranja{

    background:#DF5929;

}

.color-azul{

    background:#0075A9;

}

.color-verde{

    background:#3DAE2B;

}

.color-gris{

    background:#6F7271;

}

/*=====================================
CUERPO
=====================================*/

.acerca-body{

    padding:35px;

}

/*=====================================
TARJETAS
=====================================*/

.acerca-card{

    display:flex;

    gap:25px;

    background:#FFF;

    border-radius:18px;

    padding:28px;

    margin-bottom:25px;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

    border-left:6px solid #0075A9;

    transition:.25s;

}

.acerca-card:hover{

    transform:translateY(-3px);

    box-shadow:0 14px 35px rgba(0,0,0,.12);

}

.acerca-card-icono{

    width:64px;

    height:64px;

    border-radius:16px;

    background:#0075A9;

    color:#FFF;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:30px;

    flex-shrink:0;

}

.acerca-card-contenido{

    flex:1;

}

.acerca-card-contenido h3{

    margin:0 0 15px;

    color:#1E3A5F;

    font-size:25px;

}

.acerca-card-contenido p{

    margin:0 0 15px;

    color:#4A5568;

    line-height:1.8;

    font-size:16px;

}

.acerca-card-contenido p:last-child{

    margin-bottom:0;

}

/*=====================================
INFORMACIÓN DEL SISTEMA
=====================================*/

.acerca-info{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:20px;

    margin-top:10px;

}

.acerca-info div{

    background:#F7F9FC;

    border-radius:12px;

    padding:18px;

    border:1px solid #E6EAF0;

}

.acerca-info strong{

    display:block;

    color:#0075A9;

    margin-bottom:8px;

}

.acerca-info span{

    color:#4A5568;

}

/*=====================================
RESPONSIVE
=====================================*/

@media(max-width:768px){

    .acerca-header{

        flex-direction:column;

        text-align:center;

    }

    .acerca-card{

        flex-direction:column;

        text-align:center;

    }

    .acerca-card-icono{

        margin:auto;

    }

    .acerca-info{

        grid-template-columns:1fr;

    }

}

/*=====================================
RESPONSIVE GENERAL
=====================================*/

.sidebar{

    transition:left .30s ease;

    z-index:5000;

}

.sidebar-overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    opacity:0;

    visibility:hidden;

    transition:.25s;

    z-index:450;

}

.sidebar-overlay.active{

    opacity:1;

    visibility:visible;

}

@media (max-width:1024px){

    .sidebar{
        left:-280px;
        top:0;
    }
    .sidebar.active{

        left:0;

    }

    .layout-main{

        margin-left:0;

    }

    .sidebar-toggle{

        display:flex;

        justify-content:center;

        align-items:center;

        width:46px;

        height:46px;

        border:none;

        border-radius:12px;

        background:#F4F7FB;

        cursor:pointer;

        color:#17375E;

        font-size:20px;

        transition:.25s;

    }

    .sidebar-toggle:hover{

        background:#0075A9;

        color:#FFF;

    }

}

/*=====================================
RESPONSIVE TABLET
=====================================*/

@media (max-width:768px){

    .layout-header{

        padding:0 18px;

        height:74px;

        gap:12px;

    }

    .header-left{

        flex:1;

        min-width:0;

        gap:14px;

    }

    .header-title{

        min-width:auto;

        margin-right:0;

    }

    .header-title-main{

        font-size:18px;

    }

    .header-title-small{

        font-size:10px;

    }

    .header-buscador{

        flex:1;

        width:auto;

        min-width:0;

    }

    .header-user-info{

        display:none;

    }

    .header-user{

        padding:0;

    }

    .header-avatar{

        width:42px;

        height:42px;

    }

}

/*=====================================
RESPONSIVE CELULAR
=====================================*/

@media (max-width:480px){

    html,
    body{

        overflow-x:hidden;

    }

    .layout{

        overflow-x:hidden;

    }

    .layout-main{

        overflow-x:hidden;

    }

    .layout-header{

        padding:0 12px;

    }

    .header-left{

        gap:10px;

    }

    .header-title{

        display:none;

    }

    .header-buscador{

        height:42px;

        padding:0 14px;

    }

    .header-buscador input{

        font-size:14px;

    }

    .header-user i.fa-chevron-down{

        display:none;

    }

    .user-dropdown{

        right:-8px;

    }

}

/*=====================================
BUSCADOR ENFOCADO (MÓVIL)
=====================================*/

.search-overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    opacity:0;

    visibility:hidden;

    transition:.25s;

    z-index:3000;

    pointer-events:none;

}

.search-overlay.active{

    opacity:1;

    visibility:visible;

    pointer-events:auto;

}


@media (max-width:768px){

    .header-buscador{

        transition:
            all .25s ease,
            transform .25s ease;

    }


    .header-buscador.active{

        position:fixed;

        top:calc(
            16px + var(--wp-admin--admin-bar--height, 0px)
        );

        left:16px;

        right:16px;

        width:auto;

        height:52px;

        z-index:5001;

        background:#FFFFFF;

        box-shadow:
            0 15px 40px rgba(0,0,0,.18);

        transform:scale(1.02);

    }


    .header-buscador.active input{

        font-size:16px;

    }


    .header-buscador.active .search-results{

        display:block;

        top:62px;

        left:0;

        width:100%;

        max-height:calc(100vh - 100px);

        overflow-y:auto;

        z-index:5002;

    }

}


.layout-header.search-active{

    z-index:5000;

}

/*=====================================
AJUSTE PARA BARRA DE ADMINISTRACIÓN
WORDPRESS
=====================================*/

body.admin-bar .sidebar{
    top:var(--wp-admin--admin-bar--height, 32px);
}

body.admin-bar .layout-header{
    top:var(--wp-admin--admin-bar--height, 32px);
}

/*=====================================
HEADER FIJO EN CELULAR
=====================================*/

@media (max-width:768px){

    body.admin-bar .layout-header{
        position:fixed;
        top:46px;
        left:0;
        right:0;
        z-index:4100;
    }

}

/*=====================================
ULTIMA CONEXION
=====================================*/

.header-ultima-conexion {

    display:flex;

    align-items:center;

    gap:10px;

    height:46px;

    padding:0 20px 0 10px;

    color:#1d3f68;

    white-space:nowrap;

    /* Línea divisoria */
    border-right:1px solid #DDE3EA;

}


/* Icono del reloj */

.header-ultima-conexion > i {

    font-size:23px;

    color:#1d3f68;

    flex-shrink:0;

}


/* Contenedor del texto */

.header-ultima-conexion > div {

    display:flex;

    flex-direction:column;

    justify-content:center;

    gap:2px;

}


/* Título */

.header-ultima-conexion span {

    font-size:13px;

    font-weight:600;

    line-height:1.2;

    color:#6f7271;

}


/* Fecha y hora */

.header-ultima-conexion small {

    font-size:15px;

    font-weight:700;

    line-height:1.2;

    color:#1d3f68;

}


/*=====================================
ULTIMA CONEXION - CELULAR
=====================================*/

.mobile-ultima-conexion {

    display:none;

}


/*=====================================
VERSION MOVIL
=====================================*/

@media (max-width:768px) {

    /* Ocultar última conexión de la barra */
    .header-ultima-conexion {

        display:none;

    }

    /* Mostrar última conexión dentro del perfil */
    .mobile-ultima-conexion {

        display:flex;

        align-items:center;

        gap:12px;

        padding:15px 18px;

        color:#1d3f68;

    }

    .mobile-ultima-conexion > i {

        font-size:22px;

        color:#1d3f68;

        flex-shrink:0;

    }

    .mobile-ultima-conexion > div {

        display:flex;

        flex-direction:column;

        gap:2px;

    }

    .mobile-ultima-conexion span {

        font-size:13px;

        font-weight:600;

        color:#6f7271;

        line-height:1.2;

    }

    .mobile-ultima-conexion small {

        font-size:14px;

        font-weight:700;

        color:#1d3f68;

        line-height:1.2;

    }

}

/*=====================================
HEADER SOBRE EL OVERLAY DEL SIDEBAR
=====================================*/

@media (max-width:1024px){

    .layout-header{

        position:relative;

        z-index:4100;

    }

}

/*=====================================
BUSCADOR SOBRE EL OVERLAY
=====================================*/

@media (max-width:768px){

    .search-overlay{

        z-index:3000;

    }

    .layout-header.search-active{

        position:fixed;

        z-index:4000;

    }

    .header-buscador.active{

        position:fixed;

        z-index:4001;

    }

    .header-buscador.active .search-results{

        z-index:4002;

    }

}

/*=====================================
AJUSTE CONTENIDO PRINCIPAL - CELULAR
=====================================*/

@media (max-width:768px){

    .layout-main{
        width:100%;
        max-width:100%;
        min-width:0;
        overflow-x:hidden;
    }

    .layout-main > *{
        max-width:100%;
        min-width:0;
    }

    .layout-main img{
        max-width:100%;
        height:auto;
    }

}

@media (max-width:480px){

    .layout-main{
        width:100%;
        max-width:100%;
        min-width:0;
        overflow-x:hidden;
    }

}

@media (max-width: 480px) {

    .sidebar-social {
        transition:
            opacity 0.3s ease,
            transform 0.3s ease;
    }
  
}

    .sidebar-social.accesos-abiertos {
        opacity: 0;
        transform: translateY(10px);
        pointer-events: none;
    }