/* ============================================================
   HEADER STYLES
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.logo-text {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

/* Навигация */
.main-nav {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.main-nav a {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: #f0f0f0;
    color: #333;
}

.main-nav a.active {
    color: #667eea;
    background: #f0f4ff;
    font-weight: 600;
}

/* Действия пользователя */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Кнопки входа/регистрации */
.login-link {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 22px;
    text-decoration: none;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    transition: all 0.3s ease;
}

.login-link:not(.register) {
    color: #667eea;
    border-color: #667eea;
}

.login-link:not(.register):hover {
    background: #f0f4ff;
}

.login-link.register {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.login-link.register:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

/* Кнопка выхода (иконка) */
.logout-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.logout-icon-btn:hover {
    background: #fdf0ef;
}

/* Профиль пользователя */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 22px;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: #f0f0f0;
}

.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    display: block;
}

.role-indicator {
    position: absolute;
    bottom: -2px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    /*align-items: center;*/
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    z-index: 2;
    pointer-events: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ============================================================
   МОБИЛЬНЫЙ АДАПТИВ (до 700px)
   ============================================================ */

@media (max-width: 700px) {
    .header-container {
        height: 60px;
        padding: 0 12px;
        gap: 10px;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
    }
    
    .logo-text {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-actions {
        gap: 10px;
        margin-left: auto;
    }
    
    .login-link {
        font-size: 14px;
        padding: 10px 18px;
    }
    
    .user-profile {
        gap: 8px;
        padding: 4px 8px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .user-name {
        font-size: 13px;
        max-width: 80px;
    }
    
    .user-role {
        font-size: 9px;
    }
    
    .logout-icon-btn {
        width: 38px;
        height: 38px;
    }
}