/* Tema do SistemaFinanceiro ERP — moderniza (Bootstrap 5) respeitando a identidade do MOXERP:
   azul da barra lateral #114ab4, azul primário #2f6de1/#428bca, amarelo #ffd201, vermelho #a94442. */
:root {
  --brand-sidebar: #114ab4;
  --brand-sidebar-2: #0e3f9e;
  --brand-primary: #2f6de1;
  --brand-primary-d: #1f57bf;
  --brand-accent: #ffd201;
  --brand-danger: #a94442;
  --brand-bg: #f2f4f7;
  --brand-ink: #243b6b;
}

body { background: var(--brand-bg); color: #2b3550; }

/* Botões primários com a cor da marca (Bootstrap 5.3 usa CSS vars) */
.btn-primary {
  --bs-btn-bg: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-d); --bs-btn-hover-border-color: var(--brand-primary-d);
  --bs-btn-active-bg: var(--brand-primary-d); --bs-btn-active-border-color: var(--brand-primary-d);
  --bs-btn-disabled-bg: var(--brand-primary); --bs-btn-disabled-border-color: var(--brand-primary);
}
.text-primary { color: var(--brand-primary) !important; }
a { color: var(--brand-primary); }
.badge-accent { background: var(--brand-accent); color: #5a4b00; }

/* Layout: sidebar fixa + conteúdo */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; overflow-y: auto;
  background: var(--brand-sidebar); color: #fff;
}
.sidebar .brand {
  height: 64px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar .nav-group-title {
  font-size: .70rem; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.55); padding: 1rem 1.15rem .35rem;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.86); padding: .55rem 1.15rem;
  border-left: 3px solid transparent; border-radius: 0;
}
.sidebar .nav-link:hover { background: var(--brand-sidebar-2); color: #fff; }
.sidebar .nav-link.active { background: var(--brand-primary); color: #fff; border-left-color: var(--brand-accent); }

.content { margin-left: 240px; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid #e3e7ee;
  display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 20;
}
.main { padding: 1.5rem; }
.page-title { font-size: 1.35rem; font-weight: 600; color: var(--brand-ink); margin: 0; }

/* Tabelas e cartões */
.card { border: 1px solid #e6e9f0; box-shadow: 0 1px 2px rgba(20,40,80,.04); }
.table thead th {
  background: #f6f8fb; color: #33415c; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .02em; border-bottom: 2px solid #e6e9f0;
}
.table td { vertical-align: middle; }
.valor-c { color: #1a7f37; }   /* crédito/receita */
.valor-d { color: var(--brand-danger); }   /* débito/despesa */

/* Responsivo */
@media (max-width: 768px) {
  .sidebar { left: -240px; transition: left .2s ease; z-index: 30; }
  .sidebar.open { left: 0; }
  .content { margin-left: 0; }
}
