@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Poppins:wght@400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

/* ── Container Bootstrap-like ── */
.bs-container {
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px)  { .bs-container { max-width: 540px; } }
@media (min-width: 768px)  { .bs-container { max-width: 720px; } }
@media (min-width: 992px)  { .bs-container { max-width: 960px; } }
@media (min-width: 1200px) { .bs-container { max-width: 1140px; } }
@media (min-width: 1400px) { .bs-container { max-width: 1320px; } }


body {
  margin: 0;
  font-family: sans-serif;
  color: #333333;
  background: #fff;
}

.font-poppins { font-family: 'Poppins', sans-serif; }
.font-montserrat { font-family: 'Montserrat', sans-serif; }

/* ── Overlay oscuro de fondo ── */
#bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: none;
}

/* ── Spinner de carga de factura ── */
#spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
}
#spinner-overlay.visible { display: flex; }

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.img-pulse { animation: pulse-opacity 1.2s infinite; }

/* ── Overlay de procesando pago ── */
#payment-processing {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  font-family: 'Montserrat', sans-serif;
}
#payment-processing.visible { display: flex; }

#payment-processing .pay-processing-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 1.75rem 1.75rem;
  max-width: 22rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(19, 97, 197, 0.12);
}

#payment-processing .pay-processing-icon {
  display: block;
  margin: 0 auto 1.25rem;
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
}

#payment-processing .pay-processing-title {
  margin: 0 0 0.75rem;
  color: #111827;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

#payment-processing .pay-processing-dots {
  display: inline;
  color: #1361c5;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#payment-processing .pay-processing-sub {
  margin: 0;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ── Modales ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 28rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #000; }

.modal-body {
  padding: 1rem 1.5rem;
  color: #1f2937;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  padding: 0.875rem 1.5rem;
  gap: 0.75rem;
}

.modal-box--amount {
  max-width: 26rem;
}

.manual-amount-lead {
  margin: 0 0 0.75rem;
  font-size: 0.9875rem;
  line-height: 1.5;
  color: #374151;
}

.manual-amount-contrato {
  margin: 0 0 1.1rem;
  font-size: 0.9375rem;
  color: #4b5563;
}

.manual-amount-contrato strong {
  color: #1361c5;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.manual-amount-field {
  margin-bottom: 0.5rem;
}

.manual-amount-field input {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.manual-amount-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6b7280;
}

.manual-amount-error {
  margin: 0.65rem 0 0;
  font-size: 0.875rem;
  color: #dc2626;
  line-height: 1.4;
}

.manual-amount-error.hidden {
  display: none;
}

.modal-footer--amount {
  justify-content: flex-end;
}

.manual-amount-btn-cancel {
  background: #6b7280;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.9875rem;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.manual-amount-btn-cancel:hover {
  background: #4b5563;
}

.manual-amount-btn-confirm {
  background: #1361c5;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.9875rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.manual-amount-btn-confirm:hover {
  background: #0d4ea1;
}

.manual-amount-btn-confirm:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Toggle switch ── */
.toggle-track {
  width: 2.5rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #fff;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.toggle-track.on {
  background: #006eff;
  border-color: #006eff;
}
.toggle-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #9ca3af;
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  transition: transform 0.2s, background 0.2s;
}
.toggle-track.on .toggle-thumb {
  background: #fff;
  transform: translateX(1.375rem);
}

/* ── Captcha checkbox ── */
#captcha-check {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  appearance: none;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
#captcha-check:checked { background: #d1d5db; border-color: #d1d5db; }

#captcha-checkmark {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  pointer-events: none;
  color: #16a34a;
  display: none;
}
#captcha-check:checked ~ #captcha-checkmark { display: block; }

