* { box-sizing: border-box; }
:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #e8eaf0; background: #111318; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #111318; }
button, input { font: inherit; }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; height: 100vh; min-height: 0; overflow: hidden; }
.sidebar { background: #17191f; border-right: 1px solid #282b34; display: flex; flex-direction: column; padding: 18px 12px 12px; min-height: 0; }
.brand { font-size: 21px; font-weight: 800; padding: 8px 10px 22px; display: flex; gap: 10px; align-items: center; }
.brand-dot { width: 13px; height: 13px; border-radius: 50%; background: #6c7cff; box-shadow: 0 0 15px #6c7cff66; }
.channels-title { color: #777c8b; font-size: 11px; font-weight: 800; letter-spacing: .09em; padding: 0 10px 8px; }
.channel { border: 0; color: #9499a8; background: transparent; width: 100%; text-align: left; padding: 10px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.channel span { color: #686d7b; margin-right: 8px; font-size: 18px; }
.channel:hover { background: #20232b; color: #ddd; }
.channel.active { background: #2a2e39; color: white; }
.sidebar-spacer { flex: 1; min-height: 10px; }
.user-card { margin-top:auto; flex:0 0 auto; background: #111318; border-radius: 8px; padding: 9px; display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; font-weight: 800; }
.user-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.user-info small { color: #6ee7a0; font-size: 11px; }
.icon-button { border: 0; background: transparent; color: #8a8f9e; cursor: pointer; padding: 6px; }
.chat { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #1c1f26; overflow: hidden; }
.chat-header { flex: 0 0 auto; min-height: 73px; border-bottom: 1px solid #292d36; display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; }
.chat-header h1 { font-size: 17px; margin: 0 0 3px; }
.chat-header h1 span:first-child { color: #858a98; }
.chat-header p { margin: 0; color: #777c89; font-size: 12px; }
.online-count { color: #858b99; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; }
.messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 22px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.message { display: flex; gap: 11px; padding: 7px 0; }
.message:hover { background: #20232b; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 5px; }
.message-avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; font-weight: 800; }
.message-body { min-width: 0; max-width: min(800px, 100%); }
.message-meta { display: flex; align-items: baseline; gap: 8px; }
.message-name { font-weight: 700; font-size: 14px; }
.message-time { color: #696f7d; font-size: 10px; }
.message-text { color: #d6d9e0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-text strong { font-weight: 750; color: #f1f3f7; }
.message-text em { font-style: italic; }
.message-link { color: #7da7ff; text-decoration: none; word-break: break-all; }
.message-link:hover { text-decoration: underline; }
.mention { color: #aeb9ff; background: #5865f21f; border-radius: 3px; padding: 1px 3px; font-weight: 650; }
.mention-online { color: #c6ccff; background: #5865f244; }
.embedded-media { display: block; max-width: min(500px, 100%); max-height: 360px; margin-top: 8px; border-radius: 8px; object-fit: contain; background: #111318; }
.media-card { display: inline-flex; flex-direction: column; width: min(500px, 100%); margin-top: 8px; border: 1px solid #343844; border-radius: 9px; overflow: hidden; background: #17191f; color: #d6d9e0; text-decoration: none; }
.media-card img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #111318; }
.media-card span { padding: 9px 11px; font-size: 12px; }
.media-loading { color: #747a89; font-size: 12px; margin-top: 7px; }
.preview-card { display: inline-block; margin-top: 7px; padding: 9px 11px; border-radius: 7px; background: #17191f; border: 1px solid #343844; color: #8eabff; text-decoration: none; font-size: 12px; }
.empty { color: #737987; text-align: center; padding: 50px 20px; }
.composer { position: relative; flex: 0 0 auto; display: flex; gap: 10px; padding: 14px 20px 20px; }
.composer input, .composer textarea { flex: 1; min-width: 0; background: #111318; color: white; border: 1px solid #2d313b; outline: none; border-radius: 8px; padding: 13px 14px; }
.composer input:focus, .composer textarea:focus { border-color: #5865f2; }
.composer button, .modal-actions button { border: 0; border-radius: 7px; background: #5865f2; color: white; font-weight: 700; padding: 0 18px; cursor: pointer; }
.mention-popup { position: absolute; bottom: calc(100% - 8px); left: 20px; width: min(300px, calc(100% - 40px)); background: #17191f; border: 1px solid #343844; border-radius: 8px; box-shadow: 0 12px 35px #0008; padding: 5px; z-index: 5; }
.mention-popup button { display: block; width: 100%; border: 0; background: transparent; color: #ddd; text-align: left; padding: 9px 10px; border-radius: 5px; cursor: pointer; }
.mention-popup button:hover { background: #2a2e39; }
.members { background: #17191f; border-left: 1px solid #282b34; padding: 20px 14px; overflow-y: auto; min-height: 0; }
.members h2 { color: #777c8b; font-size: 11px; letter-spacing: .08em; margin: 4px 8px 14px; }
.member { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; }
.member:hover { background: #20232b; }
.member-avatar { width: 30px; height: 30px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.member-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 10; }
.modal.hidden { display: none; }
.modal-card { width: min(420px, calc(100vw - 30px)); background: #20232b; border: 1px solid #343844; border-radius: 10px; padding: 24px; box-shadow: 0 20px 70px #0008; }
.modal-card h2 { margin: 0 0 8px; }
.modal-card p { color: #9297a5; font-size: 13px; margin: 0 0 18px; line-height: 1.5; }
.modal-card input { width: 100%; background: #111318; border: 1px solid #343844; color: white; padding: 12px; border-radius: 7px; outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; height: 38px; }
.modal-actions .secondary { background: transparent; color: #a5aab7; }
@media (max-width: 800px) { .app { grid-template-columns: 70px minmax(0, 1fr); } .sidebar { padding: 12px 8px; } .brand { justify-content: center; font-size: 0; padding: 10px 0 20px; } .channels-title, .channel:not(.active)::after, .channel { font-size: 0; } .channel { text-align: center; height: 45px; } .channel span { font-size: 20px; margin: 0; } .user-card { padding: 7px; justify-content: center; } .user-info, .icon-button, .members { display: none; } }

/* File uploads, embedded media, and stable scrolling */
.chat { min-height: 0; overflow: hidden; }
.messages { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.composer { position: relative; }
.attach-button { flex: 0 0 auto; width: 42px; border: 0; border-radius: 10px; background: #252a34; color: #cfd3dc; font-size: 19px; cursor: pointer; }
.attach-button:hover { background: #303643; }
.attach-button:disabled { opacity: .5; cursor: wait; }
.embedded-media { display: block; max-width: min(520px, 100%); max-height: 420px; margin-top: 8px; border-radius: 10px; object-fit: contain; background: #11151c; }
.media-card { display: inline-flex; flex-direction: column; max-width: min(520px, 100%); margin-top: 8px; color: inherit; text-decoration: none; }
.media-card span { padding: 6px 2px; font-size: 12px; opacity: .7; }
.preview-card { display: inline-block; margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 13px; }
.file-attachment { display: inline-block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: inherit; text-decoration: none; }
.uploaded-media { margin-top: 8px; }

.load-more { display:block; flex:0 0 auto; margin:10px auto 0; padding:7px 14px; border:1px solid #343844; border-radius:7px; background:#252a34; color:#cfd3dc; cursor:pointer; }
.load-more:hover { background:#303643; }
.load-more:disabled { opacity:.5; cursor:wait; }
.hidden { display:none !important; }
.channel { position:relative; }
.channel.mention-pending::after { content:""; position:absolute; right:9px; top:50%; transform:translateY(-50%); width:7px; height:7px; border-radius:50%; background:#ff5d73; box-shadow:0 0 8px #ff5d7366; }
.giphy-embed { display:block; width:min(500px,100%); height:380px; border:0; border-radius:10px; margin-top:8px; background:#111318; }
.settings { margin-top:14px; padding:12px 8px 4px; border-top:1px solid #282b34; }
.settings label { display:flex; justify-content:space-between; color:#858a98; font-size:11px; margin-bottom:8px; }
.settings input[type=range] { width:100%; accent-color:#5865f2; }
@media (max-width:800px) { .settings { display:none; } .giphy-embed { height:300px; } }
.embedded-audio { display:block; width:min(500px,100%); margin-top:8px; }

/* Favorite GIF picker */
.gif-button { width: 50px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.gif-panel { position: fixed; inset: 0; z-index: 20; background: #0007; display: grid; place-items: end center; padding: 0 20px 84px; }
.gif-panel.hidden { display: none; }
.gif-panel-card { width: min(620px, 100%); max-height: min(620px, calc(100vh - 120px)); overflow: hidden; display: flex; flex-direction: column; background: #20232b; border: 1px solid #343844; border-radius: 12px; box-shadow: 0 20px 70px #000b; }
.gif-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 12px; border-bottom: 1px solid #343844; }
.gif-panel-header strong { display: block; font-size: 15px; }
.gif-panel-header small { display: block; color: #858a98; font-size: 11px; margin-top: 3px; }
.gif-add-form { display: flex; gap: 8px; padding: 12px; }
.gif-add-form input { flex: 1; min-width: 0; background: #111318; color: white; border: 1px solid #343844; border-radius: 7px; padding: 10px 11px; outline: none; }
.gif-add-form input:focus { border-color: #5865f2; }
.gif-add-form button { border: 0; border-radius: 7px; background: #5865f2; color: white; font-weight: 700; padding: 0 13px; cursor: pointer; }
.gif-add-form button:disabled { opacity: .5; cursor: wait; }
.gif-status { min-height: 18px; padding: 0 13px 7px; color: #72e0a0; font-size: 11px; }
.gif-status.error { color: #ff7d8d; }
.gif-favorites { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; overflow-y: auto; padding: 0 12px 12px; min-height: 0; }
.gif-favorite { position: relative; min-width: 0; }
.gif-favorite-preview { display: block; width: 100%; height: 105px; padding: 0; border: 1px solid #343844; border-radius: 8px; overflow: hidden; background: #111318; cursor: pointer; }
.gif-favorite-preview:hover { border-color: #5865f2; }
.gif-favorite-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gif-favorite-preview span { display: grid; place-items: center; height: 100%; color: #777c89; font-size: 11px; }
.gif-remove { position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: #111c; color: #fff; font-size: 17px; line-height: 24px; cursor: pointer; opacity: .8; }
.gif-remove:hover { background: #e34b62; opacity: 1; }
.gif-empty { grid-column: 1 / -1; color: #777c89; text-align: center; padding: 30px 10px; font-size: 12px; }
.gif-help { margin: 0; padding: 0 13px 14px; color: #686e7c; font-size: 10px; }
.gif-help code { color: #9aa0ae; }
@media (max-width: 800px) { .gif-panel { padding: 0 10px 70px; } .gif-panel-card { max-height: calc(100vh - 90px); } .gif-add-form { flex-direction: column; } .gif-add-form button { height: 38px; } }

/* Profile images */
.profile-avatar-button { flex: 0 0 auto; border: 0; background: transparent; padding: 0; border-radius: 50%; cursor: pointer; }
.profile-avatar-button:hover .avatar { outline: 2px solid #5865f2; outline-offset: 1px; }
.profile-avatar-button:disabled { opacity: .55; cursor: wait; }
.avatar, .message-avatar, .member-avatar { overflow: hidden; }
.avatar img, .message-avatar img, .member-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }


/* Full-size profile image viewer */
.message-avatar { cursor: pointer; }
.message-avatar:hover { outline: 2px solid #5865f2; outline-offset: 1px; }
.profile-image-viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 30px; background: rgba(0,0,0,.82); cursor: zoom-out; }
.profile-image-viewer.hidden { display: none !important; }
.profile-image-viewer-card { position: relative; max-width: min(90vw, 900px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; cursor: default; }
.profile-image-viewer-card img { display: block; max-width: min(90vw, 900px); max-height: calc(90vh - 35px); width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 20px 80px #000c; background: #111318; }
.profile-image-viewer-close { position: absolute; right: -14px; top: -14px; z-index: 1; width: 34px; height: 34px; padding: 0; border: 1px solid #444957; border-radius: 50%; background: #20232b; color: #fff; font-size: 24px; line-height: 30px; cursor: pointer; box-shadow: 0 5px 20px #0008; }
.profile-image-viewer-close:hover { background: #303541; }
.profile-image-viewer-name { margin-top: 9px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px #000; }
@media (max-width: 600px) { .profile-image-viewer { padding: 20px; } .profile-image-viewer-card img { max-width: 94vw; max-height: 82vh; } .profile-image-viewer-close { right: -7px; top: -7px; } }

/* Provider and user-requested iframe embeds */
.generic-embed { display: block; width: min(620px, 100%); height: 360px; margin-top: 8px; border: 1px solid #343844; border-radius: 10px; background: #111318; }
.iframe-placeholder, .iframe-provider-placeholder, .iframe-explicit-placeholder { min-height: 20px; }
@media (max-width: 800px) { .generic-embed { height: 300px; } }

/* Command autocomplete */
.command-popup { position:absolute; left:20px; bottom:calc(100% - 8px); width:min(430px, calc(100% - 40px)); background:#17191f; border:1px solid #343844; border-radius:9px; box-shadow:0 14px 40px #0009; padding:5px; z-index:8; }
.command-popup.hidden { display:none; }
.command-option { display:flex; flex-direction:column; gap:3px; width:100%; border:0; background:transparent !important; color:#dfe2e9; text-align:left; padding:9px 10px; border-radius:6px; cursor:pointer; }
.command-option:hover { background:#2a2e39 !important; }
.command-option.selected { background:#5865f2; color:#fff; }
.command-option.selected span { color:#eef0ff; }
.command-option.selected code { color:#fff; }
.command-option strong { font-size:13px; }
.command-option span { color:#858b99; font-size:11px; }
.command-option code { color:#aeb7ff; font-family:inherit; }

/* Shared community image */
.community-media { flex: 0 0 auto; align-self: stretch; width: 100%; min-height: 40px; max-height: 220px; margin: auto 0 12px; padding: 4px; box-sizing: border-box; border: 1px dashed #343844; border-radius: 9px; background: #111318; overflow: hidden; display: flex; align-items: flex-end; justify-content: flex-start; cursor: pointer; outline: none; }
.community-media:hover, .community-media:focus-visible { border-color: #5865f2; }
.community-media:disabled { opacity: .55; cursor: wait; }
.community-media img { display:block; width:100%; height:auto; max-width:100%; max-height:212px; object-fit:contain; object-position:left bottom; border-radius:5px; align-self:flex-end; }
@media (max-width:800px) { .community-media { max-height:180px; } .community-media img { max-height:172px; } }

/* Keep the community image directly above the profile card. */
.user-card { margin-top: 0; }

/* Direct messages */
.dm-section { flex: 0 0 auto; margin-top: 14px; min-height: 0; max-height: 210px; overflow-y: auto; }
.dm-list { display: flex; flex-direction: column; gap: 2px; }
.dm-item { display:flex; align-items:center; gap:9px; width:100%; border:0; background:transparent; color:#aeb3c0; padding:7px 8px; border-radius:7px; text-align:left; cursor:pointer; }
.dm-item:hover { background:#20232b; color:#e8eaf0; }
.dm-item.active { background:#2a2e39; color:#fff; }
.dm-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:600; flex:1; min-width:0; }
.dm-item .member-avatar { flex:0 0 30px; }
.dm-remove { flex:0 0 22px; width:22px; height:22px; padding:0; border:0; border-radius:5px; background:transparent; color:#737987; font-size:17px; line-height:20px; cursor:pointer; opacity:0; }
.dm-item:hover .dm-remove, .dm-item:focus-within .dm-remove { opacity:1; }
.dm-remove:hover { background:#3a1f25; color:#ff7b88; }
.dm-empty { color:#666c79; font-size:11px; padding:5px 10px 8px; }
.member { cursor:pointer; }
#chatPrefix:empty { display:none; }
@media (max-width:800px) { .dm-section { display:none; } }


.message { position: relative; }
.message-meta { position: relative; }
.message-actions {
    display: flex;
    gap: 3px;
    position: absolute;
    right: 8px;
    top: -10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    background: #17191f;
    border: 1px solid #343844;
    border-radius: 7px;
    box-shadow: 0 6px 18px #0008;
    padding: 3px;
    z-index: 5;
}
.message:hover .message-actions,
.message:focus-within .message-actions {
    opacity: 1;
    pointer-events: auto;
}
.message-action {
    border: 0;
    background: transparent;
    color: #aeb3c0;
    border-radius: 5px;
    cursor: pointer;
    min-width: 28px;
    height: 26px;
    font-size: 15px;
}
.message-action:hover { background: #2a2e39; color: #f1f3f7; }
.delete-message:hover { color: #ff7b7b; background: #3a2427; }
.message-reply {
    border-left: 3px solid #5865f2;
    padding: 3px 8px;
    margin: 2px 0 6px;
    color: #858b9b;
    font-size: .86em;
    cursor: pointer;
    max-width: min(650px, 90%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message-text.deleted { color: #999; font-style: italic; }
#messageInput { resize: none; overflow-y: auto; max-height: 180px; font-family: inherit; }

/* Settings */
.settings-button { font-size: 17px; line-height: 1; }
.settings-panel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: #0009; }
.settings-panel.hidden { display: none !important; }
.settings-card { width: min(760px, 100%); height: min(560px, calc(100vh - 48px)); overflow: hidden; display: flex; flex-direction: column; background: #20232b; border: 1px solid #343844; border-radius: 12px; box-shadow: 0 24px 90px #000c; }
.settings-header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; border-bottom: 1px solid #343844; }
.settings-header h2 { margin: 0; font-size: 19px; }
.settings-header p { margin: 5px 0 0; color: #858a98; font-size: 12px; }
.settings-close { font-size: 24px; padding: 0 7px; }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 0; flex: 1; }
.settings-nav { padding: 14px 10px; background: #17191f; border-right: 1px solid #343844; }
.settings-nav-item { width: 100%; border: 0; background: transparent; color: #9ba0ae; text-align: left; padding: 10px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; }
.settings-nav-item:hover { background: #20232b; color: #e8eaf0; }
.settings-nav-item.active { background: #2a2e39; color: #fff; }
.settings-content { overflow-y: auto; padding: 24px; }
.settings-section h3 { margin: 0; font-size: 16px; }
.settings-description { margin: 5px 0 20px; color: #858a98; font-size: 12px; }
.settings-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #2f333d; }
.settings-row > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.settings-row strong { font-size: 13px; color: #e8eaf0; }
.settings-row span { color: #858a98; font-size: 11px; overflow-wrap: anywhere; }
.settings-row-actions { display: flex !important; flex-direction: row !important; align-items: center; gap: 7px; flex-shrink: 0; }
.settings-action { border: 0; border-radius: 7px; background: #5865f2; color: white; font-weight: 700; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.settings-action:hover { filter: brightness(1.08); }
.secondary-action { background: #343844; }
.danger-action { background: #8f3544; }
.settings-control { padding: 12px 0 17px; }
.settings-control label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #cdd1da; font-size: 12px; margin-bottom: 9px; }
.settings-control input[type=range] { width: 100%; accent-color: #5865f2; }
.settings-select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #343844; border-radius: 7px; background: #111318; color: #e8eaf0; outline: none; }
.settings-select:focus { border-color: #5865f2; }
.settings-note { color: #686e7c; font-size: 10px; margin: 10px 0 0; }
.settings-status { min-height: 18px; color: #72e0a0; font-size: 11px; margin-top: 10px; }
.voice-test-row { margin-top: 4px; }
#micMonitor { display: none; }
@media (max-width: 650px) {
    .settings-panel { padding: 10px; }
    .settings-card { height: min(700px, calc(100vh - 20px)); }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { display: flex; gap: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid #343844; padding: 8px; }
    .settings-nav-item { width: auto; flex: 0 0 auto; white-space: nowrap; }
    .settings-content { padding: 18px; }
    .settings-row { align-items: flex-start; flex-direction: column; }
    .settings-row-actions { width: 100%; }
}

/* Voice settings toggles */
.settings-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.settings-toggle input { opacity: 0; width: 0; height: 0; }
.settings-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #3a3d43; border-radius: 999px; transition: .18s ease; }
.settings-toggle-slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s ease; }
.settings-toggle input:checked + .settings-toggle-slider { background: #5865f2; }
.settings-toggle input:checked + .settings-toggle-slider::before { transform: translateX(20px); }

/* DM voice calls */
.chat-header-actions { display:flex; align-items:center; gap:12px; }
.dm-call-button { border:1px solid #3b4050; border-radius:7px; background:#252a34; color:#e5e8ef; font-weight:700; padding:8px 12px; cursor:pointer; }
.dm-call-button:hover { background:#303643; border-color:#5865f2; }
.dm-call-button:disabled { opacity:.55; cursor:wait; }
.call-modal { position:fixed; inset:0; z-index:80; display:grid; place-items:center; background:#0009; padding:20px; }
.call-modal.hidden { display:none !important; }
.call-modal-card { width:min(360px, calc(100vw - 30px)); text-align:center; background:#20232b; border:1px solid #343844; border-radius:14px; padding:28px; box-shadow:0 22px 80px #000b; }
.call-avatar { width:58px; height:58px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; background:#2a2e39; font-size:28px; }
.call-modal-card h2 { margin:0 0 8px; font-size:19px; }
.call-modal-card p { color:#9297a5; margin:0 0 22px; font-size:13px; }
.call-modal-actions { display:flex; justify-content:center; gap:10px; }
.call-button { min-width:105px; border:0; border-radius:8px; color:#fff; font-weight:800; padding:10px 15px; cursor:pointer; }
.call-button.accept { background:#2f9d62; }
.call-button.decline { background:#b74352; }
.active-call-panel { position:fixed; right:18px; bottom:18px; z-index:70; min-width:280px; max-width:min(420px, calc(100vw - 36px)); display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px 14px; background:#181b22; border:1px solid #343844; border-radius:11px; box-shadow:0 15px 50px #0009; }
.active-call-panel.hidden { display:none !important; }
.active-call-panel > div:first-child { min-width:0; display:flex; flex-direction:column; gap:3px; }
.active-call-panel strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.active-call-panel span { color:#8a909e; font-size:11px; }
.active-call-actions { display:flex; gap:7px; }
.call-icon-button { width:38px; height:38px; border:0; border-radius:50%; background:#343844; color:#fff; cursor:pointer; font-size:16px; }
.call-icon-button:hover { filter:brightness(1.12); }
.call-icon-button.muted { background:#b74352; }
.call-icon-button.hangup { background:#b74352; transform:rotate(135deg); }
#remoteCallAudio { display:none; }
@media (max-width:800px) { .dm-call-button { padding:7px 9px; font-size:12px; } .active-call-panel { left:12px; right:12px; bottom:12px; min-width:0; } }
