/* Ocupar todo el alto del card (flex) */
#birthdaysCard {
  display: flex;
  flex-direction: column;
}
#birthdaysCard .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
#birthdaysCard .birthday-list {
  height: 100%;
}

/* Abonos por Titular: mismo comportamiento de altura que Cumpleaños */
#ownerCreditsCard {
  display: flex;
  flex-direction: column;
}
#ownerCreditsCard .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
/* ===== Cumpleaños (tarjeta) ===== */
#birthdaysCard .birthday-list .emoji {
  font-size: 1rem;
  width: 1.4rem;
  text-align: center;
  display: inline-block;
}
#birthdaysCard .birthday-list .title {
  font-weight: 600;
  font-size: 0.92rem;
}
#birthdaysCard .birthday-list .meta {
  color: #6c757d;
  font-size: 0.85rem;
}
/* badges compactos */
#birthdaysCard .status-badge {
  font-size: 0.72rem;
  vertical-align: middle;
}
/* resaltes sutiles por estado */
#birthdaysCard tr.today-row td {
  background: #e8f7ee;
}
#birthdaysCard tr.recent-row td {
  background: #fff3cd47;
}
#birthdaysCard .table td,
#birthdaysCard .table th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
#birthdaysCard .table thead th {
  background: #f1f3f5;
  border-color: #e9ecef;
  font-size: 0.85rem;
}

.modal-lg {
  max-width: 80%;
}

.modal-md {
  max-width: 55%;
}

table {
  font-size: 15px;
}

/* Toolbar compacta de filtros */
.filters-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.filters-toolbar .compact-input {
  min-width: 120px;
}

.filters-toolbar .compact-date {
  width: 150px;
}

.filters-toolbar .compact-time {
  width: 140px;
}

.filters-toolbar .compact-select {
  width: 200px;
}

@media (max-width: 992px) {
  .filters-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .filters-toolbar .compact-date,
  .filters-toolbar .compact-time,
  .filters-toolbar .compact-select {
    width: 160px;
  }
}

/* Ajusta el ancho del modal a 80% del ancho de la ventana */
.modal-dialog {
  max-width: 60%;
}

/* Estilos CSS personalizados para la tabla */
#resultadosTabla {
  font-size: 14px;
  /* Tamaño de fuente personalizado */
}

/* Estilos CSS personalizados para el contenedor de la tabla */
.table-responsive {
  max-height: 400px;
  /* Altura máxima del contenedor */
  overflow-y: auto;
  /* Habilitar el desplazamiento vertical */
}

/* Estilos para reducir el espacio entre filas (opcional) */
#resultadosTabla tr {
  line-height: 1;
  /* Reducir el espacio entre filas */
}

/* Estilos para reducir el espacio entre celdas (opcional) */
#resultadosTabla td,
#resultadosTabla th {
  padding: 4px;
  /* Reducir el espacio entre celdas */
}

.bg-custom-warning {
  background-color: #ffde9b;
}

.bg-custom-danger {
  background-color: #ff7675;
}

.bg-custom-success {
  background-color: #d8ffd7;
}

.btn-app {
  border-radius: 3px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #6c757d;
  font-size: 14px !important;
  height: 60px;
  margin: 0 0 10px 10px;
  min-width: 80px;
  padding: 15px 5px;
  position: relative;
  text-align: center;
}

/* Diseño base de cada tarjeta */
.card2 {
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: 1px solid #e0e0e0;
  height: 100%;
  min-height: 120px;
}

.card2:hover {
  transform: scale(1.05);
  box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.15);
}

/* Separación entre bloques principales */
.section-gap-top {
  margin-top: 16px;
}

/* Cards de gráficos uniformes */
.chart-card {
  min-height: 380px; /* asegura altura uniforme */
  margin-bottom: 20px; /* separación vertical entre filas de charts */
}

.chart-card .card-body {
  display: flex;
  flex-direction: column;
}

.chart-canvas {
  width: 100% !important;
  height: 260px !important; /* altura estándar de gráficos */
}

