/* Superficie institucional global; permanece al cargar modulos por AJAX. */
.app-workspace {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 7.15rem);
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 36% 52% at 50% 23%, rgba(255, 255, 255, .88), rgba(255, 255, 255, .38) 52%, transparent 78%),
        radial-gradient(ellipse 69% 48% at -7% 18%, rgba(246, 194, 62, .16), rgba(246, 194, 62, .09) 46%, transparent 74%),
        radial-gradient(ellipse 70% 50% at 107% 20%, rgba(78, 115, 223, .15), rgba(78, 115, 223, .08) 48%, transparent 75%),
        linear-gradient(180deg, #f5f8fd 0%, #f1f5fa 58%, #eef2f7 100%);
}

.app-workspace::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 4.75rem;
    left: 50%;
    width: clamp(26rem, 43vw, 44rem);
    aspect-ratio: 1;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: .03;
    background: url("../images/logo.png") center / contain no-repeat;
    filter: grayscale(1) sepia(.18) hue-rotate(175deg) saturate(.65) contrast(.85);
}

.app-workspace > * {
    position: relative;
    z-index: 1;
}

/* El dashboard conserva su jerarquia particular de tarjetas. */
.dashboard-home {
    min-height: calc(100vh - 10rem);
}

.dashboard-heading h1 {
    color: #25324b !important;
    font-weight: 700;
    letter-spacing: -.025em;
}

.dashboard-home .card {
    border-color: #e2e8f2;
    border-radius: .65rem;
    box-shadow: 0 .3rem 1.1rem rgba(31, 45, 61, .075) !important;
}

.dashboard-home .card-header {
    padding-top: .9rem !important;
    padding-bottom: .9rem !important;
    background: rgba(248, 250, 253, .88);
    border-bottom-color: #e4eaf3;
}

.dashboard-home .card-header h6 {
    color: #3158c7 !important;
    letter-spacing: .01em;
}

.dashboard-home .dashboard-kpis .card {
    background: rgba(255, 255, 255, .96);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-home .dashboard-kpis .card:hover {
    transform: translateY(-2px);
    border-color: #d5deec;
    box-shadow: 0 .55rem 1.35rem rgba(31, 45, 61, .11) !important;
}

.dashboard-home .dashboard-kpis .card-body {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

.dashboard-home .dashboard-kpis .text-xs {
    letter-spacing: .035em;
}

.dashboard-home .dashboard-kpis .h5 {
    color: #344057 !important;
    font-size: 1.2rem;
}

.dashboard-home .dashboard-kpis .col-auto i {
    color: #cbd3e1 !important;
}

.dashboard-home .dashboard-search-col .card {
    border-left-color: #8da3d9 !important;
}

.dashboard-home .dashboard-search-col .form-control {
    height: 2.6rem;
    padding-left: 1rem;
    background-color: #fbfcfe;
    border-color: #d8e0ec;
    border-radius: .45rem;
}

.dashboard-home .dashboard-search-col .form-control:focus {
    background-color: #fff;
    border-color: #7896e8;
    box-shadow: 0 0 0 .2rem rgba(78, 115, 223, .12);
}

.dashboard-home .progress {
    overflow: hidden;
    background-color: #e8edf5;
    border-radius: 999px;
}

/* Catalogo de aplicaciones: estilos aislados para no afectar otras tarjetas. */
.applications-page__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.applications-page__heading h1 {
    color: #25324b !important;
    font-weight: 700;
    letter-spacing: -.02em;
}

.applications-page__count {
    flex: 0 0 auto;
    padding: .4rem .7rem;
    color: #3158c7;
    font-size: .78rem;
    font-weight: 700;
    background-color: #edf2ff;
    border: 1px solid #dbe4fb;
    border-radius: 999px;
}

.applications-info {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .75rem .9rem;
    color: #3f5f91;
    font-size: .88rem;
    background-color: rgba(237, 244, 255, .9);
    border: 1px solid #dce7f8;
    border-radius: .55rem;
}

.applications-info i {
    color: #4e73df;
}

.applications-search {
    position: relative;
    margin-bottom: 1.35rem;
}

.applications-search > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 1rem;
    color: #8b98ad;
    transform: translateY(-50%);
    pointer-events: none;
}

.applications-search .form-control {
    height: 2.75rem;
    padding-left: 2.7rem;
    color: #344057;
    background-color: rgba(255, 255, 255, .94);
    border-color: #d8e0ec;
    border-radius: .55rem;
}

.applications-search .form-control:focus {
    background-color: #fff;
    border-color: #7896e8;
    box-shadow: 0 0 0 .2rem rgba(78, 115, 223, .12);
}

.applications-group {
    margin-bottom: 1.4rem;
}

.applications-group + .applications-group {
    padding-top: 1.15rem;
    border-top: 1px solid rgba(205, 214, 228, .8);
}

.applications-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.applications-category h2 {
    margin: 0;
    color: #556176;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.applications-category h2 i {
    margin-right: .45rem;
    color: #7890cb;
}

.applications-category > span {
    min-width: 1.65rem;
    padding: .18rem .45rem;
    color: #66748a;
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
    background-color: rgba(231, 236, 245, .9);
    border-radius: 999px;
}

.application-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e1e7f0;
    border-radius: .72rem;
    box-shadow: 0 .3rem 1rem rgba(31, 45, 61, .065);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.application-card:hover,
.application-card:focus-within {
    border-color: #c8d6f4;
    box-shadow: 0 .65rem 1.45rem rgba(31, 45, 61, .12);
    transform: translateY(-2px);
}

.application-card .card-body {
    display: flex;
    flex-direction: column;
    min-height: 13rem;
    padding: 1.15rem;
}

.application-card__header {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 3rem;
    margin-bottom: .8rem;
}

.application-card__icon {
    display: inline-flex;
    flex: 0 0 2.75rem;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: #4167d8;
    font-size: 1.25rem;
    background-color: #edf2ff;
    border: 1px solid #dbe4fb;
    border-radius: .7rem;
}

.application-card__title {
    margin: 0;
    color: #30405e;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.application-card__description {
    display: -webkit-box;
    min-height: 3.9rem;
    margin-bottom: 1rem;
    overflow: hidden;
    color: #6b7689;
    font-size: .86rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.application-card__link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .4rem;
    margin-top: auto;
    padding: .3rem 0 !important;
    color: #3158c7;
    font-size: .82rem;
    font-weight: 700;
}

.application-card__link:hover,
.application-card__link:focus {
    color: #2148b5;
    text-decoration: none;
}

.application-card__link:focus-visible {
    outline: 2px solid rgba(78, 115, 223, .5);
    outline-offset: 3px;
}

.application-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.applications-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .6rem;
    min-height: 12rem;
    color: #718096;
    text-align: center;
}

