h2#receivablesWalletTitle {
  margin: auto;
}
.home-receivables-open-btn {
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.16),
    rgba(34, 197, 94, 0.18)
  ) !important;
  border-color: rgba(56, 189, 248, 0.32) !important;
}

#receivablesWalletModal .receivables-wallet-modal {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#receivablesWalletModal .receivables-wallet-header {
  flex: 0 0 auto !important;
  width: 92%;
}

#receivablesWalletModal .receivables-wallet-subtitle {
  margin: 0.25rem 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.25;
}

#receivablesWalletModal .receivables-wallet-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

#receivablesWalletModal .receivables-wallet-status {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.35;
}

#receivablesWalletModal .receivables-wallet-insights {
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(8, 47, 73, 0.66),
    rgba(15, 23, 42, 0.92)
  );
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
  padding: 0.9rem;
  display: grid;
  gap: 0.8rem;
}

#receivablesWalletModal .receivables-wallet-insight-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

#receivablesWalletModal .receivables-wallet-insight-eyebrow {
  color: #bae6fd;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#receivablesWalletModal .receivables-wallet-insight-title {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 0.15rem;
}

#receivablesWalletModal .receivables-wallet-insight-note {
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.3;
  margin-top: 0.2rem;
}

#receivablesWalletModal .receivables-wallet-risk-score {
  color: #f8fafc;
  text-align: right;
  font-weight: 950;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-risk-score strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

#receivablesWalletModal .receivables-wallet-risk-score span {
  display: block;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 750;
  margin-top: 0.15rem;
}

#receivablesWalletModal .receivables-wallet-riskbar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

#receivablesWalletModal .receivables-wallet-riskbar-segment {
  min-width: 3px;
  height: 100%;
}

#receivablesWalletModal .receivables-wallet-riskbar-segment--vencidas {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

#receivablesWalletModal .receivables-wallet-riskbar-segment--hoy {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

#receivablesWalletModal .receivables-wallet-riskbar-segment--pronto {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

#receivablesWalletModal .receivables-wallet-riskbar-segment--sinFecha {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

#receivablesWalletModal .receivables-wallet-riskbar-segment--enPlazo {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

#receivablesWalletModal .receivables-wallet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.2;
}

#receivablesWalletModal .receivables-wallet-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#receivablesWalletModal .receivables-wallet-legend i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

#receivablesWalletModal .receivables-wallet-legend .is-vencidas i {
  background: #ef4444;
}
#receivablesWalletModal .receivables-wallet-legend .is-hoy i {
  background: #f59e0b;
}
#receivablesWalletModal .receivables-wallet-legend .is-pronto i {
  background: #0ea5e9;
}
#receivablesWalletModal .receivables-wallet-legend .is-sinFecha i {
  background: #94a3b8;
}
#receivablesWalletModal .receivables-wallet-legend .is-enPlazo i {
  background: #22c55e;
}

#receivablesWalletModal .receivables-wallet-advice {
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.12);
  color: #e2e8f0;
  padding: 0.7rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

#receivablesWalletModal .receivables-wallet-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

#receivablesWalletModal .receivables-wallet-kpi {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.98),
    rgba(30, 41, 59, 0.92)
  );
  padding: 0.85rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
}

#receivablesWalletModal .receivables-wallet-kpi-icon {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.2);
  margin-bottom: 0.36rem;
  font-size: 0.95rem;
  color: #f8fafc;
}

#receivablesWalletModal .receivables-wallet-kpi strong {
  display: block;
  color: #f8fafc;
  font-size: 1.16rem;
  line-height: 1.15;
  margin-top: 0.18rem;
}

#receivablesWalletModal
  .receivables-wallet-kpi
  > span:not(.receivables-wallet-kpi-icon) {
  display: block;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

#receivablesWalletModal .receivables-wallet-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

#receivablesWalletModal .receivables-wallet-section {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

#receivablesWalletModal .receivables-wallet-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f8fafc;
  font-weight: 850;
  line-height: 1.2;
}

#receivablesWalletModal .receivables-wallet-dot {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.25);
  flex: 0 0 auto;
}

#receivablesWalletModal .receivables-wallet-section-total {
  text-align: right;
  color: #f8fafc;
  font-weight: 850;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-section-total small {
  display: block;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 650;
}

#receivablesWalletModal .receivables-wallet-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#receivablesWalletModal .receivables-wallet-item {
  width: 94%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
}

#receivablesWalletModal .receivables-wallet-item:focus-visible,
#receivablesWalletModal button.receivables-wallet-period-card:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}

