/* ==================== SOFT UI SIDEBAR (Neumorphism + Glassmorphism) ==================== */
.modern-sidebar .e-sidebar {
    background: rgba(228, 232, 240, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        6px 0 18px rgba(163, 177, 198, 0.3),
        -2px 0 8px rgba(255, 255, 255, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.45);
}

.modern-dock {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom Scrollbar — Soft UI */
.modern-dock::-webkit-scrollbar {
    width: 6px;
}

.modern-dock::-webkit-scrollbar-track {
    background: transparent;
}

.modern-dock::-webkit-scrollbar-thumb {
    background: rgba(163, 177, 198, 0.45);
    border-radius: 3px;
}

.modern-dock::-webkit-scrollbar-thumb:hover {
    background: rgba(163, 177, 198, 0.65);
}

/* User Profile Section — Glass Card */
.modern-user-profile {
    padding: 24px 20px;
    margin: 16px 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    box-shadow:
        4px 4px 10px rgba(163, 177, 198, 0.35),
        -4px -4px 10px rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.modern-user-profile::after {
    display: none;
}

.profile-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        3px 3px 8px rgba(163, 177, 198, 0.4),
        -3px -3px 8px rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-avatar-initials {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.status-indicator {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2.5px solid #e4e8f0;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.8); }
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1a2332;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.profile-role {
    margin: 3px 0 0 0;
    font-size: 11px;
    color: #3b82f6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Navigation */
.modern-navigation {
    flex: 1;
    padding: 8px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.section-label {
    display: block;
    padding: 10px 24px 6px 24px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #7a8a9e;
    margin-bottom: 4px;
    position: relative;
}

.section-label::before {
    display: none;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
    padding: 0 10px;
}

/* Nav Links — Neumorphic states */
.modern-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #5a6a7e;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: 0.01em;
}

.modern-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #3b82f6;
    transform: scaleY(0);
    transition: transform 0.25s ease;
    border-radius: 0 3px 3px 0;
}

/* Hover — raised neumorphic */
.modern-nav-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #1a2332;
    box-shadow:
        3px 3px 8px rgba(163, 177, 198, 0.35),
        -3px -3px 8px rgba(255, 255, 255, 0.65);
    transform: translateX(3px);
}

.modern-nav-link:hover .nav-text {
    color: #1a2332 !important;
}

.modern-nav-link:hover::before {
    transform: scaleY(0.6);
}

/* Active — inset neumorphic (pressed) */
.modern-nav-link.active {
    background: rgba(255, 255, 255, 0.35);
    color: #1a2332;
    box-shadow:
        inset 3px 3px 7px rgba(163, 177, 198, 0.45),
        inset -3px -3px 7px rgba(255, 255, 255, 0.65);
    border: none;
}

.modern-nav-link.active .nav-text {
    color: #1a2332 !important;
    font-weight: 700;
}

.modern-nav-link.active::before {
    transform: scaleY(0.7);
    box-shadow: none;
}

.modern-nav-link.active .nav-icon-wrapper {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow:
        2px 2px 6px rgba(59, 130, 246, 0.35),
        -2px -2px 6px rgba(255, 255, 255, 0.4);
    border-color: transparent;
}

/* Icon wrapper — soft raised pill */
.nav-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(228, 232, 240, 0.7);
    transition: all 0.25s ease;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    box-shadow:
        2px 2px 5px rgba(163, 177, 198, 0.3),
        -2px -2px 5px rgba(255, 255, 255, 0.6);
}

.nav-icon-wrapper::before {
    display: none;
}

.nav-icon-wrapper .material-icons {
    font-size: 20px;
    color: #5a6a7e;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
}

.modern-nav-link:hover .nav-icon-wrapper {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    transform: none;
}

.modern-nav-link:hover .nav-icon-wrapper .material-icons {
    color: #3b82f6;
    transform: none;
}

.modern-nav-link.active .nav-icon-wrapper .material-icons {
    color: #ffffff;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #5a6a7e !important;
}

/* Sidebar Footer — Soft glass */
.sidebar-footer {
    padding: 16px 14px;
    margin: 8px 14px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        3px 3px 8px rgba(163, 177, 198, 0.3),
        -3px -3px 8px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.45);
    position: relative;
}

.sidebar-footer::before {
    display: none;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-version {
    font-size: 12px;
    color: #5a6a7e;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    background: rgba(228, 232, 240, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 1px 1px 3px rgba(163, 177, 198, 0.25),
        inset -1px -1px 3px rgba(255, 255, 255, 0.5);
}

.app-version::before {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-user-profile {
        padding: 16px 14px;
        margin: 10px 8px;
    }

    .profile-avatar {
        width: 40px;
        height: 40px;
    }

    .profile-name {
        font-size: 14px;
    }

    .section-label {
        padding: 8px 16px;
    }

    .nav-item {
        padding: 0 6px;
    }

    .modern-nav-link {
        padding: 9px 12px;
        font-size: 12.5px;
    }

    .nav-icon-wrapper {
        width: 32px;
        height: 32px;
    }

    .nav-icon-wrapper .material-icons {
        font-size: 18px;
    }
}

/* Subtle stagger animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slideInLeft 0.25s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.03s; }
.nav-item:nth-child(2) { animation-delay: 0.06s; }
.nav-item:nth-child(3) { animation-delay: 0.09s; }
.nav-item:nth-child(4) { animation-delay: 0.12s; }
.nav-item:nth-child(5) { animation-delay: 0.15s; }
.nav-item:nth-child(6) { animation-delay: 0.18s; }
.nav-item:nth-child(7) { animation-delay: 0.21s; }

/* Badge/Notification Support — Soft UI */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
    box-shadow:
        2px 2px 5px rgba(239, 68, 68, 0.25),
        -1px -1px 3px rgba(255, 255, 255, 0.3);
}

/* Compact Mode Support */
.modern-sidebar.compact .profile-info,
.modern-sidebar.compact .nav-text,
.modern-sidebar.compact .section-label {
    display: none;
}

.modern-sidebar.compact .modern-user-profile {
    justify-content: center;
    margin: 10px 6px;
    padding: 14px 8px;
}

.modern-sidebar.compact .modern-nav-link {
    justify-content: center;
    padding: 10px;
}

.modern-sidebar.compact .nav-item {
    padding: 0 6px;
}