.applications-empty[hidden] {
    display: none !important;
}

.applications-empty i {
    color: #a6b1c3;
    font-size: 1.8rem;
}

.applications-empty p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .app-workspace {
        padding: 1rem .75rem;
    }

    .dashboard-heading {
        margin-bottom: 1rem !important;
    }

    .app-workspace::before {
        display: none;
    }

    .applications-page__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .application-card .card-body {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-home .dashboard-kpis .card {
        transition: none;
    }

    .application-card {
        transition: none;
    }
}

@media print {
    .app-workspace {
        background: #fff !important;
    }

    .app-workspace::before {
        display: none !important;
    }
}

/* Encabezado de utilidad. */
.app-topbar {
    position: relative;
    z-index: 1030;
    height: 4rem;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
    border-bottom: 1px solid #e7ebf2;
    box-shadow: 0 .15rem .7rem rgba(31, 45, 61, .055) !important;
}

.app-topbar .app-role-switcher {
    width: auto;
    margin-left: 0 !important;
}

.app-role-switcher .form-group {
    gap: .55rem;
}

.app-role-switcher .form-group > i {
    color: #718096;
}

.app-role-switcher .menu-usuario {
    min-width: 13.75rem;
    height: 2.35rem;
    padding-right: 2rem;
    padding-left: .85rem;
    color: #344057;
    font-weight: 600;
    background-color: #f8faff;
    border-color: #d8e0ec;
    border-radius: .5rem;
}

.app-role-switcher .menu-usuario:focus {
    border-color: #7896e8;
    box-shadow: 0 0 0 .2rem rgba(78, 115, 223, .12);
}

.app-topbar #alertsDropdown {
    width: 2.55rem;
    height: 2.55rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    transition: color 150ms ease, background-color 150ms ease;
}

.app-topbar #alertsDropdown:hover {
    color: #4e73df;
    background-color: #f0f4ff;
}

.app-topbar #userDropdown {
    height: 3rem;
    margin-left: .35rem;
    padding: 0 .35rem 0 .75rem;
    border-radius: 1.5rem;
    transition: background-color 150ms ease;
}

