/* Shared SmartEHR visual language for hospital review surfaces. */
html[data-host-page],
html[data-template="ucc"] {
  --ehr-blue: #1855be;
  --ehr-coral: #ff877a;
  --ehr-code: #ac443a;
  --ehr-gradient: linear-gradient(180deg, #4b96e6 0%, #9ce1ee 100%);
  --ehr-font: "Roboto", "IBM Plex Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html[data-template="ucc"],
html[data-template="ucc"] body {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  font-family: var(--ehr-font);
}

html[data-template="ucc"] .app-shell {
  height: 100dvh;
  min-height: 0;
  background: var(--ehr-gradient);
}

html[data-template="ucc"] .soap-results {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

html[data-template="ucc"] .review-template {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 16px;
  padding: 20px 20px 0;
  overflow: hidden;
  background: transparent;
  font-family: var(--ehr-font);
}

html[data-template="ucc"] .review-template:not(.is-theme-linked) {
  --review-accent: var(--ehr-blue);
  --review-card-bg: #fff;
  --review-head-bg: #f0f1f3;
  --review-table-bg: #f5f5f5;
  --review-note-bg: #fff;
  --review-line: #d9dce1;
  --review-line-soft: #edf0f3;
  --review-ink: #252b34;
  --review-text: #333;
  --review-muted: #687382;
  --review-button: #fff;
  --review-button-text: #fff;
  --review-shadow: rgb(24 85 190 / 12%);
}

html[data-template="ucc"] .review-template-head {
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

html[data-template="ucc"] .review-template-head h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
}

html[data-template="ucc"] .review-template-head p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}

html[data-template="ucc"] .review-close-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 9px;
  color: #fff;
}

html[data-template="ucc"] .review-close-button:hover,
html[data-template="ucc"] .review-close-button:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 18%);
  box-shadow: none;
}

html[data-template="ucc"] .review-workspace {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 15px;
  background: var(--review-card-bg);
  color: var(--review-text);
  overflow: hidden;
}

html[data-template="ucc"] .review-template .template-soap-tabs {
  flex: 0 0 auto;
  height: auto;
  min-height: 38px;
  gap: 8px;
  padding: 0;
  border-bottom: 1px solid var(--review-line);
  background: transparent;
  overflow-x: auto;
}

html[data-template="ucc"] .review-template-tab {
  flex: 1 0 auto;
  justify-content: center;
  min-height: 38px;
  height: auto;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: #edeef0;
  color: #505967;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: none;
}

html[data-template="ucc"] .review-template-tab span {
  width: auto;
  height: auto;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

html[data-template="ucc"] .review-template-tab[aria-selected="true"],
html[data-template="ucc"] .review-template-tab[aria-selected="true"]:hover {
  border: 0;
  background: var(--ehr-coral);
  color: #51221d;
  box-shadow: none;
}

html[data-template="ucc"] .review-template-tab[aria-selected="true"] span,
html[data-template="ucc"] .review-template-tab:hover span {
  background: transparent;
  color: inherit;
}

html[data-template="ucc"] .review-template-tab:hover {
  background: #e0e7f3;
  color: var(--review-accent);
  box-shadow: none;
}

html[data-template="ucc"] .review-template-tab:focus-visible {
  outline: 2px solid var(--review-accent);
  outline-offset: -3px;
}

html[data-template="ucc"] .review-all-summary {
  flex: 0 0 auto;
  gap: 10px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--review-muted);
  font-size: 13px;
}

html[data-template="ucc"] .review-all-summary strong {
  color: var(--review-ink);
  font-size: 14px;
  font-weight: 600;
}

html[data-template="ucc"] .review-all-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #f1f3f7;
  color: #526176;
}

html[data-template="ucc"] .review-all-summary > span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

html[data-template="ucc"] .review-all-summary.is-done > span {
  background: #e9f5ed;
  color: #236c45;
}

html[data-template="ucc"] .review-all-summary.is-running > span {
  background: #edf3ff;
  color: var(--review-accent);
}

html[data-template="ucc"] .review-all-summary.is-error > span {
  background: #fff0ed;
  color: #a9382f;
}

