.comprobante-abrir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  background: #fff;
  color: #18181b;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.comprobante-abrir .material-symbols-outlined {
  font-size: 18px;
  color: #059669;
}

.comprobante-abrir:hover {
  border-color: #6ee7b7;
  background: #f0fdf9;
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}

.comprobante-cuenta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
}

.comprobante-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(26rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 2rem));
  height: fit-content;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #18181b;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 5%),
    0 24px 48px -12px rgb(0 0 0 / 32%);
  translate: none;
  transform: translate(-50%, -50%);
  animation: comprobante-entrar 160ms ease-out;
}

.comprobante-dialog::backdrop {
  background: rgb(9 9 11 / 48%);
  backdrop-filter: blur(6px);
}

@keyframes comprobante-entrar {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.comprobante-cabecera {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px 14px 16px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 72%);
  border-bottom: 1px solid #f4f4f5;
}

.comprobante-icono {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #059669;
  color: #fff;
  font-size: 22px;
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
}

.comprobante-titulos {
  flex: 1;
  min-width: 0;
}

.comprobante-titulo {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.comprobante-resumen {
  margin: 2px 0 0;
  color: #71717a;
  font-size: 12px;
}

.comprobante-resumen:empty {
  display: none;
}

.comprobante-x {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #71717a;
  cursor: pointer;
}

.comprobante-x:hover {
  background: #f4f4f5;
  color: #18181b;
}

.comprobante-x .material-symbols-outlined {
  font-size: 20px;
}

.comprobante-cuerpo {
  max-height: 18rem;
  padding: 12px;
  overflow: auto;
}

.comprobante-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comprobante-archivo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafafa;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.comprobante-archivo:hover {
  border-color: #a7f3d0;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.comprobante-ext {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  color: #059669;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.comprobante-nombre {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comprobante-externo {
  flex: none;
  color: #a1a1aa;
  font-size: 18px;
}

.comprobante-archivo:hover .comprobante-externo {
  color: #059669;
}

.comprobante-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  color: #71717a;
  text-align: center;
}

.comprobante-vacio .material-symbols-outlined {
  color: #d4d4d8;
  font-size: 36px;
}

.comprobante-vacio p {
  margin: 0;
  font-size: 14px;
}

.comprobante-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid #f4f4f5;
}

.comprobante-agregar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 10px;
  background: #059669;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.comprobante-agregar:hover {
  background: #047857;
  color: #fff;
}

.comprobante-agregar .material-symbols-outlined {
  font-size: 18px;
}

.comprobante-cerrar {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #52525b;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.comprobante-cerrar:hover {
  background: #f4f4f5;
}

.dark .comprobante-abrir {
  border-color: #3f3f46;
  background: #18181b;
  color: #fafafa;
}

.dark .comprobante-abrir:hover {
  border-color: #047857;
  background: #052e22;
}

.dark .comprobante-cuenta {
  background: #064e3b;
  color: #a7f3d0;
}

.dark .comprobante-dialog {
  background: #18181b;
  color: #fafafa;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 8%),
    0 24px 48px -12px rgb(0 0 0 / 60%);
}

.dark .comprobante-cabecera {
  background: linear-gradient(180deg, #052e22 0%, #18181b 72%);
  border-bottom-color: #27272a;
}

.dark .comprobante-resumen,
.dark .comprobante-vacio {
  color: #a1a1aa;
}

.dark .comprobante-x {
  color: #a1a1aa;
}

.dark .comprobante-x:hover,
.dark .comprobante-cerrar:hover {
  background: #27272a;
  color: #fafafa;
}

.dark .comprobante-archivo {
  border-color: #3f3f46;
  background: #09090b;
}

.dark .comprobante-archivo:hover {
  border-color: #047857;
  background: #18181b;
}

.dark .comprobante-ext {
  border-color: #3f3f46;
  background: #18181b;
}

.dark .comprobante-pie {
  border-top-color: #27272a;
}

.dark .comprobante-cerrar {
  color: #d4d4d8;
}

[data-monto-campo]:has(input:disabled) {
  background-color: #f4f4f5;
}

.dark [data-monto-campo]:has(input:disabled) {
  background-color: #27272a;
}

[data-monto-campo] input:disabled {
  cursor: default;
}

[data-monto-moneda] select.moneda-vacia {
  color: #a3a3a3;
}

.dark [data-monto-moneda] select.moneda-vacia {
  color: #737373;
}

#creditos-group .form-group.original .field-monto_prestado,
#creditos-group .form-group.original .field-fecha_desembolso,
#creditos-group .form-group:not(.original) .field-moneda {
  display: none;
}

@media (min-width: 1024px) {
  .form-row:has(> .field-line + .field-line) {
    display: flex;
    flex-direction: row;
  }

  .form-row > .field-line {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row:has(> .field-line + .field-line) > .field-line {
    flex: 1 1 0;
    min-width: 0;
  }

  .form-row > .field-line .lg\:flex-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row > .field-line .lg\:min-w-56,
  .form-row > .field-line .lg\:w-56,
  .form-row > .field-line .min-w-32,
  .form-row > .field-line .w-32,
  .form-row > .field-line .lg\:h-\[38px\] {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
  }

  .form-row > .field-line .lg\:-mt-2 {
    margin-top: 0;
  }

  .form-row > .field-line .lg\:ml-2 {
    margin-left: 0;
  }
}

#result_list td.field-notas textarea {
  width: 16rem !important;
  max-width: 16rem !important;
  min-height: 38px !important;
}

