/* ------------------------------ Base ------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Base — grafite azulado bem escuro, não é o cinza-neutro genérico */
  --bg-darkest: #0c0c13;
  --bg-dark: #15151f;
  --bg-mid: #1a1a26;
  --bg-light: #23232f;
  --bg-lighter: #2c2c3a;

  /* Identidade Nexo: violeta elétrico + âmbar como faísca de destaque */
  --accent: #7c5cff;
  --accent-hover: #6a49f2;
  --accent-soft: rgba(124, 92, 255, .18);
  --spark: #ffb020;

  --green: #2fd480;
  --red: #ff5468;
  --text: #e7e6f0;
  --text-muted: #8d8ba3;

  --font-display: 'Unbounded', 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-mid);
  color: var(--text);
  overflow: hidden;
}

.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.error { color: var(--red); font-size: 13px; min-height: 18px; }
.ok-msg { color: var(--green); font-size: 13px; min-height: 18px; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-darkest); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #000; }
::-webkit-scrollbar-track { background: transparent; }

/* Foco acessível, mas com o brilho da marca em vez de outline duro */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ Auth ------------------------------ */
#auth-view {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 18% 20%, rgba(124, 92, 255, .35), transparent 60%),
    radial-gradient(50% 50% at 85% 80%, rgba(255, 176, 32, .16), transparent 60%),
    var(--bg-darkest);
}
#auth-view::before {
  /* textura de ruído sutil pra tirar a chapadura do gradiente */
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-card {
  position: relative;
  background: rgba(21, 21, 31, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .06);
  padding: 36px 32px;
  border-radius: 16px;
  width: 380px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(124, 92, 255, .06);
  animation: card-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card h1 {
  font-family: var(--font-display);
  text-align: center; margin-bottom: 6px;
  font-size: 26px; font-weight: 600; letter-spacing: -.01em;
  text-shadow: 0 0 24px rgba(124, 92, 255, .45);
}
.subtitle { text-align: center; color: var(--text-muted); margin-bottom: 22px; font-size: 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  background: var(--bg-mid); color: var(--text-muted); font-weight: 600;
  transition: background .15s, color .15s;
}
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-soft); }

#auth-form label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .08em; }
#auth-form input {
  width: 100%; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px;
  background: var(--bg-darkest); color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s;
}
#auth-form input:focus { border-color: var(--accent); }
#auth-submit {
  width: 100%; margin-top: 18px; padding: 13px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5a3fe0); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 20px var(--accent-soft);
  transition: transform .12s, box-shadow .12s;
}
#auth-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(124, 92, 255, .32); }
#auth-submit:active { transform: translateY(0); }

/* ------------------------------ Layout ------------------------------ */
#app-view { display: flex; height: 100%; }

/* Barra de servidores */
#servers-bar {
  width: 72px; background: var(--bg-darkest); padding: 12px 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  overflow-y: auto; flex-shrink: 0;
}
#servers-list { display: flex; flex-direction: column; gap: 8px; }
.separator { width: 32px; height: 2px; background: var(--bg-light); border-radius: 1px; }

.server-icon {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff;
  transition: border-radius .18s, box-shadow .18s, transform .12s;
  overflow: hidden; padding: 4px;
}
.server-icon:hover { transform: translateY(-1px); }
.server-icon:hover, .server-icon.active { border-radius: 16px; }
.server-icon.active { box-shadow: 0 0 0 2px var(--bg-darkest), 0 0 0 4px var(--accent); }
.server-icon.home { background: var(--bg-mid); font-size: 20px; }
.server-icon.home:hover, .server-icon.home.active { background: var(--accent); }
.server-icon.action { background: var(--bg-mid); color: var(--green); font-size: 28px; }
.server-icon.action:hover { background: var(--green); color: #fff; }

/* Sidebar */
#sidebar {
  width: 240px; background: var(--bg-dark); display: flex; flex-direction: column; flex-shrink: 0;
}
#server-header {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 16px; font-weight: 700; border-bottom: 1px solid var(--bg-darkest);
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.header-actions { display: flex; gap: 2px; }
#channels-scroll { flex: 1; overflow-y: auto; padding: 12px 8px; }

.channel-group { margin-bottom: 16px; }
.channel-group-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); padding: 4px 8px;
}

