.dashboard-header {
  margin-bottom: 0;
}

.history-page {
  padding: 30px 0 60px;
  background: #f8fafc;
}

.history-topbar,
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.portal-eyebrow {
  margin-bottom: 6px;
  color: #FDBE33;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-topbar h1 {
  margin: 0;
  color: #20212B;
}

.history-actions,
.history-filter-group,
.history-pagination {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-toolbar {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.history-filter,
.history-pagination button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #4a4c70;
  font-weight: 700;
}

.history-filter.is-active,
.history-pagination button.is-active {
  color: #20212B;
  background: #FDBE33;
  border-color: #FDBE33;
}

.history-pagination button:disabled {
  opacity: 0.45;
}

.history-summary {
  color: #667085;
  font-weight: 700;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  color: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(32, 33, 43, 0.05);
}

.history-item:hover {
  color: inherit;
  border-color: #FDBE33;
}

.history-item img {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
}

.history-item-meta,
.history-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.history-type {
  color: #20212B;
  background: #FDBE33;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 800;
}

.history-item h2 {
  margin: 8px 0 4px;
  color: #20212B;
  font-size: 22px;
}

.history-item p,
.history-item-meta {
  margin: 0;
  color: #667085;
}

.record-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.record-badge.is-complete {
  background: #e8f7ef;
  color: #116b3a;
}

.record-badge.is-pending {
  background: #fff4d8;
  color: #7a5300;
}

.history-empty {
  padding: 22px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #667085;
}

.history-pagination {
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 991px) {
  .history-topbar,
  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .history-badges {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575px) {
  .history-item {
    grid-template-columns: 1fr;
  }

  .history-item img {
    width: 100%;
    height: 170px;
  }
}
