/* Estilo mínimo -- só o suficiente pra ler/usar sem ficar feio, sem framework. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #1c1e21;
}

header {
  background: #1c1e21;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

header .acoes button {
  margin-left: 8px;
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

h1, h2, h3 {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

th {
  color: #666;
  font-weight: 600;
}

tr:hover td {
  background: #fafafa;
}

button {
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
}

button:hover {
  background: #f0f0f0;
}

button.primario {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

button.primario:hover {
  background: #1d4ed8;
}

button.perigo {
  border-color: #dc2626;
  color: #dc2626;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input, textarea, select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  margin-top: 12px;
  color: #444;
}

.linha {
  display: flex;
  gap: 12px;
}

.linha > * {
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.ok { background: #dcfce7; color: #166534; }
.badge.alerta { background: #fef3c7; color: #92400e; }
.badge.erro { background: #fee2e2; color: #991b1b; }
.badge.neutro { background: #e5e7eb; color: #374151; }

.erro-msg {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}

.vazio {
  color: #888;
  font-size: 14px;
  padding: 12px 0;
}

.login-box {
  max-width: 380px;
  margin: 80px auto;
}

.mensagens {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #fafafa;
  border-radius: 6px;
  margin-bottom: 12px;
}

.mensagem {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.mensagem .meta {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

.mensagem.entrada {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.mensagem.saida {
  align-self: flex-end;
  background: #dbeafe;
}

.mensagem.saida.humano {
  background: #fde68a;
}

.progresso {
  width: 100%;
  background: #e5e7eb;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  margin: 8px 0;
}

.progresso .barra {
  height: 100%;
  background: #2563eb;
}

.modal-fundo {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-fundo[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
}
