/* Pestañas de la agenda de pagos y su paginación. Antes las dos listas eran
   dos tarjetas apiladas; en pestañas se ve una por vez y la pantalla no crece
   sin control cuando hay muchos servicios agendados. */

.pestanas {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
  overflow-x: auto;
}

.pestana {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6b7a8c;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pestana:hover {
  color: var(--color-blue-800);
  background: rgba(0, 0, 0, 0.02);
}

.pestana.is-activa {
  color: var(--color-blue-800);
  border-bottom-color: var(--bg-blue-800);
}

.pestana i {
  font-size: 17px;
}

/* El contador conserva el estilo que tenía junto al título */
.pestana-contador {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.07);
  color: #4a5a6b;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.pestana.is-activa .pestana-contador {
  background: var(--bg-blue-800);
  color: #fff;
}

/* Paneles */
.panel-pestana {
  display: none;
  padding-top: 6px;
  animation: fadeIn 0.25s ease;
}

.panel-pestana.is-activo {
  display: block;
}

/* Paginación */
.paginacion {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 4px 4px;
}

.paginacion:empty {
  display: none;
}

.paginacion-info {
  margin-right: auto;
  font-size: 13px;
  color: #6b7a8c;
}

.paginacion-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 7px;
  background: var(--color-white-100);
  color: var(--color-blue-800);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.paginacion-btn:hover:not(:disabled):not(.is-actual) {
  background: rgba(0, 0, 0, 0.04);
}

.paginacion-btn.is-actual {
  background: var(--bg-blue-800);
  border-color: var(--bg-blue-800);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.paginacion-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .pestana {
    padding: 11px 12px;
    font-size: 13px;
  }

  .paginacion-info {
    width: 100%;
    margin-bottom: 4px;
  }
}

/* Historial de pagos */
.historial-hora {
  color: #8b97a5;
  font-size: 12px;
}

.historial-estado {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.06);
  color: #4a5a6b;
}

.historial-estado.is-acreditado { background: #e3f5ec; color: #10704f; }
.historial-estado.is-pendiente  { background: #fdf3e3; color: #8a6100; }
.historial-estado.is-rechazado  { background: #fdeceb; color: #9e2c22; }
.historial-estado.is-dryrun     { background: #eef2f7; color: #55657a; }

.historial-sin-comprobante {
  color: #a6b0bb;
}

/* Filtros del historial de comprobantes */
.filtros-historial {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 15px;
}

.filtro-busqueda {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: var(--color-white-100);
}

.filtro-busqueda i { color: #8b97a5; font-size: 16px; }

.filtro-busqueda input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-blue-800);
}

.filtro-periodo {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: var(--color-white-100);
  font-family: inherit;
  font-size: 14px;
  color: var(--color-blue-800);
  cursor: pointer;
}

/* El buscador arma su propio foco sobre el contenedor: el input de adentro no
   debe traer sombra ni fondo propios, o se superpone con el ícono. */
.filtro-busqueda:focus-within {
  border-color: var(--bg-blue-400);
  box-shadow: 0 0 0 3px rgba(74, 127, 165, 0.18);
}

.filtro-busqueda input,
.filtro-busqueda input:focus {
  height: auto;
  box-shadow: none;
  border-radius: 0;
  opacity: 1;
  font-weight: 400;
  transform: none;
}

/* Servicio sin deuda informada por PMC */
.sin-deuda {
  color: #a6b0bb;
  font-size: 13px;
}

/* Flecha para pasar el importe de la deuda al campo de monto */
.celda-flecha {
  width: 1%;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.btn-copiar-deuda {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: var(--color-white-100);
  color: var(--color-blue-400);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-copiar-deuda:hover {
  background: var(--bg-blue-400);
  border-color: var(--bg-blue-400);
  color: #fff;
}

/* Avisos propios de cada pestaña: se muestran dentro del panel al que
   corresponden y no arriba de todo, lejos de la fila que los originó. */
.aviso-pestana:empty {
  display: none;
}

.aviso-pestana .alerta {
  margin: 10px 4px;
}

/* Indicador mientras se carga la agenda */
.cargando-tabla {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 0;
  font-size: 14px;
  color: var(--color-blue-400);
}
