/* Premium Admin Sidebar Styles */
#sidebar {
    background: #ffffff;
    border-right: 1px solid #e8ebf2;
    height: calc(100vh - 100px);
    position: sticky;
    top: 100px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-sticky {
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Brand Header */
.sidebar-brand {
    padding: 24px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
    border-bottom: 1px solid #e8ebf2;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--royal-blue);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(36, 63, 129, 0.3);
}

.brand-text {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    color: #2c3e50;
}

.brand-text span {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #8898aa;
}

/* User Card */
.user-card {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-bottom: 1px solid #e8ebf2;
    flex-shrink: 0;
}

.user-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--applicant-primary-dark) 0%, var(--applicant-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(36, 63, 129, 0.3);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #8898aa;
    text-transform: capitalize;
}

/* Quick Stats */
.quick-stats {
    padding: 16px 20px;
    background: #f8f9ff;
    border-bottom: 1px solid #e8ebf2;
    flex-shrink: 0;
}

.quick-stats-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8898aa;
    margin-bottom: 12px;
    font-weight: 600;
}

.stats-row {
    display: flex;
    gap: 12px;
}

.stat-item {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid #e8ebf2;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--royal-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 63, 129, 0.1);
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--royal-blue);
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Navigation */
.nav-section {
    padding: 16px 12px 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c4c9d4;
    font-weight: 600;
    padding: 0 12px 8px;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #525f7f;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--applicant-primary-dark) 0%, var(--applicant-primary) 100%);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(90deg, rgba(36, 63, 129, 0.06) 0%, rgba(36, 63, 129, 0.02) 100%);
    color: var(--applicant-primary);
}

.nav-link:hover::before {
    height: 24px;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(36, 63, 129, 0.1) 0%, rgba(36, 63, 129, 0.04) 100%);
    color: var(--applicant-primary-dark);
    font-weight: 600;
}

.nav-link.active::before {
    height: 24px;
}

.nav-link i {
    width: 22px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* Bottom Section */
.sidebar-bottom {
    padding: 16px;
    border-top: 1px solid #e8ebf2;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    flex-shrink: 0;
}

.help-card {
    background: linear-gradient(135deg, var(--applicant-primary-dark) 0%, var(--applicant-primary) 100%);
    border-radius: 14px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.help-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.help-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.help-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.help-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.help-text {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.help-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
}

/* Logout Button */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #e63757;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.logout-btn:hover {
    background: linear-gradient(90deg, rgba(230, 55, 87, 0.08) 0%, rgba(230, 55, 87, 0.02) 100%);
}

.logout-btn i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

/* Scrollbar */
.sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: #e0e5ec;
    border-radius: 3px;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: #c4c9d4;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        height: auto;
        max-height: calc(100vh - 70px);
        overflow: hidden;
    }

    .sidebar-brand,
    .user-card,
    .quick-stats,
    .sidebar-bottom {
        flex-shrink: 0;
    }

     .sidebar_bottom{
        display: none;
    }

    .nav-section {
        overflow-y: auto;
    }
}

/* ============================================
   Mobile Sidebar Toggle Styles
   ============================================ */

/* Mobile Sidebar Overlay/Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    display: none;
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 991px) {
    .mobile-sidebar-toggle {
        display: block;
    }
    
    #sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        width: 280px;
        z-index: 1050;
        transition: left 0.3s ease;
        overflow-y: auto;
        margin: 0;
        box-shadow: none;
    }
    
    #sidebar.show {
        left: 0;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    /* Sidebar close button for mobile */
    .sidebar-close-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        line-height: 35px;
        text-align: center;
        transition: background 0.3s ease;
        z-index: 1051;
    }
    
    .sidebar-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    /* Adjust content area for mobile */
    .main-content {
        width: 100% !important;
        padding: 15px;
        transition: margin-left 0.3s ease;
    }
    
    body.sidebar-open .main-content {
        margin-left: 0;
    }
    
    /* Hide sidebar on desktop toggle */
    .sidebar-toggle-container {
        display: none;
    }
    
    /* Ensure sidebar elements are visible on mobile */
    .sidebar-sticky {
        padding-top: 60px;
    }
}

/* Hide close button on desktop */
@media (min-width: 992px) {
    .sidebar-close-btn {
        display: none !important;
    }
    
    #sidebar {
        position: sticky;
        top: 100px;
        height: calc(100vh - 100px);
        margin-top: 0;
    }
}