.app-topbar #userDropdown:hover {
    background-color: #f6f8fc;
}

.app-topbar #userDropdown .img-profile {
    width: 2.2rem;
    height: 2.2rem;
    border: 2px solid #eef2f8;
}

.app-topbar .dropdown-menu {
    z-index: 1040;
    margin-top: .5rem;
    border: 1px solid #e1e7f0;
    border-radius: .7rem;
    box-shadow: 0 .75rem 2rem rgba(31, 45, 61, .16) !important;
}

.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] {
    min-width: 22rem;
    padding: .5rem;
}

.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item {
    min-height: 2.5rem;
    padding: .55rem .7rem;
    color: #4b5568;
    white-space: normal;
    border-radius: .42rem;
}

.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item:hover,
.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item:focus {
    color: #3158c7;
    background-color: #f1f5ff;
}

.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .text-center {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .2rem;
}

.app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .text-center .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    margin: 0 !important;
    padding: .45rem .65rem;
}

.app-topbar .dropdown-menu[aria-labelledby="alertsDropdown"] {
    overflow: hidden;
    border: 0;
}

.app-topbar .dropdown-list .dropdown-header {
    border: 0;
}

/* Navegacion primaria. */
.app-primary-nav {
    position: relative;
    z-index: 1020;
    min-height: 3.15rem;
    margin: 0 !important;
    padding: .35rem 1rem;
    border-bottom: 1px solid #e3e8f1;
    box-shadow: 0 .25rem .8rem rgba(31, 45, 61, .05);
}

.app-menu-items {
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .15rem;
}

.app-primary-nav .btn-group {
    margin: .05rem;
}

.app-primary-nav .btn-group > .dropdown-toggle {
    position: relative;
    min-height: 2.35rem;
    padding: .48rem .68rem;
    color: #5d687c;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    border: 0;
    border-radius: .45rem;
    transition: color 150ms ease, background-color 150ms ease;
}

.app-primary-nav .btn-group > .dropdown-toggle:hover,
.app-primary-nav .btn-group.show > .dropdown-toggle {
    color: #3158c7;
    background-color: #f0f4ff;
    text-decoration: none;
}

.app-primary-nav .btn-group > .dropdown-toggle:focus {
    outline: 0;
    box-shadow: none;
}

.app-primary-nav .btn-group > .dropdown-toggle:focus-visible {
    outline: 2px solid rgba(78, 115, 223, .45);
    outline-offset: 2px;
}

.app-primary-nav .btn-group.active > .dropdown-toggle {
    color: #3158c7;
    background-color: #edf2ff;
}

.app-primary-nav .btn-group.active > .dropdown-toggle::after {
    border-top-color: #3158c7;
}

.app-primary-nav .btn-group.active > .dropdown-toggle::before {
    content: "";
    position: absolute;
    right: .65rem;
    bottom: -.39rem;
    left: .65rem;
    height: 2px;
    background-color: #4e73df;
    border-radius: 999px;
}

.app-primary-nav.menu-open .btn-group.active:not(.show) > .dropdown-toggle {
    color: #5d687c;
    background-color: transparent;
}

.app-primary-nav.menu-open .btn-group.active:not(.show) > .dropdown-toggle::before {
    opacity: 0;
}

.app-primary-nav .dropdown-menu {
    min-width: 17rem;
    margin-top: .45rem;
    padding: .5rem;
    border: 1px solid #e1e7f0;
    border-radius: .7rem;
    box-shadow: 0 .75rem 2rem rgba(31, 45, 61, .14);
}

.app-primary-nav .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 2.35rem;
    padding: .52rem .65rem;
    color: #4b5568;
    font-size: .83rem;
    line-height: 1.25;
    white-space: normal;
    border-radius: .42rem;
}

.app-primary-nav .dropdown-item i {
    flex: 0 0 1.35rem;
    width: 1.35rem;
    margin-right: .5rem;
    color: #8491a8 !important;
    text-align: center;
}

.app-primary-nav .dropdown-item:hover,
.app-primary-nav .dropdown-item:focus {
    color: #3158c7;
    background-color: #f1f5ff;
    text-decoration: none;
}

.app-primary-nav .dropdown-item:hover i,
.app-primary-nav .dropdown-item:focus i {
    color: #4e73df !important;
}

.app-primary-nav .dropdown-divider {
    margin: .4rem .25rem;
    border-top-color: #e7ebf2;
}

