:root {
  --sp-sidebar: #10263f;
  --sp-sidebar-2: #173452;
  --sp-accent: #1f7ae0;
  --sp-bg: #f3f5f8;
}
.marca-logo { background: #fff; border-radius: 8px; padding: 6px 8px; display: inline-block; }
.marca-logo img { display: block; max-width: 100%; max-height: 54px; }
.sidebar .pie-marca { padding: .75rem 1.25rem 1.25rem; font-size: .72rem; color: #8fa5bd; display: flex; align-items: center; gap: .5rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .pie-marca img { width: 22px; height: 22px; border-radius: 4px; }
.logo-empresa { max-height: 64px; max-width: 220px; }
body { background: var(--sp-bg); font-size: .925rem; }
.sidebar { width: 245px; background: var(--sp-sidebar) !important; color: #c9d5e3; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 992px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; }
  .main { margin-left: 245px; }
}
.sidebar .marca { padding: 1.1rem 1.25rem; font-weight: 700; color: #fff; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .marca .marca-enlace { color: inherit; text-decoration: none; display: block; }
.sidebar .marca .marca-enlace:hover .marca-logo { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.sidebar .marca small { display: block; font-weight: 400; color: #8fa5bd; font-size: .78rem; }
.sidebar .seccion { text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; color: #7890aa; padding: 1rem 1.25rem .35rem; }
.sidebar a.item { display: flex; align-items: center; gap: .65rem; padding: .5rem 1.25rem; color: #c9d5e3; text-decoration: none; border-left: 3px solid transparent; }
.sidebar a.item:hover { background: var(--sp-sidebar-2); color: #fff; }
.sidebar a.item.activo { background: var(--sp-sidebar-2); color: #fff; border-left-color: var(--sp-accent); }
.sidebar .offcanvas-header .btn-close { filter: invert(1); }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ed; }
.card { border: 1px solid #e3e7ed; box-shadow: 0 1px 2px rgba(16,38,63,.04); }
.card-header { background: #fff; font-weight: 600; }
.kpi .valor { font-size: 1.35rem; font-weight: 700; white-space: nowrap; }
.kpi .icono { flex-shrink: 0; }
@media (min-width: 1200px) and (max-width: 1599.98px) { .kpi .valor { font-size: 1.12rem; } }
.kpi .etiqueta { color: #6b7a8c; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi .icono { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; color: #6b7a8c; letter-spacing: .03em; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-sm td { vertical-align: middle; }
tr.fila-vencida td { background: #fff4f4 !important; }
tr.fila-pagada td { color: #6b7a8c; }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .2rem; }
.auth-fondo { min-height: 100vh; background: linear-gradient(135deg, #10263f 0%, #1f4f82 100%); }
.auth-caja { max-width: 430px; }
.auth-caja.auth-caja-ancha { max-width: 780px; }
.badge.text-bg-light { border: 1px solid #d5dbe3; }
.resumen-dl dt { color: #6b7a8c; font-weight: 500; font-size: .8rem; }
.resumen-dl dd { font-weight: 600; margin-bottom: .55rem; }
.btn-xs { padding: .1rem .45rem; font-size: .75rem; }

/* Impresión */
.hoja { background: #fff; max-width: 900px; margin: 1.5rem auto; padding: 2rem; border: 1px solid #e3e7ed; }
.ticket { max-width: 340px; font-family: "Courier New", monospace; font-size: 12.5px; }
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  .main { margin-left: 0 !important; }
  body { background: #fff; font-size: 11px; }
  .hoja { border: 0; margin: 0; padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  a { text-decoration: none; color: inherit; }
}

/* tablas de resumen en columnas angostas: los montos no se salen del recuadro */
.tabla-resumen td, .tabla-resumen th { white-space: nowrap; padding-left: .3rem; padding-right: .3rem; }

/* formulario que recibe archivos arrastrados */
.soltar-archivos { outline: 2px dashed var(--bs-primary); outline-offset: 2px; background: var(--bs-primary-bg-subtle); }
