/* Each table is a stacking context: pinned body/header cells cannot overlay parent headers. */
.mg-workspace table{position:relative;isolation:isolate;z-index:0}
.mg-workspace.mg-compact table[data-report-sticky-head]>thead{position:sticky!important;top:var(--report-head-top,0px)!important;z-index:3!important}
.mg-workspace .mgt-ready .mgt-pinned{z-index:1!important}
.mg-workspace .mgt-ready>thead .mgt-pinned{z-index:1!important}
.mg-workspace .mg-ledger>tfoot{z-index:2!important}
.mg-workspace .mg-order-scroll,.mg-workspace .ads-order-scroll{overflow:visible!important}
.mg-workspace .mg-month-scroll:has(.mg-payments){max-height:65vh;overflow:auto}
/* Compact rows keep the same readable 12 px type; only padding and control height shrink. */
.mg-workspace.mg-compact .mg-ledger>tbody>.mg-day>th,.mg-workspace.mg-compact .mg-ledger>tbody>.mg-day>td,
.mg-workspace.mg-compact .mg-ledger>tbody>.mg-month>th,.mg-workspace.mg-compact .mg-ledger>tbody>.mg-month>td{height:26px!important;padding:2px 6px!important;line-height:1.1!important}
.mg-workspace.mg-compact .mg-day-button{min-height:20px!important;padding:1px 0!important}
.mg-workspace.mg-compact .mg-orders>tbody>.mg-order>td,.mg-workspace.mg-compact .mg-orders>tbody>.mg-order>th{padding:3px 7px!important;line-height:1.15!important}
.mg-workspace.mg-compact .mgt-sort{padding:4px 6px!important;min-height:24px!important}
.mg-workspace .mgt-filter-row input{min-height:22px;padding:2px 4px}
.report-day-finance{border:1px solid #bad3c5;background:#fff;margin:0 0 8px;max-inline-size:calc(100cqi - 48px)}
.report-day-finance>summary{display:flex;align-items:center;gap:7px;padding:6px 8px;background:#e8f2ed;color:#225641;cursor:pointer;font-size:11px;list-style:none}
.report-day-finance>summary::-webkit-details-marker{display:none}.report-day-finance[open]>summary>.mg-chevron{transform:rotate(90deg)}
.report-day-finance>summary strong{margin-left:auto;font:700 12px ui-monospace,Consolas,monospace;white-space:nowrap}
.report-finance-body{padding:7px 8px}.report-finance-equation{display:flex;flex-wrap:wrap;gap:6px 15px;padding:3px 0 8px;font-size:11px;color:#536e62}
.report-finance-equation b{font:700 13px ui-monospace,Consolas,monospace;color:#153747;margin-left:4px}.report-finance-net{margin-left:auto;color:#126148;font-weight:700}
.report-cost-table{min-width:500px;width:100%;font-size:11px!important}.report-cost-table th,.report-cost-table td{padding:4px 7px!important;border-bottom:1px solid #dbe6df;text-align:left;font-size:11px!important;white-space:nowrap}
.report-cost-table thead th{background:#e2eee7;color:#365c48;text-transform:none;letter-spacing:0}.report-cost-table tfoot th,.report-cost-table tfoot td{background:#edf4f0;font-weight:700;border-top:1px solid #bad3c5}
.report-cost-table .report-campaign-name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.report-finance-note,.report-finance-warning{margin:5px 0 0;font-size:10px;line-height:1.4;color:#60796c}.report-finance-warning{color:#95530a}.report-finance-body{overflow-x:auto;min-width:0}
.mg-workspace .report-order-formula{width:100%;max-width:650px;border-collapse:collapse}.report-order-formula th,.report-order-formula td{padding:6px 8px!important;text-align:right;border:1px solid #d4e0d9;background:white;font-size:12px}.report-order-formula thead th{background:#e3efe7;color:#315c46}.report-order-formula td:last-child{font-weight:700;color:#126148}
@media(max-width:650px){.report-day-finance>summary{flex-wrap:wrap}.report-day-finance>summary strong{margin-left:22px;font-size:11px}.report-finance-net{margin-left:0}.report-day-finance{max-inline-size:calc(100cqi - 38px)}}

/* Daily costs continue directly after the order ledger, without a collapsible control. */
.ads-budget .report-finance-static{margin:12px 0 28px;border:1px solid #9ebfaf;border-radius:0}
.ads-budget .report-finance-heading{padding:7px 8px;background:#e7f0eb;border-bottom:1px solid #bad3c5}
.ads-budget .report-finance-heading h3{margin:0;font:700 12px ui-monospace,Consolas,monospace;color:#204936;text-transform:none}
.ads-budget .report-finance-static .report-finance-body{padding:0}
.ads-budget .report-finance-static .report-cost-table{border-collapse:collapse}
.ads-budget .report-finance-static .report-marketing-total>*{background:#17604c!important;color:#fff!important;border-color:#17604c!important;padding:7px 8px!important;font-weight:700}
.ads-budget .report-finance-static .report-net-total>*{background:#102f43!important;color:#fff!important;border-color:#102f43!important;padding:10px 8px!important}
.ads-budget .report-net-total th>span{display:inline;font-size:13px;color:#fff}
.ads-budget .report-net-total small{display:inline;margin-left:12px;font-weight:400;font-size:11px;color:#dce8ee}
.ads-budget .report-net-total td{font-size:15px!important;font-weight:800}
.ads-budget .report-finance-static .report-finance-note,.ads-budget .report-finance-static .report-finance-warning{padding:0 8px;margin:6px 0}
.ads-budget .mg-day-detail>.mg-day-body{padding-bottom:10px}
@media(max-width:650px){.ads-budget .report-net-total small{display:block;margin:4px 0 0}.ads-budget .report-finance-static{margin-bottom:30px}}

.ads-budget .ads-ledger>tfoot>tr>th,.ads-budget .ads-ledger>tfoot>tr>td{background:#17604c!important;color:#fff!important;border-color:#17604c!important;font-weight:750}

/* Shared refresh icon: stable size, balanced strokes and explicit progress state. */
.btn .icon-refresh{display:block;width:16px;height:16px;flex:0 0 16px;stroke-width:1.8;transform-origin:center;transform-box:fill-box}
.btn:has(.icon-refresh){gap:7px}
.btn[aria-busy="true"] .icon-refresh{animation:report-refresh-spin 1.1s linear infinite}
.btn[aria-busy="true"]{cursor:progress}
@keyframes report-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.btn[aria-busy="true"] .icon-refresh{animation:none}}
