/* Approval document aligned to the confirmed compact OA reference. */
:root {
  --approval-reference-width: 960px;
  --approval-reference-row-height: 30px;
  --approval-reference-border: #d9dfe8;
  --approval-reference-field: #f6f8fb;
  --approval-reference-section: #f3f4f6;
  --approval-reference-text: #1f2937;
  --approval-reference-muted: #667085;
  --approval-reference-link: #1684e8;
}

.flow-record-preview-backdrop.is-document-preview.is-approval-mode {
  align-items: flex-start !important;
  min-height: 100% !important;
  padding: 12px 16px 68px !important;
  overflow: auto !important;
  background: #eef1f5 !important;
}

.flow-record-preview-backdrop.is-workspace.is-document-preview.is-approval-mode {
  padding-top: 10px !important;
}

.flow-record-preview-panel.is-approval-mode {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #eef1f5 !important;
  box-shadow: none !important;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head {
  width: min(100%, var(--approval-reference-width));
  min-height: 62px !important;
  margin: 0 auto !important;
  padding: 10px 0 6px !important;
  display: grid !important;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: end;
  column-gap: 12px;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-preview-status-zone {
  visibility: hidden;
  min-width: 0;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block {
  min-width: 0;
  text-align: center;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block strong {
  display: block;
  overflow: hidden;
  color: #111827 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 28px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block small {
  display: none !important;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-reference-document-number {
  min-width: 0;
  align-self: start;
  padding-top: 1px;
  text-align: right;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head .flow-record-document-number {
  display: block;
  overflow: hidden;
  color: var(--approval-reference-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > [data-flow-record-preview-close] {
  position: absolute;
  top: 12px;
  right: max(12px, calc((100% - var(--approval-reference-width)) / 2 - 76px));
  min-height: 30px;
}

.flow-record-preview-panel.is-approval-mode .flow-record-preview-layout,
.flow-record-preview-panel.is-approval-mode .flow-record-preview-main {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-document {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.flow-reference-approval-document {
  width: min(100%, var(--approval-reference-width));
  margin: 0 auto !important;
  padding: 0 10px 10px !important;
  overflow: hidden;
  color: var(--approval-reference-text);
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  container-type: inline-size;
}

.flow-reference-approval-document .flow-reference-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 !important;
  border-top: 1px solid var(--approval-reference-border);
  border-left: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-reference-meta-grid > div {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  min-width: 0;
  min-height: var(--approval-reference-row-height) !important;
  border-right: 1px solid var(--approval-reference-border);
  border-bottom: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document :is(dt, .flow-reference-field-label) {
  text-align: right;
}

.flow-reference-approval-document .flow-reference-meta-grid :is(dt, dd),
.flow-reference-approval-document .flow-approval-business-details :is(dt, dd) {
  min-width: 0;
  min-height: calc(var(--approval-reference-row-height) - 1px);
  margin: 0 !important;
  padding: 5px 8px !important;
  color: var(--approval-reference-text) !important;
  font-size: 13px !important;
  line-height: 19px !important;
  overflow-wrap: anywhere;
}

.flow-reference-approval-document .flow-reference-meta-grid dt,
.flow-reference-approval-document .flow-approval-business-details dt {
  text-align: right;
  white-space: nowrap;
  background: #fff;
}

.flow-reference-approval-document .flow-reference-meta-grid dd,
.flow-reference-approval-document .flow-approval-business-details dd {
  border-left: 1px solid var(--approval-reference-border);
  background: var(--approval-reference-field) !important;
}

.flow-reference-approval-document .flow-reference-meta-grid em {
  margin-right: 2px;
  color: #dc2626;
  font-style: normal;
}

.flow-reference-approval-document .flow-approval-content-section {
  margin: 6px 0 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-reference-approval-document .flow-approval-content-section > header {
  min-height: 32px !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0 !important;
  border-bottom: 1px solid var(--approval-reference-border) !important;
  background: var(--approval-reference-section) !important;
}

.flow-reference-approval-document .flow-approval-content-section > header strong {
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 20px;
}

.flow-reference-approval-document .flow-approval-content-section > header span {
  overflow: hidden;
  color: var(--approval-reference-muted) !important;
  font-size: 12px !important;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-reference-approval-document .flow-approval-context-section > header,
.flow-reference-approval-document .flow-approval-detail-section > header {
  display: none !important;
}

.flow-reference-approval-document .flow-approval-context-section,
.flow-reference-approval-document .flow-approval-detail-section {
  margin-top: 0 !important;
  border-top: 0 !important;
}

.flow-reference-approval-document .flow-approval-context-strip {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-context-strip > div {
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: var(--approval-reference-row-height) !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--approval-reference-border) !important;
  border-bottom: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-context-strip > div:nth-child(3n) {
  border-right: 0 !important;
}

.flow-reference-approval-document .flow-approval-context-strip span,
.flow-reference-approval-document .flow-approval-context-strip strong {
  min-width: 0;
  margin: 0 !important;
  padding: 5px 8px !important;
  color: var(--approval-reference-text) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 19px !important;
  overflow-wrap: anywhere;
}

.flow-reference-approval-document .flow-approval-context-strip span {
  text-align: right;
  white-space: nowrap;
}

.flow-reference-approval-document .flow-approval-context-strip strong {
  border-left: 1px solid var(--approval-reference-border);
  background: var(--approval-reference-field);
}

.flow-reference-approval-document .flow-approval-context-strip small {
  display: none !important;
}

.flow-reference-approval-document .flow-approval-business-details {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin: 0 !important;
  border: 0 !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-business-details > div {
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr);
  min-width: 0;
  min-height: var(--approval-reference-row-height) !important;
  border-right: 1px solid var(--approval-reference-border);
  border-bottom: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-business-details > div:nth-child(3n),
.flow-reference-approval-document .flow-approval-business-details > .is-wide {
  border-right: 0;
}

.flow-reference-approval-document .flow-approval-business-details > .is-wide {
  grid-column: 1 / -1;
}

.flow-reference-approval-document .flow-approval-main-checks .flow-approval-system-checks.is-clear,
.flow-reference-approval-document .flow-approval-focus {
  display: none !important;
}

.flow-reference-approval-document .flow-approval-main-checks {
  margin: 6px 0 0 !important;
}

.flow-reference-approval-document .flow-approval-system-checks:not(.is-clear) {
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid #f4c7c3 !important;
  border-radius: 0 !important;
  background: #fff7f6 !important;
  box-shadow: none !important;
}

.flow-reference-approval-document :is(.flow-approval-payment-table-shell, .flow-approval-attachment-table-shell) {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.flow-reference-approval-document :is(.flow-approval-payment-detail-table, .flow-approval-attachment-table) {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--approval-reference-text);
  font-size: 12px;
}

.flow-reference-approval-document :is(.flow-approval-payment-detail-table, .flow-approval-attachment-table) :is(th, td) {
  min-width: 0;
  height: var(--approval-reference-row-height) !important;
  padding: 4px 7px !important;
  overflow: hidden;
  border-right: 1px solid var(--approval-reference-border);
  border-bottom: 1px solid var(--approval-reference-border);
  line-height: 20px !important;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-reference-approval-document :is(.flow-approval-payment-detail-table, .flow-approval-attachment-table) th {
  color: #374151 !important;
  font-weight: 500 !important;
  background: #f7f8fa !important;
}

.flow-reference-approval-document .flow-approval-payment-detail-table :is(th:first-child, td:first-child),
.flow-reference-approval-document .flow-approval-attachment-table :is(th:first-child, td:first-child) {
  width: 52px;
  text-align: center;
}

.flow-reference-approval-document .flow-approval-payment-detail-table :is(.is-money, tfoot td) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.flow-reference-approval-document .flow-approval-payment-detail-table tfoot th {
  text-align: right;
}

.flow-reference-approval-document .flow-approval-payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 6px 0 0;
  border-top: 1px solid var(--approval-reference-border);
  border-left: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-payment-summary > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: var(--approval-reference-row-height);
  border-right: 1px solid var(--approval-reference-border);
  border-bottom: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-payment-summary > .is-wide {
  grid-column: 1 / -1;
}

.flow-reference-approval-document .flow-approval-payment-summary :is(dt, dd) {
  margin: 0;
  padding: 5px 8px;
  font-size: 13px;
  line-height: 19px;
}

.flow-reference-approval-document .flow-approval-payment-summary dt {
  text-align: right;
}

.flow-reference-approval-document .flow-approval-payment-summary dd {
  min-width: 0;
  border-left: 1px solid var(--approval-reference-border);
  background: var(--approval-reference-field);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.flow-reference-approval-document .flow-approval-payment-summary > .is-wide dd {
  max-height: 86px;
  overflow: auto;
}

.flow-reference-approval-document .flow-approval-account-section dl {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 !important;
}

.flow-reference-approval-document .flow-approval-account-section dl > div {
  display: grid !important;
  grid-template-columns: 84px minmax(0, 1fr);
  min-width: 0;
  min-height: var(--approval-reference-row-height);
  border-right: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-account-section dl > div:last-child {
  border-right: 0;
}

.flow-reference-approval-document .flow-approval-account-section :is(dt, dd) {
  min-width: 0;
  margin: 0 !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  line-height: 19px !important;
}

.flow-reference-approval-document .flow-approval-account-section dt {
  text-align: right;
}

.flow-reference-approval-document .flow-approval-account-section dd {
  border-left: 1px solid var(--approval-reference-border);
  background: var(--approval-reference-field);
  overflow-wrap: anywhere;
}

.flow-reference-approval-document .flow-approval-attachments-section .empty-state {
  min-height: 64px !important;
  padding: 22px 12px !important;
  color: var(--approval-reference-muted) !important;
  font-size: 12px !important;
  text-align: center;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-attachment-table {
  min-width: 760px;
}

.flow-reference-approval-document .flow-approval-attachment-table th:nth-child(2) {
  width: 36%;
}

.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(3), td:nth-child(3)) {
  width: 86px;
}

.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(4), td:nth-child(4)) {
  width: 88px;
}

.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(5), td:nth-child(5)) {
  width: 150px;
}

.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(6), td:nth-child(6)) {
  width: 72px;
  text-align: center;
}

.flow-reference-approval-document .flow-approval-attachment-table .attachment-image-link {
  width: 100%;
  max-width: 100%;
  min-height: 24px;
  padding: 0 !important;
  display: inline-flex;
  justify-content: flex-start;
  gap: 5px;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.flow-reference-approval-document .flow-approval-attachment-table .attachment-image-thumb,
.flow-reference-approval-document .flow-approval-attachment-table .attachment-image-action {
  display: none !important;
}

.flow-reference-approval-document :is(.attachment-file-link, .attachment-image-name, .flow-attachment-download-link) {
  color: var(--approval-reference-link) !important;
  font-size: 12px !important;
}

.flow-reference-approval-document .attachment-image-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-reference-approval-document .flow-reference-record-tabs {
  min-height: 38px !important;
  margin: 8px 0 0 !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: flex-end;
  gap: 24px;
  border: 0 !important;
  border-bottom: 1px solid var(--approval-reference-border) !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-reference-record-tabs span {
  position: relative;
  min-height: 37px;
  padding: 9px 2px 7px !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  line-height: 20px;
  white-space: nowrap;
}

.flow-reference-approval-document .flow-reference-record-tabs .is-active {
  color: var(--approval-reference-link) !important;
}

.flow-reference-approval-document .flow-reference-record-tabs .is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--approval-reference-link);
}

.flow-reference-record-log-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  min-height: 280px;
  margin: 0 !important;
  padding: 8px 10px 14px !important;
  border: 1px solid var(--approval-reference-border);
  border-top: 0;
  background: #fff;
}

.flow-reference-record-log-layout > * {
  min-width: 0;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-reference-record-log-layout > :last-child {
  border-left: 1px solid var(--approval-reference-border) !important;
}

.flow-reference-record-log-layout .flow-approval-timeline > header {
  display: none !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li {
  min-height: 54px !important;
  padding: 7px 0 7px 28px !important;
}

.flow-reference-record-log-layout .flow-reference-operation-log ul {
  max-height: 310px;
  margin: 0 !important;
  padding: 0 !important;
  overflow: auto;
  list-style: circle inside;
}

.flow-reference-record-log-layout .flow-reference-operation-log li {
  min-height: 42px;
  padding: 8px 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-bottom: 1px dashed var(--approval-reference-border);
  color: var(--approval-reference-text);
  font-size: 12px;
  line-height: 20px;
}

.flow-reference-record-log-layout .flow-reference-operation-log small {
  color: #98a2b3;
  white-space: nowrap;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-workbench {
  width: min(100%, var(--approval-reference-width));
  margin: 8px auto 0 !important;
  padding: 0 0 48px !important;
  display: block !important;
  position: static !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-record-preview-panel.is-approval-mode .flow-record-preview-layout.is-stacked-approval > .flow-approval-workbench {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-approval-workbench {
  width: min(100%, var(--approval-reference-width)) !important;
  max-width: var(--approval-reference-width) !important;
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 0 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-approval-workbench > .flow-approval-decision-panel {
  width: 100% !important;
  max-width: none !important;
  padding: 10px !important;
  border: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-decision-panel {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: 152px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-workbench-head,
.flow-record-preview-panel.is-approval-mode .flow-approval-review-brief,
.flow-record-preview-panel.is-approval-mode .flow-approval-account-brief,
.flow-record-preview-panel.is-approval-mode .flow-approval-progress {
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-workbench-head {
  grid-column: 1;
  min-height: 64px !important;
  padding: 8px !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-review-brief,
.flow-record-preview-panel.is-approval-mode .flow-approval-account-brief,
.flow-record-preview-panel.is-approval-mode .flow-approval-progress,
.flow-record-preview-panel.is-approval-mode .flow-approval-audit-note {
  display: none !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-comment-field {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  margin: 0 !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-comment-field textarea {
  min-height: 64px !important;
  resize: vertical;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-opinion-upload,
.flow-record-preview-panel.is-approval-mode .flow-approval-utility-actions {
  grid-column: 3;
  margin: 0 !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-opinion-upload {
  grid-row: 1;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-utility-actions {
  grid-row: 2;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-actions,
.flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar {
  position: sticky !important;
  z-index: 8;
  bottom: 0;
  width: min(100%, var(--approval-reference-width));
  min-height: 44px !important;
  margin: 0 auto !important;
  padding: 6px 10px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px;
  border: 1px solid var(--approval-reference-border) !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: rgb(255 255 255 / 96%) !important;
  box-shadow: 0 -4px 14px rgb(15 23 42 / 7%) !important;
  backdrop-filter: blur(8px);
}

.flow-record-preview-panel.is-approval-mode :is(.flow-approval-actions, .flow-preview-action-bar) .table-action {
  min-width: 68px;
  min-height: 30px !important;
  padding: 4px 12px !important;
  border-radius: 15px !important;
  font-size: 12px !important;
}

.flow-record-preview-panel.is-approval-mode .flow-approval-actions .table-action:first-child,
.flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar .table-action:first-child {
  margin-left: 0;
}

.flow-record-preview-panel.is-approval-mode :is(.flow-approval-actions, .flow-preview-action-bar) [data-flow-record-print] {
  order: 99;
  margin-left: auto !important;
}

@media (max-width: 760px) {
  :root {
    --approval-reference-row-height: 40px;
  }

  .flow-record-preview-backdrop.is-document-preview.is-approval-mode {
    padding: 0 0 56px !important;
  }

  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head {
    width: 100%;
    min-height: 70px !important;
    padding: 8px 44px 6px 10px !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-preview-status-zone {
    display: none;
  }

  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block {
    text-align: left;
  }

  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-reference-document-number {
    padding: 0;
    text-align: left;
  }

  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > [data-flow-record-preview-close] {
    top: 10px;
    right: 8px;
  }

  .flow-reference-approval-document {
    width: 100%;
    padding: 0 8px 8px !important;
  }

  .flow-reference-approval-document .flow-reference-meta-grid,
  .flow-reference-approval-document .flow-approval-business-details,
  .flow-reference-approval-document .flow-approval-context-strip,
  .flow-reference-approval-document .flow-approval-account-section dl,
  .flow-reference-approval-document .flow-approval-payment-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-reference-approval-document .flow-reference-meta-grid > div,
  .flow-reference-approval-document .flow-approval-business-details > div,
  .flow-reference-approval-document .flow-approval-context-strip > div,
  .flow-reference-approval-document .flow-approval-account-section dl > div,
  .flow-reference-approval-document .flow-approval-payment-summary > div {
    grid-column: 1 !important;
    grid-template-columns: 98px minmax(0, 1fr);
    border-right: 0 !important;
  }

  .flow-reference-record-log-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .flow-reference-record-log-layout > :last-child {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--approval-reference-border) !important;
    border-left: 0 !important;
  }

  .flow-record-preview-panel.is-approval-mode .flow-approval-workbench {
    width: 100%;
  }

  .flow-record-preview-panel.is-approval-mode .flow-approval-decision-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-record-preview-panel.is-approval-mode .flow-approval-comment-field,
  .flow-record-preview-panel.is-approval-mode .flow-approval-progress,
  .flow-record-preview-panel.is-approval-mode .flow-approval-opinion-upload,
  .flow-record-preview-panel.is-approval-mode .flow-approval-utility-actions,
  .flow-record-preview-panel.is-approval-mode .flow-approval-audit-note {
    grid-column: 1;
    grid-row: auto;
  }

  .flow-record-preview-panel.is-approval-mode :is(.flow-approval-actions, .flow-preview-action-bar) {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start !important;
  }

  .flow-record-preview-panel.is-approval-mode :is(.flow-approval-actions, .flow-preview-action-bar) .table-action {
    flex: 0 0 auto;
  }
}

@container (max-width: 760px) {
  .flow-reference-approval-document .flow-reference-meta-grid,
  .flow-reference-approval-document .flow-approval-business-details,
  .flow-reference-approval-document .flow-approval-context-strip,
  .flow-reference-approval-document .flow-approval-account-section dl,
  .flow-reference-approval-document .flow-approval-payment-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .flow-reference-approval-document .flow-reference-meta-grid > div,
  .flow-reference-approval-document .flow-approval-business-details > div,
  .flow-reference-approval-document .flow-approval-context-strip > div,
  .flow-reference-approval-document .flow-approval-account-section dl > div,
  .flow-reference-approval-document .flow-approval-payment-summary > div {
    grid-column: 1 !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    border-right: 0 !important;
  }
}

@media print {
  .app-sidebar,
  .app-header,
  .flow-record-preview-panel.is-approval-mode .flow-approval-actions,
  .flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar,
  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > [data-flow-record-preview-close] {
    display: none !important;
  }

  .flow-record-preview-backdrop.is-document-preview.is-approval-mode,
  .flow-record-preview-panel.is-approval-mode {
    padding: 0 !important;
    background: #fff !important;
  }

  .flow-reference-approval-document,
  .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head {
    width: 100% !important;
  }
}
