/* ========================================
   DASHBOARD SIDEBAR COMPONENT
   Μινιμαλιστικό, επαγγελματικό sidebar για dashboard navigation
   ======================================== */

/* Sidebar Container */
.dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-right: 1px solid rgba(18, 15, 45, 0.08);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

/* Sidebar Header */
.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(18, 15, 45, 0.06);
    background: rgba(40, 120, 235, 0.03);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.sidebar-logo:hover {
    transform: translateX(3px);
}

.sidebar-logo i {
    font-size: 24px;
    color: var(--primary);
    margin-right: 12px;
}

.sidebar-logo-text {
    font-family: 'Jost', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1;
}

/* User Info Section */
.sidebar-user-info {
    padding: 20px;
    background: rgba(40, 120, 235, 0.05);
    border-bottom: 1px solid rgba(18, 15, 45, 0.06);
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #1a5fb4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(40, 120, 235, 0.2);
}

.sidebar-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

/* Custom Scrollbar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(40, 120, 235, 0.2);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(40, 120, 235, 0.4);
}

/* Nav Items */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 3px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border: none;
    background: transparent;
    width: calc(100% - 20px);
    text-align: left;
}

.sidebar-nav-item i {
    font-size: 18px;
    width: 24px;
    margin-right: 12px;
    color: #6c757d;
    transition: color 0.2s ease;
}

.sidebar-nav-item:hover {
    background: rgba(40, 120, 235, 0.08);
    color: var(--primary);
    text-decoration: none;
    transform: translateX(4px);
}

.sidebar-nav-item:hover i {
    color: var(--primary);
}

/* Active State */
.sidebar-nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, #1a5fb4 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(40, 120, 235, 0.25);
}

.sidebar-nav-item.active i {
    color: white;
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* Badge Count */
.sidebar-badge {
    margin-left: auto;
    background: var(--secondary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav-item.active .sidebar-badge {
    background: white;
    color: var(--primary);
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(18, 15, 45, 0.06);
    margin: 15px 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(18, 15, 45, 0.06);
    background: rgba(241, 77, 93, 0.03);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(241, 77, 93, 0.3);
    border-radius: 8px;
    background: white;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-logout-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.sidebar-logout-btn:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 77, 93, 0.3);
}

/* Main Content Wrapper with Sidebar */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.dashboard-main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    background: #f8f9fc;
    transition: margin-left 0.3s ease;
}

/* Mobile Toggle Button */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 120, 235, 0.3);
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(40, 120, 235, 0.4);
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablet and below (992px) */
@media (max-width: 992px) {
    .dashboard-sidebar {
        transform: translateX(-260px);
    }

    .dashboard-sidebar.show {
        transform: translateX(0);
    }

    .dashboard-main-content {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Overlay when sidebar is open on mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(18, 15, 45, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

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

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .sidebar-header {
        padding: 20px 15px;
    }

    .sidebar-logo-text {
        font-size: 18px;
    }

    .sidebar-user-info {
        padding: 15px;
    }

    .sidebar-user-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .sidebar-user-name {
        font-size: 14px;
    }

    .sidebar-nav-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .sidebar-nav-item i {
        font-size: 16px;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .dashboard-sidebar {
        width: 240px;
        transform: translateX(-240px);
    }
}