.invoice-info-modal.reman-history-modal > section {
  width: min(1460px, 98vw);
  max-height: 95vh;
}

.invoice-info-modal.reman-history-modal footer { display: none; }

.reman-history-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}

.reman-history-kpis article {
  padding: 12px;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #f7fafb;
}

.reman-history-kpis small,
.reman-history-kpis strong,
.reman-history-kpis span { display: block; }
.reman-history-kpis small { color: #6c7d87; font-size: 8px; font-weight: 700; }
.reman-history-kpis strong { margin-top: 6px; color: #173444; font: 800 15px Manrope; }
.reman-history-kpis span { margin-top: 4px; color: #76858e; font-size: 8px; }

.reman-history-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(130px, auto));
  gap: 8px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid #dce6eb;
  border-radius: 10px;
  background: #fff;
}

.reman-history-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #62737f;
  font-size: 8px;
  font-weight: 700;
}

.reman-history-filters input,
.reman-history-filters select {
  min-width: 0;
  height: 35px;
  border: 1px solid #d5e0e7;
  border-radius: 8px;
  background: #fff;
  padding: 0 9px;
  color: #304755;
  font-size: 9px;
}

.reman-operation-table-wrap {
  max-height: 52vh;
  overflow: auto;
  border: 1px solid #dce5ea;
  border-radius: 10px;
}

.reman-operation-table {
  min-width: 1050px;
  width: 100%;
}

.reman-operation-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0d6873;
  color: #fff;
}

.reman-operation-table th,
.reman-operation-table td {
  padding: 9px;
  border-bottom: 1px solid #e2e9ed;
  font-size: 9px;
  white-space: nowrap;
}

.reman-operation-table tbody tr:nth-child(even) { background: #f7fafb; }
.reman-operation-table .num { text-align: right; }
.reman-operation-table .operation-count { color: #147f85; font-weight: 800; }
.reman-operation-table .operation-value { color: #237fc0; font-weight: 800; }
.reman-operation-table .destination { color: #148459; font-weight: 800; }

.reman-operation-open {
  height: 29px;
  border: 1px solid #b8d8da;
  border-radius: 7px;
  background: #effafa;
  color: #147e82;
  padding: 0 9px;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.reman-operation-details td {
  padding: 12px;
  background: #eef7f8;
}

.reman-operation-details table {
  min-width: 850px;
  width: 100%;
  background: #fff;
}

.reman-operation-details th {
  position: static;
  background: #e3eef1;
  color: #3f5967;
}

.reman-history-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
}

.reman-history-pager button {
  width: 32px;
  height: 32px;
  border: 1px solid #cfdde3;
  border-radius: 8px;
  background: #fff;
  color: #147d81;
  cursor: pointer;
}

.reman-history-pager button:disabled { opacity: .35; cursor: not-allowed; }
.reman-history-pager span { color: #627782; font-size: 9px; }

@media(max-width:900px) {
  .reman-history-kpis { grid-template-columns: repeat(2, 1fr); }
  .reman-history-filters { grid-template-columns: 1fr 1fr; }
}

@media(max-width:560px) {
  .reman-history-kpis,
  .reman-history-filters { grid-template-columns: 1fr; }
}
