.collections-page {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 7px;
  min-height: calc(100vh - var(--topbar-height) - 44px);
  animation: fadeUp 0.2s ease both;
}

/* =========================================================
   BASE
   ========================================================= */

.collections-hero,
.collections-kpis,
.collections-filters,
.collections-layout,
.aging-panel,
.collections-panel,
.collections-toast,
.collections-modal__card,
.collections-view-card {
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--panel-solid) 97%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.035),
    0 12px 28px rgba(0, 0, 0, 0.035);
}

.collections-kpis,
.collections-filters,
.collections-layout,
.aging-panel,
.collections-panel,
.collections-toast,
.collections-modal__card,
.collections-view-card {
  overflow: hidden;
}

html[data-theme="dark"] .collections-hero,
html[data-theme="dark"] .collections-kpis,
html[data-theme="dark"] .collections-filters,
html[data-theme="dark"] .collections-layout,
html[data-theme="dark"] .aging-panel,
html[data-theme="dark"] .collections-panel,
html[data-theme="dark"] .collections-toast,
html[data-theme="dark"] .collections-modal__card,
html[data-theme="dark"] .collections-view-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(7, 7, 7, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.025),
    0 14px 34px rgba(0, 0, 0, 0.34);
}

/* =========================================================
   HERO
   ========================================================= */

.collections-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  overflow: visible;
}

.collections-hero__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.collections-hero span,
.collections-kpis span,
.collections-filter label,
.collections-panel__head span,
.aging-panel > strong,
.collections-toast strong,
.collections-modal header span,
.collections-view-card header span,
.collections-form-grid label span,
.collections-view-summary span,
.collections-view-grid span,
.collections-view-notes span {
  color: var(--muted);
  font-size: 7.4px;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.collections-hero h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.collections-hero p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.45;
}

.collections-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.collections-btn,
.collections-filter button,
.collections-table-head button,
.collections-row-actions button,
.collections-pagination button,
.collections-modal button,
.collections-view-card button,
.collections-file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 8px;
  background: transparent;
  color: #111111;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    opacity var(--transition);
}

.collections-btn:hover,
.collections-filter button:hover,
.collections-table-head button:hover,
.collections-row-actions button:hover,
.collections-pagination button:hover,
.collections-modal button:hover,
.collections-view-card button:hover,
.collections-file-link:hover {
  border-color: rgba(0, 0, 0, 0.24);
  background: rgba(0, 0, 0, 0.055);
}

.collections-btn:active,
.collections-filter button:active,
.collections-row-actions button:active,
.collections-pagination button:active,
.collections-modal button:active,
.collections-view-card button:active,
.collections-file-link:active {
  transform: scale(0.98);
}

.collections-btn .icon,
.collections-filter button .icon,
.collections-table-head button .icon,
.collections-row-actions button .icon,
.collections-pagination button .icon,
.collections-modal button .icon,
.collections-view-card button .icon,
.collections-file-link .icon,
.aging-note .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.15;
  color: currentColor;
  stroke: currentColor;
}

.collections-btn--dark,
.collections-modal button.is-primary {
  border-color: rgba(17, 17, 17, 0.22);
  background: rgba(17, 17, 17, 0.06);
  color: #111111;
}

.collections-btn--dark:hover,
.collections-modal button.is-primary:hover {
  border-color: rgba(17, 17, 17, 0.36);
  background: rgba(17, 17, 17, 0.1);
}

html[data-theme="dark"] .collections-btn,
html[data-theme="dark"] .collections-filter button,
html[data-theme="dark"] .collections-table-head button,
html[data-theme="dark"] .collections-row-actions button,
html[data-theme="dark"] .collections-pagination button,
html[data-theme="dark"] .collections-modal button,
html[data-theme="dark"] .collections-view-card button,
html[data-theme="dark"] .collections-file-link {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
}

/* =========================================================
   COLUMNAS MENU
   ========================================================= */

.collections-columns {
  position: relative;
}

.collections-columns-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  display: none;
  width: 210px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 13px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.collections-columns-menu.is-open {
  display: grid;
  gap: 5px;
}

.collections-columns-menu__head {
  display: grid;
  gap: 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.collections-columns-menu__head strong {
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 950;
}

.collections-columns-menu__head small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.collections-columns-menu label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: var(--text-strong);
  font-size: 8.5px;
  font-weight: 850;
}

/* =========================================================
   KPIS
   ========================================================= */