/* ── Campos flotantes ── */
.field-wrap {
  position: relative;
}
.field-wrap input,
.field-wrap select {
  width: 100%;
  font-size: 0.9375rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  padding: 2rem 1rem 0.5rem;
  outline: none;
  appearance: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-wrap input:focus,
.field-wrap select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96,165,250,0.35);
}
.field-wrap label {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  pointer-events: none;
}
/* ── Selector de medio de pago (PSE / Bre-B) ── */
#pay-method-picker.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 36rem;
}

#pay-method-picker.pay-method-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 18rem;
}

#pay-method-picker .pay-method-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 9.5rem;
  padding: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
}

#pay-method-picker .pay-method-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(19, 97, 197, 0.12);
}

#pay-method-picker .pay-method-card.selected {
  border-color: #1361c5;
  background: #f0f7ff;
  box-shadow: 0 0 0 3px rgba(19, 97, 197, 0.15);
}

#pay-method-picker .pay-method-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.75rem;
  overflow: hidden;
  flex-shrink: 0;
}

#pay-method-picker .pay-method-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

#pay-method-picker .pay-method-logo--pse {
  max-height: 3.25rem;
}

#pay-method-picker .pay-method-logo--breb {
  max-height: 4.25rem;
  border-radius: 12px;
}

#pay-method-picker .pay-method-logo--bancolombia {
  max-height: 3.75rem;
}

#pay-method-picker .pay-method-logo--banco-bogota {
  max-height: 3.75rem;
}

#pay-method-picker .pay-method-logo-wrap--davivienda {
  padding: 0.35rem 0.5rem;
}

#pay-method-picker .pay-method-logo--davivienda {
  max-height: 2.15rem;
  max-width: 11.5rem;
  width: 100%;
}

.bancolombia-method-hint,
.banco-bogota-method-hint,
.davivienda-method-hint {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.45;
}

#pay-method-picker .pay-method-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

.pay-continue-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.selected-method-preview {
  width: 100%;
  max-width: 16rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.selected-method-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.selected-method-logo--pse {
  max-height: 3.5rem;
}

.selected-method-logo--breb {
  max-height: 4rem;
  border-radius: 10px;
}

.selected-method-logo--davivienda {
  max-height: 2.25rem;
  max-width: 13rem;
}

.btn-continue-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 0.75rem;
  background: #1361c5;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-continue-pay:hover {
  background: #0d4ea1;
}

.btn-continue-pay:active {
  transform: scale(0.98);
}

#pse-bank-section.hidden {
  display: none;
}

.breb-method-hint {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #e8f2fc;
  border: 1px solid rgba(19, 97, 197, 0.2);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #1e40af;
  max-width: 36rem;
}

.breb-method-hint.hidden {
  display: none;
}

#btn-add.hidden {
  display: none;
}

.btn-add-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

#pay-method-picker.pay-method-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 48rem;
}

#pay-method-picker .pay-method-logo-wrap--icon {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f2fc 100%);
  border-radius: 0.5rem;
}

#pay-method-picker .pay-method-icon-img {
  width: 3.25rem;
  height: auto;
  display: block;
}

.card-brand-img {
  display: block;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

.card-brand-img--visa {
  height: 1.375rem;
}

.card-brand-img--mastercard {
  height: 1.625rem;
}

.card-brand-img--amex {
  height: 1.375rem;
}

.card-brand-img--on-card {
  height: 1.625rem;
}

.card-brand-img--on-card.card-brand-img--visa {
  height: 1.5rem;
}

.card-brand-img--on-card.card-brand-img--mastercard {
  height: 1.75rem;
}

.card-brand-img--on-card.card-brand-img--amex {
  height: 1.5rem;
}

.card-input-brand .card-brand-img--visa {
  height: 1.125rem;
}

.card-input-brand .card-brand-img--mastercard {
  height: 1.25rem;
}

.card-input-brand .card-brand-img--amex {
  height: 1.125rem;
}

.card-ui-icon {
  flex-shrink: 0;
}

.card-ui-icon--light {
  color: #fff;
}

.card-ui-icon--muted {
  color: #9ca3af;
}

.card-ui-icon--trust {
  color: #1361c5;
}

.tarjeta-method-hint {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #166534;
  max-width: 36rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tarjeta-method-hint.hidden {
  display: none;
}

/* ── Formulario seguro de tarjeta ── */
.card-payment-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 8px 30px rgba(19, 97, 197, 0.08);
}

.card-payment-section.hidden {
  display: none;
}

.card-secure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.card-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: #166534;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.card-brand-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.card-brand-icons .card-brand-img {
  max-width: none;
}

