.channels-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.channel-sidebar {
    width: 260px;
    flex: none;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.channel-sidebar-header {
    padding: 16px 16px 10px;
    font-weight: 700;
    font-size: 14.5px;
    border-bottom: 1px solid var(--border);
}

.channel-sidebar-body {
    padding: 10px 8px;
    flex: 1;
    overflow-y: auto;
}

.channel-group-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 12px 10px 6px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    text-decoration: none;
}

.channel-item.active {
    background: var(--card-hover-bg);
    color: var(--text);
}

.channel-item svg {
    width: 16px;
    height: 16px;
    flex: none;
    opacity: 0.75;
}

.channel-item.active svg {
    opacity: 1;
    color: var(--accent-green);
}

.channel-item.connected svg {
    color: var(--accent-green);
    filter: drop-shadow(0 0 5px rgba(53, 208, 127, 0.6));
    opacity: 1;
}

.channel-participants {
    list-style: none;
    margin: 2px 0 6px 30px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.channel-participants li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.channel-participant-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(155deg, var(--accent-blue), #1c4e8c);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #041018;
}

.channel-participant-avatar.self {
    background: linear-gradient(155deg, var(--accent-green), #1c8c58);
}

.channel-user-bar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #05070a;
    border-top: 1px solid var(--border);
}

.channel-user-bar .avatar-glyph {
    width: 30px;
    height: 30px;
}

.channel-user-bar-identity {
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

.channel-user-bar-name {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-user-bar-status {
    font-size: 10.5px;
    color: var(--text-faint);
}

.channel-user-bar-status.connected {
    color: var(--accent-green);
}

.channel-user-bar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
}

.channel-user-bar-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.channel-user-bar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.channel-user-bar-btn.muted {
    color: var(--accent-red);
}

.channel-user-bar-btn svg { width: 16px; height: 16px; }

.channel-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .channels-layout { flex-direction: column; }
    .channel-sidebar { width: 100%; }
}
