/* ==========================================================================
   estilos.css — visual do app unificado.
   Base escura no estilo Discord, com tema claro, modo compacto e redução de
   movimento herdados do protótipo "discord_2022_personalizacao_sistema".
   ========================================================================== */

:root {
  --bg-trilho: #1e1f22;
  --bg-sidebar: #2b2d31;
  --bg-principal: #313338;
  --bg-entrada: #383a40;
  --bg-usuario: #232428;
  --bg-hover: #35373c;
  --bg-ativo: #404249;
  --borda: #3f4147;
  --acento: #5865f2;
  --acento-hover: #4752c4;
  --texto: #dbdee1;
  --texto-forte: #f2f3f5;
  --texto-fraco: #949ba4;
  --verde: #23a55a;
  --amarelo: #f0b232;
  --vermelho: #f23f43;
  --raio: 8px;
  --espaco: 12px;
  --animacao: 0.15s ease;
}

/* ---------- Tema claro (protótipo E) ---------- */
body.tema-claro {
  --bg-trilho: #e3e5e8;
  --bg-sidebar: #f2f3f5;
  --bg-principal: #ffffff;
  --bg-entrada: #e3e5e8;
  --bg-usuario: #ebedef;
  --bg-hover: #e8eaed;
  --bg-ativo: #dbdee1;
  --borda: #d4d7dc;
  --texto: #2e3338;
  --texto-forte: #060607;
  --texto-fraco: #5c5e66;
}

/* ---------- Modo compacto (protótipo E) ---------- */
body.compacto {
  --espaco: 6px;
  font-size: 13px;
}
body.compacto .mensagem { padding: 2px 16px; }
body.compacto .item-canal { padding: 3px 8px; }
body.compacto .item-amigo { padding: 5px 8px; }

/* ---------- Reduzir movimento (protótipo E) ---------- */
body.sem-animacao *,
body.sem-animacao *::before,
body.sem-animacao *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: var(--bg-principal);
  color: var(--texto);
  height: 100vh;
  overflow: hidden;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
::selection { background: var(--acento); color: #fff; }

/* Barra de rolagem discreta */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.escondido { display: none !important; }

/* ==========================================================================
   Tela de entrada (login / cadastro)
   ========================================================================== */
.tela-auth {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1f22 0%, #232428 50%, #1a1b2e 100%);
  padding: 20px;
  z-index: 100;
  overflow-y: auto;
}

.cartao-auth {
  width: 100%;
  max-width: 420px;
  background: var(--bg-sidebar);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cartao-auth h1 {
  font-size: 22px;
  color: var(--texto-forte);
  text-align: center;
  margin-bottom: 4px;
}

.cartao-auth .subtitulo {
  text-align: center;
  color: var(--texto-fraco);
  font-size: 13px;
  margin-bottom: 22px;
}

.campo { margin-bottom: 14px; }
.campo label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--texto-fraco);
  margin-bottom: 6px;
}
.campo input {
  width: 100%;
  background: var(--bg-trilho);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--texto-forte);
  outline: none;
  transition: border-color var(--animacao);
}
.campo input:focus { border-color: var(--acento); }

.botao-principal {
  width: 100%;
  background: var(--acento);
  color: #fff;
  font-weight: 600;
  padding: 11px;
  border-radius: 6px;
  transition: background var(--animacao);
}
.botao-principal:hover { background: var(--acento-hover); }
.botao-principal:disabled { opacity: 0.6; cursor: not-allowed; }

.botao-link {
  background: none;
  color: var(--acento);
  text-decoration: underline;
  font-size: 13px;
}

.alternar-auth {
  text-align: center;
  font-size: 13px;
  color: var(--texto-fraco);
  margin-top: 14px;
}

.mensagem-erro {
  background: rgba(242, 63, 67, 0.12);
  border-left: 3px solid var(--vermelho);
  color: #ffb3b5;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 14px;
}

