/* ====================================================================
   SIDEBAR
   ==================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar__workspace-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar__brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.sidebar__brand-ai {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.sidebar__header-actions {
    display: flex;
    gap: 4px;
}

.sidebar__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar__icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ---- Search ---- */
.sidebar__search {
    padding: 8px 12px;
}

.sidebar__search-input {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    outline: none;
    transition: all var(--transition-fast);
}

.sidebar__search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.sidebar__search-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---- Sections ---- */
.sidebar__sections {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.sidebar__section {
    margin-bottom: 8px;
}

.sidebar__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
}

/* ---- Channel / DM Items ---- */
.sidebar__items {
    display: flex;
    flex-direction: column;
}

.sidebar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px 5px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.sidebar__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar__item--active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 500;
}

.sidebar__item-icon {
    font-weight: 500;
    opacity: 0.6;
    font-size: var(--text-sm);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar__item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Presence Dots ---- */
.sidebar__presence {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.presence--online {
    background: #10B981;
}

.presence--away {
    background: #F59E0B;
}

.presence--offline {
    background: rgba(255, 255, 255, 0.25);
}

/* ---- Add Button ---- */
.sidebar__add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px 5px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    text-align: left;
}

.sidebar__add-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar__add-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ---- Footer / User ---- */
.sidebar__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    background: transparent;
    border: none;
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-sans);
}

.sidebar__user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar__user-avatar--img {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar__user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar__user-name {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ====================================================================
   CHAT AREA
   ==================================================================== */

.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-area__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.chat-area__channel-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    overflow: hidden;
}

.chat-area__channel-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.chat-area__channel-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-area__member-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.chat-area__member-count svg {
    opacity: 0.5;
}

/* ---- Messages ---- */
.chat-area__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.chat-area__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.chat-area__welcome {
    padding: 40px 0;
    text-align: center;
}

.chat-area__welcome h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chat-area__welcome p {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ---- Date Dividers ---- */
.chat-area__date-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.chat-area__date-divider::before,
.chat-area__date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.chat-area__date-divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* ---- Compose ---- */
.chat-area__compose {
    padding: 12px 20px 16px;
    flex-shrink: 0;
}

.chat-area__input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: border-color var(--transition-fast);
}

.chat-area__input-wrapper:focus-within {
    border-color: var(--border-focus);
}

.chat-area__input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 120px;
}

.chat-area__input::placeholder {
    color: var(--text-tertiary);
}

.chat-area__send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--brand-purple);
    color: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.chat-area__send-btn:hover {
    background: var(--brand-magenta);
}

/* ====================================================================
   MESSAGES
   ==================================================================== */

.msg {
    display: flex;
    gap: 10px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: background var(--transition-fast);
}

.msg:hover {
    background: var(--bg-tertiary);
}

.msg:hover .msg__hover-actions {
    opacity: 1;
    visibility: visible;
}

.msg--grouped {
    padding-top: 1px;
    padding-bottom: 1px;
}

.msg__avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}

.msg__time-col {
    width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.msg__time-hover {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.msg:hover .msg__time-hover {
    opacity: 1;
}

.msg__body {
    flex: 1;
    min-width: 0;
}

.msg__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}

.msg__author {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.msg__time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.msg__text {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
}

.msg__edited {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-left: 4px;
}

/* ---- Hover Actions ---- */
.msg__hover-actions {
    position: absolute;
    top: -12px;
    right: 8px;
    display: flex;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 2px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 10;
}

.msg__hover-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.msg__hover-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.msg__hover-btn--danger:hover {
    color: #EF4444;
}

/* ---- Avatar image ---- */
.msg__avatar--img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* ---- Inline Edit ---- */
.msg__edit-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msg__edit-input {
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--brand-purple);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    resize: none;
    outline: none;
}

.msg__edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.msg__edit-cancel,
.msg__edit-save {
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    cursor: pointer;
    font-weight: 600;
}

.msg__edit-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.msg__edit-cancel:hover {
    background: var(--bg-elevated);
}

.msg__edit-save {
    background: var(--brand-purple);
    color: white;
}

.msg__edit-save:hover {
    opacity: 0.9;
}

/* ---- Delete Confirm ---- */
.msg__delete-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: #EF4444;
}

.msg__delete-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.msg__delete-cancel,
.msg__delete-yes {
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    cursor: pointer;
    font-weight: 600;
}

