/* Shared table contract. One set of variables, independent of the module and its column types. */
:root{--r522-row:32px;--r522-inner:31px;--r522-hit:28px;--r522-actions:76px}
html[data-x520-density=standard]{--r522-row:44px;--r522-inner:43px;--r522-hit:32px}
html[data-x520-density=comfortable]{--r522-row:56px;--r522-inner:55px;--r522-hit:36px}
html[data-x520-density] .r522-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%}
html[data-x520-density] .r522-table .r522-row>td{box-sizing:border-box;height:var(--r522-row)!important;min-height:0!important;padding-top:0!important;padding-bottom:0!important;vertical-align:middle;border-top-width:0!important;border-bottom:1px solid #e1e8ee;line-height:1.2!important;overflow:hidden}
html[data-x520-density] .r522-row>td>.r522-cell{box-sizing:border-box;height:var(--r522-inner);min-height:0;max-height:var(--r522-inner);display:flex;align-items:center;gap:5px;min-width:0;width:100%;overflow:hidden;white-space:nowrap;line-height:1.2}
html[data-x520-density] .r522-cell :is(.nf-row-open,.nf-link,.fin52-child-open,.b57-select-hit,.icon-btn,.btn,.r522-more){box-sizing:border-box;min-height:var(--r522-hit)!important;height:var(--r522-hit)!important;max-height:var(--r522-hit);margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important;line-height:1.25!important;align-items:center}
html[data-x520-density] .r522-cell :is(.icon-btn,.r522-more){width:var(--r522-hit)!important;min-width:var(--r522-hit)!important;padding:3px!important;flex-shrink:0}
html[data-x520-density] .r522-cell :is(.nf-row-open,.nf-link){display:inline-flex;max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;flex-shrink:1}
html[data-x520-density] .r522-cell .nf-link>svg{flex-shrink:0;width:14px;height:14px}
html[data-x520-density] .r522-cell .c53-value{display:block;-webkit-line-clamp:unset;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25}
html[data-x520-density] .r522-cell .b57-name{display:flex;align-items:center;gap:5px;width:100%;min-width:0}
html[data-x520-density] .r522-cell .b57-name>div{display:flex;align-items:center;gap:5px;min-width:0;overflow:hidden}
html[data-x520-density] .r522-cell :is(small,.fin52-leaf-label,.fx19-parcel-tag,.h54-parent-ref){display:inline;white-space:nowrap;font-size:10px;line-height:1.2;margin:0;min-width:0;flex-shrink:1}
html[data-x520-density] .r522-cell .pill{box-sizing:border-box;max-height:24px;font-size:11px;line-height:16px!important;padding:2px 6px!important;white-space:nowrap;display:inline-flex;align-items:center;flex-shrink:0}
html[data-x520-density] .r522-cell .nf-calc{display:inline-block;flex:0 0 12px;width:12px;overflow:hidden;margin:0!important;line-height:16px;font-size:11px}
html[data-x520-density] .r522-cell .map046-preview{height:calc(var(--r522-inner) - 4px)!important;min-height:0!important;max-height:calc(var(--r522-inner) - 4px)!important;flex:1;margin:0!important;min-width:0}
html[data-x520-density] .r522-cell .map046-preview-caption{display:none}
html[data-x520-density] .r522-cell .map-neutral035{height:100%;padding:0;display:flex;align-items:center;justify-content:center;gap:6px}
html[data-x520-density] .r522-cell .map-neutral035 svg{width:16px;height:16px}
html[data-x520-density] .r522-actions>.r522-cell{justify-content:center;gap:4px}
.r522-more{box-sizing:border-box;border:1px solid #d4dfe7;background:#fff;border-radius:5px;color:#486374;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex:none}
.r522-more:hover{background:#edf4f7}.r522-more[aria-expanded=true]{background:#e6f1f4;border-color:#8daeb9}
.r522-more:focus-visible{outline:2px solid #176a89;outline-offset:-2px}
/* Parent financial rows use the same vertical budget. Identity, totals, scope and state stay available. */
html[data-x520-density] .r522-parent .fx19-parent-row{box-sizing:border-box;width:100%;height:var(--r522-inner);min-height:0;padding:0!important;gap:6px;display:grid;grid-template-columns:26px minmax(100px,1fr) minmax(75px,.24fr) minmax(190px,.4fr) auto;align-items:center}
html[data-x520-density] .r522-parent .fin52-toggle{min-height:var(--r522-hit)!important;height:var(--r522-hit);padding:0!important;gap:5px;min-width:0;overflow:hidden}
html[data-x520-density] .r522-parent .fin52-toggle>span:last-child{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;white-space:nowrap}
html[data-x520-density] .r522-parent .fin52-toggle b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;min-width:0;flex:1}
html[data-x520-density] .r522-parent .fx19-parent-label{flex:none;max-width:none;overflow:hidden}
html[data-x520-density] .r522-parent .fin52-toggle>svg{width:17px;flex:none}
html[data-x520-density] .r522-parent :is(.fx19-parent-states,.fx19-parent-total){display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap;min-width:0;overflow:hidden}
html[data-x520-density] .r522-parent .fx19-parent-states small{flex-shrink:0}
html[data-x520-density] .r522-parent .fx19-parent-total>.fin52-total{font-size:13px;flex-shrink:0;margin:0}
html[data-x520-density] .r522-parent .fx19-parent-total>small:last-child{max-width:0;overflow:hidden}
html[data-x520-density] .r522-parent .fx19-parent-actions{display:flex;align-items:center;gap:4px;justify-content:flex-end;min-width:0}
html[data-x520-density] .r522-parent .fx19-parent-select input{margin:0;display:block}
/* Expansion is local presentation, not a second API call or record edit. */
html[data-x520-density] .r522-table .r522-expanded>td{height:auto!important;vertical-align:top;padding-top:5px!important;padding-bottom:5px!important}
html[data-x520-density] .r522-expanded>td>.r522-cell{height:auto;min-height:var(--r522-inner);max-height:none;display:block;overflow:visible;white-space:normal;overflow-wrap:anywhere}
html[data-x520-density] .r522-expanded .r522-actions>.r522-cell{display:flex}
html[data-x520-density] .r522-expanded .r522-cell :is(.c53-value,.nf-row-open,.nf-link,.fin52-child-open){height:auto!important;max-height:none;white-space:normal;overflow:visible;-webkit-line-clamp:unset;overflow-wrap:anywhere}
html[data-x520-density] .r522-expanded .r522-cell :is(small,.fx19-parcel-tag,.h54-parent-ref){display:block;white-space:normal;margin-top:3px}
html[data-x520-density] .r522-expanded .r522-cell .nf-calc{width:auto;display:block;overflow:visible}
html[data-x520-density] .r522-expanded .r522-cell .b57-name>div{display:block;overflow:visible}
html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-row{height:auto;min-height:var(--r522-inner)}
html[data-x520-density] .r522-expanded.r522-parent .fin52-toggle{height:auto;max-height:none}
html[data-x520-density] .r522-expanded.r522-parent .fin52-toggle>span:last-child{display:block;white-space:normal;overflow:visible}
html[data-x520-density] .r522-expanded.r522-parent .fin52-toggle b{white-space:normal;overflow:visible}
html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-label{max-width:none}
html[data-x520-density] .r522-expanded.r522-parent :is(.fx19-parent-total,.fx19-parent-states){display:block;overflow:visible;white-space:normal}
html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-total>small:last-child{max-width:none;overflow:visible}
html[data-x520-density] .r522-related:not(.l58-card){box-sizing:border-box;min-height:var(--r522-row);padding:0 8px;gap:8px;margin:0;border-radius:0;border-width:0 0 1px;line-height:1.2}
/* Card purchases now use the same list, rather than a different card height for each purchase. */
.r522-card-list{overflow:hidden}.r522-card-list .nf-scroll{overflow:auto}.r522-card-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}
.r522-card-table th{padding:8px;text-align:left;font-size:11px;color:#526b7d;background:#f3f6f8;white-space:nowrap}.r522-card-table td{padding:0 8px}
.r522-card-table .r522-card-name{width:23%}.r522-card-table .r522-card-total{width:130px;text-align:right}.r522-card-table .r522-card-action{width:var(--r522-actions)}
.r522-card-table .r522-card-name button{border:0;background:none;text-align:left;font-size:13px;color:#214f66;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0;max-width:100%}
.r522-card-tools{display:flex;justify-content:flex-end;margin:8px 0}.r522-card-tools details{position:relative}.r522-card-tools summary{cursor:pointer;font-size:12px;padding:6px 10px;border:1px solid #d7e1e8;border-radius:6px;background:white}.r522-card-tools [data-r522-density-slot]{position:absolute;right:0;z-index:4;width:280px;padding:12px;border:1px solid #d7e1e8;background:white;border-radius:8px;box-shadow:0 5px 14px #213b4b18}
.r522-card-tools .x520-density-label{margin:0}
@media(pointer:coarse),(max-width:650px){
 html[data-x520-density]{--r522-row:48px;--r522-inner:47px;--r522-hit:44px;--r522-actions:98px}
 html[data-x520-density=standard]{--r522-row:56px;--r522-inner:55px}
 html[data-x520-density=comfortable]{--r522-row:64px;--r522-inner:63px}
 html[data-x520-density] .r522-cell .b57-select-hit{min-width:44px}
 html[data-x520-density] .r522-parent .fx19-parent-row{grid-template-columns:26px minmax(90px,1fr) minmax(100px,.65fr) auto}
 html[data-x520-density] .r522-parent .fx19-parent-states{display:none}
 html[data-x520-density] .r522-parent .fx19-parent-total{display:block;text-align:right;line-height:1.1}
 html[data-x520-density] .r522-parent .fx19-parent-total>.fx19-filter-total{display:block;font-size:9px}
 html[data-x520-density] .r522-parent .fin52-toggle>span:last-child{display:block}
 html[data-x520-density] .r522-parent .fx19-parent-label{max-width:none;display:block;font-size:9px}
 html[data-x520-density] .r522-parent .fin52-toggle>span:last-child>small:last-child{display:none}
 html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-row{grid-template-columns:26px minmax(90px,1fr) auto}
 html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-states{display:block;grid-column:2;grid-row:2}
 html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-total{grid-column:2;grid-row:3;text-align:left}
 html[data-x520-density] .r522-expanded.r522-parent .fx19-parent-actions{grid-column:3;grid-row:1}
 html[data-x520-density] .r522-expanded.r522-parent .fin52-toggle>span:last-child>small:last-child{display:block}
 .r522-card-table .r522-card-secondary{display:none}.r522-card-table .r522-card-name{width:auto}.r522-card-table .r522-card-total{width:105px}
}
@media print{.r522-more{display:none}html[data-x520-density] .r522-row>td>.r522-cell{height:auto;max-height:none;overflow:visible;white-space:normal}html[data-x520-density] .r522-cell .c53-value{white-space:normal;overflow:visible}}

html[data-x520-density] .r522-cell .nf-row-open{display:block;text-overflow:ellipsis}
html[data-x520-density] .r522-table .h54-group-head td{padding-top:0!important;padding-bottom:0!important;height:var(--r522-row)}
html[data-x520-density] .r522-table .h54-group{padding-top:0;padding-bottom:0;min-height:var(--r522-row);height:var(--r522-row)}
/* A financial label must never squeeze the actual parcel identifier into multiple lines. */
html[data-x520-density] .r522-row:not(.r522-expanded) .fx19-parcel-tag{display:none}
html[data-x520-density] .r522-row:not(.r522-expanded) .r522-cell .nf-row-open{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;min-width:0}
html[data-x520-density] .r522-row:not(.r522-expanded) .r522-cell>small:not(.nf-calc){overflow:hidden;text-overflow:ellipsis;flex:1 1 0}
html[data-x520-density] tr[data-fin52-leaf]:not(.r522-expanded) td[data-c53-col=name] .nf-row-open{flex-shrink:0}
html[data-x520-density] .r522-expanded .fx19-parcel-tag{display:block}
html[data-x520-density] .r522-expanded .r522-cell .nf-row-open{white-space:normal!important}
html[data-x520-density] .r522-cell .nf-calc{white-space:nowrap}
@media(pointer:coarse),(max-width:650px){
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-row{grid-template-columns:24px minmax(40px,1fr) 94px auto;gap:4px}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-select{grid-column:1;grid-row:1}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fin52-toggle{grid-column:2;grid-row:1}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-total{grid-column:3;grid-row:1;align-self:center;margin:0}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-actions{grid-column:4;grid-row:1}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-total>.fin52-total{font-size:12px;display:block;line-height:15px}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-total small:not(.fx19-filter-total){display:none}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-parent-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fin52-toggle>span:last-child{display:block;overflow:hidden}
 html[data-x520-density] .r522-parent:not(.r522-expanded) .fx19-filter-total{font-size:8px;letter-spacing:0;white-space:nowrap}
}
html[data-x520-density] .r522-cell .r522-card-mobile-details{display:none}
@media(pointer:coarse),(max-width:650px){html[data-x520-density] .r522-expanded .r522-cell .r522-card-mobile-details{display:block;white-space:normal;overflow-wrap:anywhere}}
.r522-total-summary{display:none;font-size:11px;font-weight:650;white-space:normal;line-height:1.2}
html[data-x520-density] .r522-mixed-total:not(.r522-expanded) .fx19-parent-total>:not(.fx19-filter-total):not(.r522-total-summary){display:none}
html[data-x520-density] .r522-mixed-total:not(.r522-expanded) .r522-total-summary{display:block}

/* The base table's 700px floor is for generic grids, not the mobile card-purchase list. */
html[data-x520-density] .nf-table .r522-card-table{min-width:0!important;width:100%}
html[data-x520-density] .r522-card-table td:first-child{min-width:0}
html[data-x520-density] .r522-card-table .r522-expanded .r522-card-name button{height:auto!important;max-height:none;white-space:normal;overflow-wrap:anywhere}
