:root {
  --bg: #101216;
  --panel: #171a1f;
  --card: #1d2127;
  --line: #262b33;
  --text: #e6e8eb;
  --muted: #8b929c;
  --focus: #6ea8fe;

  --s-aguardando_informacoes: #6b7280;
  --s-fazer: #f97316;
  --s-fazendo: #3b82f6;
  --s-aguardando_revisao: #eab308;
  --s-terminado: #22c55e;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Topo */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 600; font-size: 16px; letter-spacing: .01em; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right form { margin: 0; }
.who { color: var(--muted); }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
}
.link:hover { color: var(--text); }

.bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.bell:hover { color: var(--text); background: var(--panel); }

.bell-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--s-fazer);
  color: #101216;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* Kanban */

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 24px;
  height: calc(100% - 52px);
}

.column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
}

.column-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }

.cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  position: relative;
  padding: 12px 12px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--strip, var(--line));
}

.s-aguardando_informacoes { --strip: var(--s-aguardando_informacoes); }
.s-fazer { --strip: var(--s-fazer); }
.s-fazendo { --strip: var(--s-fazendo); }
.s-aguardando_revisao { --strip: var(--s-aguardando_revisao); }
.s-terminado { --strip: var(--s-terminado); }

/* Login */

body.login { display: grid; place-items: center; }

.login-card {
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.login-card h1 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }

.login-card label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }

.login-card input {
  height: 40px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.login-card button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}
.login-card button:hover { background: #fff; }

.error { margin: 0; color: #f87171; }

@media (max-width: 1000px) {
  .board {
    grid-template-columns: repeat(5, minmax(240px, 1fr));
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
