:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  --bg: #101218;
  --rail: #0c0e13;
  --panel: #171a22;
  --panel2: #1d212b;
  --border: #292e3a;
  --text: #f0f2f7;
  --muted: #9299a9;
  --accent: #7c6cf2;
  --accent2: #9b8cff;
  --green: #49d49d;
  --danger: #ff737c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.platform-windows body,
.platform-windows button,
.platform-windows input,
.platform-windows textarea,
.platform-windows select {
  font-family: "Segoe UI Variable", "Segoe UI", "DM Sans", sans-serif;
  -webkit-font-smoothing: auto;
}
.avatar,
.server-icon {
  image-rendering: auto;
  backface-visibility: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.primary {
  border: 0 !important;
  background: var(--accent) !important;
  color: white !important;
  font-weight: 700;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 20%, #31285f 0, transparent 30%),
    radial-gradient(circle at 75% 75%, #183f43 0, transparent 28%), var(--bg);
}
.login-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #171a22ee;
  box-shadow: 0 30px 80px #0007;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  background: #07152d;
  font-weight: 800;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eyebrow {
  margin: 25px 0 4px !important;
  color: var(--accent2) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.login-card h1 {
  margin: 0;
  font-size: 34px;
}
.login-card > p {
  color: var(--muted);
}
.login-card label,
dialog label {
  display: block;
  margin: 14px 0 7px;
  color: #c9cdd6;
  font-size: 12px;
  font-weight: 600;
}
.login-card input,
dialog input,
.composer input,
.composer textarea {
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  background: #10131a;
  color: var(--text);
}
.login-card input,
dialog input {
  display: block;
  margin-top: 7px;
  padding: 13px;
  border-radius: 9px;
}
.login-card input:focus,
dialog input:focus,
.composer input:focus,
.composer textarea:focus {
  border-color: var(--accent);
}
.login-card .remember-login {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}
.login-card .remember-login input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.login-card .remember-login span {
  line-height: 1;
}
.login-card > button {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  border-radius: 9px;
}
.auth-tabs {
  display: flex;
  gap: 5px;
  margin: 22px 0 12px;
  padding: 4px;
  border-radius: 10px;
  background: #10131a;
}
.auth-tabs button {
  flex: 1;
  padding: 9px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
}
.auth-tabs button.active {
  background: var(--panel2);
  color: var(--text);
}
.form-error {
  color: var(--danger) !important;
  font-size: 12px;
}
.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 76px 250px minmax(400px, 1fr) 230px;
}
.app.direct-layout {
  grid-template-columns: 76px 250px minmax(400px, 1fr) 0;
}
.server-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 12px 8px;
  background: var(--rail);
  overflow-y: auto;
}
.server-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background-color: var(--panel2);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #d7d9e0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-icon-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: visible;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  transition: opacity 140ms ease, transform 140ms ease;
}
.server-icon-wrap:active {
  cursor: grabbing;
}
.server-icon-wrap.server-dragging {
  opacity: 0.35;
  transform: scale(0.92);
}
.server-icon-wrap.server-drop-before::before,
.server-icon-wrap.server-drop-after::after {
  content: "";
  position: absolute;
  z-index: 5;
  left: 3px;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: #3b82f6;
  box-shadow: 0 0 9px rgb(59 130 246 / 70%);
  pointer-events: none;
}
.server-icon-wrap.server-drop-before::before {
  top: -6px;
}
.server-icon-wrap.server-drop-after::after {
  bottom: -6px;
}
.notification-badge {
  position: absolute;
  z-index: 3;
  right: -6px;
  top: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--rail);
  border-radius: 10px;
  background: #e5485d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.server-icon-wrap > .notification-badge {
  right: -7px;
  top: -5px;
}
.server-icon.home {
  overflow: visible;
}
.server-icon.home img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  pointer-events: none;
}
.server-icon:hover,
.server-icon.active {
  border-radius: 16px;
  background-color: var(--accent);
  color: #fff;
}
.server-icon.add {
  color: var(--green);
  font-size: 25px;
}
.server-icon.add:hover {
  background: var(--green);
  color: #10211b;
}
.rail-divider {
  width: 32px;
  height: 1px;
  background: var(--border);
}
.server-rail #server-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  width: 48px;
  gap: 9px;
}
.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--panel);
}
.sidebar-header,
.content-header {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header {
  justify-content: space-between;
  flex: 0 0 64px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--panel2);
  color: var(--text);
}
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.server-icon-input {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.sidebar-content {
  flex: 1;
  min-height: 0;
  padding: 12px 8px;
  overflow-y: auto;
}
.side-action {
  width: 100%;
  display: flex;
  gap: 9px;
  margin: 3px 0;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  text-align: left;
}
.side-action:hover,
.side-action.active {
  background: var(--panel2);
  color: var(--text);
}
.side-action.accent {
  color: var(--accent2);
}
.direct-friend {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  text-align: left;
}
.direct-friend > span:not(.notification-badge) {
  flex: 1;
  min-width: 0;
}
.direct-friend > .notification-badge,
.channel > .notification-badge {
  position: static;
  flex: 0 0 auto;
  border-color: var(--panel);
}
.server-context-menu {
  position: fixed;
  z-index: 100;
  width: 210px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel2);
  box-shadow: 0 16px 40px #0008;
}
.server-context-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  text-align: left;
}
.server-context-menu button:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}
.server-context-menu button.danger {
  color: #ff6679;
}
.server-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.volume-context-menu {
  position: fixed;
  z-index: 101;
  width: 236px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel2);
  box-shadow: 0 16px 40px #0008;
}
.volume-context-menu strong,
.volume-context-menu small {
  display: block;
}
.volume-context-menu strong {
  color: var(--text);
  font-size: 13px;
}
.volume-context-menu small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.volume-context-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.volume-context-menu input[type="range"] {
  min-width: 0;
  flex: 1;
  accent-color: var(--accent);
}
.volume-context-menu output {
  min-width: 38px;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.context-divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--border);
}
.direct-friend:hover,
.direct-friend.active {
  background: var(--panel2);
  color: var(--text);
}
.direct-friend .avatar {
  flex-basis: 29px;
  height: 29px;
  border-radius: 9px;
  font-size: 10px;
}
.direct-friend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 6px 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.section-heading button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
}
.channel,
.voice-channel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  text-align: left;
}
.channel:hover,
.channel.active,
.voice-channel:hover {
  background: var(--panel2);
  color: var(--text);
}
.channel .label::before {
  content: "#";
  margin-right: 9px;
  color: #6f7686;
  font-size: 18px;
}
.voice-channel .label::before {
  content: "◖";
  margin-right: 9px;
  color: #7f8798;
}
.voice-count {
  padding: 1px 6px;
  border-radius: 20px;
  background: #292e3a;
  font-size: 10px;
}
.voice-person {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 8px 4px 29px;
  padding: 1px 3px;
  border-radius: 6px;
  color: #aeb4c2;
  font-size: 11px;
  transition:
    color 0.12s,
    background 0.12s;
  cursor: pointer;
}
.voice-person:hover {
  background: var(--panel2);
}
.voice-avatar {
  flex: 0 0 25px !important;
  width: 25px !important;
  height: 25px !important;
  min-width: 25px;
  min-height: 25px;
  border-radius: 5px;
  font-size: 6px;
}
.voice-person-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.1;
}
.voice-person-copy strong,
.voice-person-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-person-copy strong {
  font-size: 11px;
  font-weight: 600;
}
.voice-person-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
}
.voice-person.speaking {
  color: var(--green);
  font-weight: 700;
  text-shadow: 0 0 10px #49d49d44;
}
.voice-person.speaking .voice-person-copy small {
  color: #8ce8c1;
}
.screen-share-person {
  border-left: 2px solid var(--accent2);
  background: #191a2b;
}
.screen-share-person:hover {
  background: #242442;
}
.screen-share-avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #347ef1, #2454a6);
  color: #e3edff;
  font-size: 15px;
}
.voice-flags {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--muted);
}
.voice-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-status {
  flex: 0 0 auto;
  padding: 12px 10px 10px;
  border-top: 1px solid var(--border);
  background: #11151c;
}
.voice-connection-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}
.connection-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid #347a60;
  border-radius: 9px;
  color: var(--green);
  font-size: 19px;
}
.voice-connection-copy {
  min-width: 0;
  flex: 1;
}
.voice-connection-copy strong,
.voice-connection-copy span,
.voice-connection-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-connection-copy strong {
  color: var(--green);
  font-size: 12px;
}
.voice-connection-copy span {
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.voice-connection-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}
.voice-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.voice-actions button {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  min-height: 32px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--muted);
}
.voice-actions button .voice-icon {
  width: 17px;
  height: 17px;
}
.voice-actions button.muted {
  color: var(--text);
  background: var(--panel2);
}
.voice-actions button.sharing,
.stage-call-controls button.sharing {
  border-color: var(--green);
  background: #17372d;
  color: var(--green);
}
.voice-actions .leave-call {
  flex: 1;
  color: #c8ccd6;
  font-size: 10px;
}
.profile {
  display: flex;
  align-items: center;
  flex: 0 0 68px;
  gap: 8px;
  min-height: 68px;
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  background: #10131a;
  cursor: pointer;
  transition: background 0.18s ease;
}
.profile:hover,
.profile:focus-visible,
.profile.account-menu-open {
  background: #171b24;
  outline: none;
}
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  height: 35px;
  border-radius: 11px;
  background: #4c5366 center/cover no-repeat;
  font-size: 12px;
  font-weight: 700;
}
.own-avatar-wrap {
  position: relative;
  flex: 0 0 37px;
}
.own-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border: 3px solid #10131a;
  border-radius: 50%;
  background: var(--green);
}
.own-presence.dnd {
  background: var(--danger);
}
.own-presence.invisible {
  background: #6e7585;
}
.profile-copy {
  min-width: 0;
  flex: 1;
}
.profile strong,
.profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.profile-settings-button {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.profile-settings-button svg,
.settings-logout svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-settings-button:hover {
  transform: translateY(-1px);
  background: var(--panel2);
  color: var(--text);
}
.profile.account-menu-open .profile-settings-button svg {
  transform: rotate(180deg);
}
.profile-settings-button svg {
  transition: transform 0.2s ease;
}
.account-popover {
  position: absolute;
  z-index: 120;
  left: 10px;
  bottom: 76px;
  width: min(360px, calc(100vw - 100px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #11141b;
  box-shadow: 0 24px 70px #000a;
  transform-origin: left bottom;
  animation: account-popover-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes account-popover-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.account-popover-banner {
  height: 104px;
  background: var(--accent);
}
.account-popover-body {
  position: relative;
  padding: 52px 14px 14px;
}
.account-popover-avatar {
  position: absolute;
  top: -48px;
  left: 18px;
  width: 88px;
  height: 88px;
  border: 7px solid #11141b;
  border-radius: 28px;
  font-size: 25px;
}
.account-popover-identity {
  padding: 0 8px 12px;
}
.account-popover-identity strong,
.account-popover-identity span {
  display: block;
}
.account-popover-identity strong {
  font-size: 22px;
  line-height: 1.15;
}
.account-popover-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.account-popover-identity p {
  margin: 15px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.account-popover-menu {
  margin-top: 10px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel2);
}
.account-popover-menu > button,
.account-status-wrap > button,
.account-switch-wrap > button,
.account-status-options button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}
.account-popover-menu > button:hover,
.account-status-wrap > button:hover,
.account-switch-wrap > button:hover,
.account-status-options button:hover {
  background: #ffffff0b;
}
.account-popover-menu > button:active,
.account-status-wrap > button:active,
.account-switch-wrap > button:active,
.account-status-options button:active {
  transform: scale(0.985);
}
.account-popover-menu > button + button {
  border-top: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
}
.account-popover-menu > button + .account-status-wrap {
  border-top: 1px solid var(--border);
}
.account-switch-wrap + button {
  border-top: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
}
.account-popover-menu svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}
.account-popover-menu button > span:not(.account-status-dot) {
  flex: 1;
}
.account-switch-wrap {
  position: relative;
}
.account-status-wrap > button,
.account-switch-wrap > button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 650;
}
.account-status-wrap > button {
  border-radius: 0 0 9px 9px;
}
.account-status-wrap > button[aria-expanded="true"] {
  background: #ffffff0b;
}
.account-switch-wrap > button[aria-expanded="true"] {
  background: #ffffff0b;
}
.account-switcher {
  position: fixed;
  z-index: 125;
  width: 270px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #151820;
  box-shadow: 0 18px 55px #000b;
  animation: account-switcher-in 0.17s ease-out;
}
@keyframes account-switcher-in {
  from {
    opacity: 0;
    transform: translateX(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.account-switcher-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 7px;
}
.account-switcher-empty {
  margin: 0;
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.account-switcher-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
}
.account-switcher-account + .account-switcher-account {
  margin-top: 2px;
}
.account-switcher-account.active {
  background: #ffffff0a;
}
.account-switcher-account-main,
.account-switcher-remove,
.account-switcher-actions button {
  border: 0;
  background: transparent;
  color: var(--text);
}
.account-switcher-account-main {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  text-align: left;
}
.account-switcher-account-main:hover,
.account-switcher-remove:hover,
.account-switcher-actions button:hover {
  background: #ffffff0d;
}
.account-switcher-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.account-switcher-copy {
  min-width: 0;
}
.account-switcher-copy strong,
.account-switcher-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-switcher-copy strong {
  font-size: 13px;
}
.account-switcher-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.account-switcher-check {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
}
.account-switcher-remove {
  display: none;
  width: 31px;
  height: 31px;
  padding: 5px;
  border-radius: 8px;
  color: var(--danger);
  font-size: 18px;
}
.account-switcher.managing .account-switcher-remove {
  display: grid;
  place-items: center;
}
.account-switcher-actions {
  padding: 7px;
  border-top: 1px solid var(--border);
}
.account-switcher-actions button {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.account-switcher-actions button + button {
  margin-top: 2px;
}
:root[data-theme="light"] .account-switcher {
  background: #f7f8fb;
  box-shadow: 0 18px 45px #20243138;
}
:root[data-theme="light"] .account-switch-wrap > button[aria-expanded="true"],
:root[data-theme="light"] .account-status-wrap > button[aria-expanded="true"],
:root[data-theme="light"] .account-switcher-account.active,
:root[data-theme="light"] .account-switcher-account-main:hover,
:root[data-theme="light"] .account-switcher-remove:hover,
:root[data-theme="light"] .account-switcher-actions button:hover {
  background: #1118270a;
}
:root[data-theme="onyx"] .account-switcher {
  background: #090a0d;
}
.account-popover-menu .account-chevron {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}
#account-status-toggle[aria-expanded="true"] .account-chevron {
  transform: rotate(90deg);
}
.account-status-dot {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
}
.account-status-dot.dnd {
  background: var(--danger);
}
.account-status-dot.invisible {
  background: #6e7585;
}
.account-status-options {
  position: fixed;
  z-index: 126;
  width: 230px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #151820;
  box-shadow: 0 18px 55px #000b;
  animation: account-switcher-in 0.17s ease-out;
}
.account-status-options button {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}
.account-status-options button.active {
  background: #ffffff0d;
  color: var(--text);
}
:root[data-theme="light"] .account-status-options {
  background: #f7f8fb;
  box-shadow: 0 18px 45px #20243138;
}
:root[data-theme="onyx"] .account-status-options {
  background: #090a0d;
}
:root[data-theme="light"] .account-popover {
  background: #f7f8fb;
  box-shadow: 0 24px 60px #20243138;
}
:root[data-theme="light"] .account-popover-avatar {
  border-color: #f7f8fb;
}
:root[data-theme="light"] .account-popover-menu > button:hover,
:root[data-theme="light"] .account-status-options button:hover {
  background: #1118270a;
}
:root[data-theme="onyx"] .account-popover {
  background: #07080b;
}
:root[data-theme="onyx"] .account-popover-avatar {
  border-color: #07080b;
}
@media (max-height: 680px) {
  .account-popover-banner {
    height: 74px;
  }
  .account-popover-body {
    padding-top: 42px;
  }
  .account-popover-avatar {
    top: -39px;
    width: 72px;
    height: 72px;
    border-radius: 23px;
  }
}
.content {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  background: var(--bg);
  overflow: hidden;
}
.content-header p {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.direct-call-button {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--text);
}
.direct-call-button:hover {
  border-color: #4d5568;
  background: #252a36;
}
.empty-state {
  align-self: center;
  justify-self: center;
  text-align: center;
  padding: 30px;
}
.empty-illustration {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel2);
  color: var(--accent2);
  font-size: 48px;
}
.empty-state h2 {
  margin: 20px 0 7px;
}
.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}
.empty-state button {
  margin: 4px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
}
.friends-view {
  min-height: 0;
  padding: 25px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.friends-view section {
  margin-bottom: 28px;
}
.friends-view h3 {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 5px;
  border-top: 1px solid var(--border);
}
.friend-row .friend-copy {
  flex: 1;
}
.friend-row strong,
.friend-row small {
  display: block;
}
.friend-row small {
  color: var(--muted);
  font-size: 11px;
}
.friend-row button {
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--panel2);
}
.friend-empty {
  color: var(--muted);
  font-size: 13px;
}
.messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 24px 12px;
}
.welcome {
  padding: 30px 0 20px;
}
.welcome .hash {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 17px;
  background: var(--panel2);
  color: var(--muted);
  font-size: 31px;
}
.welcome h2 {
  margin: 15px 0 5px;
}
.welcome p {
  margin: 0;
  color: var(--muted);
}
.message-day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  color: #8c93a3;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.message-day-divider::before,
.message-day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.message-day-divider span {
  white-space: nowrap;
}
.message {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  margin: 4px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.message:hover,
.message:focus-within {
  border-color: var(--border);
  background: var(--panel2);
}
.message.reply-highlight {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel2));
}
.message.edited {
  padding-bottom: 25px;
}
.message .avatar,
.message-meta > strong,
.member,
.friend-row .avatar {
  cursor: pointer;
}
.message-meta > strong {
  margin-right: 8px;
  font-size: 13px;
}
.message time {
  color: #707789;
  font-size: 10px;
}
.message-content {
  margin: 4px 0 0;
  color: #d8dbe3;
  overflow-wrap: anywhere;
}
.message-content p {
  margin: 0 0 8px;
  line-height: 1.48;
  white-space: pre-wrap;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content h3,
.message-content h4,
.message-content h5 {
  margin: 12px 0 6px;
  color: var(--text);
  line-height: 1.3;
}
.message-content h3 { font-size: 17px; }
.message-content h4 { font-size: 15px; }
.message-content h5 { font-size: 13px; }
.message-content ul,
.message-content ol {
  margin: 3px 0 9px;
  padding-left: 21px;
  line-height: 1.55;
}
.message-content li + li { margin-top: 3px; }
.message-content hr {
  height: 1px;
  margin: 12px 0;
  border: 0;
  background: var(--border);
}
.message-content em { color: #e6e3ff; }
.message-content strong {
  color: var(--text);
  font-size: inherit;
  font-weight: 750;
}
.server-invite-card {
  width: min(100%, 460px);
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #343a4a;
  border-radius: 15px;
  background: linear-gradient(145deg, #1c202a, #151821);
  box-shadow: 0 10px 28px #0004;
}
.server-invite-banner {
  position: relative;
  height: 76px;
  margin-bottom: 38px;
  background:
    radial-gradient(circle at 74% 10%, #9384ff80, transparent 36%),
    linear-gradient(135deg, #414c78, #252a3d 62%, #1d2030);
}
.server-invite-icon {
  position: absolute;
  left: 18px;
  bottom: -28px;
  width: 62px;
  height: 62px;
  border: 5px solid #1a1d26;
  border-radius: 18px;
  background-size: cover;
}
.server-invite-name,
.server-invite-meta,
.server-invite-copy,
.server-invite-join,
.server-invite-loading {
  display: block;
  margin-right: 18px;
  margin-left: 18px;
}
.server-invite-name {
  margin-top: 0;
  font-size: 17px;
}
.server-invite-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.server-invite-meta::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}
.server-invite-copy {
  margin-top: 14px;
  margin-bottom: 13px;
  color: #b6bdcb;
  font-size: 13px;
}
.server-invite-join {
  width: calc(100% - 36px);
  margin-top: 0;
  margin-bottom: 17px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #4d9868;
  color: #fff;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease;
}
.server-invite-join:hover:not(:disabled) {
  background: #57ad75;
  transform: translateY(-1px);
}
.server-invite-join:disabled { opacity: .65; cursor: wait; }
.server-invite-loading {
  margin-top: 0;
  margin-bottom: 0;
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.server-invite-loading.error { color: var(--danger); }
.invite-landing {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle at 50% 10%, #4f46a535, transparent 42%), #080a10ed;
  backdrop-filter: blur(12px);
}
.invite-browser-card {
  width: min(470px, 100%);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #151821;
  box-shadow: 0 28px 90px #000b;
  text-align: center;
}
.invite-brand-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 3px;
  border-radius: 17px;
}
.invite-browser-card .eyebrow { margin-top: 12px !important; }
.invite-browser-card .server-invite-card { width: 100%; text-align: left; }
.invite-browser-copy { margin: 17px 0; color: var(--muted); line-height: 1.45; }
.invite-browser-secondary {
  width: 100%;
  margin-top: 9px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent2);
  font-weight: 700;
}
.invite-browser-secondary:hover { background: var(--panel2); }
.server-invite-dialog { width: min(500px, calc(100% - 32px)); }
.server-invite-dialog-body { position: relative; padding: 29px; }
.server-invite-dialog-body .eyebrow { margin-top: 0 !important; }
.server-invite-card.large { width: 100%; margin-top: 15px; }
.load-older-messages {
  display: block;
  width: min(100%, 420px);
  margin: 0 auto 16px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel2);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.load-older-messages:hover:not(:disabled) {
  border-color: var(--accent);
  background: #25233b;
  transform: translateY(-1px);
}
.load-older-messages:disabled {
  cursor: wait;
  opacity: 0.7;
}
.composer {
  position: relative;
  padding: 12px 24px 23px;
}
.composer textarea {
  display: block;
  min-height: 49px;
  max-height: 150px;
  padding: 13px 55px 13px 15px;
  border-radius: 11px;
  background: var(--panel2);
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
}
.composer button {
  position: absolute;
  right: 34px;
  bottom: 32px;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  font-size: 17px;
}
.members {
  min-height: 0;
  padding: 20px 11px;
  border-left: 1px solid var(--border);
  background: var(--panel);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.section-title {
  padding: 0 7px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.member {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 7px;
  color: #c8ccd6;
  font-size: 12px;
}
.member-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-remove {
  display: none;
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel2);
  color: var(--muted);
  font-size: 10px;
}
.member:hover .member-remove,
.member:focus-within .member-remove {
  display: inline-flex;
}
.member-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.member:hover {
  background: var(--panel2);
}
.member .avatar {
  position: relative;
  flex-basis: 31px;
  height: 31px;
  border-radius: 9px;
}
.member.online .avatar::after,
.member.dnd .avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--green);
}
.member.dnd .avatar::after {
  background: var(--danger);
}
dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 30px 90px #000a;
}
dialog::backdrop {
  background: #08090dbd;
  backdrop-filter: blur(3px);
}
dialog form {
  position: relative;
  padding: 30px;
}
dialog h2 {
  margin: 4px 0 6px;
}
dialog p {
  color: var(--muted);
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 13px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 25px;
}
dialog .primary {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
}
.invite-link-input {
  color: var(--accent2);
  font-family: "Space Grotesk", monospace;
  font-size: 12px;
  letter-spacing: 0.01em;
  background: var(--panel2);
  border-color: #45659a;
}
.dialog-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--accent2);
  font-size: 12px;
}
.dialog-link:hover {
  text-decoration: underline;
}
.profile-settings-dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 90vh;
}
.account-security-card h3 {
  margin: 2px 0 16px;
}
.account-security-card > label {
  margin-bottom: 14px;
}
.account-security-card input[readonly] {
  color: var(--muted);
  cursor: default;
}
.security-action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.security-action button {
  grid-column: 1 / -1;
  justify-self: start;
}
.security-action .primary,
.security-action .secondary {
  padding: 9px 12px;
  border-radius: 8px;
}
@media (max-width: 700px) {
  .security-action {
    grid-template-columns: 1fr;
  }
}
.profile-settings-dialog form {
  max-height: 90vh;
  overflow-y: auto;
}
.profile-settings-dialog input,
.profile-settings-dialog textarea,
.profile-settings-dialog select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #10131a;
  color: var(--text);
}
.profile-settings-dialog textarea {
  resize: vertical;
}
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}
.avatar.large {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  border-radius: 20px;
  font-size: 20px;
}
.file-button {
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
  cursor: pointer;
}
.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.settings-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}
.profile-settings-dialog h3 {
  margin: 0 0 5px;
  font-size: 14px;
}
.settings-help {
  margin: 0 0 10px;
  font-size: 12px;
}
.sound-preferences {
  display: grid;
  gap: 0;
}
.sound-preference {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 !important;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.sound-preference:last-child {
  border-bottom: 0;
}
.sound-preference span {
  min-width: 0;
}
.sound-preference strong,
.sound-preference small {
  display: block;
}
.sound-preference small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}
.sound-preference input {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  margin: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 150ms ease;
}
.sound-preference input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0005;
  transition: transform 150ms ease;
}
.sound-preference input:checked {
  background: var(--accent);
}
.sound-preference input:checked::after {
  transform: translateX(18px);
}
.sound-preference input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.device-refresh {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel2);
}
.settings-save {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.theme-options button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel2);
  color: var(--text);
  text-align: left;
}
.theme-options button:hover,
.theme-options button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #7c6cf222;
}
.theme-options strong,
.theme-options small {
  grid-column: 2;
}
.theme-options small {
  color: var(--muted);
  font-size: 10px;
}
.theme-swatch {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff22;
  border-radius: 10px;
}
.theme-swatch.light {
  background: #f2f3f5;
  border-color: #c9ccd2;
}
.theme-swatch.dark {
  background: #171a22;
}
.theme-swatch.onyx {
  background: #000;
}
.settings-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #5e3440;
  border-radius: 8px;
  background: #2c1d23;
  color: #ff9aa0;
}
.settings-logout:hover {
  background: #3a232b;
  color: #ffbcc0;
}
.settings-view {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #0d0f14;
  color: var(--text);
  animation: settings-in 0.2s ease-out both;
}
@keyframes settings-in {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.settings-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  padding: 28px 18px 22px;
  border-right: 1px solid var(--border);
  background: #090b10;
}
.settings-profile-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}
.settings-profile-entry:hover {
  background: var(--panel2);
}
.settings-profile-entry .avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 14px;
}
.settings-profile-entry span {
  min-width: 0;
}
.settings-profile-entry strong,
.settings-profile-entry small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-profile-entry strong {
  font-size: 14px;
}
.settings-profile-entry small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.settings-navigation {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-navigation button {
  padding: 11px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.settings-navigation button:hover,
.settings-navigation button.active {
  background: var(--panel2);
  color: var(--text);
}
.settings-sidebar .settings-logout {
  margin-top: auto;
}
.settings-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: #0d0f14;
}
.settings-header h2 {
  margin: 0;
  font-size: 16px;
}
.settings-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}
.settings-close:hover {
  background: var(--panel2);
  color: var(--text);
}
.settings-content {
  min-height: 0;
  overflow-y: auto;
  padding: 52px max(36px, calc((100% - 850px) / 2)) 110px;
}
.settings-section {
  max-width: 850px;
  margin: 0 auto;
}
.settings-section h1 {
  margin: 4px 0 28px;
  font-size: 30px;
}
.settings-section label {
  display: block;
  margin: 17px 0 7px;
  color: #c9cdd6;
  font-size: 12px;
  font-weight: 600;
}
.settings-section input:not([type="color"]),
.settings-section textarea,
.settings-section select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #10131a;
  color: var(--text);
}
.settings-section input:focus,
.settings-section textarea:focus,
.settings-section select:focus {
  border-color: var(--accent);
}
.settings-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #151820;
}
.settings-profile-card {
  position: relative;
  min-height: 238px;
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #151820;
}
.settings-profile-banner {
  position: relative;
  height: 124px;
  background: #6655df;
}
.settings-profile-avatar-wrap {
  position: absolute;
  left: 28px;
  top: 78px;
  width: 100px;
  height: 100px;
}
.settings-profile-card .avatar {
  width: 100px;
  height: 100px;
  flex-basis: 100px;
  border: 7px solid #151820;
  border-radius: 32px;
}
.settings-banner-pencil,
.settings-avatar-pencil,
.settings-avatar-remove {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff22;
  background: #090b10d9;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}
.settings-banner-pencil {
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 10px;
  transform: translateY(-4px);
}
.settings-avatar-pencil {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 8px;
  appearance: none;
  border: 4px solid #151820;
  border-radius: 50%;
  line-height: 0;
  transform: translateY(6px) scale(0.9);
}
.settings-avatar-remove {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 8px;
  appearance: none;
  border: 4px solid #151820;
  border-radius: 50%;
  line-height: 0;
  transform: translateY(6px) scale(0.9);
}
.settings-avatar-actions {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -18px;
  width: 80px;
  height: 36px;
  transform: translateX(-50%);
}
.settings-profile-banner:hover .settings-banner-pencil,
.settings-profile-avatar-wrap:hover .settings-avatar-pencil,
.settings-profile-avatar-wrap:hover .settings-avatar-remove {
  opacity: 1;
  transform: translateY(0);
}
.settings-profile-avatar-wrap:hover .settings-avatar-pencil {
  transform: translateY(0) scale(1);
}
.settings-profile-avatar-wrap:hover .settings-avatar-remove {
  transform: translateY(0) scale(1);
}
.settings-banner-pencil:hover,
.settings-avatar-pencil:hover {
  background: var(--accent);
}
.settings-avatar-remove:hover {
  background: #d83c52;
  color: #fff;
}
.settings-banner-pencil svg,
.settings-avatar-pencil svg,
.settings-avatar-remove svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-profile-summary {
  position: absolute;
  left: 146px;
  top: 154px;
  right: 24px;
  min-width: 0;
}
.settings-profile-summary strong,
.settings-profile-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-profile-summary strong {
  font-size: 20px;
}
.settings-profile-summary small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.settings-banner-pencil input,
.settings-profile-avatar-wrap > input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.settings-save-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  max-width: 850px;
  margin: 34px auto 0;
  padding: 24px 0 8px;
  border-top: 0;
  background: transparent;
}
.settings-save {
  width: auto;
  min-width: 180px;
  margin: 0;
}
.settings-save:disabled {
  opacity: 0.72;
  cursor: wait;
}
.settings-save-feedback {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  animation: settings-feedback-in 0.2s ease-out both;
}
@keyframes settings-feedback-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 720px) {
  .settings-view {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .settings-content {
    padding: 32px 24px 100px;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3f5;
  --rail: #e3e5e8;
  --panel: #f8f9fa;
  --panel2: #e8eaee;
  --border: #d4d7dd;
  --text: #202228;
  --muted: #656b78;
  --accent2: #6657d9;
}
:root[data-theme="onyx"] {
  color-scheme: dark;
  --bg: #000000;
  --rail: #030303;
  --panel: #080808;
  --panel2: #121212;
  --border: #252525;
  --text: #f5f5f5;
  --muted: #929292;
}
:root[data-theme="light"] .login-card,
:root[data-theme="light"] .settings-card,
:root[data-theme="light"] .settings-profile-card {
  background: #ffffff;
}
:root[data-theme="light"] .login-card input,
:root[data-theme="light"] dialog input,
:root[data-theme="light"] .composer input,
:root[data-theme="light"] .composer textarea,
:root[data-theme="light"] .auth-tabs,
:root[data-theme="light"] .profile,
:root[data-theme="light"] .settings-section input:not([type="color"]),
:root[data-theme="light"] .settings-section textarea,
:root[data-theme="light"] .settings-section select {
  background: #ffffff;
}
:root[data-theme="light"] .voice-status {
  background: #eef0f3;
}
:root[data-theme="light"] .settings-view,
:root[data-theme="light"] .settings-header {
  background: #f4f5f7;
}
:root[data-theme="light"] .settings-sidebar {
  background: #e6e8ec;
}
:root[data-theme="light"] .settings-profile-card .avatar,
:root[data-theme="light"] .settings-avatar-pencil {
  border-color: #ffffff;
}
:root[data-theme="onyx"] .settings-view,
:root[data-theme="onyx"] .settings-header,
:root[data-theme="onyx"] .settings-sidebar {
  background: #000000;
}
:root[data-theme="onyx"] .settings-card,
:root[data-theme="onyx"] .settings-profile-card {
  background: #080808;
}
.profile-preview-dialog {
  width: min(460px, calc(100% - 32px));
  overflow: hidden;
}
.profile-card {
  position: relative;
}
.profile-banner {
  height: 140px;
  background: linear-gradient(135deg, #6655df, #4ca7c8);
}
.profile-avatar {
  position: absolute;
  left: 30px;
  top: 88px;
  width: 106px;
  height: 106px;
  border: 7px solid var(--panel);
  border-radius: 32px;
  font-size: 20px;
}
.profile-card-body {
  padding: 70px 30px 34px;
}
.profile-card-body h2 {
  margin: 0 0 2px;
}
.profile-username {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}
.status-label {
  color: var(--muted);
  font-size: 12px;
}
.status-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}
.status-label.dnd::before {
  background: var(--danger);
}
.status-label.invisible::before {
  background: #6e7585;
}
.profile-card section {
  min-height: 128px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.profile-card section strong {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.profile-card section p {
  margin: 7px 0 0;
  color: #d8dbe3;
  line-height: 1.5;
  white-space: pre-wrap;
}
.avatar-crop-dialog {
  width: min(390px, calc(100% - 32px));
}
.avatar-crop-card {
  position: relative;
  padding: 30px;
  text-align: center;
}
.avatar-crop-card h2 {
  margin: 4px 0 6px;
}
.avatar-crop-card > p:not(.eyebrow) {
  margin: 0 0 18px;
  font-size: 12px;
}
.avatar-crop-card canvas {
  display: block;
  width: 280px;
  height: 280px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 50%;
  background: #0b0d12;
  cursor: grab;
  touch-action: none;
}
.avatar-crop-dialog.server-crop canvas {
  border-radius: 48px;
}
.avatar-crop-card canvas:active {
  cursor: grabbing;
}
.crop-zoom {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  text-align: left;
}
.crop-zoom input {
  flex: 1;
  accent-color: var(--accent);
}
.crop-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.crop-actions button {
  flex: 1;
}
.message-actions {
  position: absolute;
  right: 9px;
  top: -12px;
  z-index: 2;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 20px #0005;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.message-actions button {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
}
.message-actions button:hover {
  background: var(--accent);
  color: #fff;
}
.message-reply-reference {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  margin: -3px 0 0 52px;
  padding: 7px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.message-reply-reference strong {
  flex: 0 0 auto;
  color: var(--accent2);
}
.message-reply-reference span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-edited {
  position: absolute;
  right: 10px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 7px;
  color: var(--muted);
  font-size: 9px;
}
.message-edited svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.composer-context {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(100% - 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--panel2);
}
.composer-context div {
  min-width: 0;
}
.composer-context strong,
.composer-context span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-context strong {
  color: var(--accent2);
  font-size: 11px;
}
.composer-context span {
  color: var(--muted);
  font-size: 10px;
}
.composer-context button {
  position: static;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  background: none;
  color: var(--muted);
}
.direct-call-stage {
  position: relative;
  z-index: 4;
  left: 0;
  right: 0;
  top: auto;
  max-height: 52vh;
  min-height: 0;
  overflow: hidden;
  container-type: inline-size;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 16px;
  padding: 26px;
  border-bottom: 1px solid var(--border);
  background: #090b0f;
}
.screen-share-card > label.screen-share-audio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.screen-share-audio-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.screen-share-stage {
  position: absolute;
  z-index: 6;
  inset: 64px 0 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  background: #090b0f;
  transition:
    width 180ms ease,
    height 180ms ease,
    inset 180ms ease,
    border-radius 180ms ease;
}
.screen-share-stage.compact {
  inset: auto 16px 76px auto;
  width: min(390px, calc(100% - 32px));
  height: 260px;
  min-width: 280px;
  min-height: 190px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 92px);
  resize: both;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 16px 45px #0009;
}
.screen-share-stage.fullscreen-view,
.screen-share-stage:fullscreen {
  position: fixed;
  z-index: 500;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  resize: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #090b0f;
  transition: none;
}
.screen-share-stage.fullscreen-view .screen-video-grid,
.screen-share-stage:fullscreen .screen-video-grid {
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 32px);
  overflow: hidden;
}
.screen-share-stage.fullscreen-view .screen-video-tile,
.screen-share-stage:fullscreen .screen-video-tile {
  box-sizing: border-box;
  width: min(100%, calc((100dvh - 96px) * 16 / 9));
  height: auto;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: 16 / 9;
}
.screen-share-stage.fullscreen-view .screen-video-tile video,
.screen-share-stage:fullscreen .screen-video-tile video {
  width: 100%;
  height: 100%;
  max-height: none;
}
.screen-share-stage.fullscreen-view .screen-video-tile.camera-video-tile video,
.screen-share-stage:fullscreen .screen-video-tile.camera-video-tile video {
  height: 100%;
  object-fit: cover;
}
.screen-share-stage.compact .screen-share-drag-handle {
  cursor: grab;
  user-select: none;
}
.screen-share-stage.compact .screen-share-drag-handle:active {
  cursor: grabbing;
}
.screen-share-stage.compact > header {
  min-height: 44px;
  padding: 7px 9px;
}
.screen-share-stage.compact > header small,
.screen-share-stage.compact #stop-screen-share {
  display: none;
}
.screen-share-stage.compact > header button {
  padding: 6px 8px;
  font-size: 10px;
}
.screen-share-stage.compact #hide-screen-share {
  width: 28px;
  height: 28px;
  font-size: 18px;
}
.screen-share-stage.compact .screen-video-grid {
  display: block;
  padding: 0;
  overflow: hidden;
}
.screen-share-stage.compact .screen-video-tile {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
.screen-share-stage .screen-video-tile:not(:first-child) {
  display: none;
}
.screen-share-stage.compact .screen-video-tile video {
  height: 100%;
  max-height: none;
}
.screen-share-stage > header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.screen-share-stage > header div {
  min-width: 0;
  flex: 1;
}
.screen-share-stage > header strong,
.screen-share-stage > header small {
  display: block;
}
.screen-share-stage > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.screen-share-stage > header button {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
}
#stop-screen-share {
  color: var(--danger);
}
#hide-screen-share {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
}
.screen-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}
.screen-video-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #030405;
}
.screen-video-tile video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}
.screen-video-tile span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #080a0dcc;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.content.call-active {
  grid-template-rows: 64px auto minmax(0, 1fr) auto;
}
.call-participants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 840px);
  max-height: calc(52vh - 114px);
  overflow-y: auto;
  min-height: 0;
  justify-content: center;
  gap: 16px;
}
.screen-participants {
  display: contents;
}
.call-participant {
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 16px;
  color: var(--text);
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #13161c;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}
.call-participant:hover,
.call-participant:focus-visible {
  border-color: #4c5364;
  background: #171b22;
  outline: none;
}
.call-participant.speaking {
  border-color: var(--green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 38%, transparent);
}
.call-participant .avatar {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
  border-radius: 50%;
  font-size: 22px;
}
.call-participant strong {
  margin-top: 12px;
}
.call-participant small {
  margin-top: 3px;
  color: var(--muted);
}
.screen-participant {
  border-color: #3f6f9f;
  background: linear-gradient(145deg, #151d2b, #11151d);
}
.screen-participant:hover {
  border-color: var(--accent2);
}
.participant-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 8px;
  background: #080a0d;
  pointer-events: none;
}
.participant-preview.mirrored {
  transform: scaleX(-1);
}
.mirrored-popout-source {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -10px;
  pointer-events: none;
}
.call-participant strong,
.call-participant small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@container (max-width: 580px) {
  .call-participants { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 340px) {
  .call-participants { grid-template-columns: minmax(0, 1fr); }
}
.screen-participant-avatar {
  background: linear-gradient(145deg, #347ef1, #2454a6);
  color: #e3edff;
  font-size: 30px !important;
}
.stage-call-controls {
  display: flex;
  gap: 10px;
}
.stage-call-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #292d37;
  color: #fff;
}
.stage-call-controls button.muted {
  background: #d83c52;
}
.stage-call-controls button.hangup {
  background: #e5485d;
}
.stage-call-controls .voice-icon {
  width: 20px;
  height: 20px;
}

.screen-share-dialog {
  width: min(780px, calc(100% - 32px));
}
.screen-share-card {
  position: relative;
  padding: 24px;
}
.screen-share-card h2 {
  margin: 4px 0 18px;
}
.screen-share-card > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.screen-share-help {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.screen-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
}
.screen-source {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel2);
  text-align: left;
}
.screen-source:hover {
  border-color: var(--accent);
}
.screen-source img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #050608;
  object-fit: contain;
}
.screen-source span {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#screen-share-native {
  width: 100%;
  margin-top: 14px;
}

