.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;
  }
}

td.field-notas textarea {
  width: 16rem !important;
  max-width: 16rem !important;
  min-height: 38px !important;
  white-space: pre-wrap;
}

.model-credito #result_list thead th {
  background: #f6f6f7;
  padding-top: 11px;
  padding-bottom: 11px;
}

.model-credito #result_list tbody td:not(.action-checkbox) {
  padding-top: 9px;
  padding-bottom: 9px;
}

.dark .model-credito #result_list thead th {
  background: rgb(255 255 255 / 0.04);
}

.model-credito #result_list thead th .text {
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.reparto-iconos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
}

.tasa-linea {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tasa-linea .reparto-iconos {
  margin-left: 0;
}

.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;
}

#result_list :is(th.column-notas, td.field-notas),
.formset td.field-notas {
  min-width: max-content;
  max-width: none;
  height: auto;
  overflow: visible;
  white-space: normal;
}

.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;
}

#cuotas-data .reparto-ojo {
  opacity: 0;
}

#cuotas-data td:hover .reparto-ojo,
#cuotas-data .reparto-ojo[aria-expanded="true"] {
  opacity: 1;
}

@media (hover: none) {
  #cuotas-data .reparto-ojo {
    opacity: 1;
  }

  .reparto-ojo {
    width: 44px;
    height: 44px;
    margin: -14px;
  }
}

.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-velo {
  position: fixed;
  inset: 0;
  z-index: 79;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(9 9 11 / 48%);
  cursor: pointer;
}

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

.reparto-panel--hoja {
  top: auto;
  right: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 8px;
  z-index: 81;
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: min(70vh, calc(100vh - 16px));
  overflow: auto;
  border-radius: 16px;
  padding: 16px;
}

.reparto-panel--hoja.reparto-panel--interes {
  min-width: 0;
}

.reparto-panel--hoja .reparto-fila {
  align-items: baseline;
  white-space: normal;
}

.reparto-panel--hoja .reparto-fila > span:first-child {
  min-width: 0;
}

.reparto-panel--hoja .reparto-fila > span:last-child {
  flex: none;
}

.reparto-tabla {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1px;
  color: inherit;
  font-size: inherit;
  line-height: 1.3;
}

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

.reparto-tabla td {
  padding: 3px 0;
  border: 0;
  background: transparent;
  vertical-align: middle;
  white-space: nowrap;
}

.reparto-tabla td + td {
  padding-left: 12px;
}

.reparto-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.reparto-dias {
  display: block;
  color: #71717a;
  font-size: 11px;
  line-height: 1.25;
}

.reparto-valor {
  color: #18181b;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.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-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
}

.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,
.dark .reparto-dias {
  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,
.dark .reparto-valor {
  color: #fafafa;
}

.estado-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  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 {
  color: #047857;
}

.estado-chip--tarde {
  color: #4d7c0f;
}

.estado-chip--15,
.estado-chip--estable {
  color: #0369a1;
}

.estado-chip--7,
.estado-chip--alerta {
  color: #b45309;
}

.estado-chip--hoy,
.estado-chip--riesgo {
  color: #c2410c;
}

.estado-chip--mora,
.estado-chip--vencido,
.estado-chip--critica {
  color: #b91c1c;
}

.estado-chip--pendiente {
  color: #52525b;
}

.dark .estado-chip--pendiente {
  color: #d4d4d8;
}

.dark .estado-chip--al-dia,
.dark .estado-chip--sana {
  color: #6ee7b7;
}

.dark .estado-chip--tarde {
  color: #bef264;
}

.dark .estado-chip--15,
.dark .estado-chip--estable {
  color: #7dd3fc;
}

.dark .estado-chip--7,
.dark .estado-chip--alerta {
  color: #fcd34d;
}

.dark .estado-chip--hoy,
.dark .estado-chip--riesgo {
  color: #fdba74;
}

.dark .estado-chip--mora,
.dark .estado-chip--vencido,
.dark .estado-chip--critica {
  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;
}
