.mobile-pull-refresh-indicator {
    position: fixed;
    top: calc(8px + var(--safe-top));
    left: 50%;
    z-index: var(--z-layer-dropdown, 100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--zn-member-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--zn-member-bg-card) 92%, transparent);
    color: var(--zn-member-text-secondary);
    box-shadow: 0 10px 26px rgba(2, 7, 14, 0.18);
    font-size: 0.76rem;
    font-weight: 750;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 0, 0);
    transition: opacity 0.16s ease, transform 0.18s ease;
}

.mobile-pull-refresh-indicator[data-state="visible"] {
    opacity: 1;
}

.topbar-controls,
.server-upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-controls {
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.topbar-user-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--zn-member-border);
    border-radius: var(--user-radius-sm);
    background: var(--zn-member-bg-surface-hover);
    min-width: 0;
}

.topbar-user-card strong {
    font-size: 0.84rem;
}

.topbar-user-card span {
    color: var(--zn-member-text-muted);
    font-size: 0.74rem;
}

.logout-form {
    margin: 0;
}

.user-kicker,
.pane-kicker,
.session-inline-label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--zn-member-text-muted);
}

.topbar-title h1,
.messages-brand-row h1,
.chat-header-copy h2,
.chat-header-copy [data-feed-display-name],
.chat-empty-state h2 {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.session-form-compact,
.conversation-search,
.composer,
.composer-message-form,
.composer-tools,
.chat-action-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (min-width: 761px) {
    body.user-body-messaging .composer {
        position: relative;
        z-index: 2;
    }

    body.user-body-messaging .mention-picker {
        z-index: var(--z-layer-dropdown, 100);
    }
}

.session-form-compact {
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.session-select.compact-select {
    width: 240px;
    min-width: 240px;
}

.server-upload-form {
    flex: 0 0 auto;
}

.topbar-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.topbar-upload-status {
    min-width: 0;
    max-width: 108px;
    font-size: 0.74rem;
    color: var(--zn-member-text-muted);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.topbar-upload-status[data-tone="error"] {
    color: var(--zn-member-danger-text);
}

.topbar-upload-status[data-tone="progress"] {
    color: var(--zn-member-text-link);
}

.compact-select,
.search-input,
.form-input,
.composer-input {
    width: 100%;
    border: 1px solid var(--zn-member-border-strong);
    background: var(--zn-member-bg-surface-hover);
    color: var(--zn-member-text-primary);
    border-radius: var(--user-radius-sm);
    padding: 10px 12px;
    outline: none;
}

.compact-select:focus,
.search-input:focus,
.form-input:focus,
.composer-input:focus {
    border-color: var(--zn-member-accent-border-strong);
    outline: 2px solid var(--zn-member-text-primary);
    outline-offset: -2px;
}

@media (forced-colors: active) {
    .compact-select:focus,
    .search-input:focus,
    .form-input:focus,
    .composer-input:focus {
        outline-color: Highlight;
    }
}

.pane-card,
.chat-card,
.chat-empty-state,
.flash-banner {
    border: 1px solid var(--zn-member-border);
    background: var(--zn-member-bg-card);
    box-shadow: var(--zn-member-shadow);
    backdrop-filter: blur(18px);
}

.flash-banner {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--user-radius-md);
    padding: 10px 12px;
    font-size: 0.9rem;
}

.flash-banner-success {
    color: var(--zn-member-success-text);
}

.flash-banner-error {
    color: var(--zn-member-danger-text-soft);
}

body.user-body-messaging .flash-banner-success[data-flash-message="Image sent."],
body.user-body-messaging .flash-banner-success[data-flash-message="Audio sent."] {
    display: none;
}

.is-hidden,
.screen-share-viewer-modal.is-hidden {
    display: none !important;
}

/* Burgundy + Tennis Green share the institutional-light theme family. */
[data-theme-family="institutional-light"] body.user-body-messaging .message-overflow-list {
    color: var(--zn-member-text-primary);
}

[data-theme-family="institutional-light"] body.user-body-messaging .mention-picker,
[data-theme-family="institutional-light"] body.user-body-messaging .mention-picker-header,
[data-theme-family="institutional-light"] body.user-body-messaging .mention-picker-option,
[data-theme-family="institutional-light"] body.user-body-messaging .mention-picker-option small,
[data-theme-family="institutional-light"] body.user-body-messaging .mention-picker-empty {
    color: var(--zn-member-accent-text);
}

[data-theme-family="institutional-light"] .workspace-calendar-event-block:not(.is-past),
[data-theme-family="institutional-light"] .workspace-calendar-event-block:not(.is-past) span,
[data-theme-family="institutional-light"] .workspace-calendar-event-block:not(.is-past) small {
    color: var(--zn-member-primary-text);
}

[data-theme="moonlight-silver"] .workspace-calendar-event-block:not(.is-past),
[data-theme="moonlight-silver"] .workspace-calendar-event-block:not(.is-past) span,
[data-theme="moonlight-silver"] .workspace-calendar-event-block:not(.is-past) small {
    color: #ffffff;
}

[data-theme="dovehouse-capital"][data-appearance-mode="dark"] .workspace-calendar-event-block:not(.is-past),
[data-theme="dovehouse-capital"][data-appearance-mode="dark"] .workspace-calendar-event-block:not(.is-past) span,
[data-theme="dovehouse-capital"][data-appearance-mode="dark"] .workspace-calendar-event-block:not(.is-past) small {
    color: #ffffff;
}

[data-theme-family="institutional-light"] body.user-body-workspace .workspace-upload-choice {
    color: #ffffff;
}

[data-theme-family="institutional-light"] body.user-body-workspace .workspace-upload-choice small {
    color: rgba(255, 255, 255, 0.78);
}

[data-theme-family="institutional-light"] body.user-body-workspace .workspace-upload-choice-panel .attachment-action-modal-header button {
    color: #ffffff;
}
