/* ========== LOADING SPINNER ========== */
.container-loading {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Fondo translúcido */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.loading-surface {
    background: white;
    padding: 1.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.loader-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #10b981;
    animation: spinnerRotate 1.5s linear infinite;
}

    .spinner-ring:nth-child(2) {
        width: 80%;
        height: 80%;
        top: 10%;
        left: 10%;
        border-top-color: #3b82f6;
        animation-direction: reverse;
        animation-duration: 1.2s;
    }

    .spinner-ring:nth-child(3) {
        width: 60%;
        height: 60%;
        top: 20%;
        left: 20%;
        border-top-color: #f59e0b;
        animation-duration: 0.9s;
    }

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner-text {
    font-size: 1rem;
    color: #4b5563;
    position: relative;
}

    .spinner-text::after {
        content: "...";
        position: absolute;
        animation: ellipsis 1.5s infinite;
        width: 20px;
        text-align: left;
    }

@keyframes ellipsis {
    0% {
        content: ".";
    }

    33% {
        content: "..";
    }

    66% {
        content: "...";
    }

    100% {
        content: "";
    }
}

/*==========================================================================*/



.container-sidebar {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--color-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    z-index: 10;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }

.sidebar-header {
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-header{
    padding: 0 5px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 50px;
    height: 25px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 5px;
    color: #0a72bb;
}



/*Name User*/
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.custom-select-profile {
    background-color: #0070cc;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 11px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

    .custom-select-profile:hover,
    .custom-select-profile.active {
        background-color: #005fa3;
    }

    .custom-select-profile i {
        transition: transform 0.3s ease;
    }

    .custom-select-profile.active i {
        transform: rotate(180deg);
    }

.custom-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 160px;
    margin-top: 6px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 4px 0;
    display: none;
    z-index: 10;
}

.dropdown-option {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

    .dropdown-option:hover {
        background-color: #f0f0f0;
    }

/**/

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    white-space: nowrap;
}

/* Menu Item */
.menu-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    font-size: 14px;
    margin-bottom: 1px;
    padding: 1px 5px;
}

/* Menu Header */
.menu-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 10px;
    transition: background-color 0.3s;
    border-radius: 5px;
}


    .menu-header:hover {
        background-color: var(--color-primary-hover);
        color: var(--color-white);
    }

        .menu-header:hover i,
        .menu-header:hover .menu-item-text {
            color: var(--color-white);
        }

    .menu-header i {
        width: 20px;
        text-align: center;
        color: var(--color-muted);
        font-size: 14px;
        transition: color 0.3s;
    }

.menu-item-text {
    color: var(--color-muted);
    transition: color 0.3s;
}

/* Active Menu Header */
.menu-header.active {
    background-color: #0C7FD0;
    border-radius: 5px;
}

    .menu-header.active i,
    .menu-header.active .menu-item-text {
        color: #ffffff;
    }

/* Highlight when a sub-menu is active */
.menu-header.active-submenu {
    background-color: #E6F2FB;
    border-left: 4px solid #0C7FD0;
    border-radius: 5px 0 0 5px;
    color: #0C7FD0;
}

    .menu-header.active-submenu i,
    .menu-header.active-submenu .menu-item-text {
        color: #0C7FD0;
    }

/* Toggle Icon */
.toggle-icon {
    margin-left: auto;
    color: #ffffff;
    transition: transform 0.3s ease;
}

    /*.toggle-icon.rotated {
        transform: rotate(180deg);
    }*/

/* Submenu */
.submenu {
    padding-left: 30px;
    margin-top: 5px;
    display: none;
}

