/**
 * Tema Prefeitura de São José dos Campos (SJC)
 * Cores oficiais: azul e prata (identidade do município)
 * Aplica apenas quando body tem a classe .theme-sjc
 */

/* Variáveis do tema SJC */
body.theme-sjc {
  --pmsjc-primary: #004a7a;
  --pmsjc-primary-dark: #003558;
  --pmsjc-primary-light: #00609e;
  --pmsjc-silver: #a8b0b8;
  --pmsjc-silver-light: #e8eaed;
}

/* Navbar */
body.theme-sjc .navbar.bg-primary,
body.theme-sjc nav.navbar.navbar-expand-lg {
  background: linear-gradient(180deg, #004a7a 0%, #003558 100%) !important;
  border-bottom: 2px solid var(--pmsjc-silver);
}

body.theme-sjc .navbar-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  align-items: center;
}

/* Texto "Monitoramento PSR" proporcional ao brasão (42px) e centralizado */
body.theme-sjc .navbar-brand-text,
.navbar-brand-text {
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

body.theme-sjc .navbar-logo-pmsjc {
  height: 42px;
  max-height: 42px;
  width: auto;
  object-fit: contain;
  display: inline-block !important;
}

body.theme-original .navbar-logo-pmsjc,
body:not(.theme-sjc) .navbar-logo-pmsjc {
  display: none !important;
}

/* Botões primários */
body.theme-sjc .btn-primary {
  background-color: var(--pmsjc-primary) !important;
  border-color: var(--pmsjc-primary) !important;
}

body.theme-sjc .btn-primary:hover {
  background-color: var(--pmsjc-primary-dark) !important;
  border-color: var(--pmsjc-primary-dark) !important;
}

body.theme-sjc .btn-outline-primary {
  color: var(--pmsjc-primary) !important;
  border-color: var(--pmsjc-primary) !important;
}

body.theme-sjc .btn-outline-primary:hover {
  background-color: var(--pmsjc-primary) !important;
  color: #fff !important;
}

/* Cards: cabeçalhos com cor SJC */
body.theme-sjc .card-header {
  background-color: var(--pmsjc-silver-light) !important;
  color: #1a1a1a;
  border-bottom: 1px solid var(--pmsjc-silver);
  font-weight: 600;
}

body.theme-sjc .card-header.bg-primary,
body.theme-sjc .card-header.py-2.bg-primary {
  background: linear-gradient(135deg, #004a7a 0%, #003558 100%) !important;
  color: #fff !important;
  border-bottom: none;
}

/* Badge */
body.theme-sjc .badge.bg-primary {
  background-color: var(--pmsjc-primary) !important;
}

/* Tabela: linha selecionada */
body.theme-sjc .table-primary,
body.theme-sjc tr.table-primary td {
  background-color: rgba(0, 74, 122, 0.12) !important;
  color: inherit;
}

/* KPI cards (Total de Pessoas, Migrantes, etc.) - manter contraste elegante */
body.theme-sjc .card.text-white.bg-info .card-header,
body.theme-sjc .card.text-white.bg-info .card-body { background: transparent !important; }
body.theme-sjc .card.text-white.bg-info { background: linear-gradient(135deg, #004a7a 0%, #00609e 100%) !important; }

body.theme-sjc .card.text-white.bg-warning .card-header,
body.theme-sjc .card.text-white.bg-warning .card-body { background: transparent !important; }
body.theme-sjc .card.text-white.bg-warning { background: linear-gradient(135deg, #8b6914 0%, #b8860b 100%) !important; }

body.theme-sjc .card.text-white.bg-success .card-header,
body.theme-sjc .card.text-white.bg-success .card-body { background: transparent !important; }

/* Toggle do tema (link no navbar) */
body.theme-sjc .dashboard-theme-toggle {
  color: rgba(255,255,255,0.9) !important;
  font-size: 0.875rem;
}
body.theme-sjc .dashboard-theme-toggle:hover {
  color: #fff !important;
}

/* Assistente conversacional */
body.theme-sjc #assistente-toggle {
  background: var(--pmsjc-primary) !important;
}
body.theme-sjc #assistente-toggle:hover {
  background: var(--pmsjc-primary-dark) !important;
}
body.theme-sjc #assistente-panel .card-header {
  background: linear-gradient(135deg, #004a7a 0%, #003558 100%) !important;
  color: #fff !important;
}
body.theme-sjc #assistente-panel .assistente-voice-btn.active {
  background: var(--pmsjc-primary) !important;
  border-color: var(--pmsjc-primary) !important;
}
body.theme-sjc .photo-box .photo-loading,
body.theme-sjc .selected-person-card {
  color: var(--pmsjc-primary);
  border-left-color: var(--pmsjc-primary);
}
