/* ===== Paleta Congregación Preciosa Sangre ===== */
:root {
  --ps-burdeo: #6d0f1f;
  --ps-burdeo-oscuro: #4a0a15;
  --ps-carmesi: #9e1b32;
  --ps-dorado: #c9a227;
  --ps-crema: #f6eee2;

  /* Botones y enlaces "primary" de Bootstrap en burdeo */
  --bs-primary: #6d0f1f;
  --bs-primary-rgb: 109, 15, 31;
  --bs-link-color: #9e1b32;
  --bs-link-color-rgb: 158, 27, 50;
  --bs-link-hover-color: #6d0f1f;
  --bs-link-hover-color-rgb: 109, 15, 31;
}

body {
  font-family: Segoe UI, Arial, sans-serif;
  background-color: #fcf9f4;
}

.btn-primary {
  --bs-btn-bg: var(--ps-burdeo);
  --bs-btn-border-color: var(--ps-burdeo);
  --bs-btn-hover-bg: var(--ps-carmesi);
  --bs-btn-hover-border-color: var(--ps-carmesi);
  --bs-btn-active-bg: var(--ps-burdeo-oscuro);
  --bs-btn-active-border-color: var(--ps-burdeo-oscuro);
  --bs-btn-disabled-bg: var(--ps-burdeo);
  --bs-btn-disabled-border-color: var(--ps-burdeo);
}

.btn-outline-primary {
  --bs-btn-color: var(--ps-burdeo);
  --bs-btn-border-color: var(--ps-burdeo);
  --bs-btn-hover-bg: var(--ps-burdeo);
  --bs-btn-hover-border-color: var(--ps-burdeo);
  --bs-btn-active-bg: var(--ps-burdeo-oscuro);
  --bs-btn-active-border-color: var(--ps-burdeo-oscuro);
}

.form-control:focus, .form-select:focus {
  border-color: var(--ps-dorado);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.25);
}

.table thead th {
  border-bottom: 2px solid var(--ps-dorado);
}

/* Login */
.login-card {
  border-top: 5px solid var(--ps-burdeo);
}

.cabecera-degradada {
  background: linear-gradient(90deg, var(--ps-crema) 0%, var(--ps-carmesi) 9%, var(--ps-burdeo) 55%, var(--ps-burdeo-oscuro) 100%);
  border-bottom: 3px solid var(--ps-dorado);
}

/* Logo CPS (vertical): se fija solo el alto para no deformarlo. */
.logo-cabecera {
  height: 80px;
  width: auto;
}

/* ===== Menú lateral (sidebar) ===== */
.sidebar {
  width: 230px;
  min-height: calc(100vh - 96px);
  background-color: var(--ps-burdeo);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1 0 auto;
  padding: 1rem 0 90px;
}

/* Pie de marca Tennet: fijo abajo del sidebar en escritorio, color cobre para
   distinguirlo del resto del menú (burdeo). */
.sidebar-footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 230px;
  z-index: 20;
  background: linear-gradient(90deg, #7c4a1e 0%, #b87333 100%);
  padding: 0.65rem 0.5rem;
  align-items: center;
  justify-content: center;
}

.sidebar-footer-fixed a,
.sidebar-footer-inline a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.35;
}

.sidebar-footer-fixed a:hover,
.sidebar-footer-inline a:hover {
  color: #fff;
}

.tennet-logo {
  height: 30px;
  width: auto;
  margin-bottom: 0.3rem;
}

.sidebar-footer-inline {
  margin-top: 1rem;
  padding: 0.75rem;
  text-align: center;
  background: linear-gradient(90deg, #7c4a1e 0%, #b87333 100%);
  border-radius: 6px;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.65rem 1.25rem;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
  border-left-color: var(--ps-dorado);
  font-weight: 600;
}

.sidebar-divider {
  border-color: rgba(255, 255, 255, 0.2);
  margin: 0.5rem 1.25rem;
}

.sidebar-heading-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-heading-link:hover {
  color: #fff;
}

.sidebar-heading-icon {
  display: inline-block;
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}

.sidebar-heading-link.collapsed .sidebar-heading-icon {
  transform: rotate(-90deg);
}

.sidebar-sublink {
  padding-left: 2.25rem !important;
}

.sidebar-offcanvas {
  background-color: var(--ps-burdeo);
  width: 260px;
}

.contenido-principal {
  min-width: 0;
}

/* ===== Tablas y utilidades varias ===== */
.table td, .table th {
  vertical-align: middle;
}

.saldo-negativo {
  color: #b02a37;
  font-weight: bold;
}

/* ===== Impresión ===== */
@media print {
  .no-print {
    display: none !important;
  }

  .contenido-principal {
    width: 100% !important;
  }

  body {
    background: #fff;
  }
}

/* ===== Hojas tipo planilla (Entradas / Salidas / Honorarios / Sueldos) ===== */
.hoja-encabezado {
  border: 1px solid #e3d6c2;
  border-top: 4px solid var(--ps-burdeo);
  background: var(--ps-crema);
  padding: 0.6rem 1rem;
  border-radius: 4px;
}

.hoja-titulo {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ps-burdeo);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.tabla-hoja thead th {
  background-color: var(--ps-burdeo);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  vertical-align: middle;
  white-space: nowrap;
}

.tabla-hoja thead th.grupo-factura {
  background-color: var(--ps-carmesi);
}

.tabla-hoja td {
  font-size: 0.9rem;
}

.tabla-hoja tfoot td,
.tabla-hoja tfoot th {
  background-color: var(--ps-crema);
  font-weight: 700;
}

.tabla-hoja .col-num {
  width: 3rem;
  text-align: center;
  color: #6c757d;
}

.tabla-hoja .col-acciones {
  white-space: nowrap;
  width: 1%;
}