.crop-actions .primary {
  border: 0;
}
.call-dialog {
  width: min(390px, calc(100% - 32px));
  text-align: center;
}
.call-card {
  padding: 34px;
}
.call-avatar {
  width: 82px;
  height: 82px;
  margin: 0 auto;
  flex-basis: 82px;
  border-radius: 25px;
  font-size: 22px;
}
.call-card .eyebrow {
  margin-top: 22px !important;
}
.call-card h2 {
  margin: 5px 0;
}
.call-card > p:not(.eyebrow) {
  margin: 5px 0 25px;
}
.call-actions {
  display: flex;
  gap: 10px;
}
.call-actions button {
  flex: 1;
  padding: 11px;
  border: 0;
  border-radius: 9px;
  font-weight: 700;
}
.call-decline {
  background: #343944;
  color: var(--text);
}
.toast {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  padding: 11px 15px;
  border: 1px solid #5e3440;
  border-radius: 9px;
  background: #2c1d23;
  box-shadow: 0 12px 40px #0006;
}
#remote-audio {
  display: none;
}
/* Movimento sutil para dar resposta visual sem distrair durante a conversa. */
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes voice-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 #49d49d00;
  }
  50% {
    box-shadow: 0 0 0 4px #49d49d22;
  }
}
dialog[open] {
  animation: dialog-in 0.2s cubic-bezier(0.22, 0.8, 0.32, 1) both;
}
dialog[open]::backdrop {
  animation: backdrop-in 0.2s ease-out both;
}
.avatar {
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}
.avatar:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.12);
}
.platform-windows .avatar:hover {
  transform: none;
  filter: none;
}
.profile-card {
  animation: item-in 0.28s 0.04s ease-out both;
}
.profile-card .profile-banner {
  background-size: 160% 160%;
  animation: banner-shift 8s ease-in-out infinite alternate;
}
@keyframes banner-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}
.profile-card-body section {
  animation: item-in 0.25s ease-out both;
}
.profile-card-body section:nth-of-type(2) {
  animation-delay: 0.06s;
}
.friend-row,
.message,
.member {
  animation: item-in 0.2s ease-out both;
}
.voice-status {
  position: relative;
  padding: 9px 10px 10px;
  background:
    radial-gradient(circle at 20% 0%, #234f4040, transparent 58%),
    #10151a;
  animation: item-in 0.22s ease-out both;
}
.voice-connection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 3px 2px 7px;
  border-radius: 9px;
  outline: none;
}
.voice-connection-header:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 55%, transparent);
}
.connection-symbol {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  gap: 2px;
  border: 0;
  color: var(--green);
}
.connection-symbol i {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: currentColor;
  box-shadow: 0 0 10px color-mix(in srgb, currentColor 45%, transparent);
}
.connection-symbol i:nth-child(1) { height: 9px; }
.connection-symbol i:nth-child(2) { height: 15px; }
.connection-symbol i:nth-child(3) { height: 22px; }
.voice-connection-header[data-quality="unstable"] .connection-symbol,
.voice-latency-card[data-quality="unstable"] .voice-latency-heading strong {
  color: #f0b85a;
}
.voice-connection-header[data-quality="bad"] .connection-symbol,
.voice-latency-card[data-quality="bad"] .voice-latency-heading strong {
  color: var(--danger);
}
.voice-connection-header[data-quality="pending"] .connection-symbol {
  color: var(--muted);
}
.voice-connection-copy strong {
  font-size: 13px;
}
.voice-connection-copy span {
  font-size: 11px;
}
.voice-connection-copy small {
  font-size: 9px;
}
.leave-call {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e75861;
  transition: background 0.16s ease, transform 0.16s ease;
}
.leave-call:hover {
  background: #e5484d1f;
  transform: translateY(-1px);
}
.leave-call svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 4px;
}
.voice-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: auto;
  min-width: 0;
  min-height: 44px;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}
