/* Modern Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    width: 320px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    max-height: 100vh;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 0 0 20px 20px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.sidebar-brand:hover::before {
    transform: translateX(100%);
}

.sidebar-brand:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sidebar-brand-icon {
    margin-bottom: 0.5rem;
}

.sidebar-brand-icon img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.sidebar-brand-icon img:hover {
    transform: scale(1.05);
}

.sidebar-brand-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    background: linear-gradient(45deg, #fff, #f0f0f0, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Sidebar Headings */
.sidebar-heading {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2rem 1.5rem 1rem;
    margin: 1rem 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-heading h6 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    text-align: center;
    padding: 0.5rem 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Items */
.sidebar-bar {
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.02);
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
}

.sidebar-bar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-bar img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* User Info Section */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Action Buttons */
.btn-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.1rem;
    margin: 0 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-circle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-circle:active {
    transform: translateY(0);
}

/* Button Group for User Actions */
.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    padding: 0 0.5rem;
}

.btn-group .btn {
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    padding: 0.5rem;
    font-size: 0.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-group .btn i {
    font-size: 1rem;
    margin: 0;
}

/* Progress Bars */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
}

.progress-bar.bg-info {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

/* Form Controls */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control option {
    background: #4a5568;
    color: white;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Links */
.sidebar a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    color: white;
    text-decoration: none;
}

/* Dividers */
.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
    opacity: 0.5;
}

/* Search Results */
.panel-footer {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 0.5rem 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.list-group {
    background: transparent;
    border: none;
}

.list-group-item {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.list-group-item a {
    color: inherit;
    text-decoration: none;
}

/* Stats Display */
.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    width: 100%;
}

.stats-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    flex-shrink: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-label i {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.stats-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stats-value i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* Button Icons */
.btn i {
    margin-right: 0.3rem;
}

.btn-sm i {
    margin-right: 0.2rem;
}

/* Sidebar Heading Icon */
.sidebar-heading h6 i {
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
        max-height: none;
    }

    .sidebar-brand {
        padding: 1rem;
        position: relative;
    }

    .sidebar-bar {
        padding: 0.5rem 1rem;
        margin: 0.25rem 0.25rem;
    }

    .btn-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 0.2rem;
    }

    .btn-group {
        gap: 0.3rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .sidebar {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

    .form-control {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(71, 85, 105, 0.3);
    }

    .form-control:focus {
        background: rgba(51, 65, 85, 0.9);
        border-color: rgba(96, 165, 250, 0.5);
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-bar {
    animation: slideIn 0.3s ease-out;
}

/* Custom scrollbar for webkit browsers */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}