/* =====================================================
   Estilos padrão GFB - chat_gfb
   ===================================================== */

:root {
  --azul-gfb: #1e3a5f;
  --azul-gfb-escuro: #15294a;
  --azul-claro: #2563eb;
  --azul-link: #93c5fd;
  --azul-bolha: #1e3a5f;
  --azul-visto: #60a5fa;
  --cinza-bg: #f5f7fa;
  --cinza-texto: #6b7280;
  --cinza-borda: #e5e7eb;
  --cinza-claro: #f3f4f6;
  --erro: #dc2626;
  --sucesso: #16a34a;
  --verde-online: #22c55e;
  --amarelo: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1f2937; }

/* =====================================================
   LOGIN
   ===================================================== */
body.login { background: linear-gradient(135deg, #15294a 0%, #2c5282 100%); min-height: 100vh; display: flex; flex-direction: column; }
.login-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--azul-gfb); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.35); width: 100%; max-width: 420px; overflow: hidden; color: white; }
.login-header { padding: 32px 20px 16px; text-align: center; }
.login-header img { max-width: 220px; height: auto; mix-blend-mode: screen; }
.login-body { padding: 10px 32px 32px; }
.login-title { text-align: center; font-size: 1.5rem; color: white; margin-bottom: 6px; font-weight: 600; }
.login-subtitle { text-align: center; color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 25px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: white; margin-bottom: 6px; }
.form-group input[type="email"], .form-group input[type="password"], .form-group input[type="text"] {
  width: 100%; padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 8px;
  font-size: 1rem; background: white; color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--azul-link); box-shadow: 0 0 0 3px rgba(147,197,253,0.3); }

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-size: 0.9rem; flex-wrap: wrap; gap: 8px; }
.checkbox-wrap { display: flex; align-items: center; gap: 6px; cursor: pointer; color: white; }
.checkbox-wrap input { cursor: pointer; accent-color: white; }
.forgot-link { color: var(--azul-link); text-decoration: none; cursor: pointer; font-size: 0.9rem; }
.forgot-link:hover { text-decoration: underline; color: white; }

