* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Segoe UI, Arial, sans-serif;
  background: #0079bf;
  color: #172b4d;
  min-height: 100vh;
}

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; }
.login-box {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-box label { display: flex; flex-direction: column; font-size: 14px; gap: 4px; }
.login-box input { padding: 8px; font-size: 15px; }
.erro { background: #ffebe6; color: #bf2600; padding: 8px; border-radius: 4px; }

/* ---------- Topo ---------- */
.topo {
  background: rgba(0,0,0,.3);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topo div { display: flex; gap: 8px; align-items: center; }

/* ---------- Botões ---------- */
button, .btn-sec {
  background: #fff;
  border: 0;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  color: #172b4d;
  font-size: 14px;
  font-family: inherit;
}
button:hover, .btn-sec:hover { background: #e4e6ea; }
.btn-sec { background: rgba(255,255,255,.2); color: #fff; }
.btn-sec:hover { background: rgba(255,255,255,.35); }
.btn-primario { background: #0c66e4; color: #fff; }
.btn-primario:hover { background: #0055cc; }
.btn-perigo { background: #c9372c; color: #fff; }
.btn-perigo:hover { background: #ae2a19; }
.btn-sec-escuro { background: #dfe1e6; padding: 3px 8px; font-size: 13px; }
.btn-perigo-mini {
  background: #ffebe6;
  color: #bf2600;
  padding: 0 6px;
  margin-left: 6px;
  font-size: 12px;
}

/* ---------- Quadro e colunas ---------- */
#quadro {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  align-items: flex-start;
  min-height: calc(100vh - 50px);
}
.coluna {
  background: #ebecf0;
  border-radius: 8px;
  width: 290px;
  min-width: 290px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
}
.coluna.arrastando { opacity: .5; }
.coluna-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 8px;
  cursor: grab;
}
.coluna-topo h3 { margin: 0; font-size: 15px; }
.coluna-acoes button { padding: 2px 6px; font-size: 12px; }
.lista-tarefas { overflow-y: auto; flex: 1; min-height: 20px; padding-bottom: 4px; }
.lista-tarefas.destaque { background: #dfe1e6; border-radius: 6px; }
.btn-add-tarefa {
  background: transparent;
  text-align: left;
  margin-top: 4px;
  color: #44546f;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 0 rgba(9,30,66,.25);
  cursor: pointer;
}
.card:hover { background: #f4f5f7; }
.card.arrastando { opacity: .5; }
.card-titulo { font-size: 14px; font-weight: 600; }
.card-meta { font-size: 12px; color: #6b778c; margin-top: 4px; }
.badge-sem-permissao { font-size: 11px; color: #6b778c; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(9,30,66,.54);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.oculto { display: none; }
.modal-conteudo {
  background: #fff;
  border-radius: 8px;
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px;
  color: #172b4d;
}
.modal-topo { display: flex; justify-content: space-between; align-items: center; }
.modal-topo h2 { margin: 0; font-size: 18px; }
.modal-topo button { background: none; font-size: 22px; padding: 0 6px; }
.modal-topo button:hover { background: #f4f5f7; }

/* ---------- Formulários ---------- */
.campo { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 14px; }
.campo input, .campo textarea, .campo select {
  padding: 7px;
  font-size: 14px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  font-family: inherit;
}
.campo textarea { min-height: 80px; }
.campo input:disabled, .campo textarea:disabled { background: #f4f5f7; }

.form-usuario { display: flex; flex-direction: column; gap: 4px; }
.form-usuario .campo { margin-bottom: 6px; }
.form-usuario input:disabled { background: #f4f5f7; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; margin: 4px 0; }

.novo-evento { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.novo-evento input { padding: 7px; border: 1px solid #dfe1e6; border-radius: 4px; font-size: 14px; }
.novo-evento textarea {
  min-height: 50px;
  padding: 6px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  font-family: inherit;
}
.novo-evento button { align-self: flex-start; }

.checks-acesso label { display: block; font-size: 14px; margin-bottom: 4px; }

.acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.oculto { display: none !important; }

/* ---------- Eventos ---------- */
.evento { border: 1px solid #dfe1e6; border-radius: 6px; padding: 10px; margin-bottom: 10px; }
.evento-topo { display: flex; justify-content: space-between; font-weight: 600; }
.evento-desc { font-size: 14px; white-space: pre-wrap; margin: 6px 0; }

/* ---------- Anexos ---------- */
.anexar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.lista-anexos { font-size: 13px; }
.lista-anexos a { color: #0c66e4; word-break: break-all; }
.lista-anexos div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  gap: 8px;
}

/* ---------- Tela de usuários ---------- */
.tabela-usuarios { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.tabela-usuarios th,
.tabela-usuarios td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #dfe1e6; }
.tabela-usuarios th { background: #f4f5f7; }
.tabela-usuarios .inativo { color: #bf2600; }