.channel {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 6px; color: var(--text-muted);
  cursor: pointer; -webkit-user-select: none; user-select: none; font-size: 15px;
  position: relative; border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.channel:hover { background: var(--bg-light); color: var(--text); }
.channel.active { background: var(--bg-lighter); color: #fff; border-left-color: var(--accent); }
.channel .hash { font-size: 18px; color: var(--text-muted); }
.channel .del-channel {
  margin-left: auto; display: none; background: none; border: none;
  color: var(--text-muted); font-size: 13px; padding: 2px 4px; border-radius: 4px;
}
.channel:hover .del-channel { display: block; }
.channel .del-channel:hover { color: var(--red); background: var(--bg-darkest); }

.voice-users { margin-left: 26px; padding-bottom: 4px; }
.voice-user {
  display: flex; align-items: center; gap: 6px; padding: 3px 0;
  font-size: 13px; color: var(--text-muted);
}
.voice-user .avatar { width: 18px; height: 18px; font-size: 10px; }
.voice-user .avatar.speaking { box-shadow: 0 0 0 2px var(--green), 0 0 8px 1px rgba(47, 212, 128, .65); }
.voice-user .live-badge {
  margin-left: auto; display: flex; align-items: center; gap: 3px;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  padding: 1px 5px 1px 4px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase;
}
.voice-user .live-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

/* Barra compacta: você está em call, mas navegando em outro canal/servidor */
#mini-call {
  background: var(--bg-darkest); border-top: 1px solid var(--bg-light);
  padding: 10px 12px; cursor: pointer; transition: background .12s;
}
#mini-call:hover { background: #000; }
#mini-call-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#mini-call-status {
  font-size: 12px; font-weight: 700; color: var(--green);
  display: flex; align-items: center; gap: 6px;
}
#mini-call-status::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px rgba(47, 212, 128, .8);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
#mini-call-channel { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
#mini-call-close {
  background: var(--red); color: #fff; border: none; border-radius: 7px;
  width: 26px; height: 26px; font-size: 13px; flex-shrink: 0;
}
#mini-call-close:hover { background: #d63f52; }

/* DMs */
.dm-item {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 6px; cursor: pointer; color: var(--text-muted);
  transition: background .12s;
}
.dm-item:hover { background: var(--bg-light); }
.dm-item.active { background: var(--bg-lighter); color: #fff; }
.dm-item .dm-info { min-width: 0; flex: 1; }
.dm-item .dm-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-item .dm-last { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Painel do usuário */
#user-panel {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; background: var(--bg-darkest); cursor: pointer;
  transition: background .12s;
}
#user-panel:hover { background: #000; }
.user-panel-info { flex: 1; min-width: 0; }
.user-panel-info .username { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Avatares */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px;
  position: relative; overflow: visible;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar .dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 3px solid var(--bg-darkest);
  box-shadow: 0 0 8px rgba(47, 212, 128, .7);
}
.avatar .dot.offline { background: #5c5a70; box-shadow: none; }

/* Aro verde: usuário está falando no canal de voz */
.avatar.speaking {
  box-shadow: 0 0 0 3px var(--green), 0 0 14px 2px rgba(47, 212, 128, .65);
  transition: box-shadow .08s ease-out;
}

/* Botões ícone */
.icon-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; padding: 4px; border-radius: 4px;
  transition: background .12s, color .12s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-light); }

/* ------------------------------ Main ------------------------------ */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-mid); }

#chat-header {
  min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  font-weight: 700; font-family: var(--font-display); font-size: 14px;
  border-bottom: 1px solid var(--bg-darkest); flex-shrink: 0;
}
#chat-header #btn-toggle-members { margin-left: auto; font-size: 18px; }
#btn-toggle-members.active { color: var(--accent); background: var(--accent-soft); }

#messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.msg { display: flex; gap: 12px; position: relative; padding: 4px 8px; border-radius: 8px; transition: background .1s; }
.msg:hover { background: rgba(124, 92, 255, .06); }
.msg .avatar { width: 40px; height: 40px; font-size: 17px; cursor: pointer; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-weight: 700; cursor: pointer; }
.msg-author:hover { text-decoration: underline; }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-content { word-wrap: break-word; white-space: pre-wrap; line-height: 1.5; }
.msg-attachment { margin-top: 6px; max-width: 400px; border-radius: 10px; display: block; cursor: zoom-in; border: 1px solid var(--bg-light); }

