/* Layout for new header and menu structure */

.header-navbar {
    width: 100vw;
    left: 0;
    position: fixed;
    z-index: 1040;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.subscription-notification {
    width: 100vw;
    margin-top: 64px;
    /* z-index: 1051; */
    background: #fffbe6;
    border-bottom: 1px solid #ffe58f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.main-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    margin-top: 64px; /* Adjust for fixed header */
}

/* Modern Sidebar Styles */
.modern-sidebar {
    min-width: 280px;
    width: 280px;
    height: calc(100vh - 64px);
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
    z-index: 1030;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.modern-sidebar.collapsed {
    min-width: 64px;
    width: 64px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modern-sidebar.collapsed .user-greeting {
    opacity: 0;
    pointer-events: none;
}

.greeting-icon i {
    font-size: 2rem;
    color: var(--simba-primary-500);
    filter: drop-shadow(0 2px 4px rgba(0, 123, 255, 0.2));
}

.greeting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.greeting-welcome {
    font-size: 0.875rem;
    color: var(--simba-gray-600);
    font-weight: 500;
}

.greeting-name {
    font-size: 1rem;
    color: var(--simba-gray-800);
    font-weight: 600;
    line-height: 1.2;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 0 4px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--simba-gray-700);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    min-height: 48px;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
    color: var(--simba-primary-700);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.nav-link[aria-current="page"] {
    background: linear-gradient(135deg, var(--simba-primary-500) 0%, var(--simba-primary-600) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
    transform: translateX(4px);
}

.nav-link[aria-current="page"] .nav-indicator {
    opacity: 1;
    transform: scaleY(1);
}

/* Icon Styling */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

.nav-icon i {
    font-size: 1.25rem;
    transition: all 0.25s ease;
}

.modern-sidebar.collapsed .nav-icon {
    margin-right: 0;
    width: 32px;
    height: 32px;
}

/* Color-coded Icons */
.profile-icon i { color: #8b5cf6; }
.people-icon i { color: #06b6d4; }
.notification-icon i { color: #f97316; }
.tasks-icon i { color: #10b981; }
.org-icon i { color: #f59e0b; }
.teams-icon i { color: #ef4444; }
.recruitment-icon i { color: #3b82f6; }
.blog-icon i { color: #6366f1; }

.nav-link[aria-current="page"] .nav-icon i {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Navigation Text */
.nav-text {
    flex: 1;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modern-sidebar.collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
}

/* Active Indicator */
.nav-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Divider */
.nav-divider {
    margin: 16px 0;
    padding: 0 20px;
}

.divider-line {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--simba-gray-300) 50%, transparent 100%);
    margin: 0;
    opacity: 0.6;
}

.modern-sidebar.collapsed .nav-divider {
    padding: 0 8px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.footer-actions {
    display: flex;
    justify-content: center;
}

.sidebar-toggle-btn {
    background: var(--simba-primary-500);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-toggle-btn:hover {
    background: var(--simba-primary-600);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.sidebar-toggle-btn:focus-visible {
    outline: 2px solid var(--simba-primary-300);
    outline-offset: 2px;
}

.modern-sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1 1 0%;
    background: var(--simba-gray-50);
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip for collapsed state */
.modern-sidebar.collapsed .nav-link {
    position: relative;
}

.modern-sidebar.collapsed .nav-link::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--simba-gray-800);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-left: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-sidebar.collapsed .nav-link:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .modern-sidebar {
        min-width: 0;
        width: 100vw;
        max-width: 320px;
        position: fixed;
        left: -100vw;
        top: 64px;
        height: calc(100vh - 64px);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .modern-sidebar.show {
        left: 0;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .subscription-notification {
        top: 0;
    }
    
    .sidebar-footer {
        display: none;
    }
}

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

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--simba-gray-300);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--simba-gray-400);
}

/* Focus States for Accessibility */
.nav-link:focus-visible {
    outline: 2px solid var(--simba-primary-400);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Animation for loading state */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nav-link.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modern-sidebar {
        border-right: 2px solid var(--simba-gray-800);
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        border-color: var(--simba-primary-500);
    }
    
    .nav-link[aria-current="page"] {
        border-color: var(--simba-primary-700);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modern-sidebar,
    .nav-link,
    .nav-indicator,
    .sidebar-toggle-btn {
        transition: none;
    }
}