.app-menu-toggle {
    width: 100%;
    color: #3158c7;
    font-weight: 700;
    text-align: left;
    background-color: #f1f5ff;
    border: 1px solid #dce5f6;
    border-radius: .5rem;
}

@media (max-width: 575.98px) {
    .app-topbar {
        height: 3.75rem;
        padding-right: .65rem;
        padding-left: .65rem;
    }

    .menu-nav-2.app-primary-nav {
        display: block !important;
        padding: .5rem .75rem;
    }

    .app-menu-mobile {
        width: 100%;
        max-height: calc(100vh - 8rem);
        margin-top: .5rem !important;
        overflow-y: auto;
    }

    .app-menu-mobile.show {
        display: flex;
        flex-direction: column;
    }

    .app-menu-mobile .btn-group {
        display: block;
        width: 100%;
    }

    .app-menu-mobile .btn-group > .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 2.75rem;
        padding-right: .85rem;
        padding-left: .85rem;
        text-align: left;
    }

    .app-menu-mobile .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        min-width: 0;
        margin: .15rem 0 .4rem;
        transform: none !important;
        background-color: #f8faff;
        box-shadow: none;
    }

    .app-primary-nav .btn-group.active > .dropdown-toggle::before {
        display: none;
    }

    .app-topbar .dropdown-menu[aria-labelledby="userDropdown"] {
        right: .25rem;
        width: calc(100vw - 1.5rem);
        min-width: 0;
    }

    .app-topbar .dropdown-menu[aria-labelledby="userDropdown"] .text-center {
        grid-template-columns: 1fr;
    }
}

/* Sidebar: transicion visual; no modifica navegacion, permisos ni estados. */
.menu-nav-2 {
    display: flex !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar {
    flex: 0 0 6.5rem;
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
    position: relative;
    overflow-x: hidden;
    border-radius: 0 1.5rem 1.5rem 0;
    box-shadow: .3rem 0 1rem rgba(32, 39, 62, .12);
    /* El bloque azul completo cambia como una sola pieza. */
    transition: width 380ms cubic-bezier(.4, 0, .2, 1),
                min-width 380ms cubic-bezier(.4, 0, .2, 1),
                max-width 380ms cubic-bezier(.4, 0, .2, 1),
                flex-basis 380ms cubic-bezier(.4, 0, .2, 1),
                box-shadow 300ms ease;
    will-change: width, min-width, max-width, flex-basis;
}

.sidebar.toggled {
    flex-basis: 0;
}

.sidebar .nav-item.active .nav-link {
    box-shadow: inset 3px 0 #fff;
    background-color: rgba(255, 255, 255, .14);
    font-weight: 700;
}

.sidebar .nav-item:not(.active) .nav-link:hover,
.sidebar .nav-item:not(.active) .nav-link:focus {
    background-color: rgba(255, 255, 255, .06);
}

.sidebar .nav-item .nav-link,
.sidebar .sidebar-brand,
.sidebar #sidebarToggle {
    transition: background-color 180ms ease, color 180ms ease;
}

#wrapper #content-wrapper {
    min-width: 0;
}

#wrapper {
    align-items: stretch;
}