#receivablesWalletModal .receivables-wallet-item-title {
  font-weight: 850;
  color: #991b1b;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-item-meta {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.25;
  margin-top: 0.18rem;
}

#receivablesWalletModal .receivables-wallet-item-amount {
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
  align-self: center;
}

#receivablesWalletModal .receivables-wallet-empty {
  color: #cbd5e1;
  padding: 0.85rem;
  font-size: 0.9rem;
}

#receivablesWalletModal .receivables-wallet-section-action {
  margin: 0.45rem;
  width: calc(100% - 0.9rem);
}

#receivablesWalletModal .receivables-wallet-footer {
  flex: 0 0 auto !important;
  display: flex !important;
  gap: 0.6rem !important;
  justify-content: flex-end !important;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {
  #receivablesWalletModal.modal-backdrop {
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  #receivablesWalletModal .receivables-wallet-modal {
    width: 100vw !important;
    height: calc(
      100dvh - var(--appHeaderH, 50px) - env(safe-area-inset-top, 0px)
    ) !important;
    max-height: calc(
      100dvh - var(--appHeaderH, 50px) - env(safe-area-inset-top, 0px)
    ) !important;
    border-radius: 0 !important;
  }

  #receivablesWalletModal .receivables-wallet-body {
    padding: 0.8rem !important;
    touch-action: pan-y !important;
  }

  #receivablesWalletModal .receivables-wallet-insights {
    padding: 0.78rem;
    border-radius: 16px;
  }

  #receivablesWalletModal .receivables-wallet-insight-main {
    grid-template-columns: 1fr;
  }

  #receivablesWalletModal .receivables-wallet-risk-score {
    text-align: left;
  }

  #receivablesWalletModal .receivables-wallet-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  #receivablesWalletModal .receivables-wallet-kpi {
    padding: 0.72rem;
    border-radius: 14px;
  }

  #receivablesWalletModal .receivables-wallet-kpi strong {
    font-size: 0.98rem;
  }

  #receivablesWalletModal .receivables-wallet-sections {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  #receivablesWalletModal .receivables-wallet-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    min-height: 64px;
  }

  #receivablesWalletModal .receivables-wallet-item-amount {
    justify-self: start;
  }

  #receivablesWalletModal .receivables-wallet-footer {
    justify-content: stretch !important;
  }

  #receivablesWalletModal .receivables-wallet-footer button {
    flex: 1 1 auto;
  }
}
#receivablesWalletModal .receivables-wallet-item {
  cursor: default !important;
}

#receivablesWalletModal .receivables-wallet-item-main,
#receivablesWalletModal .receivables-wallet-period-doc-main {
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-item-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

#receivablesWalletModal .receivables-wallet-mini-btn {
  border: 1px solid rgba(30, 64, 175, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e3a8a;
  font-weight: 850;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.5rem 0.7rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#receivablesWalletModal .receivables-wallet-mini-btn--success {
  border-color: rgba(22, 163, 74, 0.34);
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #14532d;
}

#receivablesWalletModal .receivables-wallet-mini-btn--muted {
  border-color: rgba(100, 116, 139, 0.28);
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #334155;
}

#receivablesWalletModal .receivables-wallet-mini-btn:disabled,
#receivablesWalletModal .receivables-wallet-date-input:disabled {
  opacity: 0.65;
  cursor: wait;
}

#receivablesWalletModal .receivables-wallet-date-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
}

#receivablesWalletModal .receivables-wallet-date-input {
  width: 138px;
  min-height: 36px;
  border: 1px solid rgba(22, 101, 52, 0.36);
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.88rem;
  padding: 0.35rem 0.45rem;
  color-scheme: light;
  box-sizing: border-box;
}

#receivablesWalletModal
  .receivables-wallet-date-input::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-item-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.15fr 1fr;
    gap: 0.42rem;
    width: 100%;
  }

  #receivablesWalletModal .receivables-wallet-mini-btn,
  #receivablesWalletModal .receivables-wallet-date-label,
  #receivablesWalletModal .receivables-wallet-date-input {
    width: 100%;
    min-width: 0;
  }

  #receivablesWalletModal .receivables-wallet-date-label {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  #receivablesWalletModal .receivables-wallet-date-input {
    font-size: 0.86rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

#receivablesWalletModal .receivables-wallet-date-shell {
  position: relative;
  display: inline-block;
  width: 138px;
  min-width: 138px;
}