.model-persona #result_list,
.model-credito #result_list,
.model-desembolso #result_list,
.model-abono #result_list,
.model-comprobante #result_list,
.model-comision #result_list {
  width: max-content;
  min-width: 100%;
}

.model-persona #result_list :is(th, td):not(.action-checkbox):not(.field-notas),
.model-credito #result_list :is(th, td):not(.action-checkbox):not(.field-notas),
.model-desembolso #result_list :is(th, td):not(.action-checkbox):not(.field-notas),
.model-abono #result_list :is(th, td):not(.action-checkbox):not(.field-notas),
.model-comprobante #result_list :is(th, td):not(.action-checkbox):not(.field-notas),
.model-comision #result_list :is(th, td):not(.action-checkbox):not(.field-notas) {
  white-space: nowrap;
  min-width: max-content;
  overflow: visible;
  height: auto;
}

.model-credito #result_list td.field-notas,
.model-desembolso #result_list td.field-notas,
.model-abono #result_list td.field-notas,
.model-comprobante #result_list td.field-notas,
.model-comision #result_list td.field-notas {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reparto-ojo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
}

.reparto-ojo .material-symbols-outlined {
  font-size: 16px;
}

.reparto-ojo:hover,
.reparto-ojo[aria-expanded="true"] {
  color: #18181b;
}

.reparto-panel {
  position: fixed;
  inset: auto;
  z-index: 80;
  width: max-content;
  height: max-content;
  min-width: 11rem;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  color: #52525b;
  font-size: 13px;
  line-height: 1.3;
}

.reparto-panel[hidden] {
  display: none;
}

.reparto-fila {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 3px 0;
}

.reparto-fila > span:last-child {
  color: #18181b;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.reparto-panel--interes {
  min-width: 17rem;
}

.reparto-titulo {
  margin: 0 0 4px;
  color: #71717a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reparto-fila .reparto-cuota {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #52525b;
  font-weight: 400;
}

.reparto-fila .reparto-chip {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 14px;
  text-transform: uppercase;
}

.reparto-chip--vencida {
  background: #fee2e2;
  color: #b91c1c;
}

.reparto-chip--en-curso {
  background: #e0f2fe;
  color: #0369a1;
}

.reparto-total {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid #e4e4e7;
  color: #18181b;
  font-weight: 600;
}

.dark .reparto-titulo,
.dark .reparto-fila .reparto-cuota {
  color: #a1a1aa;
}

.dark .reparto-chip--vencida {
  background: rgb(127 29 29 / 60%);
  color: #fca5a5;
}

.dark .reparto-chip--en-curso {
  background: rgb(12 74 110 / 60%);
  color: #7dd3fc;
}

.dark .reparto-total {
  border-top-color: #3f3f46;
  color: #fafafa;
}

.dark .reparto-ojo:hover,
.dark .reparto-ojo[aria-expanded="true"] {
  color: #fafafa;
}

.dark .reparto-panel {
  border-color: #3f3f46;
  background: #18181b;
  color: #a1a1aa;
  box-shadow: 0 8px 24px rgb(0 0 0 / 40%);
}

.dark .reparto-fila > span:last-child {
  color: #fafafa;
}

.estado-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 16px;
  text-transform: uppercase;
  white-space: nowrap;
}

.estado-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.estado-chip--al-dia,
.estado-chip--sana {
  border-color: #a7f3d0;
  background: #d1fae5;
  color: #047857;
}

.estado-chip--15,
.estado-chip--estable {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #0369a1;
}

.estado-chip--7,
.estado-chip--alerta {
  border-color: #fde68a;
  background: #fef3c7;
  color: #b45309;
}

.estado-chip--hoy,
.estado-chip--riesgo {
  border-color: #fdba74;
  background: #ffedd5;
  color: #c2410c;
}

.estado-chip--mora,
.estado-chip--vencido,
.estado-chip--critica {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.estado-chip--pendiente {
  border-color: #e4e4e7;
  background: #f4f4f5;
  color: #52525b;
}

.dark .estado-chip--pendiente {
  border-color: #3f3f46;
  background: rgb(39 39 42 / 60%);
  color: #d4d4d8;
}

.dark .estado-chip--al-dia,
.dark .estado-chip--sana {
  border-color: #065f46;
  background: rgb(6 78 59 / 60%);
  color: #6ee7b7;
}

.dark .estado-chip--15,
.dark .estado-chip--estable {
  border-color: #075985;
  background: rgb(12 74 110 / 60%);
  color: #7dd3fc;
}

.dark .estado-chip--7,
.dark .estado-chip--alerta {
  border-color: #92400e;
  background: rgb(120 53 15 / 60%);
  color: #fcd34d;
}

.dark .estado-chip--hoy,
.dark .estado-chip--riesgo {
  border-color: #9a3412;
  background: rgb(124 45 18 / 60%);
  color: #fdba74;
}

.dark .estado-chip--mora,
.dark .estado-chip--vencido,
.dark .estado-chip--critica {
  border-color: #991b1b;
  background: rgb(127 29 29 / 60%);
  color: #fca5a5;
}

.pie-totales td {
  padding: 8px 12px;
  border-top: 2px solid #d4d4d8;
  background: #fafafa;
  color: #18181b;
  font-weight: 600;
  vertical-align: top;
  white-space: nowrap;
}

.pie-totales .pie-moneda + .pie-moneda {
  margin-top: 6px;
}

.dark .pie-totales td {
  border-top-color: #3f3f46;
  background: rgb(255 255 255 / 3%);
  color: #fafafa;
}