.card-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

.card-visual {
  position: relative;
  aspect-ratio: 1.586 / 1;
  border-radius: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #0d4ea1 0%, #1361c5 45%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(13, 78, 161, 0.35);
  overflow: hidden;
}

.card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.card-visual-chip {
  width: 2.5rem;
  height: 1.85rem;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  margin-bottom: 1.5rem;
}

.card-visual-brand {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.95;
}

.card-visual-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  letter-spacing: 0.12em;
  margin: 0 0 1.25rem;
  word-spacing: 0.2em;
}

.card-visual-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.card-visual-label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.card-visual-value {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card-field-full {
  grid-column: 1 / -1;
}

.card-input-brand {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.card-input-brand:empty {
  display: none;
}

.card-cvv-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.55rem;
  display: flex;
  align-items: center;
  color: #9ca3af;
  cursor: help;
  pointer-events: auto;
}

.field-wrap--cvv input {
  padding-right: 2.75rem;
}

.field-wrap--cvv label {
  max-width: calc(100% - 2.75rem);
  line-height: 1.2;
}

.card-trust-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  color: #6b7280;
}

.card-trust-footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-trust-footer i {
  color: #1361c5;
}

#card-payment-section .field-wrap input {
  font-family: 'Montserrat', sans-serif;
}

@media (max-width: 768px) {
  #pay-method-picker.pay-method-grid--triple {
    grid-template-columns: 1fr;
  }

  .card-form-layout {
    grid-template-columns: 1fr;
  }

  .card-fields-grid {
    grid-template-columns: 1fr;
  }

  .card-visual {
    max-width: 22rem;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 520px) {
  #pay-method-picker.pay-method-grid {
    grid-template-columns: 1fr;
  }
}

.field-wrap .chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
}
.field-wrap.error input,
.field-wrap.error select { border-color: #ef4444; }
.field-wrap .err-icon {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #dc2626;
  font-size: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #dc2626;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

/* ── Tabla de facturas ── */
#bills-table tbody {
  font-weight: 500;
}
#bills-table tbody td {
  max-width: 90px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
#bills-table tbody td:nth-child(3) {
  min-width: 105px;
}
#bills-table tbody td:nth-child(12) {
  min-width: 100px;
}

#bills-table tbody tr:last-child td {
  border-bottom: 1px solid #d1d5db !important;
  padding-bottom: calc(0.75rem + 10px) !important;
}

.pay-total-bar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 1.1875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 2px solid #e5e7eb;
}