#receivablesWalletModal
  .receivables-wallet-date-shell
  .receivables-wallet-date-input {
  width: 100%;
  position: relative;
  z-index: 2;
  opacity: 1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  color-scheme: light !important;
}

#receivablesWalletModal .receivables-wallet-date-shell.is-empty::after {
  content: attr(data-placeholder);
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
  color: #475569;
  opacity: 1;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

#receivablesWalletModal
  .receivables-wallet-date-shell.is-empty
  .receivables-wallet-date-input,
#receivablesWalletModal
  .receivables-wallet-date-shell.is-empty
  .receivables-wallet-date-input::-webkit-datetime-edit,
#receivablesWalletModal
  .receivables-wallet-date-shell.is-empty
  .receivables-wallet-date-input::-webkit-date-and-time-value,
#receivablesWalletModal
  .receivables-wallet-followup-date-shell.is-empty
  .receivables-wallet-followup-date-input,
#receivablesWalletModal
  .receivables-wallet-followup-date-shell.is-empty
  .receivables-wallet-followup-date-input::-webkit-datetime-edit,
#receivablesWalletModal
  .receivables-wallet-followup-date-shell.is-empty
  .receivables-wallet-followup-date-input::-webkit-date-and-time-value {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

#receivablesWalletModal
  .receivables-wallet-date-shell
  .receivables-wallet-date-input::-webkit-calendar-picker-indicator,
#receivablesWalletModal
  .receivables-wallet-followup-date-shell
  .receivables-wallet-followup-date-input::-webkit-calendar-picker-indicator {
  opacity: 1 !important;
  filter: none !important;
  cursor: pointer;
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-date-shell {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }

  #receivablesWalletModal
    .receivables-wallet-date-shell
    .receivables-wallet-date-input {
    min-height: 40px;
    font-size: 0.9rem;
    padding-left: 0.5rem;
    padding-right: 0.4rem;
  }

  #receivablesWalletModal .receivables-wallet-date-shell.is-empty::after {
    left: 0.5rem;
    font-size: 0.86rem;
  }
}

#receivablesWalletModal .receivables-wallet-mini-btn--notice {
  border-color: rgba(14, 165, 233, 0.34);
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #075985;
}

#receivablesWalletModal .receivables-wallet-mini-btn--notice:disabled {
  opacity: 0.72;
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-item-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.42rem !important;
    align-items: stretch !important;
  }

  #receivablesWalletModal
    .receivables-wallet-item-actions
    .receivables-wallet-date-label {
    grid-column: 1 / 2 !important;
  }

  #receivablesWalletModal
    .receivables-wallet-item-actions
    .receivables-wallet-mini-btn--success {
    grid-column: 2 / 3 !important;
    align-self: end !important;
    min-height: 40px !important;
  }

  #receivablesWalletModal .receivables-wallet-mini-btn,
  #receivablesWalletModal .receivables-wallet-date-input {
    min-height: 40px !important;
  }
}

#receivablesWalletModal .receivables-wallet-footer {
  gap: 0.5rem;
}

#receivablesWalletCopySummaryBtn,
#receivablesWalletExportCsvBtn {
  white-space: nowrap;
}
#receivablesWalletExportCsvBtn:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.45rem !important;
  }

  #receivablesWalletRefreshBtn,
  #receivablesWalletExportCsvBtn,
  #receivablesWalletCopySummaryBtn,
  #receivablesWalletHistoryBtn {
    width: 100% !important;
    min-height: 42px !important;
    padding-inline: 0.55rem !important;
    white-space: nowrap !important;
  }
}

#receivablesWalletModal .receivables-wallet-clients {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.92),
    rgba(30, 41, 59, 0.82)
  );
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

#receivablesWalletModal .receivables-wallet-clients-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#receivablesWalletModal .receivables-wallet-clients-eyebrow {
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.16rem;
}

#receivablesWalletModal .receivables-wallet-clients-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.2;
}

#receivablesWalletModal .receivables-wallet-clients-head p {
  margin: 0.24rem 0 0;
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.3;
}

#receivablesWalletModal .receivables-wallet-clients-head > span {
  color: #f8fafc;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  padding: 0.28rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-client-list {
  display: grid;
  gap: 0.52rem;
  padding: 0.75rem;
}

#receivablesWalletModal .receivables-wallet-client-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.7rem;
}

#receivablesWalletModal .receivables-wallet-client-rank {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  color: #f8fafc;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.25);
}

