/* Unified Sidebar CSS - Extracted from Dashboard */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #8b5cf6;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #475569;
}

.nav-item.active {
    background: #f1f5f9;
    color: #8b5cf6;
    border-right: 3px solid #8b5cf6;
}

.nav-item.logout-btn {
    color: #ef4444;
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.nav-item.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
}

.notifications-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: 8px;
    left: 28px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-top: 8px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.user-profile:hover {
    background-color: #f8fafc;
    text-decoration: none;
    color: inherit;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 500;
    color: #1e293b;
    font-size: 13px;
}

.user-email {
    display: block;
    color: #64748b;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px 32px;
    background: #f8fafc;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.subtitle {
    color: #64748b;
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
}

.new-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.new-project-btn:hover {
    background: #059669;
}

/* Header User Menu */
.user-menu-header {
    position: relative;
    display: inline-block;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s;
}

.user-avatar-small:hover {
    border-color: #8b5cf6;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    margin-top: 8px;
}

.user-menu-header:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #475569;
}

.dropdown-item.logout {
    color: #ef4444;
    border-top: 1px solid #e2e8f0;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-header {
        border-bottom: none;
        padding: 0;
        margin-right: 24px;
    }

    .sidebar-nav {
        display: flex;
        gap: 16px;
        padding: 0;
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
        border-right: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
    }

    .nav-item.active {
        border-right: none;
        border-bottom: 3px solid #8b5cf6;
    }

    .sidebar-footer {
        border-top: none;
        border-left: 1px solid #e2e8f0;
        padding: 0;
        margin-left: 24px;
        padding-left: 24px;
    }

    .user-profile {
        margin: 0;
        padding: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .dashboard-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }
}