.btn-login { width: 100%; background: white; color: var(--azul-gfb); border: none; padding: 12px; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-login:hover:not(:disabled) { background: rgba(255,255,255,0.9); transform: translateY(-1px); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.mensagem { padding: 10px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 0.9rem; display: none; }
.mensagem.erro { background: rgba(254,226,226,0.95); color: var(--erro); border: 1px solid #fecaca; display: block; }
.mensagem.info { background: rgba(219,234,254,0.95); color: #1e40af; border: 1px solid #bfdbfe; display: block; }
.footer-login { text-align: center; padding: 16px; color: rgba(255,255,255,0.75); font-size: 0.8rem; }

/* =====================================================
   HOME / CHAT
   ===================================================== */
body.home { background: var(--cinza-bg); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

.home-header { background: var(--azul-gfb); color: white; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
.home-header .brand { display: flex; align-items: center; gap: 14px; }
.home-header .brand img { height: 38px; mix-blend-mode: screen; }
.home-header h1 { font-size: 1.15rem; font-weight: 600; }

.user-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-info .perfil-badge { background: rgba(255,255,255,0.15); padding: 3px 10px; border-radius: 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-sair { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.5); padding: 6px 14px; border-radius: 5px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-block; }
.btn-sair:hover { background: white; color: var(--azul-gfb); }
#btn-som { padding: 6px 12px; }

.chat-layout { flex: 1; display: flex; overflow: hidden; }

.sidebar { width: 320px; background: white; border-right: 1px solid var(--cinza-borda); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 16px; border-bottom: 1px solid var(--cinza-borda); display: flex; gap: 8px; align-items: center; }
.sidebar-busca { flex: 1; padding: 8px 12px; border: 1px solid var(--cinza-borda); border-radius: 6px; font-size: 0.9rem; }
.sidebar-busca:focus { outline: none; border-color: var(--azul-claro); }

/* Dropdown do botão "+" */
.dropdown-wrap { position: relative; }
.btn-nova-conversa { background: var(--azul-gfb); color: white; border: none; border-radius: 6px; width: 36px; height: 36px; cursor: pointer; font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.btn-nova-conversa:hover { background: #15294a; }
.dropdown-menu { display: none; position: absolute; top: 42px; right: 0; background: white; border: 1px solid var(--cinza-borda); border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.15); z-index: 50; min-width: 180px; overflow: hidden; }
.dropdown-menu.aberto { display: block; }
.dropdown-menu button { display: block; width: 100%; background: none; border: none; padding: 10px 14px; text-align: left; font-size: 0.9rem; cursor: pointer; color: #1f2937; }
.dropdown-menu button:hover { background: var(--cinza-claro); }

.lista-salas { flex: 1; overflow-y: auto; }
.sala-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--cinza-claro); transition: background 0.15s; }
.sala-item:hover { background: var(--cinza-claro); }
.sala-item.ativa { background: #e0e7ff; border-left: 3px solid var(--azul-gfb); padding-left: 13px; }

.sala-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--azul-gfb); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; position: relative; font-size: 1rem; }
.sala-avatar.grupo { background: var(--azul-claro); font-size: 1.4rem; }
.sala-avatar.online::after { content: ''; position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: var(--verde-online); border-radius: 50%; border: 2px solid white; }

.sala-info { flex: 1; min-width: 0; }
.sala-info .topo { display: flex; justify-content: space-between; align-items: center; }
.sala-info .nome { font-weight: 600; font-size: 0.95rem; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sala-info .hora { font-size: 0.75rem; color: var(--cinza-texto); flex-shrink: 0; margin-left: 6px; }
.sala-info .preview { font-size: 0.85rem; color: var(--cinza-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.badge-nao-lidas { background: var(--azul-gfb); color: white; border-radius: 10px; padding: 1px 7px; font-size: 0.7rem; font-weight: 600; min-width: 18px; text-align: center; }
.sidebar-empty { padding: 30px 20px; text-align: center; color: var(--cinza-texto); font-size: 0.9rem; }

.chat-area { flex: 1; display: flex; flex-direction: column; background: var(--cinza-bg); min-width: 0; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--cinza-texto); text-align: center; padding: 20px; }
.chat-empty .emoji { font-size: 4rem; margin-bottom: 16px; }

.chat-header { background: white; padding: 14px 20px; border-bottom: 1px solid var(--cinza-borda); display: flex; align-items: center; gap: 12px; flex-shrink: 0; cursor: pointer; transition: background 0.15s; }
.chat-header:hover { background: #fafbfc; }
.chat-header .info { flex: 1; }
.chat-header .info .nome { font-weight: 600; font-size: 1rem; }
.chat-header .info .status { font-size: 0.8rem; color: var(--cinza-texto); }
.chat-header .info .status.online { color: var(--verde-online); }
.chat-header .info .status.digitando { color: var(--azul-claro); font-style: italic; }
.info-icone { font-size: 1.2rem; color: var(--cinza-texto); }

.chat-mensagens { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }

.msg-wrapper { display: flex; align-items: flex-end; gap: 4px; max-width: 75%; }
.msg-wrapper.minha { align-self: flex-end; flex-direction: row; }
.msg-wrapper.outra { align-self: flex-start; }

.msg { padding: 8px 12px; border-radius: 12px; word-wrap: break-word; line-height: 1.4; font-size: 0.95rem; position: relative; flex: 1; min-width: 0; }
.msg.minha { background: var(--azul-bolha); color: white; border-bottom-right-radius: 4px; }
.msg.outra { background: white; color: #1f2937; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.msg .remetente { font-size: 0.75rem; font-weight: 600; color: var(--azul-claro); margin-bottom: 3px; }
.msg .meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; font-size: 0.7rem; opacity: 0.8; }
.msg.minha .meta { color: rgba(255,255,255,0.85); }
.msg.outra .meta { color: var(--cinza-texto); }

.editada-tag { font-style: italic; opacity: 0.7; font-size: 0.65rem; }
.visto { font-weight: bold; letter-spacing: -2px; font-size: 0.85rem; }
.visto.entregue { color: rgba(255,255,255,0.6); }
.visto.lida { color: var(--azul-visto); }

.msg.apagada .conteudo { font-style: italic; opacity: 0.7; }

.msg-sistema {
  align-self: center;
  background: rgba(30, 58, 95, 0.08);
  color: var(--azul-gfb);
  font-size: 0.78rem;
  padding: 5px 14px;
  border-radius: 12px;
  margin: 6px 0;
  font-style: italic;
}

.msg-acoes { position: relative; opacity: 0; transition: opacity 0.15s; margin-bottom: 6px; flex-shrink: 0; }
.msg-wrapper.minha:hover .msg-acoes { opacity: 1; }
.btn-msg-acoes { background: var(--cinza-borda); color: #1f2937; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.btn-msg-acoes:hover { background: #d1d5db; }

.msg-menu { position: absolute; bottom: 30px; right: 0; background: white; border: 1px solid var(--cinza-borda); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 10; min-width: 180px; overflow: hidden; }
.msg-menu button { display: block; width: 100%; background: none; border: none; padding: 9px 14px; text-align: left; font-size: 0.85rem; cursor: pointer; color: #1f2937; white-space: nowrap; }
.msg-menu button:hover { background: var(--cinza-claro); }
.msg-menu button.apagar { color: var(--erro); }

.separador-dia { align-self: center; background: rgba(0,0,0,0.08); color: var(--cinza-texto); padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; margin: 10px 0; }

/* ===== Barra de edição ===== */
.barra-edicao {
  background: #fef3c7;
  border-top: 1px solid #fde68a;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #92400e;
  font-weight: 500;
}
.barra-edicao button {
  background: none;
  border: none;
  color: #92400e;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.barra-edicao button:hover { background: rgba(146, 64, 14, 0.1); }

/* ===== ANEXOS ===== */
.anexo-imagem { margin: 4px 0 6px; max-width: 280px; border-radius: 8px; overflow: hidden; }
.anexo-imagem a { display: block; }
.anexo-imagem img { display: block; width: 100%; max-height: 320px; object-fit: cover; cursor: zoom-in; }

.anexo-arquivo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 4px 0 6px; background: rgba(255,255,255,0.15); border-radius: 8px; text-decoration: none; color: inherit; transition: background 0.15s; min-width: 220px; }
.msg.outra .anexo-arquivo { background: var(--cinza-claro); }
.anexo-arquivo:hover { background: rgba(255,255,255,0.25); }
.msg.outra .anexo-arquivo:hover { background: #e5e7eb; }
.anexo-icone { font-size: 1.8rem; flex-shrink: 0; }
.anexo-info { flex: 1; min-width: 0; }
.anexo-nome { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anexo-tam { font-size: 0.75rem; opacity: 0.75; margin-top: 2px; }
.anexo-baixar { font-size: 1.2rem; opacity: 0.7; }

.preview-anexo { background: white; padding: 10px 16px; border-top: 1px solid var(--cinza-borda); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.preview-info > span { font-size: 1.8rem; flex-shrink: 0; }
.preview-nome { font-weight: 600; font-size: 0.9rem; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.preview-tamanho { font-size: 0.78rem; color: var(--cinza-texto); margin-top: 2px; }
.btn-cancelar-anexo { background: var(--cinza-claro); color: var(--cinza-texto); border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 1.1rem; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.btn-cancelar-anexo:hover { background: #fee2e2; color: var(--erro); }

/* ===== INPUT ===== */
.chat-input { background: white; padding: 12px 16px; border-top: 1px solid var(--cinza-borda); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.chat-input textarea { flex: 1; border: 1px solid var(--cinza-borda); border-radius: 20px; padding: 10px 16px; font-size: 0.95rem; resize: none; min-height: 40px; max-height: 120px; font-family: inherit; }
.chat-input textarea:focus { outline: none; border-color: var(--azul-claro); }

.btn-anexar, .btn-emoji, .btn-enviar { border: none; border-radius: 50%; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
.btn-anexar, .btn-emoji { background: var(--cinza-claro); color: var(--cinza-texto); }
.btn-anexar:hover, .btn-emoji:hover { background: #e5e7eb; color: var(--azul-gfb); }
.btn-enviar { background: var(--azul-gfb); color: white; }
.btn-enviar:hover:not(:disabled) { background: #15294a; }
.btn-enviar:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== EMOJI PICKER ===== */
.emoji-picker { display: none; flex-direction: column; width: 340px; height: 380px; background: white; border: 1px solid var(--cinza-borda); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 1000; overflow: hidden; }
.emoji-abas { display: flex; border-bottom: 1px solid var(--cinza-borda); background: var(--cinza-bg); padding: 4px; gap: 2px; }
.emoji-aba { flex: 1; background: none; border: none; cursor: pointer; padding: 8px 4px; font-size: 1.2rem; border-radius: 6px; transition: background 0.15s; }
.emoji-aba:hover { background: rgba(0,0,0,0.05); }
.emoji-aba.ativa { background: var(--azul-gfb); }
.emoji-titulo { padding: 8px 14px; font-size: 0.8rem; color: var(--cinza-texto); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--cinza-claro); background: white; }
.emoji-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; background: white; }
.emoji-btn { background: none; border: none; cursor: pointer; font-size: 1.4rem; padding: 6px; border-radius: 6px; line-height: 1; transition: background 0.1s; }
.emoji-btn:hover { background: var(--cinza-claro); transform: scale(1.15); }
.emoji-vazio { grid-column: 1 / -1; padding: 30px 20px; text-align: center; color: var(--cinza-texto); font-size: 0.85rem; }

/* ===== Modais ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.aberto { display: flex; }
.modal { background: white; border-radius: 12px; width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--cinza-borda); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.1rem; color: var(--azul-gfb); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--cinza-texto); line-height: 1; }
.modal-body { overflow-y: auto; }
.modal-busca { padding: 12px 20px; border-bottom: 1px solid var(--cinza-borda); }
.modal-busca input { width: 100%; padding: 8px 12px; border: 1px solid var(--cinza-borda); border-radius: 6px; font-size: 0.9rem; }
.modal-lista { flex: 1; overflow-y: auto; }
.modal-lista .usuario-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; border-bottom: 1px solid var(--cinza-claro); }
.modal-lista .usuario-item:hover { background: var(--cinza-claro); }
.modal-lista .usuario-item .dados { flex: 1; }
.modal-lista .usuario-item .nome { font-weight: 600; font-size: 0.95rem; }
.modal-lista .usuario-item .cargo { font-size: 0.8rem; color: var(--cinza-texto); }

.modal-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--cinza-borda); }
.btn-cancelar { background: var(--cinza-claro); color: #1f2937; border: none; padding: 9px 18px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.btn-cancelar:hover { background: #e5e7eb; }
.btn-primario { background: var(--azul-gfb); color: white; border: none; padding: 9px 18px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-primario:hover { background: var(--azul-gfb-escuro); }
.btn-primario.btn-perigo { background: var(--erro); }
.btn-primario.btn-perigo:hover { background: #b91c1c; }

/* Lista com checkbox (grupos) */
.lista-membros-selecionar {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  background: white;
}
.usuario-item-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--cinza-claro);
}
.usuario-item-checkbox:last-child { border-bottom: none; }
.usuario-item-checkbox:hover { background: var(--cinza-claro); }
.usuario-item-checkbox input[type="checkbox"] { cursor: pointer; width: 18px; height: 18px; accent-color: var(--azul-gfb); }
.usuario-item-checkbox .sala-avatar { width: 38px; height: 38px; font-size: 0.85rem; }
.usuario-item-checkbox .dados { flex: 1; min-width: 0; }
.usuario-item-checkbox .nome { font-weight: 600; font-size: 0.9rem; }
.usuario-item-checkbox .cargo { font-size: 0.78rem; color: var(--cinza-texto); }
#contador-membros { font-weight: normal; color: var(--cinza-texto); font-size: 0.85rem; }

/* ===== Info do grupo ===== */
.info-grupo-cabecalho {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cinza-borda);
  margin-bottom: 16px;
}
.info-grupo-nome { font-weight: 600; font-size: 1.1rem; color: var(--azul-gfb); }
.info-grupo-desc { color: var(--cinza-texto); font-size: 0.88rem; margin-top: 4px; }

.info-grupo-secao { margin-bottom: 18px; }
.info-grupo-secao-titulo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}
.btn-acao-grupo {
  background: var(--cinza-claro);
  color: var(--azul-gfb);
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-acao-grupo:hover { background: #e5e7eb; }

.lista-participantes { max-height: 240px; overflow-y: auto; }
.participante-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--cinza-claro);
}
.participante-item:last-child { border-bottom: none; }
.participante-item .sala-avatar { width: 38px; height: 38px; font-size: 0.85rem; }
.participante-item .dados { flex: 1; min-width: 0; }
.participante-item .nome { font-weight: 600; font-size: 0.9rem; }
.participante-item .cargo { font-size: 0.78rem; color: var(--cinza-texto); }

.tag-papel {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 4px;
}

.info-grupo-acoes { margin-top: 20px; text-align: center; }

/* ===== Confirmação ===== */
.confirm-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.confirm-overlay.aberto { display: flex; }
.confirm-box { background: white; border-radius: 10px; padding: 24px; max-width: 420px; width: 100%; text-align: center; }
.confirm-box h3 { color: var(--azul-gfb); margin-bottom: 10px; }
.confirm-box p { color: var(--cinza-texto); margin-bottom: 20px; font-size: 0.95rem; }
.confirm-box .botoes { display: flex; gap: 10px; justify-content: center; }
.confirm-box button { padding: 9px 20px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; }
.confirm-box .btn-confirmar { background: var(--erro); color: white; }
.confirm-box .btn-confirmar.btn-sucesso { background: var(--sucesso); }

/* =====================================================
   ADMIN
   ===================================================== */
body.admin { background: var(--cinza-bg); min-height: 100vh; }
.admin-main { padding: 24px 20px 0; }
.admin-container { max-width: 1900px; margin: 0 auto; }
.admin-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.admin-topo h2 { color: var(--azul-gfb); font-size: 1.4rem; }
.admin-filtros { background: white; border: 1px solid var(--cinza-borda); border-radius: 8px; padding: 14px; margin-bottom: 18px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 10px; }
.admin-filtros input, .admin-filtros select { padding: 8px 12px; border: 1px solid var(--cinza-borda); border-radius: 6px; font-size: 0.9rem; background: white; }
.admin-filtros input:focus, .admin-filtros select:focus { outline: none; border-color: var(--azul-claro); }
.admin-tabela-wrap { background: white; border: 1px solid var(--cinza-borda); border-radius: 8px; overflow-x: auto; }
.admin-tabela { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-tabela th { background: var(--azul-gfb); color: white; padding: 12px 14px; text-align: left; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.3px; }
.admin-tabela th.acoes-col { text-align: center; min-width: 280px; }
.admin-tabela td { padding: 12px 14px; border-bottom: 1px solid var(--cinza-claro); }
.admin-tabela tr:hover { background: #fafbfc; }
.admin-tabela tr.linha-inativa { opacity: 0.55; }
.admin-tabela td.acoes-col { text-align: center; }
.tag-perfil, .tag-status { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.tag-perfil.admin { background: #fef3c7; color: #92400e; }
.tag-perfil.usuario { background: #dbeafe; color: #1e40af; }
.tag-status.ativo { background: #dcfce7; color: #166534; }
.tag-status.inativo { background: #fee2e2; color: #991b1b; }
.btn-acao { background: var(--cinza-claro); color: #1f2937; border: none; padding: 5px 10px; border-radius: 5px; font-size: 0.78rem; cursor: pointer; margin: 0 2px; transition: background 0.15s; }
.btn-acao:hover:not(:disabled) { background: #e5e7eb; }
.btn-acao:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-acao.perigo { background: #fee2e2; color: var(--erro); }
.btn-acao.perigo:hover:not(:disabled) { background: #fecaca; }
.btn-acao.sucesso { background: #dcfce7; color: #166534; }
.btn-acao.sucesso:hover:not(:disabled) { background: #bbf7d0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group-admin { margin-bottom: 14px; }
.form-group-admin label { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-group-admin input[type="text"], .form-group-admin input[type="email"], .form-group-admin input[type="password"], .form-group-admin select { width: 100%; padding: 9px 12px; border: 1px solid var(--cinza-borda); border-radius: 6px; font-size: 0.95rem; background: white; }
.form-group-admin input:focus, .form-group-admin select:focus { outline: none; border-color: var(--azul-claro); }
.modal-body .mensagem.erro { background: #fee2e2; color: var(--erro); border: 1px solid #fecaca; }
.senha-gerada { background: var(--cinza-claro); border: 2px dashed var(--azul-gfb); border-radius: 8px; padding: 16px; font-family: 'Courier New', monospace; font-size: 1.4rem; font-weight: bold; color: var(--azul-gfb); letter-spacing: 2px; user-select: all; }

.footer-home { border-top: 1px solid var(--cinza-borda); margin-top: 40px; padding: 14px; text-align: center; color: var(--cinza-texto); font-size: 0.8rem; }

/* Responsivo */
@media (max-width: 900px) { .admin-filtros { grid-template-columns: 1fr 1fr; } .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .sidebar { width: 100%; }
  .chat-layout.com-sala-ativa .sidebar { display: none; }
  .chat-layout:not(.com-sala-ativa) .chat-area { display: none; }
  .msg-acoes { opacity: 1; }
  .msg-wrapper { max-width: 85%; }
  .admin-filtros { grid-template-columns: 1fr; }
  .admin-tabela th.acoes-col { min-width: auto; }
  .preview-nome { max-width: 200px; }
  .emoji-picker { width: calc(100vw - 20px); max-width: 340px; }
  .emoji-grid { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 480px) {
  .home-header { padding: 10px 14px; }
  .home-header h1 { font-size: 1rem; }
  .home-header .brand img { height: 30px; }
  .user-info { gap: 6px; }
  .user-info .nome { display: none; }
  .login-body { padding: 10px 22px 24px; }
}
