:root {
  --marca: #1f3a5f;
  --marca-oscura: #152a46;
  --fondo: #f5f6f8;
}

body { background: var(--fondo); }

.barra { background: var(--marca); }
.barra .dropdown-menu { font-size: .95rem; }
.selector-periodo { width: auto; background-color: rgba(255,255,255,.95); }

.btn-primary { --bs-btn-bg: var(--marca); --bs-btn-border-color: var(--marca);
  --bs-btn-hover-bg: var(--marca-oscura); --bs-btn-hover-border-color: var(--marca-oscura);
  --bs-btn-active-bg: var(--marca-oscura); --bs-btn-active-border-color: var(--marca-oscura); }
.btn-outline-primary { --bs-btn-color: var(--marca); --bs-btn-border-color: var(--marca);
  --bs-btn-hover-bg: var(--marca); --bs-btn-hover-border-color: var(--marca);
  --bs-btn-active-bg: var(--marca); }
a { color: var(--marca); }
.dropdown-item { color: inherit; }

.tarjeta { background: #fff; border: 1px solid #e3e5e8; border-radius: .6rem; padding: 1.25rem; }
.tarjeta-dato .valor { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tarjeta-dato .etiqueta { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

.titulo-pagina { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.titulo-pagina h1 { font-size: 1.5rem; margin: 0; }

.table-montos td.n, .table-montos th.n, .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-montos { font-size: .9rem; background: #fff; }
.table-montos thead th { background: #eef0f3; vertical-align: middle; font-weight: 600; }
.table-montos tfoot td, .table-montos tfoot th { font-weight: 700; background: #f8f9fa; }
.tabla-libro { font-size: .78rem; }
.tabla-libro thead th { text-align: center; font-size: .72rem; }
.fila-grupo td { font-weight: 600; background: #fafafa; }
.fila-nivel-1 td { font-weight: 700; background: #f1f1f4; }

.monto { font-variant-numeric: tabular-nums; }
input.monto { text-align: right; }
.total-documento { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.encabezado-reporte { margin-bottom: 1rem; }
.descuadre { color: #b02a37; font-weight: 600; }

.login-fondo { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--marca) 0%, #0b1626 100%); }
.login-caja { width: 100%; max-width: 380px; }

@media print {
  .no-print, .navbar, .btn, form.filtros { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; max-width: none !important; }
  .table-montos { font-size: 8pt; }
  .tabla-libro { font-size: 6.5pt; }
  .tarjeta { border: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}

.nav-pestanas .nav-link { color: #495057; }
.nav-pestanas .nav-link.active { color: var(--marca); font-weight: 600; }
.ficha dt { color: #6c757d; font-weight: 500; font-size: .85rem; }
.ficha dd { margin-bottom: .6rem; }