html[data-template="ucc"] .review-context-notice {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 12px;
  border-left: 3px solid var(--ehr-coral);
  border-radius: 5px;
  background: #fff4f1;
  color: #844a40;
  font-size: 13px;
  line-height: 1.5;
}

html[data-template="ucc"] .review-source-block {
  flex: 0 0 auto;
  gap: 8px;
}

html[data-template="ucc"] .review-source-block strong {
  font-size: 14px;
  font-weight: 600;
}

html[data-template="ucc"] .review-source-note {
  min-height: 72px;
  max-height: 136px;
  padding: 12px;
  border: 1px solid var(--review-line);
  border-radius: 8px;
  color: var(--review-text);
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  resize: none;
}

html[data-template="ucc"] .review-template-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 28%);
  gap: 16px;
  overflow: auto;
}

html[data-template="ucc"] .review-card {
  min-width: 0;
  border: 1px solid var(--review-line-soft);
  border-radius: 8px;
  box-shadow: none;
}

html[data-template="ucc"] .review-suggestions {
  min-height: 150px;
  overflow: auto;
  scrollbar-width: thin;
}

html[data-template="ucc"] .review-all-flat-list {
  flex: 1 1 auto;
  min-height: 0;
}

html[data-template="ucc"] .review-table-head,
html[data-template="ucc"] .review-table-row {
  grid-template-columns: 88px minmax(92px, .3fr) minmax(0, 1fr) 56px 32px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  line-height: 1.45;
}

html[data-template="ucc"] .review-table-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 42px;
  border-bottom: 1px solid var(--review-line);
  background: var(--review-card-bg);
  font-size: 13px;
}

html[data-template="ucc"] .review-table-head strong {
  font-weight: 600;
}

html[data-template="ucc"] .review-table-row {
  min-height: 46px;
  border: 0;
  background: var(--review-card-bg);
  color: var(--review-text);
  font-size: 14px;
  cursor: pointer;
  transition: background 140ms ease;
}

html[data-template="ucc"] .review-table-row:nth-child(odd) {
  background: var(--review-table-bg);
}

html[data-template="ucc"] .review-table-row:hover,
html[data-template="ucc"] .review-table-row:focus-within {
  background: #eef3fd;
}

html[data-template="ucc"] .review-system-badge {
  justify-self: start;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--ehr-coral);
  color: #51221d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

html[data-template="ucc"] .review-code-value {
  color: var(--ehr-code);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

html[data-template="ucc"] .review-confidence-heading,
html[data-template="ucc"] .review-selection-heading {
  text-align: center;
}

html[data-template="ucc"] .review-table-row input[type="checkbox"] {
  grid-column: 5;
  grid-row: 1;
  justify-self: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--review-accent);
}

html[data-template="ucc"] .review-table-row input[type="checkbox"]::after {
  left: 9px;
  top: 5px;
  width: 6px;
  height: 12px;
  border-width: 0 3px 3px 0;
}

html[data-template="ucc"] .review-table-row input[type="checkbox"]:not(:checked) {
  border: 1px solid #9da9bb;
  background: var(--review-card-bg);
}

html[data-template="ucc"] .review-confidence {
  grid-column: 4;
  grid-row: 1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--review-accent);
}

html[data-template="ucc"] .review-confidence-dots {
  display: inline-flex;
  gap: 5px;
}

html[data-template="ucc"] .review-confidence-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #9da9bb;
  border-radius: 50%;
  background: transparent;
}

html[data-template="ucc"] .review-confidence-dot.is-filled {
  border-color: currentColor;
  background: currentColor;
}

html[data-template="ucc"] .review-confidence.is-unavailable {
  color: var(--review-muted);
}

html[data-template="ucc"] .review-manual-row {
  cursor: default;
}

html[data-template="ucc"] .review-manual-row .review-code-field {
  grid-column: 2;
  grid-row: 1;
}

html[data-template="ucc"] .review-manual-row .review-name-field {
  grid-column: 3;
  grid-row: 1;
}

html[data-template="ucc"] .review-manual-row .review-manual-input {
  height: 36px;
  padding: 6px 8px;
  border-width: 1px;
  border-radius: 5px;
  font-size: 14px;
}

