/* NUTRILAB · tabla de facturas COMPARTIDA (portal-pagos.html y ficha del panel > Pagos).
   Una sola fuente de estilos y de filas (assets/js/facturas-tabla.js) para que paciente y
   nutricionista vean exactamente la misma tabla. Movido tal cual desde portal-pagos.html (08-oct-2026). */
.pp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.pp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pp-pill-ok { background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }
.pp-pill-warn { background: rgba(255,180,171,0.1); color: #ffb4ab; border: 1px solid rgba(255,180,171,0.25); }
/* «Omitida»: mismo tratamiento que pagada, etiqueta gris para diferenciarla */
.pp-pill-muted { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.14); }

.pp-filters { display: flex; gap: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 4px; margin-bottom: 6px; }
.pp-filter {
  flex: 1; padding: 8px 6px; border-radius: 9px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.45); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.pp-filter.on { background: rgba(255,255,255,0.1); color: #fff; }

/* ---------- Tabla de facturas ----------
   Mismo formato y mismo scroll que la tabla de usuarios del panel
   (assets/js/pages.js: <table class="min-w-[850px] w-full text-left text-xs">
   dentro de <div class="overflow-x-auto w-full">, con celdas px-6 py-3 en el
   thead y px-6 py-4 en el tbody). Aquí el contenedor .pp-table-wrap solo
   gestiona el scroll HORIZONTAL; el vertical lo hace la página (.pp-wrap). */
.pp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;   /* igual que .overflow-x-auto (styles.css) */
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  border-radius: 10px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.2);
}
.pp-table-wrap::-webkit-scrollbar { height: 6px; width: 6px; }
.pp-table-wrap::-webkit-scrollbar-track { background: transparent; }
.pp-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 10px; }

.pp-inv-table {
  width: 100%;
  min-width: 560px;                    /* como el min-w-[850px] de usuarios */
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
/* TODAS las columnas con el mismo margen interno (px-6 py-3 / px-6 py-4) */
.pp-inv-table th {
  padding: 12px 24px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #c6c6c6;                      /* on-surface-variant del panel */
  background: rgba(255,255,255,0.05);
  white-space: nowrap;
}
.pp-inv-table td {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
/* Todas las filas con fondo semitransparente como la primera: blanco al 5%
   (mismo tono que la cabecera). Las pendientes conservan su tinte cálido,
   que a este nivel de opacidad es visualmente equivalente. */
.pp-inv-table tbody tr { background: rgba(255,255,255,0.05); transition: background 0.2s ease; }
.pp-inv-table tbody tr:hover { background: rgba(255,255,255,0.1); }
.pp-inv-table tbody tr[data-estado="pendiente"] { background: rgba(255,180,171,0.04); }
.pp-inv-table tbody tr[data-estado="pendiente"]:hover { background: rgba(255,180,171,0.08); }
/* Alineación: todo a la izquierda salvo «Acciones», que va a la derecha
   (igual que la tabla de usuarios, th `text-right`), para que los botones
   de pago de las filas pendientes queden al ras derecha bajo su cabecera. */
.pp-inv-table .pp-col-accion { text-align: right; white-space: nowrap; }
.pp-inv-table .pp-col-accion .pp-inv-pay { vertical-align: middle; }
/* Celda «Nº de factura»: icono + número + fecha (como la celda «Cliente») */
.pp-inv-factura { display: flex; align-items: center; gap: 12px; }
.pp-inv-ico {
  width: 32px; height: 32px; flex: none; border-radius: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45);
}
.pp-inv-ico .material-symbols-outlined { font-size: 16px; }
.pp-inv-num { display: block; font-size: 12px; font-weight: 600; color: #fff; }
.pp-inv-sub { display: block; font-size: 10px; color: #c6c6c6; margin-top: 2px; }
.pp-inv-amt { font-size: 12px; font-weight: 700; white-space: nowrap; }
.pp-inv-pay {
  width: 32px; height: 32px; border-radius: 10px; border: none;
  background: #635bff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s ease; flex: none; padding: 0;
}
.pp-inv-pay:active { transform: scale(0.92); }
.pp-inv-pay:disabled { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.35); cursor: not-allowed; }
.pp-inv-pay:disabled:active { transform: none; }
.pp-inv-pay .material-symbols-outlined { font-size: 16px; }
.pp-inv-empty { text-align: center; font-size: 12px; font-style: italic; color: rgba(255,255,255,0.4); padding: 40px 0; }

.pp-inv-dl { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; margin-left: 6px; flex: none; transition: transform 0.2s ease, background 0.2s ease; }
.pp-inv-dl:hover { background: rgba(255,255,255,0.14); }
.pp-inv-dl:active { transform: scale(0.92); }
.pp-inv-dl .material-symbols-outlined { font-size: 16px; }
.pp-inv-table tbody tr:first-child td { border-top: 0; }
@media (max-width: 380px) { .pp-inv-table { min-width: 520px; } }
@media (max-width: 340px) { .pp-inv-table { min-width: 480px; } }

.pp-inv-btns { display: inline-flex; align-items: center; gap: 6px; }
.pp-inv-btns .pp-inv-dl { margin-left: 0; }

/* Descuento de un código o convenio en la factura del primer pago (9-nov-2026) */
.pp-inv-dto { display: block; margin-top: 3px; max-width: 200px; font-size: 10px; font-weight: 500; line-height: 1.35; white-space: normal; color: #6ee7b7; }
