.ajr-review-stage {
  margin: 18px 0 6px;
  border: 1px solid #d8e1ed;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.ajr-review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: #f7f9fc;
}

.ajr-review-summary > div:first-child { min-width: 0; }
.ajr-review-summary span,
.ajr-review-summary strong,
.ajr-review-summary small { display: block; }
.ajr-review-summary span { color: #245fbd; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.ajr-review-summary span em {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  color: #52627a;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  background: #e9eef5;
  border-radius: 999px;
}
.ajr-review-stage[data-provider="platform"] .ajr-review-summary span em { color: #166534; background: #dcfce7; }
.ajr-review-summary strong { margin: 2px 0; color: #17243b; font-size: 15px; }
.ajr-review-summary small { color: #66758d; }
.ajr-review-summary-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.ajr-review-summary-actions b { display: grid; width: 28px; height: 28px; place-items: center; color: #245fbd; background: #eaf0ff; border-radius: 50%; }
.ajr-review-summary-actions button,
.ajr-review-workspace > header button {
  min-height: 36px;
  padding: 0 14px;
  color: #1f56c7;
  font-weight: 700;
  background: #fff;
  border: 1px solid #b9c8e1;
  border-radius: 8px;
  cursor: pointer;
}
.ajr-review-summary-actions button:hover,
.ajr-review-workspace > header button:hover { border-color: #245eea; background: #f3f6ff; }
.ajr-review-summary-actions button:disabled { color: #8b96a8; background: #f1f3f6; border-color: #d8dee8; cursor: not-allowed; }

.ajr-review-workspace { min-height: 680px; background: #fff; }
.ajr-review-workspace[hidden] { display: none; }
.ajr-review-workspace > header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 10px 18px;
  background: #fff;
  border-bottom: 1px solid #d8e1ed;
}
.ajr-review-workspace > header span,
.ajr-review-workspace > header strong,
.ajr-review-workspace > header small { display: block; }
.ajr-review-workspace > header span { color: #245eea; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.ajr-review-workspace > header strong { margin: 2px 0; color: #17243b; font-size: 17px; }
.ajr-review-workspace > header small { color: #66758d; font-size: 12px; }
.ajr-review-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px 18px;
  border-bottom: 1px solid #d8e1ed;
  color: #46576f;
  font-size: 13px;
}
.ajr-review-scope label { display: flex; align-items: center; gap: 8px; }
.ajr-review-scope select {
  min-height: 36px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #b9c8e1;
  border-radius: 6px;
  color: #17243b;
  background: #fff;
  font: inherit;
}
.ajr-review-scope > div { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.ajr-review-scope strong,
.ajr-review-scope span { display: block; }
.ajr-review-scope strong { color: #17243b; margin-bottom: 3px; }
.ajr-review-scope select:focus-visible { outline: 2px solid #245eea; outline-offset: 2px; }
.ajr-review-host .arw-submission-context { margin: 8px 0 0; color: #46576f; font-size: 13px; overflow-wrap: anywhere; }
.ajr-review-host .arw-queue-item .arw-queue-context { grid-column: 1 / -1; grid-row: auto; color: #46576f; overflow-wrap: anywhere; }
.uaw-formal.is-review-workbench-open > :not(.ajr-review-stage) { display: none !important; }
.uaw-formal.is-review-workbench-open .ajr-review-stage { margin: 0; border: 0; border-radius: 0; }
.uaw-formal.is-review-workbench-open .ajr-review-summary { display: none; }
.uaw-shell.is-review-workbench-open .uaw-grid { grid-template-columns: minmax(0, 1fr) !important; }
.uaw-shell.is-review-workbench-open .uaw-context,
.uaw-shell.is-review-workbench-open .uaw-context-launcher,
.uaw-shell.is-review-workbench-open .uaw-bottom { display: none !important; }
/* 程序执行页后置样式会固定展开工具栏；复核工作面必须显式接管整个执行画布。 */
html body #view-walkthrough .uaw-shell.is-review-workbench-open {
  grid-template-columns: minmax(0, 1fr) !important;
}
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-formal {
  grid-column: 1 !important;
  width: 100% !important;
}
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-status,
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-context,
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-context-resizer,
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-context-launcher,
html body #view-walkthrough .uaw-shell.is-review-workbench-open .uaw-bottom {
  display: none !important;
}
.ajr-authorization-notice {
  padding: 10px 20px;
  color: #31516f;
  font-size: 13px;
  border-bottom: 1px solid #d8e1ed;
  background: #f6f9fd;
}
.ajr-authorization-notice.is-success { color: #166534; background: #ecfdf3; }
.ajr-authorization-notice.is-error { color: #991b1b; background: #fff1f2; }
.audit-writeback-status {
  position: fixed;
  z-index: 10050;
  top: 74px;
  left: 50%;
  max-width: min(680px, calc(100vw - 48px));
  padding: 10px 16px;
  color: #31516f;
  font-size: 13px;
  border: 1px solid #cfd9e7;
  border-radius: 10px;
  background: #f7f9fc;
  box-shadow: 0 10px 30px rgba(31, 49, 78, .12);
  transform: translateX(-50%);
}
.audit-writeback-status.success { color: #166534; border-color: #bbf7d0; background: #ecfdf3; }
.audit-writeback-status.error { color: #991b1b; border-color: #fecdd3; background: #fff1f2; }
.ajr-review-host { container-type: inline-size; }
.ajr-review-host .arw-shell { max-width: none; min-height: 0; height: 100%; margin: 0; padding: 0; }
.ajr-review-host .arw-layout { min-height: 620px; height: calc(100vh - 250px); border-inline: 0; border-bottom: 0; border-radius: 0; }

@media (max-width: 1180px) {
  .ajr-review-host .arw-layout { min-height: 0; height: calc(100vh - 250px); }
}

@media (max-width: 780px) {
  .ajr-review-summary { align-items: flex-start; }
  .ajr-review-summary-actions { align-items: flex-end; flex-direction: column; }
  .ajr-review-workspace { min-height: 0; }
  .ajr-review-host .arw-layout { height: auto; }
}

/* 主审复核由顶部独立入口进入，关闭时不在程序结论底部占位。 */
.ajr-review-stage:not([data-workbench-open="true"]) { display: none !important; }
.ajr-review-stage[data-workbench-open="true"] { display: block !important; }