.mensagem-aviso {
  background: rgba(240, 178, 50, 0.12);
  border-left: 3px solid var(--amarelo);
  color: #ffd88a;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ==========================================================================
   Estrutura principal: trilho | sidebar | conteúdo | membros
   ========================================================================== */
.app {
  display: flex;
  height: 100vh;
}

/* ---------- Trilho de servidores ---------- */
.trilho {
  width: 72px;
  background: var(--bg-trilho);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
}

.icone-servidor {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: var(--bg-principal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--texto);
  transition: all var(--animacao);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.icone-servidor:hover,
.icone-servidor.ativo {
  border-radius: 16px;
  background: var(--acento);
  color: #fff;
}
.icone-servidor.casa { font-size: 20px; }
.icone-servidor.casa:hover,
.icone-servidor.casa.ativo { background: var(--acento); }

.icone-servidor img { width: 100%; height: 100%; object-fit: cover; }

.icone-servidor .marcador {
  position: absolute;
  left: -12px;
  width: 4px;
  height: 0;
  background: var(--texto-forte);
  border-radius: 0 4px 4px 0;
  transition: height var(--animacao);
}
.icone-servidor.ativo .marcador { height: 32px; }

.divisor-trilho {
  width: 32px;
  height: 2px;
  background: var(--borda);
  border-radius: 1px;
  flex-shrink: 0;
}

.icone-servidor.adicionar {
  background: var(--bg-principal);
  color: var(--verde);
  font-size: 22px;
}
.icone-servidor.adicionar:hover { background: var(--verde); color: #fff; }

/* ---------- Barra lateral ---------- */
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-cabecalho {
  height: 48px;
  padding: 0 var(--espaco);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--borda);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.sidebar-cabecalho h2 {
  font-size: 15px;
  color: var(--texto-forte);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-conteudo { flex: 1; overflow-y: auto; padding: 8px; }

.grupo-canais { margin-bottom: 14px; }

.grupo-canais-titulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--texto-fraco);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-canal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--texto-fraco);
  font-size: 14px;
  width: 100%;
  text-align: left;
  transition: all var(--animacao);
}
.item-canal:hover { background: var(--bg-hover); color: var(--texto); }
.item-canal.ativo { background: var(--bg-ativo); color: var(--texto-forte); }
.item-canal .prefixo { font-size: 15px; opacity: 0.7; flex-shrink: 0; }

/* DMs e amigos */
.item-amigo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 4px;
  width: 100%;
  text-align: left;
  transition: background var(--animacao);
}
.item-amigo:hover { background: var(--bg-hover); }
.item-amigo.ativo { background: var(--bg-ativo); }

.avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

