/* ── Painel inicial = quadro livre (mural) ──────────────────────────────── */
#dashboard { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 24px 12px; flex-shrink: 0;
}
.dash-ola { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.dash-data { margin: 5px 0 0; font-size: 13px; color: var(--text-muted); text-transform: capitalize; }

.dash-actions { display: flex; align-items: flex-end; gap: 14px; }
.dash-colig { display: flex; flex-direction: column; gap: 5px; min-width: 190px; }
.dash-colig > span { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-subtle); }
.dash-colig select {
  height: 38px; padding: 0 10px; font-family: inherit; font-size: 13px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm, 6px);
}
.dash-colig select:focus { outline: none; border-color: var(--accent); }

.dash-add-wrap { position: relative; }
.dash-catalogo {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 6px; min-width: 230px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 2px;
}
.dash-cat-item {
  text-align: left; background: none; border: none; color: var(--text);
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.dash-cat-item:hover { background: var(--surface-hover); color: var(--mint); }
.dash-cat-vazio { padding: 10px; font-size: 12px; color: var(--text-subtle); }

/* Área do quadro (canvas livre) — ocupa toda a tela, sem "caixa" */
.dash-board {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: auto;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(circle, var(--grid-dot) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg-elevated);
}
.board-vazio {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.7;
}

/* Card = "foto" no quadro */
.board-card {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.board-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border); cursor: grab; touch-action: none;
}
.board-head:active { cursor: grabbing; }
.board-title { flex: 1; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-tipo {
  font-family: inherit; font-size: 11px; padding: 2px 4px; border-radius: 5px;
  background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); cursor: pointer;
}
.board-tipo:hover { color: var(--text); border-color: var(--accent); }
.board-x { background: none; border: none; color: var(--text-subtle); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.board-x:hover { color: var(--danger); }
.board-body { flex: 1; min-height: 0; padding: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* Alça de redimensionar (canto inf. dir.) — sem rotação, cards sempre retos */
.board-resize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 45%, var(--border-strong) 45%, var(--border-strong) 55%, transparent 55%);
  opacity: 0; transition: opacity 0.12s;
}
.board-card:hover .board-resize { opacity: 1; }

/* Gráficos SVG (preenchem o corpo do card) */
.dash-svg { width: 100%; height: 100%; min-height: 120px; }
.dash-axis { fill: var(--text-subtle); font-size: 9px; }
.dash-val { fill: var(--text-muted); font-size: 9px; font-weight: 600; }
.dash-pct { color: var(--text-subtle); margin-left: auto; }
.dash-leg { justify-content: flex-start; }
.dash-donut { display: flex; align-items: center; gap: 14px; width: 100%; }
.dash-svg-donut { width: 120px; height: 120px; flex-shrink: 0; }
.dash-legs { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.dash-leg { display: flex; align-items: center; gap: 7px; }
.dash-leg .dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dash-leg b { color: var(--text); font-weight: 700; }

.dash-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-subtle); background: var(--surface-hover);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 7px; cursor: help;
}
