/* Additive FY2026 reporting/pivot release: do not alter import or ledger styling. */
.pq-fiscal-root { --pqf-ink: #17233a; --pqf-line: rgba(123,142,170,.3); display:grid; gap:14px; margin:16px 0 24px; color:var(--pq-text-primary,inherit); }
.pq-fiscal-toolbar {display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pq-fiscal-card {border:1px solid var(--pqf-line);border-radius:14px;padding:16px;background:var(--pq-card-bg,var(--pq-surface,#fff));box-shadow:0 3px 12px rgba(0,0,0,.045)}
.pq-fiscal-card h2,.pq-fiscal-card h3 {margin:0 0 8px;font-size:1.17rem}
.pq-fiscal-card p,.pq-fiscal-card small{line-height:1.4}
.pq-fiscal-control {display:grid;gap:5px;min-width:130px;flex:1}
.pq-fiscal-control > span {font-size:.81rem;opacity:.85;font-weight:650}
.pq-fiscal-root input:not([type=checkbox]),.pq-fiscal-root select {border:1px solid var(--pqf-line);border-radius:9px;padding:9px 10px;min-height:39px;background:var(--pq-input-bg,var(--pq-surface,#fff));color:inherit;max-width:100%;font:inherit}
.pq-fiscal-root button {cursor:pointer;border-radius:9px;border:1px solid var(--pqf-line);padding:9px 12px;background:var(--pq-card-bg,var(--pq-surface,#fff));color:inherit;font:inherit;min-height:38px;line-height:1.22}
.pq-fiscal-root button:hover{filter:brightness(.95)}
.pq-fiscal-root button:focus-visible,.pq-fiscal-root input:focus-visible{outline:3px solid #568ed0;outline-offset:2px}
.pq-fiscal-root button.pq-fiscal-primary {background:#243f66;color:#fff;border-color:#243f66}
.pq-fiscal-root button:disabled{opacity:.48;cursor:not-allowed}
.pq-fiscal-toggles{display:flex;flex-wrap:wrap;gap:8px}
.pq-fiscal-toggles button[aria-pressed=true]{border:2px solid #4b80bc;font-weight:750}
.pq-fiscal-note {border-left:3px solid #a2b2ca;padding:8px 12px;background:rgba(120,140,170,.08);font-size:.89rem}
.pq-fiscal-status {min-height:22px;font-size:.9rem}
.pq-fiscal-error {color:#a42a28;font-weight:650}
.pq-fiscal-period-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(194px,1fr));gap:8px;margin-top:10px;}
.pq-fiscal-check {display:flex;align-items:center;gap:10px;border:1px solid var(--pqf-line);border-radius:9px;padding:10px;background:var(--pq-card-bg,var(--pq-surface,#fff));cursor:pointer}
.pq-fiscal-check input{width:17px;height:17px;flex:none}
.pq-fiscal-check strong{display:block;font-size:.94rem}
.pq-fiscal-check small{display:block;opacity:.75;margin-top:2px;font-size:.78rem}
.pq-fiscal-summary {display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:.9rem}
.pq-fiscal-root details{border-top:1px solid var(--pqf-line);margin-top:8px;padding-top:9px}
.pq-fiscal-root summary{cursor:pointer;font-weight:650}
.pq-fiscal-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px;margin-top:12px}
.pq-fiscal-preview{max-height:560px;overflow:auto;overscroll-behavior:contain}
.pq-fiscal-paper {font-family:Arial,Helvetica,sans-serif;color:#151515!important;background:#fff!important;border:1px solid #ddd;box-shadow:0 7px 28px rgba(0,0,0,.12);max-width:830px;margin:8px auto 30px;padding:35px 46px;font-size:12px;line-height:1.5;}
.pq-fiscal-paper h2,.pq-fiscal-paper h3,.pq-fiscal-paper h4 {color:#111!important;margin:14px 0 7px;font-weight:700}
.pq-fiscal-paper h2{font-size:18px;text-align:center}.pq-fiscal-paper h3{font-size:14px;border-bottom:1px solid #333;padding-bottom:5px}
.pq-fiscal-paper header{text-align:center;border-bottom:2px solid #333;padding-bottom:14px;margin-bottom:14px}
.pq-fiscal-paper header h2{margin:5px 0}
.pq-fiscal-paper header .pq-fiscal-dates{font-weight:bold}
.pq-fiscal-paper .pq-fiscal-paper-logo{width:85px;max-height:70px;object-fit:contain;float:left}
.pq-fiscal-paper .pq-fiscal-table{border-collapse:collapse;width:100%;font-size:11px;margin:10px 0 18px}
.pq-fiscal-paper .pq-fiscal-table th,.pq-fiscal-paper .pq-fiscal-table td{padding:5px 7px;border-bottom:1px solid #e6e6e6;text-align:left;vertical-align:top;color:#171717!important}
.pq-fiscal-paper .pq-fiscal-table td:last-child,.pq-fiscal-paper .pq-fiscal-table th:last-child{text-align:right;white-space:nowrap}
.pq-fiscal-paper .pq-fiscal-table .pq-fiscal-sub td:first-child{padding-left:22px}
.pq-fiscal-paper .pq-fiscal-table .pq-fiscal-bold{font-weight:700;background:#f6f6f6}
.pq-fiscal-paper .pq-fiscal-cert{display:flex;justify-content:space-between;gap:24px;margin-top:38px}
.pq-fiscal-paper .pq-fiscal-cert span{display:block;flex:1;border-top:1px solid #171717;padding-top:6px}
.pq-fiscal-active-pivot .pq-finance-pivot-builder,.pq-fiscal-active-pivot .pq-finance-pivot-runbar,.pq-fiscal-active-pivot .pq-pivot-result,.pq-fiscal-active-pivot [data-pivot-host]{display:none!important}
/* Keep the existing Realm report-template/branding editor available. */
.pq-fiscal-active-report .pq-finance-export-center > div:first-child,
.pq-fiscal-active-report .pq-finance-export-center > label,
.pq-fiscal-active-report .pq-finance-export-center > .pq-finance-report-actions,
.pq-fiscal-active-report [data-report-host]{display:none!important}
.pq-fiscal-active-report .pq-finance-export-center > details.pq-finance-report-template-editor{display:block!important}
.pq-fiscal-pivot-grid {display:grid;grid-template-columns:minmax(170px,1fr) minmax(0,2.6fr);gap:14px}
.pq-fiscal-fields{border:1px solid var(--pqf-line);padding:10px;border-radius:11px;min-width:0;max-height:450px;overflow:auto}
.pq-fiscal-fields-group{font-size:.79rem;font-weight:750;margin:12px 0 4px;opacity:.75}
.pq-fiscal-field {display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%;text-align:left;overflow-wrap:anywhere;margin:4px 0;font-size:.85rem;cursor:grab!important}
.pq-fiscal-field[draggable=true]::before{content:'⋮⋮';opacity:.7}
.pq-fiscal-zones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
.pq-fiscal-zone{border:1px dashed #95a6bc;border-radius:10px;padding:9px;min-height:111px;min-width:0}
.pq-fiscal-zone header{font-weight:750;margin-bottom:8px}
.pq-fiscal-zone[aria-dropeffect=move]{border-color:#367bc9;background:rgba(60,130,210,.06)}
.pq-fiscal-chip{border:1px solid var(--pqf-line);border-radius:9px;padding:5px 7px;display:flex;align-items:center;justify-content:space-between;gap:5px;margin:4px 0;overflow-wrap:anywhere;min-width:0;background:rgba(146,160,180,.07)}
.pq-fiscal-chip > span{min-width:0;font-size:.84rem}
.pq-fiscal-chip button{padding:3px 7px;min-height:28px!important;font-size:.85rem}
.pq-fiscal-chip input{max-width:100%!important;min-width:0}
.pq-fiscal-matrix{overflow:auto;max-height:660px;position:relative;border:1px solid var(--pqf-line);border-radius:9px}
.pq-fiscal-matrix table{border-collapse:separate;border-spacing:0;min-width:100%;font-size:.86rem;white-space:nowrap}
.pq-fiscal-matrix th,.pq-fiscal-matrix td{padding:9px 10px;border-bottom:1px solid var(--pqf-line);text-align:right;white-space:nowrap}
.pq-fiscal-matrix td:first-child,.pq-fiscal-matrix th:first-child{text-align:left;position:sticky;left:0;background:var(--pq-card-bg,#fff);z-index:2}
.pq-fiscal-matrix thead th{position:sticky;top:0;z-index:3;background:var(--pq-card-bg,#fff)}
.pq-fiscal-matrix thead th:first-child{z-index:4}
.pq-fiscal-matrix button.pq-fiscal-drill{border:none;background:transparent;text-decoration:underline;min-height:20px;padding:2px;font-variant-numeric:tabular-nums;color:inherit}
.pq-fiscal-drill-panel{border-top:1px solid var(--pqf-line);margin-top:10px;padding-top:10px}
.pq-fiscal-drill-panel .pq-fiscal-drill-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:7px 0;border-bottom:1px solid var(--pqf-line)}
.pq-fiscal-drill-panel .pq-fiscal-drill-row span{flex:1;min-width:130px;font-size:.85rem}
.pq-fiscal-layout-row{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:5px 0;border-bottom:1px solid var(--pqf-line)}
.pq-fiscal-layout-row > span{flex:1}
@media(max-width:690px){.pq-fiscal-card{padding:12px}.pq-fiscal-pivot-grid{grid-template-columns:1fr}.pq-fiscal-zones{grid-template-columns:1fr}.pq-fiscal-paper{padding:22px 18px}.pq-fiscal-paper .pq-fiscal-table{font-size:10px}.pq-fiscal-period-grid{grid-template-columns:1fr}}
/* Keep every panel within narrow Android Finance viewports. */
.pq-fiscal-root,.pq-fiscal-root * {box-sizing:border-box}
.pq-fiscal-root,.pq-fiscal-card,.pq-fiscal-pivot-grid,.pq-fiscal-pivot-grid > *, .pq-fiscal-toolbar,.pq-fiscal-control {min-width:0;max-width:100%}
.pq-fiscal-root .pq-fiscal-control > input,.pq-fiscal-root .pq-fiscal-control > select {width:100%;min-width:0}
.pq-fiscal-root .pq-fiscal-zone select {width:100%;min-width:0}
.pq-fiscal-root .pq-fiscal-toolbar button {max-width:100%;overflow-wrap:anywhere}
@media(max-width:690px){
 .pq-fiscal-root .pq-fiscal-toolbar>.pq-fiscal-control{flex:1 1 100%;width:100%;}
 .pq-fiscal-root .pq-fiscal-toolbar{align-items:stretch;}
 .pq-fiscal-root .pq-fiscal-fields,.pq-fiscal-root .pq-fiscal-zones,.pq-fiscal-root .pq-fiscal-zone{width:100%;}
 .pq-fiscal-root .pq-fiscal-matrix{width:100%;}
 .pq-fiscal-root .pq-fiscal-field{white-space:normal;}
}

.pq-fiscal-sub-layout{margin-left:18px;font-size:.9rem;padding-left:8px;border-left:2px solid var(--pqf-line)}
.pq-fiscal-layout-row button{min-width:37px}

/* FY-specific reporting period editor, legible on narrow mobile screens. */
.pq-fiscal-period-list{display:grid;gap:7px;margin:12px 0}
.pq-fiscal-period-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px;border:1px solid var(--pqf-line);border-radius:9px;flex-wrap:wrap}
.pq-fiscal-period-label{display:grid;gap:2px;flex:1 1 170px;min-width:0}
.pq-fiscal-period-label small,.pq-fiscal-period-fixed small{display:block;opacity:.72;font-size:.78rem;line-height:1.35}
.pq-fiscal-period-actions{display:flex;gap:5px;align-items:center;justify-content:flex-end;flex:1 1 290px;flex-wrap:wrap}
.pq-fiscal-period-actions input[type=date]{flex:1 1 140px;max-width:200px;min-width:130px}
.pq-fiscal-root .pq-fiscal-period-actions button{min-height:39px;padding:8px 9px;flex:0 0 auto}
.pq-fiscal-period-fixed{font-size:.83rem;flex:1 1 180px;text-align:right}
.pq-fiscal-period-error{color:#a42a28;font-weight:650;padding:10px;border:1px solid #a42a28;border-radius:8px;margin:9px 0}
.pq-fiscal-period-reason{margin:12px 0}
@media(max-width:690px){.pq-fiscal-period-row{align-items:stretch}.pq-fiscal-period-actions{justify-content:space-between}.pq-fiscal-period-fixed{text-align:left}}

/* FY2026 Pivot UX: scoped theme tokens, expandable income/expense hierarchy. */
.pq-fiscal-root {
  --pqf-surface:#fff; --pqf-text:#1c293e; --pqf-soft:#f5f8fc;
  --pqf-highlight:#e9f2fc; --pqf-border:#d3dce8;
  --pqf-link:#17559b; --pqf-muted:#52657e; --pqf-total:#e1ecf9;
  --pqf-income:#086d48; --pqf-expense:#a43a39;
  color:var(--pqf-text)!important;
}
html[data-pq-theme="dark"] .pq-fiscal-root,
[data-pq-theme="dark"] .pq-fiscal-root {
  --pqf-surface:#151e2c; --pqf-text:#f0f5fc; --pqf-soft:#202d3e;
  --pqf-highlight:#2a3c56; --pqf-border:#40516b;
  --pqf-link:#a9d5ff; --pqf-muted:#c5d2e4; --pqf-total:#2a3e59;
  --pqf-income:#a6efce; --pqf-expense:#ffb5ad;
}
.pq-fiscal-root .pq-fiscal-card,
.pq-fiscal-root .pq-fiscal-fields,
.pq-fiscal-root .pq-fiscal-zone,
.pq-fiscal-root .pq-fiscal-drill-panel {
  background:var(--pqf-surface);
  color:var(--pqf-text);
  border-color:var(--pqf-border);
}
.pq-fiscal-root input:not([type=checkbox]),
.pq-fiscal-root select,
.pq-fiscal-root button:not(.pq-fiscal-primary):not(.pq-fiscal-drill):not(.pq-fiscal-tree-toggle){
  background:var(--pqf-soft);
  color:var(--pqf-text);
  border-color:var(--pqf-border);
}
.pq-fiscal-root .pq-fiscal-matrix {
  border:1px solid var(--pqf-border)!important;
  background:var(--pqf-surface)!important;
  color:var(--pqf-text)!important;
  overscroll-behavior:contain;
}
.pq-fiscal-root .pq-fiscal-matrix table,
.pq-fiscal-root .pq-fiscal-matrix tbody,
.pq-fiscal-root .pq-fiscal-matrix tr {
  color:var(--pqf-text)!important;
  background:var(--pqf-surface);
}
.pq-fiscal-root .pq-fiscal-matrix th,
.pq-fiscal-root .pq-fiscal-matrix td {
  padding:11px 12px;
  border-color:var(--pqf-border)!important;
  background:var(--pqf-surface)!important;
  color:var(--pqf-text)!important;
  font-variant-numeric:tabular-nums;
}
.pq-fiscal-root .pq-fiscal-matrix thead th {
  background:var(--pqf-soft)!important;
  color:var(--pqf-text)!important;
  font-size:.8rem;
  font-weight:750;
}
.pq-fiscal-root .pq-fiscal-matrix tfoot th,
.pq-fiscal-root .pq-fiscal-matrix tfoot td {
  background:var(--pqf-total)!important;
  color:var(--pqf-text)!important;
  font-weight:750;
}
.pq-fiscal-root .pq-fiscal-matrix tr.pq-fiscal-tree-primary th,
.pq-fiscal-root .pq-fiscal-matrix tr.pq-fiscal-tree-primary td {
  background:var(--pqf-highlight)!important;
  color:var(--pqf-text)!important;
  font-weight:750;
}
.pq-fiscal-root .pq-fiscal-matrix tr.pq-fiscal-tree-category th,
.pq-fiscal-root .pq-fiscal-matrix tr.pq-fiscal-tree-category td {
  background:var(--pqf-soft)!important;
  color:var(--pqf-text)!important;
  font-weight:650;
}
.pq-fiscal-root .pq-fiscal-matrix th:first-child {
  position:sticky;
  left:0;
  z-index:2;
  min-width:265px;
  max-width:365px;
  box-shadow:inset -1px 0 0 var(--pqf-border);
  text-align:left;
}
.pq-fiscal-root .pq-fiscal-matrix thead th {position:sticky;top:0;z-index:3;}
.pq-fiscal-root .pq-fiscal-matrix thead th:first-child{z-index:5;}
.pq-fiscal-root .pq-fiscal-matrix button.pq-fiscal-drill,
.pq-fiscal-root .pq-fiscal-matrix button.pq-fiscal-drill:hover {
  min-height:26px;
  padding:2px 4px;
  background:transparent!important;
  color:var(--pqf-link)!important;
  text-decoration:none;
  border:1px solid transparent!important;
  border-radius:4px;
  font-weight:650;
}
.pq-fiscal-root .pq-fiscal-matrix button.pq-fiscal-drill:hover,
.pq-fiscal-root .pq-fiscal-matrix button.pq-fiscal-drill:focus-visible {
  background:var(--pqf-highlight)!important;
  text-decoration:underline;
  border-color:var(--pqf-border)!important;
}
.pq-fiscal-root .pq-fiscal-year-total {background:var(--pqf-total)!important;}
.pq-fiscal-root .pq-fiscal-tree-inner {display:flex;align-items:center;gap:8px;padding-left:calc(var(--pqf-depth, 0) * 17px);white-space:normal;overflow-wrap:anywhere;line-height:1.3;}
.pq-fiscal-root .pq-fiscal-tree-toggle,.pq-fiscal-root .pq-fiscal-tree-toggle:hover {
  width:27px;min-width:27px;min-height:27px;padding:0;
  background:var(--pqf-highlight)!important;
  border:1px solid var(--pqf-border)!important;
  color:var(--pqf-text)!important;
  font-size:1.1rem;font-weight:700;
}
.pq-fiscal-root .pq-fiscal-tree-indent {display:inline-block;min-width:27px;}
.pq-fiscal-root .pq-fiscal-empty {color:var(--pqf-muted)!important;}
.pq-fiscal-root .pq-fiscal-month-tools {display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:4px 0 13px;}
.pq-fiscal-root .pq-fiscal-month-tools .pq-fiscal-control {flex:0 1 230px;}
.pq-fiscal-root .pq-fiscal-muted {font-size:.86rem;color:var(--pqf-muted);}
.pq-fiscal-root .pq-fiscal-matrix-intro {display:flex;align-items:center;gap:20px;justify-content:space-between;flex-wrap:wrap;margin:18px 0 12px;}
.pq-fiscal-root .pq-fiscal-matrix-intro h3 {margin:0;}
.pq-fiscal-root .pq-fiscal-kpis {display:flex;flex-wrap:wrap;gap:8px;}
.pq-fiscal-root .pq-fiscal-kpis>div {min-width:125px;display:grid;gap:5px;padding:9px 14px;border:1px solid var(--pqf-border);border-radius:10px;background:var(--pqf-soft);}
.pq-fiscal-root .pq-fiscal-kpis small {font-size:.8rem;color:var(--pqf-muted);}
.pq-fiscal-root .pq-fiscal-kpis strong {font-size:1.05rem;color:var(--pqf-text);}
.pq-fiscal-root .pq-fiscal-kpis>div:first-child strong {color:var(--pqf-income);}
.pq-fiscal-root .pq-fiscal-kpis>div:nth-child(2) strong {color:var(--pqf-expense);}
.pq-fiscal-root .pq-fiscal-drill-panel {border-top:2px solid var(--pqf-border);margin-top:18px;padding:16px 2px 5px;scroll-margin-top:80px;}
.pq-fiscal-root .pq-fiscal-drill-heading {display:flex;justify-content:space-between;gap:12px;align-items:start;flex-wrap:wrap;}
.pq-fiscal-root .pq-fiscal-drill-heading h3 {margin:0 0 5px;}
.pq-fiscal-root .pq-fiscal-drill-heading p {color:var(--pqf-muted);margin:0 0 12px;}
.pq-fiscal-root .pq-fiscal-details-list {display:grid;gap:9px;}
.pq-fiscal-root .pq-fiscal-detail-item {border:1px solid var(--pqf-border);border-radius:11px;background:var(--pqf-soft);padding:12px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(115px,max-content) max-content;gap:15px;align-items:center;}
.pq-fiscal-root .pq-fiscal-detail-main {display:grid;gap:5px;min-width:0;}
.pq-fiscal-root .pq-fiscal-detail-main>strong {font-size:.96rem;overflow-wrap:anywhere;}
.pq-fiscal-root .pq-fiscal-detail-main small {font-size:.83rem;color:var(--pqf-muted);line-height:1.4;overflow-wrap:anywhere;}
.pq-fiscal-root .pq-fiscal-detail-value {display:grid;text-align:right;gap:5px;font-variant-numeric:tabular-nums;}
.pq-fiscal-root .pq-fiscal-detail-value small {color:var(--pqf-muted);font-size:.78rem;}
.pq-fiscal-root .pq-fiscal-detail-actions {display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;}
.pq-fiscal-root .pq-fiscal-page-controls {display:flex;align-items:center;justify-content:center;gap:12px;padding:14px 0;}
.pq-fiscal-root .pq-fiscal-detail-wait {padding:15px;background:var(--pqf-soft);color:var(--pqf-text);border-radius:10px;}
.pq-fiscal-root .pq-fiscal-note {color:var(--pqf-text);}
@media(max-width:850px){
 .pq-fiscal-root .pq-fiscal-detail-item {grid-template-columns:minmax(0,1fr) max-content;}
 .pq-fiscal-root .pq-fiscal-detail-actions {grid-column:1 / -1;justify-content:flex-start;}
}
@media(max-width:540px){
 .pq-fiscal-root .pq-fiscal-matrix th:first-child {min-width:195px;max-width:255px;}
 .pq-fiscal-root .pq-fiscal-tree-inner {padding-left:calc(var(--pqf-depth, 0) * 10px);gap:5px;}
 .pq-fiscal-root .pq-fiscal-detail-item {grid-template-columns:minmax(0,1fr);}
 .pq-fiscal-root .pq-fiscal-detail-value {text-align:left;}
 .pq-fiscal-root .pq-fiscal-detail-actions{grid-column:auto;}
 .pq-fiscal-root .pq-fiscal-month-tools .pq-fiscal-control{flex:1 1 100%;}
}
/* Entire category label is the expand/collapse target, not just the arrow. */
.pq-fiscal-root .pq-fiscal-tree-inner button.pq-fiscal-tree-toggle,
.pq-fiscal-root .pq-fiscal-tree-inner button.pq-fiscal-tree-toggle:hover {
  display:inline-flex;align-items:center;gap:8px;
  width:auto;min-width:0;min-height:32px;
  padding:2px 5px 2px 0;
  border:1px solid transparent!important;
  background:transparent!important;
  color:var(--pqf-text)!important;
  white-space:normal;text-align:left;font-weight:inherit;font-size:inherit;
}
.pq-fiscal-root .pq-fiscal-tree-toggle .pq-fiscal-tree-chevron {
  display:inline-grid;place-items:center;
  width:27px;min-width:27px;height:27px;
  border:1px solid var(--pqf-border);border-radius:8px;
  background:var(--pqf-highlight);font-weight:700;font-size:1rem;
}
.pq-fiscal-root .pq-fiscal-tree-inner button.pq-fiscal-tree-toggle:hover {text-decoration:underline;}
