* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: #1c1c1e;
}

/* Login */

.cartao-login {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.cartao-login h1 { font-size: 20px; margin-bottom: 24px; }

.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; margin-bottom: 4px; color: #555; }
.campo input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
}

.botao-primario {
  width: 100%;
  padding: 10px;
  background: #075e54;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.erro { color: #b00020; font-size: 13px; margin-bottom: 16px; }

/* Nav superior (comum as 3 abas) */

.nav-superior {
  background: #075e54;
  color: #fff;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
}

.nav-abas { display: flex; gap: 4px; height: 100%; }

.nav-abas a {
  color: #d9f2ee;
  text-decoration: none;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: 14px;
  border-bottom: 3px solid transparent;
}

.nav-abas a.ativa {
  color: #fff;
  border-bottom-color: #25d366;
  font-weight: 600;
}

.nav-usuario { display: flex; align-items: center; gap: 12px; font-size: 13px; }

.nav-usuario button {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Layout estilo WhatsApp Web, duas colunas */

.app-whatsapp {
  display: flex;
  height: calc(100vh - 52px);
}

.sidebar {
  width: 380px;
  min-width: 380px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
}

.sidebar-titulo {
  padding: 14px 16px;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contato {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.contato:hover { background: #f5f5f5; }
.contato.selecionado { background: #ebebeb; }
.contato.urgente { background: #fdecef; }
.contato.urgente:hover { background: #fbdde3; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #075e54;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contato-info { flex: 1; min-width: 0; }
.contato-numero { font-size: 15px; font-weight: 500; }
.contato-hora { font-size: 11px; color: #999; white-space: nowrap; }
.contato-linha2 { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.etiqueta-urgente {
  background: #b00020;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.painel-principal {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #e5ddd5;
}

.painel-header {
  background: #f0f0f0;
  padding: 12px 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.sem-selecao {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
}

.mensagem { max-width: 65%; padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,0.08); }
.mensagem-paciente { background: #fff; align-self: flex-start; border-top-left-radius: 0; }
.mensagem-assistente { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 0; }
.hora { font-size: 10px; color: #8a8a8a; margin-top: 4px; text-align: right; }

.botao-link {
  background: none;
  border: none;
  color: #075e54;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

/* Paginas simples (agenda, cadastros) */

.conteudo { max-width: 900px; margin: 0 auto; padding: 24px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #fafafa; font-weight: 600; color: #555; }

.aviso-config {
  background: #fff8e1;
  border: 1px solid #ffe082;
  padding: 16px;
  border-radius: 6px;
  font-size: 14px;
  color: #7a5c00;
}