.selo-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
}
.selo-status.online { background: var(--verde); }
.selo-status.idle { background: var(--amarelo); }
.selo-status.dnd { background: var(--vermelho); }
.selo-status.offline { background: #80848e; }

.info-amigo { overflow: hidden; }
.info-amigo .nome {
  display: block;
  font-size: 14px;
  color: var(--texto);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-amigo .detalhe {
  display: block;
  font-size: 11px;
  color: var(--texto-fraco);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contador-pedidos {
  background: var(--vermelho);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: auto;
}

/* Painel do usuário (rodapé da sidebar) */
.painel-usuario {
  background: var(--bg-usuario);
  padding: 8px var(--espaco);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.painel-usuario .dados { flex: 1; overflow: hidden; }
.painel-usuario .dados strong {
  display: block;
  font-size: 13px;
  color: var(--texto-forte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.painel-usuario .dados span { font-size: 11px; color: var(--texto-fraco); }

.botao-icone {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-fraco);
  transition: all var(--animacao);
  font-size: 16px;
}
.botao-icone:hover { background: var(--bg-hover); color: var(--texto-forte); }

/* ---------- Área principal ---------- */
.principal {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-principal);
  min-width: 0;
}

.cabecalho-principal {
  height: 48px;
  padding: 0 var(--espaco);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--borda);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.cabecalho-principal h2 {
  font-size: 15px;
  color: var(--texto-forte);
  font-weight: 600;
}

.cabecalho-principal .topico {
  font-size: 12px;
  color: var(--texto-fraco);
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--borda);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mensagens */
.area-mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.boas-vindas {
  padding: 24px 16px;
  border-bottom: 1px solid var(--borda);
  margin-bottom: 16px;
}
.boas-vindas h1 { font-size: 28px; color: var(--texto-forte); margin-bottom: 8px; }
.boas-vindas p { color: var(--texto-fraco); }

.mensagem {
  display: flex;
  gap: 14px;
  padding: 4px 16px;
  transition: background var(--animacao);
  position: relative;
}
.mensagem:hover { background: rgba(0, 0, 0, 0.06); }
.mensagem.falando { background: rgba(35, 165, 90, 0.06); }

.mensagem .avatar-mini { width: 40px; height: 40px; font-size: 15px; }

.mensagem-conteudo { flex: 1; min-width: 0; }
.mensagem-autor {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.mensagem-autor strong { font-size: 15px; color: var(--texto-forte); }
.mensagem-autor time { font-size: 11px; color: var(--texto-fraco); }
.mensagem-autor .tag-autor {
  font-size: 10px;
  background: var(--acento);
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 700;
}
.mensagem-texto { color: var(--texto); white-space: pre-wrap; word-break: break-word; }

.mensagem .apagar {
  position: absolute;
  right: 16px;
  top: 4px;
  opacity: 0;
  font-size: 12px;
  color: var(--texto-fraco);
  padding: 2px 6px;
  border-radius: 3px;
}
.mensagem:hover .apagar { opacity: 1; }
.mensagem .apagar:hover { color: var(--vermelho); background: var(--bg-hover); }

/* Campo de envio */
.area-envio { padding: 0 16px 20px; flex-shrink: 0; }

.formulario-envio {
  background: var(--bg-entrada);
  border-radius: var(--raio);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
}

.formulario-envio textarea {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--texto);
  resize: none;
  max-height: 140px;
  line-height: 1.4;
  font-size: 15px;
  padding: 2px 0;
}
.formulario-envio textarea::placeholder { color: var(--texto-fraco); }

.botao-enviar {
  background: var(--acento);
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.botao-enviar:hover { background: var(--acento-hover); }

.aviso-sem-canal {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--texto-fraco);
  text-align: center;
  padding: 40px;
}

/* ---------- Tela de amigos ---------- */
.tela-amigos { flex: 1; overflow-y: auto; padding: 20px; }

.abas-amigos {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--borda);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.aba {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--texto-fraco);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--animacao);
  display: flex;
  align-items: center;
  gap: 6px;
}
.aba:hover { color: var(--texto); }
.aba.ativa { color: var(--texto-forte); border-bottom-color: var(--texto-forte); }
.aba .badge {
  background: var(--vermelho);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
}

.linha-adicionar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.linha-adicionar input {
  flex: 1;
  background: var(--bg-entrada);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--texto);
  outline: none;
}
.linha-adicionar input:focus { border-color: var(--acento); }
.linha-adicionar button {
  background: var(--verde);
  color: #fff;
  font-weight: 600;
  padding: 0 18px;
  border-radius: 6px;
}
.linha-adicionar button:hover { filter: brightness(1.1); }

.lista-vazia {
  color: var(--texto-fraco);
  text-align: center;
  padding: 30px 20px;
  font-size: 13px;
}

.cartao-pedido {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  background: var(--bg-sidebar);
  margin-bottom: 8px;
}
.cartao-pedido .dados { flex: 1; }

.botao-aceitar { background: var(--verde); color: #fff; padding: 6px 12px; border-radius: 4px; font-weight: 600; }
.botao-recusar { background: var(--bg-ativo); color: var(--texto); padding: 6px 12px; border-radius: 4px; margin-left: 6px; }

/* ---------- Painel de membros ---------- */
.painel-membros {
  width: 240px;
  background: var(--bg-sidebar);
  overflow-y: auto;
  padding: 12px 8px;
  flex-shrink: 0;
}

.titulo-membros {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--texto-fraco);
  padding: 8px 8px 4px;
}

.membro {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
}
.membro:hover { background: var(--bg-hover); }
.membro.sem-conta { opacity: 0.65; }

.etiqueta-cargo {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  color: #fff;
}

/* ==========================================================================
   Modais
   ========================================================================== */
.fundo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  overflow-y: auto;
}