#receivablesWalletModal .receivables-wallet-client-title {
  color: #f8fafc;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-client-meta,
#receivablesWalletModal .receivables-wallet-client-detail {
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.25;
  margin-top: 0.12rem;
}

#receivablesWalletModal .receivables-wallet-client-bar {
  height: 6px;
  margin-top: 0.42rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-client-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}

#receivablesWalletModal .receivables-wallet-client-side {
  text-align: right;
  min-width: 7.4rem;
}

#receivablesWalletModal .receivables-wallet-client-side strong {
  display: block;
  color: #f8fafc;
  font-size: 0.98rem;
  line-height: 1.15;
}

#receivablesWalletModal .receivables-wallet-client-side span {
  display: inline-block;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 850;
  margin-top: 0.26rem;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  background: rgba(148, 163, 184, 0.16);
}

#receivablesWalletModal
  .receivables-wallet-client-item.is-vencidas
  .receivables-wallet-client-bar
  span,
#receivablesWalletModal
  .receivables-wallet-client-item.is-vencidas
  .receivables-wallet-client-side
  span {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

#receivablesWalletModal
  .receivables-wallet-client-item.is-hoy
  .receivables-wallet-client-bar
  span,
#receivablesWalletModal
  .receivables-wallet-client-item.is-hoy
  .receivables-wallet-client-side
  span {
  background: linear-gradient(90deg, #f59e0b, #facc15);
  color: #0f172a;
}

#receivablesWalletModal
  .receivables-wallet-client-item.is-pronto
  .receivables-wallet-client-bar
  span,
#receivablesWalletModal
  .receivables-wallet-client-item.is-pronto
  .receivables-wallet-client-side
  span {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

#receivablesWalletModal
  .receivables-wallet-client-item.is-sinFecha
  .receivables-wallet-client-bar
  span,
#receivablesWalletModal
  .receivables-wallet-client-item.is-sinFecha
  .receivables-wallet-client-side
  span {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-clients-head {
    padding: 0.78rem;
  }

  #receivablesWalletModal .receivables-wallet-client-list {
    padding: 0.6rem;
    gap: 0.5rem;
  }

  #receivablesWalletModal .receivables-wallet-client-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.58rem;
    padding: 0.62rem;
  }

  #receivablesWalletModal .receivables-wallet-client-side {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    text-align: left;
    min-width: 0;
    padding-top: 0.48rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
  }

  #receivablesWalletModal .receivables-wallet-client-side strong {
    font-size: 1rem;
  }

  #receivablesWalletModal .receivables-wallet-client-side span {
    margin-top: 0;
    white-space: nowrap;
  }
}

#receivablesWalletModal .receivables-wallet-followups-shell,
#receivablesWalletModal .receivables-wallet-client-filter-shell,
#receivablesWalletModal .receivables-wallet-client-summary-shell {
  display: block;
}

#receivablesWalletModal .receivables-wallet-followups {
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.9),
    rgba(30, 41, 59, 0.84)
  );
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-followups-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem;
}

#receivablesWalletModal .receivables-wallet-followups-head h3 {
  margin: 0.15rem 0 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
}

#receivablesWalletModal .receivables-wallet-followups-head p {
  margin: 0.25rem 0 0;
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.32;
}

#receivablesWalletModal .receivables-wallet-followups-body {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
}

#receivablesWalletModal .receivables-wallet-followups-body[hidden] {
  display: none !important;
}

#receivablesWalletModal .receivables-wallet-followup-group {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.06);
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-followup-group-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

#receivablesWalletModal .receivables-wallet-followup-group-title small {
  margin-left: auto;
  color: #cbd5e1;
  font-size: 0.76rem;
}

#receivablesWalletModal .receivables-wallet-followup-list,
#receivablesWalletModal .receivables-wallet-period-doc-list {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
}

#receivablesWalletModal .receivables-wallet-followup-item,
#receivablesWalletModal .receivables-wallet-period-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  padding: 0.58rem;
}

#receivablesWalletModal .receivables-wallet-followup-item strong,
#receivablesWalletModal .receivables-wallet-followup-item span,
#receivablesWalletModal .receivables-wallet-period-doc strong,
#receivablesWalletModal .receivables-wallet-period-doc span {
  display: block;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-followup-item strong {
  font-size: 0.84rem;
  line-height: 1.18;
}

#receivablesWalletModal .receivables-wallet-followup-item span,
#receivablesWalletModal .receivables-wallet-period-doc span {
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.24;
  margin-top: 0.12rem;
}