html[data-template="ucc"] .review-manual-actions {
  grid-column: 2 / -1;
  justify-content: flex-end;
  gap: 6px;
}

html[data-template="ucc"] .review-manual-delete-button,
html[data-template="ucc"] .review-manual-unlock-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--review-line);
  border-radius: 4px;
  color: var(--review-accent);
  font-size: 18px;
}

html[data-template="ucc"] .review-add-row {
  padding: 10px 12px;
}

html[data-template="ucc"] .review-add-code-button {
  min-height: 36px;
  border-width: 1px;
  border-radius: 5px;
  font-size: 22px;
}

html[data-template="ucc"] .review-side {
  gap: 12px;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

html[data-template="ucc"] .review-card h3 {
  padding: 12px;
  background: var(--review-head-bg);
  font-size: 14px;
  font-weight: 600;
}

html[data-template="ucc"] .review-selected-list,
html[data-template="ucc"] .review-soap-match,
html[data-template="ucc"] .review-card p {
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
}

html[data-template="ucc"] .review-side .review-soap-match p {
  padding: 0;
}

html[data-template="ucc"] .review-empty {
  padding: 14px;
}

html[data-template="ucc"] .review-empty-visual {
  border: 1px dashed var(--review-line);
  border-radius: 8px;
  background: var(--review-table-bg);
}

html[data-template="ucc"] .review-template-footer {
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--review-line-soft);
}

html[data-template="ucc"] .review-template-footer > span {
  flex: 1 1 140px;
  margin-right: auto;
  color: var(--review-muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

html[data-template="ucc"] .review-template-footer .button {
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--review-line);
  border-radius: 8px;
  background: var(--review-card-bg);
  color: var(--review-muted);
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

html[data-template="ucc"] .review-template-footer .primary-button {
  border-color: var(--review-accent);
  background: var(--review-accent);
  color: #fff;
}

html[data-template="ucc"] .review-template-footer .button:not(:disabled):hover {
  filter: brightness(.95);
}

html[data-template="ucc"] .review-template-footer .button:focus-visible {
  outline: 3px solid #99b7f0;
  outline-offset: 2px;
}

html[data-template="ucc"] .app-footer {
  min-height: 34px;
  padding: 4px 20px;
  border: 0;
  background: transparent;
  color: #234c79;
}

html[data-template="ucc"] .app-version,
html[data-template="ucc"] .settings-trigger {
  color: #234c79;
  font-family: var(--ehr-font);
}

@media (max-width: 900px) {
  html[data-template="ucc"] .review-template-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(220px, 1fr) minmax(140px, auto);
    align-content: start;
  }

  html[data-template="ucc"] .review-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(140px, 1fr);
  }
}

@media (max-width: 580px) {
  html[data-template="ucc"] .review-template {
    gap: 12px;
    padding: 14px 10px 0;
  }

  html[data-template="ucc"] .review-template-head h2 {
    font-size: 21px;
  }

  html[data-template="ucc"] .review-template-head p {
    font-size: 13px;
  }

  html[data-template="ucc"] .review-workspace {
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
  }

  html[data-template="ucc"] .review-template-tab {
    gap: 5px;
    padding: 8px 10px;
    font-size: 12px;
  }

  html[data-template="ucc"] .review-source-column {
    display: none;
  }

  html[data-template="ucc"] .review-table-head,
  html[data-template="ucc"] .review-table-row {
    grid-template-columns: 92px minmax(0, 1fr) 44px 28px;
    gap: 8px;
    padding: 10px;
  }

  html[data-template="ucc"] .review-confidence {
    grid-column: 3;
  }

  html[data-template="ucc"] .review-table-row input[type="checkbox"] {
    grid-column: 4;
  }

  html[data-template="ucc"] .review-manual-row .review-code-field {
    grid-column: 1;
  }

  html[data-template="ucc"] .review-manual-row .review-name-field {
    grid-column: 2;
  }

  html[data-template="ucc"] .review-manual-actions {
    grid-column: 1 / -1;
  }

  html[data-template="ucc"] .review-template-footer > span {
    flex-basis: 100%;
  }

  html[data-template="ucc"] .app-footer {
    padding-inline: 12px;
  }
}

