:root {
  --bg: #070a10;
  --panel: #0e1420;
  --panel2: #111a29;
  --panel3: #172233;
  --text: #eef3ff;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, .08);
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --green: #34d399;
  --danger: #fb7185;
  --warning: #f59e0b;
  --shadow: 0 22px 70px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial;
  background: linear-gradient(135deg, #070a10 0%, #101827 50%, #071115 100%);
  color: var(--text);
  overflow: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }

.titlebar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 8, 14, .86);
  border-bottom: 1px solid var(--line);
  -webkit-app-region: drag;
  user-select: none;
}
.brandbar { display: flex; gap: 10px; align-items: center; padding-left: 14px; font-weight: 900; }
.domain { color: var(--muted); font-size: 12px; font-weight: 700; }
.mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(34, 211, 238, .38);
}
.winbtns { display: flex; -webkit-app-region: no-drag; }
.winbtns button { width: 46px; height: 34px; border: 0; background: transparent; color: var(--muted); }
.winbtns button:hover { background: rgba(255,255,255,.08); color: #fff; }
.winbtns .close:hover { background: #ef4444; }

.auth-wrap { height: calc(100% - 34px); display: grid; place-items: center; padding: 28px; overflow: auto; }
.auth-card {
  width: min(1040px, 100%);
  min-height: min(680px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: rgba(14, 20, 32, .94);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero { padding: 54px; background: linear-gradient(135deg, rgba(124,58,237,.24), rgba(34,211,238,.12)); }
.logo-big {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  display: block;
  object-fit: cover;
  box-shadow: 0 22px 80px rgba(34, 211, 238, .25);
}
.hero h1 { font-size: 60px; line-height: .95; margin: 34px 0 14px; }
.hero p { color: #cbd5e1; font-size: 18px; line-height: 1.7; max-width: 450px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 34px; }
.chip { padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.auth-form, .verify-card { padding: 54px; display: flex; flex-direction: column; justify-content: center; }
.verify-card {
  width: min(460px, calc(100% - 30px));
  background: rgba(14, 20, 32, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  gap: 12px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.tab, .primary, .secondary, .ghost, .danger {
  border-radius: 8px;
  padding: 11px 15px;
  color: white;
  font-weight: 800;
}
.tab { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); }
.tab.active, .primary { background: linear-gradient(135deg, var(--violet), var(--cyan)); border: 0; }
.secondary { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.ghost { background: transparent; border: 1px solid transparent; color: var(--muted); }
.danger { background: rgba(251, 113, 133, .16); color: #fecdd3; border: 1px solid rgba(251,113,133,.36); }
.compact-btn { padding: 8px 10px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.field span { color: var(--muted); font-size: 13px; font-weight: 800; }
.input {
  width: 100%;
  border: 1px solid var(--line);
  background: #070b13;
  color: var(--text);
  padding: 13px 14px;
  border-radius: 8px;
  outline: none;
}
.input:focus { border-color: rgba(34, 211, 238, .65); box-shadow: 0 0 0 4px rgba(34,211,238,.1); }
.code-input { text-align: center; font-size: 26px; letter-spacing: 8px; }
.verify-actions { display: flex; justify-content: space-between; gap: 10px; }
.error { margin-top: 14px; color: #fecdd3; background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.25); padding: 11px 13px; border-radius: 8px; }

.layout { height: calc(100% - 34px); min-height: 0; display: grid; grid-template-columns: 78px 286px 1fr 286px; }
.layout > * { min-height: 0; }
.servers { background: rgba(5,8,14,.9); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; overflow-y: auto; overscroll-behavior: contain; }
.server-pill {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: #dce7ff;
  display: grid;
  place-items: center;
  font-weight: 1000;
  overflow: hidden;
}
.server-pill img { width: 100%; height: 100%; object-fit: cover; }
.server-pill:hover, .server-pill.active { border-radius: 12px; background: linear-gradient(135deg, rgba(124,58,237,.85), rgba(34,211,238,.55)); }
.server-pill.home { padding: 0; background: #21108f; }
.server-pill.add { color: var(--green); font-size: 24px; }
.divider { height: 1px; width: 42px; background: var(--line); }

.sidebar, .rightbar { background: rgba(13, 19, 31, .88); min-width: 0; min-height: 0; }
.sidebar { border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.rightbar { border-left: 1px solid var(--line); padding: 16px; overflow: auto; overscroll-behavior: contain; }
.server-head { padding: 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-head h2 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: white; flex: 0 0 auto; }
.section-title { padding: 16px 18px 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.home-nav { display: grid; gap: 6px; padding: 10px 12px 4px; }
.home-nav button { border: 0; background: transparent; color: #dbeafe; text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 800; cursor: pointer; }
.home-nav button:hover, .home-nav button.active { background: rgba(255,255,255,.07); }
.channel, .dm-item, .member {
  margin: 3px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #b9c3dd;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.channel:hover, .channel.active, .dm-item:hover { background: rgba(255,255,255,.07); color: white; }
.badge { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.09); color: var(--muted); font-size: 12px; }
.add-channel { margin: 10px; }
.voice-panel {
  margin: auto 10px 10px;
  padding: 12px;
  border: 1px solid rgba(34,211,238,.2);
  background: rgba(34,211,238,.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.user-panel { margin-top: auto; border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.03); }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--violet), var(--cyan)); display: grid; place-items: center; font-weight: 1000; flex: 0 0 auto; }
.avatar.small { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.grow { min-width: 0; flex: 1; }
.name { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 12px; color: var(--muted); line-height: 1.45; }

.main { display: grid; grid-template-rows: 68px minmax(0, 1fr) 74px; min-width: 0; min-height: 0; background: rgba(8, 12, 20, .78); }
.chat-head { border-bottom: 1px solid var(--line); padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chat-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hash { font-size: 25px; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.messages { min-height: 0; padding: 22px; overflow: auto; overscroll-behavior: contain; }
.message { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; padding: 8px; border-radius: 8px; align-items: start; }
.message:hover { background: rgba(255,255,255,.035); }
.message:hover .msg-actions { opacity: 1; }
.message .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; flex-shrink: 0; padding-top: 4px; }
.msg-actions .iconbtn { padding: 3px 6px; font-size: 12px; }
.edit-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.edit-actions { display: flex; gap: 6px; }
.edited-tag { font-size: 10px; color: var(--muted); font-style: italic; }
.time { font-size: 11px; color: var(--muted); }
.content { color: #dce7ff; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.text-link { color: #7dd3fc; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.text-link:hover { color: #bae6fd; }
.grow { min-width: 0; }
.composer { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 12px; align-items: center; position: relative; }
.composer input { flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; color: white; outline: none; min-width: 0; }
.attach-btn { flex: 0 0 auto; }
.attachment-preview { position: absolute; left: 18px; right: 18px; bottom: 68px; display: flex; gap: 8px; flex-wrap: wrap; background: #0d1320; border: 1px solid var(--line); border-radius: 8px; padding: 8px; box-shadow: var(--shadow); }
.attachment-preview span { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255,255,255,.07); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.attachment-preview button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.attachments { display: grid; gap: 8px; margin-top: 8px; }
.attachment { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.055); color: #dbeafe; text-decoration: none; }
.attachment span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment small { color: var(--muted); }
.media-attachment { width: min(420px, 100%); border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.045); overflow: hidden; color: #dbeafe; }
.image-attachment { display: grid; padding: 0; cursor: zoom-in; text-align: left; }
.image-attachment img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: rgba(0,0,0,.28); }
.image-attachment span, .video-attachment button { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 0; background: transparent; color: inherit; text-align: left; font-weight: 800; }
.image-attachment small, .video-attachment small { color: var(--muted); font-weight: 700; }
.video-attachment { display: grid; }
.video-attachment video { width: 100%; max-height: 360px; background: #050914; }
.video-attachment button { cursor: pointer; border-top: 1px solid var(--line); }
.media-viewer-backdrop { position: fixed; inset: 34px 0 0; background: rgba(0,0,0,.82); z-index: 45; display: grid; place-items: center; padding: 24px; }
.media-viewer { width: min(1100px, 100%); height: min(820px, 100%); display: grid; grid-template-rows: 48px minmax(0, 1fr); background: #080c14; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.media-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.media-viewer-body { min-height: 0; display: grid; place-items: center; padding: 12px; }
.media-viewer-body img, .media-viewer-body video { max-width: 100%; max-height: 100%; object-fit: contain; }
.card, .dash-band {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}
.card h3, .dash-band h3 { margin: 0 0 10px; font-size: 15px; }
.wide { width: 100%; margin-top: 12px; }
.dashboard { display: grid; align-content: start; gap: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric-grid div { padding: 14px; background: rgba(0,0,0,.18); border-radius: 8px; }
.metric-grid b { display: block; font-size: 20px; }
.metric-grid span { color: var(--muted); font-size: 12px; }

.voice-room { display: grid; grid-template-columns: minmax(260px, 1fr) 340px; gap: 18px; align-items: stretch; }
.voice-stage { display: grid; place-items: center; align-content: center; text-align: center; border: 1px solid rgba(34,211,238,.18); background: rgba(34,211,238,.05); border-radius: 8px; min-height: 360px; }
.pulse-ring { width: 132px; height: 132px; border-radius: 36px; display: grid; place-items: center; font-size: 48px; font-weight: 1000; background: linear-gradient(135deg, var(--violet), var(--cyan)); box-shadow: 0 0 0 14px rgba(34,211,238,.06); }
.voice-user-grid { display: flex; flex-direction: column; gap: 10px; }
.voice-user { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }

.empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; }
.small-empty { height: auto; min-height: 52px; padding: 16px; }
.modal-backdrop { position: fixed; inset: 34px 0 0; background: rgba(0,0,0,.58); display: grid; place-items: center; z-index: 20; min-height: 0; overflow: auto; }
.modal { width: min(480px, calc(100% - 30px)); max-height: calc(100vh - 80px); overflow: auto; overscroll-behavior: contain; background: #0d1320; border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.wide-modal { width: min(860px, calc(100% - 30px)); }
.modal h2 { margin: 0 0 16px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #0d1320; border: 1px solid var(--line); padding: 14px 16px; border-radius: 8px; box-shadow: var(--shadow); z-index: 50; }
.invite-box { font-family: ui-monospace, Consolas, monospace; background: #060914; border: 1px solid var(--line); padding: 12px; border-radius: 8px; margin-top: 10px; color: #bae6fd; }
.search-row, .role-create { display: flex; gap: 8px; }
.search-row input, .role-create input:first-child { flex: 1; }
.list, .role-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.list-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 10px; border-radius: 8px; }
.friend-page-row { min-height: 58px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-row { display: grid; grid-template-columns: 150px 54px 1fr auto auto; gap: 8px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.color-input { padding: 4px; min-height: 45px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; color: #cbd5e1; font-size: 12px; }
.member-roles { margin: 12px 0; }
.check { display: flex; gap: 10px; align-items: center; color: #cbd5e1; margin: 10px 0; }

.compact .channel, .compact .dm-item, .compact .member { padding: 7px 10px; }
.compact .messages { padding: 14px; }

@media (max-width: 1120px) {
  .rightbar { display: none; }
  .layout { grid-template-columns: 72px 260px 1fr; }
  .voice-room { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-card { grid-template-columns: 1fr; }
  .hero { display: none; }
  .layout { grid-template-columns: 64px 1fr; }
  .main { display: none; }
}

.settings-backdrop { place-items: stretch; }
.settings-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  background: #11101b;
}
.settings-nav {
  background: #151420;
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 22px 12px;
  overflow: auto;
  overscroll-behavior: contain;
}
.settings-nav-title {
  color: #8b8a9a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 18px 12px 8px;
}
.settings-nav-item, .settings-logout {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c9c7dc;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  font-weight: 800;
  text-align: left;
}
.settings-nav-item:hover, .settings-nav-item.active { background: rgba(255,255,255,.08); color: #fff; }
.settings-logout { margin-top: 18px; color: #fb7185; }
.settings-content {
  position: relative;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 34px min(7vw, 82px) 70px;
}
.settings-close {
  position: fixed;
  top: 52px;
  right: 30px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  color: #d8d6ea;
  font-weight: 900;
  z-index: 30;
}
.settings-form {
  width: min(760px, 100%);
}
.settings-form h1 {
  color: #e8e6ff;
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 28px;
}
.settings-form h2 {
  color: #dedcf2;
  font-size: 19px;
  margin: 28px 0 10px;
}
.settings-form p {
  color: #aaa7c2;
  line-height: 1.45;
  margin: 4px 0;
}
.account-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: #191827;
  border-radius: 8px;
  margin-bottom: 18px;
}
.account-avatar { width: 68px; height: 68px; border-radius: 22px; font-size: 22px; }
.settings-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-block, .danger-zone {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.danger-zone {
  padding: 18px;
  border: 1px solid rgba(251,113,133,.22);
  background: rgba(251,113,133,.06);
  border-radius: 8px;
}
.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.backup-grid code {
  background: #0c0b14;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 10px;
  color: #d8f3ff;
}
.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 22px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 16px 0;
}
.setting-row b {
  color: #dedcf2;
  font-size: 18px;
}
.setting-row p {
  max-width: 520px;
  font-size: 16px;
}
.switch {
  display: inline-flex;
  justify-content: flex-end;
}
.switch input { display: none; }
.switch span {
  width: 62px;
  height: 32px;
  border-radius: 999px;
  background: #151420;
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  transition: .16s ease;
}
.switch span:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  left: 6px;
  top: 5px;
  transition: .16s ease;
}
.switch input:checked + span {
  background: #5865f2;
  border-color: #5865f2;
}
.switch input:checked + span:before {
  transform: translateX(28px);
}
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #171625;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 14px 16px;
}
.device-row b { color: #f0eeff; }
.device-row p { font-size: 14px; }
.device-x {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
}
.camera-preview {
  height: 276px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
  background: #0c0b14;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.range {
  width: 100%;
  accent-color: #5865f2;
}
.link-btn {
  display: block;
  border: 0;
  background: transparent;
  color: #6ea8ff;
  padding: 6px 0 0;
  font-weight: 700;
}
.theme-swatches {
  display: flex;
  gap: 10px;
  margin: 12px 0 24px;
}
.theme-swatch {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid #8b8a9a;
  background: #11101b;
}
.theme-swatch.active { box-shadow: 0 0 0 3px #5865f2 inset; }
.theme-swatch.light { background: #f8fafc; }
.theme-swatch.dark { background: #2b2d37; }
.theme-swatch.midnight { background: #11101b; }
.theme-swatch.black { background: #000; }
.context-menu {
  position: fixed;
  z-index: 80;
  min-width: 180px;
  background: #0f0e18;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.context-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e8e6ff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 800;
}
.context-menu button:hover { background: #5865f2; color: white; }

@media (max-width: 900px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .settings-nav-title, .settings-logout { display: none; }
  .settings-nav-item { width: auto; white-space: nowrap; }
  .settings-content { padding: 24px 18px 60px; }
  .settings-grid-two { grid-template-columns: 1fr; }
}

/* ── Profile Card ─────────────────────────────────── */
.profile-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: transparent;
}
.profile-card {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  background: #0f0e1a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,.65);
  overflow: hidden;
  z-index: 61;
}
.profile-banner {
  height: 72px;
  background: linear-gradient(135deg, #1a0533, #0a1f3a, #001a2e);
}
.profile-avatar-wrap {
  position: relative;
  width: 72px;
  margin: -36px 0 0 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #0f0e1a;
  object-fit: cover;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
}
.profile-body {
  padding: 10px 18px 18px;
}
.profile-name {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-top: 8px;
}
.profile-tag { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.profile-bio {
  color: #c9c7dc;
  font-size: 14px;
  line-height: 1.4;
  margin: 8px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  white-space: pre-wrap;
  word-break: break-word;
}
.profile-meta { margin: 10px 0; }
.profile-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.profile-id-row code { background: rgba(0,0,0,.3); border-radius: 4px; padding: 2px 6px; font-size: 11px; color: #94e2ff; }
.profile-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── Status dots ───────────────────────────────────── */
.dm-avatar-wrap { position: relative; }
.status-dot-sm {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--panel);
}
.status-dot-lg {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #0f0e1a;
}
.status-dot-sm.online, .status-dot-lg.online { background: #34d399; }
.status-dot-sm.idle, .status-dot-lg.idle { background: #f59e0b; }
.status-dot-sm.dnd, .status-dot-lg.dnd { background: #fb7185; }
.status-dot-sm.offline, .status-dot-lg.offline { background: #6b7280; }

/* ── DM items ────────────────────────────────────── */
.dm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
}
.dm-item:hover { background: rgba(255,255,255,.06); }
.dm-item.active { background: rgba(88,101,242,.18); }
.dm-item.pending-item { opacity: .8; }
.accept-btn { color: #34d399; border: 1px solid #34d399; border-radius: 6px; padding: 4px 10px; background: transparent; font-size: 14px; font-weight: 900; }
.accept-btn:hover { background: #34d399; color: #000; }
.pending-title { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 12px 10px 4px; }
.avatar-img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* ── Clickable ───────────────────────────────────── */
.clickable { cursor: pointer; }
.clickable:hover { opacity: .85; }

/* ── Voice controls ──────────────────────────────── */
.voice-controls { display: flex; gap: 6px; align-items: center; }
.voice-composer { display: flex; gap: 10px; padding: 14px 20px; background: var(--panel2); border-top: 1px solid var(--line); }
.voice-composer button { flex: 1; }
.voice-user.muted { opacity: .6; }

/* ── IDs / codes ─────────────────────────────────── */
.id-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.id-code { background: rgba(0,0,0,.3); border-radius: 6px; padding: 4px 10px; font-size: 12px; color: #94e2ff; font-family: ui-monospace, monospace; word-break: break-all; }
