/* Identidade visual extraída do site real cidadania4all.com */
:root {
  --cf-laranja: #f09f43;
  --cf-laranja-claro: #feb556;
  --cf-azul: #1f5abc;
  --cf-escuro: #20271f;
  --cf-bg: #f7f5f1;
  --cf-card: #ffffff;
  --cf-borda: #e7e0d6;
  --cf-texto: #20271f;
  --cf-texto-sutil: #726d63;
  --cf-sombra: 0 2px 10px rgba(32, 39, 31, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Rubik', -apple-system, Segoe UI, Arial, sans-serif;
  background: var(--cf-bg);
  color: var(--cf-texto);
}

h1, h2 {
  font-family: 'Barlow Condensed', 'Rubik', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ---------- login ---------- */

.tela-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cf-escuro) 0%, #2d3a26 100%);
  padding: 16px;
}

.card-login {
  background: var(--cf-card);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.logo-login { height: 48px; margin: 0 auto 8px; object-fit: contain; }
.card-login h1 { margin: 0; font-size: 1.4rem; }
.subtitulo { margin: -8px 0 10px; color: var(--cf-texto-sutil); font-size: 0.9rem; }

.card-login label {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cf-texto-sutil);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-login input {
  padding: 10px 12px;
  border: 1px solid var(--cf-borda);
  border-radius: 8px;
  font-size: 0.95rem;
}

.card-login button {
  margin-top: 6px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--cf-laranja);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}
.card-login button:hover { background: var(--cf-laranja-claro); }

.erro { color: #b3261e; font-size: 0.85rem; margin: 0; }

/* ---------- app shell ---------- */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--cf-escuro);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 64px;
  flex-wrap: wrap;
}

.logo-topo { height: 30px; object-fit: contain; }

.abas { display: flex; gap: 4px; flex: 1; }
.aba {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.aba:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.aba.ativa { color: #fff; background: var(--cf-laranja); }

.topbar-acoes { display: flex; align-items: center; gap: 14px; }
.usuario-logado { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }

.btn-primario {
  background: var(--cf-laranja);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-primario:hover { background: var(--cf-laranja-claro); }

.btn-texto {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.8;
}
.btn-texto:hover { opacity: 1; }

.btn-perigo {
  background: none;
  border: 1px solid #b3261e;
  color: #b3261e;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

main { flex: 1; padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }

.view[hidden] { display: none; }

/* ---------- lista ---------- */

.barra-filtros { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.barra-filtros input, .barra-filtros select {
  padding: 9px 12px;
  border: 1px solid var(--cf-borda);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--cf-card);
}
#busca { flex: 1; min-width: 220px; }

.tabela-wrap { background: var(--cf-card); border-radius: 12px; box-shadow: var(--cf-sombra); overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 760px; }
thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cf-texto-sutil);
  border-bottom: 1px solid var(--cf-borda);
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--cf-borda); vertical-align: top; }
tbody tr { cursor: pointer; transition: background 0.1s; }
tbody tr:hover { background: #fdf8f0; }
tbody tr:last-child td { border-bottom: none; }
.contato-sub { color: var(--cf-texto-sutil); font-size: 0.8rem; }

.badge-etapa {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- kanban ---------- */

.kanban-colunas {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-coluna {
  background: #efe9dd;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.kanban-coluna-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cf-texto-sutil);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.kanban-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 40px; }

.kanban-card {
  background: var(--cf-card);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--cf-sombra);
  cursor: grab;
  font-size: 0.85rem;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.kanban-card .meta { color: var(--cf-texto-sutil); font-size: 0.76rem; }

.kanban-coluna.sobre-drag { outline: 2px dashed var(--cf-laranja); outline-offset: -4px; }

/* ---------- modal ---------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(32, 39, 31, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal-overlay[hidden] { display: none; }

.modal-card {
  background: var(--cf-card);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 1.1rem; }

.btn-icone { background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--cf-texto-sutil); }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-form label, .label-bloco {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.78rem; font-weight: 600; color: var(--cf-texto-sutil);
}
.grid-form input, .grid-form select, .label-bloco textarea {
  padding: 9px 10px;
  border: 1px solid var(--cf-borda);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
}

.modal-acoes { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.modal-acoes-direita { display: flex; gap: 10px; }

@media (max-width: 640px) {
  .grid-form { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 12px 16px; }
}
