/* Five-pass UI quality layer: compact operational density and hard text boundaries. */
body[data-ui-theme="macos-workspace-v3"] :is(
  .organization-tree-editor-head strong,
  .project-document-library-title span,
  .workbench-content-list button strong,
  .dashboard-project-picker strong
) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Finance configuration documents 2026-09-03 */
body[data-ui-theme="macos-workspace-v3"] .finance-document-workspace {
  width: min(100%, 1320px);
  max-width: 1320px;
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0 auto;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-shell {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #d8dde6 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-head {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 190px;
  border-bottom: 1px solid #d8dde6;
  background: #ffffff;
  text-align: center;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-head h2 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #1f2329;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-head > span,
body[data-ui-theme="macos-workspace-v3"] .finance-document-head > small {
  position: absolute;
  top: 50%;
  max-width: 170px;
  overflow: hidden;
  color: #6e7681;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-head > span {
  left: 16px;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-head > small {
  right: 16px;
  text-align: right;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-section-title {
  width: auto !important;
  min-height: 34px !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 8px 16px 0 !important;
  padding: 5px 10px !important;
  border: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  color: #1f2329 !important;
  background: #f2f2f2 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-section-title > small {
  margin-left: auto;
  color: #6e7681;
  font-size: 11px;
  font-weight: 500;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-section-title > .table-action {
  min-height: 26px !important;
  margin-left: auto;
  padding: 3px 10px !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-command-bar {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-document-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: 10px;
  margin: 8px 16px;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters {
  width: 100% !important;
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid #d8dde6;
  border-left: 1px solid #d8dde6;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters > label {
  min-width: 0;
  min-height: 36px;
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  border-right: 1px solid #d8dde6;
  border-bottom: 1px solid #d8dde6;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters > label > span {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 8px;
  border-right: 1px solid #e4e8ee;
  color: #1f2329 !important;
  background: #f7f8fa;
  font-size: 12px !important;
  font-weight: 500;
  text-align: right;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters :is(input, select) {
  width: 100% !important;
  min-width: 0 !important;
  height: 35px !important;
  min-height: 35px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-command-actions {
  min-height: 36px;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px !important;
  padding: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-command-actions .table-action {
  min-height: 32px !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-summary-metrics,
body[data-ui-theme="macos-workspace-v3"] .finance-account-summary {
  display: grid !important;
  gap: 0 !important;
  margin: 0 16px 8px !important;
  overflow: hidden;
  border: 1px solid #d8dde6 !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-summary-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px !important;
  border-top: 1px solid #d8dde6 !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payroll-summary-metrics, .finance-account-summary) > .context-card {
  min-width: 0;
  min-height: 56px !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-right: 1px solid #e2e6ec !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payroll-summary-metrics, .finance-account-summary) > .context-card:last-child {
  border-right: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payroll-summary-metrics, .finance-account-summary) .context-card > span {
  color: #6e7681 !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payroll-summary-metrics, .finance-account-summary) .context-card > strong {
  margin-top: 3px;
  color: #17365d !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payroll-summary-metrics, .finance-account-summary) .context-card > small {
  display: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-sheet-list-panel > .data-table-shell {
  width: auto;
  max-width: none;
  margin: 0 16px 8px;
  border-top: 0;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-sheet-list-panel .empty-state {
  min-height: 88px !important;
  margin: 0 16px 8px;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-editor-document-head {
  display: flex !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-editor-document-head .payroll-editor-actions {
  position: absolute;
  right: 16px;
  top: 50%;
  max-width: 170px;
  transform: translateY(-50%);
}

body[data-ui-theme="macos-workspace-v3"] .payroll-editor-document-head > small {
  display: none;
}

body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-sheet-meta {
  margin: 0 16px 8px !important;
  padding: 0 !important;
  border-left: 1px solid #d8dde6;
  border-top: 0;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-list {
  width: auto !important;
  margin: 0 16px 8px;
  overflow: hidden;
  border: 1px solid #d8dde6;
  border-top: 0;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row:last-child {
  border-bottom: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row-head {
  min-height: 34px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 4px 8px 4px 10px;
  border-bottom: 1px solid #e4e8ee;
  background: #f7f8fa;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row-head > strong {
  min-width: 0 !important;
  flex: 1 1 auto;
  overflow: hidden;
  color: #1f2329;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row-actions .table-action {
  min-height: 26px !important;
  padding: 3px 8px !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-left: 1px solid #d8dde6;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label {
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  min-height: 36px;
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid #d8dde6 !important;
  border-bottom: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label.field-wide {
  grid-column: 1 / -1 !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label.account-holder-field {
  grid-column: span 2 !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label > span {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 8px;
  border-right: 1px solid #e4e8ee;
  color: #1f2329 !important;
  background: #f7f8fa;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-align: right;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label :is(input, select) {
  width: 100% !important;
  min-width: 0 !important;
  height: 35px !important;
  min-height: 35px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-panel > .bottom-actions {
  min-height: 52px;
  margin: 0 !important;
  padding: 8px 16px !important;
  border-top: 1px solid #d8dde6;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .finance-account-empty-state {
  min-height: 104px !important;
  margin: 0;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid.finance-config-sections {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px 16px 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8dde6;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-section > .finance-document-section-title {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #d8dde6 !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid .inline-settings {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 76px !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #d8dde6;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid .inline-settings input {
  width: 100% !important;
  min-width: 0;
  height: 35px !important;
  min-height: 35px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-right: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid .inline-settings button {
  width: 100% !important;
  height: 35px !important;
  min-height: 35px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-list {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-row {
  min-width: 0;
  min-height: 34px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 28px !important;
  gap: 4px !important;
  padding: 2px 4px 2px 10px !important;
  border: 0 !important;
  border-right: 1px solid #e4e8ee !important;
  border-bottom: 1px solid #e4e8ee !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-remove {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-type-empty {
  min-height: 52px !important;
  padding: 8px 10px !important;
  border: 0 !important;
}

@media (max-width: 1100px) {
  body[data-ui-theme="macos-workspace-v3"] .finance-document-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-command-actions {
    min-height: 32px;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters,
  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-sheet-meta,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-sheet-meta > .payroll-note-field,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label.field-wide {
    grid-column: 1 / -1 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label.account-holder-field {
    grid-column: auto !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] .finance-document-workspace {
    gap: 6px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-head {
    min-height: 54px;
    padding: 8px 74px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-head h2 {
    font-size: 17px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-head > span,
  body[data-ui-theme="macos-workspace-v3"] .finance-document-head > small {
    max-width: 64px;
    font-size: 10px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-head > span {
    left: 10px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-head > small,
  body[data-ui-theme="macos-workspace-v3"] .payroll-editor-document-head .payroll-editor-actions {
    right: 10px;
    max-width: 64px;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-toolbar {
    margin: 6px 10px;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters,
  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-sheet-meta,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label.account-holder-field {
    grid-column: auto !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters > label,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label {
    min-height: 44px;
    grid-template-columns: 92px minmax(0, 1fr) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters > label > span,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label > span,
  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-command-bar .payroll-filters :is(input, select),
  body[data-ui-theme="macos-workspace-v3"] .finance-account-row .form-grid.compact > label :is(input, select) {
    min-height: 43px !important;
    height: 43px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-document-section-title,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-list,
  body[data-ui-theme="macos-workspace-v3"] .payroll-sheet-list-panel > .data-table-shell,
  body[data-ui-theme="macos-workspace-v3"] .payroll-sheet-list-panel .empty-state,
  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-summary-metrics,
  body[data-ui-theme="macos-workspace-v3"] .finance-account-summary,
  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-sheet-meta {
    margin-inline: 10px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .payroll-flow-workspace .payroll-summary-metrics > .context-card:last-child {
    grid-column: 1 / -1;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-account-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-account-summary > .context-card {
    border-right: 0 !important;
    border-bottom: 1px solid #e2e6ec !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .finance-account-summary > .context-card:last-child {
    border-bottom: 0 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid.finance-config-sections {
    padding: 6px 10px 10px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-list {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid .inline-settings {
    grid-template-columns: minmax(0, 1fr) 72px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-grid .inline-settings :is(input, button) {
    min-height: 44px !important;
    height: 44px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-row {
    min-height: 44px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-type-remove {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* Resizable tables keep their controls local to the current table. */
body[data-ui-theme="macos-workspace-v3"] .data-table-column-tools {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: 28px;
  padding: 2px 0 3px;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .data-table-column-reset {
  box-sizing: border-box;
  width: auto;
  min-width: 96px;
  height: 24px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #d7dce3;
  border-radius: 4px;
  background: #fff;
  color: #303640;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .data-table-column-reset:is(:hover, :focus-visible) {
  border-color: #1677ff;
  color: #095ec7;
  background: #f6faff;
}

body[data-ui-theme="macos-workspace-v3"] .flow-approval-payment-toolbar > .data-table-column-reset {
  flex: 0 0 auto;
  margin-left: auto;
}

body[data-ui-theme="macos-workspace-v3"] .data-table .is-business-name-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .data-table .is-business-name-cell > :is(button, a, span, strong) {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .data-table .is-business-name-cell[data-truncated-text="true"] {
  cursor: help;
}

.data-table-full-text-popover {
  position: fixed;
  z-index: 15000;
  box-sizing: border-box;
  max-height: min(240px, calc(100dvh - 24px));
  padding: 9px 11px;
  overflow: auto;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 34, 48, 0.16);
  color: #181c22;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.data-table-full-text-popover[hidden] {
  display: none !important;
}

body[data-ui-theme="macos-workspace-v3"] :is(.payment-line-items-table, .flow-approval-payment-detail-table) .is-frozen-application-amount {
  position: sticky !important;
  right: 0;
  z-index: 5;
  background: #fff !important;
  box-shadow: -5px 0 8px -7px rgba(25, 39, 58, 0.58);
}

body[data-ui-theme="macos-workspace-v3"] :is(.payment-line-items-table, .flow-approval-payment-detail-table) thead .is-frozen-application-amount {
  z-index: 8;
  background: #f4f6f8 !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-approval-payment-detail-table tfoot .is-frozen-application-amount {
  z-index: 7;
  background: #f7f7f7 !important;
}

@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] .data-table-column-tools {
    min-height: 30px;
    padding-inline: 0;
  }

  body[data-ui-theme="macos-workspace-v3"] .data-table-column-reset {
    min-width: 44px;
    min-height: 28px;
    height: 28px;
    padding-inline: 8px;
  }

  .data-table-full-text-popover {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px);
  }
}

body[data-ui-theme="macos-workspace-v3"] .workbench-content-list button strong,
body[data-ui-theme="macos-workspace-v3"] .project-document-library-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .project-document-library-title > div:first-child,
body[data-ui-theme="macos-workspace-v3"] .project-document-title-actions {
  min-width: 0;
}

body[data-ui-theme="macos-workspace-v3"] .construction-log-view-tabs button span,
body[data-ui-theme="macos-workspace-v3"] #flow-form .context-card small {
  font-size: 12px !important;
}

@media (min-width: 761px) {
  body[data-ui-theme="macos-workspace-v3"] #flow-form .form-actions :is(button, .table-action) {
    min-height: 34px !important;
    height: 34px !important;
    line-height: 32px !important;
  }
}

body[data-ui-theme="macos-workspace-v3"] .organization-access-layout {
  align-items: start;
}

body[data-ui-theme="macos-workspace-v3"] .organization-tree-editor {
  align-self: start;
  width: 100%;
  max-height: calc(100dvh - 190px);
  overflow: auto;
}

body[data-ui-theme="macos-workspace-v3"] .organization-tree-editor-body {
  padding-bottom: 64px;
}

body[data-ui-theme="macos-workspace-v3"] .organization-tree-editor-head strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

:root[data-color-scheme="dark"] body[data-ui-theme="macos-workspace-v3"] .cloud-ledger-state {
  color: var(--mac-v3-label);
  background: var(--mac-v3-surface);
  border-color: var(--mac-v3-separator);
}

:root[data-color-scheme="dark"] body[data-ui-theme="macos-workspace-v3"] .cloud-ledger-state-head strong {
  color: var(--mac-v3-label);
}

:root[data-color-scheme="dark"] body[data-ui-theme="macos-workspace-v3"] .cloud-ledger-state-head small {
  color: var(--mac-v3-label-secondary);
}

:root[data-color-scheme="dark"] body[data-ui-theme="macos-workspace-v3"] .cloud-ledger-skeleton i {
  background: var(--mac-v3-surface-muted);
}

@media (min-width: 761px) {
  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) .project-ledger .module-ledger-table tbody tr,
  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) .contract-ledger-table .module-ledger-table tbody tr {
    height: auto !important;
    min-height: 0 !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) :is(.project-ledger, .contract-ledger-table) .module-ledger-table :is(th, td) {
    padding: 4px 8px !important;
    line-height: 1.25 !important;
    vertical-align: top !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main :is(.project-ledger, .contract-ledger-table) :is(.ledger-record-cell, .ledger-metric-stack) {
    gap: 2px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) :is(.project-ledger, .contract-ledger-table) :is(.ledger-metric-link, .ledger-static-metric) {
    min-height: 17px !important;
    line-height: 1.2 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main :is(.project-ledger, .contract-ledger-table) .ledger-record-link {
    line-height: 1.3 !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main .contract-ledger-table .ledger-record-cell > :is(.ledger-record-context, .ledger-record-number, small) {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main .contract-ledger-table .ledger-record-cell > *,
  body[data-ui-theme="macos-workspace-v3"] .erp-main .contract-ledger-table .ledger-party-cell > * {
    min-width: 0;
    max-width: 100%;
    min-height: 0 !important;
    padding-block: 0 !important;
    overflow: hidden;
    font-size: 12px !important;
    line-height: 15px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main .contract-ledger-table .ledger-record-link {
    display: block !important;
    height: 15px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) .contract-ledger-table .module-ledger-table .ledger-record-cell > :is(.ledger-record-context, .ledger-record-link, .ledger-record-number, small),
  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) .contract-ledger-table .module-ledger-table .ledger-party-cell > :is(strong, span, small) {
    line-height: 15px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-main .contract-ledger-table :is(.ledger-party-cell, .ledger-status-cell) {
    gap: 2px !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 760px) {
  /* Approval opens as a full-screen task. The application dock must not cover its controls. */
  body[data-ui-theme="macos-workspace-v3"]:has(.flow-record-preview-panel.is-approval-mode) .erp-sidebar {
    display: none !important;
  }

  body[data-ui-theme="macos-workspace-v3"]:has(.flow-record-preview-panel.is-approval-mode) .erp-shell {
    padding-bottom: 0 !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.is-comment-open,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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.is-comment-open {
    height: auto !important;
    min-height: 262px !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.is-comment-open > .flow-approval-decision-panel,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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.is-comment-open > .flow-approval-decision-panel {
    height: auto !important;
    min-height: 156px !important;
    padding: 8px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open .flow-approval-comment-field {
    max-height: 150px !important;
    padding: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open .flow-approval-comment-field > span,
  body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open .flow-approval-comment-field > textarea {
    grid-column: 1 / -1 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open .flow-approval-comment-field > textarea {
    min-height: 56px !important;
    max-height: 56px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open .flow-approval-comment-field > :is(.flow-approval-opinion-upload, .table-action) {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .erp-sidebar .module-nav.ui-system-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="approval"] .erp-sidebar .module-nav button[data-mobile-primary][data-view="workbench"] {
    display: flex !important;
  }

  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="approval"] .erp-sidebar .module-nav button[data-mobile-primary]:not([data-view="workbench"]),
  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="approval"] .erp-sidebar .module-nav #mobile-more-toggle {
    display: none !important;
  }

  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="boss"] .erp-sidebar .module-nav.ui-system-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="boss"] .erp-sidebar .module-nav button[data-mobile-primary][data-view="finance"] {
    display: flex !important;
  }

  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="boss"] .erp-sidebar .module-nav button[data-mobile-primary][data-view="projects"],
  body[data-ui-theme="macos-workspace-v3"][data-mobile-access-mode="boss"] .erp-sidebar .module-nav #mobile-more-toggle {
    display: none !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-backdrop.is-workspace .flow-record-preview-panel.is-approval-mode {
    width: 100dvw !important;
    max-width: 100dvw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-reference-approval-document {
    padding-inline: 6px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode :is(
    .flow-approval-payment-table-shell,
    .flow-approval-attachment-table-shell,
    .flow-reference-document-table-shell
  ) {
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
  }

  body[data-ui-theme="macos-workspace-v3"] :is(
    .project-subtabs,
    .finance-subnav,
    .organization-subtabs,
    .contract-ledger-group-switch,
    .construction-log-day-rail
  ) {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  body[data-ui-theme="macos-workspace-v3"] .view-semantic-title {
    min-width: 0;
    max-width: 100%;
  }

  body[data-ui-theme="macos-workspace-v3"] .view-semantic-title h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body[data-ui-theme="macos-workspace-v3"] .organization-tree-editor {
    position: static;
    max-height: none;
    overflow: visible;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-record-preview-panel.is-approval-mode .flow-record-preview-layout {
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  /* Mobile approval toolbar final authority. */
  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,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !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,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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 {
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 44px !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    overflow: visible !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 .table-action,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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 .table-action {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding-inline: 8px !important;
    border-radius: 6px !important;
    line-height: 42px !important;
    white-space: nowrap;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar .flow-approval-more {
    width: 100%;
    min-width: 0;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar .flow-approval-more-menu {
    position: absolute !important;
    right: 0;
    bottom: calc(100% + 6px);
    width: min(180px, calc(100vw - 24px));
  }

  html body[data-ui-theme="macos-workspace-v3"] .erp-main .view-root:not(.workbench-page) .project-ledger [data-project-preview].ledger-record-link {
    display: -webkit-box !important;
    box-sizing: border-box;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding-block: 4px !important;
    overflow: hidden !important;
    line-height: 18px !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .erp-main .finance-ledger-switch > button {
    min-height: 44px !important;
    padding-block: 8px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .project-document-library-title {
    align-items: flex-start;
  }

  body[data-ui-theme="macos-workspace-v3"] .project-document-title-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* Flow ledger amount totals use the complete status-filtered result set. */
body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-height: 42px;
  padding: 4px 6px;
}

.flow-ledger-primary-actions,
.flow-ledger-filter-controls,
.flow-ledger-secondary-actions,
.flow-ledger-toolbar-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.flow-ledger-primary-actions,
.flow-ledger-secondary-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.flow-ledger-filter-controls {
  flex: 0 1 auto;
  gap: 8px;
}

body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar .flow-ledger-filter-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar .flow-ledger-filter-controls label > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar select[data-flow-ledger-status] {
  width: 96px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding-inline: 8px !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar select[data-flow-ledger-sort] {
  width: 124px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding-inline: 8px !important;
}

body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar :is(.flow-ledger-primary-actions, .flow-ledger-secondary-actions) .table-action {
  width: auto;
  min-width: 52px;
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.flow-ledger-toolbar-meta {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.flow-ledger-amount-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0;
  color: #5f6d7b;
  white-space: nowrap;
}

.flow-ledger-amount-summary > span,
.flow-ledger-count {
  font-size: 12px;
  line-height: 1.2;
}

.flow-ledger-amount-summary > strong {
  color: #123d73;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

:root[data-color-scheme="dark"] .flow-ledger-amount-summary {
  color: #cbd5e1;
}

:root[data-color-scheme="dark"] .flow-ledger-amount-summary > strong {
  color: #8ec5ff;
}

@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "primary secondary"
      "filters filters"
      "meta meta";
    gap: 6px;
    min-height: 0;
    padding: 6px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-primary-actions {
    grid-area: primary;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-secondary-actions {
    grid-area: secondary;
  }

  body[data-ui-theme="macos-workspace-v3"] :is(.flow-ledger-primary-actions, .flow-ledger-secondary-actions) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar :is(.flow-ledger-primary-actions, .flow-ledger-secondary-actions) .table-action {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding-inline: 6px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-filter-controls {
    grid-area: filters;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar .flow-ledger-filter-controls label {
    display: grid;
    gap: 3px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar .flow-ledger-filter-controls select {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar-meta {
    grid-area: meta;
    justify-content: space-between;
    gap: 8px;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px solid #dfe4ea;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-amount-summary {
    gap: 6px;
  }

  body[data-ui-theme="macos-workspace-v3"] .flow-ledger-count {
    justify-self: auto;
  }
}

:root[data-color-scheme="dark"] body[data-ui-theme="macos-workspace-v3"] .flow-ledger-toolbar-meta {
  border-color: #465569;
}

/* Cashier flow-document layout 2026-09-03 */
body[data-ui-theme="macos-workspace-v3"] .cashier-workspace {
  width: min(100%, 1320px);
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-inline: auto;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-workspace > .panel {
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 4px !important;
  box-shadow: none !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-workspace .panel-title {
  min-height: 40px !important;
  padding: 6px 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-workspace .panel-title > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-workspace .panel-title > div > span {
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border-top: 1px solid #d8dde6;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid > .context-card {
  min-width: 0;
  min-height: 62px !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-right: 1px solid #e2e6ec !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid > .context-card:last-child {
  border-right: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid :is(strong, span, small) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-queue {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-section {
  min-width: 0;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-section + .cashier-source-section {
  border-top: 8px solid #eef1f5;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-section > .flow-section-title {
  min-height: 34px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 !important;
  padding: 6px 10px !important;
  border-top: 1px solid #d8dde6 !important;
  border-bottom: 1px solid #d8dde6 !important;
  background: #f2f2f2 !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-section > .flow-section-title span {
  color: #6e7681;
  font-size: 11px;
  font-weight: 500;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-table-shell {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0 !important;
  scrollbar-gutter: stable;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-table {
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-table :is(th, td) {
  height: 34px !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  overflow: hidden;
  font-size: 12px !important;
  line-height: 1.3 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-table .table-action {
  min-height: 26px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-entry-panel {
  padding: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-document-head {
  position: relative;
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 12px 190px;
  border-bottom: 1px solid #d8dde6;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-document-head h2 {
  margin: 0;
  color: #1f2329;
  font-family: var(--erp-ui-font, "Source Han Sans SC", "PingFang SC", sans-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > span,
body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > small {
  position: absolute;
  top: 50%;
  max-width: 170px;
  overflow: hidden;
  color: #7f8792;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > span {
  left: 16px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > small {
  right: 16px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 16px;
  border-top: 1px solid #d8dde6;
  border-left: 1px solid #d8dde6;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta > div {
  min-width: 0;
  min-height: 36px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  border-right: 1px solid #d8dde6;
  border-bottom: 1px solid #d8dde6;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta :is(span, strong) {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta span {
  justify-content: flex-end;
  border-right: 1px solid #e4e8ee;
  color: #1f2329;
  font-weight: 500;
  text-align: right;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta strong {
  overflow: hidden;
  color: #1f2329;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .flow-section-title {
  width: auto !important;
  min-height: 34px !important;
  margin: 8px 16px 0 !important;
  padding: 6px 10px !important;
  border: 1px solid #d8dde6 !important;
  background: #f2f2f2 !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact {
  width: auto !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 !important;
  margin: 0 16px 8px;
  padding: 0 !important;
  border-left: 1px solid #d8dde6;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label {
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  min-height: 36px;
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid #d8dde6 !important;
  border-bottom: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label > span {
  min-width: 0;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  border-right: 1px solid #e4e8ee;
  color: #1f2329 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: right;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label :is(input, select, textarea) {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label :is(input, select) {
  height: 35px !important;
  min-height: 35px !important;
  padding: 0 8px !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label :is(input, select, textarea):focus {
  position: relative;
  z-index: 1;
  outline: 1px solid #168cff !important;
  outline-offset: -1px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label.field-wide,
body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > .cashier-voucher-control {
  width: auto !important;
  max-width: none !important;
  grid-column: 1 / -1;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label.field-wide textarea {
  min-height: 70px !important;
  padding: 7px 8px !important;
  resize: vertical;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .cashier-voucher-control {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid #d8dde6 !important;
  border-bottom: 1px solid #d8dde6 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .cashier-voucher-control > span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #e4e8ee;
  background: #f2f2f2;
  color: #1f2329;
  font-size: 12px;
  font-weight: 700;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .queued-attachment-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .queued-attachment-toolbar small {
  color: #6e7681;
  font-size: 11px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .form-actions {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 !important;
  padding: 8px 16px !important;
  border-top: 1px solid #d8dde6;
  background: #ffffff;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .form-actions .table-action.primary {
  min-width: 128px;
}

body[data-ui-theme="macos-workspace-v3"] .cashier-ledger-panel > .data-table-shell {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 1100px) {
  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] .cashier-workspace {
    gap: 8px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid > .context-card:nth-child(2n) {
    border-right: 0 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-overview-panel .cashier-summary-grid > .context-card:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #e2e6ec !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-document-head {
    min-height: 58px;
    padding: 10px 72px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-document-head h2 {
    font-size: 18px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > span {
    left: 10px;
    max-width: 60px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-document-head > small {
    right: 10px;
    max-width: 60px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta {
    grid-template-columns: minmax(0, 1fr);
    margin-inline: 10px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta > div:last-child {
    grid-column: auto;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-meta > div,
  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .flow-section-title {
    margin-inline: 10px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 0 !important;
    margin-inline: 10px;
    padding: 0 !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label :is(input, select) {
    height: 43px !important;
    min-height: 43px !important;
    font-size: 14px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .form-grid.compact > label > span {
    min-height: 43px;
    font-size: 13px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document .queued-attachment-toolbar {
    min-height: 88px;
    flex-direction: column;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .form-actions {
    min-height: 60px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-flow-document > .form-actions .table-action.primary {
    width: 100%;
    min-height: 44px;
  }

  body[data-ui-theme="macos-workspace-v3"] .cashier-source-table .table-action {
    width: fit-content !important;
    max-width: 100%;
    justify-self: start;
  }
}

/* Payment recipient account autofill 2026-09-03 */
body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .form-grid > .payment-recipient-fields {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 !important;
  min-width: 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .form-grid > .payment-recipient-fields[hidden] {
  display: none !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field {
  display: grid !important;
  grid-template-columns: minmax(96px, var(--form-label-width, 112px)) minmax(0, 1fr) !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: var(--form-control-height, 38px) !important;
  margin: 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field > span {
  min-width: 0;
  padding: 0 !important;
  color: var(--form-text, #24364b) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: right !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field > input {
  width: 100%;
  min-width: 0;
  height: var(--form-control-height, 38px) !important;
  min-height: var(--form-control-height, 38px) !important;
  padding: 3px 8px !important;
  color: var(--form-text, #24364b) !important;
  background: transparent !important;
  border: 1px solid var(--form-border, #cfd6df) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field > input[readonly] {
  color: var(--form-muted, #667085) !important;
  border-color: #dbe1e8 !important;
}

@media (max-width: 1100px) {
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .form-grid > .payment-recipient-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .form-grid > .payment-recipient-fields {
    grid-template-columns: 1fr;
  }

  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field,
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field:last-child {
    grid-column: auto;
    grid-template-columns: minmax(92px, 104px) minmax(0, 1fr) !important;
    min-height: 44px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form .payment-recipient-field > input {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 14px !important;
  }
}

/* Second-round residual UI authority 2026-09-03 */
@media (max-width: 760px) {
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form :is(
    button,
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea,
    summary
  ) {
    min-height: 44px !important;
  }

  body[data-ui-theme="macos-workspace-v3"] .attachment-image-preview-head > button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

@media (max-height: 560px) {
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) form#flow-form > .form-actions {
    position: static !important;
  }
}

/* Approval decision bar interaction authority 2026-09-06 */
html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar {
  isolation: isolate;
  overflow: visible !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-decision-summary {
  min-width: 0;
  min-height: 54px;
  padding: 7px 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(0, 2.8fr);
  align-items: stretch;
  gap: 12px;
  border-bottom: 1px solid #dfe5ec;
  background: #f7f9fb;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-subject {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-subject > span,
html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary dt {
  color: #667386;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-subject > strong {
  min-width: 0;
  overflow: hidden;
  color: #17263a;
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary > dl {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary > dl > div {
  min-width: 0;
  padding: 0 10px;
  display: grid;
  align-content: center;
  gap: 1px;
  border-left: 1px solid #e1e6ed;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary :is(dt, dd) {
  min-width: 0;
  margin: 0;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary dd {
  overflow: hidden;
  color: #25364b;
  font-size: 12px;
  font-weight: 620;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary dd.is-money {
  color: #123d73;
  font-variant-numeric: tabular-nums;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary .is-pass dd {
  color: #147a55;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary .is-warning dd {
  color: #8a5a12;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary .is-danger dd {
  color: #b42318;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-decision-panel {
  padding: 0 12px !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar .flow-approval-comment-field {
  max-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar:is(.is-comment-open, :has(textarea.is-invalid)) .flow-approval-comment-field {
  max-height: 104px !important;
  padding: 8px 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(112px, 168px)) !important;
  grid-template-rows: 32px !important;
  justify-content: end !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
  border: 0 !important;
  background: #fff !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions .table-action {
  width: 100% !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 30px !important;
  white-space: nowrap;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more {
  position: relative;
  min-width: 0;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  width: 152px;
  padding: 4px;
  display: grid;
  gap: 2px;
  border: 1px solid #d2d9e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 42, 61, 0.16);
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu[hidden] {
  display: none !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu > button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #25364b;
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu > button:is(:hover, :focus-visible) {
  outline: none;
  background: #eef4fd;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu > button.is-danger {
  color: #b42318;
}

@media (max-width: 760px) {
  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-decision-summary {
    min-height: 0;
    padding: 7px 8px;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary > dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 4px;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary > dl > div {
    padding: 0 7px;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-decision-summary > dl > div:nth-child(odd) {
    border-left: 0;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar.is-comment-open > .flow-approval-decision-summary {
    display: none;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar:is(.is-comment-open, :has(textarea.is-invalid)) .flow-approval-comment-field {
    max-height: 174px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions {
    min-height: 56px !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 44px !important;
    justify-content: stretch !important;
    gap: 6px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions .table-action {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    line-height: 42px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more {
    width: 100%;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu {
    right: 0;
    bottom: calc(100% + 6px);
    width: min(180px, calc(100vw - 24px));
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-approval-more-menu > button {
    min-height: 44px;
    font-size: 14px;
  }
}

/* Keep all direct approval decisions in the single declared action row. */
html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions > .table-action {
  grid-column: auto !important;
  grid-row: auto !important;
  order: 0 !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions > .flow-approval-more {
  width: 100% !important;
  min-width: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
  order: 0 !important;
}

html body[data-ui-theme="macos-workspace-v3"] .flow-reference-approval-toolbar > .flow-approval-actions > .flow-approval-more > [data-flow-approval-more-toggle] {
  width: 100% !important;
}

/* Approval action row cascade authority 2026-09-06 */
@media (max-width: 760px) {
  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,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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,
  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.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-reference-approval-toolbar {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !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,
  html body[data-ui-theme="macos-workspace-v3"] .global-overlay-root .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,
  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.is-decision-mode .flow-record-preview-layout.has-approval-workbench.is-stacked-approval > .flow-reference-approval-toolbar > .flow-approval-actions {
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 44px !important;
    grid-auto-flow: row !important;
  }
}
