/* Approval workspace aligned to the supplied OA reference. */
:root {
  --approval-reference-width: 960px;
  --approval-reference-font-size: 13px;
  --approval-reference-row-height: 28px;
  --approval-reference-border: #d8dde6;
  --approval-reference-fill: #f4f6f9;
  --approval-reference-section: #f2f2f2;
  --approval-reference-blue: #168cff;
  --approval-reference-text: #1f2329;
  --approval-reference-muted: #8c939f;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-backdrop.is-document-preview.is-approval-mode {
  background: #eef1f5 !important;
  padding: 0 !important;
}

html body[data-ui-theme="macos-workspace-v3"] .erp-main .flow-record-preview-backdrop.is-workspace .flow-record-preview-panel.is-document-preview.is-approval-mode,
html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .flow-record-preview-panel.is-document-preview.is-approval-mode,
html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-document-preview.is-approval-mode {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #eef1f5 !important;
  display: flex !important;
  flex-direction: column !important;
  grid-template-rows: none !important;
  overflow: hidden !important;
}

.flow-reference-business-tabs {
  width: min(100%, var(--approval-reference-width));
  min-height: 40px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  color: #5f6670;
  font-size: 13px;
  scrollbar-width: thin;
  flex: 0 0 40px;
}

.flow-reference-business-tabs > span {
  position: relative;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 11px 13px 8px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: transparent;
}

.flow-reference-business-tabs > span.is-active {
  color: var(--approval-reference-blue);
  background: #fff;
}