@media (max-width: 992px) {
  .chart-card {
    min-height: 320px;
    margin-bottom: 16px;
  }
  .chart-canvas {
    height: 220px !important;
  }
}

/* Separación de los cuatro cards superiores respecto de las demás tarjetas */
.top-metrics-row {
  margin-bottom: 16px; /* espacio inferior claro */
}

/* Contenido principal de la tarjeta */
.card2-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Estilo de los iconos */
.icon {
  font-size: 20px;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}

/* Colores de los iconos según categoría */
.income .icon {
  color: white;
  background: #007bff;
} /* Azul */
.expenses .icon {
  color: white;
  background: #f39c12;
} /* Naranja */
.profit .icon {
  color: white;
  background: #28a745;
} /* Verde */
.outstanding .icon {
  color: white;
  background: #0056b3;
} /* Azul oscuro */
.payable .icon {
  color: white;
  background: #e91e63;
} /* Rosa */
.cash .icon {
  color: white;
  background: #17a2b8;
} /* Cian */
.overdue .icon {
  color: white;
  background: #dc3545;
} /* Rojo */
.simulator .icon {
  color: white;
  background: #6c757d;
} /* Gris */

/* Información de la tarjeta */
.info h3 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}

.info p {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  margin: 2px 0 8px; /* reduce el espacio arriba/abajo del label */
}

/* Pie de tarjeta */
.footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  align-items: center;
}

/* Estilo del botón "Ver más" */
.footer a {
  text-decoration: none;
  font-weight: bold;
  color: #007bff;
  transition: color 0.3s ease-in-out;
  cursor: pointer;
}

.footer a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Agregar un efecto visual al pasar el mouse */
.footer a::after {
  content: " →";
  font-weight: bold;
  transition: margin-left 0.3s ease-in-out;
}

.footer a:hover::after {
  margin-left: 5px;
}

.total-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border-radius: 14px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #ececec;
  padding: 8px 12px; /* aún más bajo */
  min-height: 70px; /* target 70 */
  height: 100%;
  display: flex;
  align-items: center;
}

/* Quitar padding de Bootstrap dentro de los cards superiores */
.total-card .card-body {
  padding: 0 !important;
}

.total-card:hover {
  transform: scale(1.03);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);
}

/* Caja del ícono */
.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(71, 75, 190, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Tamaño de los números */
h3 {
  font-size: 1.8rem;
  font-weight: bold;
}

.total-card h3 {
  font-size: 1.15rem; /* cabe en 70px */
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}

.total-card small {
  font-size: 0.75rem;
}

/* Título/etiqueta del card */
.total-card .card-title {
  font-size: 0.8rem; /* cabe en 70px */
  font-weight: 700;
  color: #374151; /* gris-700 */
  margin-bottom: 4px;
}

/* Acentos de color para métricas específicas */
.total-card.metric-success {
  box-shadow: inset 2px 0 0 0 #22c55e, 0 2px 8px rgba(0, 0, 0, 0.06);
}
.total-card.metric-danger {
  box-shadow: inset 2px 0 0 0 #ef4444, 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Hacer las tarjetas aún más compactas en móviles */
@media (max-width: 768px) {
  .card2 {
    padding: 12px;
    min-height: 100px;
  }

  .card2-content {
    gap: 8px;
  }

  .icon {
    font-size: 16px;
    padding: 8px;
    width: 36px;
    height: 36px;
  }

  .info h3 {
    font-size: 16px;
  }

  .info p {
    font-size: 11px;
  }

  .total-card {
    min-height: 70px;
    padding: 8px 10px;
  }

  .icon-box {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .total-card h3 {
    font-size: 1rem;
  }

  .total-card.metric-success,
  .total-card.metric-danger {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* sin acento interno en móviles */
  }

  .total-card small {
    font-size: 0.7rem;
  }
}

/* Submétricas: valores en gris (manteniendo negrita) */
#interest_to_collect_month,
#por_vencer_mes,
#cuotas_vencidas_mes {
  color: #6c757d; /* gris Bootstrap */
  font-weight: 700; /* asegurar negrita */
}