@media (min-width: 768px) {
    .sidebar {
        width: 16rem !important;
        min-width: 16rem;
        max-width: 16rem;
        flex-basis: 16rem;
        align-self: stretch;
        min-height: 100vh;
        margin-bottom: 0;
    }

    .sidebar.toggled {
        width: 6.5rem !important;
        min-width: 6.5rem;
        max-width: 6.5rem;
        flex-basis: 6.5rem;
        overflow-x: hidden;
    }

    /* La expansion forma parte del layout: desplaza el contenido sin taparlo. */
    .sidebar.toggled.sidebar-hover-expanded {
        width: 16rem !important;
        min-width: 16rem;
        max-width: 16rem;
        flex-basis: 16rem;
        box-shadow: .45rem 0 1.35rem rgba(32, 39, 62, .17);
    }

    .sidebar .sidebar-brand .sidebar-brand-text,
    .sidebar .nav-item .nav-link span {
        display: inline-block;
        max-width: 11rem;
        opacity: 1;
        overflow: hidden;
        transform: translateX(0);
        white-space: nowrap;
        transition: max-width 260ms ease,
                    opacity 180ms ease,
                    transform 240ms ease;
        vertical-align: middle;
    }

    .sidebar .nav-item .nav-link span {
        flex: 1 1 auto;
        min-width: 0;
        max-height: 2.2rem;
        line-height: 1.25;
        white-space: normal;
        text-overflow: clip;
    }

    .sidebar.toggled .sidebar-brand .sidebar-brand-text,
    .sidebar.toggled .nav-item .nav-link span {
        max-width: 0;
        opacity: 0;
        transform: translateX(-8px);
        white-space: nowrap;
    }

    .sidebar.toggled.sidebar-hover-expanded .sidebar-brand .sidebar-brand-text,
    .sidebar.toggled.sidebar-hover-expanded .nav-item .nav-link span {
        display: inline-block;
        max-width: 11rem;
        opacity: 1;
        transform: translateX(0);
        white-space: normal;
        transition: max-width 260ms ease 120ms,
                    opacity 180ms ease 150ms,
                    transform 240ms ease 120ms;
    }

    .sidebar.toggled.sidebar-hover-expanded .nav-item .nav-link span {
        font-size: .85rem;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        width: 16rem;
        height: 4.375rem;
        overflow: hidden;
        transition: width 380ms cubic-bezier(.4, 0, .2, 1);
    }

    .sidebar .sidebar-brand {
        flex: 1 1 auto;
        justify-content: flex-start !important;
        width: auto;
        min-width: 0;
        padding-right: .5rem;
        padding-left: 2rem;
        overflow: hidden;
    }

    .sidebar .sidebar-brand .sidebar-brand-icon {
        display: flex;
        flex: 0 0 2.5rem;
        align-items: center;
        justify-content: center;
    }

    .sidebar .sidebar-brand-icon img {
        width: 48px;
        transition: none;
    }

    .sidebar.toggled .sidebar-brand-icon img {
        width: 48px;
        transform: none;
    }

    .sidebar.toggled .sidebar-header {
        width: 6.5rem;
    }

    .sidebar.toggled.sidebar-hover-expanded .sidebar-header {
        width: 16rem;
    }

    .sidebar .sidebar-heading {
        min-height: 2rem;
        opacity: 1;
        transition: opacity 180ms ease;
    }

    .sidebar.toggled .sidebar-heading {
        opacity: 0;
        overflow: hidden;
    }

    .sidebar.toggled.sidebar-hover-expanded .sidebar-heading {
        opacity: 1;
        text-align: left;
        transition-delay: 150ms;
    }

    .sidebar .nav-item .nav-link {
        display: flex;
        align-items: center;
        width: 16rem;
        min-height: 3.5rem;
        padding: .5rem 1rem .5rem 2rem;
    }

    .sidebar .nav-item .nav-link i {
        display: inline-flex;
        flex: 0 0 2.5rem;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        margin-right: .45rem;
        border-radius: .7rem;
        background: rgba(255, 255, 255, .09);
        color: rgba(255, 255, 255, .9);
        font-size: 1.1rem;
        transition: background-color 180ms ease, color 180ms ease,
                    box-shadow 180ms ease, transform 180ms ease;
    }

    .sidebar .nav-item .nav-link:hover i,
    .sidebar .nav-item .nav-link:focus i,
    .sidebar .nav-item.active .nav-link i {
        background: rgba(255, 255, 255, .2);
        color: #fff;
        box-shadow: 0 .25rem .7rem rgba(20, 28, 52, .2);
        transform: translateY(-1px);
    }

    .sidebar.toggled .nav-item .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 6.5rem;
        min-height: 3.5rem;
        padding: .5rem 1rem .5rem 2rem;
    }

    .sidebar.toggled .nav-item .nav-link i {
        font-size: 1.1rem;
        margin: 0;
    }

    .sidebar.toggled.sidebar-hover-expanded .nav-item .nav-link {
        justify-content: flex-start;
        width: 16rem;
        padding: .5rem 1rem .5rem 2rem;
        text-align: left;
    }

    .sidebar.toggled.sidebar-hover-expanded .nav-item .nav-link i {
        margin-right: .45rem;
    }

    .sidebar #sidebarToggle {
        display: inline-flex;
        flex: 0 0 2.25rem;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: .7rem;
        background: rgba(255, 255, 255, .12);
        color: rgba(255, 255, 255, .9);
        margin: 0 .75rem 0 0;
        padding: 0;
        outline: none;
        opacity: 1;
        overflow: hidden;
        transition: width 360ms ease, flex-basis 360ms ease,
                    margin 360ms ease, opacity 180ms ease,
                    background-color 180ms ease, color 180ms ease;
    }

    .sidebar #sidebarToggle:hover,
    .sidebar #sidebarToggle:focus-visible {
        background: rgba(255, 255, 255, .23);
        color: #fff;
        box-shadow: 0 .2rem .65rem rgba(20, 28, 52, .2);
    }

    .sidebar #sidebarToggle::after {
        display: inline-block;
        content: '\f08d';
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
        font-size: .9rem;
        font-weight: 900;
        transition: transform 220ms ease;
    }

    .sidebar.toggled #sidebarToggle::after {
        content: '\f08d';
        transform: rotate(-35deg);
    }

    .sidebar.toggled #sidebarToggle {
        flex-basis: 0;
        width: 0;
        margin-right: 0;
        opacity: 0;
        pointer-events: none;
    }

    .sidebar.toggled.sidebar-hover-expanded #sidebarToggle {
        flex-basis: 2.25rem;
        width: 2.25rem;
        margin-right: .75rem;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 140ms;
    }

    /* Compatibilidad: oculta cualquier control antiguo fuera del encabezado. */
    .sidebar > #sidebarToggle,
    .sidebar .text-center #sidebarToggle {
        display: none !important;
    }

    .sidebar .sidebar-card {
        display: flex;
        max-height: 14rem;
        opacity: 1;
        overflow: hidden;
        transition: max-height 280ms ease, opacity 180ms ease,
                    margin 280ms ease, padding 280ms ease,
                    visibility 0s linear;
    }

    .sidebar.toggled .sidebar-card {
        display: flex;
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 280ms ease, opacity 180ms ease,
                    margin 280ms ease, padding 280ms ease,
                    visibility 0s linear 280ms;
    }

    .sidebar.toggled.sidebar-hover-expanded .sidebar-card {
        max-height: 14rem;
        margin-bottom: 1rem;
        padding: 1rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 120ms, 140ms, 120ms, 120ms, 0s;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        width: 14rem !important;
        min-width: 14rem;
        max-width: 14rem;
        max-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translateX(0);
        box-shadow: .5rem 0 1.5rem rgba(58, 59, 69, .2);
    }

    .sidebar .sidebar-brand {
        width: 14rem;
        justify-content: flex-start !important;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .sidebar .sidebar-brand .sidebar-brand-text {
        display: inline-block;
        margin-left: .75rem;
    }

    .sidebar .sidebar-heading {
        text-align: left;
    }

    .sidebar .nav-item .nav-link {
        display: flex;
        align-items: center;
        width: 14rem;
        min-height: 3.25rem;
        padding: .875rem 1rem;
        text-align: left;
    }

    .sidebar .nav-item .nav-link i {
        flex: 0 0 1.25rem;
        margin-right: .5rem;
        text-align: center;
    }

    .sidebar .nav-item .nav-link span {
        display: inline;
        font-size: .85rem;
    }

    .sidebar.toggled {
        width: 14rem !important;
        min-width: 14rem;
        max-width: 14rem;
        flex-basis: 14rem;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1039;
        display: block;
        background: rgba(30, 37, 55, .38);
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

/*
 * La transición estructural del sidebar se conserva para mantener sincronizados
 * el bloque azul y su contenido. Antes se anulaba aquí mediante reduced-motion,
 * provocando que el ancho saltara mientras la tarjeta seguía animándose.
 */

#loader{
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 111, 255, 0.6);
    position: fixed;
    z-index: 9999;
}