.collections-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.collections-kpis article {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 8px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-kpis article:last-child {
  border-right: 0;
}

.collections-kpis strong {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collections-kpis small {
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 820;
  line-height: 1.25;
}

.collections-kpis article:nth-child(1) strong {
  color: #2563eb;
}

.collections-kpis article:nth-child(2) strong {
  color: #dc2626;
}

.collections-kpis article:nth-child(3) strong {
  color: #16a34a;
}

.collections-kpis article:nth-child(4) strong {
  color: #7c3aed;
}

/* =========================================================
   FILTROS
   ========================================================= */

.collections-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(6, minmax(100px, 0.6fr)) auto;
  gap: 6px;
  padding: 8px;
}

.collections-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.collections-filter > div {
  position: relative;
  min-width: 0;
}

.collections-filter > div .icon {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 11px;
  height: 11px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.collections-filter input,
.collections-filter select,
.collections-form-grid input,
.collections-form-grid select,
.collections-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-strong);
  font-size: 8.6px;
  font-weight: 820;
  outline: none;
}

.collections-filter--search input {
  padding-left: 25px;
}

.collections-filter--actions {
  justify-content: end;
}

html[data-theme="dark"] .collections-filter input,
html[data-theme="dark"] .collections-filter select,
html[data-theme="dark"] .collections-form-grid input,
html[data-theme="dark"] .collections-form-grid select,
html[data-theme="dark"] .collections-form-grid textarea {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.9);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.collections-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.aging-panel {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
  background: var(--panel-soft);
  box-shadow: none;
}

.aging-panel > strong {
  color: #ff5a1f;
}

.aging-panel div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
}

.aging-panel div span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
}

.aging-panel div b {
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 950;
  text-align: right;
}

.aging-note {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel-solid);
}

.aging-note p {
  margin: 0;
  font-size: 8px;
  font-weight: 720;
  line-height: 1.35;
}

/* =========================================================
   PANEL / TABLA
   ========================================================= */

.collections-panel {
  display: grid;
  min-width: 0;
  border-radius: 15px;
  box-shadow: none;
}

.collections-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-panel__head h3 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.collections-panel__head small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
}

.collections-panel__head small b {
  color: var(--text-strong);
}

.collections-table {
  display: grid;
  min-width: 0;
}

.collections-table-head,
.collections-row {
  display: grid;
  grid-template-columns: repeat(var(--collections-cols), minmax(0, 1fr));
}

.collections-table-head {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: color-mix(in srgb, var(--panel-solid) 98%, transparent);
}

.collections-table-head button {
  justify-content: space-between;
  min-height: 31px;
  padding: 5px 6px;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collections-table-head button.is-active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.055);
}

.collections-table-head button .icon {
  width: 10px;
  height: 10px;
  opacity: 0.72;
}

.collections-table-body {
  display: grid;
}

.collections-row {
  min-height: 45px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.collections-row:hover {
  background: rgba(0, 0, 0, 0.035);
}

.collections-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-strong);
  font-size: 8px;
  font-weight: 780;
}

.collections-cell:last-child {
  border-right: 0;
}

.collections-cell span,
.collections-cell strong,
.collections-cell small,
.collections-cell b,
.collections-cell em,
.collections-cell time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collections-cell strong,
.collections-cell b {
  color: var(--text-strong);
  font-size: 8px;
  font-weight: 950;
}

.collections-cell small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 760;
}

.collections-cell em {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  font-style: normal;
  font-size: 7px;
  font-weight: 950;
}

.collections-main-cell {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.collections-code {
  color: #2563eb !important;
}

.collections-amount {
  color: #16a34a !important;
}

/* =========================================================
   STATUS
   ========================================================= */

.collections-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  padding: 3px 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.035);
  color: var(--muted);
  font-size: 7px;
  font-weight: 950;
}