.msg__delete-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.msg__delete-yes {
    background: #EF4444;
    color: white;
}

.msg__delete-yes:hover {
    opacity: 0.9;
}

/* ---- Active Reaction ---- */
.msg__reaction--active {
    border-color: var(--brand-purple);
    background: rgba(139, 92, 246, 0.15);
}

/* ---- Reactions ---- */
.msg__reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.msg__reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.msg__reaction:hover {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

.msg__reaction-emoji {
    font-size: 0.85rem;
}

.msg__reaction-count {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ---- Thread Link ---- */
.msg__thread-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 0;
    border: none;
    background: transparent;
    color: var(--brand-cyan);
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.msg__thread-link:hover {
    color: var(--brand-purple);
}

.msg__thread-link svg {
    opacity: 0.7;
}

/* ====================================================================
   REACTION PICKER
   ==================================================================== */

.reaction-picker {
    display: flex;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: var(--shadow-lg);
}

.reaction-picker--extended {
    flex-direction: column;
    width: 280px;
    max-height: 360px;
    gap: 0;
    padding: 0;
}

.reaction-picker__quick {
    display: flex;
    gap: 2px;
    padding: 8px 8px 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.reaction-picker__search {
    margin: 6px 8px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    outline: none;
}

.reaction-picker__search:focus {
    border-color: var(--brand-purple);
}

.reaction-picker__body {
    overflow-y: auto;
    padding: 4px 8px 8px;
    max-height: 240px;
}

.reaction-picker__category-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 6px 0 2px;
    letter-spacing: 0.05em;
}

.reaction-picker__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}

.reaction-picker__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.reaction-picker__btn:hover {
    background: var(--bg-tertiary);
}

/* ====================================================================
   THREAD PANEL
   ==================================================================== */

.thread-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.thread-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.thread-panel__title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
}

.thread-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.thread-panel__close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.thread-panel__messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.thread-panel__parent {
    padding-bottom: 8px;
}

.thread-panel__divider {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.thread-panel__divider::before,
.thread-panel__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.thread-panel__divider span {
    padding: 0 10px;
    white-space: nowrap;
}

.thread-panel__replies {
    padding-top: 4px;
}

.thread-panel__compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.thread-panel__input {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 100px;
    transition: border-color var(--transition-fast);
}

.thread-panel__input::placeholder {
    color: var(--text-tertiary);
}

.thread-panel__input:focus {
    border-color: var(--border-focus);
}

.thread-panel__send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--brand-purple);
    color: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.thread-panel__send-btn:hover {
    background: var(--brand-magenta);
}

/* ====================================================================
   NEW DM MODAL
   ==================================================================== */

.new-dm__user-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    overflow-y: auto;
}

.new-dm__user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.new-dm__user-item:hover {
    background: var(--bg-tertiary);
}

.new-dm__user-item--exists {
    opacity: 0.6;
}

.new-dm__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.new-dm__user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.new-dm__user-name {
    font-size: var(--text-sm);
    font-weight: 600;
}

.new-dm__user-email {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ====================================================================
   LIGHT THEME SIDEBAR OVERRIDE
   ==================================================================== */

[data-theme="light"] .chat-layout__sidebar {
    background: #3F0E40;
}

/* ====================================================================
   PROFILE MODAL
   ==================================================================== */

.profile-modal__avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-modal__avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.profile-modal__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-modal__avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    border-radius: var(--radius-md);
}

.profile-modal__upload-btn {
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-modal__upload-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.profile-modal__colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.profile-modal__color {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-modal__color:hover {
    transform: scale(1.15);
}

.profile-modal__color--active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--brand-purple);
}

/* ====================================================================
   TYPING INDICATOR
   ==================================================================== */

.chat-area__typing {
    min-height: 20px;
    padding: 0 20px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ====================================================================
   UNREAD BADGES
   ==================================================================== */

.sidebar__unread-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ====================================================================
   MARKDOWN IN MESSAGES
   ==================================================================== */

.msg__code-block {
    display: block;
    padding: 8px 12px;
    margin: 4px 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    overflow-x: auto;
    color: var(--text-primary);
}

.msg__code-inline {
    padding: 1px 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    color: #EF4444;
}

.msg__link {
    color: var(--brand-cyan);
    text-decoration: none;
}

.msg__link:hover {
    text-decoration: underline;
}
