.nvx-stage-history[hidden],
[data-nvx-removed-stage-updates="1"] {
  display: none !important;
}

.nvx-stage-history {
  margin: 18px 0 4px;
  padding: 18px;
  border: 1px solid #d9e5ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfe 0%, #fff 100%);
  box-shadow: 0 12px 28px rgba(5, 53, 94, 0.08);
  color: #102f49;
}

.nvx-stage-history > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.nvx-stage-history > header p {
  margin: 0 0 4px;
  color: #1475b9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nvx-stage-history > header h3 {
  margin: 0;
  color: #063c71;
  font-size: 1.18rem;
}

.nvx-stage-history > header span {
  display: block;
  margin-top: 5px;
  color: #5d7182;
  font-size: 0.85rem;
}

.nvx-stage-history > header button,
.nvx-stage-history-error button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid #bcd4e5;
  border-radius: 10px;
  background: #fff;
  color: #07538e;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.nvx-stage-history-groups {
  display: grid;
  gap: 10px;
}

.nvx-stage-history-group {
  overflow: hidden;
  border: 1px solid #dce7ef;
  border-radius: 14px;
  background: #fff;
}

.nvx-stage-history-group > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  list-style: none;
  cursor: pointer;
}

.nvx-stage-history-group > summary::-webkit-details-marker {
  display: none;
}

.nvx-stage-sequence {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #e8f4fc;
  color: #096cae;
  font-size: 0.78rem;
  font-weight: 850;
}

.nvx-stage-history-group summary div:nth-child(2) {
  min-width: 0;
}

.nvx-stage-history-group summary div:nth-child(2) b,
.nvx-stage-history-group summary div:nth-child(2) small {
  display: block;
}

.nvx-stage-history-group summary div:nth-child(2) b {
  overflow: hidden;
  color: #173a56;
  font-size: 0.91rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nvx-stage-history-group summary div:nth-child(2) small {
  margin-top: 3px;
  color: #758796;
  font-size: 0.74rem;
}

.nvx-stage-current {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #5a7285;
  font-size: 0.74rem;
}

.nvx-stage-current span,
.nvx-stage-current em {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f5f8;
  font-style: normal;
}

.nvx-stage-current b {
  color: #0872b6;
}

.nvx-stage-progress-track {
  height: 4px;
  background: #edf2f6;
}

.nvx-stage-progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b73b7, #35a7df);
}

.nvx-stage-history-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 15px;
  border-top: 1px solid #edf2f6;
  background: #fbfdff;
}

.nvx-stage-history-entry {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid #e3ebf1;
  border-radius: 12px;
  background: #fff;
}

.nvx-stage-history-date b,
.nvx-stage-history-date span {
  display: block;
}

.nvx-stage-history-date b {
  color: #0a5e9b;
  font-size: 0.8rem;
}

.nvx-stage-history-date span {
  margin-top: 4px;
  color: #6e8190;
  font-size: 0.73rem;
}

.nvx-stage-history-copy p {
  margin: 9px 0 5px;
  color: #263f52;
  line-height: 1.48;
  white-space: pre-wrap;
}

.nvx-stage-history-copy > small {
  display: block;
  margin-top: 5px;
  color: #617485;
  line-height: 1.42;
}

.nvx-stage-history-change {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.nvx-stage-history-change span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef6fb;
  color: #527086;
  font-size: 0.72rem;
}

.nvx-stage-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.nvx-stage-file {
  overflow: hidden;
  border: 1px solid #dfe8ef;
  border-radius: 10px;
  background: #f7fafc;
  color: #173d59;
  text-decoration: none;
}

.nvx-stage-file img,
.nvx-stage-file video {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  background: #102b40;
}

.nvx-stage-file > span,
.nvx-stage-file > b,
.nvx-stage-file > a span,
.nvx-stage-file > a b {
  display: block;
  padding: 0 9px;
}

.nvx-stage-file > span,
.nvx-stage-file > a span {
  padding-top: 8px;
  color: #1680be;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nvx-stage-file > b,
.nvx-stage-file > a b {
  overflow: hidden;
  padding-top: 3px;
  padding-bottom: 9px;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nvx-stage-file > a {
  color: inherit;
  text-decoration: none;
}

.nvx-stage-file-document {
  padding-top: 5px;
}

.nvx-stage-history-empty,
.nvx-stage-history-loading,
.nvx-stage-history-error {
  padding: 18px;
  color: #6c7e8c;
  text-align: center;
}

.nvx-stage-history-error {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #9e2f2f;
}

.nvx-stage-history-unmatched {
  border-style: dashed;
}

@media (max-width: 760px) {
  .nvx-stage-history {
    margin-inline: 0;
    padding: 13px;
  }

  .nvx-stage-history > header {
    display: grid;
  }

  .nvx-stage-history-group > summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .nvx-stage-current {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .nvx-stage-history-entry {
    grid-template-columns: 1fr;
  }

  .nvx-stage-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .nvx-stage-files {
    grid-template-columns: 1fr;
  }
}
