:root {
  color-scheme: dark;
  --rail: #1d1e24;
  --sidebar: #292b33;
  --main: #32343d;
  --raised: #3b3e48;
  --line: #22242b;
  --text: #f4f5f8;
  --muted: #aaaebc;
  --soft: #818695;
  --brand: #7f71ef;
  --mint: #65d8ae;
  --danger: #ef7c88;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--main); font: 14px Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
button, input { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
.vault-update-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 22px; background: #1e1f22; color: #f4f5f8; font-size: 16px; }
.vault-update-icon { width: 88px; height: 88px; animation: vault-update-spin 1.25s linear infinite; filter: drop-shadow(0 8px 28px #7568ef66); }
@keyframes vault-update-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vault-update-icon { animation: none; } }
.client-update-dialog { width: min(430px, calc(100vw - 32px)); border: 1px solid #5f5a9f; border-radius: 16px; background: linear-gradient(145deg, #292a42, #202129); color: var(--text); padding: 28px; text-align: center; box-shadow: 0 24px 80px #000b; }
.client-update-dialog::backdrop { background: rgb(7 8 14 / .76); }
.client-update-dialog img { width: 66px; height: 66px; margin-bottom: 10px; animation: vault-update-spin 1.25s linear infinite; }
.client-update-dialog h2 { margin: 6px 0 8px; }
.client-update-dialog p { color: #c4c8d5; line-height: 1.55; }
.client-update-dialog strong { color: #b4aaff; font-size: 24px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.primary { background: var(--brand); border-radius: 7px; color: white; font-weight: 700; padding: 10px 15px; transition: background .16s ease; }
.primary:hover { background: #968af8; }
.wide { width: 100%; }
.danger { background: #67424c !important; color: #ffe5e9 !important; }

#toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: min(360px, calc(100vw - 44px)); border: 1px solid #62687d; border-radius: 9px; background: #414653; box-shadow: 0 18px 45px #0008; padding: 12px 16px; }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: 1.08fr .92fr; background: #252730; }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 7vw, 120px); background: radial-gradient(circle at 38% 78%, #5247a3 0, transparent 36%), linear-gradient(145deg, #282946, #171922); }
.auth-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 56px, #ffffff04 57px 58px); pointer-events: none; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; margin-bottom: 55px; background: linear-gradient(135deg, #9c92ff, #7263e9); box-shadow: 0 13px 30px #15143388; font-size: 30px; font-weight: 900; }
.auth-art h1 { max-width: 580px; margin: 14px 0 20px; font-size: clamp(38px, 5vw, 70px); line-height: 1.04; letter-spacing: -.05em; }
.auth-art > p:last-of-type { max-width: 460px; color: #d2d1eb; font-size: 17px; line-height: 1.65; }
.auth-orbit { display: flex; gap: 15px; margin-top: 45px; }
.auth-orbit span { width: 65px; height: 65px; display: grid; place-items: center; border: 1px solid #8780c0; border-radius: 18px; background: #ffffff12; color: #93f0cc; font-size: 27px; }
.auth-card { align-self: center; width: min(100%, 438px); margin: auto; padding: 32px; }
.auth-card h2 { margin: 14px 0 5px; font-size: 29px; }
.auth-card form { display: grid; gap: 17px; margin-top: 34px; }
.auth-card label { display: grid; gap: 8px; color: #d7d9e4; font-weight: 700; }
.auth-card input, #dialog-input { width: 100%; margin-top: 5px; padding: 12px 13px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; }
.qr-login { display: grid; justify-items: center; gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #484b57; text-align: center; }
.qr-login > div { display: grid; gap: 3px; }
.qr-login small, .qr-login p { color: #b7bdc9; font-size: 12px; }
.qr-login p { margin: 0; }
.qr-login img { width: 192px; height: 192px; padding: 8px; border-radius: 9px; background: white; }
.desktop-download-auth { display: block; margin-top: 20px; padding: 11px 14px; border: 1px solid #6b65a9; border-radius: 8px; background: #3f3b68; color: white; text-align: center; text-decoration: none; font-weight: 700; }
.desktop-download-auth:hover { background: #514b85; }
.text-button { color: #9df0ce; padding: 0; margin-top: 22px; }
.auth-card #forgot-link { display: block; margin-top: 15px; }
.auth-card #auth-switch { display: block; margin-top: 14px; }
.auth-card #auth-back { display: block; }
.auth-feedback { margin: 18px 0 0; padding: 12px; border-radius: 7px; background: #28533d; color: #d9ffe9; font-size: 13px; line-height: 1.5; }

.app-shell { height: 100dvh; min-height: 480px; display: grid; grid-template-columns: 72px 248px minmax(0, 1fr) 232px; grid-template-rows: 44px minmax(0, 1fr); background: var(--main); }
.window-bar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 20px; padding: 0 18px; border-bottom: 1px solid #17181d; background: #18191f; }
.desktop-client .window-bar { padding-right: 0; -webkit-app-region: drag; user-select: none; }
.desktop-client .window-bar button, .desktop-client .window-bar a { -webkit-app-region: no-drag; }
.window-controls { height: 100%; margin-left: auto; display: flex; }
.window-controls[hidden] { display: none; }
.window-controls button { width: 46px; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #b5bac1; font-size: 16px; }
.window-controls button:hover { color: #fff; background: #35373c; }
.window-controls button[data-window-action="close"]:hover { background: #da373c; }
.desktop-update-dialog { width: min(480px, calc(100vw - 32px)); text-align: center; background: #24262b; color: #f2f3f5; border: 1px solid #3f4147; border-radius: 16px; padding: 28px; }
.desktop-update-dialog::backdrop { background: rgb(0 0 0 / .72); }
.desktop-update-dialog img { width: 74px; animation: vault-spin 1.25s linear infinite; }
.desktop-update-dialog progress { width: 100%; height: 12px; accent-color: #5865f2; }
.desktop-update-dialog p { white-space: pre-line; color: #b5bac1; max-height: 130px; overflow: auto; }
.incoming-call-dialog { width: min(390px, calc(100vw - 32px)); text-align: center; color: #f2f3f5; background: linear-gradient(160deg,#313338,#1e1f22); border: 1px solid #45474e; border-radius: 18px; padding: 34px; }
.incoming-call-dialog::backdrop { background: rgb(0 0 0 / .7); }.incoming-call-avatar { margin: 0 auto 16px; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #5865f2; font-size: 30px; font-weight: 800; animation: call-pulse 1.3s ease-in-out infinite; }.incoming-call-dialog p { color: #b5bac1; margin-bottom: 5px; }.incoming-call-dialog h2 { margin-top: 0; }.incoming-call-actions { display: flex; justify-content: center; gap: 18px; margin-top: 26px; }@keyframes call-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgb(88 101 242 / .16); } }
.window-brand { display: flex; align-items: center; gap: 8px; min-width: 140px; font-size: 13px; letter-spacing: .02em; }
.window-brand-mark { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); font-weight: 900; }
.window-caption { margin-left: auto; color: #757b89; font-size: 11px; }
.desktop-download-top { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #51546f; border-radius: 6px; color: #dbdcff; text-decoration: none; font-size: 11px; font-weight: 700; white-space: nowrap; }
.desktop-download-top:hover { background: #383b59; color: white; }
.desktop-download-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.desktop-download-top:focus-visible, .desktop-download-auth:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.rail { grid-column: 1; grid-row: 2; display: flex; align-items: center; flex-direction: column; gap: 10px; padding: 12px 10px; overflow-y: auto; background: var(--rail); }
.rail-logo, .space-icons button, .rail-add { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 17px; background: #393b47; font-size: 20px; font-weight: 800; transition: background .18s, border-radius .18s; }
.rail-logo { background: var(--brand); font-size: 26px; }
.rail-logo:hover, .rail-logo.active, .space-icons button:hover, .space-icons button.active { border-radius: 14px; background: var(--brand); }
.space-icons button.active::before { content: ""; position: absolute; left: -13px; width: 4px; height: 32px; border-radius: 0 4px 4px 0; background: white; }
.rail-divider { width: 30px; height: 2px; background: #3c3e48; border-radius: 2px; }
.space-icons, .rail-actions { display: grid; gap: 10px; }
.space-voice-popover { position: fixed; z-index: 90; width: min(280px, calc(100vw - 96px)); max-height: min(420px, calc(100vh - 24px)); overflow: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 12px; background: #171922; color: var(--text); box-shadow: 0 18px 48px rgb(0 0 0 / .48); }
.space-voice-popover-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border-bottom: 1px solid var(--border-subtle); background: #1c1f29; }
.space-voice-popover-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.space-voice-popover-head span { flex: none; color: var(--mint); font-size: 11px; font-weight: 750; }
.space-voice-popover-body { display: grid; gap: 11px; padding: 10px; }
.space-voice-popover-body section { display: grid; gap: 3px; }
.space-voice-popover-channel { display: flex; align-items: center; gap: 7px; padding: 3px 4px 5px; color: #aeb3c1; font-size: 11px; font-weight: 750; }
.space-voice-popover-channel svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.space-voice-popover-user { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 6px; border-radius: 7px; color: #e1e3ea; font-size: 12px; }
.space-voice-popover-user:hover { background: rgb(255 255 255 / .045); }
.space-voice-popover-user > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-voice-popover-avatar { width: 24px; height: 24px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #554da0; color: white; font-size: 9px; }
.space-voice-popover-avatar img { width: 100%; height: 100%; object-fit: cover; }
.space-voice-popover-body small { padding-left: 38px; color: #858b9a; font-size: 10px; }
.rail-actions { margin-top: 2px; }
.rail-add { color: #8ce2bb; font-size: 27px; }
.rail-add:hover { border-radius: 14px; background: #296c51; color: white; }

.sidebar { position: relative; grid-column: 2; grid-row: 2; display: flex; min-height: 0; flex-direction: column; background: var(--sidebar); }
.sidebar-head { height: 50px; min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #202128; box-shadow: 0 1px 3px #0002; font-size: 15px; }
.sidebar-head strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-head button { flex: none; margin-left: 8px; color: var(--muted); font-size: 23px; }
.sidebar-head button:hover, .section-title button:hover { color: white; }
.sidebar-head #space-settings-open { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 1px solid transparent; border-radius: 8px; color: #aeb4c2; transition: background .16s, border-color .16s, color .16s; }
.sidebar-head #space-settings-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-head #space-settings-open:hover { border-color: #616674; background: #414550; color: #fff; }
.sidebar-head #space-settings-open:focus-visible { outline: 2px solid #b9b2ff; outline-offset: 2px; }
.sidebar-head #invite { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; color: #aeb4c2; transition: background .16s, border-color .16s, color .16s; }
.sidebar-head #invite svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-head #invite:hover { border-color: #616674; background: #414550; color: #fff; }
.sidebar-head #invite:focus-visible { outline: 2px solid #b9b2ff; outline-offset: 2px; }
.save-confirmed { background: #2d6a55 !important; border-color: #55b98b !important; color: #b9f2db !important; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 8px 20px; }
.server-view #personal-navigation, .personal-view #server-navigation, .personal-view #space-settings-open, .personal-view #invite { display: none; }
.personal-home .member-panel { display: none; }
.app-shell.personal-home { grid-template-columns: 72px 248px minmax(0, 1fr); }
.sidebar-label { margin: 4px 9px 16px; color: #7c8290; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 19px 9px 6px; color: #aeb2bf; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.section-title button { padding: 0 2px; color: #b5bac6; font-size: 20px; line-height: 16px; }
.channel-list { display: grid; gap: 2px; }
.server-category { margin: 12px 0 4px; }
.server-category-title { width: 100%; padding: 5px 10px; color: #aeb2bf; text-align: left; text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.server-category-title::before { content: '⌄'; margin-right: 6px; }
.server-category-title[aria-expanded="false"]::before { content: '›'; }
.server-category-title:hover { color: white; }
.server-category .channel-list { margin-left: 6px; }
.channel-list button { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 5px; color: #adb2c0; text-align: left; font-size: 14px; font-weight: 600; }
.channel-list button:hover { background: #373a45; color: #eceef4; }
.channel-list button.active { background: #41444f; color: white; }
.channel-list .channel-glyph { width: 19px; flex: none; color: #9ca2b0; text-align: center; font-size: 18px; font-weight: 500; }
.channel-list .channel-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.voice-channel { min-width: 0; }
.voice-channel-line { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 2px; }
.channel-list .voice-channel-chat { width: 30px; min-height: 30px; padding: 0; place-content: center; opacity: 0; }
.voice-channel:hover .voice-channel-chat, .voice-channel:focus-within .voice-channel-chat { opacity: 1; }
.channel-list .voice-channel-chat svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voice-members { display: grid; gap: 1px; margin: 1px 0 6px 29px; }
.voice-member { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 3px 6px; color: #aab0be; font-size: 12px; }
.voice-member-avatar { display: grid; place-items: center; width: 22px; height: 22px; flex: none; overflow: visible; border-radius: 50%; background: #5e60a4; color: white; font-size: 9px; }
.voice-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.voice-member-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.voice-member.speaking .voice-member-name { color: var(--mint); }
.voice-member.speaking .voice-member-avatar { box-shadow: 0 0 0 2px var(--mint); }
.channel-lock { flex: none; font-size: 11px; }
.unread-badge { flex: none; min-width: 18px; padding: 2px 5px; border-radius: 9px; background: #ee7081; color: white; text-align: center; font-size: 10px; font-weight: 800; }
.social-open { width: calc(100% - 18px); display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 9px 0; padding: 9px 10px; border-radius: 6px; background: #3b3e48; color: #d9ddff; text-align: left; font-size: 13px; }
.social-open:hover { background: #4b4f60; }
.request-count { min-width: 20px; padding: 2px 5px; border-radius: 10px; background: #7570d9; color: white; text-align: center; font-size: 11px; font-weight: 800; }
.dm-pending { flex: none; color: #b8bad4; font-size: 10px; }
.voice-presence { display: flex; flex: none; padding-left: 6px; }
.voice-avatar { width: 20px; height: 20px; display: grid; place-items: center; overflow: hidden; margin-left: -5px; border: 2px solid var(--sidebar); border-radius: 50%; background: #5e60a4; color: white; font-size: 9px; }
.voice-avatar img, .channel-avatar img, .member-avatar img, .message-avatar img, .profile-avatar img, .call-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.user-status-avatar:not(.profile-avatar) { position: relative; overflow: visible; }
.user-status-avatar:not(.profile-avatar)::after { content: ""; position: absolute; right: -2px; bottom: -1px; width: 8px; height: 8px; border: 2px solid var(--sidebar); border-radius: 50%; background: #80848e; }
.user-status-avatar[data-presence="ONLINE"]:not(.profile-avatar)::after { background: #23a55a; }
.user-status-avatar[data-presence="IDLE"]:not(.profile-avatar)::after { background: #f0b232; }
.user-status-avatar[data-presence="DND"]:not(.profile-avatar)::after { background: #f23f42; }
.channel-list .channel-avatar { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #5b62a3; color: white; font-size: 11px; }
.voice-dock { display: grid; gap: 8px; padding: 10px 9px; border-top: 1px solid #20242a; background: #23282b; }
.voice-dock-status { display: flex; align-items: center; gap: 8px; min-width: 0; }
.connection-quality { display: flex; align-items: flex-end; gap: 2px; flex: none; width: 19px; height: 16px; color: #959ba6; }
.connection-quality i { display: block; width: 3px; border-radius: 1px 1px 0 0; background: currentColor; opacity: .25; }
.connection-quality i:nth-child(1) { height: 4px; }
.connection-quality i:nth-child(2) { height: 7px; }
.connection-quality i:nth-child(3) { height: 10px; }
.connection-quality i:nth-child(4) { height: 13px; }
.connection-quality[data-quality="excellent"], .connection-quality[data-quality="good"] { color: var(--mint); }
.connection-quality[data-quality="poor"] { color: #f0b660; }
.connection-quality[data-quality="lost"] { color: #f27b85; }
.connection-quality[data-quality="excellent"] i, .connection-quality[data-quality="good"] i:nth-child(-n+3), .connection-quality[data-quality="poor"] i:nth-child(-n+2), .connection-quality[data-quality="lost"] i:first-child { opacity: 1; }
.voice-dock-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: none; border-radius: 7px; background: #204836; color: var(--mint); font-size: 19px; }
.voice-dock-open { display: grid; flex: 1; min-width: 0; pointer-events: none; text-align: left; }
.voice-dock strong { color: var(--mint); font-size: 12px; }
.voice-dock .call-duration { margin-left: 5px; color: #b9c8c5; font-size: 11px; font-variant-numeric: tabular-nums; }
.voice-dock small { overflow: hidden; color: #c5c9d2; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.voice-dock button { color: #c5c9d2; font-size: 16px; }
.dock-participants { display: flex; min-width: 0; }
.dock-participants .call-avatar { width: 21px; height: 21px; border-color: #23282b; }
.voice-dock .dock-leave { display: grid; place-items: center; width: 31px; height: 30px; flex: none; border-radius: 6px; background: #95424a; color: white; }
.voice-dock .dock-leave:hover { background: #b64a55; }
.voice-dock-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.voice-dock-controls button { display: grid; place-items: center; min-height: 32px; border-radius: 6px; background: #3d414c; color: #e4e7ee; }
.voice-dock-controls button:hover { background: #525765; }
.voice-dock-controls button.active, .voice-dock-controls #dock-view[aria-pressed="true"] { background: #315e51; color: #b9f2db; }
.voice-dock-controls #dock-view { display: none; }
.voice-dock-controls #dock-mic.active { background: #454753; color: #f1f3f7; }
.voice-dock-controls #dock-mic:not(.active) { position: relative; border: 1px solid #9b6bdd; background: #6f4aa8; color: #f0dcff; }
.voice-dock-controls #dock-mic:not(.active)::after { content: ""; position: absolute; width: 24px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); }
.voice-dock-controls #dock-screen { border: 1px solid #58617b; background: #3a4155; color: #dce4ff; }
.voice-dock-controls #dock-screen:hover { border-color: #8997c6; background: #4a5574; color: white; }
.voice-dock-controls #dock-screen.active { border-color: #7aa8e5; background: #3566a2; color: white; box-shadow: 0 0 0 1px #547fba55 inset; }
.voice-dock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voice-dock-controls #dock-screen svg { width: 19px; height: 19px; }
.voice-dock-controls #dock-screen:focus-visible { outline: 2px solid #d8e5ff; outline-offset: 2px; }
.voice-dock-controls #dock-screen .screen-stop-icon { display: none; }
.voice-dock-controls #dock-screen.active .screen-start-icon { display: none; }
.voice-dock-controls #dock-screen.active .screen-stop-icon { display: block; }
.profile { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 56px; padding: 7px 16px; border-top: 1px solid var(--border-subtle); background: var(--surface-1); }
.profile-avatar-shell { position: relative; display: block; width: 34px; height: 34px; flex: none; }
.profile-avatar { display: grid; width: 34px; height: 34px; place-items: center; overflow: hidden; border: 1px solid rgb(255 255 255 / .1); border-radius: 50%; background: #554da0; font-weight: 800; }
.profile-avatar-shell .status-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 3px solid var(--surface-1); }
.profile-identity { display: grid; min-width: 0; align-content: center; gap: 1px; }
.profile strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 1.15; }
.profile.speaking strong { color: var(--mint); }
.profile.speaking .profile-avatar { box-shadow: 0 0 0 2px var(--mint); }
.profile small { overflow: hidden; color: #c0c4cf; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.profile-presence { display: block; width: max-content; max-width: 100%; height: auto; overflow: hidden; padding: 0; border-radius: 0; color: #aeb3c2; font-size: 10px; line-height: 1.2; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.profile-presence:hover { background: transparent; color: white; }
.profile-controls { display: flex; min-width: max-content; align-items: center; gap: 1px; }
.profile .profile-controls button { position: relative; display: grid; width: 28px; height: 30px; place-items: center; border-radius: 6px; color: #b5bac6; }
.profile .profile-controls button:hover { background: #30343e; color: #eef0f5; }
.profile-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.profile-controls #profile-mic.active { color: #b5bac6; }
.profile-controls #profile-mic[data-connected="true"]:not(.active), .profile-controls #profile-deafen.deafened { color: #cbbdff; }
.profile-controls #profile-mic[data-connected="true"]:not(.active)::after, .profile-controls #profile-deafen.deafened::after { content: ""; position: absolute; width: 21px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: none; border: 2px solid #22242b; border-radius: 50%; background: var(--mint); }
.status-dot[data-presence="ONLINE"] { background: #23a55a; }
.status-dot[data-presence="IDLE"] { background: #f0b232; }
.status-dot[data-presence="DND"] { background: #f23f42; }
.status-dot[data-presence="OFFLINE"] { background: #80848e; }
.presence-menu { position: absolute; right: 8px; bottom: 68px; left: 8px; z-index: 25; display: grid; gap: 3px; padding: 10px; border: 1px solid #505360; border-radius: 9px; background: #272932; box-shadow: 0 14px 35px #0008; }
.presence-menu > strong { padding: 2px 8px 6px; color: #e6e8ee; font-size: 11px; }
.presence-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border-radius: 6px; color: #dfe2ea; text-align: left; }
.presence-menu button:hover { background: #3e414c; }
.presence-menu button > span:last-child { display: grid; gap: 2px; min-width: 0; }
.presence-menu button b { font-size: 12px; }
.presence-menu button small { color: #9da3b0; font-size: 10px; }

.conversation { grid-column: 3; grid-row: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--main); }
.channel-head { height: 50px; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid #292b33; box-shadow: 0 1px 3px #0002; }
.space-map-view { position: relative; display: flex; min-height: 0; flex: 1; flex-direction: column; background: #1a1c23; }
.space-map-view:fullscreen, .space-map-view.map-fullscreen-fallback { width: 100vw; height: 100vh; background: #15171d; }
.space-map-view.map-fullscreen-fallback { position: fixed; inset: 0; z-index: 1000; display: flex !important; }
.space-map-view:fullscreen .map-layout, .space-map-view.map-fullscreen-fallback .map-layout { min-height: 0; flex: 1; }
.space-map-view:fullscreen .map-canvas, .space-map-view.map-fullscreen-fallback .map-canvas { min-height: 0; height: 100%; border-radius: 0; }
.map-toolbar { position: absolute; z-index: 12; top: 10px; right: 10px; display: flex; align-items: center; justify-content: flex-end; padding: 0; border: 0; background: transparent; }
.map-toolbar > div { display: grid; gap: 4px; }
.map-selectors { display: flex !important; gap: 8px !important; margin-left: auto; }
.map-selectors select { min-width: 110px; padding: 7px 9px; border: 1px solid #4a4d5c; border-radius: 6px; background: #1d1f27; color: #f1f3f7; }
.map-toolbar small { color: #aeb3c2; }
.map-toolbar .primary { padding: 8px 11px; font-size: 12px; }
.map-fullscreen-toggle { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: #343743; color: #d7dae4; }
.map-fullscreen-toggle:hover, .map-fullscreen-toggle.active { background: #505396; color: #fff; }
.map-fullscreen-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-wave-button { flex: none; min-height: 34px; padding: 6px 10px; border-radius: 7px; background: #343743; color: #e7e9ef; font-size: 12px; font-weight: 700; }
.map-wave-button:hover { background: #505396; color: #fff; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-height: 0; flex: 1; padding: 0; }
.map-canvas { position: relative; min-height: 420px; overflow: hidden; border: 0; border-radius: 0; outline: none; background-color: #252b35; background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px), radial-gradient(circle at 22% 24%, #3e655a 0 5%, transparent 5.5%), radial-gradient(circle at 78% 65%, #51406c 0 7%, transparent 7.5%); background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%; box-shadow: inset 0 0 0 12px #11151b55, inset 0 -80px 100px #11151b66; }
.map-canvas:focus-visible { border-color: var(--mint); box-shadow: 0 0 0 3px #65d8ae44, inset 0 0 0 12px #11151b55; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #aeb3c2; }
.map-player { position: absolute; z-index: 3; display: grid; justify-items: center; gap: 1px; min-width: 58px; padding: 0; border-radius: 8px; transform: translate(-50%, -50%); background: transparent; color: #f1f3f7; text-shadow: 0 1px 2px #000; transition: left .14s ease, top .14s ease, filter .14s ease; }
.map-player:hover, .map-player.own { filter: drop-shadow(0 0 5px #65d8aeaa); }
.map-player strong { max-width: 110px; overflow: hidden; padding: 2px 6px; border-radius: 999px; background: #14161dcc; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.map-emote { position: absolute; z-index: 5; top: -15px; right: -8px; display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #242631; font-size: 18px; filter: drop-shadow(0 3px 4px #0009); animation: vault-map-wave-hand .36s ease-in-out 5 alternate; }
.map-player.waving .atlas-avatar-surface { animation: vault-map-wave-avatar .36s ease-in-out 5 alternate; transform-origin: 50% 90%; }
@keyframes vault-map-wave-hand { from { transform: translateY(2px) rotate(-18deg) scale(.92); } to { transform: translateY(-3px) rotate(18deg) scale(1.08); } }
@keyframes vault-map-wave-avatar { from { transform: rotate(-2deg); } to { transform: rotate(2deg) translateY(-2px); } }
.map-sprite { display: grid; grid-template-columns: repeat(8, 5px); grid-template-rows: repeat(8, 5px); width: 40px; height: 40px; padding: 3px; border: 2px solid #ece8ff; border-radius: 5px; background: #6b62ad; image-rendering: pixelated; box-shadow: 0 3px 8px #0008; }
.map-sprite i { display: block; background: transparent; }
.map-sprite.atlas-avatar { position: relative; display: block; width: 44px; height: 72px; padding: 0; border: 0 !important; outline: 0; border-radius: 0; overflow: hidden; background: transparent !important; box-shadow: none !important; filter: drop-shadow(0 4px 3px #0008); }
.atlas-avatar-surface { position: absolute; inset: 0; display: block; background-color: transparent; background-image: url("assets/map/vault-avatar-walk-atlas-v2.png"); background-repeat: no-repeat; background-size: 2400% 400%; background-position: var(--sprite-x-1) var(--sprite-y); animation: vault-avatar-idle 1.6s steps(2, end) infinite; }
.map-player.walking .atlas-avatar-surface { animation-duration: .36s; animation-iteration-count: infinite; animation-timing-function: steps(1, end); }
.map-player.walking.facing-down .atlas-avatar-surface { animation-name: vault-avatar-walk-down; }
.map-player.walking.facing-up .atlas-avatar-surface { animation-name: vault-avatar-walk-up; }
.map-player.walking.facing-left .atlas-avatar-surface { animation-name: vault-avatar-walk-left; }
.map-player.walking.facing-right .atlas-avatar-surface { animation-name: vault-avatar-walk-right; }
@keyframes vault-avatar-idle { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes vault-avatar-walk-down { 0%, 100% { background-position: var(--sprite-x-0) var(--sprite-y); transform: translateY(0); } 33% { background-position: var(--sprite-x-1) var(--sprite-y); transform: translateY(-2px); } 66% { background-position: var(--sprite-x-2) var(--sprite-y); transform: translateY(0); } }
@keyframes vault-avatar-walk-up { 0%, 100% { background-position: var(--sprite-x-0) var(--sprite-y); transform: translateY(0); } 33% { background-position: var(--sprite-x-1) var(--sprite-y); transform: translateY(-2px); } 66% { background-position: var(--sprite-x-2) var(--sprite-y); transform: translateY(0); } }
@keyframes vault-avatar-walk-left { 0%, 100% { background-position: var(--sprite-x-0) var(--sprite-y); transform: translate(1px, 0); } 33% { background-position: var(--sprite-x-1) var(--sprite-y); transform: translate(-1px, -2px); } 66% { background-position: var(--sprite-x-2) var(--sprite-y); transform: translate(-2px, 0); } }
@keyframes vault-avatar-walk-right { 0%, 100% { background-position: var(--sprite-x-0) var(--sprite-y); transform: translate(-1px, 0); } 33% { background-position: var(--sprite-x-1) var(--sprite-y); transform: translate(1px, -2px); } 66% { background-position: var(--sprite-x-2) var(--sprite-y); transform: translate(2px, 0); } }
.map-sprite.layered-avatar { position: relative; display: block; overflow: hidden; border-color: transparent; background: transparent; filter: drop-shadow(0 4px 3px #0008); }
.map-sprite-frame { position: absolute; inset: 3px; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.map-sprite-frame.frame-1 { opacity: 0; }
.map-player .layered-avatar .map-sprite-frame.frame-0 { animation: vault-avatar-frame-a .42s steps(1) infinite; }
.map-player .layered-avatar .map-sprite-frame.frame-1 { animation: vault-avatar-frame-b .42s steps(1) infinite; }
.map-player .layered-avatar.facing-left { transform: scaleX(-1); }
@keyframes vault-avatar-frame-a { 0%, 49% { opacity: 1; transform: translateY(0); } 50%, 100% { opacity: 0; transform: translateY(-1px); } }
@keyframes vault-avatar-frame-b { 0%, 49% { opacity: 0; transform: translateY(0); } 50%, 100% { opacity: 1; transform: translateY(-1px); } }
.map-sidebar { display: grid; align-content: start; gap: 11px; min-width: 0; padding: 16px; border: 1px solid #3f4250; border-radius: 12px; background: #242731; }
.map-sidebar p, .map-sidebar small { margin: 0; color: #aeb3c2; line-height: 1.5; }
.map-player-status { margin-top: 8px; padding: 10px; border-radius: 8px; background: #1b1d25; color: #dddffc; font-size: 11px; line-height: 1.45; }
.pixel-art-dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid #55517d; border-radius: 14px; background: #252733; color: var(--text); padding: 24px; }
.pixel-art-dialog::backdrop { background: #090a0fcc; }
.pixel-art-dialog h2 { margin-top: 0; }
.pixel-art-dialog p { color: #aeb3c2; }
.pixel-art-grid { display: grid; grid-template-columns: repeat(8, 1fr); width: min(280px, 100%); aspect-ratio: 1; margin: 18px auto; border: 3px solid #8c83d9; background: #11131a; }
.avatar-preset-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; max-height: 190px; overflow: auto; margin: 14px 0; }
.avatar-preset-choice { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 2px 9px; padding: 8px; border: 1px solid #3d4050; border-radius: 9px; background: #22252f; color: #dbdee1; text-align: left; }
.avatar-preset-choice:hover, .avatar-preset-choice.active { border-color: #8c83d9; background: #34364a; }
.avatar-preset-choice .map-sprite { grid-row: 1 / 3; width: 34px; height: 68px; }
.avatar-preset-choice small { color: #949ba4; font-size: 10px; }
.avatar-layer-preview { display: grid; place-items: center; margin: 12px auto; }
.avatar-layer-preview .map-sprite { width: 64px; height: 64px; grid-template-columns: repeat(8, 8px); grid-template-rows: repeat(8, 8px); }
.avatar-layer-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 14px 0 20px; }
.avatar-layer-controls label { display: grid; gap: 5px; color: #b8bdc9; font-size: 11px; }
.avatar-layer-controls select { min-width: 0; padding: 8px; border: 1px solid #4c5060; border-radius: 7px; background: #1d2028; color: #eef0f5; }
.pixel-cell { min-width: 0; padding: 0; border: 1px solid #ffffff15; border-radius: 0; background-image: linear-gradient(45deg, #ffffff0d 25%, transparent 25%, transparent 75%, #ffffff0d 75%), linear-gradient(45deg, #ffffff0d 25%, transparent 25%, transparent 75%, #ffffff0d 75%); background-position: 0 0, 4px 4px; background-size: 8px 8px; }
.pixel-color-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 20px; }
.pixel-color { width: 25px; height: 25px; border: 2px solid #596071; border-radius: 6px; box-shadow: inset 0 0 0 2px #1c1e27; }
.pixel-color.active { border-color: white; box-shadow: 0 0 0 2px var(--brand), inset 0 0 0 2px #1c1e27; }
.map-room-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; margin: 18px 0; }
.map-room-editor h3, .map-room-editor textarea, .map-room-editor select, .map-room-editor input:first-of-type { grid-column: 1 / -1; }
.map-room-editor textarea, .map-room-editor select, .map-room-editor input { min-width: 0; }
.map-room-editor input[type="color"] { width: 42px; min-height: 34px; padding: 2px; }
.map-layout-editor { display: grid; gap: 10px; margin: 18px 0; padding: 14px; border: 1px solid #3d4050; border-radius: 10px; background: #1f212a; }
.map-layout-heading { display: grid; gap: 3px; }
.map-layout-heading h4 { margin: 0; }
.map-layout-heading small { color: #aeb3c2; }
.map-editor-history-actions { display: flex; gap: 7px; margin-top: 6px; }
.map-editor-history-actions button { padding: 5px 9px; border-radius: 6px; background: #303440; color: #dfe2ea; font-size: 11px; }
.map-editor-history-actions button:disabled { opacity: .4; }
.map-tile-tools, .map-object-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.map-layout-grid { display: grid; grid-template-columns: repeat(var(--map-editor-columns), minmax(12px, 1fr)); gap: 2px; width: min(100%, 520px); padding: 5px; border-radius: 8px; background: #12141a; }
.map-layout-cell { min-width: 0; aspect-ratio: 1; padding: 0; border: 1px solid #ffffff12; border-radius: 2px; background: #303644; }
.map-layout-cell.blocked { background: #6a4a65; box-shadow: inset 0 0 0 2px #ef7c88; }
.map-object-form input, .map-object-form select { min-width: 90px; max-width: 150px; }
.map-object-form input[type="url"] { min-width: 220px; max-width: 320px; flex: 1; }
.map-object-list { display: grid; gap: 6px; }
.map-object-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 6px; background: #2b2e39; color: #d8dbe8; font-size: 12px; }
.map-object-row button { padding: 5px 8px; }
.map-tile { position: absolute; z-index: 0; transform: translate(-50%, -50%); pointer-events: none; opacity: .6; }
.map-tile.blocked { opacity: .9; }
.map-object { position: absolute; z-index: 2; display: grid; place-items: center; min-width: 24px; min-height: 24px; transform: translate(-50%, -50%); border: 1px solid var(--object-color); border-radius: 7px; background: color-mix(in srgb, var(--object-color) 35%, #161923); color: #fff; font-size: 11px; }
.map-object.map-furniture { overflow: visible; border: 0; border-radius: 0; background-color: transparent; background-repeat: no-repeat; image-rendering: pixelated; color: transparent; filter: drop-shadow(0 5px 4px #0007); }
.map-object-seat { cursor: pointer; }
.map-object-seat:not(.map-furniture) { border: 2px dashed transparent; background: transparent; color: transparent; }
.map-object-seat:not(.map-furniture):hover, .map-object-seat:not(.map-furniture):focus-visible { border-color: #b7adff; background: #7f71ef30; color: #fff; }
.map-object-seat.map-furniture:hover, .map-object-seat.map-furniture:focus-visible { filter: brightness(1.12) drop-shadow(0 0 7px #9a91ff); }
.map-player.sitting { z-index: 4; transform: translate(-50%, -42%); }
.map-player.sitting .atlas-avatar-surface { animation: none; transform: translateY(8px) scaleY(.9); transform-origin: 50% 100%; }
.map-object-portal { cursor: pointer; }
.map-object-voice-door { align-content: end; padding: 0 5px 7px; overflow: hidden; border: 3px solid color-mix(in srgb, var(--object-color) 72%, #dfe4ef); border-bottom-width: 6px; border-radius: 7px 7px 2px 2px; background: linear-gradient(90deg, #171923 0 12%, color-mix(in srgb, var(--object-color) 38%, #20232d) 12% 88%, #171923 88%); box-shadow: inset 0 5px #ffffff12, 0 7px 13px #0009; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.15; text-align: center; }
.map-object-voice-door::before { content: ''; position: absolute; right: 8px; top: 48%; width: 5px; height: 5px; border-radius: 50%; background: #f4d675; box-shadow: 0 0 6px #f4d675aa; }
.map-object-voice-door:hover { filter: brightness(1.15); transform: translate(-50%, -50%) scale(1.04); }
.map-object-link, .map-object-media, .map-object-board, .map-object-workstation { cursor: pointer; border-style: solid; box-shadow: 0 4px 12px #0005; }
.map-object-link:hover, .map-object-media:hover, .map-object-board:hover, .map-object-workstation:hover { filter: brightness(1.18); transform: translate(-50%, -50%) scale(1.04); }
.map-object-media::before { content: '▶'; margin-right: 4px; }
.map-object-board::before { content: '▤'; margin-right: 4px; }
.map-object-workstation::before { content: '⌘'; margin-right: 4px; }
.map-object-zone { min-width: 44px; min-height: 44px; border-radius: 50%; border-style: dashed; background: color-mix(in srgb, var(--object-color) 12%, transparent); color: var(--object-color); }
.map-object-animation-float, .map-editor-animation-float { animation: vault-map-float 3s ease-in-out infinite; }
.map-object-animation-pulse, .map-editor-animation-pulse { animation: vault-map-pulse 3s ease-in-out infinite; }
.map-object-animation-blink, .map-editor-animation-blink { animation: vault-map-blink 3s ease-in-out infinite; }
@keyframes vault-map-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes vault-map-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes vault-map-blink { 0%, 75%, 100% { opacity: 1; } 82% { opacity: .25; } }
.map-editor-viewport { position: relative; min-height: 260px; overflow: auto; padding: 10px; border: 1px solid #3d4050; border-radius: 8px; background: #11131a; }
.map-editor-canvas { position: relative; min-width: 520px; transform-origin: top left; background-image: linear-gradient(#ffffff10 1px, transparent 1px), linear-gradient(90deg, #ffffff10 1px, transparent 1px); background-size: 5% 5%; transition: transform .12s ease; }
.map-editor-object { position: absolute; z-index: 2; min-width: 16px; min-height: 16px; transform: translate(-50%, -50%); overflow: hidden; border: 2px solid #fff8; border-radius: 6px; background-size: cover; background-position: center; color: #fff; font-size: 10px; text-shadow: 0 1px 2px #000; cursor: grab; resize: both; }
.map-editor-object.map-furniture { border: 1px dashed #9d94e7; background-color: transparent !important; background-repeat: no-repeat; image-rendering: pixelated; color: transparent; }
.map-editor-object:active { cursor: grabbing; }
.map-editor-resize-handle { position: absolute; right: 1px; bottom: 1px; width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; cursor: nwse-resize; }
.map-editor-lock-info { display: inline-flex; align-items: center; width: fit-content; margin-top: 4px; padding: 4px 8px; border-radius: 999px; background: #2b2e39; color: #b5bac1; font-size: 11px; }
.map-editor-lock-info::before { content: ''; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #23a55a; }
.map-editor-lock-info.own { color: #b7f7cf; }
.map-editor-lock-info.busy { color: #ffb8b8; }
.map-editor-lock-info.busy::before { background: #f23f42; }
.map-editor-viewport > label { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #aeb3c2; font-size: 12px; }
.map-editor-viewport input[type="range"] { width: 160px; }
.map-asset-list { display: grid; gap: 7px; margin-top: 8px; }
.map-asset-row { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 7px; background: #2b2e39; }
.map-asset-row img { width: 32px; height: 32px; object-fit: cover; border-radius: 5px; background: #171922; }
.map-asset-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.map-assets-section, .map-template-section { display: grid; gap: 8px; margin: 18px 0; padding: 14px; border: 1px solid #3d4050; border-radius: 10px; background: #22252f; }
.map-assets-section h3, .map-template-section h3 { margin: 0; }
.map-template-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-template-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; max-height: 420px; overflow: auto; padding: 2px; }
.map-space-template-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 9px; }
.map-space-template-card { display: grid; grid-template-columns: 82px minmax(0, 1fr); min-width: 0; padding: 0; overflow: hidden; border: 1px solid #3d4050; border-radius: 10px; background: #292c36; color: #dbdee1; text-align: left; }
.map-space-template-card:hover, .map-space-template-card.selected { border-color: #8c83d9; background: #30343f; }
.map-space-template-card.selected { box-shadow: 0 0 0 2px #8c83d944; }
.map-space-template-preview { display: grid; grid-template-columns: repeat(2, 22px); grid-auto-rows: 18px; place-content: center; gap: 6px; background: linear-gradient(145deg, color-mix(in srgb, var(--template-accent) 22%, #171a22), #20232c); }
.map-space-template-preview i { border: 1px solid color-mix(in srgb, var(--template-accent) 70%, #fff); border-radius: 3px; background: var(--template-accent); opacity: .82; }
.map-template-card { display: grid; grid-template-rows: 92px auto; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #3d4050; border-radius: 10px; background: #292c36; color: #dbdee1; text-align: left; }
.map-template-card:hover { border-color: #777e91; background: #30343f; }
.map-template-card.selected { border-color: #8c83d9; box-shadow: 0 0 0 2px #8c83d944; }
.map-template-preview { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 25px; gap: 7px; align-content: center; padding: 12px 18px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--template-accent) 18%, #171a22), #252936); }
.map-template-preview::before { content: ''; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--template-accent) 55%, transparent); border-radius: 5px; background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px); background-size: 12px 12px; }
.map-template-preview i { z-index: 1; display: block; border: 2px solid color-mix(in srgb, var(--template-accent) 70%, #fff); border-radius: 3px; background: var(--template-accent); box-shadow: 0 2px 5px #0007; }
.map-template-copy { display: grid; gap: 5px; padding: 10px 11px 12px; }
.map-template-copy strong { color: #f2f3f5; }
.map-template-copy small { min-height: 32px; color: #aeb3bd; line-height: 1.35; }
.map-template-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.map-template-badges em { padding: 3px 6px; border-radius: 999px; background: #1d2028; color: #c7cad1; font-size: 10px; font-style: normal; }
.map-template-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.channel-heading, .header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.channel-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.channel-symbol { color: #9fa5b3; font-size: 25px; line-height: 1; }
#channel-subtitle { margin-left: 7px; padding-left: 15px; border-left: 1px solid #555865; color: #aab0bc; white-space: nowrap; font-size: 12px; }
.header-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; color: #bec3cd; font-size: 23px; }
.header-icon:hover, .header-icon.active { background: #444753; color: white; }
.header-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-icon.map-world-toggle { display: inline-flex; width: auto; min-width: 112px; height: 32px; gap: 7px; padding: 0 10px; border: 1px solid #424651; border-radius: 8px; background: #292c34; color: #d5d8e1; box-shadow: inset 0 1px #ffffff08, 0 1px 2px #0004; font-size: 12px; font-weight: 700; line-height: 1; }
.header-icon.map-world-toggle:hover { border-color: #696e7d; background: #343842; color: #fff; }
.header-icon.map-world-toggle.active { border-color: #736bd0; background: #45416b; color: #fff; box-shadow: inset 0 0 0 1px #a39cff22; }
.header-icon.map-world-toggle svg { width: 17px; height: 17px; flex: none; stroke: #aaa3ff; stroke-width: 1.8; }
.header-icon.map-world-toggle.active svg { stroke: #79e0b9; }
.header-icon.map-world-toggle span { white-space: nowrap; }
.mobile-only { display: none; }
.empty-state { max-width: 360px; margin: auto; color: var(--muted); text-align: center; }
.empty-state h2 { color: var(--text); }
.empty-glyph { color: #b3a8ff; font-size: 56px; }
.channel-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 18px 0 14px; }
.channel-welcome { display: grid; justify-items: start; gap: 5px; margin: auto 24px 18px; max-width: 550px; }
.channel-welcome-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 19px; background: #4b4d5b; color: white; font-size: 35px; }
.channel-welcome h2 { margin: 0; font-size: 26px; }
.channel-welcome p { margin: 0; color: #c1c5cf; line-height: 1.5; }
.message { display: flex; gap: 12px; padding: 8px 22px; overflow-wrap: anywhere; white-space: pre-wrap; }
.message:hover { background: #393c46; }
.message-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #5d5eaa; font-size: 16px; font-weight: 800; }
.message-body { min-width: 0; }
.message-body strong { margin-right: 9px; color: #fbfbfd; font-size: 14px; }
.message-body time { color: #a2a7b3; font-size: 11px; }
.message-body p { margin: 4px 0 0; color: #e2e4e9; line-height: 1.48; }
.message-link { color: #6db8ff; text-decoration: none; }
.message-link:hover { text-decoration: underline; }
.message-attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 320px)); gap: 8px; margin-top: 8px; }
.message-attachment { min-width: 0; overflow: hidden; border: 1px solid #4a4e5a; border-radius: 8px; background: #292b34; }
.message-attachment img, .message-attachment video { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #15161a; }
.attachment-name { display: block; overflow: hidden; padding: 8px 10px; color: #aeb8ff; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; font-size: 11px; }
.message-delete { visibility: hidden; margin-top: 3px; padding: 0; color: #f5abb4; font-size: 11px; }
.message:hover .message-delete, .message-delete:focus-visible { visibility: visible; }
.message-edit { visibility: hidden; margin-top: 3px; margin-right: 12px; padding: 0; color: #b8beff; font-size: 11px; }
.message:hover .message-edit, .message-edit:focus-visible { visibility: visible; }
.message-edited { margin-left: 7px; color: #a2a7b3; font-size: 11px; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; white-space: nowrap; }
.message-reactions button { min-width: 27px; padding: 3px 7px; border: 1px solid #505361; border-radius: 6px; background: #343741; color: #d7dae4; font-size: 12px; }
.message-reactions button:hover, .message-reactions button.selected { border-color: #7b83da; background: #414872; color: white; }
.message-reactions .reaction-add { visibility: hidden; color: #aeb4c5; }
.message:hover .reaction-add, .message-reactions .reaction-add:focus-visible { visibility: visible; }
@media (hover: none) { .message-reactions .reaction-add { visibility: visible; } }
@media (hover: none) { .message-edit, .message-delete { visibility: visible; } }
.load-older { align-self: center; margin: 12px auto 0; padding: 7px 12px; color: #b8beff; background: #30323c; border-radius: 6px; }
.search-empty { padding: 18px 24px; color: #b6bac6; }
.composer { display: flex; align-items: center; gap: 8px; min-height: 50px; margin: 0 18px 18px; padding: 5px 7px 5px 13px; border-radius: 8px; background: #41444e; }
.composer-attach { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: #5a5e69; color: white; cursor: pointer; font-size: 22px; line-height: 1; }
.composer-attach:hover { background: #6b70a2; }
.attachment-preview { display: flex; gap: 8px; overflow-x: auto; margin: 0 18px 8px; padding: 8px; border-radius: 8px; background: #292b33; }
.pending-attachment { display: flex; align-items: center; gap: 8px; min-width: 210px; max-width: 310px; padding: 7px; border-radius: 7px; background: #3b3e48; }
.pending-attachment img, .pending-attachment video { width: 46px; height: 46px; flex: none; border-radius: 5px; object-fit: cover; background: #18191e; }
.pending-attachment span { display: grid; min-width: 0; flex: 1; }
.pending-attachment strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.pending-attachment small { color: #aeb3bf; font-size: 10px; }
.pending-attachment button { color: #ffadb6; font-size: 20px; }
.composer input { flex: 1; min-width: 0; border: 0; outline: none; padding: 8px 4px; background: transparent; color: white; }
.composer input::placeholder { color: #adb2bd; }
.composer .primary { min-width: 76px; }

.call { flex: none; max-height: calc(100dvh - 155px); overflow-y: auto; border-bottom: 1px solid #252831; padding: 16px 22px; background: #282b35; }
.call-top, .call-top > div { display: flex; align-items: center; gap: 10px; }
.call-top { justify-content: space-between; }
.call-top small { color: #afb4bf; }
.call-hint { color: #8d93a1; font-size: 11px; }
.call-top .call-duration { padding: 3px 7px; border-radius: 5px; background: #1f222a; color: #c9d0d8; font-size: 12px; font-variant-numeric: tabular-nums; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px #65d8ae88; }
.media-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-content: start; gap: 10px; overflow: auto; min-height: clamp(150px, 24vh, 270px); max-height: min(58vh, 640px); margin-top: 13px; padding: 8px; border-radius: 9px; background: #202229; }
.voice-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr)); gap: 8px; margin-top: 13px; }
.voice-card { position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 112px; padding: 12px; border: 2px solid transparent; border-radius: 10px; background: #202229; color: #eef0f5; }
.voice-card.speaking { border-color: var(--mint); box-shadow: inset 0 0 0 1px #6de1b52b; }
.voice-card.speaking strong { color: var(--mint); }
.voice-card.sharing small { color: #a9d8f6; }
.voice-card .sharing-label { display: inline-flex; align-items: center; gap: 3px; }
.voice-card .sharing-label svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voice-card .call-avatar { width: 52px; height: 52px; margin: 0; border-width: 3px; font-size: 20px; }
.voice-card-name { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; min-width: 0; }
.voice-card strong { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.voice-card small { position: absolute; right: 8px; top: 7px; color: #b5bac6; font-size: 10px; }
.media-grid:has(video) { min-height: clamp(190px, 29vh, 360px); }
.media-tile { position: relative; min-width: 0; min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #07080a; }
.media-tile video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.media-tile .media-label { position: absolute; left: 8px; bottom: 7px; max-width: calc(100% - 52px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px 7px; border-radius: 5px; background: #111c; font-size: 11px; }
.media-expand { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; background: #111c; color: white; font-size: 19px; }
.media-grid.watching-screen { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; align-content: start; }
.media-grid.watching-screen > .media-tile[data-source="screen"][data-selected="true"] { grid-column: 1 / -1; width: 100%; height: clamp(190px, 42vh, 520px); min-height: 0; max-height: none; aspect-ratio: auto; }
.media-grid.watching-screen > .media-tile[data-source="camera"] { width: min(100%, 260px); }
#media-grid > .media-tile:fullscreen, #media-grid > .media-tile.media-fullscreen-fallback { display: block; position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; min-width: 0; min-height: 0; max-width: none; max-height: none; margin: 0; aspect-ratio: auto; border-radius: 0; overflow: hidden; background: #050506; }
#media-grid > .media-tile:fullscreen > video, #media-grid > .media-tile.media-fullscreen-fallback > video { width: 100%; height: 100%; max-width: none; max-height: none; }
.stream-watch-overlay { position: absolute; z-index: 5; inset: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px; overflow: auto; border: 1px solid #414552; border-radius: 10px; background: radial-gradient(ellipse at center, #333746 0, #17191f 75%); text-align: center; }
.stream-watch-overlay > strong { font-size: 18px; }.stream-watch-overlay > p { margin: 0 0 8px; color: #b5bac1; }
.stream-watch-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
.stream-watch-option { display: grid; justify-items: center; gap: 5px; min-width: 190px; padding: 12px 18px; border: 1px solid #6962bd; border-radius: 9px; background: #4b46a3; color: #fff; }
.stream-watch-option:hover { background: #625bd1; }.stream-watch-option small { color: #e0dfff; }
.stream-watch-cta { font-weight: 800; }
.stream-watch-actions { position: absolute; z-index: 4; top: 16px; left: 16px; display: flex; flex-wrap: wrap; gap: 7px; max-width: calc(100% - 32px); }
.stream-watch-actions button, .stream-picker-back { padding: 7px 10px; border: 1px solid #8c91a0; border-radius: 6px; background: #111d; color: white; font-size: 11px; }
.stream-watch-actions .stream-exit-button, .stream-exit-fullscreen { border-color: #9b4a56; background: #712e38; color: white; }
.stream-picker-back { margin-top: 8px; }
.stream-exit-fullscreen { display: none; }
.media-tile:fullscreen .stream-exit-fullscreen, .media-tile.media-fullscreen-fallback .stream-exit-fullscreen { position: absolute; z-index: 5; top: 12px; left: 12px; display: block; padding: 8px 12px; border-radius: 6px; }
.stream-audio-control { position: absolute; z-index: 3; right: 8px; bottom: 38px; display: flex; align-items: center; gap: 8px; max-width: min(290px, calc(100% - 20px)); padding: 5px 9px; border-radius: 6px; background: #111d; color: #e4e7ed; font-size: 10px; }
.stream-audio-control input { width: clamp(70px, 11vw, 130px); height: 16px; accent-color: #8b82ff; }
.voice-live-tag { flex: none; padding: 3px 6px; border-radius: 4px; background: #da373c; color: white; font-size: 9px; line-height: 1.1; font-weight: 900; letter-spacing: .05em; }
#media-empty { margin: auto; padding: 18px; color: #b5bac6; text-align: center; }
.call-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.call-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 11px; border-radius: 6px; background: #444753; color: #ecedf2; font-size: 12px; font-weight: 650; }
.call-controls button:hover { background: #555967; }
.call-controls button.active { background: #2d6a55; }
.call-controls #mic.active { background: #454753; color: #f1f3f7; }
.call-controls #mic:not(.active) { position: relative; border: 1px solid #9b6bdd; background: #6f4aa8; color: #f0dcff; }
.call-controls #mic:not(.active)::after { content: ""; position: absolute; width: 26px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); }
.call-controls #screen { border: 1px solid #667294; background: #3a4159; color: #e5eaff; }
.call-controls #screen:hover { border-color: #91a3d5; background: #4b5678; }
.call-controls #screen.active { border-color: #7aa8e5; background: #3566a2; color: white; }
.call-controls #leave-call { background: #bb4552; }
.call-controls #leave-call:hover { background: #ce5260; }
.call-controls svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.call-controls #screen .screen-stop-icon { display: none; }
.call-controls #screen.active .screen-start-icon { display: none; }
.call-controls #screen.active .screen-stop-icon { display: block; }
.call-controls button:focus-visible { outline: 2px solid #d8e5ff; outline-offset: 2px; }
.call-members { display: flex; align-items: center; gap: 10px; min-height: 24px; margin-top: 10px; color: #b3b8c4; font-size: 11px; }
.call-avatars { display: flex; align-items: center; padding-left: 5px; }
.call-avatar { width: 25px; height: 25px; display: grid; place-items: center; overflow: visible; margin-left: -5px; border: 2px solid #282b35; border-radius: 50%; background: #5e60a4; color: white; font-size: 10px; font-weight: 700; }
.call-avatar.speaking { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint); }

.member-panel { grid-column: 4; grid-row: 2; min-width: 0; overflow-y: auto; padding: 24px 12px; background: var(--sidebar); }
.member-panel-heading { display: flex; align-items: center; gap: 8px; padding: 0 8px 12px; color: #aeb3be; font-size: 11px; letter-spacing: .08em; }
.member-panel-heading span { color: #858b99; }
.member-list { display: grid; gap: 2px; }
.member { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px; border-radius: 5px; }
.member:hover { background: #383b45; }
.member-avatar { position: relative; width: 33px; height: 33px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #6265ab; color: white; font-weight: 800; }
.member-avatar.in-call { box-shadow: 0 0 0 2px var(--mint); }
.member-info { min-width: 0; display: grid; }
.member-info strong { overflow: hidden; color: #d8dbe4; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.member-info small { color: #9da3b0; font-size: 10px; }
.member-tip { margin: 24px 8px; padding-top: 15px; border-top: 1px solid #41434d; color: #8e94a1; font-size: 11px; line-height: 1.5; }
.app-shell.members-hidden { grid-template-columns: 72px 248px minmax(0, 1fr); }
.members-hidden .member-panel { display: none; }

dialog { width: min(92vw, 430px); padding: 28px; border: 1px solid #606473; border-radius: 12px; background: #30323c; color: white; box-shadow: 0 30px 100px #000b; }
dialog::backdrop { background: #000b; }
dialog h2 { margin: 0 0 8px; }
.emoji-picker-dialog { width: min(92vw, 430px); padding: 18px; }
.emoji-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.emoji-picker-head h2 { margin: 0; font-size: 17px; }
.emoji-picker-head button { width: 30px; height: 30px; border-radius: 6px; color: #c4c8d2; font-size: 23px; }
.emoji-picker-head button:hover { background: #494c58; color: white; }
.emoji-search-label { display: grid; gap: 6px; margin: 16px 0 12px; color: #c5cad5; font-size: 12px; }
.emoji-search-label input { width: 100%; padding: 9px 10px; border: 1px solid #626677; border-radius: 6px; background: #242630; color: white; }
.emoji-categories { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; }
.emoji-categories button { flex: none; padding: 6px 9px; border-radius: 6px; color: #b7bdca; font-size: 12px; }
.emoji-categories button:hover, .emoji-categories button[aria-selected="true"] { background: #4c4f70; color: white; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; min-height: 180px; max-height: min(42vh, 310px); overflow-y: auto; align-content: start; }
.emoji-grid button { display: grid; place-items: center; min-height: 42px; border-radius: 7px; font-size: 25px; }
.emoji-grid button:hover, .emoji-grid button:focus-visible { background: #505365; }
.emoji-grid .muted { grid-column: 1 / -1; }
.profile-image-row { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.profile-image-row > div { display: grid; justify-items: start; gap: 6px; }
.profile-image-row small { color: var(--muted); }
.profile-preview { width: 70px; height: 70px; font-size: 25px; }
.avatar-upload { padding: 8px 10px; border-radius: 6px; background: #484b57; cursor: pointer; }
.banner-preview { height: 108px; margin-top: 16px; border-radius: 8px; background: linear-gradient(130deg, #5b5cab, #252b47); background-position: center; background-size: cover; }
.banner-actions { display: flex; align-items: center; gap: 13px; margin-top: 10px; }
#profile-remove-banner { color: #f5abb4; font-size: 12px; }
.profile-popover { position: fixed; z-index: 40; width: 270px; overflow: hidden; border: 1px solid #515461; border-radius: 10px; background: #242630; color: white; box-shadow: 0 18px 45px #000b; pointer-events: none; }
.popover-banner { height: 80px; background: linear-gradient(130deg, #6664ac, #242945); background-position: center; background-size: cover; }
.popover-main { padding: 0 14px 15px; }
.popover-main .member-avatar { width: 54px; height: 54px; margin-top: -27px; border: 4px solid #242630; font-size: 20px; }
.popover-main strong { display: block; margin-top: 5px; font-size: 16px; }
.popover-main small { color: #afb4bf; }
.popover-main p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #454854; white-space: pre-wrap; font-size: 12px; line-height: 1.4; }
.qr-approval p { color: #c8cbd3; line-height: 1.5; }
#profile-remove-image { color: #f5abb4; padding: 0; font-size: 12px; }
#profile-form > label { display: grid; gap: 6px; margin-top: 12px; color: #d7d9e4; font-weight: 700; }
#profile-form input:not([type=file]), #profile-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; font: inherit; }
.security-settings form { display: grid; gap: 12px; margin-top: 18px; }
.security-settings label { display: grid; gap: 5px; color: #d7d9e4; font-weight: 700; }
.security-settings input { width: 100%; padding: 10px 12px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; font: inherit; }
.security-settings h3 { margin: 24px 0 10px; }
.security-sessions { display: grid; gap: 8px; max-height: 230px; overflow-y: auto; }
.security-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 7px; background: #252730; }
.security-session > div { display: grid; min-width: 0; gap: 3px; }
.security-session small { color: #b6bac6; overflow-wrap: anywhere; }
.security-session button { flex: none; color: #ffb6bd; }
#security-logout-all { margin-top: 14px; }
.management-dialog { width: min(92vw, 500px); max-height: 85vh; overflow-y: auto; }
.social-hub-dialog, .request-inbox-dialog { width: min(1080px, calc(100vw - 64px)); height: min(760px, calc(100vh - 64px)); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid #111214; border-radius: 10px; background: #313338; color: #f2f3f5; box-shadow: 0 24px 70px #000a; }
.social-hub-dialog::backdrop, .request-inbox-dialog::backdrop { background: rgb(17 18 20 / .86); }
.social-hub { display: grid; grid-template-rows: 52px 1fr; height: 100%; }.social-hub-head { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 12px 0 20px; border-bottom: 1px solid #26272b; box-shadow: 0 1px 2px #1118; }.friends-title { padding-right: 16px; border-right: 1px solid #3f4147; font-weight: 700; }.social-hub-head nav { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; }.social-hub-head nav button { flex: none; padding: 7px 10px; border-radius: 4px; color: #b5bac1; }.social-hub-head nav button:hover,.social-hub-head nav button.active { color: #fff; background: #404249; }.social-hub-head nav .add-friend-tab { color: #fff; background: #248046; }.social-hub-head nav .add-friend-tab.active { background: transparent; color: #2dc770; }.social-icon-button { flex: none; width: 34px; height: 34px; margin-left: auto; border-radius: 50%; background: #2b2d31; color: #b5bac1; font-size: 20px; }.social-icon-button + .social-icon-button { margin-left: 0; }.social-hub-content { overflow-y: auto; padding: 28px 30px 48px; }.social-hub-content section { max-width: 900px; }.social-hub-content h2 { margin: 0 0 8px; }.social-hub-content h3 { margin: 24px 0 9px; color: #b5bac1; font-size: 12px; }.friends-search { display: block; font-size: 0; }.friends-search input,.add-friend-search input { width: 100%; padding: 11px 42px 11px 12px; border: 0; border-radius: 4px; outline: 0; background: #1e1f22; color: #dbdee1; font: 14px system-ui; }.add-friend-search { display: flex; gap: 12px; margin: 20px 0 26px; padding: 14px; border: 1px solid #1e1f22; border-radius: 8px; background: #2b2d31; }.add-friend-search button { flex: none; }.social-list { gap: 0; }.social-list > div { min-height: 62px; padding: 10px 8px; border-top: 1px solid #3f4147; border-radius: 0; background: transparent; }.social-list > div:hover { margin: 0 -8px; padding-inline: 16px; border-top-color: transparent; border-radius: 8px; background: #393c41; }.social-list .social-actions button { display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: #2b2d31; color: #b5bac1; }.social-list .social-actions button:hover { color: #fff; }.request-inbox { display: grid; grid-template-rows: auto 1fr; height: 100%; }.request-inbox header { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; border-bottom: 1px solid #26272b; }.request-inbox h2,.request-inbox p { margin: 0; }.request-inbox header p { margin-top: 5px; color: #949ba4; }.request-inbox header button { width: 38px; height: 38px; border-radius: 50%; background: #2b2d31; color: #b5bac1; font-size: 24px; }.request-inbox main { overflow-y: auto; padding: 24px 28px 48px; }.request-inbox-notice { display: grid; gap: 4px; padding: 16px; border-radius: 8px; background: #2b2d31; color: #dbdee1; }.request-inbox-notice span { color: #949ba4; }.request-list > div { padding: 14px 16px; border: 1px solid #3f4147; background: #2b2d31; }.request-list .social-actions button:first-child { padding: 8px 14px; border-radius: 4px; background: #248046; color: #fff; }.request-list .social-actions button:last-child { padding: 8px 14px; border-radius: 4px; background: #4e5058; color: #fff; }
.social-list > div > div { display: grid; grid-template-columns: 42px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 10px; }
.social-list .member-avatar { grid-row: 1 / 3; width: 38px; height: 38px; }
.social-list > div > div strong { align-self: end; }.social-list > div > div small { align-self: start; }
.server-settings-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #313338; color: white; }
.server-settings-dialog::backdrop { background: #313338; }
.server-settings-shell { display: grid; grid-template-columns: minmax(220px, 34vw) minmax(0, 760px) 1fr; min-height: 100%; background: linear-gradient(90deg, #2b2d31 0 34%, #313338 34%); }
.settings-nav { grid-column: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 54px 18px 40px; }
.settings-nav > div, .settings-nav > button { width: min(200px, 100%); }
.settings-nav > div { display: grid; gap: 4px; margin-bottom: 10px; padding: 6px 10px; }
.settings-nav small { color: #949ba4; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.settings-nav strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.settings-nav > button { padding: 7px 10px; border-radius: 4px; color: #b5bac1; text-align: left; }
.settings-nav > button::before { display: inline-block; width: 22px; color: #949ba4; }
.settings-nav > button[data-settings-tab="overview"]::before { content: "◈"; }.settings-nav > button[data-settings-tab="channels"]::before { content: "#"; }.settings-nav > button[data-settings-tab="members"]::before { content: "♟"; }.settings-nav > button[data-settings-tab="invites"]::before { content: "↗"; }.settings-nav > button[data-settings-tab="moderation"]::before { content: "◇"; }.settings-nav > button[data-settings-tab="ownership"]::before { content: "⚠"; }
.settings-nav > button:hover { background: #35373c; color: #dbdee1; }
.settings-nav > button.active { background: #404249; color: white; }
.settings-nav > button[data-settings-tab="ownership"] { margin-top: 10px; padding-top: 13px; border-top: 1px solid #3f4147; border-radius: 0 0 4px 4px; color: #f23f42; }
.settings-content { position: relative; grid-column: 2; min-width: 0; padding: 54px 42px 80px; overflow-y: auto; }
.settings-content > section { display: grid; gap: 14px; }
.settings-content > section > p.muted { margin: -6px 0 10px; color: #b5bac1; }
.settings-content h2 { margin: 0; font-size: 21px; }
.settings-content h3 { margin: 18px 0 0; }
.settings-content label { display: grid; gap: 7px; color: #dbdee1; font-weight: 700; }
.settings-content input:not([type=file]), .settings-content textarea { width: 100%; padding: 10px 12px; border: 1px solid #1e1f22; border-radius: 4px; background: #1e1f22; color: white; font: inherit; resize: vertical; }
.settings-content button:not(.settings-close) { justify-self: start; padding: 9px 13px; border-radius: 4px; background: #4e5058; }
.settings-content .primary { background: var(--brand) !important; }
.settings-content .danger { margin-top: 22px; background: #da373c !important; }
.settings-close { position: fixed; top: 48px; right: max(24px, calc((100vw - 1160px) / 2)); display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid #80848e; border-radius: 50%; color: #b5bac1; font-size: 25px; line-height: 1; }
.settings-close small { position: absolute; top: 42px; color: #949ba4; font-size: 9px; }
.space-banner-preview { height: 170px; border-radius: 8px; background: linear-gradient(135deg, #514aa0, #24283f); background-position: center; background-size: cover; }
.space-icon-settings { display: flex; align-items: center; gap: 16px; }
.space-icon-preview { display: grid; place-items: center; width: 76px; height: 76px; overflow: hidden; border-radius: 24px; background: #5865a8; font-size: 28px; font-weight: 900; background-position: center; background-size: cover; }
.settings-upload { display: inline-flex !important; justify-self: start; padding: 9px 12px; border-radius: 4px; background: #4e5058; cursor: pointer; }
.settings-upload input { display: none; }
.settings-card-list { display: grid; gap: 8px; }
.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 6px; background: #2b2d31; }
.settings-card:hover { background: #35373c; }
.settings-card > div { display: grid; min-width: 0; gap: 3px; }
.settings-card small { color: #949ba4; }
.role-form, .category-settings, .channel-override-section { display: grid; gap: 12px; margin: 16px 0 24px; }
.role-form { grid-template-columns: minmax(0, 1fr) 48px auto auto; align-items: start; }
.role-form > input { min-height: 38px; }
.role-form > input[type="color"] { width: 48px; padding: 2px; }
.role-permission-checks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 8px; }
.role-permission-checks label { font-size: 12px; }
.permission-overrides { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.permission-overrides fieldset { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid #4b4e58; border-radius: 7px; }
.permission-overrides legend { color: #c7c9d3; font-weight: 700; }
.permission-overrides label { display: grid; gap: 4px; min-width: 100px; font-size: 11px; }
.permission-overrides select { min-height: 32px; background: #1e1f22; color: white; border: 1px solid #565a65; border-radius: 4px; }
.category-settings-card { display: grid; grid-template-columns: minmax(0, 1fr); }
.category-settings-card .management-row { display: flex; flex-wrap: wrap; }
.channel-override-section { max-height: 260px; overflow-y: auto; }
@media (max-width: 760px) { .server-settings-shell { grid-template-columns: 130px minmax(0, 1fr); background: linear-gradient(90deg, #2b2d31 0 130px, #313338 130px); } .settings-nav { padding: 30px 8px; } .settings-content { grid-column: 2; padding: 30px 18px 60px; } .settings-close { position: absolute; top: 18px; right: 18px; margin: 0; } }
@media (max-width: 760px) { .social-hub-dialog,.request-inbox-dialog { width: 100vw; height: 100vh; border: 0; border-radius: 0; }.friends-title { display:none; }.social-hub-head { padding-left: 8px; }.social-hub-content,.request-inbox main { padding: 20px 14px 40px; }.social-hub-head nav button { padding-inline: 8px; }.add-friend-search { flex-direction: column; } }
.management-dialog > label, .management-dialog .invite-fields label { display: grid; gap: 5px; margin: 12px 0; color: #d7d9e4; font-weight: 700; }
.management-dialog input { width: 100%; padding: 10px 12px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; font: inherit; }
.management-dialog h3 { margin: 24px 0 4px; }
.management-dialog h3 + p { margin: 0 0 12px; }
.management-dialog > button, .management-dialog section > button { padding: 8px 12px; border-radius: 6px; background: #484b57; color: white; }
.management-dialog .primary { background: var(--brand); }
.management-dialog .danger { margin-top: 24px; background: #783b43; }
.invite-fields, .management-row { display: flex; gap: 10px; }
.invite-fields > label { flex: 1; }
.management-row { margin-top: 22px; }
.management-row button { padding: 8px 12px; border-radius: 6px; background: #484b57; }
.management-list { display: grid; gap: 7px; margin-top: 12px; }
.management-list > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px; border-radius: 6px; background: #252730; }
.management-list > div > div { min-width: 0; overflow-wrap: anywhere; }
.management-list small { display: block; color: #b6bac6; }
.management-list button { color: #ffb6bd; }
.moderation-panel { margin-top: 24px; padding-top: 4px; border-top: 1px solid #555865; }
.moderation-panel > input { margin: 6px 0; }
.moderation-panel > button { margin: 7px 0; }
.channel-privacy-controls { display: grid; gap: 10px; margin: 16px 0; }
.channel-privacy-controls label { display: grid; gap: 6px; color: #d7d9e4; }
.channel-privacy-controls label:first-child { display: flex; align-items: center; }
.channel-privacy-controls input[type=checkbox] { width: auto; margin: 0; }
.management-list .social-actions { display: flex; gap: 10px; flex: none; }
.management-list .social-actions button:first-child { color: #b8beff; }
#dm-policy { width: 100%; padding: 10px 12px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; }
.management-dialog select { width: 100%; padding: 10px 12px; border: 1px solid #595c6b; border-radius: 7px; background: #1e2029; color: white; }
.audio-toggles { display: grid; gap: 8px; margin-top: 16px; }
.audio-toggles label { display: flex; align-items: center; gap: 9px; }
.audio-toggles input { width: auto; margin: 0; }
.audio-volume { width: 100%; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.dialog-actions button:first-child { padding: 10px 15px; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 14px; background: #1b1e27; color: var(--text); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgb(4 5 8 / .76); backdrop-filter: blur(4px); }
.confirm-dialog form { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 24px; }
.confirm-dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); color: #bcb4ff; }
.confirm-dialog-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.confirm-dialog-copy { min-width: 0; }
.confirm-dialog-copy > span { color: #858b9b; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.confirm-dialog-copy h2 { margin: 5px 0 7px; font-size: 20px; letter-spacing: -.025em; }
.confirm-dialog-copy p { margin: 0; color: #b5bac7; line-height: 1.5; overflow-wrap: anywhere; }
.confirm-dialog .dialog-actions { grid-column: 1 / -1; margin-top: 7px; }
.confirm-dialog .dialog-actions button { min-width: 100px; padding: 10px 15px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-4); color: white; }
.confirm-dialog .dialog-actions .primary { border-color: transparent; background: var(--brand); }
.confirm-dialog .dialog-actions .danger { border-color: rgb(240 108 120 / .34); background: #743943; color: #fff; }
.confirm-dialog[data-tone="danger"] .confirm-dialog-mark { background: rgb(240 108 120 / .13); color: #ff9ca6; }

@media (max-width: 1120px) {
  .app-shell, .app-shell.members-hidden { grid-template-columns: 72px 248px minmax(0, 1fr); }
  .member-panel { position: fixed; top: 44px; right: 0; bottom: 0; z-index: 12; width: 245px; box-shadow: -10px 0 30px #0005; }
  .app-shell:not(.members-open) .member-panel { display: none; }
  .app-shell.members-open .member-panel { display: block; }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { min-height: 175px; padding: 30px; }
  .brand-mark { width: 40px; height: 40px; margin-bottom: 14px; font-size: 21px; }
  .auth-art h1 { margin: 8px 0 0; font-size: 31px; }
  .auth-art > p:last-of-type, .auth-orbit, .window-caption { display: none; }
  .auth-card { padding: 28px; }
  .app-shell, .app-shell.members-hidden, .app-shell.personal-home { grid-template-columns: 60px minmax(0, 1fr); }
  .window-bar { padding: 0 10px; }
  .window-brand { min-width: 75px; }
  .desktop-download-top { margin-left: auto; }
  .desktop-download-top span { display: none; }
  .rail { grid-column: 1; padding: 10px 5px; }
  .rail-logo, .space-icons button, .rail-add { width: 44px; height: 44px; }
  .sidebar { position: fixed; top: 44px; left: 60px; bottom: 0; z-index: 13; width: 260px; box-shadow: 10px 0 30px #0007; }
  .app-shell:not(.sidebar-open) .sidebar { display: none; }
  .conversation { grid-column: 2; }
  .mobile-only { display: grid; }
  #channel-subtitle { display: none; }
  .channel-head { padding: 0 9px; }
  .message { padding: 8px 12px; }
  .composer { margin: 0 9px 10px; }
  .call { padding: 10px; }
  .call-top { align-items: flex-start; }
  .call-top > div { display: grid; gap: 3px; }
  .member-panel { top: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; } }

/* Configurações do servidor */
.server-settings-shell { background: linear-gradient(90deg, #202127 0 34%, #292b34 34%); }
.settings-nav { gap: 5px; border-right: 1px solid #ffffff0d; }
.settings-nav > div { margin-bottom: 20px; }
.settings-nav strong { font-size: 16px; color: #f7f7fb; }
.settings-nav > button { padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.settings-nav > button.active { background: #53509c; box-shadow: inset 3px 0 #bcb5ff; }
.settings-nav > button[data-settings-tab="roles"]::before { content: "◆"; }
.settings-content { padding-top: 66px; }
.settings-content > section { max-width: 860px; gap: 18px; }
.settings-content h2 { font-size: 25px; letter-spacing: -.025em; }
.settings-content h3 { font-size: 16px; }
.settings-content > section > p.muted { color: #aeb2c1; line-height: 1.45; }
.settings-content input:not([type=file]), .settings-content textarea, .settings-content select { border: 1px solid #454857; border-radius: 8px; background: #1c1e26; outline: none; }
.settings-content input:focus, .settings-content textarea:focus, .settings-content select:focus { border-color: #958af5; box-shadow: 0 0 0 3px #958af525; }
.settings-content button:not(.settings-close) { border-radius: 7px; transition: background .15s, transform .15s; }
.settings-content button:not(.settings-close):hover { filter: brightness(1.15); }
.settings-content button:not(.settings-close):focus-visible { outline: 2px solid #bcb5ff; outline-offset: 2px; }
.settings-card-list { gap: 10px; }
.settings-card { padding: 14px 16px; border: 1px solid #3d404d; border-radius: 10px; background: #242630; }
.settings-card:hover { border-color: #5f6174; background: #292c38; }
.settings-card strong { color: #f0f1fa; }
.settings-card small { color: #a7adbd; }
.settings-empty { margin: 0; padding: 12px; color: #9ca2b2; font-size: 13px; }
.settings-member-identity { flex: 1; }
.settings-member-roles { display: flex !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; }
.settings-member-roles .role-badge, .settings-member-roles .owner-badge { display: inline-flex; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--role-color, #e6c577), transparent 55%); border-radius: 99px; background: color-mix(in srgb, var(--role-color, #e6c577), transparent 88%); color: var(--role-color, #e6c577); font-size: 11px; font-weight: 700; }
.settings-member-manage { flex: none; }
.role-workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.role-sidebar, .role-detail { min-width: 0; padding: 14px; border: 1px solid #404350; border-radius: 12px; background: #242630; }
.role-sidebar { display: grid; gap: 12px; }
.role-new { width: 100%; background: #625bb3 !important; color: #fff; text-align: left; }
.role-list { display: grid; gap: 4px; }
.settings-content .role-list-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px !important; background: transparent !important; text-align: left; }
.role-list-item:hover, .role-list-item.active { background: #3b3c51 !important; }
.role-list-item.active { box-shadow: inset 3px 0 #a59bff; }
.role-color-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px #ffffff20; }
.role-list-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.role-list-item small { color: #aeb3c5; }
.role-detail { display: grid; gap: 14px; padding: 20px; }
.role-detail > h3 { margin: 0; font-size: 19px; }
.role-form { display: grid; grid-template-columns: minmax(0, 1fr) 94px; gap: 14px; margin: 0; }
.role-form > label { font-size: 12px; color: #bfc3d0; }
.role-form input[type="color"] { width: 100%; height: 42px; padding: 4px; cursor: pointer; }
.role-form h4, .role-members-section h4 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #cbd0df; }
.role-permission-checks { gap: 8px; }
.role-permission-checks label { display: flex; align-items: center; gap: 8px; padding: 11px; border: 1px solid #404351; border-radius: 8px; background: #1d1f28; font-weight: 500; }
.role-permission-checks input[type="checkbox"] { width: auto; margin: 0; accent-color: #9188f5; }
.role-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 4px; }
.role-members-section { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid #414452; }
.role-members-section h4 { margin: 0; }
.role-members-section > p { margin: 0 0 4px; font-size: 12px; }
.role-suggestions, .role-assigned-list { display: grid; gap: 5px; }
.settings-content .role-suggestion { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px !important; border: 1px solid #4a4e60; background: #303342 !important; text-align: left; }
.role-suggestion > span:nth-child(2), .role-member-row > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; flex: 1; }
.role-suggestion small, .role-member-row small { color: #aab0c0; font-size: 11px; }
.role-suggestion-add { color: #a89eff; font-size: 12px; font-weight: 700; }
.role-assigned-list { margin-top: 8px; }
.role-member-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #3e414f; border-radius: 8px; background: #1e2029; }
.role-member-remove { color: #ffb2ba; }
.role-delete { justify-self: start; margin-top: 5px !important; }
.category-settings { padding-top: 14px; border-top: 1px solid #484b59; }
.category-settings h3 { margin: 0; }
.category-settings-card { align-items: stretch; }
.category-settings-card .management-row { margin: 0; }
.permission-overrides fieldset { background: #1d1f28; }
.settings-content .management-row { flex-wrap: wrap; margin-top: 8px; }
.settings-content #space-owner-actions { padding: 20px; border: 1px solid #6e4249; border-radius: 10px; background: #3b292d; }
.settings-content [data-settings-panel="overview"] > label:not(.settings-upload) { padding: 16px; border: 1px solid #414450; border-radius: 10px; background: #242630; }
.space-banner-preview { border: 1px solid #5a527c; border-radius: 12px; }
.space-icon-settings { padding: 12px 0; }
.settings-content [data-settings-panel="invites"] .invite-fields { max-width: 500px; padding: 16px; border: 1px solid #414450; border-radius: 10px; background: #242630; }
.settings-content [data-settings-panel="invites"] .management-list { max-width: 740px; }
.settings-content [data-settings-panel="invites"] .management-list > div, .settings-content [data-settings-panel="moderation"] .management-list > div { border: 1px solid #414450; border-radius: 9px; background: #242630; }
.settings-content [data-settings-panel="moderation"] .moderation-panel { display: grid; gap: 10px; margin-top: 0; border: 0; }
.settings-content [data-settings-panel="moderation"] .moderation-panel h3 { padding-bottom: 8px; border-bottom: 1px solid #414450; }
.settings-content [data-settings-panel="moderation"] .management-list { margin-top: 0; }
.settings-content [data-settings-panel="ownership"] #space-owner-actions h3 { margin-top: 0; }
.settings-filter { max-width: 420px; }
.management-dialog { border: 1px solid #4d4c62; border-radius: 14px; background: #252732; box-shadow: 0 20px 70px #0009; }
.management-dialog h2 { margin-top: 0; }
.management-dialog input, .management-dialog select { border-color: #4a4d5a; border-radius: 8px; }
.management-dialog .channel-privacy-controls, .management-dialog .channel-override-section { padding: 12px; border: 1px solid #414452; border-radius: 10px; background: #20222b; }
.profile-popover { pointer-events: auto; }
.popover-actions { display: flex; gap: 6px; margin-top: 12px; }
.popover-actions button { flex: 1; min-height: 32px; padding: 6px 8px; border-radius: 6px; background: #505396; color: #fff; font-size: 12px; font-weight: 700; }
.popover-actions button:last-child { flex: none; width: 38px; background: #393b4a; }
.popover-actions button:hover { filter: brightness(1.15); }
.person-context-menu { position: fixed; z-index: 85; width: min(265px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; padding: 6px; border: 1px solid #4a4c58; border-radius: 9px; background: #23242c; color: #f1f1f6; box-shadow: 0 18px 48px #000b; }
.person-menu-item { display: block; width: 100%; min-height: 34px; padding: 7px 10px; border-radius: 5px; color: #f1f1f6; text-align: left; font-size: 12px; font-weight: 650; }
.person-menu-item:hover, .person-menu-item:focus-visible { outline: none; background: #5856a2; }
.person-menu-item.danger { color: #ff777e; }
.person-menu-item.danger:hover { color: #fff; background: #a93440; }
.person-menu-divider { height: 1px; margin: 5px 7px; background: #42444f; }
.person-menu-group { position: relative; }
.person-submenu { display: none; max-height: 180px; overflow-y: auto; margin: 0 4px 5px; padding: 4px; border-radius: 6px; background: #181a22; }
.person-menu-group:hover .person-submenu, .person-menu-group.open .person-submenu, .person-menu-group:focus-within .person-submenu { display: block; }
.person-submenu .person-menu-item { padding-left: 14px; }
.dm-state-icon { margin-left: auto; color: #a7a3d9; font-size: 11px; }
@media (max-width: 760px) { .server-settings-shell { background: linear-gradient(90deg, #202127 0 130px, #292b34 130px); } .settings-content { padding-top: 70px; } .role-workspace { grid-template-columns: 1fr; } .role-sidebar { padding: 10px; } .role-list { display: flex; overflow-x: auto; } .role-list-item { min-width: 130px; } .role-form { grid-template-columns: minmax(0, 1fr) 70px; } .settings-card { flex-wrap: wrap; } .map-layout { grid-template-columns: 1fr; } .map-sidebar { display: none; } .map-canvas { min-height: 330px; } .map-toolbar { padding: 12px; } .map-template-filters, .map-template-actions { grid-template-columns: 1fr; } }
/* Comunidade: fóruns, eventos, onboarding e moderação */
.section-actions{display:flex;gap:4px}.section-actions button{position:static!important;display:grid;place-items:center;width:28px;height:28px;padding:5px;border-radius:7px}.section-actions button:hover{background:#3f4147;color:#fff}.section-actions svg{width:17px;height:17px}
.channel-glyph{display:grid;place-items:center}.channel-glyph svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.channel-lock{display:grid;place-items:center;margin-left:auto}.channel-lock svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2}.channel-symbol svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.header-actions .header-icon svg,.settings-nav button svg,.icon-action svg,.event-create button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.header-actions .header-icon{position:relative}.header-actions .header-icon:hover{color:#fff;background:#2b2d31}
.settings-channel-info strong{display:flex;align-items:center;gap:8px}.settings-channel-info strong svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-action{display:inline-flex!important;align-items:center;justify-content:center;gap:7px}.icon-action svg{flex:0 0 auto}.settings-nav button{display:flex;align-items:center;gap:10px}.settings-nav button svg{width:17px;height:17px}.settings-nav button.active svg{stroke:#fff}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #8ea1e1!important;outline-offset:2px}
.forum-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 28px;border-bottom:1px solid var(--border,#2b2d31)}
.forum-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;padding:20px 28px;overflow:auto}
.forum-card{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:145px;padding:18px;text-align:left;background:#232428;border:1px solid #34363c;border-radius:12px;color:#f2f3f5;transition:.15s ease}
.forum-card:hover{background:#2b2d31;border-color:#5865f2;transform:translateY(-1px)}.forum-card h3,.forum-card p{margin:0}.forum-card p{color:#b5bac1;line-height:1.45}.forum-card small{margin-top:auto;color:#949ba4}
.forum-empty{grid-column:1/-1;padding:30px;text-align:center;color:#949ba4;background:#232428;border:1px dashed #3f4147;border-radius:12px}
.community-dialog{width:min(760px,calc(100vw - 30px));max-height:min(820px,calc(100vh - 30px));padding:0;border:1px solid #3f4147;border-radius:14px;background:#1e1f22;color:#f2f3f5;box-shadow:0 20px 60px #0009}
.community-dialog::backdrop{background:#000a}.community-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #34363c}.community-dialog-head h2{margin:3px 0 0}.community-dialog-head small{color:#949ba4}.community-dialog-head button{font-size:24px;background:transparent}
.thread-messages,.event-list{display:flex;flex-direction:column;gap:10px;max-height:520px;padding:20px 24px;overflow:auto}.thread-message{display:grid;grid-template-columns:42px 1fr;gap:12px;padding:12px;border-radius:10px}.thread-message:hover{background:#25262b}.thread-message time{margin-left:10px;color:#949ba4;font-size:12px}.thread-message p{margin:6px 0;white-space:pre-wrap;line-height:1.45}
.thread-reply{display:flex;gap:10px;padding:16px 24px;border-top:1px solid #34363c}.thread-reply input{flex:1}
.event-create{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 24px;border-top:1px solid #34363c}.event-create h3,.event-create textarea{grid-column:1/-1}.event-create input,.event-create textarea{min-height:42px}.event-create button{display:flex;align-items:center;justify-content:center;gap:8px}.event-card{position:relative;padding:18px;background:#25262b;border:1px solid #34363c;border-radius:12px}.event-card h3,.event-card p{margin:8px 0}.event-card .management-row{margin-top:14px}.event-date{display:inline-flex;padding:5px 9px;border-radius:999px;background:#31354a;color:#aebcff;font-weight:700;font-size:12px}
.onboarding-dialog{text-align:center;padding:32px}.onboarding-mark{display:grid;place-items:center;width:70px;height:70px;margin:0 auto 16px;border-radius:22px;background:#5865f2;font-size:34px;font-weight:900}.onboarding-dialog ol{text-align:left;margin:22px 0;padding:18px 18px 18px 42px;background:#25262b;border-radius:12px}.onboarding-dialog li+li{margin-top:10px}.onboarding-accept{display:block;margin:18px 0}
.settings-switch{display:flex!important;align-items:center;gap:10px}.settings-switch input{width:auto!important}.automod-create{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px;padding:16px;background:#232428;border:1px solid #34363c;border-radius:12px}.automod-create label{display:flex;flex-direction:column;gap:7px;color:#b5bac1;font-size:12px;font-weight:700;text-transform:uppercase}.automod-create #automod-value-label{grid-column:1/-1}.automod-create button{justify-self:start}.automod-rule{border-left:3px solid #4e5058}.automod-rule.enabled{border-left-color:#23a55a}.automod-rule-info{display:grid;gap:4px}.automod-status{width:max-content;padding:3px 7px;border-radius:999px;background:#35373c;color:#b5bac1;font-size:11px}.automod-rule.enabled .automod-status{background:#1f4932;color:#8fe0ad}.permission-overrides{max-height:520px;overflow:auto;padding-right:6px}.permission-overrides fieldset{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin-bottom:12px;border-color:#3f4147;border-radius:10px}.permission-overrides legend{padding:0 8px;color:#f2f3f5;font-weight:700}.permission-overrides label{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#b5bac1}.permission-overrides select{width:auto;min-width:96px;border-color:#4e5058}.permission-overrides select[data-decision="ALLOW"]{border-color:#248046;background:#193b29;color:#a8e6bc}.permission-overrides select[data-decision="DENY"]{border-color:#da373c;background:#472326;color:#ffb8ba}.audit-details{display:block;max-width:520px;margin-top:6px;overflow:hidden;text-overflow:ellipsis;color:#949ba4;white-space:nowrap}
@media(max-width:700px){.forum-grid{grid-template-columns:1fr;padding:14px}.event-create{grid-template-columns:1fr}.event-create>*{grid-column:1!important}.automod-create{grid-template-columns:1fr}.automod-create>*{grid-column:1!important}}

/* Vault Obsidian UI ------------------------------------------------------- */
:root {
  --rail: #0c0d12;
  --sidebar: #14161d;
  --main: #1a1c24;
  --raised: #222530;
  --line: #2c303c;
  --text: #f5f4fb;
  --muted: #b1b4c2;
  --soft: #777c8d;
  --brand: #7768f2;
  --brand-strong: #8d80ff;
  --brand-soft: rgb(119 104 242 / .14);
  --mint: #45d483;
  --danger: #f06c78;
  --surface-0: #0c0d12;
  --surface-1: #111319;
  --surface-2: #161820;
  --surface-3: #1c1f28;
  --surface-4: #242733;
  --border-subtle: rgb(255 255 255 / .065);
  --border-strong: rgb(255 255 255 / .12);
  --shadow-lg: 0 24px 70px rgb(0 0 0 / .48);
  --ease-ui: cubic-bezier(.2, .72, .2, 1);
}

html { background: var(--surface-0); }
body { color: var(--text); background: var(--surface-0); font-feature-settings: "cv02", "cv03", "cv04", "cv11"; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; transition: color .16s var(--ease-ui), background-color .16s var(--ease-ui), border-color .16s var(--ease-ui), opacity .16s var(--ease-ui), transform .12s var(--ease-ui); }
button:not(:disabled):active, a[role="button"]:not([aria-disabled="true"]):active { transform: translateY(1px) scale(.985); }
button:disabled { opacity: .42; cursor: not-allowed; }
button[aria-busy="true"] { opacity: .72; cursor: progress; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand-strong) !important; outline-offset: 2px; }
::selection { background: rgb(119 104 242 / .42); color: #fff; }
* { scrollbar-color: #414655 transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: #414655; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #555b6d; }

.primary { min-height: 38px; border: 1px solid rgb(255 255 255 / .12); border-radius: 8px; background: var(--brand); box-shadow: 0 1px 0 rgb(255 255 255 / .12) inset, 0 8px 22px rgb(71 55 190 / .18); color: white; letter-spacing: -.01em; }
.primary:hover { background: var(--brand-strong); box-shadow: 0 1px 0 rgb(255 255 255 / .16) inset, 0 10px 26px rgb(71 55 190 / .28); }
.primary:disabled { box-shadow: none; }
.danger { border-color: rgb(240 108 120 / .28) !important; background: rgb(240 108 120 / .13) !important; color: #ffb8be !important; }
.danger:hover { background: rgb(240 108 120 / .22) !important; color: #ffe7e9 !important; }
.save-confirmed { background: rgb(69 212 131 / .17) !important; border-color: rgb(69 212 131 / .44) !important; color: #a8f0c5 !important; }
.muted { color: var(--muted); }
.eyebrow { color: #a69cff; letter-spacing: .16em; }

#toast { right: 24px; bottom: 24px; width: min(390px, calc(100vw - 48px)); padding: 14px 16px; border: 1px solid var(--border-strong); border-left: 3px solid var(--brand-strong); border-radius: 9px; background: #252833; box-shadow: var(--shadow-lg); color: #f6f5fb; line-height: 1.45; }

/* Login */
.auth-shell { background: var(--surface-1); }
.auth-art { isolation: isolate; background: radial-gradient(circle at 25% 82%, rgb(119 104 242 / .32), transparent 34%), radial-gradient(circle at 78% 18%, rgb(69 212 131 / .1), transparent 25%), #111219; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgb(255 255 255 / .025) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .025) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 88%); }
.auth-art::after { display: none; }
.brand-mark { border: 1px solid rgb(255 255 255 / .14); border-radius: 16px; background: var(--brand); box-shadow: 0 20px 45px rgb(55 42 164 / .35); }
.auth-art h1, .auth-card h2 { letter-spacing: -.045em; }
.auth-card { width: min(100%, 456px); }
.auth-card input, #dialog-input { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-0); }
.auth-card input:hover, #dialog-input:hover { border-color: rgb(255 255 255 / .2); }
.auth-card input:focus, #dialog-input:focus { border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft); outline: 0; }
.desktop-download-auth { border-color: rgb(119 104 242 / .4); border-radius: 8px; background: var(--brand-soft); }
.desktop-download-auth:hover { background: rgb(119 104 242 / .23); }

/* Application frame and navigation */
.app-shell { grid-template-columns: 68px 260px minmax(0, 1fr) 240px; grid-template-rows: 42px minmax(0, 1fr); background: var(--surface-2); }
.app-shell.personal-home { grid-template-columns: 68px 260px minmax(0, 1fr); }
.window-bar { gap: 16px; height: 42px; padding: 0 14px; border-color: var(--border-subtle); background: var(--surface-0); }
.window-brand { min-width: 128px; color: #e9e8f0; font-weight: 700; letter-spacing: -.01em; }
.window-brand-mark { width: 24px; height: 24px; border: 1px solid rgb(255 255 255 / .13); border-radius: 7px; background: var(--brand); box-shadow: 0 5px 14px rgb(83 65 205 / .28); }
.window-caption { color: var(--soft); }
.window-controls button { color: #9a9eac; }
.window-controls button:hover { background: var(--surface-4); color: white; }
.desktop-download-top { border-color: var(--border-strong); background: rgb(255 255 255 / .025); color: #cac6ff; }
.desktop-download-top:hover { border-color: rgb(119 104 242 / .42); background: var(--brand-soft); }

.rail { gap: 8px; padding: 12px 9px; border-right: 1px solid var(--border-subtle); background: var(--surface-0); }
.rail-logo, .space-icons button, .rail-add { width: 46px; height: 46px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--surface-3); color: #d8dae3; box-shadow: 0 5px 14px rgb(0 0 0 / .12); }
.rail-logo { border-color: rgb(119 104 242 / .5); background: var(--brand); color: white; }
.rail-logo:hover, .rail-logo.active, .space-icons button:hover, .space-icons button.active { border-color: rgb(141 128 255 / .55); border-radius: 12px; background: #312c5e; color: white; }
.space-icons button.active { background: var(--brand); box-shadow: 0 8px 22px rgb(65 50 178 / .32); }
.space-icons button.active::before { left: -10px; width: 3px; height: 26px; background: #b8aeff; box-shadow: 0 0 12px #8d80ff; }
.rail-divider { width: 28px; height: 1px; background: var(--border-strong); }
.rail-add { color: var(--mint); }
.rail-add:hover { border-radius: 12px; background: rgb(69 212 131 / .14); color: #8ceeb6; }

.sidebar { border-right: 1px solid var(--border-subtle); background: var(--sidebar); }
.sidebar-head { height: 52px; min-height: 52px; padding: 0 14px; border-color: var(--border-subtle); background: rgb(255 255 255 / .012); box-shadow: none; }
.sidebar-head strong { font-size: 14px; font-weight: 750; letter-spacing: -.015em; }
.sidebar-head #space-settings-open, .sidebar-head #invite { width: 32px; height: 32px; margin-left: 5px; border-radius: 8px; color: #9ca1b1; }
.sidebar-head #space-settings-open:hover, .sidebar-head #invite:hover { border-color: var(--border-strong); background: var(--surface-4); color: white; }
.sidebar-scroll { padding: 13px 8px 18px; }
.sidebar-label, .section-title, .server-category-title { color: #858a9b; font-size: 10px; letter-spacing: .1em; }
.section-title { margin-top: 18px; }
.section-title button, .section-actions button { color: #969bac; }
.section-title button:hover, .section-actions button:hover { background: var(--surface-4); color: white; }
.section-actions button { width: 32px; height: 32px; border: 1px solid transparent; }
.section-actions button:hover { border-color: var(--border-subtle); }
.section-actions button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.server-category-title { border-radius: 5px; }
.server-category-title:hover { background: rgb(255 255 255 / .025); }
.channel-list { gap: 2px; }
.channel-list button { position: relative; min-height: 38px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; color: #aeb2c0; font-size: 13px; font-weight: 600; }
.channel-list button:hover { border-color: var(--border-subtle); background: rgb(255 255 255 / .045); color: #f0eff5; }
.channel-list button.active { border-color: rgb(119 104 242 / .22); background: var(--brand-soft); color: white; }
.channel-list button.active::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: -2px; width: 2px; border-radius: 2px; background: var(--brand-strong); box-shadow: 0 0 9px rgb(141 128 255 / .65); }
.channel-list button.active .channel-glyph { color: #b8aeff; }
.channel-list .channel-glyph { color: #858b9d; }
.social-open { border: 1px solid var(--border-subtle); border-radius: 8px; background: rgb(255 255 255 / .035); color: #d7d4ff; }
.social-open:hover { border-color: rgb(119 104 242 / .3); background: var(--brand-soft); }
.request-count, .unread-badge { background: var(--brand); }

/* Voice and account dock */
.voice-dock { position: relative; gap: 9px; padding: 11px 10px; border-color: var(--border-subtle); background: #111821; }
.voice-dock::before { content: ""; position: absolute; top: -1px; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, var(--mint), transparent 74%); opacity: .7; }
.voice-dock-icon { width: 29px; height: 29px; border: 1px solid rgb(69 212 131 / .25); border-radius: 8px; background: rgb(69 212 131 / .1); }
.voice-dock strong { color: #70dfa0; }
.voice-dock-controls { gap: 6px; }
.voice-dock-controls button { min-height: 34px; border: 1px solid var(--border-subtle); border-radius: 7px; background: var(--surface-4); }
.voice-dock-controls button:hover { border-color: var(--border-strong); background: #303441; }
.voice-dock .dock-leave { border: 1px solid rgb(240 108 120 / .28); border-radius: 7px; background: rgb(240 108 120 / .14); color: #ffadb5; }
.voice-dock .dock-leave:hover { background: rgb(240 108 120 / .26); color: white; }
.presence-menu { border-color: var(--border-strong); border-radius: 10px; background: #20232c; box-shadow: var(--shadow-lg); }
.status-dot { width: 10px; height: 10px; border: 2px solid var(--surface-1); box-shadow: 0 0 0 1px rgb(255 255 255 / .08); }
.status-dot[data-presence="ONLINE"] { background: var(--mint); box-shadow: 0 0 0 1px rgb(69 212 131 / .25), 0 0 10px rgb(69 212 131 / .22); }
.presence-menu button { min-height: 46px; border: 1px solid transparent; border-radius: 7px; }
.presence-menu button:hover { border-color: var(--border-subtle); background: var(--surface-4); }
.presence-menu button .status-dot { width: 12px; height: 12px; border-color: #20232c; }

/* Conversation */
.conversation { background: var(--main); }
.channel-head { height: 52px; min-height: 52px; padding: 0 18px; border-color: var(--border-subtle); background: rgb(18 20 27 / .82); box-shadow: none; backdrop-filter: blur(14px); }
.channel-heading { gap: 9px; }
.channel-heading strong { font-size: 14px; font-weight: 750; letter-spacing: -.012em; }
.header-actions { gap: 5px; }
.header-actions .header-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid transparent; border-radius: 8px; color: #999ead; }
.header-actions .header-icon:hover { border-color: var(--border-subtle); background: var(--surface-4); color: white; }
.messages { padding: 20px 0 14px; }
.message { position: relative; gap: 12px; padding: 7px 24px; }
.message:hover { background: rgb(255 255 255 / .025); }
.message-avatar { width: 38px; height: 38px; border: 1px solid rgb(255 255 255 / .08); background: #554da0; }
.message-body strong { color: #f6f5fa; font-size: 13px; font-weight: 750; }
.message-body time, .message-edited { color: #757b8b; }
.message-body p { color: #d7d9e2; line-height: 1.55; }
.message-link { color: #a9a1ff; }
.message-attachment { border-color: var(--border-subtle); border-radius: 9px; background: var(--surface-1); }
.message-reactions button { border-color: var(--border-subtle); border-radius: 7px; background: var(--surface-3); }
.message-reactions button:hover, .message-reactions button.selected { border-color: rgb(119 104 242 / .48); background: var(--brand-soft); }
.composer { min-height: 54px; margin: 0 20px 18px; padding: 6px 7px 6px 11px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-4); box-shadow: 0 9px 24px rgb(0 0 0 / .13); }
.composer:focus-within { border-color: rgb(119 104 242 / .5); box-shadow: 0 0 0 3px var(--brand-soft), 0 10px 26px rgb(0 0 0 / .18); }
.composer-attach { width: 32px; height: 32px; border: 1px solid var(--border-subtle); background: #303440; color: #c6c9d4; font-size: 20px; }
.composer-attach:hover { border-color: rgb(119 104 242 / .4); background: var(--brand-soft); color: #dcd8ff; }
.composer input { color: #f4f3f8; }
.composer input::placeholder { color: #8f94a3; }

/* Calls and screen sharing */
.call { padding: 16px 20px; border-color: var(--border-subtle); background: #151821; }
.call-top .call-duration { border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface-0); }
.call-controls button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-4); }
.call-controls button:hover { border-color: var(--border-strong); background: #303441; }
.call-controls button.active { border-color: rgb(69 212 131 / .3); background: rgb(69 212 131 / .13); color: #9deabb; }
.call-controls #camera:not(.active), .voice-dock-controls #dock-camera:not(.active) { position: relative; border-color: rgb(141 128 255 / .5); background: rgb(119 104 242 / .18); color: #d8d3ff; }
.call-controls #camera:not(.active)::after, .voice-dock-controls #dock-camera:not(.active)::after { content: ""; position: absolute; width: 26px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 0 5px rgb(141 128 255 / .35); }
.call-controls #leave-call { border-color: rgb(240 108 120 / .32); background: rgb(240 108 120 / .15); color: #ffb3ba; }
.call-controls #leave-call:hover { background: rgb(240 108 120 / .27); color: white; }
.call-avatar.speaking, .voice-member.speaking .voice-member-avatar, .profile.speaking .profile-avatar { box-shadow: 0 0 0 2px var(--mint), 0 0 15px rgb(69 212 131 / .24); }

/* Members */
.member-panel { padding: 20px 10px; border-left: 1px solid var(--border-subtle); background: var(--sidebar); }
.member-panel-heading { padding: 0 10px 10px; color: #9297a7; font-weight: 800; letter-spacing: .1em; }
.member-list { gap: 2px; }
.member { padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; }
.member:hover { border-color: var(--border-subtle); background: rgb(255 255 255 / .035); }
.member-avatar { border: 1px solid rgb(255 255 255 / .08); background: #554da0; }
.member-info strong { color: #dadce5; font-weight: 650; }
.member-tip { border-color: var(--border-subtle); }

/* Dialogs and server settings */
dialog { color: var(--text); }
.management-dialog, .community-dialog, .desktop-update-dialog, .incoming-call-dialog, .client-update-dialog { border: 1px solid var(--border-strong); border-radius: 14px; background: #1b1e27; box-shadow: var(--shadow-lg); }
.management-dialog::backdrop, .community-dialog::backdrop, .desktop-update-dialog::backdrop, .incoming-call-dialog::backdrop, .client-update-dialog::backdrop { background: rgb(4 5 8 / .76); backdrop-filter: blur(4px); }
.management-dialog h2, .community-dialog h2 { letter-spacing: -.03em; }
.management-dialog input, .management-dialog select, .management-dialog textarea, .community-dialog input, .community-dialog select, .community-dialog textarea, .settings-content input:not([type=file]), .settings-content textarea, .settings-content select { min-height: 42px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-0); color: white; }
.management-dialog input:hover, .management-dialog select:hover, .management-dialog textarea:hover, .settings-content input:hover, .settings-content select:hover, .settings-content textarea:hover { border-color: rgb(255 255 255 / .2); }
.management-dialog input:focus, .management-dialog select:focus, .management-dialog textarea:focus, .settings-content input:focus, .settings-content select:focus, .settings-content textarea:focus { border-color: var(--brand-strong); box-shadow: 0 0 0 3px var(--brand-soft); outline: 0; }
.management-dialog > button, .management-dialog section > button, .management-row button, .settings-content button:not(.settings-close) { min-height: 36px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-4); }
.management-dialog > button:hover, .management-dialog section > button:hover, .management-row button:hover, .settings-content button:not(.settings-close):hover { border-color: var(--border-strong); background: #303441; filter: none; }
.management-list > div { border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--surface-2); }

.server-settings-dialog, .server-settings-dialog::backdrop { background: var(--surface-2); }
.server-settings-shell { grid-template-columns: minmax(220px, 32vw) minmax(0, 800px) 1fr; background: linear-gradient(90deg, var(--surface-1) 0 32%, var(--surface-2) 32%); }
.settings-nav { gap: 4px; padding-top: 52px; border-color: var(--border-subtle); }
.settings-nav > div { margin-bottom: 16px; }
.settings-nav small { color: #777d8e; letter-spacing: .11em; }
.settings-nav strong { color: #f5f4f9; letter-spacing: -.015em; }
.settings-nav > button { position: relative; min-height: 39px; padding: 9px 11px; border: 1px solid transparent; border-radius: 7px; color: #aeb2bf; }
.settings-nav > button:hover { border-color: var(--border-subtle); background: rgb(255 255 255 / .035); color: white; }
.settings-nav > button.active { border-color: rgb(119 104 242 / .22); background: var(--brand-soft); box-shadow: none; color: white; }
.settings-nav > button.active::after { content: ""; position: absolute; top: 9px; bottom: 9px; left: -1px; width: 2px; border-radius: 2px; background: var(--brand-strong); }
.settings-nav > button::before { display: none; }
.settings-content { padding: 58px 44px 80px; }
.settings-content > section { gap: 18px; }
.settings-content h2 { color: #f7f6fb; font-size: 25px; letter-spacing: -.04em; }
.settings-content h3 { letter-spacing: -.02em; }
.settings-card, .role-sidebar, .role-detail, .settings-content [data-settings-panel="overview"] > label:not(.settings-upload), .settings-content [data-settings-panel="invites"] .invite-fields { border-color: var(--border-subtle); border-radius: 10px; background: var(--surface-3); }
.settings-card:hover { border-color: var(--border-strong); background: #21242e; }
.settings-close { border-color: #5a6070; color: #9da2b2; transition: border-color .16s, color .16s, transform .16s; }
.settings-close:hover { border-color: #b8aeff; color: white; transform: rotate(4deg); }
.role-list-item:hover, .role-list-item.active { background: var(--brand-soft) !important; }
.role-list-item.active { box-shadow: inset 2px 0 var(--brand-strong); }
.role-permission-checks label, .permission-overrides fieldset { border-color: var(--border-subtle); background: var(--surface-1); }
.person-context-menu { border-color: var(--border-strong); border-radius: 10px; background: #1c1f28; box-shadow: var(--shadow-lg); }
.person-menu-item { border-radius: 6px; }
.person-menu-item:hover, .person-menu-item:focus-visible { background: var(--brand); }

/* Community features */
.forum-toolbar { border-color: var(--border-subtle); }
.forum-card, .event-card { border-color: var(--border-subtle); border-radius: 10px; background: var(--surface-3); }
.forum-card:hover { border-color: rgb(119 104 242 / .5); background: #222530; transform: translateY(-2px); box-shadow: 0 14px 30px rgb(0 0 0 / .18); }
.forum-empty { border-color: var(--border-strong); background: var(--surface-2); }
.community-dialog-head, .thread-reply, .event-create { border-color: var(--border-subtle); }
.thread-message:hover { background: rgb(255 255 255 / .025); }
.event-date { background: var(--brand-soft); color: #beb7ff; }
.onboarding-mark { border: 1px solid rgb(255 255 255 / .12); border-radius: 18px; background: var(--brand); box-shadow: 0 16px 34px rgb(71 55 190 / .25); }
.onboarding-dialog ol, .automod-create { border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-2); }
.automod-rule.enabled { border-left-color: var(--mint); }

/* Premium audio and SVCs settings */
.audio-settings-dialog { width: min(820px, calc(100vw - 32px)); max-height: min(900px, calc(100vh - 32px)); padding: 0; overflow: hidden; }
.audio-settings-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--border-subtle); background: #181b24; }
.audio-settings-head h2 { margin: 2px 0 4px; font-size: 24px; letter-spacing: -.04em; }
.audio-settings-head p { margin: 0; color: var(--muted); font-size: 12px; }
.audio-settings-mark { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgb(119 104 242 / .35); border-radius: 13px; background: var(--brand-soft); color: #b8aeff; box-shadow: 0 12px 26px rgb(54 42 150 / .18); }
.audio-settings-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.svcs-status-badge { align-self: start; padding: 6px 9px; border: 1px solid rgb(119 104 242 / .3); border-radius: 99px; background: var(--brand-soft); color: #c9c3ff; font-size: 10px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.svcs-status-badge[data-mode="deepfilter"] { border-color: rgb(69 212 131 / .35); background: rgb(69 212 131 / .11); color: #8ce9b4; }
.svcs-status-badge[data-mode="native"] { border-color: rgb(240 178 50 / .3); background: rgb(240 178 50 / .09); color: #ebc777; }
.svcs-status-badge[data-mode="disabled"] { border-color: var(--border-subtle); background: var(--surface-4); color: #9297a7; }
.audio-settings-content { display: grid; gap: 12px; max-height: calc(100vh - 210px); padding: 18px 20px 22px; overflow-y: auto; background: var(--surface-2); }
.audio-settings-section { padding: 18px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--surface-3); }
.settings-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-section-heading h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.02em; }
.settings-section-heading p { margin: 0; color: #9297a7; font-size: 12px; line-height: 1.45; }
.audio-device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.audio-device-grid label, .svcs-strength { display: grid; gap: 7px; color: #bfc2ce; font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.audio-device-grid select, .svcs-strength select { width: 100%; min-width: 0; min-height: 42px; padding: 0 35px 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-0); color: white; }
.audio-device-status { margin: 12px 0 0; padding: 9px 11px; border-left: 2px solid var(--brand-strong); background: rgb(119 104 242 / .07); color: #b7bac7; font-size: 11px; line-height: 1.45; }
.svcs-panel { position: relative; overflow: hidden; border-color: rgb(119 104 242 / .22); background: #1b1d2a; }
.svcs-panel::after { content: ""; position: absolute; top: -110px; right: -100px; width: 240px; height: 240px; border-radius: 50%; background: rgb(119 104 242 / .08); filter: blur(12px); pointer-events: none; }
.premium-switch { position: relative; z-index: 1; flex: none; }
.premium-switch input { position: absolute; opacity: 0; pointer-events: none; }
.premium-switch span { position: relative; display: block; width: 44px; height: 24px; border: 1px solid var(--border-strong); border-radius: 99px; background: #303440; cursor: pointer; transition: .18s var(--ease-ui); }
.premium-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #a4a8b5; box-shadow: 0 2px 6px rgb(0 0 0 / .3); transition: .18s var(--ease-ui); }
.premium-switch input:checked + span { border-color: rgb(119 104 242 / .7); background: var(--brand); }
.premium-switch input:checked + span::after { transform: translateX(20px); background: white; }
.premium-switch input:focus-visible + span { outline: 2px solid var(--brand-strong); outline-offset: 3px; }
.svcs-strength { max-width: 390px; margin-top: 16px; }
.svcs-meter { position: relative; z-index: 1; display: flex; align-items: end; gap: 4px; height: 30px; margin-top: 15px; color: #73798a; }
.svcs-meter i { width: 3px; border-radius: 3px; background: var(--brand-strong); box-shadow: 0 0 8px rgb(119 104 242 / .45); }
.svcs-meter i:nth-child(1) { height: 7px; }.svcs-meter i:nth-child(2) { height: 14px; }.svcs-meter i:nth-child(3) { height: 21px; }.svcs-meter i:nth-child(4) { height: 12px; }.svcs-meter i:nth-child(5) { height: 18px; }
.svcs-meter span { margin-left: 7px; font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.audio-settings-section #audio-shortcut-help { margin: 14px 0 0; line-height: 1.5; }
.audio-settings-dialog .audio-toggles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.audio-settings-dialog .audio-toggles > label { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-1); }
.audio-settings-dialog .audio-toggles > label:hover { border-color: var(--border-strong); background: #171a22; }
.audio-settings-dialog .audio-toggles > label > span { display: grid; gap: 3px; }
.audio-settings-dialog .audio-toggles b { color: #e7e7ee; font-size: 12px; }
.audio-settings-dialog .audio-toggles small { color: #7f8494; font-size: 10px; }
.audio-settings-dialog .audio-toggles input { width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.audio-participant-list { margin-top: 12px; }
.audio-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 20px; border-top: 1px solid var(--border-subtle); background: var(--surface-1); }
.audio-settings-footer span { color: #7f8494; font-size: 11px; }
.audio-settings-footer .primary { min-width: 100px; }

/* Status, menções e mídia ampliada */
.section-actions { gap: 8px; margin-right: -2px; }
.section-actions button { width: 30px; height: 30px; padding: 5px; overflow: visible; }
.section-actions button + button { margin-left: 0; }
.section-actions button svg { overflow: visible; }
.composer { position: relative; }
.mention-suggestions { position: absolute; right: 54px; bottom: calc(100% + 8px); left: 44px; z-index: 40; max-height: 300px; overflow-y: auto; padding: 6px; border: 1px solid var(--border-strong); border-radius: 10px; background: #1b1e27; box-shadow: var(--shadow-lg); }
.mention-suggestions button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: #d9dbe4; text-align: left; }
.mention-suggestions button:hover, .mention-suggestions button.selected { background: var(--brand-soft); color: white; }
.mention-avatar { display: grid; width: 32px; height: 32px; flex: none; place-items: center; overflow: hidden; border-radius: 50%; background: #554da0; font-size: 12px; font-weight: 800; }
.mention-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mention-suggestions button > span:last-child { display: grid; min-width: 0; gap: 2px; }
.mention-suggestions strong, .mention-suggestions small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-suggestions small { color: #8f94a3; font-size: 10px; }
.message-mention { display: inline; margin: 0 1px; padding: 1px 3px; border-radius: 4px; background: rgb(119 104 242 / .2); color: #c9c3ff; font: inherit; font-weight: 700; line-height: inherit; vertical-align: baseline; }
button.message-mention { cursor: pointer; }
.message-mention:hover, .message-mention.mentioned-self { background: var(--brand); color: white; text-decoration: none; }
.attachment-image-open { display: block; width: 100%; padding: 0; overflow: hidden; background: #111319; cursor: zoom-in; }
.attachment-image-open img { transition: transform .2s var(--ease-ui), filter .2s var(--ease-ui); }
.attachment-image-open:hover img { transform: scale(1.015); filter: brightness(1.06); }
.attachment-image-open:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: -3px; }
.image-lightbox-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(860px, calc(100vh - 32px)); max-height: none; padding: 52px 18px 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 14px; background: #0b0d12; box-shadow: 0 30px 100px #000d; }
.image-lightbox-dialog::backdrop { background: rgb(2 3 5 / .88); backdrop-filter: blur(8px); }
.image-lightbox-dialog > img { display: block; width: 100%; height: calc(100% - 58px); object-fit: contain; }
.image-lightbox-close { position: absolute; top: 12px; right: 14px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: #242833; color: white; font-size: 24px; line-height: 1; }
.image-lightbox-close:hover { background: #343947; }
.image-lightbox-dialog footer { position: absolute; right: 0; bottom: 0; left: 0; display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-top: 1px solid var(--border-subtle); background: #151821; }
.image-lightbox-dialog footer span { min-width: 0; overflow: hidden; color: #c9ccd6; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-dialog footer a { flex: none; color: #b8aeff; font-weight: 700; text-decoration: none; }
.image-lightbox-dialog footer a:hover { color: white; text-decoration: underline; }

/* Configurações do canal */
.channel-settings-dialog { width: min(900px, calc(100vw - 32px)); max-height: min(900px, calc(100vh - 32px)); padding: 0; overflow: hidden; }
.channel-settings-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px; align-items: center; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--border-subtle); background: #181b24; }
.channel-settings-head h2 { margin: 2px 0 3px; font-size: 23px; letter-spacing: -.04em; }
.channel-settings-head p { margin: 0; color: #8d92a1; font-size: 11px; }
.channel-settings-mark { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgb(119 104 242 / .35); border-radius: 12px; background: var(--brand-soft); color: #b8aeff; }
.channel-settings-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channel-settings-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; color: #a5a9b6; font-size: 22px; }
.channel-settings-close:hover { border-color: var(--border-strong); background: var(--surface-4); color: white; }
.channel-settings-content { display: grid; gap: 12px; max-height: calc(100vh - 190px); padding: 18px 20px 24px; overflow-y: auto; background: var(--surface-2); }
#channel-settings-dynamic { display: grid; gap: 12px; }
.channel-settings-section { padding: 17px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--surface-3); }
.channel-settings-section .settings-section-heading { margin-bottom: 14px; }
.channel-settings-section .settings-section-heading h3 { margin: 0 0 4px; }
.channel-settings-section .settings-section-heading p { margin: 0; color: #898f9f; }
.channel-identity-grid { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(280px, 1.25fr); gap: 10px; }
.channel-settings-section label, .channel-rules-section > label { display: grid; gap: 7px; color: #bfc2ce; font-size: 11px; font-weight: 750; }
.channel-settings-section input:not([type=checkbox]), .channel-settings-section select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-0); color: white; }
.channel-private-toggle { display: flex !important; min-height: 62px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--surface-1); }
.channel-private-toggle > span { display: grid; gap: 4px; }
.channel-private-toggle b { color: #e5e6ec; font-size: 12px; }
.channel-private-toggle small { color: #858b9b; font-weight: 500; }
.channel-private-toggle input { appearance: none; position: relative; width: 42px !important; height: 23px; flex: none; border: 1px solid var(--border-strong); border-radius: 99px; background: #303440; cursor: pointer; }
.channel-private-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #a4a8b5; transition: transform .16s var(--ease-ui); }
.channel-private-toggle input:checked { border-color: var(--brand); background: var(--brand); }
.channel-private-toggle input:checked::after { transform: translateX(19px); background: white; }
.channel-allowed-users { margin-top: 12px; }
.channel-rules-section > label { max-width: 360px; }
.channel-override-section { max-height: none; margin: 17px 0 0; padding-top: 15px; overflow: visible; border-top: 1px solid var(--border-subtle); }
.channel-override-section h4 { margin: 0 0 4px; }
.channel-override-section > p { margin: 0 0 12px; font-size: 11px; }
.channel-override-section .permission-overrides { max-height: 290px; overflow-y: auto; }
.channel-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.channel-settings-actions button { min-height: 38px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-4); color: #c6c9d3; }
.channel-settings-actions .danger { margin-left: auto; border-color: rgb(240 108 120 / .25); background: rgb(240 108 120 / .09); color: #ffabb4; }
.channel-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 20px; border-top: 1px solid var(--border-subtle); background: var(--surface-1); }
.channel-settings-footer span { color: #7f8494; font-size: 11px; }
.channel-settings-footer .primary { min-width: 126px; }

/* Configurações de canal em tela inteira */
.channel-settings-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #202225; box-shadow: none; }
.channel-settings-dialog::backdrop { background: #202225; }
.channel-settings-shell { display: grid; grid-template-columns: minmax(220px, 34vw) minmax(0, 1fr); width: 100%; height: 100%; background: linear-gradient(90deg, #17181d 0 34%, #202126 34%); }
.channel-settings-nav { display: flex; width: min(220px, 100%); min-height: 0; flex-direction: column; justify-self: end; padding: 58px 12px 40px 16px; }
.channel-settings-server { display: grid; gap: 5px; padding: 0 10px 14px; }
.channel-settings-server small { color: #7f8493; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.channel-settings-server strong { overflow: hidden; color: #f0f1f4; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.channel-settings-nav nav { display: grid; gap: 2px; }
.channel-settings-nav nav button, .channel-settings-delete { width: 100%; min-height: 36px; padding: 8px 10px; border-radius: 5px; color: #aeb2bd; font-size: 13px; font-weight: 600; text-align: left; }
.channel-settings-nav nav button:hover, .channel-settings-nav nav button.active { background: #313338; color: white; }
.channel-settings-nav nav button.active { font-weight: 700; }
.channel-settings-nav-separator { height: 1px; margin: 8px 10px; background: #2f3137; }
.channel-settings-delete { color: #e27782; }
.channel-settings-delete:hover { background: #3a2429; color: #ffadb5; }
.channel-settings-main { position: relative; min-width: 0; height: 100%; overflow-y: auto; padding: 58px clamp(64px, 8vw, 120px) 100px 40px; background: #202126; }
.channel-settings-main > section, .channel-settings-footer { width: min(700px, calc(100vw - 330px)); }
.channel-settings-close { position: fixed; top: 54px; right: 32px; z-index: 4; display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid #4e5058; border-radius: 50%; background: transparent; color: #b5bac1; font-size: 23px; line-height: 1; }
.channel-settings-close small { position: absolute; top: 41px; color: #7f8493; font-size: 9px; }
.channel-settings-close:hover { border-color: #737985; background: transparent; color: white; }
.channel-settings-title { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.channel-settings-title h2 { margin: 0 0 5px; color: #f2f3f5; font-size: 20px; letter-spacing: -.02em; }
.channel-settings-title p { margin: 0; color: #949ba4; font-size: 12px; }
.channel-settings-mark { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #2b2d31; color: #b5bac1; box-shadow: none; }
.channel-settings-fields { display: grid; gap: 22px; }
.channel-settings-fields label, .channel-category-section label { display: grid; gap: 8px; color: #b5bac1; font-size: 11px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.channel-settings-fields input, .channel-settings-fields textarea, .channel-category-section select, .channel-allowed-users input { width: 100%; min-height: 42px; padding: 10px 11px; border: 0; border-radius: 4px; outline: 0; background: #111214; color: #dbdee1; font: 14px system-ui; text-transform: none; }
.channel-settings-fields textarea { min-height: 82px; resize: vertical; }
.channel-settings-fields input:focus, .channel-settings-fields textarea:focus, .channel-category-section select:focus, .channel-allowed-users input:focus { box-shadow: 0 0 0 2px #5865f2; }
#channel-settings-general-dynamic { display: grid; gap: 0; margin-top: 32px; }
.channel-settings-section, .channel-category-section, .channel-order { padding: 24px 0; border: 0; border-top: 1px solid #34363c; border-radius: 0; background: transparent; }
.channel-settings-section .settings-section-heading { margin-bottom: 15px; }
.channel-settings-section .settings-section-heading h3, .channel-category-section h3, .channel-order h3, .channel-override-section h3 { margin: 0 0 5px; color: #f2f3f5; font-size: 15px; }
.channel-settings-section .settings-section-heading p, .channel-category-section > p, .channel-order > p, .channel-override-section > p { margin: 0 0 16px; color: #949ba4; font-size: 12px; }
.channel-private-toggle { min-height: 54px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.channel-private-toggle b { color: #dbdee1; font-size: 13px; }
.channel-private-toggle small { color: #949ba4; font-size: 11px; }
.channel-allowed-users { margin-top: 18px; color: #b5bac1; text-transform: uppercase; }
.channel-category-section label { max-width: 360px; }
.channel-order { margin-top: 4px; }
.channel-settings-actions button { min-height: 34px; border: 0; border-radius: 4px; background: #4e5058; color: white; }
.channel-settings-actions button:hover { background: #5d6069; }
.channel-override-section { max-height: none; margin: 0; padding: 0; overflow: visible; border: 0; }
.channel-override-section .permission-overrides { max-height: none; overflow: visible; }
.channel-override-section .permission-overrides fieldset { border: 1px solid #34363c; border-radius: 6px; background: #1b1c20; }
.channel-settings-footer { position: sticky; bottom: 16px; z-index: 3; margin-top: 32px; padding: 10px 12px; border: 0; border-radius: 6px; background: #111214; box-shadow: 0 5px 18px #0007; }
.channel-settings-footer span { color: #b5bac1; }
.channel-settings-footer .primary { min-height: 34px; border-radius: 4px; background: #248046; }
.channel-settings-footer .primary:hover { background: #1a6334; }
@media (hover: none) { .channel-list .voice-channel-chat { opacity: 1; } }
.permission-overrides fieldset { display: grid; grid-template-columns: 1fr; gap: 0; padding: 6px 12px 10px; }
.permission-check-row { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #2f3137; }
.permission-check-row:last-child { border-bottom: 0; }
.permission-check-name { color: #c7cad1; font-size: 12px; }
.permission-check-choices { display: flex; flex: none; align-items: center; gap: 12px; }
.permission-check-choices .permission-choice { display: inline-flex; min-width: auto; align-items: center; justify-content: flex-start; gap: 5px; color: #949ba4; font-size: 10px; cursor: pointer; }
.permission-choice input { width: 15px; height: 15px; margin: 0; accent-color: #5865f2; }
.permission-choice.allow input { accent-color: #23a55a; }
.permission-choice.deny input { accent-color: #da373c; }
.permission-choice:has(input:checked) { color: #f2f3f5; }

/* Focused voice room and compact account controls */
.channel-body.voice-call-view .call {
  display: flex;
  min-height: 0;
  max-height: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 22px 20px;
  border-bottom: 0;
  background: radial-gradient(circle at 50% 18%, rgb(119 104 242 / .08), transparent 34%), #151821;
}
.channel-body.voice-call-view .call-top { flex: none; }
.channel-body.voice-call-view .voice-stage {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-content: center;
  gap: 12px;
  margin: 16px 0;
  overflow: auto;
}
.channel-body.voice-call-view .voice-card {
  min-height: clamp(180px, 28vh, 300px);
  border-radius: 14px;
  background: #1c202a;
  box-shadow: 0 8px 24px rgb(0 0 0 / .16);
}
.channel-body.voice-call-view .voice-card .call-avatar { width: 88px; height: 88px; font-size: 30px; }
.channel-body.voice-call-view .voice-card strong { font-size: 15px; }
.channel-body.voice-call-view .media-grid:not([hidden]) {
  min-height: 240px;
  max-height: none;
  flex: 1.5;
  margin-top: 14px;
}
.channel-body.voice-call-view .media-grid:not([hidden]) + .call-controls { flex: none; }
.channel-body.voice-call-view .call-controls { flex: none; justify-content: center; margin-top: auto; padding-top: 12px; }

.presence-menu .presence-logout { margin-top: 6px; border-top: 1px solid var(--border-subtle); color: #ff8c98; }
.presence-menu .presence-logout:hover { background: rgb(240 108 120 / .12); color: #ffadb5; }

/* Permission editor: one principal at a time */
.permission-workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 500px; max-height: none; padding: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 10px; background: #1b1d25; }
.permission-principals { display: flex; min-width: 0; flex-direction: column; padding: 14px 10px; border-right: 1px solid var(--border-subtle); background: #171920; }
.permission-principals > strong { padding: 0 5px; color: #f0f1f5; font-size: 13px; }
.permission-principals > small { padding: 3px 5px 11px; color: #858b9a; font-size: 10px; }
.permission-principals > input { min-height: 36px; margin-bottom: 9px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: 6px; background: #0f1117; color: white; }
.permission-principal-list { display: grid; align-content: start; gap: 2px; overflow-y: auto; }
.settings-content .permission-principal { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 43px; padding: 5px 7px; border-radius: 6px; background: transparent; color: #b7bbc7; text-align: left; }
.settings-content .permission-principal:hover, .settings-content .permission-principal.active { background: #2d303a; color: white; }
.settings-content .permission-principal.active { box-shadow: inset 2px 0 var(--brand-strong); }
.permission-principal .member-avatar, .permission-principal-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #303440; font-size: 12px; }
.permission-principal > span:nth-child(2) { display: grid; min-width: 0; }
.permission-principal strong, .permission-principal small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permission-principal strong { font-size: 11px; }
.permission-principal small { color: #7f8594; font-size: 9px; }
.permission-count { min-width: 19px; padding: 3px 5px; border-radius: 99px; background: var(--brand-soft); color: #c9c3ff; font-size: 9px; text-align: center; }
.permission-detail { min-width: 0; padding: 18px 20px; }
.permission-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.permission-detail-head > div { display: grid; gap: 3px; }
.permission-detail-head strong { color: #f2f3f5; font-size: 16px; }
.permission-detail-head small { color: #858b99; }
.settings-content .permission-reset { padding: 7px 9px; color: #aeb3c1; background: transparent; }
.settings-content .permission-reset:hover { background: #30333d; color: white; }
.permission-help { margin: 0 0 10px; color: #858b99; font-size: 10px; line-height: 1.45; }
.permission-matrix { border-top: 1px solid var(--border-subtle); }
.permission-matrix .permission-check-row { min-height: 45px; }

/* Ownership transfer */
.settings-content #space-owner-actions.ownership-workspace { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-3); }
.ownership-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; }
.ownership-heading h3, .ownership-heading p { margin: 0; }
.ownership-heading p { margin-top: 4px; color: #969baa; font-size: 11px; line-height: 1.45; }
.ownership-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgb(119 104 242 / .3); border-radius: 10px; background: var(--brand-soft); color: #c3bcff; font-size: 21px; }
.ownership-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-1); }
.ownership-current span { color: #8d93a2; font-size: 11px; }
.ownership-current strong { overflow: hidden; color: #e5e6ec; text-overflow: ellipsis; white-space: nowrap; }
.ownership-member-select { display: grid; gap: 7px; color: #b8bdc9; font-size: 11px; font-weight: 750; }
.ownership-member-select select { width: 100%; min-height: 42px; }
.ownership-target-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgb(119 104 242 / .3); border-radius: 8px; background: var(--brand-soft); }
.ownership-target-preview .member-avatar { width: 34px; height: 34px; }
.ownership-target-identity { display: grid; min-width: 0; flex: 1; }
.ownership-target-preview small { color: #aaa5d0; }
.ownership-arrow { color: #bdb5ff; font-size: 20px; }
.ownership-confirm { display: flex !important; align-items: center; gap: 10px; color: #d4d6de; cursor: pointer; }
.ownership-confirm input { width: 17px !important; height: 17px; flex: none; accent-color: var(--brand); }
.ownership-confirm > span { display: grid; gap: 2px; }
.ownership-confirm small { color: #8e94a2; font-weight: 500; }
.settings-content #space-settings-transfer { justify-self: start; min-height: 38px; padding: 0 13px; }
.ownership-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 16px 20px; border: 1px solid rgb(240 108 120 / .28); border-radius: 10px; background: rgb(240 108 120 / .06); }
.ownership-danger-zone > div { display: grid; gap: 3px; }
.ownership-danger-zone small { color: #a58d93; }

/* Onboarding workspace */
.onboarding-settings-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.onboarding-settings-head h2, .onboarding-settings-head p { margin: 0; }
.onboarding-settings-head p { margin-top: 4px; color: #9298a7; font-size: 11px; }
.onboarding-settings-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--brand); color: white; font-size: 21px; box-shadow: 0 10px 25px rgb(71 55 190 / .24); }
.onboarding-status { padding: 5px 9px; border-radius: 99px; background: #30333c; color: #949aa8; font-size: 10px; font-weight: 800; }
.onboarding-status.active { background: rgb(69 212 131 / .12); color: #72dda0; }
.onboarding-master-switch { display: flex !important; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-3); }
.onboarding-master-switch > span { display: grid; gap: 3px; }
.onboarding-master-switch small { color: #8d93a2; font-weight: 500; }
.onboarding-master-switch input { appearance: none; position: relative; width: 42px !important; height: 23px; flex: none; border-radius: 99px; background: #363a45; cursor: pointer; }
.onboarding-master-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #a4a9b6; transition: transform .16s var(--ease-ui); }
.onboarding-master-switch input:checked { background: var(--brand); }
.onboarding-master-switch input:checked::after { transform: translateX(19px); background: white; }
.onboarding-steps { display: grid; gap: 10px; }
.onboarding-step { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 13px; padding: 17px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-3); }
.onboarding-step-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--brand-soft); color: #c7c1ff; font-size: 11px; font-weight: 850; }
.onboarding-step-content { display: grid; min-width: 0; gap: 10px; }
.onboarding-step-content header { display: grid; gap: 3px; }
.onboarding-step-content header strong { color: #ecedf2; }
.onboarding-step-content header small { color: #898f9e; }
.onboarding-step-content textarea { width: 100%; resize: vertical; }
.onboarding-counter { justify-self: end; color: #777d8c; font-size: 9px; }
.onboarding-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.onboarding-role-option { display: grid !important; grid-template-columns: 17px 12px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-1); cursor: pointer; }
.onboarding-role-option:has(input:checked) { border-color: rgb(119 104 242 / .5); background: var(--brand-soft); }
.onboarding-role-option input { width: 15px !important; height: 15px; margin: 0; accent-color: var(--brand); }
.onboarding-role-option > span:last-child { display: grid; min-width: 0; }
.onboarding-role-option strong, .onboarding-role-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-role-option small { color: #848a99; font-weight: 500; }
.onboarding-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid var(--border-subtle); border-radius: 9px; background: #11141c; box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.onboarding-footer > div { display: grid; gap: 2px; }
.onboarding-footer small { color: #7f8594; }
.onboarding-footer button { flex: none; }

@media (max-width: 760px) {
  .permission-workspace { grid-template-columns: 1fr; }
  .permission-principals { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .permission-principal-list { display: flex; max-height: 150px; overflow: auto; }
  .settings-content .permission-principal { min-width: 150px; }
  .onboarding-role-grid { grid-template-columns: 1fr; }
  .ownership-danger-zone, .onboarding-footer { align-items: stretch; flex-direction: column; }
}

/* Eventos agendados */
#events-dialog { width: min(1000px, calc(100vw - 32px)); max-width: none; }
.events-dialog-head { padding: 21px 24px; background: #181b24; }
.events-dialog-head p { margin: 5px 0 0; color: #898f9f; font-size: 11px; }
.events-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); min-height: 520px; max-height: calc(100vh - 150px); background: var(--surface-2); }
.events-readonly .events-workspace { grid-template-columns: 1fr; }
.events-browse { min-width: 0; border-right: 1px solid var(--border-subtle); }
.events-readonly .events-browse { border-right: 0; }
.events-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 5px; }
.events-section-title h3 { margin: 4px 0 0; font-size: 17px; }
.events-count { padding: 5px 8px; border: 1px solid var(--border-subtle); border-radius: 99px; background: var(--surface-3); color: #999eac; font-size: 10px; font-weight: 750; }
#events-dialog .event-list { gap: 9px; max-height: calc(100vh - 235px); padding: 14px 20px 24px; }
#events-dialog .event-card { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 14px; padding: 14px; border-color: var(--border-subtle); background: var(--surface-3); }
#events-dialog .event-card:hover { border-color: var(--border-strong); background: #222530; }
.event-calendar { display: grid; align-self: start; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--surface-1); text-align: center; }
.event-calendar span { padding: 5px 3px; background: var(--brand); color: white; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.event-calendar strong { padding-top: 6px; color: #f4f3f8; font-size: 22px; line-height: 1; }
.event-calendar small { padding: 5px 3px 7px; color: #9196a5; font-size: 10px; }
.event-details { min-width: 0; }
.event-meta { display: flex; align-items: center; gap: 8px; color: #858b9a; font-size: 10px; }
.event-status { color: #aca4ff; font-weight: 850; letter-spacing: .07em; }
.event-details h3 { margin: 6px 0 4px; font-size: 15px; }
.event-details p { margin: 0 0 7px; color: #a9adba; line-height: 1.45; }
.event-location { display: block; overflow: hidden; color: #aaa2ff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
a.event-location:hover { color: white; text-decoration: underline; }
.event-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.event-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: 7px; background: var(--surface-4); }
.event-actions .primary { border-color: rgb(119 104 242 / .5); background: var(--brand-soft); color: #d4cfff; }
.event-actions .danger { margin-left: auto; border-color: transparent; background: transparent; color: #de8f99; }
#events-dialog .event-create { display: flex; flex-direction: column; gap: 12px; padding: 20px; overflow-y: auto; border-top: 0; background: var(--surface-1); }
#events-dialog .event-create[hidden] { display: none; }
.event-create-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 3px; }
.event-create-heading h3 { margin: 3px 0 0; }
.event-create-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgb(119 104 242 / .35); border-radius: 10px; background: var(--brand-soft); color: #beb7ff; font-size: 22px; }
#events-dialog .event-create label { display: grid; gap: 6px; color: #b9bdc9; font-size: 10px; font-weight: 750; }
#events-dialog .event-create input, #events-dialog .event-create textarea { width: 100%; min-height: 41px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-0); color: white; resize: vertical; }
#events-dialog .event-create button { min-height: 40px; margin-top: 2px; border-radius: 8px; }
#events-dialog .event-create > small { color: #777d8d; line-height: 1.4; text-align: center; }

@media (max-width: 1120px) {
  .app-shell, .app-shell.members-hidden { grid-template-columns: 68px 260px minmax(0, 1fr); }
  .member-panel { top: 42px; }
}
@media (max-width: 760px) {
  .app-shell, .app-shell.members-hidden, .app-shell.personal-home { grid-template-columns: 58px minmax(0, 1fr); }
  .rail { padding-inline: 6px; }
  .rail-logo, .space-icons button, .rail-add { width: 44px; height: 44px; }
  .sidebar { top: 42px; left: 58px; width: min(280px, calc(100vw - 58px)); }
  .conversation { grid-column: 2; }
  .channel-head { padding-inline: 10px; }
  .message { padding-inline: 13px; }
  .composer { margin: 0 10px 10px; }
  .server-settings-shell { grid-template-columns: 128px minmax(0, 1fr); background: linear-gradient(90deg, var(--surface-1) 0 128px, var(--surface-2) 128px); }
  .settings-nav { padding-inline: 8px; }
  .settings-nav > button { font-size: 12px; }
  .settings-content { padding: 62px 18px 50px; }
  .audio-settings-head { grid-template-columns: 42px minmax(0, 1fr); padding: 18px; }
  .audio-settings-mark { width: 40px; height: 40px; }
  .svcs-status-badge { grid-column: 1 / -1; justify-self: start; }
  .audio-device-grid, .audio-settings-dialog .audio-toggles { grid-template-columns: 1fr; }
  .audio-settings-content { padding: 12px; }
  .channel-identity-grid { grid-template-columns: 1fr; }
  .events-workspace { grid-template-columns: 1fr; overflow-y: auto; }
  .events-browse { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  #events-dialog .event-list { max-height: none; }
  .channel-settings-shell { grid-template-columns: 132px minmax(0, 1fr); background: linear-gradient(90deg, #17181d 0 132px, #202126 132px); }
  .channel-settings-nav { width: 132px; padding: 52px 7px 30px; }
  .channel-settings-server { padding-inline: 7px; }
  .channel-settings-main { padding: 52px 18px 90px; }
  .channel-settings-main > section, .channel-settings-footer { width: 100%; }
  .channel-settings-close { position: absolute; top: 12px; right: 14px; }
  .channel-settings-close small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  button:not(:disabled):active, a[role="button"]:not([aria-disabled="true"]):active { transform: none; }
}