#receivablesWalletModal .receivables-wallet-followup-item b,
#receivablesWalletModal .receivables-wallet-period-doc b {
  white-space: nowrap;
  font-size: 0.84rem;
}

#receivablesWalletModal .receivables-wallet-followup-more {
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0 0.7rem 0.62rem;
}

#receivablesWalletModal .receivables-wallet-followup-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.85fr);
  gap: 0.45rem;
  align-items: end;
  margin-top: 0.18rem;
  padding-top: 0.15rem;
}

#receivablesWalletModal .receivables-wallet-followup-label {
  display: grid;
  gap: 0.22rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 850;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-followup-select,
#receivablesWalletModal .receivables-wallet-followup-date-input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(22, 101, 52, 0.36);
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  color-scheme: light;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 0.35rem 0.45rem;
  box-sizing: border-box;
}

#receivablesWalletModal .receivables-wallet-followup-date-shell {
  position: relative;
  display: block;
  width: 100%;
}

#receivablesWalletModal
  .receivables-wallet-followup-date-shell
  .receivables-wallet-followup-date-input {
  position: relative;
  z-index: 2;
}

#receivablesWalletModal
  .receivables-wallet-followup-date-shell.is-empty::after {
  content: attr(data-placeholder);
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
  color: #475569;
  opacity: 1;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1;
}

#receivablesWalletModal .receivables-wallet-followups-toggle,
#receivablesWalletModal
  .receivables-wallet-followups
  .receivables-wallet-section-toggle {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(147, 197, 253, 0.34);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #e0f2fe;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.36rem 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#receivablesWalletModal .receivables-wallet-followups-toggle:hover,
#receivablesWalletModal
  .receivables-wallet-followups
  .receivables-wallet-section-toggle:hover {
  background: rgba(59, 130, 246, 0.24);
}

#receivablesWalletModal .receivables-wallet-followups-toggle:focus-visible,
#receivablesWalletModal
  .receivables-wallet-followups
  .receivables-wallet-section-toggle:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-followups-head {
    padding: 0.78rem;
  }

  #receivablesWalletModal .receivables-wallet-followup-item {
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }

  #receivablesWalletModal .receivables-wallet-followup-item b {
    justify-self: start;
  }

  #receivablesWalletModal .receivables-wallet-followup-editor {
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  #receivablesWalletModal .receivables-wallet-followup-select,
  #receivablesWalletModal .receivables-wallet-followup-date-input {
    min-height: 40px;
    font-size: 0.9rem;
  }
}

#receivablesWalletModal .receivables-wallet-module-nav {
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at top left,
      rgba(14, 165, 233, 0.22),
      transparent 34%
    ),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9));
  padding: 0.9rem;
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.2fr);
  gap: 0.85rem;
  align-items: center;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.22);
}

#receivablesWalletModal .receivables-wallet-module-title,
#receivablesWalletModal .receivables-wallet-client-filter-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-module-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.32);
  flex: 0 0 auto;
  font-weight: 950;
}

#receivablesWalletModal .receivables-wallet-module-title strong,
#receivablesWalletModal .receivables-wallet-periods-head h3 {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 950;
}

#receivablesWalletModal
  .receivables-wallet-module-title
  span:not(.receivables-wallet-module-icon),
#receivablesWalletModal .receivables-wallet-periods-head p {
  display: block;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.28;
  margin-top: 0.15rem;
}

#receivablesWalletModal .receivables-wallet-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

#receivablesWalletModal .receivables-wallet-tab {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.08);
  color: #e2e8f0;
  min-height: 58px;
  padding: 0.55rem 0.62rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-align: left;
}

#receivablesWalletModal .receivables-wallet-tab:hover {
  background: rgba(248, 250, 252, 0.13);
  border-color: rgba(125, 211, 252, 0.32);
}

#receivablesWalletModal .receivables-wallet-tab.is-active {
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.28),
    rgba(34, 197, 94, 0.18)
  );
  border-color: rgba(125, 211, 252, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(14, 165, 233, 0.12);
}

#receivablesWalletModal .receivables-wallet-tab span {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #f8fafc;
  font-size: 0.82rem;
}

#receivablesWalletModal .receivables-wallet-tab b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 900;
}

#receivablesWalletModal .receivables-wallet-tab small {
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 950;
}

#receivablesWalletModal .receivables-wallet-view-note {
  grid-column: 1 / -1;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 15px;
  background: rgba(8, 47, 73, 0.28);
  color: #dbeafe;
  padding: 0.72rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.35;
}

