/* =========================================================
   SWC PMO · histogram.css — Sprint 6
   Filter bar (tabs MO/Eq, granularidade Semana/Mês),
   gráfico de barras CSS plan vs real, tabela cross.
========================================================= */

.hist-filterbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #161b27;
  border: 1px solid #252d3d;
  border-radius: 12px;
}

.hist-tabs, .hist-grans {
  display: inline-flex;
  background: rgba(255, 255, 255, .04);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.hist-tab, .hist-gran {
  background: none;
  border: 0;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #8892a4;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.hist-tab:hover, .hist-gran:hover { color: #cbd5e1; }
.hist-tab--on {
  background: rgba(255, 255, 255, .06);
  color: var(--c, #fbbf24);
  box-shadow: inset 0 0 0 1px var(--c, #fbbf24);
}
.hist-gran--on {
  background: rgba(245, 158, 11, .12);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35);
}

.hist-kpis {
  display: flex;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}
.hist-kpis span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hist-kpis small {
  font-size: 9.5px;
  font-weight: 800;
  color: #8892a4;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hist-kpis b {
  font-size: 14px;
  color: #f1f5f9;
  font-weight: 800;
}

/* ── chart ─────────────────────────────────────────── */
.hist-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 14px 12px 8px;
  min-height: 220px;
  overflow-x: auto;
}
.hist-col {
  flex: 1 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
}
.hist-col__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 200px;
  width: 100%;
  justify-content: center;
}
.hist-col__bar {
  flex: 1;
  max-width: 18px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height .35s ease;
  cursor: help;
}
.hist-col__bar span {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}
.hist-col__bar--plan { background: linear-gradient(180deg, #60a5fa, #3b82f6); }
.hist-col__bar--real { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.hist-col__lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: #8892a4;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ── cross table (recursos × períodos) ────────────── */
.hist-cross th, .hist-cross td {
  font-size: 11.5px;
  padding: 6px 8px !important;
}
.hist-cell {
  text-align: center;
  background: rgba(255, 255, 255, .015);
  min-width: 56px;
}
.hist-cell small { display: inline-block; font-weight: 700; }
