/* Sidebar Layout */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Modern Sidebar Styles */
.sidebar-modern {
    width: 280px;
    background: #ffffff;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    border-right: 1px solid #e2e8f0;
}

/* Legacy Sidebar Styles */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.sidebar-text {
    font-size: 1rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-email {
    color: white;
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-link {
    margin-top: 10px;
    background-color: rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 12px 20px;
}

.logout-link:hover {
    background-color: rgba(239, 68, 68, 0.3);
    border-left-color: transparent;
}

/* Main Content with Sidebar */
.app-container .main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background-color: var(--bg-light);
    padding: 30px;
}

/* Auth Layout (no sidebar) */
.auth-layout {
    min-height: 100vh;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .sidebar-text {
        display: none;
    }

    .sidebar-link {
        justify-content: center;
        padding: 15px 10px;
    }

    .sidebar-icon {
        font-size: 1.8rem;
    }

    .user-details {
        display: none;
    }

    .user-info {
        justify-content: center;
        padding: 8px;
    }

    .app-container .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 60px;
    }

    .app-container .main-content {
        margin-left: 60px;
        padding: 15px;
    }
}

/* Modern Sidebar Header */
.sidebar-header-modern {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: #667eea;
    flex-shrink: 0;
}

.logo-text h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.logo-text p {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
}

/* Modern Sidebar Navigation */
.sidebar-nav-modern {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-link-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    position: relative;
}

.sidebar-link-modern:hover {
    background: #f1f5f9;
    color: #667eea;
}

.sidebar-link-modern.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Modern Sidebar Footer */
.sidebar-footer-modern {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.user-info-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    overflow: hidden;
}

.user-avatar-modern {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-modern svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.user-details-modern {
    flex: 1;
    overflow: hidden;
}

.user-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.user-email-modern {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn-modern {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logout-btn-modern:hover {
    background: #fecaca;
    transform: translateY(-2px);
}

.logout-btn-modern svg {
    width: 20px;
    height: 20px;
    color: #dc2626;
}

/* Main Content with Modern Sidebar */
.app-container .main-content {
    margin-left: 280px;
    min-height: 100vh;
    background-color: #f8fafc;
}

/* Modern Sidebar Responsive */
@media (max-width: 1024px) {
    .sidebar-modern {
        width: 240px;
    }

    .app-container .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar-modern {
        width: 70px;
    }

    .logo-text,
    .nav-text,
    .user-details-modern {
        display: none;
    }

    .sidebar-link-modern {
        justify-content: center;
        padding: 1rem;
    }

    .logo-container {
        justify-content: center;
    }

    .sidebar-footer-modern {
        flex-direction: column;
        gap: 0.75rem;
    }

    .user-info-modern {
        justify-content: center;
    }

    .app-container .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 480px) {
    .sidebar-modern {
        width: 60px;
    }

    .sidebar-header-modern {
        padding: 1rem 0.5rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .sidebar-nav-modern {
        padding: 1rem 0.5rem;
    }

    .app-container .main-content {
        margin-left: 60px;
        padding: 1rem;
    }
}