.voice-actions button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-actions button .voice-icon {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
}
.voice-latency-card {
  position: absolute;
  z-index: 130;
  right: 9px;
  bottom: calc(100% + 8px);
  left: 9px;
  padding: 12px;
  border: 1px solid #315f4e;
  border-radius: 13px;
  background: #11171bea;
  box-shadow: 0 18px 42px #0009;
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(16px);
}
.voice-latency-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.voice-latency-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}
.voice-latency-heading strong {
  color: var(--green);
  font-size: 12px;
}
.voice-latency-chart {
  display: block;
  width: 100%;
  height: 76px;
  overflow: visible;
}
.latency-grid {
  fill: none;
  stroke: #ffffff19;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.latency-area {
  fill: color-mix(in srgb, var(--green) 26%, transparent);
}
#voice-latency-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile {
  background: #10131a;
  background:
    linear-gradient(92deg, color-mix(in srgb, var(--profile-banner, #6655df) 30%, #0d1118), #10131a 70%);
}
.profile:hover,
.profile:focus-visible,
.profile.account-menu-open {
  background:
    linear-gradient(92deg, color-mix(in srgb, var(--profile-banner, #6655df) 42%, #111620), #171b24 72%);
}
.profile-voice-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 3px;
}
.profile-voice-controls.hidden {
  display: none;
}
.profile-voice-controls button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: #080b1099;
  color: var(--text);
}
.profile-voice-controls button:hover {
  background: #080b10e6;
  transform: translateY(-1px);
}
.profile-voice-controls button.muted {
  color: #ff6c74;
}
.profile-voice-controls .voice-icon,
.profile-voice-controls svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile:has(.profile-voice-controls:not(.hidden)) .profile-settings-button {
  display: none;
}
.profile:has(.profile-voice-controls:not(.hidden)) .profile-copy {
  min-width: 45px;
}
.screen-video-tile.camera-video-tile video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(56vh, 520px);
  object-fit: cover;
}
.screen-video-tile[data-media-kind="camera"] video {
  transform: scaleX(-1);
}
:root[data-theme="light"] .voice-status {
  background: linear-gradient(145deg, #eef9f4, #eef0f3);
}
:root[data-theme="light"] .voice-latency-card {
  background: #fffffff2;
  box-shadow: 0 18px 42px #24384d33;
}
:root[data-theme="light"] .profile {
  background:
    linear-gradient(92deg, color-mix(in srgb, var(--profile-banner, #6655df) 18%, #fff), #fff 72%);
}
.voice-person.speaking {
  animation: voice-pulse 1.1s ease-in-out infinite;
  border-radius: 6px;
}
.voice-actions button,
.direct-call-button,
.file-button,
.device-refresh,
.friend-row button {
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.voice-actions button:hover,
.direct-call-button:hover,
.file-button:hover,
.device-refresh:hover,
.friend-row button:hover {
  transform: translateY(-1px);
}
.dialog-close {
  transition:
    transform 0.15s ease,
    color 0.15s ease;
}
.dialog-close:focus {
  outline: none;
}
.dialog-close:hover {
  transform: rotate(90deg);
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 68px 220px 1fr;
  }
  .members {
    display: none !important;
  }
}
@media (max-width: 650px) {
  .app {
    grid-template-columns: 62px 1fr;
  }
  .sidebar {
    display: none;
  }
  .content-header p {
    display: none;
  }
}