#receivablesWalletModal .receivables-wallet-section-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0 0.45rem 0.45rem;
}

#receivablesWalletModal .receivables-wallet-section-actions .btn-soft {
  width: 100%;
  margin: 0;
  min-height: 38px;
}

#receivablesWalletModal .receivables-wallet-show-more {
  border-color: rgba(125, 211, 252, 0.28) !important;
  background: rgba(14, 165, 233, 0.12) !important;
  color: #e0f2fe !important;
}

#receivablesWalletModal .receivables-wallet-periods {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.9),
    rgba(30, 41, 59, 0.84)
  );
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-periods-head {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#receivablesWalletModal .receivables-wallet-periods-head h3 {
  margin: 0.15rem 0 0;
}

#receivablesWalletModal .receivables-wallet-periods-head p {
  margin: 0.25rem 0 0;
}

#receivablesWalletModal .receivables-wallet-period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem;
}

#receivablesWalletModal .receivables-wallet-period-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  padding: 0.72rem;
  display: grid;
  gap: 0.55rem;
}

#receivablesWalletModal .receivables-wallet-period-card strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.1;
}

#receivablesWalletModal .receivables-wallet-period-card span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

#receivablesWalletModal .receivables-wallet-period-card dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

#receivablesWalletModal .receivables-wallet-period-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: baseline;
}

#receivablesWalletModal .receivables-wallet-period-card dt {
  color: #475569;
  font-size: 0.74rem;
  font-weight: 850;
}

#receivablesWalletModal .receivables-wallet-period-card dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: right;
}

@media (min-width: 1024px) {
  #receivablesWalletModal .receivables-wallet-modal {
    width: min(1180px, calc(100vw - 32px)) !important;
  }

  #receivablesWalletModal .receivables-wallet-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #receivablesWalletModal .receivables-wallet-kpi {
    min-height: 104px;
  }

  #receivablesWalletModal .receivables-wallet-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
    scroll-snap-type: x proximity;
  }

  #receivablesWalletModal .receivables-wallet-tab {
    min-width: 142px;
    min-height: 54px;
    scroll-snap-align: start;
  }
}
@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  #receivablesWalletModal.modal-backdrop {
    padding: 0 !important;
  }

  #receivablesWalletModal .receivables-wallet-modal {
    top: calc(
      var(--appHeaderH, 50px) + 16px + env(safe-area-inset-top, 0px)
    ) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: min(1480px, calc(100vw - 48px)) !important;
    max-width: none !important;
    height: calc(
      100dvh - var(--appHeaderH, 50px) - 32px - env(safe-area-inset-top, 0px)
    ) !important;
    max-height: calc(
      100dvh - var(--appHeaderH, 50px) - 32px - env(safe-area-inset-top, 0px)
    ) !important;
    margin: 0 !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  #receivablesWalletModal .receivables-wallet-header,
  #receivablesWalletModal .receivables-wallet-footer {
    padding-inline: 1.25rem !important;
  }

  #receivablesWalletModal .receivables-wallet-body {
    padding: 1.15rem 1.25rem !important;
    gap: 1.15rem !important;
  }

  #receivablesWalletModal .receivables-wallet-module-nav {
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.55fr);
  }

  #receivablesWalletModal .receivables-wallet-insights {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  #receivablesWalletModal .receivables-wallet-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  #receivablesWalletModal .receivables-wallet-sections {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
  }

  #receivablesWalletModal .receivables-wallet-client-list,
  #receivablesWalletModal .receivables-wallet-followups-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #receivablesWalletModal
    .receivables-wallet-followups-body
    > .receivables-wallet-empty {
    grid-column: 1 / -1;
  }

  #receivablesWalletModal .receivables-wallet-period-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) and (hover: hover) and (pointer: fine) {
  #receivablesWalletModal .receivables-wallet-sections {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-modal {
    transform: none !important;
  }
}
#receivablesWalletModal .receivables-wallet-history-bridge {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 38px;
}

#receivablesWalletModal button.receivables-wallet-period-card {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  padding: 0.72rem;
  display: grid;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

#receivablesWalletModal button.receivables-wallet-period-card:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.16);
}

#receivablesWalletModal button.receivables-wallet-period-card.is-active {
  border-color: rgba(14, 165, 233, 0.72);
  box-shadow:
    0 12px 28px rgba(14, 165, 233, 0.18),
    inset 0 0 0 2px rgba(14, 165, 233, 0.14);
}

