/* Shared choices and the accounting sales workspace. Keep popup controls on one surface. */
@media screen {
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel {display:flex!important;flex-direction:column;gap:8px;padding:12px!important;border:1px solid var(--ui-border)!important;border-radius:20px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;box-shadow:0 16px 48px rgb(14 12 25 / 16%)!important;overflow:hidden!important;direction:rtl;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-select-panel-heading {display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:3px 3px 9px!important;margin:0!important;border-bottom:1px solid var(--ui-border);}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-select-panel-heading strong {font:700 12px/1.8 var(--ui-font)!important;color:var(--ui-text);}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-select-count {background:var(--ui-surface-alt)!important;color:var(--ui-muted)!important;padding:3px 8px!important;border-radius:8px!important;font:500 10px/1.8 var(--ui-font)!important;width:auto!important;min-width:0!important;height:auto!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options {display:flex!important;flex-direction:column;gap:4px!important;min-height:0;overflow:auto!important;max-height:min(448px,62dvh)!important;padding:1px!important;scrollbar-width:thin;scrollbar-color:var(--ui-border) transparent;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options::-webkit-scrollbar {width:4px;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options::-webkit-scrollbar-button {display:none;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options>.qp-choice-option {display:grid!important;grid-template-columns:minmax(0,1fr) 20px!important;align-items:center!important;gap:10px!important;flex:none!important;width:100%!important;min-height:46px!important;height:auto!important;margin:0!important;padding:7px 10px!important;border:1px solid transparent!important;border-radius:12px!important;background:transparent!important;color:var(--ui-text)!important;box-shadow:none!important;text-align:right!important;outline:0!important;transition:background-color .12s,border-color .12s;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options>.qp-choice-option.has-icon {grid-template-columns:32px minmax(0,1fr) 20px!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options>.qp-choice-option:hover {background:var(--ui-surface-alt)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options>.qp-choice-option.is-selected {background:var(--ui-primary-soft)!important;color:var(--ui-primary)!important;border-color:color-mix(in srgb,var(--ui-primary) 18%,transparent)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-options>.qp-choice-option:focus-visible {border-color:var(--ui-primary)!important;box-shadow:inset 0 0 0 1px var(--ui-primary)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-icon {display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--ui-surface-alt);color:var(--ui-muted);}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .is-selected .qp-choice-icon {background:var(--ui-surface);color:var(--ui-primary);}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-icon i {position:static!important;width:auto!important;height:auto!important;background:none!important;padding:0!important;font-size:14px!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-label {display:grid;gap:2px;min-width:0;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-label strong {color:inherit!important;font:600 12px/1.8 var(--ui-font)!important;white-space:normal!important;overflow-wrap:anywhere;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-label small {color:var(--ui-muted);font:400 11px/1.7 var(--ui-font)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-check {display:grid;place-items:center;width:20px;color:var(--ui-primary);font-size:12px;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-choice-check i {position:static!important;width:auto!important;height:auto!important;background:none!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel .qp-v12-select-search {display:flex!important;align-items:center;flex:0 0 44px;gap:9px!important;margin:0!important;padding:0 12px!important;height:44px!important;min-height:44px!important;border:1px solid var(--ui-border)!important;border-radius:14px!important;background:var(--ui-input,var(--ui-surface))!important;box-shadow:0 2px 5px rgb(28 16 39 / 3%)!important;outline:0!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel .qp-v12-select-search:focus-within {border-color:var(--ui-primary)!important;box-shadow:0 0 0 3px var(--ui-primary-soft)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel .qp-v12-select-search input,
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel .qp-v12-select-search input:is(:focus,:focus-visible) {display:block!important;width:100%!important;min-width:0!important;height:40px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;font:500 13px/1.6 var(--ui-font)!important;color:var(--ui-text)!important;}
 html[data-theme] body .bf-select.qp-v12-select.qp-choice .qp-v12-select-panel .qp-v12-select-search>i {position:static!important;transform:none!important;inset:auto!important;font-size:14px!important;color:var(--ui-muted)!important;flex:none;}
 html[data-theme] body .bf25-unified-sales .si-grid-heading {padding:20px!important;gap:16px!important;background:var(--ui-surface)!important;border-bottom:0!important;}
 html[data-theme] body .bf25-unified-sales .si-grid-heading h2 {font:800 15px/1.8 var(--ui-font)!important;display:flex;gap:9px;align-items:center;}
 html[data-theme] body .bf25-unified-sales .si-grid-heading h2>span {padding:3px 9px!important;border-radius:8px!important;background:var(--ui-primary-soft)!important;color:var(--ui-primary)!important;font-size:11px!important;}
 html[data-theme] body .bf25-unified-sales .bf7-table {min-width:1250px!important;table-layout:auto!important;border-spacing:0 7px!important;}
 html[data-theme] body .bf25-unified-sales .bf7-table thead th {white-space:nowrap!important;border-inline-end:1px solid var(--ui-border)!important;font-weight:650!important;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td {border-inline-end:1px solid var(--ui-border)!important;vertical-align:middle!important;height:68px!important;font-size:12px!important;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="index"] {color:var(--ui-muted);width:40px;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="select"] {width:42px;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="customer"] {min-width:200px;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="subject"] {min-width:180px;max-width:260px;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td:is([data-col="total"],[data-col="received"],[data-col="remaining"],[data-col="discount"],[data-col="returned"]) {text-align:left!important;min-width:140px;white-space:nowrap!important;font-variant-numeric:tabular-nums;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="received"] {background:color-mix(in srgb,var(--ui-success) 3%,var(--ui-surface))!important;}
 html[data-theme] body .bf25-unified-sales .bf7-table tbody td[data-col="remaining"] {background:color-mix(in srgb,var(--ui-primary) 3%,var(--ui-surface))!important;}
 html[data-theme] body .bf25-unified-sales .bf29-grid-link {display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:5px 3px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:var(--ui-primary)!important;box-shadow:none!important;font:700 12px/1.8 var(--ui-font)!important;cursor:pointer;text-align:right;}
 html[data-theme] body .bf25-unified-sales .bf29-grid-link:hover {background:var(--ui-primary-soft)!important;text-decoration:underline;text-underline-offset:4px;}
 html[data-theme] body dialog.bf29-preview-dialog {width:min(1080px,calc(100vw - 28px));border-radius:24px!important;}
 html[data-theme] body .bf29-preview-hero {display:flex;align-items:center;gap:16px;padding:20px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-primary-soft);}
 html[data-theme] body .bf29-preview-hero h3 {font-size:19px;font-weight:800;margin:0 0 6px;}
 html[data-theme] body .bf29-preview-hero p {font-size:12px;color:var(--ui-muted);margin:0;line-height:1.9;}
 html[data-theme] body .bf29-preview-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0;}
 html[data-theme] body .bf29-preview-metrics>div {padding:16px;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface-alt);display:grid;gap:8px;}
 html[data-theme] body .bf29-preview-metrics :is(span,small) {font-size:11px;color:var(--ui-muted);}
 html[data-theme] body .bf29-preview-metrics strong {font-size:18px;font-weight:800;}
 html[data-theme] body .bf29-preview-facts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:16px 0;padding:4px 16px;border:1px solid var(--ui-border);border-radius:16px;}
 html[data-theme] body .bf29-preview-facts>div {padding:12px;display:grid;gap:6px;min-width:0;}
 html[data-theme] body .bf29-preview-facts dt {font-size:11px;color:var(--ui-muted);font-weight:500;}
 html[data-theme] body .bf29-preview-facts dd {font-size:12px;margin:0;overflow-wrap:anywhere;}
 html[data-theme] body .bf29-preview-table {overflow:auto;border:1px solid var(--ui-border);border-radius:16px;margin-top:18px;}
 html[data-theme] body .bf29-preview-table table {width:100%;min-width:620px;border-collapse:collapse;text-align:right;font-size:12px;}
 html[data-theme] body .bf29-preview-table th {background:var(--ui-surface-alt);padding:12px;color:var(--ui-muted);white-space:nowrap;}
 html[data-theme] body .bf29-preview-table td {padding:12px;border-top:1px solid var(--ui-border);border-inline-end:1px solid var(--ui-border);}
 html[data-theme] body .bf29-preview-dialog .qp-financial-dialog__footer :is(button,a) {display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:44px;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-surface);color:var(--ui-text);font:600 12px/1.6 var(--ui-font);}
 @media(max-width:700px) {
  html[data-theme] body .bf29-preview-metrics {grid-template-columns:1fr;gap:8px;}
  html[data-theme] body .bf29-preview-facts {grid-template-columns:repeat(2,minmax(0,1fr));padding:4px;}
 }
 @media(prefers-reduced-motion:reduce) {.qp-choice-option,.si-status-tab {transition:none!important;}}
}

@media screen {
 .bf29-preview-symbol {display:grid;place-items:center;flex:none;width:56px;height:56px;border-radius:17px;background:var(--ui-surface);color:var(--ui-primary);font-size:23px;}
 .bf29-preview-hero small {font-size:11px;color:var(--ui-muted);display:block;margin-bottom:6px;}
 .bf29-preview-section-title {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:22px;}
 .bf29-preview-section-title h3 {font-size:14px;font-weight:750;margin:0;}.bf29-preview-section-title>span {font-size:11px;color:var(--ui-muted);}
 .bf29-preview-note,.bf29-preview-description {font-size:12px;line-height:1.9;color:var(--ui-muted);padding:12px 15px;border-radius:12px;background:var(--ui-surface-alt);margin:14px 0;}
 .bf29-preview-facts .is-wide {grid-column:1 / -1;}.bf29-preview-table .is-numeric {white-space:nowrap;text-align:left;min-width:110px;}
 .bf29-preview-table tfoot {background:var(--ui-surface-alt);font-weight:750;}.bf29-preview-table tfoot th {padding:14px;}
 .bf29-preview-dialog .bf29-grid-link {display:inline-flex;align-items:center;gap:8px;padding:4px 0;border:0;background:transparent;color:var(--ui-primary);font:600 12px/1.8 var(--ui-font);}
 .bf29-cell-muted {font-size:11px;color:var(--ui-muted);}
 .bf29-tax-next {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px;padding:16px;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface-alt);}
 .bf29-tax-next strong {font-size:12px;}.bf29-tax-next p {font-size:11px;line-height:1.9;color:var(--ui-muted);margin:5px 0 0;}
 .bf29-tax-next a {display:inline-flex;gap:8px;align-items:center;flex:none;padding:10px 13px;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface);color:var(--ui-primary);font-size:12px;font-weight:650;}
 @media(max-width:600px){.bf29-tax-next {align-items:stretch;flex-direction:column;}.bf29-tax-next a {justify-content:center;}}
}

/* Studio 30: unified pillow controls, analytical ledger table and case-file cards.
   Semantic theme values are authoritative; no changes to public pages or print templates. */
@media screen {
 html[data-theme] body .qp-app-shell {
  --bf30-radius:14px; --bf30-control-height:43px;
  --bf30-pillow:inset 0 1px 0 rgb(255 255 255 / 58%),0 2px 4px rgb(48 24 58 / 5%),0 5px 14px rgb(48 24 58 / 5%);
  --bf30-pressed:inset 0 2px 5px rgb(48 24 58 / 12%);
  --bf30-sticky-bg:var(--ui-surface);
 }
 html[data-theme="dark"] body .qp-app-shell {
  --bf30-pillow:inset 0 1px 0 rgb(255 255 255 / 7%),0 3px 10px rgb(0 0 0 / 22%);
  --bf30-pressed:inset 0 2px 6px rgb(0 0 0 / 30%);
 }
 /* Alias existing button families to one semantic system, excluding table-sort and picker rows. */
 html[data-theme] body .qp-app-shell :is(.bf7-button,.bf-doc-button,.bf24-ui-btn,.qp-v12-button,.people-primary,.people-secondary,.qp-btn-save,.qp-btn-approve,.qp-btn-primary,.qp-btn-secondary,.qp-btn-cancel,.qp-financial-primary,.qp21-save-final,.qp21-save-draft,.qp20-dialog-cancel,.qp30-button,.btn-primary,.btn-outline-primary,.btn-light,.hr-btn-ghost,.rz-button:not(.rz-button-icon-only)) {
  min-height:var(--bf30-control-height)!important; border-radius:var(--bf30-radius)!important;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 15px; font-family:var(--ui-font)!important;font-size:12px!important;font-weight:650!important;line-height:1.65;
  background-image:none!important;border:1px solid var(--ui-border)!important;
  color:var(--ui-text);background-color:var(--ui-surface);text-decoration:none;
  box-shadow:var(--bf30-pillow)!important;
  transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease,transform .14s ease;
 }
 html[data-theme] body .qp-app-shell :is(.bf7-primary,.bf-doc-button.is-primary,.qp-v12-button.primary,.people-primary,.qp-btn-save,.qp-btn-approve,.qp-btn-primary,.qp-financial-primary,.qp21-save-final,.qp30-button.primary,.btn-primary) {
  background-color:var(--ui-primary)!important;color:var(--ui-on-primary)!important;border-color:var(--ui-primary)!important;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 22%),0 3px 5px color-mix(in srgb,var(--ui-primary) 14%,transparent),0 7px 18px color-mix(in srgb,var(--ui-primary) 15%,transparent)!important;
 }
 html[data-theme] body .qp-app-shell :is(.bf7-button,.bf-doc-button,.qp-v12-button,.people-primary,.people-secondary,.qp30-button):hover:not(:disabled) {border-color:var(--ui-primary)!important;transform:translateY(-1px)}
 html[data-theme] body .qp-app-shell :is(.bf7-button,.bf-doc-button,.qp-v12-button,.qp30-button):active:not(:disabled) {transform:translateY(0);box-shadow:var(--bf30-pressed)!important}
 html[data-theme] body .qp-app-shell :is(.bf7-button,.bf-doc-button,.qp-v12-button,.qp30-button):disabled {opacity:.5;box-shadow:none!important;transform:none;cursor:not-allowed}
 html[data-theme] body .qp-app-shell :is(a,button,input,select,textarea,[role="combobox"]):focus-visible {outline:2px solid var(--ui-primary)!important;outline-offset:3px}
 html[data-theme] body .qp-app-shell :is(.bf7-icon-link,.bf-doc-icon,.qp-grid-actions__trigger,.qp-v12-icon-button,.bf26-row-actions>a) {
  display:inline-grid;place-items:center;width:35px;min-width:35px;height:35px;min-height:35px;
  padding:0!important;border-radius:11px!important;border:1px solid var(--ui-border)!important;
  background:var(--ui-surface)!important;color:var(--ui-primary)!important;box-shadow:var(--bf30-pillow)!important;
 }
 html[data-theme] body .qp-app-shell .qp-grid-actions__trigger>span {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 html[data-theme] body .qp-app-shell :is(.bf7-icon-link,.bf-doc-icon,.qp-v12-icon-button):hover {background:var(--ui-primary-soft)!important;border-color:var(--ui-primary)!important}
 html[data-theme] body .qp-app-shell .bf24-filterbar {padding:15px!important;border-radius:20px!important;border:1px solid var(--ui-border)!important;background:var(--ui-surface)!important;box-shadow:0 4px 18px rgb(35 20 48 / 4%)!important;min-width:0}
 html[data-theme] body .qp-app-shell .bf24-filter-main {display:flex!important;align-items:center!important;gap:10px;flex-wrap:wrap}
 html[data-theme] body .qp-app-shell .bf24-filter-search {flex:1 1 275px;min-width:180px;height:44px;border-radius:14px!important;background:var(--ui-input);box-shadow:inset 0 1px 3px rgb(32 20 40 / 4%)}
 html[data-theme] body .qp-app-shell .bf24-filter-primary {flex:1 1 225px;min-width:170px;max-width:320px}
 html[data-theme] body .qp-app-shell .bf24-filter-status {flex:0 1 170px;min-width:145px}
 html[data-theme] body .qp-app-shell .bf24-filter-advanced {margin-top:14px;padding-top:12px;border-top:1px dashed var(--ui-border)}
 html[data-theme] body .qp-app-shell .bf24-filter-advanced-head {display:none}
 html[data-theme] body .qp-app-shell :is(.bf7-advanced-grid,.bf26-collection-local-filters) {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(155px,1fr))!important;gap:12px!important;align-items:end}
 html[data-theme] body .qp-app-shell :is(.bf7-advanced-grid,.bf26-collection-local-filters) :is(label,.si-field>label) {font-size:11px;font-weight:650;color:var(--ui-muted)}
 html[data-theme] body .qp-app-shell :is(.bf7-advanced-grid,.bf26-collection-local-filters) input {min-width:0;width:100%;min-height:41px;border-radius:12px!important;border:1px solid var(--ui-border);background:var(--ui-input);color:var(--ui-text);padding:8px 11px;box-shadow:inset 0 1px 3px rgb(32 20 40 / 4%)}
 html[data-theme] body .qp-app-shell .bf24-view-toggle {margin-inline-start:auto;border-radius:14px!important;padding:4px;background:var(--ui-surface-alt);box-shadow:inset 0 1px 3px rgb(35 20 48 / 5%)}
 html[data-theme] body .qp-app-shell .bf24-view-toggle button {min-height:35px;border-radius:10px!important}
 html[data-theme] body .qp-app-shell .bf24-view-toggle button.is-active {background:var(--ui-surface)!important;box-shadow:var(--bf30-pillow)!important;border-color:var(--ui-border)!important;color:var(--ui-primary)!important}
 /* Concept 01: an analytical desk, clear numeric lanes and visible column filters. */
 html[data-theme] body .qp-app-shell .bf30-workspace :is(.si-grid-card,.bf-doc-records) {border-radius:20px!important;box-shadow:0 6px 24px rgb(38 20 48 / 5%)!important;overflow:hidden}
 html[data-theme] body .qp-app-shell .bf30-workspace :is(.si-grid-heading,.bf-doc-record-toolbar) {padding:16px 18px!important;border-bottom:1px solid var(--ui-border)!important;gap:12px}
 html[data-theme] body .qp-app-shell .bf30-workspace :is(.si-table-scroll,.bf-doc-table-scroll) {padding:0!important;max-width:100%;max-height:65dvh;overflow:auto;scrollbar-width:thin}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table {border-collapse:separate!important;border-spacing:0!important;min-width:1250px!important;width:100%;table-layout:auto!important;font-size:12px}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table thead th {position:sticky;top:0;z-index:3;height:48px!important;padding:12px!important;background:var(--ui-grid-head)!important;border:0!important;border-bottom:1px solid var(--ui-border)!important;color:var(--ui-muted);font-size:11px!important;font-weight:750!important;white-space:nowrap}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table thead th small {display:block;font-size:9px;font-weight:500;margin-top:3px;color:var(--ui-muted)}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table tbody td {padding:11px 12px!important;height:66px!important;background:var(--ui-surface)!important;border:0!important;border-bottom:1px solid var(--ui-grid-line)!important;border-radius:0!important;vertical-align:middle;color:var(--ui-text);font-size:12px!important}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table tbody tr:nth-child(even) td {background:color-mix(in srgb,var(--ui-surface-alt) 38%,var(--ui-surface))!important}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table tbody tr:hover td {background:var(--ui-grid-hover)!important}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table tbody tr.is-selected td {background:var(--ui-grid-selected)!important}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is([data-col="total"],[data-doc-col="total"]) {font-weight:800;font-size:13px!important;font-variant-numeric:tabular-nums;white-space:nowrap}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is([data-col="received"],[data-doc-col="settled"]) {color:var(--ui-success);font-variant-numeric:tabular-nums}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is([data-col="remaining"],[data-doc-col="remaining"]) {color:var(--ui-primary);font-weight:750;font-variant-numeric:tabular-nums}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is(.bf7-column-filters,.bf-doc-column-filters)>td {position:sticky;top:48px;z-index:2;height:44px;padding:6px 9px;background:var(--ui-surface-alt)!important;border-bottom:1px solid var(--ui-border)!important}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is(.bf7-column-filters,.bf-doc-column-filters) input {width:100%;min-width:80px;height:32px;padding:5px 9px;border:1px solid var(--ui-border);border-radius:9px;background:var(--ui-input);color:var(--ui-text);font-size:11px}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table :is([data-col="actions"],[data-doc-col="actions"]) {position:sticky;left:0;z-index:1;border-inline-start:1px solid var(--ui-border)!important;box-shadow:5px 0 12px rgb(26 15 30 / 4%);white-space:nowrap}
 /* The pinned actions column must retain its own header at every scroll position. */
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table thead tr:first-child>th:last-child {position:sticky!important;left:0!important;z-index:7;background:var(--ui-grid-head)!important;border-inline-start:1px solid var(--ui-border)!important;box-shadow:5px 0 12px rgb(26 15 30 / 4%)}
 html[data-theme] body .qp-app-shell .bf30-workspace .bf7-table .bf7-column-filters>td:last-child {left:0!important;z-index:6;background:var(--ui-surface-alt)!important;border-inline-start:1px solid var(--ui-border)!important}

 .bf30-table-totals :is(td,th) {padding:13px 12px!important;border-top:1px solid var(--ui-border)!important;background:var(--ui-primary-soft)!important;color:var(--ui-primary)!important;font-size:11px;font-weight:750;white-space:nowrap}
 .bf30-person-link {display:inline-flex;gap:7px;align-items:center;padding:3px 0;border:0;background:none;color:var(--ui-primary);font:750 12px/1.75 var(--ui-font);text-decoration:none;max-width:100%;text-align:right}
 .bf30-person-link i {font-size:10px;opacity:.55}.bf30-person-link:hover {text-decoration:underline;text-underline-offset:4px}.bf30-person-link:hover i {opacity:1}
 /* Concept 02: case-file cards with a distinct document spine and progressive balances. */
 html[data-theme] body .qp-app-shell .bf24-card-grid {grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:18px;padding:20px}
 html[data-theme] body .qp-app-shell .bf24-document-card {position:relative;border-radius:22px!important;border:1px solid var(--ui-border)!important;background:var(--ui-surface)!important;box-shadow:var(--bf30-pillow)!important;padding:18px!important;overflow:hidden;transition:border-color .15s,box-shadow .15s}
 html[data-theme] body .qp-app-shell .bf24-document-card:before {content:"";position:absolute;inset:20px 0 auto auto;width:4px;height:44px;border-radius:5px 0 0 5px;background:var(--ui-primary)}
 html[data-theme] body .qp-app-shell .bf24-document-card.is-selected {border-color:var(--ui-primary)!important;box-shadow:0 0 0 2px var(--ui-primary-soft),var(--bf30-pillow)!important}
 html[data-theme] body .qp-app-shell .bf24-card-head {gap:9px;align-items:flex-start}.bf24-card-headings>small{letter-spacing:0;font-size:10px}.bf24-card-number{font-size:16px!important}
 html[data-theme] body .qp-app-shell .bf24-card-party {padding:17px 0;margin-top:12px;border-top:1px dashed var(--ui-border)}
 html[data-theme] body .qp-app-shell .bf24-card-subject {min-height:60px;margin-bottom:12px;line-height:1.9;color:var(--ui-muted)}
 html[data-theme] body .qp-app-shell .bf24-card-financial {border-radius:16px!important;padding:15px!important;background:var(--ui-surface-alt)!important;box-shadow:inset 0 1px 4px rgb(40 20 60 / 3%)}
 .bf24-card-total strong{font-size:19px!important}.bf24-card-settlement strong{font-size:13px!important}.bf24-card-progress{height:4px!important}
 html[data-theme] body .qp-app-shell .bf24-card-footer {border-top:0!important;padding-top:4px}.bf24-action-link{border-radius:11px!important;box-shadow:var(--bf30-pillow)}
 /* Real workspace rail/top bar; glass is limited to the navigation, not accounting data. */
 html[data-theme] body .qp-ws-toolbar {background:color-mix(in srgb,var(--ui-surface) 91%,transparent)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid var(--ui-border)!important;border-radius:21px!important;box-shadow:0 4px 18px rgb(32 16 40 / 5%)!important}
 html[data-theme] body :is(.qp-ws-nav-trigger,.qp-ws-icon-button,.qp-ws-company-trigger,.qp-ws-search-launcher) {border-radius:14px!important;box-shadow:var(--bf30-pillow);min-height:42px}
 html[data-theme] body .qp-ws-nav-trigger[aria-expanded="true"] {background:var(--ui-primary-soft)!important;color:var(--ui-primary)!important;box-shadow:var(--bf30-pressed)!important}
 html[data-theme] body :is(.qp-ws-nav-trigger,.qp-ws-company-trigger,[data-qp-popover-trigger])[aria-expanded="true"]>.qp-ws-caret {transform:rotate(180deg)}
 html[data-theme] body .qp-ws-caret {transition:transform .18s}
 html[data-theme] body :is(.qp-v12-rail,.qp-sidebar,.qp-ws-rail) {background:var(--ui-surface)!important;border-color:var(--ui-border)!important}
 html[data-theme] body :is(.qp-ws-nav-trigger,.qp-menu-link,.qp-v12-rail a,.qp-v12-rail button) {color:var(--ui-text);text-align:right;white-space:normal;line-height:1.75}
 html[data-theme] body .qp-menu-link {min-height:46px;border-radius:15px!important;padding:10px 13px;margin-bottom:5px;border:1px solid transparent}
 html[data-theme] body .qp-menu-link:hover {background:var(--ui-surface-alt)!important;border-color:var(--ui-border);box-shadow:var(--bf30-pillow)}
 html[data-theme] body .qp-menu-link.active {background:var(--ui-primary-soft)!important;color:var(--ui-primary)!important;border-color:var(--ui-border);box-shadow:var(--bf30-pressed)}
 html[data-theme] body .qp-menu-icon {display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--ui-surface-alt);color:var(--ui-primary)}
 html[data-theme] body .qp-menu-arrow {margin-inline-start:auto;font-size:10px}.qp-menu-toggle[aria-expanded="true"] .qp-menu-arrow {transform:rotate(180deg)}
 /* Dedicated journal preview: document metadata and balanced totals stay visible. */
 html[data-theme] body .bf30-journal-meta {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
 .bf30-journal-meta>div{display:grid;gap:7px;padding:12px 14px;border:1px solid var(--ui-border);border-radius:13px;background:var(--ui-surface)}
 .bf30-journal-meta dt{font-size:11px;color:var(--ui-muted);font-weight:500}.bf30-journal-meta dd{font-size:13px;font-weight:700;margin:0}
 .bf30-journal-balance {display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:14px 18px;border:1px solid color-mix(in srgb,var(--ui-success) 30%,var(--ui-border));background:var(--ui-success-soft);color:var(--ui-text);border-radius:14px;margin:14px 0}
 .bf30-journal-balance.is-unbalanced{border-color:var(--ui-danger);background:var(--ui-danger-soft)}
 .bf30-journal-balance>span{display:flex;align-items:center;gap:8px;font-size:12px}.bf30-journal-balance b{font-size:14px;font-variant-numeric:tabular-nums}
 .bf30-journal-balance>strong{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ui-success)}
 .bf30-journal-balance.is-unbalanced>strong{color:var(--ui-danger)}
 html[data-theme] body .bf29-preview-dialog .bf29-preview-table th{position:sticky;top:0;z-index:1}
 html[data-theme] body .bf29-preview-dialog .bf29-preview-table {max-height:48dvh;overflow:auto;border-radius:15px}
 html[data-theme] body .bf29-preview-dialog .bf29-preview-table tbody tr:nth-child(even){background:var(--ui-surface-alt)}
 /* Shared report readability, no recalculation or changes to printable financial values. */
 html[data-theme] body .qp-app-shell :is(.qp-report-page,.qp-financial-report,.report-workspace,.qp-report-workspace) {color:var(--ui-text)}
 html[data-theme] body .qp-app-shell :is(.qp-report-page,.qp-financial-report,.report-workspace,.qp-report-workspace) :is(.card,.qp-card,.qp-v12-card){background:var(--ui-surface)!important;border:1px solid var(--ui-border)!important;border-radius:18px!important;box-shadow:0 4px 20px rgb(30 20 40 / 4%)!important}
 html[data-theme] body .qp-app-shell :is(.qp-trial-table,.qp-vm-table,.payroll-table) th {background:var(--ui-grid-head)!important;color:var(--ui-muted)!important;border-color:var(--ui-border)!important}
 html[data-theme] body .qp-app-shell :is(.qp-trial-table,.qp-vm-table,.payroll-table) td {color:var(--ui-text);border-color:var(--ui-grid-line)!important;font-variant-numeric:tabular-nums}
 @media(max-width:900px){.bf30-journal-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important}.bf24-filter-search{flex-basis:100%!important}.bf24-filter-primary{max-width:none!important}.bf30-workspace .bf7-page-actions{gap:8px;flex-wrap:wrap}}
 @media(max-width:550px){html[data-theme] body .qp-app-shell .bf24-card-grid{padding:12px;gap:12px;grid-template-columns:1fr}.bf30-journal-meta{grid-template-columns:1fr!important}.bf30-journal-balance{align-items:stretch;gap:12px}.bf24-view-toggle{margin-inline-start:0!important}.bf24-filter-primary,.bf24-filter-status{flex:1 1 43%!important;min-width:135px!important}}
 @media(prefers-reduced-motion:reduce){.qp-app-shell :is(button,a,.qp-ws-caret){transition:none!important;transform:none!important}}
 @media(forced-colors:active){.qp-app-shell :is(button,a,.bf24-document-card){border:1px solid ButtonText!important;box-shadow:none!important}}
}

@media screen {
 .bf30-period-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:17px;margin:18px 0}
 .bf30-period-toolbar>label,.bf30-period-toolbar>div{display:grid;gap:6px;min-width:130px;font-size:12px;color:var(--ui-muted)}
 .bf30-period-toolbar input{min-height:42px;max-width:160px;padding:8px 12px;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-input);color:var(--ui-text)}
 .bf30-module-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:18px;margin:20px 0}
 .bf30-module-grid h2{display:flex;gap:9px;align-items:center;font-size:15px;font-weight:750;margin:0 0 18px}
 .bf30-checklist{display:grid;gap:10px}.bf30-checklist>a{display:flex;align-items:center;gap:12px;border:1px solid var(--ui-border);border-radius:14px;padding:13px;color:var(--ui-text);background:var(--ui-surface-alt);text-decoration:none}
 .bf30-checklist>a>span:nth-child(2){display:grid;gap:5px;flex:1}.bf30-checklist small,.bf30-module-links small{color:var(--ui-muted);font-size:11px;line-height:1.8}.bf30-checklist strong,.bf30-module-links strong{font-size:12px}
 .bf30-step{display:grid;place-items:center;height:34px;width:34px;border-radius:11px;background:var(--ui-primary-soft);color:var(--ui-primary);font-weight:800}
 .bf30-module-links{display:grid;gap:12px}.bf30-module-links>a{display:flex;gap:12px;align-items:center;border:1px solid var(--ui-border);padding:13px;border-radius:14px;color:var(--ui-text);text-decoration:none}.bf30-module-links>a>i{display:grid;place-items:center;height:38px;width:38px;flex:none;border-radius:12px;background:var(--ui-primary-soft);color:var(--ui-primary)}.bf30-module-links>a>span{display:grid;gap:6px}.bf30-module-note{font-size:11px;line-height:1.95;color:var(--ui-muted);padding:12px;background:var(--ui-surface-alt);border-radius:12px;margin-top:15px}
 .people-badges .shareholder{color:var(--ui-primary);background:var(--ui-primary-soft)}
 @media(max-width:850px){.bf30-module-grid{grid-template-columns:1fr}}
}

/* Studio 30 verified: bounded card layouts and the operational asset register. */
@media screen {
 html[data-theme] body .qp-app-shell .bf24-card-grid {display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))!important;gap:16px!important;padding:18px!important}
 html[data-theme] body .qp-app-shell .bf24-document-card {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;grid-template-areas:none!important;height:100%;min-width:0}
 html[data-theme] body .qp-app-shell .bf24-card-head {display:flex!important;align-items:flex-start!important;gap:10px!important;min-height:55px}
 html[data-theme] body .qp-app-shell .bf24-card-headings {flex:1;min-width:0}
 html[data-theme] body .qp-app-shell .bf24-card-status {display:flex!important;flex-wrap:wrap;flex:0 1 auto;max-width:48%;gap:5px!important;justify-content:flex-end}
 html[data-theme] body .qp-app-shell .bf24-card-party {display:flex!important;gap:10px;align-items:center;flex-wrap:wrap;padding:14px 0!important;margin-top:12px!important;border-top:1px dashed var(--ui-border)!important}
 html[data-theme] body .qp-app-shell .bf24-card-party>div {flex:1;min-width:0}
 html[data-theme] body .qp-app-shell .bf24-card-party time {flex-basis:100%;padding-inline-start:46px}
 html[data-theme] body .qp-app-shell .bf24-card-subject {flex:1;min-height:54px;margin:0 0 12px!important;overflow-wrap:anywhere}
 html[data-theme] body .qp-app-shell .bf24-card-financial {margin:0!important;padding:15px!important}
 html[data-theme] body .qp-app-shell .bf24-card-footer {display:flex!important;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding-top:14px!important}
 html[data-theme] body .qp-app-shell .bf24-card-footer>span {display:inline-flex!important;color:var(--ui-muted);font-size:10px;gap:5px}
 html[data-theme] body .qp-app-shell .bf24-card-actions {display:flex!important;flex-wrap:nowrap!important;gap:6px!important}
 html[data-theme] body .qp-app-shell .bf24-card-actions>.qp-grid-actions {width:auto!important}
 html[data-theme] body .qp-app-shell .bf24-card-actions>a {flex:initial!important;white-space:nowrap;font-size:11px}
 html[data-theme] body .qp-app-shell .bf30-assets {max-width:1610px;margin-inline:auto;min-width:0}
 .bf30-register-caption {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:18px 4px;font-size:12px;color:var(--ui-muted)}
 .bf30-register-caption>strong {font-size:14px;color:var(--ui-text)}
 .bf30-register-table {max-width:100%;overflow:auto;max-height:65dvh;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-surface);scrollbar-width:thin}
 .bf30-register-table table {border-collapse:separate;border-spacing:0;width:100%;min-width:1040px;text-align:right;font-size:12px}
 .bf30-register-table th {position:sticky;top:0;z-index:1;background:var(--ui-grid-head);color:var(--ui-muted);font-size:11px;font-weight:700;padding:14px 12px;white-space:nowrap;border-bottom:1px solid var(--ui-border)}
 .bf30-register-table td {padding:14px 12px;border-bottom:1px solid var(--ui-grid-line);color:var(--ui-text);vertical-align:middle}
 .bf30-register-table tbody tr:last-child td {border-bottom:0}
 .bf30-register-table tbody tr:nth-child(even) td {background:color-mix(in srgb,var(--ui-surface-alt) 45%,var(--ui-surface))}
 .bf30-register-table tbody tr:hover td {background:var(--ui-grid-hover)}
 .bf30-register-table td>strong,.bf30-register-table td>small {display:block}
 .bf30-register-table td>small {font-size:10px;margin-top:5px;color:var(--ui-muted)}
 .bf30-register-table .is-numeric {font-variant-numeric:tabular-nums;white-space:nowrap;text-align:left;font-weight:700}
 .bf30-neutral-badge {display:inline-flex;align-items:center;border:1px solid var(--ui-border);background:var(--ui-primary-soft);color:var(--ui-primary);padding:4px 9px;border-radius:9px;font-size:10px;white-space:nowrap}
 .bf30-asset-cards {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:16px}
 .bf30-asset-card {padding:20px;border:1px solid var(--ui-border);border-radius:22px;background:var(--ui-surface);box-shadow:var(--bf30-pillow);min-width:0}
 .bf30-asset-card header {display:flex;align-items:center;gap:10px}
 .bf30-asset-card header>div {flex:1;min-width:0}
 .bf30-asset-card h2 {font-size:15px;line-height:1.8;margin:3px 0;color:var(--ui-text);overflow-wrap:anywhere}
 .bf30-asset-card header small {font-size:10px;color:var(--ui-muted)}
 .bf30-asset-symbol {display:grid;place-items:center;flex:none;height:44px;width:44px;border-radius:14px;background:var(--ui-primary-soft);color:var(--ui-primary);font-size:18px}
 .bf30-asset-card dl {display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}
 .bf30-asset-card dt {font-size:10px;font-weight:500;color:var(--ui-muted)}
 .bf30-asset-card dd {font-size:12px;color:var(--ui-text);margin:6px 0 0;overflow-wrap:anywhere}
 .bf30-asset-cost {display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:15px;border-radius:14px;background:var(--ui-surface-alt)}
 .bf30-asset-cost>span {color:var(--ui-muted);font-size:11px}
 .bf30-asset-cost strong {font-size:17px;color:var(--ui-text);font-variant-numeric:tabular-nums}
 .bf30-asset-cost small {margin-inline-start:5px;font-size:10px;color:var(--ui-muted);font-weight:500}
 .bf30-asset-card footer {display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;margin-top:16px}
 html[data-theme] body dialog.bf30-asset-dialog {width:min(940px,calc(100vw - 28px));max-width:940px;border-radius:23px}
 .bf30-asset-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .bf30-asset-fields>label,.bf30-asset-fields>div {display:grid;gap:7px;min-width:0;color:var(--ui-muted);font-size:12px}
 .bf30-asset-fields input:not([type=checkbox]),.bf30-asset-fields textarea {display:block;width:100%;min-width:0;min-height:44px;padding:10px 13px;background:var(--ui-input,var(--ui-surface));color:var(--ui-text);border:1px solid var(--ui-border);border-radius:13px;box-shadow:inset 0 1px 3px rgb(0 0 0 / 4%);font:500 13px/1.7 var(--ui-font)}
 .bf30-asset-fields .is-wide {grid-column:1/-1}
 .bf30-asset-fields .bf30-check-field {display:flex;align-items:center;gap:9px;padding-block:12px}
 .bf30-asset-fields input[type=checkbox] {height:18px;width:18px;accent-color:var(--ui-primary)}
 .bf30-asset-dialog .qp-financial-dialog__footer {gap:9px;flex-wrap:wrap}
 .bf30-asset-dialog .qp-financial-dialog__footer .bf30-module-note {padding:0;margin:0 auto 0 0;background:none}
 @media(max-width:700px) { .bf30-asset-fields{grid-template-columns:1fr}.bf30-asset-cards{grid-template-columns:1fr}.bf30-asset-card{padding:16px}.bf30-register-caption{align-items:flex-start;flex-direction:column} }
 @media(max-width:550px) {html[data-theme] body .qp-app-shell .bf24-card-grid{grid-template-columns:minmax(0,1fr)!important;padding:12px!important}.bf24-card-status{max-width:45%}.bf30-asset-card h2{font-size:14px}}
}