.sub-menu-item {
    padding: 8px 10px;
    font-size: 14px;
    color: var(--color-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    border-radius: 5px;
}

    .sub-menu-item i {
        margin-right: 8px;
        font-size: 12px;
        color: #0C7FD0;
    }

    .sub-menu-item:hover {
        background-color: #E6F2FB;
    }

    .sub-menu-item.active {
        background-color: #0C7FD0;
        color: #ffffff;
        font-weight: 600;
    }

        .sub-menu-item.active i {
            color: #ffffff;
        }


/*Sidebar*/
.sidebar-footer {
    height: var(--footer-height);
    padding: 16px;
    border-top: 1px solid #0c7fd0;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #095EA3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    color: white;
}

.user-info {
    overflow: hidden;
}

.username {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0c7fd0;
}

.user-email {
    font-size: 12px;
    color: #8c8c8c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .menu-item-text,
.sidebar.collapsed .section-title,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .enterprise-badge,
.sidebar.collapsed .icon-submenu,
.sidebar.collapsed .submenu,
.sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    align-items: center;
}

    

    .sidebar.collapsed .menu-item i {
        margin-right: 0;
    }

.current-path {
    padding: 16px;
    font-size: 13px;
    color: #7FB8E4;
    border-top: 1px solid #0A6BB7;
}

.path-segment {
    display: inline-flex;
    align-items: center;
}

.path-separator {
    margin: 0 6px;
    color: #7FB8E4;
    font-size: 12px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left var(--transition-speed) ease;
}

.router-outlet {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f5f5;
    position: relative;
}

.content-header {
    padding: 11px 24px;
    background-color: var(--color-bg);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .content-header .header-left {
        display: flex;
    }

        .content-header .header-left .navegation h2 {
            font-size: 15px;
        }

        .content-header .header-left .navegation p {
            font-size: 12px;
        }


        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sidebar.collapsed + .main-content {
    margin-left: calc(-1 * (var(--sidebar-width) - var(--sidebar-collapsed-width))) + 25;
}

.welcome-message {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

    .welcome-message h2 {
        font-size: 28px;
        margin-bottom: 16px;
        color: #333;
    }

    .welcome-message p {
        font-size: 16px;
        color: #666;
        line-height: 1.6;
    }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom:0px;
}

.breadcrumb-label {
    cursor: pointer;
    color: #666;
}

    .breadcrumb-label:hover {
        cursor: pointer;
        color: #0C7FD0;
    }

/* ========== NUEVO BOTÓN FIJO PARA MÓVIL Y ESCRITORIO ========== */

/* Estilo base de los botones toggle */
.toggle-btn {
    width: 32px;
    height: 32px;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-white);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

    .toggle-btn:hover {
        background-color: #f0f0f0;
        transform: scale(1.05);
    }

    .toggle-btn i {
        font-size: 16px;
        transition: transform 0.3s ease;
        color: #666;
    }

/*.sidebar.collapsed + .main-content .toggle-btn i {
    transform: rotate(180deg);
}*/



/* Botón visible solo en escritorio */
.toggle-desktop {
    display: flex;
    align-items: center;
}

/* Botón visible solo en móvil */
.toggle-mobile {
    display: none;
    margin-left: auto;
}


/* A partir de 768px para abajo, ocultamos el botón desktop y mostramos el móvil */
@media (max-width: 768px) {
    .toggle-mobile {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -210px;
        width: var(--sidebar-width);
        height: 100%;
        transition: left var(--transition-speed);
        z-index: 1000;
    }

        .sidebar.open {
            left: 0;
        }

    .main-content {
        margin-left: 0 !important; /* evita desplazamiento */
    }
}





/*Language Traslate*/
.nav-wrapper {
    position: relative;
    display: inline-block;
}

.sl-nav {
    position: relative;
}

    .sl-nav ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .sl-nav li {
        cursor: pointer;
        padding: 5px 12px;
        position: relative;
    }

    .sl-nav > ul > li {
        display: inline-block;
        background: var(--color-bg-secondary);
        color: #666;
        border-radius: 4px;
    }

        .sl-nav > ul > li:hover {
            background: #e0e0e0;
        }

.language {
    margin-right: 5px;
    text-transform: uppercase;
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 120px;
}

    .language-dropdown.show {
        display: block;
        position:absolute;
    }

    .language-dropdown li {
        padding: 8px 15px;
        white-space: nowrap;
        display: flex;
        align-items: center;
    }

        .language-dropdown li:hover {
            background: #f5f5f5;
        }

.sl-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 8px;
    background-size: cover;
    background-position: center;
}

.flag-En {
    background-image: url('https://flagcdn.com/w20/gb.png');
}

.flag-Es {
    background-image: url('https://flagcdn.com/w20/es.png');
}