.pay-total-bar__amount {
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

/* En móvil la tabla de 13 columnas se vuelve una tarjeta por factura. */
@media (max-width: 991px) {
  #transaction-section .bills-table-wrap {
    overflow: visible;
    box-shadow: none;
    border-radius: 0;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
  }

  #bills-table {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
  }

  #bills-table thead {
    display: none;
  }

  #bills-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  #bills-table tbody tr.bill-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "cuenta delete"
      "tipo tipo"
      "total total"
      "estado estado"
      "agua agua"
      "aseo aseo"
      "dir dir"
      "ref ref"
      "venc venc"
      "susp susp"
      "pay pay"
      "virtual virtual";
    background: #fff;
    border: 1px solid #e4eaf2;
    border-left: 4px solid #1361c5;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    overflow: hidden;
  }

  #bills-table tbody tr.bill-card > td,
  #bills-table tbody tr.bill-card:last-child > td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: auto;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0.55rem 0.9rem !important;
    border: 0 !important;
    border-bottom: 1px solid #eef2f6 !important;
    text-align: right;
    white-space: normal;
  }

  #bills-table tbody td::before {
    content: attr(data-label);
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: #6b7280;
  }

  #bills-table .bill-val {
    min-width: 0;
    font-weight: 600;
    line-height: 1.35;
  }

  #bills-table tbody tr.bill-card > td.bill-cell--cuenta,
  #bills-table tbody tr.bill-card > td.bill-cell--delete,
  #bills-table tbody tr.bill-card:last-child > td.bill-cell--cuenta,
  #bills-table tbody tr.bill-card:last-child > td.bill-cell--delete {
    border-bottom: 0 !important;
  }

  #bills-table .bill-cell--cuenta {
    grid-area: cuenta;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding-top: 0.8rem !important;
    padding-bottom: 0.15rem !important;
    text-align: left;
  }

  #bills-table .bill-cell--cuenta::before {
    flex: none;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1361c5;
  }

  #bills-table .bill-cell--cuenta .bill-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    word-break: break-all;
  }

  #bills-table .bill-cell--delete {
    grid-area: delete;
    align-self: start;
    justify-content: flex-end;
    padding: 0.7rem 0.85rem 0 0 !important;
    color: #dc2626;
  }

  #bills-table .bill-cell--delete::before {
    content: none;
  }

  #bills-table .bill-cell--tipo {
    grid-area: tipo;
    justify-content: flex-start;
    padding-top: 0 !important;
    padding-bottom: 0.65rem !important;
    border-bottom: 0 !important;
    text-align: left;
  }

  #bills-table .bill-cell--tipo::before {
    content: none;
  }

  #bills-table .bill-cell--tipo .bill-val {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
  }

  #bills-table .bill-amount {
    grid-area: total;
    margin: 0 0.75rem 0.15rem;
    padding: 0.7rem 0.8rem !important;
    border: 0 !important;
    border-radius: 10px;
    background: #eef5ff;
  }

  #bills-table .bill-amount::before {
    font-size: 0.8125rem;
    color: #1e4f9a;
  }

  #bills-table .bill-amount .bill-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1361c5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  #bills-table .bill-cell--estado { grid-area: estado; }
  #bills-table .bill-cell--agua { grid-area: agua; }
  #bills-table .bill-cell--aseo { grid-area: aseo; }
  #bills-table .bill-cell--dir { grid-area: dir; }
  #bills-table .bill-cell--ref { grid-area: ref; }
  #bills-table .bill-cell--venc { grid-area: venc; }
  #bills-table .bill-cell--susp { grid-area: susp; }

  #bills-table .bill-cell--agua .bill-val,
  #bills-table .bill-cell--aseo .bill-val,
  #bills-table .bill-cell--ref .bill-val,
  #bills-table .bill-cell--venc .bill-val,
  #bills-table .bill-cell--susp .bill-val,
  #bills-table .bill-cell--estado .bill-val {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  #bills-table tbody tr.bill-card > td.bill-cell--dir,
  #bills-table tbody tr.bill-card:last-child > td.bill-cell--dir {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.2rem;
  }

  #bills-table .bill-cell--dir::before {
    flex: none;
  }

  #bills-table .bill-cell--dir .bill-val {
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }

  #bills-table .bill-cell--susp {
    border-bottom: 0 !important;
  }

  #bills-table tbody tr.bill-card > td.bill-cell--pay,
  #bills-table tbody tr.bill-card > td.bill-cell--virtual,
  #bills-table tbody tr.bill-card:last-child > td.bill-cell--pay,
  #bills-table tbody tr.bill-card:last-child > td.bill-cell--virtual {
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem !important;
    border-bottom: 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: #f8fafc;
  }

  #bills-table .bill-cell--pay { grid-area: pay; }
  #bills-table tbody tr.bill-card > td.bill-cell--virtual {
    grid-area: virtual;
    border-top: 0 !important;
  }

  #bills-table .bill-cell--pay label,
  #bills-table .bill-cell--virtual label {
    margin: 0;
  }

  #bills-table .bill-cell--pay::before,
  #bills-table .bill-cell--virtual::before {
    flex: 1 1 auto;
    font-size: 0.75rem;
  }

  .pay-total-bar {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border-color: #d3e4f8;
    background: #f4f8fd;
  }

  .pay-total-bar__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
  }

  .pay-total-bar__amount {
    margin-left: auto;
    font-size: 1.35rem;
    color: #1361c5;
    white-space: nowrap;
  }
}