#receivablesWalletModal .receivables-wallet-period-detail {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

#receivablesWalletModal .receivables-wallet-period-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 17px;
  background: rgba(8, 47, 73, 0.24);
  padding: 0.78rem;
}

#receivablesWalletModal .receivables-wallet-period-detail-head h3 {
  margin: 0.12rem 0 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
}

#receivablesWalletModal .receivables-wallet-period-detail-head p,
#receivablesWalletModal .receivables-wallet-client-summary p {
  margin: 0.22rem 0 0;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.28;
}

#receivablesWalletModal .receivables-wallet-period-priority {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  max-width: 28rem;
}

#receivablesWalletModal .receivables-wallet-period-priority span {
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(59, 130, 246, 0.13);
  color: #e0f2fe;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-period-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

#receivablesWalletModal .receivables-wallet-period-detail-block {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 17px;
  background: rgba(15, 23, 42, 0.74);
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-period-detail-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

#receivablesWalletModal .receivables-wallet-period-detail-block-head div {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #f8fafc;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-period-detail-block-head span {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.24);
  flex: 0 0 auto;
}

#receivablesWalletModal .receivables-wallet-period-detail-block-head strong {
  font-size: 0.88rem;
  line-height: 1.12;
  font-weight: 950;
}

#receivablesWalletModal .receivables-wallet-period-detail-block-head b {
  color: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-period-doc strong {
  font-size: 0.84rem;
  line-height: 1.18;
  font-weight: 900;
}

#receivablesWalletModal
  .receivables-wallet-period-detail-block
  .receivables-wallet-show-more {
  margin: 0 0.55rem 0.55rem;
  width: calc(100% - 1.1rem);
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  #receivablesWalletModal .receivables-wallet-periods-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  #receivablesWalletModal .receivables-wallet-period-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-periods-head,
  #receivablesWalletModal .receivables-wallet-period-detail-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  #receivablesWalletModal .receivables-wallet-history-bridge {
    width: 100%;
  }

  #receivablesWalletModal .receivables-wallet-period-priority {
    justify-content: flex-start;
    max-width: none;
  }

  #receivablesWalletModal .receivables-wallet-period-detail {
    padding: 0.65rem;
  }

  #receivablesWalletModal .receivables-wallet-period-grid,
  #receivablesWalletModal .receivables-wallet-section-actions,
  #receivablesWalletModal .receivables-wallet-period-detail-grid {
    grid-template-columns: 1fr;
  }

  #receivablesWalletModal .receivables-wallet-period-doc {
    grid-template-columns: 1fr;
    gap: 0.28rem;
  }

  #receivablesWalletModal .receivables-wallet-period-doc b {
    justify-self: start;
  }
}
#receivablesWalletModal .receivables-wallet-client-filter {
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at top right,
      rgba(34, 197, 94, 0.16),
      transparent 34%
    ),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.86));
  padding: 0.85rem;
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.15fr);
  gap: 0.85rem;
  align-items: end;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.16);
}

#receivablesWalletModal .receivables-wallet-client-filter.is-active {
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(34, 197, 94, 0.1);
}

#receivablesWalletModal .receivables-wallet-client-filter-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.28);
  flex: 0 0 auto;
}

#receivablesWalletModal .receivables-wallet-client-filter-main strong {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-client-filter-main span {
  display: block;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.25;
  margin-top: 0.16rem;
}

#receivablesWalletModal .receivables-wallet-client-filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 0.5rem;
  align-items: end;
}

#receivablesWalletModal .receivables-wallet-client-filter-label {
  display: grid;
  gap: 0.24rem;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 850;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-client-filter-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 13px;
  background: #ffffff;
  color: #17201a !important;
  -webkit-text-fill-color: #17201a !important;
  caret-color: #17201a !important;
  color-scheme: light;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 0.68rem;
  box-sizing: border-box;
}

#receivablesWalletModal .receivables-wallet-client-filter-input::placeholder {
  color: #627068;
  opacity: 1;
}

/* Regla exclusiva pedida por el usuario — gana pase lo que pase con
   cualquier otra regla de placeholder que pudiera colisionar aquí. */
#receivablesWalletClientSearch::placeholder {
  color: #627068 !important;
  opacity: 1 !important;
}