.msg-actions {
  position: absolute; top: -14px; right: 12px; display: none;
  background: var(--bg-lighter); border: 1px solid var(--bg-light);
  border-radius: 8px; padding: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.msg:hover .msg-actions { display: flex; }
.msg-actions button {
  background: none; border: none; font-size: 15px; padding: 3px 6px; border-radius: 4px;
}
.msg-actions button:hover { background: var(--bg-light); }

.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-dark); border: 1px solid transparent;
  border-radius: 12px; padding: 2px 8px; font-size: 13px; color: var(--text-muted);
}
.reaction:hover { border-color: var(--text-muted); }
.reaction.mine { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.empty-chat { margin: auto; text-align: center; color: var(--text-muted); }
.empty-chat .big { font-size: 48px; filter: drop-shadow(0 0 20px rgba(124, 92, 255, .5)); }
.empty-chat h2 { font-family: var(--font-display); font-weight: 500; margin: 8px 0 4px; color: var(--text); }

/* Composer */
#attachment-preview {
  display: flex; align-items: center; gap: 10px; margin: 0 16px 8px;
  background: var(--bg-dark); border-radius: 8px; padding: 8px; flex-shrink: 0;
}
#attachment-preview img { max-height: 80px; border-radius: 6px; }

#composer {
  display: flex; align-items: center; gap: 4px;
  margin: 0 16px 20px; padding: 0 8px;
  background: var(--bg-light); border-radius: 10px; flex-shrink: 0;
  border: 1px solid transparent; transition: border-color .15s;
}
#composer:focus-within { border-color: var(--accent); }
#composer input {
  flex: 1; padding: 12px 8px; border: none; background: none;
  color: var(--text); font-size: 15px; outline: none;
}
.composer-btn { background: none; border: none; font-size: 18px; padding: 8px; border-radius: 6px; }
.composer-btn:hover { background: var(--bg-darkest); }

/* Seletor de emoji */
#emoji-picker {
  position: fixed; bottom: 80px; right: 24px; z-index: 60;
  background: var(--bg-lighter); border: 1px solid var(--bg-light);
  border-radius: 12px; padding: 10px; width: 280px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
}
#emoji-picker button {
  background: none; border: none; font-size: 20px; padding: 4px; border-radius: 6px;
}
#emoji-picker button:hover { background: var(--bg-light); }

/* ------------------------------ Voz ------------------------------ */
#voice-panel {
  background: #030305; flex-shrink: 0; display: flex; flex-direction: column;
  border-top: 1px solid var(--bg-light); max-height: 55%;
  transition: max-height .2s ease;
}

/* Modo imersivo: você está vendo a call em tela cheia (não só uma tarja embaixo) */
#main.call-immersive #messages,
#main.call-immersive #attachment-preview,
#main.call-immersive #composer { display: none; }
#main.call-immersive #voice-panel { flex: 1; max-height: none; border-top: none; }
#voice-tiles {
  flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px; justify-content: center; align-content: center; align-items: center;
}
.tile {
  position: relative; background: var(--bg-dark); border-radius: 10px;
  min-width: 200px; min-height: 110px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--bg-light);
}
.tile.screen { flex: 1 1 60%; min-height: 300px; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile .tile-name {
  position: absolute; bottom: 6px; left: 8px; font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,.65); padding: 2px 8px; border-radius: 4px;
}
.tile .tile-avatar { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }

/* Controle de volume (até 200%) por amigo, e separado pro áudio da tela dele */
.vol-row {
  position: absolute; left: 8px; right: 8px; bottom: 30px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.6); border-radius: 8px; padding: 4px 8px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .12s, transform .12s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.vol-row.vol-screen { bottom: 64px; }