.modal {
  background: var(--bg-principal);
  border-radius: 10px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.modal-cabecalho {
  padding: 20px 22px 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-cabecalho h3 { font-size: 18px; color: var(--texto-forte); }
.modal-cabecalho .fechar { font-size: 20px; color: var(--texto-fraco); }
.modal-cabecalho .fechar:hover { color: var(--texto-forte); }

.modal-corpo { padding: 12px 22px 18px; }

.modal-rodape {
  background: var(--bg-sidebar);
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.botao-secundario {
  background: transparent;
  color: var(--texto);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.botao-secundario:hover { text-decoration: underline; }

.botao-perigo { background: var(--vermelho); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.botao-perigo:hover { filter: brightness(1.1); }

.grade-cores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.opcao-cor {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform var(--animacao);
}
.opcao-cor:hover { transform: scale(1.1); }
.opcao-cor.selecionada { border-color: #fff; box-shadow: 0 0 0 2px var(--acento); }

.linha-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.linha-check input { width: 16px; height: 16px; accent-color: var(--acento); }
.linha-check label { font-size: 14px; color: var(--texto); }
.linha-check .explicacao { font-size: 12px; color: var(--texto-fraco); display: block; }

/* ==========================================================================
   Aviso flutuante (toast)
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111214;
  color: var(--texto-forte);
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 300;
  max-width: 90vw;
}
.toast.visivel { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.erro { border-left: 3px solid var(--vermelho); }
.toast.sucesso { border-left: 3px solid var(--verde); }

/* ==========================================================================
   Fase 5 — busca, perfil por servidor, chamadas e ajustes de amigos
   ========================================================================== */

/* ---------- Barra de busca no cabeçalho ---------- */
.campo-busca {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}
.campo-busca input {
  width: 190px;
  background: var(--bg-trilho);
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 26px 6px 10px;
  font-size: 13px;
  color: var(--texto-forte);
  outline: none;
  transition: width 0.15s ease, border-color 0.15s ease;
}
.campo-busca input:focus { width: 260px; border-color: var(--acento); }
.campo-busca input::placeholder { color: var(--texto-fraco); }
.campo-busca .limpar-busca {
  position: absolute;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--texto-fraco);
  display: flex;
  align-items: center;
  justify-content: center;
}
.campo-busca .limpar-busca:hover { color: var(--texto-forte); background: var(--bg-hover); }

/* ---------- Resultado da busca ampla ---------- */
.lista-busca { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.resultado-busca {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-trilho);
  color: var(--texto);
}
.resultado-busca:hover { background: var(--bg-ativo); }
.resultado-busca .linha1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.resultado-busca .linha1 strong { color: var(--texto-forte); font-size: 13px; }
.resultado-busca .linha1 .lugar { font-size: 11px; color: var(--texto-fraco); }
.resultado-busca .linha1 time { font-size: 11px; color: var(--texto-fraco); margin-left: auto; }
.resultado-busca .trecho {
  font-size: 13px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Mensagem destacada (vinda da busca) ---------- */
.mensagem.destacada {
  background: rgba(88, 101, 242, 0.18);
  box-shadow: inset 3px 0 0 var(--acento);
  border-radius: 4px;
}

/* ---------- Textos de ajuda nas telas ---------- */
.ajuda-campo { font-size: 12px; color: var(--texto-fraco); margin-bottom: 10px; line-height: 1.5; }
.ajuda-campo code { background: var(--bg-ativo); padding: 1px 4px; border-radius: 3px; font-size: 11px; }
.subtitulo-secao {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--texto-fraco);
  margin: 20px 0 8px;
}

/* ---------- Prévia do perfil por servidor ---------- */
.previa-perfil {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-trilho);
  border-radius: 6px;
  padding: 10px;
}
.previa-perfil strong { display: block; color: var(--texto-forte); font-size: 14px; }
.previa-perfil span { font-size: 11px; color: var(--texto-fraco); }

/* ---------- Painel de chamada ---------- */
.painel-chamada {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 10px;
  padding: 10px 14px;
  background: rgba(35, 165, 90, 0.12);
  border: 1px solid rgba(35, 165, 90, 0.35);
  border-radius: 8px;
  flex-shrink: 0;
}
.painel-chamada .selo-chamada { font-size: 20px; }
.painel-chamada .dados-chamada { flex: 1; min-width: 0; }
.painel-chamada .dados-chamada strong { display: block; font-size: 13px; color: var(--verde); }
.painel-chamada .dados-chamada span { font-size: 11px; color: var(--texto-fraco); }

.botao-chamada {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-ativo);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.botao-chamada:hover { background: var(--bg-hover); }
.botao-chamada.ligado { background: var(--vermelho); }
.botao-chamada.encerrar { background: var(--vermelho); color: #fff; }
.botao-chamada.encerrar:hover { filter: brightness(1.15); }

/* ---------- Janela flutuante da chamada real (áudio/câmera/tela) ---------- */
.janela-chamada {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 320px;
  background: var(--bg-secundario, #1e1f22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.janela-chamada-titulo {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texto-fraco);
}
.janela-chamada .linha-janela {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.janela-chamada .linha-janela strong { color: var(--texto-forte); }
.janela-chamada .linha-janela .tocando {
  font-size: 18px;
  animation: pulso-chamada 1s ease-in-out infinite;
}
.janela-chamada #tempo-chamada {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--verde);
  font-size: 13px;
}
.janela-chamada .dica-outro { font-size: 12px; color: var(--texto-fraco); }
.janela-chamada .botoes-voz { justify-content: center; margin-top: 2px; }

.videos-chamada {
  position: relative;
  width: 100%;
  min-height: 0;
  display: none;
}
.videos-chamada.tem-video { display: block; }
.videos-chamada video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  display: block;
}
.videos-chamada .video-pip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

@keyframes pulso-chamada {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.7; }
}
.sem-animacao .janela-chamada .tocando { animation: none; }

@media (max-width: 640px) {
  .janela-chamada { right: 8px; bottom: 8px; width: min(320px, calc(100vw - 16px)); }
}

/* ---------- Barra de voz (conectado, vendo outra tela) ---------- */
.barra-voz { flex-shrink: 0; }
.barra-voz.escondido { display: none; }
.barra-voz-interna { margin: 0 16px 8px; }

/* ---------- Canal de voz de servidor ---------- */
.tela-voz {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow-y: auto;
  gap: 14px;
}
.cabecalho-voz {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.cabecalho-voz strong { font-size: 17px; color: var(--texto-forte); }
.cabecalho-voz span { font-size: 12px; color: var(--texto-fraco); }

.grade-voz {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cartao-voz {
  background: var(--bg-secundario, #1e1f22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cartao-voz strong { font-size: 13px; color: var(--texto-forte); }
.cartao-voz .estados-voz { font-size: 13px; letter-spacing: 2px; }
.avatar-mini.grande { width: 48px; height: 48px; font-size: 20px; }

.controles-voz {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 6px 0 2px;
}

.grade-videos-voz {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.video-voz-item {
  position: relative;
  width: min(420px, 100%);
}
.video-voz-item video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
}
.video-voz-rotulo {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}

.membro-na-voz {
  font-size: 12px;
  color: var(--texto-fraco);
  padding: 2px 0 2px 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Chips de contas existentes (convite / pedido de amizade) ---------- */
.chip-conta {
  display: inline-block;
  background: var(--bg-ativo);
  color: var(--texto);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  margin: 2px 2px;
  cursor: pointer;
}
.chip-conta:hover { background: var(--bg-hover); border-color: var(--acento); }

/* ==========================================================================
   Responsivo: esconde painel de membros e encolhe sidebar em telas pequenas
   ========================================================================== */
@media (max-width: 900px) {
  .painel-membros { display: none; }
  .sidebar { width: 200px; }
}

@media (max-width: 640px) {
  .trilho { width: 56px; }
  .icone-servidor { width: 40px; height: 40px; min-height: 40px; font-size: 13px; }
  .sidebar { width: 170px; }
  .boas-vindas h1 { font-size: 20px; }
}