.collections-status--pendiente {
  border-color: color-mix(in srgb, #ca8a04 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #ca8a04 7%, transparent);
  color: #ca8a04;
}

.collections-status--parcial {
  border-color: color-mix(in srgb, #2563eb 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #2563eb 7%, transparent);
  color: #2563eb;
}

.collections-status--acreditado {
  border-color: color-mix(in srgb, #16a34a 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #16a34a 7%, transparent);
  color: #16a34a;
}

.collections-status--vencido {
  border-color: color-mix(in srgb, #dc2626 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #dc2626 7%, transparent);
  color: #dc2626;
}

.collections-status--cancelado {
  border-color: color-mix(in srgb, #64748b 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #64748b 7%, transparent);
  color: #64748b;
}

/* =========================================================
   ROW ACTIONS / PAGINATION
   ========================================================= */

.collections-row-actions {
  display: flex;
  gap: 3px;
  width: 100%;
}

.collections-row-actions button {
  min-height: 22px;
  padding: 3px 5px;
  font-size: 7px;
}

.collections-row-actions button .icon {
  width: 9px;
  height: 9px;
}

.collections-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-pagination > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.collections-pagination span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
}

.collections-pagination strong {
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 950;
}

.collections-pagination button:disabled,
.collections-table-head button:disabled,
.collections-view-card button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* =========================================================
   EMPTY
   ========================================================= */

.collections-empty {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  gap: 5px;
  min-height: 150px;
  padding: 22px;
  text-align: center;
}

.collections-empty .icon {
  width: 24px;
  height: 24px;
  color: #2563eb;
  stroke-width: 2.1;
}

.collections-empty strong {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 950;
}

.collections-empty p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.45;
}

.collections-empty--error .icon {
  color: #dc2626;
}

.is-spinning {
  animation: collectionsSpin 1s linear infinite;
}

/* =========================================================
   TOAST
   ========================================================= */

.collections-toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 600;
  display: none;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(340px, calc(100vw - 28px));
  min-height: 48px;
  padding: 8px;
}

.collections-toast.is-visible {
  display: grid;
  animation: collectionsToastIn 0.2s ease both;
}

.collections-toast > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, #16a34a 28%, rgba(0, 0, 0, 0.12));
  border-radius: 9px;
  background: color-mix(in srgb, #16a34a 6%, transparent);
  color: #16a34a;
}

.collections-toast[data-type="error"] > span {
  border-color: color-mix(in srgb, #dc2626 28%, rgba(0, 0, 0, 0.12));
  background: color-mix(in srgb, #dc2626 6%, transparent);
  color: #dc2626;
}

.collections-toast .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.15;
}

.collections-toast p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 740;
  line-height: 1.35;
}

/* =========================================================
   MODALES
   ========================================================= */

.collections-modal,
.collections-view-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
  place-items: center;
  padding: 16px;
}

.collections-modal.is-open,
.collections-view-modal.is-open {
  display: grid;
}

.collections-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.collections-modal__card,
.collections-view-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(780px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  animation: collectionsModalIn 0.22s ease both;
}

.collections-view-card {
  width: min(720px, 100%);
}

.collections-modal__card header,
.collections-view-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-modal__card header h3,
.collections-view-card header h3 {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.collections-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
}

.collections-form-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.collections-file-field small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
}

.collections-form-grid textarea {
  resize: vertical;
  min-height: 70px;
}

.collections-modal__card footer,
.collections-view-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* =========================================================
   VIEW MODAL
   ========================================================= */

.collections-view-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-view-summary > div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.collections-view-summary > div:last-child {
  border-right: 0;
}

.collections-view-summary strong {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.collections-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collections-view-grid > div {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.collections-view-grid > div:nth-child(2n) {
  border-right: 0;
}

.collections-view-grid strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: 9px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collections-view-notes {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.collections-view-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.45;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .collections-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .collections-filter--search {
    grid-column: 1 / -1;
  }

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

  .aging-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .aging-panel > strong,
  .aging-note {
    grid-column: 1 / -1;
  }

  .collections-table-head,
  .collections-row {
    min-width: 960px;
  }

  .collections-panel {
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .collections-hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 8px;
  }

  .collections-actions,
  .collections-btn {
    width: 100%;
  }

  .collections-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collections-kpis article:nth-child(2n) {
    border-right: 0;
  }

  .collections-kpis article:nth-child(n + 3) {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .collections-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aging-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collections-panel {
    overflow: visible;
  }

  .collections-panel__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .collections-table-head {
    display: none;
  }

  .collections-table-body {
    display: grid;
    gap: 6px;
    padding: 6px;
  }

  .collections-row {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 13px;
    overflow: hidden;
  }

  .collections-cell {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 8px;
    min-height: 34px;
    padding: 7px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.075);
  }

  .collections-cell:last-child {
    border-bottom: 0;
  }

  .collections-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 7px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .collections-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    width: 100%;
  }

  .collections-row-actions button {
    width: 100%;
  }

  .collections-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .collections-pagination > div {
    justify-content: space-between;
  }

  .collections-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collections-view-summary,
  .collections-view-grid {
    grid-template-columns: 1fr;
  }

  .collections-view-summary > div,
  .collections-view-grid > div {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  .collections-kpis,
  .collections-filters,
  .collections-form-grid,
  .aging-panel {
    grid-template-columns: 1fr;
  }

  .collections-kpis article {
    border-right: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .collections-kpis article:first-child {
    border-top: 0;
  }

  .collections-cell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .collections-modal,
  .collections-view-modal {
    padding: 8px;
  }

  .collections-modal__card,
  .collections-view-card {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .collections-modal__card footer,
  .collections-view-card footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .collections-modal__card footer button,
  .collections-view-card footer button,
  .collections-file-link {
    width: 100%;
  }
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes collectionsToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes collectionsModalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes collectionsSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .collections-page,
  .collections-page *,
  .collections-page *::before,
  .collections-page *::after,
  .collections-modal,
  .collections-modal *,
  .collections-modal *::before,
  .collections-modal *::after,
  .collections-view-modal,
  .collections-view-modal *,
  .collections-view-modal *::before,
  .collections-view-modal *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}