#receivablesWalletModal .receivables-wallet-client-filter-apply,
#receivablesWalletModal .receivables-wallet-client-filter-clear {
  min-height: 42px;
  margin: 0;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-client-filter-clear:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  #receivablesWalletModal .receivables-wallet-client-filter {
    grid-template-columns: minmax(290px, 0.72fr) minmax(0, 1.28fr);
  }

  #receivablesWalletModal .receivables-wallet-client-filter-controls {
    grid-template-columns: minmax(320px, 1fr) auto auto;
  }
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-module-nav,
  #receivablesWalletModal .receivables-wallet-client-filter {
    grid-template-columns: 1fr;
    padding: 0.78rem;
    border-radius: 17px;
  }

  #receivablesWalletModal .receivables-wallet-client-filter-controls {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  #receivablesWalletModal .receivables-wallet-client-filter-label {
    grid-column: 1 / -1;
  }

  #receivablesWalletModal .receivables-wallet-client-filter-input,
  #receivablesWalletModal .receivables-wallet-client-filter-apply,
  #receivablesWalletModal .receivables-wallet-client-filter-clear {
    width: 100%;
    min-height: 42px;
  }
}
#receivablesWalletModal .receivables-wallet-client-summary {
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at top left,
      rgba(14, 165, 233, 0.18),
      transparent 34%
    ),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.86));
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.16);
  overflow: hidden;
}

#receivablesWalletModal .receivables-wallet-client-summary.is-empty {
  background:
    radial-gradient(
      circle at top left,
      rgba(148, 163, 184, 0.14),
      transparent 34%
    ),
    linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78));
}

#receivablesWalletModal .receivables-wallet-client-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#receivablesWalletModal .receivables-wallet-client-summary-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-client-summary-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.28);
  font-weight: 950;
}

#receivablesWalletModal .receivables-wallet-client-summary h3 {
  margin: 0.12rem 0 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-client-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
}

#receivablesWalletModal .receivables-wallet-client-summary-actions .btn-soft,
#receivablesWalletModal .receivables-wallet-client-summary-clear {
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}

#receivablesWalletModal .receivables-wallet-client-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem;
}

#receivablesWalletModal .receivables-wallet-client-summary-metric {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  padding: 0.7rem;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-client-summary-metric.is-main {
  background: linear-gradient(135deg, #e0f2fe, #dcfce7);
  border-color: rgba(14, 165, 233, 0.34);
}

#receivablesWalletModal .receivables-wallet-client-summary-metric span {
  display: block;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
}

#receivablesWalletModal .receivables-wallet-client-summary-metric strong {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.15;
  margin-top: 0.24rem;
  overflow-wrap: anywhere;
}

#receivablesWalletModal .receivables-wallet-client-summary-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0 0.75rem 0.75rem;
}

#receivablesWalletModal .receivables-wallet-client-summary-details div {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  padding: 0.65rem;
  min-width: 0;
}

#receivablesWalletModal .receivables-wallet-client-summary-details span,
#receivablesWalletModal .receivables-wallet-client-summary-details strong {
  display: block;
}

#receivablesWalletModal .receivables-wallet-client-summary-details span {
  color: #bae6fd;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
}

#receivablesWalletModal .receivables-wallet-client-summary-details strong {
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.25;
  margin-top: 0.22rem;
  overflow-wrap: anywhere;
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  #receivablesWalletModal .receivables-wallet-client-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #receivablesWalletModal .receivables-wallet-client-summary-head {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.78rem;
  }

  #receivablesWalletModal .receivables-wallet-client-summary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  #receivablesWalletModal .receivables-wallet-client-summary-actions .btn-soft,
  #receivablesWalletModal .receivables-wallet-client-summary-clear {
    width: 100%;
    min-height: 42px;
  }

  #receivablesWalletModal .receivables-wallet-client-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.65rem;
  }

  #receivablesWalletModal .receivables-wallet-client-summary-metric {
    padding: 0.62rem;
  }

  #receivablesWalletModal .receivables-wallet-client-summary-details {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0 0.65rem 0.65rem;
  }
}

/* =========================================================
   RESP1.2A · targets táctiles Cobros <=979.98
   Regla declarativa: también alcanza nodos recreados por render dinámico.
   ========================================================= */
@media (max-width: 979.98px) {
  #receivablesWalletModal .modal :is(button, [role="button"]),
  #receivablesWalletModal .modal label:has(input[type="checkbox"]),
  #receivablesWalletModal .modal label:has(input[type="radio"]) {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  #receivablesWalletModal .modal :is(button, [role="button"]) {
    min-width: 44px !important;
  }

  #receivablesWalletModal
    .modal
    :is(
      input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(
          [type="file"]
        ),
      select,
      textarea
    ) {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
}
