#cug-review-button {
  order: 950;
}

#cug-review-button[hidden] {
  display: none !important;
}

#cug-review-button[data-count]:not([data-count="0"])::after {
  content: attr(data-count);
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--background-base, #222);
  border-radius: 999px;
  color: #fff;
  background: #c84545;
  font: 700 11px/14px sans-serif;
  text-shadow: none;
  box-sizing: border-box;
}

#cug-review-panel {
  position: fixed;
  z-index: 1400;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  overflow: auto;
  padding: 0 20px 28px;
  color: #e9f0ec;
  background: rgba(21, 29, 25, .98);
  box-shadow: -12px 0 35px rgba(0, 0, 0, .42);
  transform: translateX(105%);
  transition: transform .2s ease;
}

#cug-review-panel.open { transform: translateX(0); }

.cug-review-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -20px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(21, 29, 25, .98);
}

.cug-review-header p,
.cug-review-card-heading p { margin: 0; color: #9fb0a7; font-size: 12px; }
.cug-review-header h2 { margin: 3px 0 0; font-size: 23px; }
.cug-review-close { border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 30px; }
.cug-review-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; color: #aebdb5; }
.cug-review-refresh { border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; padding: 6px 10px; color: #e9f0ec; background: transparent; cursor: pointer; }
.cug-review-message { min-height: 20px; color: #b9c9c0; }
.cug-review-list { display: grid; gap: 14px; }
.cug-review-card { padding: 16px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 12px; background: rgba(255, 255, 255, .045); }
.cug-review-card.conflict { border-color: rgba(224, 140, 124, .65); }
.cug-review-card-heading { display: flex; justify-content: space-between; gap: 12px; }
.cug-review-card-heading h3 { margin: 0 0 4px; font-size: 18px; }
.cug-review-card-heading > span { height: fit-content; padding: 3px 7px; border-radius: 999px; color: #bedbc9; background: rgba(101, 171, 129, .16); font-size: 11px; }
.cug-review-summary { color: #d8e2dc; line-height: 1.5; }
.cug-review-card dl { display: grid; gap: 6px; margin: 12px 0; }
.cug-review-card dl > div { display: grid; grid-template-columns: 68px 1fr; gap: 8px; }
.cug-review-card dt { color: #91a49a; }
.cug-review-card dd { margin: 0; overflow-wrap: anywhere; }
.cug-review-conflict { padding: 9px 11px; border-radius: 7px; color: #ffd1c8; background: rgba(180, 70, 50, .18); }
.cug-review-card details { margin-top: 12px; }
.cug-review-card summary { cursor: pointer; color: #a8c7b5; }
.cug-review-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cug-review-data-grid h4 { margin: 0 0 5px; color: #9fb0a7; }
.cug-review-data-grid pre { max-height: 270px; overflow: auto; margin: 0; padding: 9px; border-radius: 7px; background: #0f1713; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; }
.cug-review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.cug-review-actions button { border: 0; border-radius: 7px; padding: 8px 14px; color: #fff; cursor: pointer; }
.cug-review-actions button:disabled { opacity: .45; cursor: not-allowed; }
.cug-review-actions .approve { background: #2c7b50; }
.cug-review-actions .reject { background: #8e493e; }

@media (max-width: 600px) {
  .cug-review-data-grid { grid-template-columns: 1fr; }
}