.tile:hover .vol-row { opacity: 1; transform: translateY(0); pointer-events: auto; }
.vol-mute { background: none; border: none; color: #fff; font-size: 13px; flex-shrink: 0; padding: 2px; }
.vol-mute.muted { color: var(--red); }
.vol-slider {
  flex: 1; height: 4px; accent-color: var(--accent); cursor: pointer;
}
.vol-slider:disabled { opacity: .4; cursor: not-allowed; }
.vol-pct { font-size: 10px; color: #fff; width: 34px; text-align: right; flex-shrink: 0; }

/* Botão de expandir / parar compartilhamento, aparece ao passar o mouse na tile */
.tile-controls { position: absolute; top: 8px; right: 8px; display: none; gap: 6px; z-index: 5; }
.tile:hover .tile-controls { display: flex; }
.tile-ctl-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .12s;
}
.tile-ctl-btn:hover { background: rgba(0,0,0,.85); }
.tile-ctl-btn.danger:hover { background: var(--red); }

/* Tela expandida: essa tile toma o painel inteiro, as outras somem temporariamente */
.tile.maximized { flex: 1 1 100% !important; min-height: 100%; }
#voice-tiles.tiles-maximized { padding: 8px; }
#voice-tiles.tiles-maximized .tile:not(.maximized) { display: none; }

/* Barra de controles flutuante, tipo pílula (mic / compartilhar / desconectar) */
#voice-controls {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 0 auto 16px; width: fit-content;
  background: var(--bg-darkest); border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.ctl {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  border: none; border-radius: 24px; background: var(--bg-light);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: background .12s, transform .12s;
}
.ctl:hover { background: var(--bg-lighter); transform: translateY(-1px); }
.ctl.off { background: var(--red); color: #fff; }
.ctl.active-share { background: var(--green); color: #fff; }
.ctl.danger { background: var(--red); color: #fff; border-radius: 50%; width: 44px; height: 44px; padding: 0; justify-content: center; }
.ctl.danger:hover { background: #d63f52; }

/* ------------------------------ Membros ------------------------------ */
#members-bar {
  width: 220px; background: var(--bg-dark); padding: 12px 8px;
  overflow-y: auto; flex-shrink: 0;
}
.member {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; font-size: 14px; cursor: pointer;
  transition: background .12s;
}
.member:hover { background: var(--bg-light); }
.member.offline { opacity: .45; }
.member .member-info { min-width: 0; }
.member .member-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .member-status { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .crown { margin-left: auto; filter: drop-shadow(0 0 4px rgba(255, 176, 32, .6)); }

/* ------------------------------ Modal ------------------------------ */
#modal-overlay {
  position: fixed; inset: 0; background: rgba(6, 6, 10, .75);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
#modal {
  background: var(--bg-dark); border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 24px;
  width: 460px; max-width: 92vw; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  animation: card-rise .28s cubic-bezier(.2, .8, .2, 1) both;
}
#modal h2 { font-family: var(--font-display); font-weight: 500; margin-bottom: 16px; }
#modal h3 { margin: 18px 0 4px; font-size: 14px; }
#modal label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .07em; }
#modal input[type="text"], #modal input[type="password"], #modal textarea {
  width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px;
  background: var(--bg-darkest); color: var(--text); font-size: 15px; outline: none;
  resize: vertical; transition: border-color .15s;
}
#modal input:focus, #modal textarea:focus { border-color: var(--accent); }
#modal input[type="color"] { width: 60px; height: 36px; border: none; background: none; padding: 0; }
#modal input[type="file"] { color: var(--text-muted); font-size: 13px; }
#modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#modal .btn {
  padding: 10px 18px; border: none; border-radius: 8px; font-weight: 700; font-size: 14px;
  transition: transform .1s, box-shadow .1s;
}
#modal .btn:active { transform: scale(.97); }
#modal .btn.primary { background: linear-gradient(135deg, var(--accent), #5a3fe0); color: #fff; box-shadow: 0 6px 16px var(--accent-soft); }
#modal .btn.primary:hover { box-shadow: 0 8px 22px rgba(124, 92, 255, .35); }
#modal .btn.ghost { background: none; color: var(--text); }
#modal .btn.ghost:hover { text-decoration: underline; }
#modal .btn.danger { background: var(--red); color: #fff; }
#modal .btn.danger:hover { background: #d63f52; }

/* Abas do modal de configurações */
.settings-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--bg-light); padding-bottom: 8px; }
.settings-tabs .tab { flex: 1; padding: 8px; font-size: 13px; }

.profile-preview {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  background: var(--bg-darkest); padding: 12px; border-radius: 10px;
}

/* Cartão de perfil */
.profile-card-banner { height: 60px; border-radius: 14px 14px 0 0; margin: -24px -24px 0; background: linear-gradient(120deg, var(--accent), var(--spark)); }
.profile-card-body { padding-top: 0; }
.profile-card-body .avatar { width: 72px; height: 72px; font-size: 30px; margin-top: -36px; border: 5px solid var(--bg-dark); }
.profile-card-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-top: 8px; }
.profile-card-status { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.profile-card-bio {
  background: var(--bg-darkest); border-radius: 10px; padding: 12px;
  margin-top: 14px; font-size: 14px; white-space: pre-wrap;
}
.profile-card-bio .bio-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; letter-spacing: .07em; }

.invite-code-box {
  background: var(--bg-darkest); border: 1px dashed var(--accent);
  border-radius: 8px; padding: 12px;
  font-family: var(--font-mono); font-size: 18px; text-align: center; letter-spacing: 3px;
  color: var(--spark);
  margin-top: 8px; -webkit-user-select: all; user-select: all;
}

/* Zoom de imagem */
#image-zoom {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 200;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
#image-zoom img { max-width: 92vw; max-height: 92vh; border-radius: 10px; }

@media (max-width: 900px) {
  #members-bar { display: none; }
}