.loader2{
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    /*background-color: rgba(0, 111, 255, 0.6);*/
    background-color: rgb(255, 255, 255);
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 9999;
}

.modal-xl{max-width:98%;}

/*COLORES*/
.bg-primary-light{
    background: #3490df;
}
.bg-success-light{
    background: #6cbf6c;
}
.bg-info-light{
    background: #6bc6e1;
}
.bg-warning-light{
    background: #f1b55f;
}
.bg-danger-light{
    background: #dc6460;
}
.bg-unap{
    background: #046dab;
}
.bg-unap-orange{
    background: #f08331;
}

.bg-social-pink{
    background: #F327D4;
}

.bg-social-pink-light{
    background: #de5cc4;
}

.bg-dark-pink{
    background: #976F9E;
}

.bg-caramel-brown{
    background: #613613;
}

.bg-dark-light{
    background: #808992;
}

/*Text colors*/
.text-primary-light{
    color: #3490df;
}
.text-success-light{
    color: #6cbf6c;
}
.text-info-light{
    color: #6bc6e1;
}
.text-warning-light{
    color: #f1b55f;
}
.text-danger-light{
    color: #dc6460;
}
.text-unap{
    color: #046dab;
}
.text-unap-orange{
    color: #f08331;
}

.text-social-pink{
    color: #F327D4;
}

