* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; }

body {
  min-height: 100vh;
  background: #eef1f6;
  color: #1f2430;
}

.hidden { display: none !important; }

/* ===== Topbar ===== */
.topbar {
  background: #1f2a44;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-weight: 700; font-size: 18px; }
.user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.badge {
  background: #3d6bff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.user-info button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.user-info button:hover { background: rgba(255,255,255,0.1); }

/* ===== Container geral ===== */
.container {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

/* ===== Card de login/cadastro ===== */
.card {
  background: #fff;
  width: 100%;
  max-width: 380px;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.card.wide { max-width: 900px; }

.card h1 { font-size: 22px; margin-bottom: 6px; color: #1f2a44; }

.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #444; }
.field input, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.field input:focus, .field select:focus { border-color: #3d6bff; }

button[type="submit"] {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #3d6bff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button[type="submit"]:hover { opacity: 0.92; }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

.msg { font-size: 13px; color: #e53935; min-height: 18px; margin-bottom: 6px; }
.hint { font-size: 12px; color: #999; margin-bottom: 12px; }
.subtitle { color: #777; font-size: 14px; margin-bottom: 20px; }

/* ===== Chat ===== */
.chat-layout {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  min-height: 520px;
}
.contatos {
  background: #f7f8fb;
  border-right: 1px solid #eee;
  padding: 20px;
}
.contatos h2 { font-size: 15px; margin-bottom: 14px; color: #444; }
.contato-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 4px;
}
.contato-item:hover { background: #ececf5; }
.contato-item.ativo { background: #3d6bff; color: #fff; }

.conversa { display: flex; flex-direction: column; }
.conversa-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  color: #444;
}
.conversa-mensagens {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bolha {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.bolha.minha { align-self: flex-end; background: #3d6bff; color: #fff; border-bottom-right-radius: 4px; }
.bolha.dele { align-self: flex-start; background: #f0f1f5; color: #222; border-bottom-left-radius: 4px; }

.conversa-input {
  display: flex;
  padding: 14px;
  border-top: 1px solid #eee;
  gap: 10px;
}
.conversa-input input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.conversa-input button {
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: #3d6bff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.conversa-input button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Admin ===== */
.tabela-admin { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela-admin th, .tabela-admin td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; }
.tabela-admin th { color: #777; font-size: 12px; text-transform: uppercase; }
