/* Global Layout Styles for Header and Sidebar Alignment */

/* Main layout container */
.main-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #111827;
}

/* Header styles */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 30%, #7e22ce 70%, #a855f7 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    height: 80px;
}

/* Content area with sidebar */
.content-with-sidebar {
    display: flex;
    flex: 1;
    height: calc(100vh - 80px); /* Adjust based on header height */
    margin-top: 80px;
    overflow: hidden;
}

/* Sidebar container */
.sidebar-container {
    position: fixed;
    left: 0;
    top: 80px;
    width: 256px; /* w-64 equivalent */
    height: calc(100vh - 80px);
    background: #1f2937;
    box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #374151;
    overflow-y: auto;
    z-index: 40;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-left: 256px;
    padding: 1.5rem;
    background: #111827;
    overflow-y: auto;
    height: calc(100vh - 80px);
}

/* Mobile responsive adjustments */
@media (max-width: 1023px) {
    .sidebar-container {
        position: fixed;
        top: 80px;
        left: 0;
        height: calc(100vh - 80px);
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar-container.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .content-with-sidebar {
        flex-direction: column;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-content {
        padding: 1.25rem;
    }
}

/* Desktop adjustments */
@media (min-width: 1024px) {
    .main-content {
        padding: 2rem;
        margin-left: 256px;
        width: calc(100vw - 256px);
    }
}

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar for main content */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Custom scrollbar for sidebar */
.sidebar-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar-container::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Header gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.header-container {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Sidebar hover effects */
.sidebar-container .nav-btn {
    position: relative;
    overflow: hidden;
}

.sidebar-container .nav-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.sidebar-container .nav-btn:hover::after {
    left: 100%;
}

/* Active page indicator */
.sidebar-container .nav-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Notification badge animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.notification-badge {
    animation: pulse 2s infinite;
}

/* User avatar hover effect */
.user-avatar {
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Mobile menu button animation */
.mobile-menu-btn {
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus states for accessibility */
.nav-btn:focus,
.mobile-menu-btn:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .main-layout {
        background: #0f172a;
    }
    
    .sidebar-container {
        background: #1e293b;
        border-right-color: #334155;
    }
    
    .main-content {
        background: #0f172a;
    }
}

/* Print styles */
@media print {
    .sidebar-container,
    .header-container {
        display: none;
    }
    
    .main-content {
        width: 100%;
        padding: 0;
    }
}
