:root {
  --ink: #0b3b45;
  --teal: #127475;
  --mint: #52b69a;
  --light: #eef6f4;
  --text: #1f2a2e;
  --muted: #5b6b70;
  --linha: #d8e4e1;
  --amber: #e09f3e;
  --erro: #b3261e;
  --bg: #f7faf9;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.oculto { display: none !important; }

/* login */
.tela-login { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 1rem; }
.card-login {
  background: #fff; padding: 2rem; border-radius: 14px; width: min(380px, 100%);
  display: flex; flex-direction: column; gap: .75rem;
}
.card-login h1 { margin: 0; color: var(--ink); font-size: 1.6rem; }
.card-login .sub { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; }

label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); }
input, select, textarea {
  padding: .6rem .7rem; border: 1px solid var(--linha); border-radius: 8px;
  font-size: .95rem; font-family: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--mint); border-color: transparent; }
button {
  background: var(--teal); color: #fff; border: 0; padding: .65rem 1.1rem;
  border-radius: 8px; font-size: .95rem; cursor: pointer; font-family: inherit;
}
button:hover { background: var(--ink); }
button.link { background: none; color: var(--light); text-decoration: underline; padding: 0; }
button.secundario { background: #fff; color: var(--teal); border: 1px solid var(--linha); }
.erro { color: var(--erro); font-size: .85rem; margin: .2rem 0 0; }
.ok { color: var(--teal); font-size: .85rem; }

/* topo */
header {
  background: var(--ink); color: #fff; padding: .8rem 1.2rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.marca { font-size: 1.15rem; font-weight: 600; }
.marca span { color: var(--mint); }
nav { display: flex; gap: .4rem; flex: 1; }
.aba {
  background: transparent; border: 1px solid rgba(255,255,255,.25);
  color: #cfe3df; padding: .4rem .85rem; font-size: .9rem;
}
.aba.ativa { background: var(--mint); border-color: var(--mint); color: #06282b; }
.topo-dir { display: flex; align-items: center; gap: 1rem; }
.pill { background: rgba(255,255,255,.14); padding: .3rem .7rem; border-radius: 20px; font-size: .8rem; }

main { padding: 1.2rem; }
.view { max-width: 1500px; margin: 0 auto; }
.painel {
  background: #fff; border: 1px solid var(--linha); border-radius: 12px;
  padding: 1.2rem; margin-bottom: 1rem;
}
.painel h2 { margin: 0 0 .9rem; font-size: 1.05rem; color: var(--ink); }
.linha { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.linha label { flex: 1; min-width: 160px; }
.linha label.curto { max-width: 90px; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; }
textarea { width: 100%; font-family: inherit; }
.dica { color: var(--muted); font-size: .85rem; margin: .8rem 0 0; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: .7rem; }
.coluna { background: var(--light); border-radius: 10px; padding: .6rem; min-height: 65vh; }
.coluna.destino { outline: 2px dashed var(--mint); }
.coluna h3 {
  margin: .1rem 0 .7rem; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--teal); display: flex; justify-content: space-between;
}
.card {
  background: #fff; border: 1px solid var(--linha); border-radius: 8px;
  padding: .65rem; margin-bottom: .55rem; cursor: grab; font-size: .85rem;
}
.card:hover { border-color: var(--mint); }
.card.arrastando { opacity: .4; }
.card .nome { font-weight: 600; color: var(--ink); margin-bottom: .25rem; }
.card .meta { color: var(--muted); font-size: .75rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.badge {
  background: var(--light); color: var(--teal); border-radius: 4px;
  padding: .05rem .35rem; font-size: .7rem; font-weight: 600;
}
.badge.alto { background: #dff3ec; color: #0f6e56; }
.badge.msg { background: #fdf3e3; color: #8a5a12; }
.vazio { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* modal */
.modal {
  position: fixed; inset: 0; background: rgba(11,59,69,.55);
  display: grid; place-items: center; padding: 1rem; z-index: 50;
}
.modal-caixa {
  background: #fff; border-radius: 14px; width: min(720px, 100%);
  max-height: 90vh; overflow: auto; padding: 1.4rem; position: relative;
}
.fechar {
  position: absolute; top: .6rem; right: .8rem; background: none;
  color: var(--muted); font-size: 1.6rem; line-height: 1; padding: 0;
}
.fechar:hover { background: none; color: var(--ink); }
.conversa { border: 1px solid var(--linha); border-radius: 8px; padding: .7rem; max-height: 240px; overflow: auto; background: var(--bg); }
.bolha { padding: .45rem .6rem; border-radius: 8px; margin-bottom: .4rem; font-size: .85rem; white-space: pre-wrap; }
.bolha.enviada { background: #dff3ec; margin-left: 15%; }
.bolha.recebida { background: #fff; border: 1px solid var(--linha); margin-right: 15%; }
.bolha .quando { display: block; font-size: .68rem; color: var(--muted); margin-top: .2rem; }
.acoes { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.job { border-bottom: 1px solid var(--linha); padding: .6rem 0; font-size: .85rem; }
.job:last-child { border-bottom: 0; }
.job .status { font-weight: 600; }
.job pre {
  background: var(--bg); padding: .5rem; border-radius: 6px; max-height: 130px;
  overflow: auto; font-size: .72rem; margin: .4rem 0 0; white-space: pre-wrap;
}
@media (max-width: 1100px) { .board { grid-template-columns: repeat(3, minmax(200px, 1fr)); } }
@media (max-width: 700px) { .board { grid-template-columns: 1fr; } .coluna { min-height: auto; } }
