/*
 * Sidebar EEMPB Cloud
 * Navegacion minimalista sobre KaiAdmin, aislada de los archivos del vendor.
 */

:root {
    --eem-sidebar-bg: #0b1f33;
    --eem-sidebar-bg-elevated: #102a43;
    --eem-sidebar-bg-hover: #163b5c;
    --eem-sidebar-accent: #f58a1f;
    --eem-sidebar-accent-soft: #ffc078;
    --eem-sidebar-text: #f8fafc;
    --eem-sidebar-muted: #ffffff;
    --eem-sidebar-border: rgba(255, 255, 255, 0.09);
    --eem-sidebar-focus: rgba(255, 192, 120, 0.96);
    --eem-sidebar-shadow: 18px 0 42px rgba(2, 15, 28, 0.38), 3px 0 0 rgba(255, 255, 255, 0.05);
}

.sidebar.sidebar-modern {
    isolation: isolate;
    overflow: hidden;
    color: var(--eem-sidebar-text);
    background: var(--eem-sidebar-bg) !important;
    box-shadow: var(--eem-sidebar-shadow);
}

.sidebar.sidebar-modern::before,
.sidebar.sidebar-modern::after {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.sidebar.sidebar-modern::before {
    top: 72px;
    right: -108px;
    width: 245px;
    height: 245px;
    border: 1px solid rgba(255, 255, 255, 0.032);
    background:
        radial-gradient(circle at 38% 36%, rgba(255, 255, 255, 0.042), rgba(76, 151, 201, 0.020) 46%, transparent 68%);
    box-shadow:
        inset 0 0 42px rgba(255, 255, 255, 0.014),
        0 0 60px rgba(59, 130, 177, 0.018);
}

.sidebar.sidebar-modern::after {
    bottom: -116px;
    left: -104px;
    width: 285px;
    height: 285px;
    border: 1px solid rgba(245, 138, 31, 0.045);
    background:
        radial-gradient(circle at 58% 42%, rgba(245, 138, 31, 0.055), rgba(255, 255, 255, 0.025) 45%, transparent 69%);
    box-shadow: inset 0 0 54px rgba(255, 255, 255, 0.018);
}

.sidebar-modern .sidebar-logo,
.sidebar-modern .logo-header {
    background: var(--eem-sidebar-bg) !important;
    border-bottom: 1px solid var(--eem-sidebar-border);
    box-shadow: none;
}

.sidebar-modern .logo-header {
    position: relative;
    min-height: 70px;
    padding-inline: 58px;
    justify-content: center;
}

.sidebar-modern .logo {
    position: relative;
    display: inline-flex;
    min-width: 0;
    margin-inline: auto;
    align-items: center;
    justify-content: center;
}

.sidebar-modern .logo::before {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    content: "";
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url("../../img/eem/logo/esferaEE.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 28px 28px;
}

.sidebar-modern .navbar-brand {
    display: block;
    width: auto;
    max-width: 148px;
    height: 48px;
    object-fit: contain;
    transition: opacity 0.18s ease;
}

.sidebar-modern .nav-toggle {
    position: absolute;
    right: 12px;
}

.sidebar-modern .btn-toggle {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--eem-sidebar-muted) !important;
    border: 1px solid var(--eem-sidebar-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.sidebar-modern .btn-toggle:hover,
.sidebar-modern .btn-toggle:focus-visible {
    color: #fff !important;
    border-color: rgba(245, 138, 31, 0.42);
    background: rgba(245, 138, 31, 0.14) !important;
}

.sidebar-modern .sidebar-wrapper {
    position: relative;
    z-index: 2;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar-modern .sidebar-wrapper::-webkit-scrollbar {
    width: 5px;
}

.sidebar-modern .sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-modern .sidebar-wrapper::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-modern .sidebar-content {
    position: relative;
    z-index: 2;
    min-height: 100%;
    padding: 14px 12px 24px;
}

.sidebar-modern .sidebar-footer-illustration {
    display: none;
}

.sidebar-search {
    position: relative;
    margin: 0 2px 16px;
}

.sidebar-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

.sidebar-search-control {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-icon {
    position: absolute;
    left: 13px;
    z-index: 1;
    color: var(--eem-sidebar-muted);
    font-size: 12px;
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    height: 40px;
    padding: 0 38px;
    color: #fff;
    border: 1px solid var(--eem-sidebar-border);
    border-radius: 11px;
    outline: none;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    font-size: 12px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.sidebar-search-input:hover {
    background: rgba(255, 255, 255, 0.065);
}

.sidebar-search-input:focus {
    border-color: rgba(245, 138, 31, 0.62);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 0 0 3px rgba(245, 138, 31, 0.12);
}

.sidebar-search-clear {
    position: absolute;
    right: 6px;
    display: inline-grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    color: var(--eem-sidebar-muted);
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.sidebar-search-clear:hover,
.sidebar-search-clear:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-search-empty {
    margin: 9px 4px 0;
    color: var(--eem-sidebar-muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.sidebar-modern .nav-secondary > .nav-section {
    margin: 22px 10px 7px;
    padding: 0;
}

.sidebar-modern .nav-secondary > .nav-section:first-of-type {
    margin-top: 6px;
}

.sidebar-modern .nav-section .text-section {
    display: block;
    width: auto;
    padding: 0;
    color: #ffffff !important;
    border: 0;
    background: transparent;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.35;
    text-transform: uppercase;
}

.sidebar-modern .nav-item {
    margin: 2px 0;
}

.sidebar-modern .nav-item > a {
    position: relative;
    min-height: 43px;
    margin: 0;
    padding: 9px 11px;
    color: var(--eem-sidebar-muted) !important;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent !important;
    box-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.sidebar-modern .nav-item > a:hover,
.sidebar-modern .nav-item > a:focus-visible {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.06);
    background: var(--eem-sidebar-bg-hover) !important;
    box-shadow: none;
    transform: none;
}

.sidebar-modern .nav-item > a > i {
    width: 24px;
    color: #ffffff !important;
    font-size: 15px;
    text-align: center;
    transition: color 0.18s ease;
}

.sidebar-modern .nav-item > a:hover > i,
.sidebar-modern .nav-item > a:focus-visible > i {
    color: #ffffff !important;
    transform: none;
}

.sidebar-modern .nav-item > a p {
    overflow: hidden;
    color: inherit !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: none;
    text-overflow: ellipsis;
}

.sidebar-modern .nav-item.active > a {
    color: #ffffff !important;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.075) !important;
    box-shadow: none;
}

.sidebar-modern .nav-item.active > a::before {
    display: none !important;
    content: none !important;
}

.sidebar-modern .nav-item.active > a:not([data-bs-toggle="collapse"]) {
    color: #ffffff !important;
    border-color: transparent;
    background:
        linear-gradient(135deg, var(--eempb-orange), #df7110) !important;
    box-shadow: 0 9px 22px rgba(242, 123, 22, 0.28);
}

#eem-sidebar .nav-secondary > .nav-item.active > a > i {
    color: var(--eempb-orange) !important;
}

#eem-sidebar .nav-secondary > .nav-item.active > a:not([data-bs-toggle="collapse"]) > i {
    color: #ffffff !important;
}

.sidebar-modern .nav-item.active > a > .caret {
    color: #ffffff !important;
}

.sidebar-modern .nav-item.active > a p {
    color: #ffffff !important;
}

#eem-sidebar .nav-secondary > .nav-item:not(.active) > a > i,
#eem-sidebar .nav-secondary > .nav-item:not(.active) > a:hover > i,
#eem-sidebar .nav-secondary > .nav-item:not(.active) > a:focus-visible > i {
    color: #ffffff !important;
}

#eem-sidebar .nav-collapse > li > a,
#eem-sidebar .nav-collapse > li > a .sub-item,
#eem-sidebar .nav-collapse > li > a:hover .sub-item,
#eem-sidebar .nav-collapse > li > a:focus-visible .sub-item,
#eem-sidebar .nav-secondary > .nav-item.active > a > p,
#eem-sidebar .nav-secondary > .nav-item.active > a:not([data-bs-toggle="collapse"]) > p,
#eem-sidebar .nav-collapse > li.active > a,
#eem-sidebar .nav-collapse > li.active > a .sub-item,
#eem-sidebar .nav-collapse > li.active > a span.sub-item {
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.sidebar-modern .nav-item .caret {
    color: #ffffff;
    transition: color 0.18s ease, transform 0.2s ease;
}

.sidebar-modern .nav-item > a[aria-expanded="true"] .caret {
    transform: rotate(180deg);
}

.sidebar-modern .btn-toggle:focus-visible,
.sidebar-modern .sidebar-search-clear:focus-visible,
.sidebar-modern .nav-item > a:focus-visible,
.sidebar-modern .nav-collapse > li > a:focus-visible {
    outline: 2px solid var(--eem-sidebar-focus);
    outline-offset: 2px;
}

.sidebar-modern .nav-collapse {
    position: relative;
    margin: 3px 0 8px 10px;
    padding: 3px 0 3px 8px;
    border: 0;
    background: transparent;
}

.sidebar-modern .nav-collapse::before {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 1px;
    content: "";
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-modern .nav-collapse > li {
    margin: 1px 0;
}

.sidebar-modern .nav-collapse > li > a {
    position: relative;
    min-height: 34px;
    padding: 7px 9px;
    color: #ffffff !important;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.sidebar-modern .nav-collapse > li > a:hover,
.sidebar-modern .nav-collapse > li > a:focus-visible {
    padding-left: 9px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
}

.sidebar-modern .nav-collapse > li.active > a {
    color: #ffffff !important;
    border: 0;
    background:
        linear-gradient(135deg, var(--eempb-orange), #df7110);
    box-shadow: 0 8px 20px rgba(242, 123, 22, 0.24);
}

.sidebar-modern .nav-collapse > li.active > a::before {
    display: none;
    content: none;
}

.sidebar-modern .nav-collapse .sub-item {
    color: inherit !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.sidebar-modern .sidebar-nav-final-item {
    margin-top: 14px;
    margin-bottom: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--eem-sidebar-border);
}

.sidebar-modern [hidden] {
    display: none !important;
}

.sidebar-modern-backdrop {
    position: fixed;
    z-index: 999;
    inset: 0;
    visibility: hidden;
    background: rgba(3, 14, 25, 0.58);
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: visibility 0.2s ease, opacity 0.2s ease;
}

html.nav_open .sidebar-modern-backdrop,
body.nav_open .sidebar-modern-backdrop {
    visibility: visible;
    opacity: 1;
}

@media screen and (min-width: 992px) {
    .sidebar-modern-backdrop {
        display: none;
    }

    .sidebar-modern .nav-toggle .sidenav-toggler {
        display: none;
    }

    .sidebar-modern .nav-toggle .toggle-sidebar {
        display: inline-grid;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .sidebar-search {
        display: none;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-section .text-section {
        opacity: 0;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .navbar-brand {
        display: none;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .logo::before {
        display: block;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .logo-header {
        padding-inline: 12px;
        justify-content: center;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-toggle {
        display: none;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav.nav-secondary > .nav-item {
        display: flex !important;
        width: 100%;
        justify-content: center;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-item > a {
        display: flex !important;
        width: 46px;
        min-width: 46px;
        min-height: 43px;
        margin: 2px auto !important;
        padding: 0 !important;
        align-items: center;
        justify-content: center;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-item.active > a::before {
        top: 9px;
        bottom: 9px;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-item > a > i {
        width: 20px !important;
        min-width: 20px;
        margin: 0 !important;
        flex: 0 0 20px;
        text-align: center;
    }

    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-item > a > p,
    .sidebar_minimize:not(.sidebar_minimize_hover) .sidebar-modern .nav-item > a > .caret {
        display: none !important;
    }
}

@media screen and (max-width: 991.98px) {
    .sidebar.sidebar-modern {
        width: min(88vw, 286px);
        box-shadow: 18px 0 42px rgba(3, 14, 25, 0.34);
    }

    .sidebar-modern .nav-toggle .toggle-sidebar {
        display: none;
    }

    .sidebar-modern .nav-toggle .sidenav-toggler {
        display: inline-grid;
    }

    .sidebar-modern .sidebar-content {
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }

    .sidebar-modern .sidebar-search-input {
        height: 44px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-modern *,
    .sidebar-modern *::before,
    .sidebar-modern *::after,
    .sidebar-modern-backdrop {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