/* ── Páginas informativas SEO ── */
.seo-wrap { max-width: 760px; margin: 0 auto; padding: 1.25rem 1rem 3rem; line-height: 1.65; color: #1f2937; }
.seo-wrap h1 { font-family: 'Poppins', sans-serif; font-size: 1.75rem; margin: 0 0 1rem; color: #1361c5; }
.seo-wrap h2 { font-family: 'Poppins', sans-serif; font-size: 1.2rem; margin: 2rem 0 0.75rem; color: #1e40af; }
.seo-wrap p { margin: 0 0 1rem; }
.seo-wrap ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.seo-wrap .lead { font-size: 1.05rem; color: #374151; }
.seo-wrap .cta { display: inline-block; margin-top: 1rem; padding: 0.75rem 1.25rem; background: #1361c5; color: #fff; text-decoration: none; border-radius: 8px; font-weight: 600; }
.seo-wrap .cta:hover { background: #0d4ea1; }

/* ── Modal VBV / 3-D Secure ── */
.vbv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.vbv-backdrop.hidden {
  display: none;
}

.vbv-box {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

.vbv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
}

.vbv-bank-logo {
  height: 2rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}

.vbv-bank-logo.hidden {
  display: none;
}

.vbv-bank-label {
  display: inline-flex;
  align-items: center;
  max-width: 10rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vbv-bank-label.hidden {
  display: none;
}

.vbv-brand-badge {
  height: 1.75rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.vbv-panel {
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
}

.vbv-panel.hidden {
  display: none;
}

.vbv-spinner {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1.25rem;
  border: 3px solid #dbeafe;
  border-top-color: #1361c5;
  border-radius: 50%;
  animation: vbv-spin 0.85s linear infinite;
}

@keyframes vbv-spin {
  to { transform: rotate(360deg); }
}

.vbv-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.vbv-text {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #374151;
}

.vbv-sub {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.vbv-amount,
.vbv-card {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
}

.vbv-otp-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.vbv-otp-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  text-align: center;
  letter-spacing: 0.15em;
}

.vbv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #1361c5;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.vbv-btn:hover {
  background: #0d4ea1;
}

.vbv-done-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 3rem;
}

.vbv-wait-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #dbeafe;
  color: #1361c5;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 3rem;
}

.vbv-warn-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 3rem;
}

/* ── Modal: ¿cómo deseas continuar? (fusión oficina virtual) ── */
.modal-box--continue {
  max-width: 34rem;
}
.continue-lead {
  margin: 0 0 1rem;
  font-size: 0.9875rem;
  line-height: 1.5;
  color: #374151;
}
.continue-lead strong {
  color: #1361c5;
  font-variant-numeric: tabular-nums;
}
.continue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}
@media (max-width: 560px) {
  .continue-grid { grid-template-columns: 1fr; }
}
.continue-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  padding: 1rem 1rem 1.1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.continue-card:hover {
  border-color: #1361c5;
  background: #f0f7ff;
  box-shadow: 0 4px 14px rgba(19, 97, 197, 0.12);
}
.continue-card--oficina {
  border-color: rgba(19, 97, 197, 0.35);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.continue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  background: #e8f2fc;
  color: #1361c5;
}
.continue-icon--oficina {
  background: #1361c5;
  color: #fff;
}
.continue-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}
.continue-card-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6b7280;
}
.continue-hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6b7280;
}
