/* Профиль в сайдбаре — в стиле пункта «Настройки» (.nav-item) */

.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 14px);
    margin: 6px clamp(8px, 1.2vw, 12px) 2px;
    padding: clamp(10px, 1.6vh, 13px) clamp(12px, 1.8vw, 16px);
    border-radius: clamp(8px, 1.2vw, 12px);
    border: none;
    border-left: 4px solid transparent;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.sidebar-profile-card:hover {
    background: #252525;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.sidebar-profile-card.active {
    background: #252525;
    color: #fff;
    border-left-color: var(--accent, #e63939);
    cursor: default;
    pointer-events: none;
}

.sidebar-profile-avatar {
    width: clamp(18px, 2.2vw, 24px);
    height: clamp(18px, 2.2vw, 24px);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #f2f2f6;
    overflow: hidden;
    position: relative;
}

.sidebar-profile-avatar.has-photo {
    background: #1a1a1a !important;
}

.sidebar-profile-avatar svg {
    display: block;
    width: 14px;
    height: 14px;
}

.sidebar-profile-avatar.has-photo svg {
    display: none !important;
}

.sidebar-profile-avatar .rmrp-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.sidebar-profile-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-profile-name {
    font-size: clamp(12.5px, 1.4vh, 14px);
    font-weight: 600;
    color: #ececf0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.sidebar-profile-sub {
    font-size: 10.5px;
    color: #7a7a86;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-profile-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    max-width: 100%;
}

.sidebar-profile-card:hover .sidebar-profile-name,
.sidebar-profile-card.active .sidebar-profile-name {
    color: #fff;
}

.sidebar-helper-badge {
    display: none;
    align-items: center;
    gap: 3px;
    margin-top: 0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffb347;
}

.sidebar-helper-badge svg {
    display: block;
    color: #ffb347;
    width: 10px;
    height: 10px;
}

.sidebar-helper-badge.visible {
    display: inline-flex;
}

.sidebar-role-badge {
    display: none;
    margin-top: 0;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid transparent;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-role-badge.visible { display: inline-flex; }

.sidebar-role-badge.role-test {
    color: #5b9fd4;
    background: rgba(91, 159, 212, 0.12);
    border-color: rgba(91, 159, 212, 0.28);
}

.sidebar-role-badge.role-admin {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.12);
    border-color: rgba(192, 132, 252, 0.28);
}

.sidebar-role-badge.role-tehnical {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.32);
}

.nav-item img {
    flex-shrink: 0;
}