/* ══════════════════════════════════════════════════════════════
   PAINEL ESTATÍSTICO – CADREDOR
   Arquivo: styles.css
   ══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   1. VARIÁVEIS / RESET BASE
   ───────────────────────────────────────────── */
:root {
  --azul: #1e6496;
  --azul2: #42c0bf;
  --dourado: #bea041;
  --verde: #507d50;
  --branco: #FFFFFF;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6fa;
  margin: 0;
  color: #1c1c1c;
}

/* ─────────────────────────────────────────────
   2. CABEÇALHO
   ───────────────────────────────────────────── */
#cabecalho-painel {
  background: var(--azul);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  width: 100%;
  box-sizing: border-box;
}

.bloco-logo-titulo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.logo-svg {
  width: 96px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
}

.titulo-texto {
    flex: 1;
    display: flex;
    justify-content: center;
}

.titulo-texto h2 {
  color: #fff;
  font-weight: 700;
  margin: 0;
  font-size: clamp(14px, 2vw, 19px);
  line-height: 1.2;
  text-align: center;
}

.bloco-gov {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gov-label {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   3. BARRA DE NAVEGAÇÃO (ABAS)
   ───────────────────────────────────────────── */
#barra-nav {
  background: var(--azul2);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 0;
  min-height: 30px;
  overflow-x: auto;
  white-space: nowrap;
}

.aba-btn {
  color: #fff !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit;
}

.aba-btn.ativa {
  background: var(--dourado) !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
}

.aba-btn:hover:not(.ativa) {
  background: rgba(255, 255, 255, 0.13) !important;
}

/* ─────────────────────────────────────────────
   4. BOTÕES DE AÇÃO
   ───────────────────────────────────────────── */
.btn-limpar {
  background: var(--verde) !important;
  color: #fff !important;
  border-radius: 999px !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 7px 20px !important;
  font-size: 13px !important;
  cursor: pointer;
  font-family: inherit;
}

.btn-limpar:hover {
  filter: brightness(1.08);
}

/* ─────────────────────────────────────────────
   5. PAINEL DE FILTROS (LATERAL)
   ───────────────────────────────────────────── */
.painel-filtros {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #dde3f0;
  height: 100%;
}

.painel-filtros h4 {
  color: var(--azul);
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--dourado);
}

.filtro-label {
  font-size: 11px;
  color: #444;
  margin-top: 10px;
  margin-bottom: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.painel-filtros select {
  width: 100%;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cfd7e3;
  background: #fff;
  color: #1c1c1c;
  font-family: inherit;
}

/* ─────────────────────────────────────────────
   6. VALUE BOXES (INDICADORES / KPIs)
   ───────────────────────────────────────────── */
.value-box {
  border-radius: 8px;
  padding: 14px 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
}

.value-box .icon {
  font-size: 26px;
  opacity: .85;
}

.value-box .value {
  font-size: 2.0em !important;
  font-weight: 800 !important;
  line-height: 1;
}

.value-box .caption {
  font-size: 16px !important;
  opacity: .92;
  margin-top: 4px;
}

/* ─────────────────────────────────────────────
   7. GRÁFICOS (WRAPPERS)
   ───────────────────────────────────────────── */
.chart-wrapper {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dde3f0;
  padding: 14px 16px 8px;
}

.chart-title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  margin-bottom: 6px;
  text-align: center;
}

.chart-wrapper canvas {
  max-width: 100%;
}

.chart-tall canvas {
  height: 300px !important;
}

/* ── Card "Evolução do Quantitativo de Ingressos" ── */
.chart-ingressos {
  box-shadow: 0 1px 4px rgba(30, 100, 150, 0.08);
}

.chart-ingressos .chart-title {
  text-align: left;
  color: var(--azul);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.ingressos-corpo {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.ingressos-grafico {
  flex: 1;
  min-width: 0;
}

.chart-mid canvas {
  height: 230px !important;
}

/* ─────────────────────────────────────────────
   8. LAYOUT EM GRID (CONTAINER / LINHAS)
   ───────────────────────────────────────────── */
.container {
  width: 96%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 16px;
}

.row-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}

.row-clear {
  display: flex;
  justify-content: flex-end;
  padding: 6px 4px 12px;
}

.row-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  /* ~750 / 280 proporção original */
  gap: 14px;
  margin-bottom: 14px;
}

.row-tri {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* ─────────────────────────────────────────────
   9. ABAS EM CONSTRUÇÃO (PLACEHOLDER)
   ───────────────────────────────────────────── */
.aba-placeholder {
  background: #fff;
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  padding: 50px 24px;
  text-align: center;
  color: #5b6b7c;
}

.aba-placeholder strong {
  color: var(--azul);
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}


/* RODAPÉ */

.fim {
  text-align: center;
  margin: 20px 0;
  font-size: 14px;
}

/* ─────────────────────────────────────────────
   10. RESPONSIVIDADE
   ───────────────────────────────────────────── */
@media (max-width: 980px) {
  .row-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-main {
    grid-template-columns: 1fr;
  }

  .row-tri {
    grid-template-columns: 1fr;
  }
}