#modal.review-inspector {
  width: min(1420px, 96vw);
  max-width: 96vw;
  height: min(94vh, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid #d7dfed;
  background: #f8fafc;
  color: #24334a;
  border-radius: 12px;
}
.review-inspector #modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ri-head {
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid #dbe3ee;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  flex-shrink: 0;
}
.ri-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.ri-head p {
  font-size: 12px;
  color: #65758b;
  margin: 0;
}
.ri-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.ri-rail {
  padding: 16px;
  overflow: auto;
  border-right: 1px solid #dbe3ee;
  background: #f2f5fa;
}
.ri-rail h3 {
  margin: 0 0 6px;
}
.ri-rail p,
.ri-rail small {
  font-size: 12px;
  line-height: 1.7;
  color: #61728b;
}
.ri-tree {
  margin-top: 14px;
}
.ri-tree-item {
  margin: 8px 0;
}
.ri-tree-item details {
  margin: 6px 0 6px 12px;
  padding-left: 9px;
  border-left: 1px solid #cbd6e8;
}
.ri-tree button,
.ri-inventory button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  background: #fff;
  color: #304967;
  border: 1px solid #d6dfec;
}
.ri-tree button.selected,
.ri-inventory button.selected {
  background: #e1ecff;
  border-color: #7ca4e4;
  color: #164c94;
}
.ri-tree summary,
.ri-inventory summary {
  cursor: pointer;
  font-size: 12px;
  color: #5e718f;
  padding: 6px 0;
}
.ri-inventory {
  margin-top: 22px;
}
.ri-inventory button {
  margin-top: 6px;
}
.ri-main {
  padding: 22px;
  min-width: 0;
  overflow: auto;
}
.ri-main > h2 {
  font-size: 21px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.ri-main p {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.ri-main small {
  font-size: 12px;
  color: #61728b;
  line-height: 1.6;
}
.ri-section {
  border: 1px solid #dae3ee;
  background: #fff;
  padding: 18px;
  border-radius: 9px;
  margin: 16px 0;
}
.ri-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.ri-section button {
  margin: 5px 8px 5px 0;
}
.ri-warning {
  color: #76520b !important;
  background: #fff6de;
  border: 1px solid #f0ddb0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.ri-condition {
  font-size: 14px;
}
.ri-condition p {
  margin: 6px 0;
}
.ri-condition ul {
  border-left: 3px solid #d6e5fa;
  list-style: none;
  padding-left: 16px;
}
.ri-action {
  color: #195985;
  font-weight: 600;
  background: #edf6ff;
  padding: 10px;
  border-radius: 6px;
}
.ri-rule-card {
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
}
.ri-rule-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.ri-properties {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}
.ri-properties dt,
.ri-properties dd {
  padding: 10px;
  border-bottom: 1px solid #e4eaf3;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ri-properties dt {
  background: #f6f8fb;
  color: #52657e;
}
.ri-properties dd {
  color: #24354e;
}
.ri-main iframe {
  width: 100%;
  height: 570px;
  background: #fff;
  border: 1px solid #bac8dd;
  border-radius: 6px;
}
.ri-attachment img {
  max-width: 260px;
  max-height: 160px;
  object-fit: contain;
}
.ri-technical {
  margin: 16px 0;
  font-size: 12px;
}
.ri-technical summary {
  cursor: pointer;
  color: #647691;
}
.ri-technical pre {
  background: #172536;
  color: #dae7f5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  max-height: 420px;
  overflow: auto;
  border-radius: 6px;
}
.ri-footer {
  padding: 14px 20px;
  border-top: 1px solid #dbe3ee;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.ri-footer span {
  margin-right: auto;
  font-size: 12px;
  color: #65758b;
}
.review-inspector button:focus-visible {
  outline: 3px solid #4387d1;
  outline-offset: 2px;
}
.review-inspector button:disabled {
  opacity: 0.5;
  cursor: wait;
}
@media (max-width: 800px) {
  .ri-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .ri-rail {
    max-height: 230px;
    border-right: 0;
    border-bottom: 1px solid #dbe3ee;
  }
  .ri-main {
    overflow: visible;
    padding: 14px;
  }
  .ri-footer {
    flex-wrap: wrap;
  }
  .ri-footer span {
    width: 100%;
  }
  .ri-properties {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

dialog.review-decision {
  width: min(520px, 92vw);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  color: #24334a;
  background: #fff;
  box-shadow: 0 18px 70px #142c4b40;
}
.review-decision::backdrop {
  background: #142c4b55;
}
.review-decision h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.rd-resource {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rd-hint {
  background: #edf4ff;
  padding: 12px;
  border-radius: 6px;
  color: #466487;
  font-size: 13px;
  line-height: 1.7;
}
.rd-label {
  display: block;
  margin-top: 18px;
  font-size: 14px;
}
.rd-label textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  resize: vertical;
  min-height: 96px;
  max-height: 280px;
  border: 1px solid #bac8dc;
  border-radius: 6px;
  font: inherit;
  color: #24334a;
  background: #fff;
}
.rd-label textarea:focus-visible {
  outline: 2px solid #659be4;
  outline-offset: 1px;
}
.rd-count {
  text-align: right;
  color: #77879d;
  font-size: 12px;
  margin: 6px 0;
}
.rd-error {
  color: #b62e2e;
  background: #fff0f0;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
}
.rd-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.rd-danger {
  background: #bf4141;
  color: #fff;
  border-color: #bf4141;
}
.review-decision button:disabled {
  opacity: 0.55;
  cursor: wait;
}
