﻿.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-tertiary));
    padding: 20px 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: block;
}

    .sidebar.collapsed {
        width: 80px;
    }

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    display: block;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

    .sidebar-logo i {
        font-size: 28px;
        color: #60a5fa;
    }

    .sidebar-logo span {
        font-size: 20px;
        font-weight: 600;
        transition: opacity 0.3s;
    }

.sidebar.collapsed .toggle-btn .title-toggle-button {
    display: none;
}

.sidebar.collapsed .toggle-btn {
    justify-content: center;
}

.toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sidebar.collapsed .toggle-btn .icon-toggle-button {
    transform: rotate(180deg);
    padding: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 10px;
}

.sidebar .submenu {
    padding-left: 1.6rem;
}

    .sidebar .submenu .menu-link {
        font-size: 0.92rem;
        padding: 8px 12px 8px 22px;
        margin-left: 6px;
        background: rgba(255,255,255,0.03);
        border-radius: 6px;
        box-shadow: inset 4px 0 0 rgba(255,255,255,0.04);
        display: flex;
        align-items: center;
        gap: 10px;
        color: rgba(255,255,255,0.95);
        transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    }

        .sidebar .submenu .menu-link i {
            font-size: 14px;
            color: rgba(255,255,255,0.9);
            min-width: 18px;
        }

        .sidebar .submenu .menu-link:hover {
            background: rgba(255,255,255,0.08);
            color: #ffffff;
        }

            .sidebar .submenu .menu-link:hover i {
                color: #ffffff;
            }

        .sidebar .submenu .menu-link.active {
            background: linear-gradient(90deg, rgba(0,0,0,0.28), rgba(0,0,0,0.20));
            color: #ffffff;
            font-weight: 600;
            box-shadow: none;
            transform: translateX(2px);
            border-left: 4px solid var(--color-primary);
            padding-left: 18px;
            border-radius: 6px;
        }

            .sidebar .submenu .menu-link.active i,
            .sidebar .submenu .menu-link.active span {
                color: #ffffff;
            }

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    justify-content: start;
}

    .menu-link:hover {
        background: var(--color-primary);
        color: var(--color-secondary);
    }

    .menu-link.active {
        background: var(--color-primary);
        color: var(--color-tertiary);
    }

    .menu-link i {
        font-size: 18px;
        min-width: 20px;
    }

    .menu-link span {
        transition: opacity 0.3s;
        white-space: nowrap;
        display: block;
    }

.sidebar.collapsed .menu-link span {
    display: none;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0px;
    right: 0;
    height: 70px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
    transition: left 0.3s ease;
    z-index: 999;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    cursor: pointer;
    transition: all 0.3s;
}

    .user-menu-toggle:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.user-avatar-navbar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.user-info-navbar {
    text-align: left;
}

.user-name-navbar {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: block;
}

.user-role-navbar {
    font-size: 12px;
    color: #64748b;
}

.user-menu-toggle i {
    color: #64748b;
    font-size: 12px;
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

    .dropdown-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: block;
    }

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

    .dropdown-header strong {
        display: block;
        color: #1e293b;
        margin-bottom: 5px;
    }

    .dropdown-header small {
        color: #64748b;
    }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    transition: all 0.3s;
}

    .dropdown-item:hover {
        background: #f8fafc;
        color: #3b82f6;
    }

    .dropdown-item i {
        width: 20px;
    }

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 5px 0;
}

.main-content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 30px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 70px);
}

.sidebar.collapsed ~ .main-wrapper .main-content {
    margin-left: 80px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}

.page-subtitle {
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 768px) {
    .sidebar-header {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
        top: 70px;
    }

        .sidebar.mobile-active {
            transform: translateX(0);
        }

    .navbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block !important;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #1e293b;
    cursor: pointer;
    margin-right: auto;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }