/* Financial report structure. All colours come from the workspace design system. */
.qp-report-page { direction:rtl; min-width:0; }
.qp-report-page :is(.qp-ledger-shell,.qp-cashbook-shell,.qp-main-content,.qp-content-panel) { min-width:0; }
.qp-report-page :is(.qp-report-header,.qp-ledger-hero,.qp-cashbook-hero,.qp-pnl-page-head,.qp-trial-page-head,.qp-pnl-hero) { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; padding:24px; border:1px solid var(--ui-border); border-radius:var(--ui-radius); background:var(--ui-surface); }
.qp-report-page :is(.qp-report-header__main,.qp-ledger-hero__left,.qp-cashbook-hero__main,.qp-title-side,.qp-hero-main) { display:flex; align-items:center; gap:16px; min-width:0; }
.qp-report-page :is(.qp-report-header__icon,.qp-ledger-hero__icon,.qp-cashbook-hero__icon,.qp-hero-icon) { width:48px; height:48px; display:grid; place-items:center; flex-shrink:0; border-radius:14px; background:var(--ui-primary-soft); color:var(--ui-primary); font-size:22px; }
.qp-report-page :is(.qp-report-header__eyebrow,.qp-ledger-hero__eyebrow,.qp-cashbook-hero__eyebrow) { font-size:11px; color:var(--ui-muted); margin-bottom:5px; }
.qp-report-page :is(.qp-report-header__range,.qp-ledger-hero__range,.qp-cashbook-hero__range,.qp-hero-side) { display:grid; gap:5px; font-size:12px; padding:12px 16px; border-radius:12px; background:var(--ui-surface-alt); white-space:nowrap; }
.qp-report-page :is(h1,h2,h3,p) { margin-top:0; }
.qp-report-page h1 { font-size:clamp(20px,2.2vw,28px); margin-bottom:7px; }
.qp-report-page :is(h2,h3) { font-size:16px; margin-bottom:5px; }
.qp-report-page p { color:var(--ui-muted); font-size:13px; line-height:1.9; margin-bottom:0; }
.qp-report-page :is(.qp-quick-actions,.qp-actions,.qp-actions-wrap,.qp-tree-tools,.qp-grid-toolbar,.qp-report-badges,.qp-report-meta,.qp-breadcrumb) { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.qp-report-page :is(.qp-filter-card,.qp-grid-card,.qp-content-card,.qp-side-panel,.qp-report-card,.qp-table-shell,.qp-bs-card) { border:1px solid var(--ui-border); border-radius:var(--ui-radius); background:var(--ui-surface); margin-bottom:18px; overflow:hidden; }
.qp-report-page .qp-filter-card { padding:20px; overflow:visible; }
.qp-report-page :is(.qp-filter-card__head,.qp-filter-head:not(tr),.qp-card-head) { margin-bottom:16px; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.qp-report-page :is(.qp-filter-grid,.qp-filter-strip) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:end; }
.qp-report-page .qp-filter-strip { grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); padding:20px; border-radius:var(--ui-radius); background:var(--ui-surface); border:1px solid var(--ui-border); margin-bottom:16px; }
.qp-report-page :is(.qp-field,.qp-filter-item,.qp-date-field) { min-width:0; }
.qp-report-page :is(.qp-field,.qp-filter-item,.qp-date-field) label { display:block; font-size:12px; font-weight:600; color:var(--ui-muted); margin-bottom:7px; }
.qp-report-page :is(.qp-field__hint,.qp-field__label,.qp-field__hint,.qp-stat-card__label) { font-size:12px; }
.qp-report-page :is(.qp-control,.qp-field__control,.qp-date-wrap) { min-width:0; }
.qp-report-page :is(.qp-input,.qp-filter-item select,.qp-picker-btn,.qp-date-range-btn,.qp-search-inline input,.qp-head-filter input) { min-height:40px; width:100%; padding:8px 11px; border:1px solid var(--ui-border); border-radius:var(--ui-radius-sm); background:var(--ui-input); color:var(--ui-text); }
.qp-report-page .qp-picker-btn { display:flex; align-items:center; justify-content:space-between; }
.qp-report-page .qp-actions { margin-top:16px; }
.qp-report-page :is(.qp-btn,.qp-blue-btn,.qp-tree-tools button,.qp-quick-actions button) { display:inline-flex; justify-content:center; align-items:center; gap:7px; padding:9px 15px; min-height:40px; border:1px solid var(--ui-border); background:var(--ui-surface); color:var(--ui-text); border-radius:var(--ui-radius-sm); font-size:12px; cursor:pointer; }
.qp-report-page :is(.qp-btn--primary,.qp-btn-primary,.qp-blue-btn) { background:var(--ui-primary); border-color:var(--ui-primary); color:var(--ui-on-primary); }
.qp-report-page button:disabled { cursor:default; opacity:.55; }
.qp-report-page :is(.qp-stats-grid,.qp-ledger-stats,.qp-kpi-grid,.qp-voucher-info-grid) { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
.qp-report-page :is(.qp-stat-card,.qp-kpi-card) { display:flex; align-items:center; gap:12px; padding:18px; border:1px solid var(--ui-border); border-radius:var(--ui-radius); background:var(--ui-surface); min-width:0; }
.qp-report-page .qp-stat-card:has(>span) { display:grid; gap:8px; }
.qp-report-page :is(.qp-stat-card span,.qp-stat-card__label,.qp-kpi-card span,.qp-kpi-card small) { display:block; font-size:12px; color:var(--ui-muted); }
.qp-report-page :is(.qp-stat-card strong,.qp-stat-card__value,.qp-kpi-card strong) { display:block; font-size:18px; margin-top:5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.qp-report-page :is(.qp-stat-card__icon,.qp-kpi-icon) { display:grid; place-items:center; width:38px; height:38px; background:var(--ui-primary-soft); color:var(--ui-primary); border-radius:10px; flex-shrink:0; }
.qp-report-page :is(.qp-main-layout,.qp-page-shell) { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; align-items:start; }
.qp-report-page .qp-page-shell { display:block; }
.qp-report-page .qp-content-grid { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; align-items:start; }
.qp-report-page :is(.qp-tree-card,.qp-table-card,.qp-vm-panel,.qp-vm-info-card,.qp-modal-main-card,.qp-modal-info-item) { min-width:0; border:1px solid var(--ui-border); border-radius:var(--ui-radius); background:var(--ui-surface); overflow:hidden; }
.qp-report-page :is(.qp-table-card__head,.qp-vm-panel__title,.qp-vm-panel__body,.qp-modal-main-card__header,.qp-modal-info-item) { padding:16px; }
.qp-report-page :is(.qp-vm-summary-grid,.qp-modal-info-grid) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:16px 0; }
.qp-report-page :is(.qp-voucher-top-cards,.qp-voucher-info) { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.qp-report-page :is(.qp-vm-info-card,.qp-vm-finance-list) { padding:14px; }
.qp-report-page :is(.qp-vm-finance-row,.qp-tree-voucher-row,.qp-select-all-row,.qp-select-all) { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px; }
.qp-report-page :is(.qp-tree-voucher-row__meta,.qp-tree-date-box__meta,.qp-select-all-row__text span,.qp-vm-info-card__label,.qp-vm-account-path) { color:var(--ui-muted); font-size:11px; }
.qp-report-page .qp-tree-voucher-row { justify-content:flex-start; border-bottom:1px solid var(--ui-border); }
.qp-report-page :is(.qp-tree-voucher-row__body,.qp-select-all-row__text) { display:grid; gap:5px; }
.qp-report-page :is(.qp-tree-voucher-row__title,.qp-tree-voucher-row__meta,.qp-voucher-modal__head-left) { display:flex; gap:10px; align-items:center; }
.qp-report-page :is(.qp-grid-footer-summary,.qp-company-strip) { display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; padding:16px; background:var(--ui-surface-alt); }
.qp-report-page .qp-grid-scroll-shell { overflow:auto; }
.qp-report-page .qp-print-head { padding:16px; border-bottom:1px solid var(--ui-border); }
.qp-report-page .qp-print-head__title { font-weight:700; }
.qp-report-page .qp-print-head__sub { margin-top:6px; color:var(--ui-muted); font-size:12px; }
.qp-report-page :is(.qp-grid-card__head,.qp-content-card__head,.qp-side-panel__head,.qp-report-head,.qp-bs-card__head,.qp-tree-card__head) { padding:18px 20px; border-bottom:1px solid var(--ui-border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.qp-report-page :is(.qp-side-panel__body,.qp-content-card__body,.qp-tree-card__body) { padding:16px; }
.qp-report-page :is(.qp-table-wrap,.qp-table-shell,.qp-grid-card__body,.qp-bs-table-wrap,.qp-vm-table-wrap) { overflow-x:auto; }
.qp-report-page :is(.qp-trial-table,.qp-pnl-table,.qp-statement-table,.qp-vm-table,.qp-bs-table) { width:100%; border-collapse:collapse; font-size:12px; }
.qp-report-page :is(.qp-trial-table,.qp-pnl-table,.qp-statement-table,.qp-vm-table) { min-width:880px; }
.qp-report-page table :is(th,td) { padding:11px 12px; text-align:right; border-bottom:1px solid var(--ui-border); vertical-align:middle; color:var(--ui-text); }
.qp-report-page table th { color:var(--ui-muted); background:var(--ui-surface-alt); font-weight:600; white-space:nowrap; }
.qp-report-page table tbody tr:hover { background:var(--ui-primary-soft); }
.qp-report-page table :is(tfoot td,tfoot th) { font-weight:700; background:var(--ui-surface-alt); border-top:2px solid var(--ui-border); }
.qp-report-page :is(.qp-number,.qp-money,.qp-money-cell,.qp-money-pill,.money-col) { text-align:left; white-space:nowrap; font-variant-numeric:tabular-nums; }
.qp-report-page :is(.qp-code,.qp-date,.qp-date-badge) { font-variant-numeric:tabular-nums; white-space:nowrap; }
.qp-report-page :is(.qp-debit,.debit,.qp-stat-card__value--debit) { color:var(--ui-success); }
.qp-report-page :is(.qp-credit,.credit,.qp-stat-card__value--credit) { color:var(--ui-info); }
.qp-report-page :is(.qp-account-title small,.qp-account-name small,.qp-account-cell__path,.qp-connected-item__path,.qp-vm-account small) { display:block; color:var(--ui-muted); font-size:11px; line-height:1.7; }
.qp-trial-screen .qp-account-name > :is(a,strong) { color:var(--ui-text); }
.qp-trial-screen .qp-account-name > a:is(:hover,:focus-visible) { color:var(--ui-primary); text-decoration:underline; }
.qp-report-page :is(.qp-voucher-no,.qp-voucher-link-btn,.qp-row-view,.qp-open-link) { background:var(--ui-primary-soft); color:var(--ui-primary); border:0; border-radius:6px; padding:5px 8px; cursor:pointer; }
.qp-report-page :is(.qp-tree-node,.qp-tree-row,.qp-bs-title,.qp-section-cell,.qp-connected-item__top) { display:flex; align-items:center; gap:8px; }
.qp-report-page :is(.qp-tree-toggle,.qp-toggle,.qp-toggle-button) { display:inline-grid; place-items:center; width:26px; height:26px; border:1px solid var(--ui-border); border-radius:6px; background:var(--ui-surface); color:var(--ui-primary); flex-shrink:0; cursor:pointer; }
.qp-report-page :is(.qp-tree-toggle--empty,.qp-toggle-button--empty) { visibility:hidden; }
.qp-report-page .qp-tree-label { display:flex; flex:1; align-items:center; gap:8px; padding:8px; border-radius:8px; background:var(--ui-surface-alt); }
.qp-report-page .qp-tree-item { margin-block:6px; }
.qp-report-page :is(.level-2,.qp-indent-2,.qp-bs-title--level2) { padding-inline-start:18px; }
.qp-report-page :is(.level-3,.qp-indent-3,.qp-bs-title--level3) { padding-inline-start:36px; }
.qp-report-page :is(.level-4,.qp-indent-4,.qp-bs-title--level4) { padding-inline-start:54px; }
.qp-report-page :is(.qp-indent-5,.qp-bs-title--level5) { padding-inline-start:72px; }
.qp-report-page .qp-pnl-table .qp-account-col { padding-inline-start:calc(12px + var(--level,0) * 16px); }
.qp-report-page :is(.qp-connected-list,.qp-tree) { display:grid; gap:8px; }
.qp-report-page .qp-connected-item { display:block; width:100%; text-align:right; padding:12px; border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-surface); color:var(--ui-text); }
.qp-report-page :is(.qp-connected-item.active,.qp-grid-row-selected td,.qp-trial-row-selected td,.qp-selected-row td) { background:var(--ui-primary-soft); color:var(--ui-primary); border-color:var(--ui-primary); }
.qp-report-page :is(.qp-connected-check,.qp-connected-item__code,.qp-type-pill,.qp-report-badges span) { color:var(--ui-primary); background:var(--ui-primary-soft); border-radius:6px; padding:3px 7px; font-size:11px; }
.qp-report-page .qp-connected-check:not(.checked) { opacity:.25; }
.qp-report-page :is(.qp-empty-box,.qp-loading-box,.qp-empty-state,.qp-loading-state,.qp-side-empty) { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:10px; min-height:180px; padding:30px 20px; color:var(--ui-muted); }
.qp-report-page :is(.qp-empty-box__icon,.qp-side-empty__icon,.qp-empty-state>i) { font-size:28px; color:var(--ui-primary); }
.qp-report-page :is(.qp-debug-box,.qp-error-box) { padding:16px 20px; margin-bottom:18px; color:var(--ui-danger); background:var(--ui-danger-soft); border:1px solid var(--ui-danger); border-radius:var(--ui-radius-sm); }
.qp-report-page :is(.qp-debug-box,.qp-error-box) pre { max-height:180px; overflow:auto; white-space:pre-wrap; direction:ltr; }
.qp-report-page .qp-source-notice { display:flex; align-items:flex-start; gap:12px; padding:16px 20px; margin-bottom:18px; background:var(--ui-warning-soft); color:var(--ui-warning); border:1px solid var(--ui-warning); border-radius:var(--ui-radius-sm); font-size:13px; line-height:1.9; }
.qp-report-page .qp-source-notice p { color:inherit; }
.qp-report-page :is(.qp-spinner,.qp-loading-box__spinner) { width:28px; height:28px; border:3px solid var(--ui-border); border-top-color:var(--ui-primary); border-radius:50%; animation:qp-report-spin .8s linear infinite; }
.qp-report-page :is(.qp-modal-backdrop,.qp-voucher-modal-backdrop) { position:fixed; inset:0; z-index:3000; background:var(--ui-overlay); display:flex; align-items:center; justify-content:center; padding:24px; }
.qp-report-page :is(.qp-modal,.qp-voucher-modal) { width:min(1100px,100%); max-height:90vh; overflow:auto; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:var(--ui-radius); box-shadow:var(--ui-shadow-pop); }
.qp-report-page :is(.qp-modal__head,.qp-voucher-modal__head,.qp-modal-header) { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid var(--ui-border); position:sticky; top:0; background:var(--ui-surface); z-index:1; }
.qp-report-page :is(.qp-modal__body,.qp-voucher-modal__body,.qp-modal-body) { padding:22px; }
.qp-report-page :is(.qp-modal__foot,.qp-voucher-modal__foot,.qp-modal-footer) { display:flex; justify-content:flex-end; gap:8px; padding:16px 22px; border-top:1px solid var(--ui-border); }
.qp-report-page :is(.qp-modal__head,.qp-voucher-modal__head) button { width:34px; height:34px; border:1px solid var(--ui-border); border-radius:8px; color:var(--ui-text); background:var(--ui-surface-alt); }
.qp-report-page :is(.qp-voucher-info-grid>div,.qp-voucher-narration,.qp-selected-doc-article) { border:1px solid var(--ui-border); background:var(--ui-surface-alt); border-radius:10px; padding:14px; }
.qp-report-page :is(.qp-voucher-info-grid span,.qp-voucher-info-grid strong) { display:block; }
.qp-report-page .qp-voucher-info-grid span { color:var(--ui-muted); font-size:12px; margin-bottom:5px; }
.qp-report-page .qp-date-panel { display:flex; align-items:flex-end; gap:16px; padding:18px; margin-bottom:16px; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:var(--ui-radius); }
.qp-report-page .qp-grid-toolbar { justify-content:space-between; margin-bottom:16px; }
.qp-report-page .qp-search-inline { position:relative; display:flex; align-items:center; gap:8px; }
.qp-report-page .qp-print-meta { display:flex; flex-wrap:wrap; gap:14px; align-items:center; padding:16px; border-bottom:1px solid var(--ui-border); font-size:12px; }
.qp-report-page .qp-balance-sheet-v2 { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.qp-report-page .qp-bs-title { min-width:240px; }
.qp-report-page .qp-bs-title small { color:var(--ui-muted); }
.qp-report-page .qp-bs-card--interactive { overflow:hidden; }
.qp-report-page .qp-bs-card__heading { display:flex; align-items:center; gap:12px; min-width:0; }
.qp-report-page .qp-bs-card__heading h2 { margin:0 0 4px; font-size:16px; }
.qp-report-page .qp-bs-card__heading p { margin:0; font-size:11px; }
.qp-report-page .qp-bs-card__icon { width:40px; height:40px; display:grid; place-items:center; border-radius:10px; color:var(--ui-primary); background:var(--ui-primary-soft); flex:0 0 auto; }
.qp-report-page .qp-bs-card__tools { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.qp-report-page .qp-bs-tool { display:inline-flex; align-items:center; gap:6px; padding:7px 9px; border:1px solid var(--ui-border); border-radius:7px; color:var(--ui-muted); background:var(--ui-surface); font:inherit; font-size:10px; cursor:pointer; }
.qp-report-page .qp-bs-tool:hover { color:var(--ui-primary); border-color:var(--ui-primary); }
.qp-report-page .qp-bs-card__summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 20px; color:var(--ui-muted); background:var(--ui-surface-alt); border-bottom:1px solid var(--ui-border); font-size:12px; }
.qp-report-page .qp-bs-card__summary strong { color:var(--ui-text); font-size:15px; font-variant-numeric:tabular-nums; }
.qp-report-page .qp-bs-table--interactive { min-width:760px; }
.qp-report-page .qp-bs-table--interactive .qp-bs-title { min-width:285px; padding-inline-start:calc(var(--qp-bs-level,0) * 18px); }
.qp-report-page .qp-bs-row--account > td { background:color-mix(in srgb,var(--ui-surface-alt) 52%,var(--ui-surface)); font-weight:600; }
.qp-report-page .qp-bs-row--ledger > td { background:var(--ui-surface); }
.qp-report-page .qp-bs-row--article > td { padding-block:9px; color:var(--ui-muted); background:color-mix(in srgb,var(--ui-surface-alt) 35%,var(--ui-surface)); font-size:11px; }
.qp-report-page .qp-bs-disclosure { width:25px; height:25px; display:inline-grid; place-items:center; flex:0 0 auto; border:1px solid var(--ui-border); border-radius:6px; color:var(--ui-primary); background:var(--ui-surface); cursor:pointer; font-size:10px; }
.qp-report-page .qp-bs-disclosure.is-ledger { width:21px; height:21px; }
.qp-report-page .qp-bs-disclosure-placeholder { width:25px; flex:0 0 auto; }
.qp-report-page .qp-bs-code { direction:ltr; unicode-bidi:isolate; color:var(--ui-muted); font-size:10px; font-variant-numeric:tabular-nums; }
.qp-report-page .qp-bs-account-name { min-width:0; }
.qp-report-page .qp-bs-row-count { display:inline-flex; padding:3px 6px; margin-inline-start:auto; border-radius:5px; color:var(--ui-muted); background:var(--ui-surface-alt); font-size:9px; font-weight:500; white-space:nowrap; }
.qp-report-page .qp-bs-line-meta { display:block; margin-top:3px; color:var(--ui-muted); font-weight:400; font-size:9px; line-height:1.65; }
.qp-report-page .qp-bs-debit { color:var(--ui-success); }
.qp-report-page .qp-bs-credit { color:var(--ui-info); }
.qp-report-page .qp-bs-balance { display:inline-flex; align-items:center; gap:5px; font-weight:700; }
.qp-report-page .qp-bs-balance small { padding:2px 5px; border-radius:4px; color:var(--ui-muted); background:var(--ui-surface-alt); font-size:8px; font-weight:500; }
.qp-report-page .qp-bs-balance.is-opposite { color:var(--ui-warning); }
.qp-report-page .qp-bs-actions-col { width:104px; text-align:center; }
.qp-report-page :is(.qp-bs-report-link,.qp-bs-voucher-link) { display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:6px 8px; border:1px solid var(--ui-border); border-radius:6px; color:var(--ui-primary); background:var(--ui-surface); text-decoration:none; white-space:nowrap; font-size:9px; }
.qp-report-page :is(.qp-bs-report-link,.qp-bs-voucher-link):hover { color:var(--ui-on-primary); border-color:var(--ui-primary); background:var(--ui-primary); }
.qp-report-page .qp-bs-voucher-icon { width:22px; height:22px; display:grid; place-items:center; color:var(--ui-muted); background:var(--ui-surface-alt); border-radius:5px; flex:0 0 auto; }
.qp-report-page .qp-bs-unlinked { color:var(--ui-subtle); font-size:9px; }
.qp-report-page .qp-bs-total-balance { color:var(--ui-primary); }
.qp-report-page .qp-bs-legend { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.qp-report-page .qp-bs-legend span { display:inline-flex; align-items:center; min-height:26px; padding:4px 8px; border:1px solid var(--ui-border); border-radius:6px; color:var(--ui-muted); background:var(--ui-surface); font-size:9px; }
.qp-report-page .qp-bs-legend .is-debit { color:var(--ui-success); background:var(--ui-success-soft); border-color:transparent; }
.qp-report-page .qp-bs-legend .is-credit { color:var(--ui-info); background:var(--ui-info-soft); border-color:transparent; }
.qp-daybook-page .qp-stats-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.qp-daybook-page .qp-stat-card { position:relative; overflow:hidden; }
.qp-daybook-page .qp-stat-card::after { content:""; position:absolute; inset-inline-start:0; top:0; bottom:0; width:3px; background:var(--ui-primary); opacity:.55; }
.qp-daybook-page .qp-stat-card--warning::after { background:var(--ui-warning); opacity:1; }
.qp-daybook-page .qp-stat-card--warning .qp-stat-card__icon { color:var(--ui-warning); background:var(--ui-warning-soft); }
.qp-daybook-page .qp-stat-card--balanced .qp-stat-card__icon { color:var(--ui-success); background:var(--ui-success-soft); }
.qp-daybook-page .qp-tree-badge,
.qp-daybook-page .qp-balance-status { display:inline-flex; align-items:center; min-height:22px; padding:3px 7px; border-radius:6px; font-size:9px; line-height:1.4; }
.qp-daybook-page .qp-tree-badge { color:var(--ui-primary); background:var(--ui-primary-soft); }
.qp-daybook-page .qp-balance-status.is-balanced { color:var(--ui-success); background:var(--ui-success-soft); }
.qp-daybook-page .qp-balance-status.is-unbalanced { color:var(--ui-warning); background:var(--ui-warning-soft); }
.qp-daybook-page .qp-balance-status.is-partial { color:var(--ui-muted); background:var(--ui-surface-alt); }
.qp-daybook-page .qp-tree-voucher-row { border:1px solid transparent; border-bottom-color:var(--ui-border); border-radius:8px; transition:border-color .16s ease,background-color .16s ease; }
.qp-daybook-page .qp-tree-voucher-row:hover { border-color:var(--ui-primary); background:var(--ui-primary-soft); }
.qp-daybook-page .qp-tree-voucher-row__body { flex:1; min-width:0; }
.qp-daybook-page .qp-tree-voucher-row__title { flex-wrap:wrap; }
.qp-daybook-page :is(.qp-voucher-link,.qp-voucher-number) { display:inline-flex; align-items:center; min-height:28px; padding:4px 8px; border-radius:6px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.qp-daybook-page .qp-voucher-link { color:var(--ui-primary); background:var(--ui-primary-soft); text-decoration:none; font-weight:700; }
.qp-daybook-page .qp-voucher-number { color:var(--ui-muted); background:var(--ui-surface-alt); }
.qp-daybook-page .qp-row-number-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0; border:1px solid var(--ui-border); border-radius:8px; background:var(--ui-surface); color:var(--ui-primary); cursor:pointer; font-size:12px; font-variant-numeric:tabular-nums; }
.qp-daybook-page .qp-row-number-btn:is(:hover,:focus-visible,.is-selected) { background:var(--ui-primary-soft); border-color:var(--ui-primary); outline-offset:3px; }
.qp-daybook-page .qp-grid-name__title { color:var(--ui-text); font-weight:700; }
.qp-daybook-page .qp-grid-name__sub { margin-top:4px; color:var(--ui-muted); font-size:10px; line-height:1.7; }
.qp-daybook-page .qp-daybook-narration { display:block; min-width:190px; max-width:320px; color:var(--ui-muted); line-height:1.9; white-space:normal; }
.qp-daybook-page .qp-daybook-modal-narration { display:grid; gap:7px; margin:0 16px 16px; padding:14px; color:var(--ui-text); background:var(--ui-surface-alt); border:1px solid var(--ui-border); border-radius:10px; }
.qp-daybook-page .qp-daybook-modal-narration span { color:var(--ui-muted); font-size:11px; }
.qp-daybook-page .qp-daybook-open-voucher { width:max-content; margin:0 16px 16px; text-decoration:none; }
.qp-daybook-page .qp-modal--main { position:fixed; top:50%; left:50%; z-index:3001; width:min(760px,calc(100vw - 28px)); transform:translate(-50%,-50%); }
.qp-daybook-page .qp-daybook-data-alert { display:flex; align-items:flex-start; gap:12px; margin:0 0 18px; padding:14px 16px; color:var(--ui-warning); background:var(--ui-warning-soft); border:1px solid color-mix(in srgb,var(--ui-warning) 45%,transparent); border-radius:var(--ui-radius-sm); }
.qp-daybook-page .qp-daybook-data-alert > i { margin-top:4px; }
.qp-daybook-page .qp-daybook-data-alert div { display:grid; gap:4px; }
.qp-daybook-page .qp-daybook-data-alert span { color:var(--ui-text); font-size:11px; line-height:1.8; }
.qp-cashbook-ux-page .qp-stats-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.qp-cashbook-ux-page .qp-cashbook-hero__range small { color:var(--ui-muted); font-size:10px; white-space:normal; max-width:260px; }
.qp-cashbook-ux-page .qp-stat-card { position:relative; overflow:hidden; }
.qp-cashbook-ux-page .qp-stat-card::after { content:""; position:absolute; inset-inline-start:0; inset-block:0; width:3px; background:var(--ui-primary); opacity:.55; }
.qp-cashbook-ux-page .qp-stat-card--opening::after { background:var(--ui-warning); opacity:1; }
.qp-cashbook-ux-page .qp-stat-card__icon.opening { color:var(--ui-warning); background:var(--ui-warning-soft); }
.qp-cashbook-data-alert { display:flex; align-items:center; gap:14px; margin:0 0 18px; padding:15px 17px; color:var(--ui-warning); background:var(--ui-warning-soft); border:1px solid color-mix(in srgb,var(--ui-warning) 42%,transparent); border-radius:var(--ui-radius-sm); }
.qp-cashbook-data-alert>i { font-size:18px; flex:0 0 auto; }
.qp-cashbook-data-alert>div { display:grid; gap:4px; flex:1; }
.qp-cashbook-data-alert span { color:var(--ui-text); font-size:11px; line-height:1.8; }
.qp-cashbook-ux-page .qp-table-card__head { display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid var(--ui-border); }
.qp-cashbook-scope { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.qp-cashbook-scope span { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; color:var(--ui-muted); background:var(--ui-surface-alt); border-radius:7px; font-size:10px; white-space:nowrap; }
.qp-cashbook-ux-page .qp-account-cell { display:grid; gap:4px; min-width:180px; }
.qp-cashbook-ux-page .qp-account-cell span { color:var(--ui-muted); font-size:10px; line-height:1.7; }
.qp-cashbook-narration { display:block; min-width:190px; max-width:320px; color:var(--ui-muted); line-height:1.9; white-space:normal; }
.qp-cashbook-ux-page .qp-doc-type { display:inline-flex; padding:5px 8px; color:var(--ui-primary); background:var(--ui-primary-soft); border-radius:6px; font-size:10px; }
.qp-cashbook-ux-page .qp-doc-type.is-opening { color:var(--ui-warning); background:var(--ui-warning-soft); }
.qp-cashbook-ux-page .qp-balance-wrap { display:flex; align-items:center; justify-content:center; gap:7px; white-space:nowrap; }
.qp-cashbook-ux-page .qp-balance-badge { padding:3px 6px; border-radius:5px; font-size:9px; }
.qp-cashbook-ux-page .qp-balance-badge.is-debit { color:var(--ui-success); background:var(--ui-success-soft); }
.qp-cashbook-ux-page .qp-balance-badge.is-credit { color:var(--ui-info); background:var(--ui-info-soft); }
.qp-cashbook-ux-page .qp-balance-badge.is-zero { color:var(--ui-muted); background:var(--ui-surface-alt); }
.qp-cashbook-modal-backdrop { position:fixed; inset:0; z-index:3000; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--ui-overlay); }
.qp-cashbook-modal-backdrop .qp-voucher-modal { width:min(1040px,100%); max-height:90vh; overflow:auto; color:var(--ui-text); background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:var(--ui-radius); box-shadow:var(--ui-shadow-pop); }
.qp-cashbook-modal-backdrop .qp-voucher-modal__head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; background:var(--ui-surface); border-bottom:1px solid var(--ui-border); }
.qp-cashbook-modal-backdrop .qp-voucher-modal__title-wrap { display:flex; align-items:center; gap:12px; }
.qp-cashbook-modal-backdrop .qp-voucher-modal__icon { width:40px; height:40px; display:grid; place-items:center; color:var(--ui-primary); background:var(--ui-primary-soft); border-radius:10px; }
.qp-cashbook-modal-backdrop :is(h3,h4,p) { margin:0; }
.qp-cashbook-modal-backdrop p { margin-top:4px; color:var(--ui-muted); font-size:11px; }
.qp-cashbook-modal-backdrop .qp-modal-close { width:34px; height:34px; border:1px solid var(--ui-border); border-radius:8px; color:var(--ui-text); background:var(--ui-surface-alt); }
.qp-cashbook-modal-backdrop .qp-voucher-modal__body { padding:22px; }
.qp-cashbook-modal-backdrop .qp-voucher-info-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.qp-cashbook-modal-backdrop .qp-voucher-info { padding:13px; background:var(--ui-surface-alt); border:1px solid var(--ui-border); border-radius:9px; }
.qp-cashbook-modal-backdrop .qp-voucher-info span { display:block; margin-bottom:5px; color:var(--ui-muted); font-size:10px; }
.qp-cashbook-modal-backdrop .qp-voucher-summary { display:grid; grid-template-columns:1.35fr 1fr; gap:12px; margin-bottom:14px; }
.qp-cashbook-modal-backdrop .qp-voucher-panel { padding:15px; background:var(--ui-surface-alt); border:1px solid var(--ui-border); border-radius:10px; }
.qp-cashbook-modal-backdrop .qp-voucher-panel h4 { margin-bottom:10px; }
.qp-cashbook-modal-backdrop .qp-control-row { display:flex; justify-content:space-between; gap:14px; padding:7px 0; color:var(--ui-muted); border-bottom:1px solid var(--ui-border); font-size:11px; }
.qp-cashbook-modal-backdrop .qp-control-row:last-child { border-bottom:0; }
.qp-cashbook-modal-backdrop .qp-control-row.active { color:var(--ui-success); }
.qp-cashbook-modal-backdrop .qp-voucher-table-wrap { overflow:auto; border:1px solid var(--ui-border); border-radius:10px; }
.qp-cashbook-modal-backdrop .qp-voucher-table { width:100%; min-width:760px; border-collapse:collapse; font-size:11px; }
.qp-cashbook-modal-backdrop .qp-voucher-table :is(th,td) { padding:10px 11px; text-align:right; border-bottom:1px solid var(--ui-border); }
.qp-cashbook-modal-backdrop .qp-voucher-table th { color:var(--ui-muted); background:var(--ui-surface-alt); }
.qp-cashbook-modal-backdrop .qp-modal-account { display:grid; gap:3px; }
.qp-cashbook-modal-backdrop .qp-modal-account span { color:var(--ui-muted); font-size:9px; }
.qp-cashbook-modal-backdrop .qp-empty-mini { padding:20px; text-align:center; color:var(--ui-muted); }
.qp-cashbook-modal-backdrop .qp-loading-box { min-height:180px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--ui-muted); }
.qp-cashbook-modal-backdrop .qp-spinner { width:28px; height:28px; border:3px solid var(--ui-border); border-top-color:var(--ui-primary); border-radius:50%; animation:qp-report-spin .8s linear infinite; }
.qp-cashbook-modal-backdrop .qp-money-pill { white-space:nowrap; font-variant-numeric:tabular-nums; }
.qp-cashbook-modal-backdrop .qp-money-pill.debit { color:var(--ui-success); }
.qp-cashbook-modal-backdrop .qp-money-pill.credit { color:var(--ui-info); }
@media(min-width:1700px) { .qp-report-page .qp-balance-sheet-v2 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.qp-report-page :is(.qp-balance-diff-box,.qp-statement-summary) { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; padding:18px; background:var(--ui-surface-alt); border-radius:12px; margin:16px; }
.qp-report-page .qp-statement-summary>div { display:grid; gap:7px; }
.qp-report-page .hidden { display:none; }
/* Column mode is rendered by Razor. Positional hiding breaks colspans and
   filter alignment, and must never be used to change a financial table. */
.qp-report-page .qp-trial-table > thead > .qp-filter-head { display:table-row; }
.qp-report-page .qp-trial-table { table-layout:auto; min-width:960px; }
.qp-report-page .qp-trial-table.qp-cols-4 { min-width:760px; }
.qp-report-page .qp-trial-table .qp-account-col { width:34%; min-width:280px; }
.qp-report-page .qp-trial-table .qp-action-col { width:56px; }
.qp-report-page .qp-trial-table :is(.qp-sub-head th,.qp-group-title) { text-align:center; }
.qp-report-page .qp-trial-table :is(.qp-money-cell,tfoot td:not(:first-child):not(:last-child)) { min-width:108px; text-align:left; white-space:nowrap; font-variant-numeric:tabular-nums; }
.qp-report-page .qp-trial-table .qp-action-cell { text-align:center; }
.qp-report-page .qp-head-filter { display:flex; align-items:center; gap:8px; min-width:0; }
.qp-report-page .qp-head-filter input { width:100%; min-width:0; }
.qp-report-page .qp-head-filter > i { flex-shrink:0; color:var(--ui-muted); }
.qp-report-page .qp-field select { width:100%; min-height:42px; padding:8px 12px; border:1px solid var(--ui-border); border-radius:var(--ui-radius-sm); background:var(--ui-input); color:var(--ui-text); font:inherit; }
.qp-report-page .qp-trial-account-width { width:34%; }
.qp-report-page .qp-trial-money-width { width:auto; }
.qp-report-page .qp-trial-action-width { width:56px; }
.qp-report-page .qp-date-readonly { display:flex; align-items:center; min-height:42px; padding:8px 12px; border:1px solid var(--ui-border); border-radius:var(--ui-radius-sm); background:var(--ui-surface-alt); color:var(--ui-text); }
.qp-report-page .qp-account-picker-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.qp-report-page .qp-account-picker-toolbar input { flex:1; min-width:180px; }
.qp-report-page .qp-account-picker-tree { display:grid; gap:3px; max-height:52vh; overflow:auto; padding:6px; border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-surface); }
.qp-report-page .qp-report-account-option { display:flex; align-items:center; justify-content:flex-start; gap:10px; min-height:44px; padding:8px 12px; padding-inline-start:calc(12px + var(--qp-account-level,0) * 18px); border-radius:7px; cursor:pointer; color:var(--ui-text); }
.qp-report-page .qp-report-account-option:hover { background:var(--ui-primary-soft); }
.qp-report-page .qp-report-account-option:has(input:checked) { background:var(--ui-primary-soft); }
.qp-report-page .qp-report-account-option input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; margin:0; accent-color:var(--ui-primary); }
.qp-report-page .qp-report-account-label { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.qp-report-page .qp-report-account-label small { color:var(--ui-muted); font-variant-numeric:tabular-nums; }
.qp-report-page .qp-account-tree-warning { margin:10px 0; padding:10px 14px; border:1px solid var(--ui-warning); border-radius:8px; background:var(--ui-warning-soft); color:var(--ui-warning); font-size:12px; line-height:1.9; }
.qp-modal--accounts .qp-select-all { display:flex; align-items:center; justify-content:flex-start; gap:10px; padding:10px 12px; background:var(--ui-surface-alt); border-radius:8px; margin-bottom:12px; }
.qp-modal--accounts .qp-select-all input { order:-1; width:18px; height:18px; flex:0 0 18px; margin:0; accent-color:var(--ui-primary); }
.qp-modal--accounts .qp-select-all small { margin-inline-start:10px; color:var(--ui-muted); }
.qp-modal--accounts .qp-tree-toggle.empty { visibility:hidden; }
html[data-theme] .qp-modal--accounts .qp-modal__foot .qp-btn--primary { background:var(--ui-primary); color:var(--ui-on-primary); border-color:var(--ui-primary); }
.qp-report-page .qp-bs-period-result > :is(th,td) { background:var(--ui-surface-alt); }
.qp-report-page .qp-bs-period-result .qp-bs-line-meta { display:block; margin-top:5px; line-height:1.8; font-weight:400; }
.qp-report-page :is(.qp-stats-grid,.qp-ledger-stats) { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
@keyframes qp-report-spin { to { transform:rotate(360deg); } }
@media(max-width:1100px) { .qp-report-page :is(.qp-stats-grid,.qp-ledger-stats,.qp-kpi-grid,.qp-voucher-info-grid), .qp-daybook-page .qp-stats-grid, .qp-cashbook-ux-page .qp-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .qp-report-page :is(.qp-main-layout,.qp-content-grid) { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) { .qp-report-page :is(.qp-report-header,.qp-ledger-hero,.qp-cashbook-hero,.qp-pnl-page-head,.qp-trial-page-head,.qp-pnl-hero,.qp-date-panel) { flex-direction:column; align-items:stretch; padding:18px; } .qp-report-page :is(.qp-filter-grid,.qp-balance-sheet-v2) { grid-template-columns:minmax(0,1fr); } .qp-report-page .qp-stat-card { padding:12px; } .qp-report-page :is(.qp-stat-card strong,.qp-stat-card__value,.qp-kpi-card strong) { font-size:15px; } .qp-report-page :is(.qp-modal-backdrop,.qp-voucher-modal-backdrop) { padding:10px; } .qp-cashbook-data-alert,.qp-cashbook-ux-page .qp-table-card__head { align-items:stretch; flex-direction:column; } .qp-cashbook-modal-backdrop { padding:10px; } .qp-cashbook-modal-backdrop .qp-voucher-info-grid,.qp-cashbook-modal-backdrop .qp-voucher-summary { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .qp-report-page :is(.qp-spinner,.qp-loading-box__spinner) { animation:none; } }
@media print { .qp-report-page .hidden { display:table-row; } .qp-report-page :is(.qp-print-meta,.qp-report-head) { display:flex!important; } .qp-report-page :is(.qp-table-shell,.qp-table-wrap,.qp-bs-table-wrap) { overflow:visible; } .qp-report-page table { min-width:0!important; font-size:10pt; } .qp-report-page .qp-balance-sheet-v2 { display:block; } .qp-report-page :is(.qp-trial-table,.qp-statement-table,.qp-pnl-table) { min-width:0; } }

/* Financial reports share the compact accounting layout. Chart and voucher pages
   deliberately do not carry qp-financial-page and are outside this scope. */
.qp-financial-page { --qp-report-grid:#d9dde3; --qp-report-surface:#fff; --qp-report-root:#111; --qp-report-branch:#0788e3; --qp-report-leaf:#009f8d; --qp-report-selected:#6198c2; min-width:0; width:100%; font-size:13px; }
html[data-theme="dark"] .qp-financial-page { --qp-report-grid:var(--ui-border); --qp-report-surface:var(--ui-surface); --qp-report-root:var(--ui-text); --qp-report-branch:#83c4ff; --qp-report-leaf:#5ee0c2; --qp-report-selected:#315f88; }
.qp-financial-page .qp-financial-header { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:0 0 16px; margin:0 0 16px; border-bottom:1px solid var(--ui-border); background:transparent; }
.qp-financial-page .qp-financial-header__title { min-width:0; }
.qp-financial-page .qp-financial-header h1 { font-size:23px; line-height:1.6; margin:0; font-weight:700; }
.qp-financial-page .qp-financial-header p { margin:3px 0 0; font-size:12px; line-height:1.8; color:var(--ui-muted); }
.qp-financial-page .qp-financial-breadcrumb { display:flex; align-items:center; gap:7px; margin:0 0 4px; color:var(--ui-muted); font-size:11px; }
.qp-financial-page .qp-financial-breadcrumb a { color:inherit; text-decoration:none; }
.qp-financial-page .qp-financial-breadcrumb a:hover { text-decoration:underline; }
.qp-financial-page .qp-financial-header__context { display:grid; gap:4px; color:var(--ui-muted); font-size:11px; line-height:1.7; text-align:left; flex-shrink:0; }
.qp-financial-page .qp-financial-header__context strong { color:var(--ui-text); font-size:12px; }
.qp-financial-page :is(.qp-filter-card,.qp-grid-card,.qp-content-card,.qp-side-panel,.qp-report-card,.qp-table-shell,.qp-bs-card,.qp-table-card,.qp-tree-card) { border-radius:5px; box-shadow:none; margin-bottom:14px; min-width:0; background:var(--qp-report-surface); }
.qp-financial-page .qp-filter-card { padding:14px 16px; }
.qp-financial-page :is(.qp-filter-card__head,.qp-filter-head:not(tr),.qp-card-head) { margin-bottom:10px; gap:10px; }
.qp-financial-page :is(.qp-filter-card__head,.qp-filter-head:not(tr),.qp-card-head) h3 { font-size:13px; margin:0; }
.qp-financial-page :is(.qp-filter-card__head,.qp-filter-head:not(tr),.qp-card-head) p { font-size:11px; margin-top:3px; }
.qp-financial-page .qp-filter-grid { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px 16px; align-items:end; }
.qp-financial-page .qp-trial-filters { grid-template-columns:repeat(6,minmax(140px,1fr)); }
.qp-financial-page :is(.qp-field,.qp-filter-item,.qp-date-field) > label { color:var(--ui-text); font-size:12px; margin-bottom:5px; }
.qp-financial-page :is(.qp-input,.qp-field select,.qp-picker-btn,.qp-date-readonly,.qp-search-inline input) { min-height:36px; padding:6px 10px; border-radius:4px; font:inherit; font-size:12px; }
.qp-financial-page :is(.qp-field__hint,.qp-field-hint) { display:block; color:var(--ui-muted); font-size:11px; line-height:1.7; margin-top:5px; }
.qp-financial-page :is(.qp-actions,.qp-actions-wrap,.qp-filter-actions) { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; padding-top:0; }
.qp-financial-page .qp-field--actions .qp-actions { margin-top:0; }
.qp-financial-page :is(.qp-btn,.qp-blue-btn,.qp-tree-tools button,.qp-bs-tool) { min-height:34px; padding:6px 11px; border-radius:4px; font-size:12px; line-height:1.6; }
.qp-financial-page .qp-grid-toolbar { gap:12px; margin:0 0 10px; }
.qp-financial-page .qp-tree-tools { gap:6px; font-size:11px; color:var(--ui-muted); }
.qp-financial-page .qp-tree-tools button { min-height:30px; padding:4px 8px; font-size:11px; }
.qp-financial-page .qp-search-inline { min-width:240px; }
.qp-financial-page .qp-search-inline > i { color:var(--ui-muted); }
.qp-financial-page :is(.qp-stats-grid,.qp-ledger-stats,.qp-kpi-grid) { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:0; border:1px solid var(--ui-border); border-radius:5px; overflow:hidden; margin:0 0 14px; background:var(--qp-report-surface); }
html[data-theme] .qp-financial-page :is(.qp-stat-card,.qp-kpi-card) { padding:11px 14px; border:0; border-inline-end:1px solid var(--ui-border); border-radius:0; gap:7px; background:transparent; box-shadow:none; }
.qp-financial-page :is(.qp-stat-card,.qp-kpi-card):last-child { border-inline-end:0; }
.qp-financial-page :is(.qp-stat-card,.qp-kpi-card)::after { display:none; }
.qp-financial-page :is(.qp-stat-card__icon,.qp-kpi-icon) { display:none; }
.qp-financial-page :is(.qp-stat-card strong,.qp-stat-card__value,.qp-kpi-card strong) { font-size:16px; line-height:1.6; margin-top:4px; }
.qp-financial-page :is(.qp-stat-card span,.qp-stat-card__label,.qp-kpi-card span) { font-size:11px; }
.qp-financial-page .qp-kpi-card small { display:none; }
.qp-financial-page :is(.qp-grid-card__head,.qp-content-card__head,.qp-report-head,.qp-bs-card__head,.qp-tree-card__head,.qp-side-panel__head,.qp-table-card__head) { padding:10px 13px; gap:10px; flex-wrap:wrap; }
.qp-financial-page :is(.qp-grid-card__head,.qp-content-card__head,.qp-report-head,.qp-bs-card__head,.qp-tree-card__head,.qp-side-panel__head,.qp-table-card__head) :is(h2,h3) { font-size:13px; line-height:1.7; margin:0; }
.qp-financial-page :is(.qp-grid-card__head,.qp-content-card__head,.qp-report-head,.qp-tree-card__head,.qp-side-panel__head,.qp-table-card__head) p { font-size:11px; line-height:1.8; }
.qp-financial-page :is(.qp-content-card__body,.qp-tree-card__body,.qp-side-panel__body) { padding:10px; }
.qp-financial-page :is(.qp-print-head,.qp-print-meta,.qp-report-meta) { padding:9px 12px; gap:12px; color:var(--ui-muted); font-size:11px; line-height:1.8; }
.qp-financial-page .qp-print-head__title { font-size:12px; color:var(--ui-text); }
.qp-financial-page .qp-print-head__sub { margin-top:2px; font-size:11px; }
.qp-financial-page .qp-report-meta { border-bottom:1px solid var(--ui-border); }
.qp-financial-page .qp-report-meta__badge { display:flex; align-items:center; gap:6px; }
.qp-financial-page .qp-report-meta__badge--wide { flex:1; }
.qp-financial-page .qp-report-badges span { background:transparent; color:var(--ui-muted); padding:0; }
.qp-financial-page :is(.qp-table-wrap,.qp-table-shell,.qp-grid-card__body,.qp-bs-table-wrap,.qp-grid-scroll-shell,.rz-data-grid) { max-width:100%; min-width:0; }
.qp-financial-page :is(.qp-table-wrap,.qp-table-shell,.qp-bs-table-wrap,.qp-grid-scroll-shell) { position:relative; overflow-x:auto; overscroll-behavior-x:contain; }
.qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) { width:100%; border-collapse:collapse; border-spacing:0; font-size:12px; line-height:1.65; }
html[data-theme] .qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) :is(th,td) { min-height:35px; height:35px; padding:5px 8px; border:1px solid var(--qp-report-grid); background:var(--qp-report-surface); color:var(--ui-text); vertical-align:middle; box-sizing:border-box; }
html[data-theme] .qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) thead th { color:var(--ui-muted); font-weight:500; font-size:11px; background:var(--qp-report-surface); }
html[data-theme] .qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) tbody tr:hover > :is(td,th) { background:color-mix(in srgb,var(--qp-report-branch) 4%,var(--qp-report-surface)); }
html[data-theme] .qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) :is(tfoot td,tfoot th,.qp-total-row td,.qp-total-row th) { background:var(--ui-surface-alt); font-weight:700; border-top:1px solid var(--ui-border); }
/* Shared workspace table rules use !important. Override only financial grids,
   keeping their heading and filter rows at the same compact report density. */
html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table :is(th,td) { font-size:12px; border-color:var(--qp-report-grid)!important; }
html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table thead th { padding:4px 8px!important; background:var(--qp-report-surface)!important; font-size:11px; }
.qp-financial-page .rz-grid-table thead th > div { padding:0; }
.qp-financial-page .rz-grid-table .rz-cell-filter { padding:0; }
.qp-financial-page .rz-grid-table .rz-cell-filter :is(input,.rz-textbox,.rz-numeric) { min-height:28px; height:28px; font-size:11px; border-radius:3px; }
html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table tbody tr:is(.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) > td { background:var(--qp-report-selected)!important; color:#fff!important; }
html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table tbody tr:is(.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) :is(.rz-cell-data,.rz-cell-data *) { color:#fff!important; }
html[data-theme] .qp-financial-page.qp-daybook-page .rz-data-grid .rz-grid-table tbody tr:is(.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) :is(.qp-type-pill,.qp-row-number-btn) { background:transparent!important; }
.qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table) { table-layout:fixed; }
.qp-financial-page .qp-bs-table--interactive { min-width:850px; }
.qp-financial-page .qp-pnl-table { min-width:980px; }
.qp-financial-page .qp-financial-account-col { width:auto; }
.qp-financial-page .qp-financial-amount-col { width:150px; }
.qp-financial-page .qp-financial-nature-col { width:88px; }
.qp-financial-page .qp-financial-action-col { width:42px; }
.qp-financial-page .qp-pnl-code-col { width:85px; }
.qp-financial-page .qp-pnl-kind-col { width:100px; }
.qp-financial-page .qp-bs-actions-col { width:42px; text-align:center; }
.qp-financial-page .qp-trial-table .qp-account-col { min-width:260px; width:36%; }
.qp-financial-page :is(td.qp-number,td.qp-money,td.qp-money-cell,.money-col,.qp-trial-table tfoot td:not(:first-child):not(:last-child)) { text-align:left; white-space:nowrap; font-variant-numeric:tabular-nums; }
.qp-financial-page :is(.qp-money,.qp-number,.qp-money-cell,.qp-money-pill,.qp-money-cell--debit,.qp-money-cell--credit) { font-size:12px; font-variant-numeric:tabular-nums; border:0; padding:0; background:transparent; border-radius:0; }
.qp-financial-page .qp-financial-nature { white-space:nowrap; color:var(--ui-muted); font-size:10px; font-weight:400; }
.qp-financial-page .qp-financial-nature.is-opposite { color:var(--ui-warning); }
.qp-financial-page :is(.qp-tree-node,.qp-bs-title) { display:flex; align-items:center; min-width:0; gap:5px; padding-inline-start:calc(var(--qp-tree-level,var(--qp-bs-level,0)) * 18px); }
.qp-financial-page .qp-bs-table--interactive .qp-bs-title { min-width:0; padding-inline-start:calc(var(--qp-bs-level,0) * 18px); }
.qp-financial-page .qp-pnl-table .qp-account-col { padding-inline-start:8px; }
.qp-financial-page .qp-report-node-name { display:inline; min-height:0; min-width:0; padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--qp-report-branch); font:inherit; font-weight:600; line-height:1.6; text-align:right; text-decoration:none; cursor:pointer; overflow-wrap:anywhere; }
.qp-financial-page .qp-report-node-name:hover { text-decoration:underline; }
.qp-financial-page .qp-financial-tree-row.is-root .qp-report-node-name { color:var(--qp-report-root); font-weight:700; }
.qp-financial-page .qp-financial-tree-row.is-leaf .qp-report-node-name { color:var(--qp-report-leaf); }
.qp-financial-page :is(.qp-tree-toggle,.qp-toggle,.qp-bs-disclosure,.qp-bs-disclosure.is-ledger,.qp-bs-disclosure-placeholder) { display:inline-grid; place-items:center; width:16px; min-width:16px; height:20px; min-height:0; margin:0; padding:0; flex:0 0 16px; border:0; border-radius:0; background:transparent; color:var(--ui-muted); font-size:10px; }
.qp-financial-page .qp-tree-toggle--empty { visibility:hidden; }
.qp-financial-page :is(.qp-account-name,.qp-bs-article-title) { display:flex; align-items:center; gap:7px; min-width:0; flex-wrap:wrap; }
.qp-financial-page :is(.qp-report-row-code,.qp-bs-code) { font-size:10px; color:var(--ui-muted); font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate; }
.qp-financial-page .qp-bs-article-title { font-size:11px; }
.qp-financial-page .qp-bs-line-meta { display:inline; margin:0; font-size:10px; color:var(--ui-muted); }
.qp-financial-page .qp-bs-row--article > td { font-size:11px; }
.qp-financial-page :is(.qp-bs-report-link,.qp-bs-voucher-link,.qp-open-link,.qp-row-view) { display:inline-grid; place-items:center; width:25px; height:25px; padding:0; border:0; border-radius:3px; background:transparent; color:var(--ui-muted); font-size:11px; }
.qp-financial-page :is(.qp-bs-report-link,.qp-bs-voucher-link,.qp-open-link,.qp-row-view):hover { background:var(--ui-info-soft); color:var(--qp-report-branch); }
html[data-theme] .qp-financial-page tbody tr:is(.qp-financial-tree-row.is-selected,.qp-row--selected,.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) > :is(td,th) { background:var(--qp-report-selected); color:#fff; }
html[data-theme] .qp-financial-page :is(.qp-financial-tree-row.is-selected,.qp-row--selected,.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) :is(.qp-report-node-name,.qp-bs-code,.qp-report-row-code,.qp-code,.qp-number,.qp-money,.qp-financial-nature,.qp-bs-disclosure,.qp-tree-toggle,.qp-toggle,.qp-bs-line-meta,a,small) { color:#fff; }
.qp-financial-page .qp-balance-sheet-v2 { display:block; }
.qp-financial-page .qp-bs-card { border-radius:0; margin:0 0 14px; }
.qp-financial-page .qp-bs-card__heading { gap:12px; }
.qp-financial-page .qp-bs-card__heading h2 { margin:0; }
.qp-financial-page .qp-financial-unit { color:var(--ui-muted); font-size:11px; white-space:nowrap; }
.qp-financial-page .qp-financial-footnote { margin:0; padding:8px 12px; font-size:11px; line-height:1.9; color:var(--ui-muted); border-top:1px solid var(--ui-border); }
.qp-financial-page .qp-balance-diff-box { margin:0; padding:10px 14px; border-radius:4px; font-size:12px; }
.qp-financial-page.qp-ledger-ux-page .qp-main-layout { display:block; }
.qp-financial-page .qp-connected-filter .qp-side-panel__head { padding:8px 12px; }
.qp-financial-page .qp-connected-filter .qp-side-panel__icon { display:none; }
.qp-financial-page .qp-connected-filter .qp-side-panel__body { padding:8px 10px; }
.qp-financial-page .qp-connected-filter .qp-connected-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:6px; }
.qp-financial-page .qp-connected-filter .qp-connected-item { padding:7px 9px; border-radius:4px; font-size:12px; }
.qp-financial-page .qp-connected-filter .qp-side-empty { min-height:0; padding:9px; flex-direction:row; font-size:11px; }
.qp-financial-page .qp-content-grid { grid-template-columns:245px minmax(0,1fr); gap:12px; }
.qp-financial-page .qp-tree-card__body { max-height:650px; overflow:auto; }
.qp-financial-page .qp-tree-date-box__title { font-size:12px; font-weight:600; }
.qp-financial-page .qp-tree-voucher-row { border-radius:0; padding:6px 4px; }
.qp-financial-page .qp-tree-voucher-row__title { gap:5px; font-size:11px; }
.qp-financial-page .qp-tree-label { border-radius:0; }
.qp-financial-page .qp-company-strip { display:none; }
.qp-financial-page :is(.qp-voucher-no,.qp-voucher-link-btn,.qp-voucher-link,.qp-voucher-number) { padding:2px 4px; min-height:24px; border:0; border-radius:2px; background:transparent; color:var(--qp-report-branch); font-size:12px; }
.qp-financial-page .qp-row-number-btn { width:26px; height:24px; border:0; padding:0; border-radius:2px; background:transparent; font-size:11px; }
.qp-financial-page :is(.qp-daybook-narration,.qp-cashbook-narration,.qp-narration) { min-width:0; max-width:none; line-height:1.7; font-size:11px; }
.qp-financial-page :is(.qp-grid-name__sub,.qp-account-cell__path,.qp-cashbook-ux-page .qp-account-cell span) { margin-top:1px; font-size:10px; line-height:1.5; }
.qp-financial-page :is(.qp-account-cell,.qp-grid-name) { min-width:0; gap:1px; }
.qp-financial-page .qp-grid-footer-summary { padding:9px 12px; gap:12px; font-size:11px; }
.qp-financial-page .qp-source-notice { margin:0 0 12px; padding:10px 13px; border-radius:5px; font-size:12px; }
.qp-financial-page :is(.qp-empty-box,.qp-empty-state,.qp-loading-box,.qp-loading-state) { min-height:150px; padding:24px 16px; }
.qp-financial-page :is(button,a,input,select):focus-visible { outline:2px solid var(--qp-report-branch); outline-offset:2px; }
@media (max-width:1200px) {
    .qp-financial-page .qp-trial-filters { grid-template-columns:repeat(3,minmax(160px,1fr)); }
    .qp-financial-page .qp-content-grid { grid-template-columns:minmax(0,1fr); }
    .qp-financial-page .qp-tree-card__body { max-height:250px; }
}
@media (max-width:700px) {
    .qp-financial-page .qp-financial-header { align-items:stretch; flex-direction:column; gap:8px; padding-bottom:12px; }
    .qp-financial-page .qp-financial-header h1 { font-size:20px; }
    .qp-financial-page .qp-financial-header__context { text-align:right; display:flex; flex-wrap:wrap; column-gap:12px; }
    .qp-financial-page .qp-filter-card { padding:12px; }
    .qp-financial-page :is(.qp-filter-grid,.qp-trial-filters) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .qp-financial-page .qp-filter-grid .qp-field:has(.qp-account-tree-picker) { grid-column:1 / -1; }
    .qp-financial-page :is(.qp-stats-grid,.qp-ledger-stats,.qp-kpi-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
    html[data-theme] .qp-financial-page :is(.qp-stat-card,.qp-kpi-card) { border-bottom:1px solid var(--ui-border); padding:9px 10px; }
    .qp-financial-page :is(.qp-stat-card strong,.qp-stat-card__value,.qp-kpi-card strong) { font-size:14px; }
    .qp-financial-page .qp-grid-toolbar { align-items:stretch; flex-direction:column; }
    .qp-financial-page .qp-search-inline { min-width:0; width:100%; }
    .qp-financial-page .qp-bs-card__head { align-items:flex-start; }
    .qp-financial-page .qp-bs-card__heading { width:100%; justify-content:space-between; }
    .qp-financial-page .qp-bs-card__tools { justify-content:flex-start; }
    .qp-financial-page .qp-financial-amount-col { width:130px; }
    .qp-financial-page .qp-connected-filter .qp-connected-list { grid-template-columns:minmax(0,1fr); }
    .qp-financial-page .qp-connected-filter .qp-side-empty { flex-wrap:wrap; }
}
@media print {
    .qp-financial-page { --qp-report-surface:#fff; --qp-report-grid:#ccc; --qp-report-root:#111; --qp-report-branch:#222; --qp-report-leaf:#222; }
    .qp-financial-page .qp-financial-header { padding-bottom:10px; }
    .qp-financial-page .qp-financial-breadcrumb { display:none; }
    .qp-financial-page .qp-bs-card { break-inside:auto; }
    html[data-theme] .qp-financial-page tbody tr:is(.qp-financial-tree-row.is-selected,.qp-row--selected,.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) > :is(td,th) { background:#fff; color:#111; }
    html[data-theme] .qp-financial-page :is(.qp-financial-tree-row.is-selected,.qp-row--selected,.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) :is(.qp-report-node-name,.qp-bs-code,.qp-report-row-code,.qp-code,.qp-number,.qp-money,.qp-financial-nature,.qp-bs-disclosure,.qp-tree-toggle,.qp-toggle,.qp-bs-line-meta,a,small) { color:#111; }
    html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table tbody tr:is(.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) > td { background:#fff!important; color:#111!important; }
    html[data-theme] .qp-financial-page .rz-data-grid .rz-grid-table tbody tr:is(.qp-grid-row-selected,.qp-selected-row,.rz-state-highlight) :is(.rz-cell-data,.rz-cell-data *) { color:#111!important; }
    .qp-financial-page :is(.qp-trial-table,.qp-pnl-table,.qp-bs-table,.qp-statement-table,.rz-grid-table) :is(td,th) { height:auto; min-height:0; padding:4px 6px; }
}
.qp-financial-page:is(.qp-pnl-screen,.qp-balance-page) .qp-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.qp-financial-page .qp-filter-grid > :is(.qp-actions-wrap,.qp-field--actions) { grid-column:1 / -1; }

/* Revision 13: a consistent report rhythm, independent of Bootstrap card margins. */
.qp-report-page.qp-financial-page{padding:28px 28px 44px;display:flex;flex-direction:column;gap:24px}.qp-report-page.qp-financial-page>:is(header,.qp-filter-card,.qp-report-header,.qp-report-scope-bar,.qp-grid-toolbar,.qp-stats-grid,.qp-financial-document,.qp-grid-card,.qp-main-layout){margin-block:0}.qp-financial-document{display:flex;flex-direction:column;gap:20px;min-width:0}.qp-financial-document>[data-report-screen]{display:flex;flex-direction:column;gap:20px}.qp-financial-document>[data-report-screen]>*{margin-block:0}.qp-financial-document>[data-report-export][hidden]{display:none}.qp-balance-grid{gap:26px!important;align-items:start}.qp-balance-column{display:flex;flex-direction:column;gap:24px}.qp-balance-column>.qp-statement-card{margin:0!important;border-radius:19px;overflow:hidden;box-shadow:0 8px 25px #1c3c3105}.qp-statement-card[data-statement-side=assets]{--statement-accent:#087f6b;--statement-soft:#e5f5ef;border-color:#b8dfd2}.qp-statement-card[data-statement-side=liabilities]{--statement-accent:#c54760;--statement-soft:#fff0f2;border-color:#edc3cc}.qp-statement-card[data-statement-side=equity]{--statement-accent:#2876b3;--statement-soft:#eaf4fc;border-color:#bfd9ec}.qp-statement-card[data-statement-side] .qp-statement-card-head{background:var(--statement-soft);color:var(--statement-accent);padding:21px}.qp-statement-card[data-statement-side] .qp-statement-card-head h2,.qp-statement-card[data-statement-side] .qp-statement-card-head>bdi{color:var(--statement-accent)}.qp-statement-card[data-statement-side] .qp-statement-card-icon{color:var(--statement-accent);background:#ffffff99}.qp-statement-card[data-statement-side] .qp-compact-statement tfoot{background:var(--statement-soft);color:var(--statement-accent)}.qp-compact-statement td,.qp-compact-statement th{padding-block:15px!important}.qp-statement-toggle{min-width:30px;min-height:30px}.qp-balance-equation{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 20px minmax(0,1fr);gap:15px;align-items:center;padding:0 0 5px}.qp-balance-equation>div{padding:23px 19px;border:1px solid;border-radius:18px;display:grid;gap:11px;min-width:0}.qp-balance-equation span{font-size:12px;font-weight:650}.qp-balance-equation strong{font-size:clamp(17px,1.7vw,24px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.qp-balance-equation small{font-size:10px;opacity:.75}.qp-balance-equation>.assets{color:#087f6b;background:#e5f5ef;border-color:#b8dfd2}.qp-balance-equation>.liabilities{color:#c54760;background:#fff0f2;border-color:#edc3cc}.qp-balance-equation>.equity{color:#2876b3;background:#eaf4fc;border-color:#bfd9ec}.qp-balance-equation>b{font:600 24px system-ui;text-align:center;color:var(--ui-muted)}
.qp-commerce-report{display:flex;flex-direction:column;gap:24px}.qp-commerce-report>:is(.qp-v12-hero,.qp-v12-card,.qp-v12-grid,.qp-v12-notice,.qp-commerce-aging){margin:0}.qp-commerce-tools{gap:18px!important}.qp-commerce-report>.qp-v12-card:last-of-type{padding:0}.qp-commerce-report .qp-commerce-metrics{gap:18px}.qp-commerce-report .qp-v12-metric{border-radius:18px}.qp-commerce-report .qp-commerce-aging{gap:16px}.qp-commerce-report .qp-v12-pagination{padding:20px}.qp-report-page .qp-report-scope-bar{padding:16px 20px;line-height:1.9}.qp-report-page .qp-statement-tools{padding:18px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:15px;gap:18px}.qp-report-page .qp-statement-readme{font-size:11px;gap:16px}.qp-report-page .qp-statement-reconciliation{padding:19px;border-radius:14px}.qp-report-page .qp-statement-name{line-height:1.9}.qp-report-page .qp-statement-amount-link{border-radius:7px;padding:5px 7px}.qp-report-page .qp-statement-amount-link:hover{background:var(--ui-primary-soft)}
@media(max-width:1100px){.qp-report-page.qp-financial-page{padding:24px 18px 36px;gap:20px}.qp-balance-equation{gap:10px}.qp-balance-equation>div{padding:18px 14px}.qp-balance-grid{gap:20px!important}.qp-balance-column{gap:20px}}
@media(max-width:700px){.qp-report-page.qp-financial-page{padding:18px 12px 30px;gap:18px}.qp-balance-equation{grid-template-columns:1fr;gap:8px}.qp-balance-equation>div{grid-template-columns:1fr auto;align-items:center;padding:17px}.qp-balance-equation>div small{grid-column:2;text-align:left}.qp-balance-equation>b{font-size:18px}.qp-commerce-report{gap:18px}.qp-commerce-report .qp-commerce-metrics{gap:12px}.qp-commerce-tools{grid-template-columns:1fr!important}.qp-commerce-report .qp-commerce-result-heading{align-items:flex-start;flex-direction:column;gap:18px}.qp-balance-grid{grid-template-columns:1fr!important}.qp-balance-equation strong{font-size:20px}}
@media print{.qp-report-page.qp-financial-page{padding:0;display:block}.qp-financial-document{display:block}.qp-financial-document>[data-report-screen]{display:none!important}.qp-report-export-surface [data-report-export]{margin-block:7mm}.qp-report-export-surface table{border-collapse:collapse;break-inside:auto}.qp-report-export-surface caption{display:table-caption;text-align:right;font-size:11pt;font-weight:700;padding:4mm 0}.qp-report-export-surface tbody tr{break-inside:avoid}.qp-report-export-surface [data-report-meta]{margin-bottom:4mm;line-height:1.9}}