/*Tamaños*/
.size-xxxs{
    font-size:8px;
    vertical-align: text-bottom;
}
.size-xxs{
    font-size:10px;
    vertical-align: text-bottom;
}
.size-xs{
    font-size:12px;
    vertical-align: text-bottom;
}
.size-sm{
    font-size:16px;
    vertical-align: text-bottom;
}
.size-md{
    font-size:20px;
    vertical-align: text-bottom;
}
.size-lg{
    font-size:24px;
    vertical-align: text-bottom;
}

.btn-xxs{
    padding: .3rem .3rem;
    font-size: .675rem;
    line-height: 1;
    border-radius: .2rem;
}

.btn-xs{
    padding: .2rem .2rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
}

/* Google Maps */
#map {
    max-width: 100%;
    height: 500px;
}

.img-redondo{
    border-radius: 50%;
    border-style: solid;
    border-width: medium;
    /*border-color: #ffb104;*/
}

.img-rectangular{
    border-radius: 15%;
    border-style: solid;
    border-width: medium;
    /*border-color: #ffb104;*/
}

@media(max-width: 575px) {
    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}



/* Solicitud de permisos */

.form-solicitud-permiso .card {

    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;

}

.form-solicitud-permiso .card:hover {

    box-shadow: 0 .35rem 1.15rem rgba(58, 59, 69, .14) !important;

}

.form-solicitud-permiso .tarjeta-saldo-vacaciones,
.form-solicitud-permiso .tarjeta-saldo-adm {

    animation: permisoFadeIn .22s ease-out;

}

.form-solicitud-permiso .tarjeta-saldo-vacaciones .h5,
.form-solicitud-permiso .tarjeta-saldo-adm .h5 {

    line-height: 1.2;

}

.form-solicitud-permiso .tarjeta-saldo-vacaciones.saldo-en-uso {

    transform: translateY(-1px);

    box-shadow: 0 .35rem 1.25rem rgba(28, 200, 138, .18) !important;

}

.form-solicitud-permiso .saldo-adm-detalle {

    max-width: 260px;

}

.form-solicitud-permiso .saldo-adm-detalle div {

    align-items: center;

    display: flex;

    font-size: 12px;

    justify-content: space-between;

    line-height: 1.5;

}

.form-solicitud-permiso .saldo-adm-detalle span {

    color: #858796;

    padding-right: 16px;

}

.form-solicitud-permiso .saldo-adm-barra {

    background: #eaecf4;

    border-radius: 999px;

    height: 8px;

    max-width: 280px;

    overflow: hidden;

}

.form-solicitud-permiso .saldo-adm-progreso {

    border-radius: inherit;

    height: 100%;

    min-width: 0;

    transition: width .2s ease;

}

.form-solicitud-permiso .vacacion-bloqueo-ayuda,
.form-solicitud-permiso .adm-saldo-ayuda {

    animation: permisoFadeIn .18s ease-out;

}

.form-solicitud-permiso .btn-enviar[disabled] {

    cursor: wait;

}