@media (max-height: 560px) {
  html[data-template="ucc"] .review-template {
    gap: 10px;
    padding-top: 10px;
  }

  html[data-template="ucc"] .review-workspace {
    overflow-y: auto;
  }

  html[data-template="ucc"] .review-all-flat-list,
  html[data-template="ucc"] .review-template-grid {
    flex-shrink: 0;
    min-height: 160px;
  }
}

/* HIS-backed SNOMED CT review workspace. */
html[data-template="ucc"] .rw-workbench { --rw-border: #d9dce1; }
html[data-template="ucc"] .rw-workbench button,
html[data-template="ucc"] .rw-workbench select,
html[data-template="ucc"] .rw-workbench input,
html[data-template="ucc"] .rw-workbench textarea { font: inherit; }
html[data-template="ucc"] .rw-workbench button {
  min-height: 32px; padding: 6px 10px; border: 1px solid #cdd6e4; border-radius: 7px;
  color: var(--ehr-blue); background: #fff; font-size: 13px; cursor: pointer;
}
html[data-template="ucc"] .rw-workbench button:hover:not(:disabled) { background: #edf3ff; }
html[data-template="ucc"] .rw-workbench button:disabled { opacity: .45; cursor: default; }
html[data-template="ucc"] .rw-workbench :is(button,a,input,select,textarea,[tabindex]):focus-visible { outline: 2px solid var(--ehr-blue); outline-offset: 2px; }
html[data-template="ucc"] .rw-workbench .review-template-head > button { background: transparent; color: #fff; border-color: #fff; }
html[data-template="ucc"] .rw-workbench .primary-button { background: var(--ehr-blue); border-color: var(--ehr-blue); color: #fff; }
html[data-template="ucc"] .rw-workbench .primary-button:hover:not(:disabled) { background: #123f8e; }
html[data-template="ucc"] .rw-case-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 0 0 auto; }
html[data-template="ucc"] .rw-case-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
html[data-template="ucc"] .rw-case-title small { display: block; color: #687382; overflow-wrap: anywhere; }
html[data-template="ucc"] .rw-counts { display: flex; gap: 10px; font-size: 12px; white-space: nowrap; }
html[data-template="ucc"] .rw-counts span { padding: 5px 8px; background: #edf5f0; border-radius: 6px; color: #286043; }
html[data-template="ucc"] .rw-counts span + span { background: #fff0ed; color: #943e34; }
html[data-template="ucc"] .rw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 0 0 auto; font-size: 12px; }
html[data-template="ucc"] .rw-tools label { display: flex; align-items: center; gap: 5px; }
html[data-template="ucc"] .rw-workbench :is(select,input[type="search"],textarea) { min-width: 0; padding: 7px 8px; border: 1px solid var(--rw-border); border-radius: 6px; background: #fff; color: #252b34; }
html[data-template="ucc"] .rw-tools input { flex: 1 1 140px; width: 140px; }
html[data-template="ucc"] .rw-vocabulary button { background: var(--ehr-coral); color: #342320; border-color: var(--ehr-coral); font-weight: 600; }
html[data-template="ucc"] .rw-layout { display: grid; grid-template-columns: minmax(180px,var(--rw-source-width)) 8px minmax(0,1fr); flex: 1; min-height: 160px; min-width: 0; overflow: hidden; }
html[data-template="ucc"] .rw-source-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--rw-border); border-radius: 9px; overflow: hidden; }
html[data-template="ucc"] .rw-source-head { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: #f5f7fa; font-size: 12px; }
html[data-template="ucc"] .rw-source-head label { display: flex; align-items: center; gap: 5px; }
html[data-template="ucc"] .rw-source-head select { max-width: 125px; }
html[data-template="ucc"] .rw-highlight-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--rw-border); }
html[data-template="ucc"] .rw-highlight-nav button { min-height: 26px; padding: 2px 8px; }
html[data-template="ucc"] .rw-source-text { flex: 1; min-height: 0; padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 14px; }
html[data-template="ucc"] .rw-source-text mark { background: #fff0ac; border-radius: 2px; color: #252b34; }
html[data-template="ucc"] .rw-source-text mark.is-focused { background: #ffc5b7; box-shadow: 0 0 0 2px #ff877a; }
html[data-template="ucc"] .rw-splitter { cursor: col-resize; touch-action: none; background: linear-gradient(90deg,transparent 3px,#ccd7e7 3px,#ccd7e7 5px,transparent 5px); }
html[data-template="ucc"] .rw-result-pane { min-height: 0; min-width: 0; overflow: auto; border: 1px solid var(--rw-border); border-radius: 9px; }
html[data-template="ucc"] .rw-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; font-size: 13px; }
html[data-template="ucc"] .rw-table th,html[data-template="ucc"] .rw-table td { padding: 8px; text-align: left; border: 0; line-height: 1.45; overflow-wrap: anywhere; }
html[data-template="ucc"] .rw-table thead th { position: sticky; top: 0; background: #fff; z-index: 2; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--rw-border); }
html[data-template="ucc"] .rw-table thead button { border: 0; background: transparent; padding: 0; white-space: nowrap; }
html[data-template="ucc"] .rw-table tr:nth-child(odd) { background: #f5f5f5; }
html[data-template="ucc"] .rw-table tr:hover { background: #eef3fd; }
html[data-template="ucc"] .rw-table .rw-category th { background: #e9edf3; padding: 5px 10px; font-size: 12px; color: #4a5666; }
html[data-template="ucc"] .rw-category span { float: right; font-weight: 400; }
html[data-template="ucc"] .rw-table td:nth-child(1) { width: 35px; }
html[data-template="ucc"] .rw-table td:nth-child(3) { min-width: 82px; }
html[data-template="ucc"] .rw-table td:nth-child(4) { min-width: 100px; }
html[data-template="ucc"] .rw-table td:nth-child(6) { width: 46px; text-align: center; }
html[data-template="ucc"] .rw-table td:nth-child(7) { width: 38px; }
html[data-template="ucc"] .rw-table a,html[data-template="ucc"] .rw-workbench .rw-span-button { color: #ac443a; text-decoration: none; }
html[data-template="ucc"] .rw-workbench .rw-span-button { padding: 0; border: 0; background: transparent; text-align: left; min-height: 28px; }
html[data-template="ucc"] .rw-table .is-rejected td:nth-child(4) { text-decoration: line-through; color: #7b818a; }
html[data-template="ucc"] .rw-workbench input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ehr-blue); cursor: pointer; }
html[data-template="ucc"] .rw-confidence > span { display: inline-flex; gap: 4px; }
html[data-template="ucc"] .rw-confidence i { width: 8px; height: 8px; border: 1px solid #9da9bb; border-radius: 50%; }
html[data-template="ucc"] .rw-confidence .filled { background: var(--ehr-blue); border-color: var(--ehr-blue); }
html[data-template="ucc"] .rw-review-notes { display: grid; gap: 5px; flex: 0 0 auto; font-size: 12px; }
html[data-template="ucc"] .rw-review-notes textarea { width: 100%; min-height: 54px; max-height: 120px; resize: vertical; font-size: 13px; }
html[data-template="ucc"] .rw-workbench .review-template-footer { flex-wrap: wrap; }
html[data-template="ucc"] .rw-notice { font-size: 12px; overflow-wrap: anywhere; }
html[data-template="ucc"] .rw-muted { color: #687382; font-size: 12px; }
html[data-template="ucc"] .rw-empty { display: grid; place-content: center; min-height: 160px; padding: 24px; color: #687382; text-align: center; }
html[data-template="ucc"] .rw-workbench[data-source-mode="hidden"] .rw-layout,
html[data-template="ucc"] .rw-workbench.is-simple:not([data-source-mode="visible"]) .rw-layout { grid-template-columns: minmax(0,1fr); }
html[data-template="ucc"] .rw-workbench[data-source-mode="hidden"] .rw-source-pane,
html[data-template="ucc"] .rw-workbench[data-source-mode="hidden"] .rw-splitter,
html[data-template="ucc"] .rw-workbench.is-simple:not([data-source-mode="visible"]) .rw-source-pane,
html[data-template="ucc"] .rw-workbench.is-simple:not([data-source-mode="visible"]) .rw-splitter { display: none; }
html[data-template="ucc"] .rw-workbench.is-simple .rw-table :is(th,td):nth-child(2) { display: none; }
html[data-template="ucc"] .rw-dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(24 55 100 / 45%); }
html[data-template="ucc"] .rw-dialog { display: flex; flex-direction: column; width: min(600px,100%); max-height: 90dvh; gap: 14px; padding: 20px; border-radius: 15px; background: white; color: #252b34; box-shadow: 0 20px 60px #18376444; }
html[data-template="ucc"] .rw-dialog header { display: flex; align-items: center; justify-content: space-between; }
html[data-template="ucc"] .rw-dialog h3,html[data-template="ucc"] .rw-dialog p { margin: 0; }
html[data-template="ucc"] .rw-case-progress { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; font-size: 12px; }
html[data-template="ucc"] .rw-case-progress span { display: grid; gap: 5px; padding: 10px; border-radius: 8px; background: #f1f5fb; }
html[data-template="ucc"] .rw-case-progress strong { font-size: 22px; }
html[data-template="ucc"] .rw-case-progress small { color: #687382; }
html[data-template="ucc"] .rw-search-label { display: grid; gap: 6px; font-size: 13px; }
html[data-template="ucc"] .rw-case-list { min-height: 0; overflow: auto; }
html[data-template="ucc"] .rw-case-list section { display: grid; gap: 6px; }
html[data-template="ucc"] .rw-case-list button { display: flex; align-items: center; justify-content: space-between; text-align: left; }
html[data-template="ucc"] .rw-case-list small { margin-left: 10px; color: #687382; }
@media (max-width: 1000px) {
  html[data-template="ucc"] .rw-workbench:not([data-source-mode="visible"]) .rw-layout { grid-template-columns: minmax(0,1fr); }
  html[data-template="ucc"] .rw-workbench:not([data-source-mode="visible"]) :is(.rw-source-pane,.rw-splitter) { display: none; }
  html[data-template="ucc"] .rw-workbench[data-source-mode="visible"] .rw-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(130px,.7fr) minmax(150px,1fr); gap: 10px; overflow: auto; }
  html[data-template="ucc"] .rw-splitter { display: none; }
  html[data-template="ucc"] .rw-table :is(th,td):nth-child(2) { display: none; }
}
@media (max-width: 580px) {
  html[data-template="ucc"] .rw-workbench .review-workspace { gap: 10px; }
  html[data-template="ucc"] .rw-case-toolbar { gap: 6px; }
  html[data-template="ucc"] .rw-case-title { flex-basis: 100%; order: -1; }
  html[data-template="ucc"] .rw-counts { margin-left: auto; gap: 5px; }
  html[data-template="ucc"] .rw-table { font-size: 12px; }
  html[data-template="ucc"] .rw-table :is(th,td) { padding: 7px 5px; }
  html[data-template="ucc"] .rw-table td:nth-child(4) { min-width: 86px; }
  html[data-template="ucc"] .rw-table td:nth-child(5) { min-width: 75px; }
  html[data-template="ucc"] .rw-table td:nth-child(3) { min-width: 70px; }
  html[data-template="ucc"] .rw-table td:nth-child(3) a { white-space: nowrap; }
  html[data-template="ucc"] .rw-table [data-rw-entry] td:last-child,
  html[data-template="ucc"] .rw-table thead th:last-child { position: sticky; right: 0; background: #fff; box-shadow: -2px 0 4px #d9dce155; }
  html[data-template="ucc"] .rw-table [data-rw-entry] td:last-child { z-index: 1; }
  html[data-template="ucc"] .rw-review-notes textarea { min-height: 45px; }
  html[data-template="ucc"] .rw-workbench .review-template-head { gap: 8px; }
  html[data-template="ucc"] .rw-workbench .review-template-head h2 { font-size: 19px; }
  html[data-template="ucc"] .rw-workbench .review-template-head p { font-size: 12px; }
}

html[data-template="ucc"] .rw-analysis-error { margin: 0; max-height: 100px; overflow: auto; padding: 10px 12px; border: 1px solid #ecc2bc; border-radius: 8px; background: #fff0ed; color: #943e34; font-size: 13px; overflow-wrap: anywhere; }
