.request-history-page {
  min-height: 100vh;
  color: #1f2430;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, #ffffff 220px);
}

.request-history-hero {
  padding: 24px 24px 8px;
}

.request-history-hero-link {
  display: inline-block;
}

.request-history-hero-title {
  width: min(100%, 700px);
  height: auto;
  display: block;
}

.request-history-layout {
  width: min(980px, 100% - 32px);
  margin: 0 auto;
  padding: 12px 0 48px;
}

.request-history-heading {
  margin-bottom: 18px;
}

.request-history-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
}

.request-history-note {
  margin: 0;
  color: #667085;
}

.request-history-message {
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: #ffffff;
}

.request-history-message-info {
  color: #667085;
}

.request-history-message-error {
  color: #9b2226;
  border-color: rgba(155, 34, 38, 0.18);
  background: rgba(255, 245, 245, 0.96);
}

.request-history-actions {
  margin-bottom: 18px;
}

.request-history-link-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #f8fafc;
  color: #1f2430;
  text-decoration: none;
}

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

.request-history-card {
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.request-history-card-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.request-history-card-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.request-history-card-head-side {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.request-history-card-title {
  margin: 0;
  font-size: 20px;
}

.request-history-card-meta,
.request-history-reviewed-at {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.request-history-datetime-list {
  display: grid;
  gap: 4px;
}

.request-history-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.request-history-status-pending {
  background: rgba(29, 111, 214, 0.1);
  color: #1d6fd6;
}

.request-history-status-applied {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.request-history-status-admin_applied {
  background: rgba(124, 58, 237, 0.14);
  color: #6d28d9;
}

.request-history-status-auto_applied {
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
}

.request-history-status-rejected {
  background: rgba(250, 204, 21, 0.22);
  color: #a16207;
}

.request-history-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

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

.request-history-request-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
}

.request-history-section-title,
.request-history-block-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.request-history-section-text {
  margin: 0;
  color: #475467;
  line-height: 1.6;
}

.request-history-block {
  display: grid;
  gap: 6px;
}

.request-history-change-group-title {
  margin: 2px 0 0;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.request-history-change-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.request-history-change-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.request-history-change-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.request-history-change-badge-add {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.request-history-change-badge-delete {
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
}

.request-history-target-icon-wrap,
.request-history-target-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.request-history-target-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.request-history-target-badge {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.request-history-decision-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.request-history-decision-badge-approved {
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
}

.request-history-decision-badge-rejected {
  background: rgba(250, 204, 21, 0.22);
  color: #a16207;
}

.request-history-decision-badge-pending {
  background: rgba(29, 111, 214, 0.1);
  color: #1d6fd6;
}

.request-history-inline-link {
  color: #1d6fd6;
}

.request-history-inline-separator {
  color: #98a2b3;
}

.request-history-change-name {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.request-history-single-value-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.request-history-change-empty {
  color: #98a2b3;
}

.request-history-rank-star {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  line-height: 1;
}

.request-history-rank-star-upper {
  color: #facc15;
}

.request-history-rank-star-pool {
  color: #98a2b3;
}

.request-history-empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 24px;
  background: #ffffff;
  color: #667085;
}

@media (max-width: 768px) {
  .request-history-layout {
    width: min(100%, 100% - 20px);
  }
  .request-history-card {
    padding: 18px 14px;
  }
  .request-history-card-head {
    flex-direction: column;
  }
  .request-history-card-head-side {
    justify-items: start;
    text-align: left;
  }
  .request-history-request-item {
    grid-template-columns: auto 1fr auto;
  }
  .request-history-target-icon-wrap,
  .request-history-target-badge {
    grid-column: 1;
  }
  .request-history-change-name {
    grid-column: 2/4;
  }
}