@keyframes permisoFadeIn {

    from {

        opacity: 0;

        transform: translateY(3px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}

/* Ordenes de compra/servicio */
.orden-compra .orden-page-heading{
    gap: 1rem;
    align-items: flex-start !important;
}

.orden-compra .orden-page-heading h1{
    line-height: 1.25;
}

.orden-compra .orden-page-actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.orden-compra .orden-page-actions .btn{
    margin: 0 !important;
}

.orden-compra .orden-card{
    border: 1px solid #dfe7f3;
    border-radius: .35rem;
    box-shadow: 0 .35rem 1rem rgba(28, 56, 121, .08) !important;
    overflow: hidden;
}

.orden-compra .orden-card-header{
    background: #f8faff;
    border-bottom: 1px solid #dfe7f3;
    padding-top: .85rem !important;
    padding-bottom: .85rem !important;
}

.orden-compra .orden-card-header h6{
    letter-spacing: 0;
}

.orden-compra .card-body{
    padding: 1.35rem;
}

.orden-edicion > .row > .col-xl-12 > .alert-warning,
.orden-compra .orden-alert{
    border: 1px solid #f3d98a;
    border-left: .25rem solid #d39e00;
    background: #fff8df;
    color: #725300;
    box-shadow: 0 .25rem .75rem rgba(115, 83, 0, .05);
}

.orden-compra label{
    margin-bottom: .3rem;
    color: #5d667a;
    font-size: .78rem;
    font-weight: 700;
}

.orden-compra .form-control,
.orden-compra .custom-select,
.orden-compra .select2-container--bootstrap4 .select2-selection{
    border-color: #cbd5e6;
    color: #4a5265;
    font-size: .82rem;
}

.orden-compra .form-control:disabled,
.orden-compra .form-control[readonly],
.orden-compra select.form-control:disabled{
    background-color: #f3f6fb;
    color: #4f5a70;
    opacity: 1;
}

.orden-compra .orden-table{
    margin-bottom: 0;
    color: #515b70;
}

.orden-compra .orden-table thead tr{
    background-color: #1C3879 !important;
}

.orden-compra .orden-table th{
    border-color: rgba(255, 255, 255, .35) !important;
    font-size: .78rem;
    height: 2.85rem;
    padding: .65rem .6rem;
    vertical-align: middle;
}

.orden-compra .orden-table td{
    border-color: #dfe7f3;
    padding: .75rem .7rem;
    vertical-align: middle;
}

.orden-compra .orden-table tbody tr:hover{
    background-color: #fbfdff;
}

.orden-compra .orden-table textarea.form-control{
    min-height: 4.25rem;
    resize: vertical;
}

.orden-compra .orden-table .btn{
    box-shadow: none;
}

.orden-compra .orden-row-resumen td{
    background: #fbfcff;
}

.orden-compra .orden-row-nota td:first-child,
.orden-compra .orden-row-subvenciones td:first-child{
    color: #4a5265;
    font-size: .78rem;
    letter-spacing: 0;
}

.orden-compra .orden-row-nota-detalle td:first-child,
.orden-compra .orden-row-subvenciones-detalle td:first-child{
    color: #5a6478;
    line-height: 1.5;
}

.orden-compra .orden-impuestos table{
    margin-bottom: 0;
}

.orden-compra .orden-impuestos td{
    border: 0 !important;
    padding: .45rem .7rem !important;
    background: transparent !important;
}

.orden-compra .orden-resumen-label{
    color: #596174;
    font-size: .78rem;
    text-transform: uppercase;
}

.orden-compra .orden-resumen-valor h6,
.orden-compra .orden-total-valor h5{
    margin-bottom: 0;
}

.orden-compra .subtotal,
.orden-compra .total{
    text-align: right;
    font-weight: 700;
}

.orden-compra .total{
    color: #1C3879;
    font-size: 1rem;
}

.orden-compra .orden-total-valor,
.orden-compra .orden-total-valor .total{
    background: #f2f6ff !important;
    color: #1C3879;
    font-size: 1.08rem;
}

.orden-compra .orden-confirmacion{
    border-color: #f3d98a;
    border-left: .25rem solid #d39e00;
    background-color: #fff7db;
    color: #735300;
    margin-bottom: 0;
}

.orden-compra .orden-confirmacion p{
    margin-bottom: .6rem;
}

.orden-compra .orden-btn-enviar{
    padding-top: .65rem;
    padding-bottom: .65rem;
    font-weight: 700;
}

.orden-compra .orden-aprobacion{
    border-left: .25rem solid #4e73df;
    margin-top: .25rem;
}

.orden-compra .orden-aprobacion-body{
    padding: 1.35rem 1.5rem;
}

.orden-compra .orden-aprobacion-title h1{
    font-size: 1.35rem;
}

.orden-compra .orden-aprobacion-actions{
    padding-top: 1.25rem !important;
}

.orden-compra .orden-aprobacion-actions .form-group{
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 0;
}

.orden-compra .orden-aprobacion-actions .btn{
    width: auto;
    min-width: 8.5rem;
    margin-top: 0;
    font-weight: 700;
}

.orden-compra .orden-btn-rechazar::before{
    content: "\f00d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: .4rem;
}

.orden-compra .orden-btn-aprobar::before{
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: .4rem;
}

@media (max-width: 767.98px){
    .orden-compra .orden-page-heading{
        display: block !important;
    }

    .orden-compra .orden-page-actions{
        justify-content: flex-start;
        margin-top: .75rem;
    }

    .orden-compra .orden-aprobacion-actions .form-group{
        display: block;
    }

    .orden-compra .orden-aprobacion-actions .btn{
        width: 100%;
        margin-top: .5rem;
    }
}