.flow-reference-business-tabs > span.is-active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  background: var(--approval-reference-blue);
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head {
  width: min(100%, var(--approval-reference-width)) !important;
  min-height: 54px !important;
  margin: 0 auto !important;
  padding: 8px 12px 6px !important;
  display: grid !important;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr !important;
  align-items: start !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  flex: 0 0 54px !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-preview-status-zone {
  visibility: hidden !important;
  min-width: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block {
  grid-column: 2 !important;
  align-self: end !important;
  min-width: 0 !important;
  text-align: center !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block strong {
  display: block !important;
  margin: 0 !important;
  color: #16191d !important;
  font-family: SimSun, "Songti SC", serif !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  line-height: 28px !important;
  letter-spacing: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block small {
  display: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-reference-document-number {
  grid-column: 3 !important;
  align-self: start !important;
  justify-self: end !important;
  min-width: 0 !important;
  padding-top: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head .flow-record-document-number {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--approval-reference-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 18px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > [data-flow-record-preview-close] {
  display: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-record-preview-layout,
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 {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  flex: 1 1 auto !important;
  padding: 0 !important;
  display: block !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #eef1f5 !important;
  order: initial !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-record-preview-main {
  width: min(100%, var(--approval-reference-width)) !important;
  max-width: var(--approval-reference-width) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: block !important;
  overflow: visible !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-approval-document,
.flow-reference-approval-document {
  width: min(100%, var(--approval-reference-width)) !important;
  max-width: var(--approval-reference-width) !important;
  margin: 0 auto !important;
  padding: 0 12px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--approval-reference-text) !important;
  font-family: Arial, "Microsoft YaHei", "Source Han Sans SC", sans-serif !important;
  font-size: var(--approval-reference-font-size) !important;
  line-height: 1.35 !important;
}

.flow-reference-approval-document .flow-readonly-document {
  width: 100%;
}

.flow-reference-approval-document :is(.flow-reference-meta-grid, .flow-reference-primary-grid) {
  margin: 0 !important;
}

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

.flow-reference-approval-document .flow-reference-meta-grid {
  margin: 0 !important;
}

.flow-record-preview-panel.is-document-preview.is-approval-mode .flow-reference-submitted-meta.flow-reference-meta-grid {
  width: 100% !important;
  margin: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) .flow-reference-approval-document .flow-reference-meta-grid {
  width: 100% !important;
  margin: 0 !important;
}

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

.flow-reference-primary-grid > .is-span-2 {
  grid-column: span 2;
}

.flow-reference-primary-grid > .is-span-3 {
  grid-column: 1 / -1;
}

.flow-reference-approval-document :is(.flow-reference-meta-grid, .flow-reference-primary-grid) :is(dt, dd) {
  min-width: 0;
  min-height: calc(var(--approval-reference-row-height) - 1px);
  margin: 0 !important;
  padding: 4px 8px !important;
  display: flex;
  align-items: center;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: var(--approval-reference-font-size) !important;
  line-height: 18px !important;
  letter-spacing: 0 !important;
}

.flow-reference-approval-document :is(.flow-reference-meta-grid, .flow-reference-primary-grid) dt {
  justify-content: flex-end;
  text-align: right;
  color: #20242a !important;
  background: #fff !important;
  border-right: 1px solid var(--approval-reference-border) !important;
  white-space: normal;
  font-weight: 400 !important;
}

.flow-reference-approval-document :is(.flow-reference-meta-grid, .flow-reference-primary-grid) dt em {
  margin-right: 2px;
  color: #f04438;
  font-style: normal;
}

.flow-reference-approval-document :is(.flow-reference-meta-grid, .flow-reference-primary-grid) dd {
  overflow: hidden;
  color: #23272e !important;
  background: var(--approval-reference-fill) !important;
  text-align: left !important;
  overflow-wrap: anywhere;
}

.flow-reference-primary-grid > .is-accent dd {
  color: #ff7b39 !important;
}

.flow-reference-primary-grid .is-code dd {
  font-family: Arial, "Source Han Sans SC", sans-serif !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

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

.flow-reference-approval-document .flow-approval-content-section {
  width: 100% !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  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;
  padding: 5px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: var(--approval-reference-section) !important;
}

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

.flow-reference-approval-document .flow-approval-content-section > header span {
  color: var(--approval-reference-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.flow-reference-approval-document .flow-approval-payment-toolbar {
  min-height: 38px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 120px minmax(120px, 220px) 58px 1fr;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--approval-reference-border);
  background: #fff;
}

.flow-reference-approval-document .flow-approval-payment-toolbar :is(select, input, button) {
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
}

.flow-reference-approval-document .flow-approval-payment-toolbar :is(select, input) {
  width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--approval-reference-border);
  background: #fff;
}

.flow-reference-approval-document .flow-approval-payment-toolbar input {
  border-left: 0;
}

.flow-reference-approval-document .flow-approval-payment-table-shell,
.flow-reference-approval-document .flow-approval-attachment-table-shell {
  width: 100% !important;
  overflow-x: auto !important;
  scrollbar-width: thin;
}

.flow-reference-approval-document .flow-approval-payment-table-shell {
  max-width: 100% !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
}

.flow-reference-approval-document .flow-approval-payment-table-shell:focus-visible {
  outline: 2px solid var(--approval-reference-blue) !important;
  outline-offset: -2px !important;
}

.flow-reference-approval-document .flow-approval-payment-detail-table {
  width: max-content !important;
  min-width: 1594px !important;
  max-width: none !important;
  border: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-payment-detail-table .data-table-column-resizer {
  display: block !important;
}

.flow-reference-approval-document .flow-approval-attachment-table {
  width: 100% !important;
  min-width: 900px !important;
  border: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  background: #fff !important;
}

.flow-reference-approval-document .flow-approval-payment-detail-table col.is-index { width: 48px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-payment-type { width: 110px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-contract-number { width: 180px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-contract-name { width: 240px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-supplier { width: 190px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-money-column { width: 130px; }
.flow-reference-approval-document .flow-approval-payment-detail-table col.is-payee { width: 190px; }

.flow-reference-approval-document :is(.flow-approval-payment-detail-table, .flow-approval-attachment-table) :is(th, td) {
  height: var(--approval-reference-row-height) !important;
  min-height: var(--approval-reference-row-height) !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
  border-right: 1px solid #e2e5ea !important;
  border-bottom: 1px solid #e2e5ea !important;
  color: #20242a !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 18px !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.flow-reference-approval-document :is(.flow-approval-payment-detail-table, .flow-approval-attachment-table) th {
  background: #fafafa !important;
  text-align: center !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: 46px !important;
  text-align: center !important;
}

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

.flow-reference-approval-document .flow-approval-payment-detail-table tfoot :is(th, td) {
  background: #f7f7f7 !important;
  font-weight: 700 !important;
}

.flow-reference-approval-document .flow-approval-payment-summary {
  margin: 8px 0 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  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 {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  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) {
  min-width: 0;
  margin: 0 !important;
  padding: 5px 8px !important;
  color: #20242a !important;
  font-size: 13px !important;
  line-height: 18px !important;
}

.flow-reference-approval-document .flow-approval-payment-summary dt {
  text-align: right;
  border-right: 1px solid var(--approval-reference-border);
  background: #fff;
}

.flow-reference-approval-document .flow-approval-payment-summary dd {
  background: var(--approval-reference-fill);
}

.flow-reference-approval-document .flow-approval-payment-summary > .is-wide dd {
  min-height: 72px !important;
  max-height: 90px !important;
  overflow: auto !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.flow-reference-approval-document .flow-approval-payment-note {
  min-height: 32px;
  margin-top: 6px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-payment-note :is(strong, span) {
  min-width: 0;
  padding: 5px 8px;
  color: #20242a;
  font-size: 12px;
  line-height: 20px;
}

.flow-reference-approval-document .flow-approval-payment-note strong {
  border-right: 1px solid var(--approval-reference-border);
  background: #fff;
  text-align: right;
}

.flow-reference-approval-document .flow-approval-payment-note span {
  overflow-wrap: anywhere;
  background: var(--approval-reference-fill);
}

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

.flow-reference-approval-document .flow-approval-account-section dl > div {
  min-width: 0;
  min-height: var(--approval-reference-row-height);
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  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 7px !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

.flow-reference-approval-document .flow-approval-account-section dt {
  color: #6d7480;
  text-align: right;
  border-right: 1px solid var(--approval-reference-border);
}

.flow-reference-approval-document .flow-approval-account-section dd {
  overflow: hidden;
  color: #20242a;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-reference-approval-document .flow-approval-attachments-section .empty-state {
  min-height: 54px !important;
  padding: 17px 8px !important;
  color: #66aaf8 !important;
  font-size: 12px !important;
  text-align: center !important;
}

.flow-reference-approval-document .flow-approval-attachment-table th:nth-child(2) { width: 44%; }
.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(3), td:nth-child(3)) { width: 78px; }
.flow-reference-approval-document .flow-approval-attachment-table :is(th:nth-child(4), td:nth-child(4)) { width: 92px; }
.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: 120px; }

.flow-reference-approval-document .flow-approval-attachment-table .attachment-image-link {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  color: #078ce8 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !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-attachment-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flow-attachment-row-actions :is(a, button) {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #078ce8 !important;
  font: inherit !important;
  cursor: pointer;
}

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

.flow-reference-record-tabs > button {
  position: relative;
  min-height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  font-family: inherit;
  color: #24282f !important;
  font-size: 13px !important;
  cursor: pointer;
  white-space: nowrap;
}

.flow-reference-record-tabs > button.is-active {
  color: var(--approval-reference-blue) !important;
}

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

.flow-reference-record-log-layout {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-bottom: 1px solid var(--approval-reference-border);
  background: #fff;
}

.flow-reference-record-panel {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

.flow-reference-record-panel[hidden] {
  display: none !important;
}

.flow-reference-record-panel > :is(.flow-approval-timeline, .flow-reference-operation-log) {
  min-width: 0;
  margin: 0 !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.flow-reference-record-empty {
  min-height: 72px;
  padding: 26px 16px;
  color: var(--approval-reference-muted);
  font-size: 12px;
  text-align: center;
}

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

.flow-reference-record-log-layout .flow-approval-timeline-list {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 0 0 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  gap: 0 !important;
  overflow: visible !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 50px !important;
  flex: 0 0 auto !important;
  padding: 2px 0 8px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid #eceef2 !important;
  background: transparent !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li::before {
  top: 16px !important;
  right: auto !important;
  bottom: -1px !important;
  left: 15px !important;
  width: 1px !important;
  height: auto !important;
  background: #d4dde7 !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li:last-child::before {
  display: none !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li > i {
  left: -10px !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li div {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: start !important;
  gap: 4px !important;
}

.flow-reference-record-log-layout .flow-approval-timeline-list li :is(strong, span, small) {
  font-size: 12px !important;
  line-height: 18px !important;
}

.flow-reference-operation-log ul {
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-auto-rows: max-content !important;
  align-content: flex-start !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: circle inside !important;
}

.flow-reference-operation-log li {
  min-height: 46px;
  padding: 5px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-bottom: 1px dashed #dfe3e9;
  color: #272b31;
  font-size: 12px;
  line-height: 18px;
}

.flow-reference-operation-log li > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.flow-reference-operation-log ul {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.flow-reference-operation-log li small {
  color: #a2a8b1;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-approval-workbench,
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-reference-approval-toolbar {
  position: sticky !important;
  right: auto !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 8 !important;
  width: min(100%, var(--approval-reference-width)) !important;
  max-width: var(--approval-reference-width) !important;
  min-height: 42px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  border: 0 !important;
  border-top: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: 0 -4px 10px rgb(24 39 58 / 5%) !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-document-preview.is-approval-mode.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-approval-workbench.flow-reference-approval-toolbar {
  position: sticky !important;
  bottom: 0 !important;
  width: min(100%, var(--approval-reference-width)) !important;
  height: auto !important;
  max-height: none !important;
  min-height: 42px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-document-preview.is-approval-mode.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-reference-approval-toolbar > .flow-approval-decision-panel {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 12px !important;
  display: block !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-document-preview.is-approval-mode.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-reference-approval-toolbar > .flow-approval-actions {
  position: static !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
}

.flow-reference-approval-toolbar > .flow-approval-decision-panel {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 12px !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-reference-approval-toolbar > :is(.flow-reference-approval-compat, .flow-approval-review-brief)[hidden] {
  display: none !important;
}

.flow-reference-approval-toolbar .flow-approval-comment-field {
  max-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 80px minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: hidden !important;
  opacity: 0;
  transition: max-height 160ms ease, padding 160ms ease, opacity 120ms ease;
}

.flow-reference-approval-toolbar:is(.is-comment-open, :has(textarea.is-invalid), :focus-within) .flow-approval-comment-field {
  max-height: 96px;
  padding: 8px 0 !important;
  opacity: 1;
}

.flow-reference-approval-toolbar .flow-approval-comment-field > span {
  color: #20242a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.flow-reference-approval-toolbar .flow-approval-comment-field textarea {
  width: 100% !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 6px 8px !important;
  resize: none !important;
  border: 1px solid #cfd5df !important;
  border-radius: 2px !important;
  background: #fff !important;
  color: #20242a !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

.flow-reference-approval-toolbar .flow-approval-comment-field > small {
  display: none !important;
}

.flow-reference-approval-toolbar .flow-approval-opinion-upload {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid #a9cfff !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #168cff !important;
  font-size: 12px !important;
}

.flow-reference-approval-toolbar > .flow-approval-actions {
  position: static !important;
  width: 100% !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flow-reference-approval-toolbar > .flow-approval-actions .table-action {
  width: auto !important;
  min-width: 72px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
  line-height: 26px !important;
}

.flow-reference-approval-toolbar > .flow-approval-actions .table-action[data-flow-record-print] {
  margin-left: auto !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 8 !important;
  width: min(100%, var(--approval-reference-width)) !important;
  min-height: 42px !important;
  margin: 0 auto !important;
  padding: 6px 12px !important;
  display: flex !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  border: 0 !important;
  border-top: 1px solid var(--approval-reference-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: 0 -4px 10px rgb(24 39 58 / 5%) !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar [data-flow-record-print] {
  order: 20;
  margin-left: auto !important;
}

@media (max-width: 760px) {
  .flow-reference-business-tabs {
    min-height: 36px;
  }

  .flow-reference-business-tabs > span {
    min-height: 36px;
    padding: 9px 10px 7px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head {
    min-height: 64px !important;
    padding: 6px 10px !important;
    grid-template-columns: 1fr !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-preview-status-zone {
    display: none !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-approval-title-block,
  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode > .flow-record-preview-head > .flow-reference-document-number {
    grid-column: 1 !important;
    justify-self: stretch !important;
    text-align: center !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-record-preview-layout {
    height: auto !important;
  }

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

  .flow-reference-approval-document .flow-reference-meta-grid,
  .flow-reference-primary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-reference-primary-grid > :is(.is-span-2, .is-span-3) {
    grid-column: 1;
  }

  .flow-reference-approval-document .flow-reference-meta-grid > div,
  .flow-reference-primary-grid > div {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .flow-reference-approval-document .flow-approval-payment-toolbar {
    grid-template-columns: 96px minmax(0, 1fr) 52px;
  }

  .flow-reference-approval-document .flow-approval-payment-summary,
  .flow-reference-approval-document .flow-approval-account-section dl,
  .flow-reference-record-log-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

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

  .flow-reference-approval-document .flow-approval-account-section dl > div {
    border-right: 0;
    border-bottom: 1px solid var(--approval-reference-border);
  }

  .flow-reference-record-log-layout {
    min-height: 0;
  }

  .flow-reference-approval-toolbar .flow-approval-comment-field {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .flow-reference-approval-toolbar .flow-approval-comment-field > span {
    display: none;
  }

  .flow-reference-approval-toolbar .flow-approval-comment-field textarea {
    grid-column: 1 / -1;
  }

  .flow-reference-approval-toolbar > .flow-approval-actions {
    overflow-x: auto !important;
  }

  .flow-reference-approval-toolbar > .flow-approval-actions .table-action {
    flex: 0 0 auto !important;
    min-width: 70px !important;
  }
}

@media print {
  .flow-reference-business-tabs,
  .flow-reference-approval-toolbar,
  .flow-record-preview-panel.is-approval-mode > .flow-preview-action-bar {
    display: none !important;
  }

  .flow-record-preview-panel.is-approval-mode,
  .flow-record-preview-panel.is-approval-mode .flow-record-preview-layout {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
}
