:root {
    --fs-server-rail: #1E1F22;
    --fs-sidebar: #2B2D31;
    --fs-content: #313338;
    --fs-surface: #383A40;
    --fs-accent: #5865F2;
    --fs-accent-hover: #4752C4;
    --fs-text-primary: #F2F3F5;
    --fs-text-muted: #949BA4;
    --fs-online: #23A55A;
    --fs-idle: #F0B232;
    --fs-dnd: #F23F42;
    --fs-offline: #80848E;
}

html, body {
    background: var(--fs-content);
    height: 100%;
    margin: 0;
}

.fs-auth-backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--fs-content);
}

.fs-auth-card {
    width: 380px;
    padding: 32px;
    background: var(--fs-sidebar) !important;
    border-radius: 8px;
}

.fs-shell {
    display: grid;
    grid-template-columns: 72px 240px 1fr;
    height: 100vh;
    overflow: hidden;
}

.fs-server-rail {
    background: var(--fs-server-rail);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    overflow-y: auto;
}

.fs-server-icon {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    margin: 4px 0;
    background: var(--fs-surface);
    color: var(--fs-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.fs-server-icon.active {
    background: var(--fs-accent);
}

.fs-channel-list {
    background: var(--fs-sidebar);
    display: flex;
    flex-direction: column;
    /* visible, not hidden: the stream popup (position:absolute, anchored inside .fs-voice-bar) must
       be able to render outside this column's box - overflow:hidden here would clip it at the
       sidebar's edge. .fs-shell's fixed grid column widths mean this can't cause the sidebar itself
       to grow; only .fs-channel-items needs its own scroll clipping, which it already has. */
    overflow: visible;
}

.fs-channel-header {
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    border-bottom: 1px solid var(--fs-server-rail);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--fs-text-primary);
    font-weight: bold;
}

.fs-channel-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.fs-channel-item {
    display: block;
    width: calc(100% - 16px);
    margin: 1px 8px;
    padding: 6px 8px;
    background: transparent;
    color: var(--fs-text-muted);
    border: none;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
}

.fs-channel-item.active {
    background: var(--fs-surface);
    color: var(--fs-text-primary);
}

.fs-section-header {
    font-size: 11px;
    font-weight: bold;
    color: var(--fs-text-muted);
    margin: 14px 0 4px 12px;
}

.fs-user-footer {
    height: 52px;
    min-height: 52px;
    padding: 8px;
    border-top: 1px solid var(--fs-server-rail);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-voice-bar {
    padding: 8px 12px;
    border-top: 1px solid var(--fs-server-rail);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fs-avatar {
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.fs-avatar.speaking {
    box-shadow: 0 0 0 2px var(--fs-online);
}

.fs-pill-live {
    background: var(--fs-dnd);
    color: white;
    font-size: 9px;
    font-weight: bold;
    border-radius: 3px;
    padding: 1px 4px;
    flex-shrink: 0;
}

.fs-content-pane {
    background: var(--fs-content);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fs-message-row {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}

.fs-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.fs-icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

.fs-icon-btn:hover {
    background: var(--fs-surface);
}

.fs-settings-layout {
    display: flex;
    min-height: 440px;
    margin: -16px;
}

.fs-settings-nav {
    width: 180px;
    flex-shrink: 0;
    background: var(--fs-sidebar);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fs-settings-nav-item {
    background: transparent;
    border: none;
    color: var(--fs-text-muted);
    text-align: left;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.fs-settings-nav-item:hover {
    background: var(--fs-surface);
    color: var(--fs-text-primary);
}

.fs-settings-nav-item.active {
    background: var(--fs-surface);
    color: var(--fs-text-primary);
    font-weight: 600;
}

.fs-settings-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    min-width: 0;
}

/* Overlays the mic level meter and the voice-activity threshold slider in one control: the
   progress bar renders the live level underneath, and .fs-threshold-slider on top is stripped
   down to just its draggable thumb so the level bar shows through as the "track". */
.fs-level-threshold {
    position: relative;
    height: 20px;
}

.fs-level-threshold .mud-progress-linear {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin: 0;
}

.fs-level-threshold .mud-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
}

.fs-threshold-slider .mud-slider-input::-webkit-slider-runnable-track {
    background: transparent !important;
}

.fs-threshold-slider .mud-slider-input::-moz-range-track {
    background: transparent !important;
}

.fs-threshold-slider .mud-slider-input:disabled::-webkit-slider-thumb {
    transform: none;
    opacity: .5;
    background-color: var(--fs-text-muted) !important;
    box-shadow: none !important;
}

.fs-threshold-slider .mud-slider-input:disabled::-moz-range-thumb {
    transform: none;
    opacity: .5;
    background-color: var(--fs-text-muted) !important;
    box-shadow: none !important;
}
