.af-board,.af-dialog{--af-bg:var(--surface,#fff);--af-ink:var(--text,#29231f);--af-line:var(--border,#e3d7ce);--af-muted:var(--muted,#80766d);color:var(--af-ink);font-size:12px;line-height:1.3;min-width:0}.af-board{border:1px solid var(--af-line);border-radius:7px;margin-top:8px;background:var(--af-bg)}.af-board>summary{cursor:pointer;font-size:11px;font-weight:600;padding:7px 9px}.af-board [data-af-board-body]{padding:0 9px 8px}.af-board select,.af-board button,.af-dialog select,.af-dialog input:not([type=checkbox]),.af-dialog textarea,.af-dialog button,.af-card-button{border:1px solid var(--af-line,var(--border,#e3d7ce));background:var(--af-bg,var(--surface,#fff));color:inherit;border-radius:6px;font:inherit;font-size:11px;min-height:30px;padding:5px 8px;max-width:100%;box-sizing:border-box}.af-card-button{min-height:28px!important;width:100%;padding:4px 5px!important;font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.af-card-heading{width:90px}.af-rub-note{color:#8b672e!important;font-size:10px!important;line-height:1.15!important;margin-top:2px!important}.af-filters,.af-buttons{display:flex;gap:6px;align-items:flex-end;flex-wrap:wrap}.af-filters label,.af-dialog label{display:grid;gap:3px;min-width:0;color:var(--af-muted);font-size:11px}.af-filters select{min-width:190px}.af-note{font-size:10px;color:var(--af-muted);line-height:1.3;margin:5px 0}.af-warning{font-size:11px;color:#a66018}.af-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px}.af-table th{text-align:left;font-size:10px;color:var(--af-muted);font-weight:600;background:color-mix(in srgb,var(--af-ink) 4%,var(--af-bg));padding:5px}.af-table td{padding:5px;border-bottom:1px solid var(--af-line);overflow-wrap:anywhere;vertical-align:middle}.af-table small{display:block;font-size:10px;color:var(--af-muted)}.af-board details>summary{font-size:11px;cursor:pointer;padding:6px 0}.af-pager{display:flex;gap:5px;align-items:center;justify-content:flex-end;font-size:10px;margin-top:5px}.af-pager span{margin-right:auto}.af-dialog{background:var(--af-bg);border:1px solid var(--af-line);border-radius:9px;padding:0;width:min(760px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}.af-dialog::backdrop{background:#16110d80}.af-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border-bottom:1px solid var(--af-line);background:var(--af-bg);position:sticky;top:0;z-index:1}.af-dialog h2{font-size:16px;margin:0}.af-dialog-body{padding:8px 11px}.af-dialog-body>p{margin:0 0 7px;overflow-wrap:anywhere}.af-dialog form{display:grid;gap:7px}.af-dialog button{cursor:pointer}.af-dialog button:disabled{opacity:.5;cursor:default}.af-dialog textarea{width:100%;min-height:55px;resize:vertical}.af-allocation-line{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(90px,.8fr) 32px;gap:6px;align-items:end;margin-bottom:5px}.af-dialog .af-check{display:flex;align-items:center;gap:6px}.af-check input{accent-color:#c44d24}.af-detail-note{display:flex;gap:6px 14px;align-items:center;flex-wrap:wrap;padding:6px 8px;border:1px solid var(--border,#e3d7ce);border-radius:6px;margin-bottom:6px;font-size:11px}.af-detail-note .af-card-button{width:auto;max-width:180px}.af-reporting .ar-partners th:first-child{width:19%}.af-reporting .ar-partners th:nth-child(2){width:5%}.af-reporting .ar-partners th:nth-child(3),.af-reporting .ar-partners th:nth-child(4),.af-reporting .ar-partners th:nth-child(5),.af-reporting .ar-partners th:nth-child(6){width:10%}.af-reporting .ar-partners th:nth-child(7){width:16%}.af-reporting .ar-partners th:nth-child(8){width:9%}.af-reporting .ar-partners th:last-child{width:11%}.af-reporting .ar-month-head,.af-reporting .ar-month-line{grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,1.1fr) minmax(0,1.4fr) 76px}.af-reporting [data-af-rub]{font-size:10px;color:#8b672e}.af-reporting .af-annual-rub strong{font-size:13px;font-weight:600;color:#8b672e}
[data-theme=dark] .af-board,[data-theme=dark] .af-dialog{--af-bg:#292521;--af-ink:#f2eae3;--af-line:#4c4138;--af-muted:#b8aaa0}[data-theme=dark] .af-rub-note,[data-theme=dark] .af-reporting [data-af-rub],[data-theme=dark] .af-reporting .af-annual-rub strong{color:#deb77c!important}[data-theme=dark] .af-warning{color:#e5b16d}
@media(min-width:681px) and (max-width:1300px){.af-reporting .ar-month-head{display:none}.af-reporting .ar-month-line{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.af-reporting .ar-month-line>div{grid-column:auto!important}.af-reporting .ar-month-line>div:before{content:attr(data-label);display:block;font-size:10px;color:var(--ar-muted)}.af-reporting .ar-month-line>div:first-child,.af-reporting .ar-month-line>.ar-checks{grid-column:span 2!important}}
@media(max-width:680px){.af-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.af-dialog input:not([type=checkbox]),.af-dialog textarea,.af-dialog select,.af-filters select{font-size:16px!important;min-height:44px;width:100%;min-width:0}.af-dialog button,.af-board button,.af-card-button{min-height:44px!important;font-size:12px!important}.af-dialog .af-check{min-height:44px}.af-check input{width:20px;height:20px;flex-shrink:0}.af-filters{display:grid;grid-template-columns:1fr}.af-allocation-line{grid-template-columns:minmax(0,1fr) 44px}.af-allocation-line>label:first-child{grid-column:1/-1}.af-dialog h2{font-size:16px}.af-note{font-size:11px}.af-table,.af-table tbody,.af-table tr,.af-table td{display:block;width:100%;box-sizing:border-box}.af-table thead{display:none}.af-table tr{border-bottom:1px solid var(--af-line);padding:4px 0}.af-table td{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.3fr);gap:5px;border:0;padding:3px 0;font-size:12px}.af-table td:before{content:attr(data-label);color:var(--af-muted);font-size:10px}.af-table td small{grid-column:2}.af-reporting .ar-month-line{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.af-reporting .ar-month-line>div{grid-column:auto!important}.af-reporting .ar-month-line>div:first-child,.af-reporting .ar-month-line>.ar-checks,.af-reporting .ar-month-line>div:last-child{grid-column:1/-1!important}.af-reporting .ar-month-head{display:none}.af-rub-note{font-size:11px!important}.af-detail-note .af-card-button{max-width:100%}}
@media print{body:has(.ar-mounted:not(.is-hidden)) .af-reporting .ar-month-head,body:has(.ar-mounted:not(.is-hidden)) .af-reporting .ar-month-line{display:grid;grid-template-columns:1.1fr .7fr 1fr 1fr 1fr .9fr 1fr 1.3fr 0}.af-board{break-inside:auto}.af-board>summary{font-size:12px}.af-filters,.af-pager,.af-board button{display:none!important}.af-board,.af-board *{--af-bg:#fff!important;--af-ink:#111!important;--af-muted:#444!important;--af-line:#bbb!important;color:#111!important;background:#fff!important}.af-board:not([open]){display:none}}

/* Only the card choice inside a payment mark; not the separate allocation editor. */
.af-inline-card{box-sizing:border-box;display:grid;gap:4px;min-width:0;padding:6px 7px;border:1px solid var(--line,#e3d7ce);border-radius:6px;background:var(--paper,#fff)}
.af-inline-card>label,.af-inline-new>label{display:grid;align-content:start;gap:3px;min-width:0;margin:0;font-size:11px;line-height:1.2}
.af-inline-card :is(select,input){box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:30px;padding:4px 7px;border:1px solid var(--line,#e3d7ce);border-radius:5px;background:var(--paper,#fff);color:var(--ink,#29231f);font:inherit;font-size:11px;line-height:1.2}
.af-inline-new{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:6px;min-width:0}
.af-inline-card [hidden]{display:none!important}
.af-inline-card .af-inline-help{margin:0;font-size:10px;line-height:1.25;color:var(--muted,#80766d)}
.af-inline-card .af-inline-warning{margin:0;font-size:10px;line-height:1.25;color:#a65018}
.af-inline-card>strong{font-size:11px;line-height:1.2}
.aw-dialog:has([data-aw-payment-form]){width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.aw-dialog .af-inline-payment-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:0}
.aw-dialog .af-inline-payment-form>:is(p,.af-inline-wide,.af-inline-card,.aw-check,button){grid-column:1/-1;margin:0}
.aw-dialog .af-inline-payment-form>label{display:grid;align-content:start;gap:3px;min-width:0;font-size:11px;line-height:1.2}
.aw-dialog .af-inline-payment-form :is(input:not([type=checkbox]),select){box-sizing:border-box;min-width:0;width:100%;min-height:30px;padding:4px 7px;font-size:11px;line-height:1.2}
.aw-dialog .af-inline-payment-form .aw-check{display:flex;align-items:center;font-size:10px;line-height:1.25}
.aw-dialog .af-inline-payment-form .aw-subtle{font-size:10px;line-height:1.25}
.aw-dialog .af-inline-payment-form>button{min-height:32px;padding:5px 8px;font-size:11px}
.arc-form>.af-inline-card{grid-column:1/-1}
[data-theme=dark] .af-inline-card{background:#29231f;border-color:#4b3c33}
[data-theme=dark] .af-inline-card :is(input,select){background:#211d1a;color:#f6eee8;border-color:#514138}
[data-theme=dark] .af-inline-card .af-inline-warning{color:#f2b579}
@media(max-width:680px){
 .aw-dialog:has([data-aw-payment-form]){width:calc(100vw - 12px);max-height:calc(100dvh - 12px);margin:auto}
 .af-inline-card{padding:5px 6px;gap:4px}
 .af-inline-new{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:5px}
 .aw-dialog .af-inline-payment-form :is(input:not([type=checkbox]),select),.arc-card .arc-form .af-inline-card :is(input,select){align-self:start;min-height:40px!important;height:40px!important;font-size:16px!important;padding:5px 6px}
 .aw-dialog .af-inline-payment-form>button{min-height:40px;font-size:11px}
 .arc-card .arc-form[data-arc-payment]>button{min-height:40px!important;height:auto!important;font-size:11px}
 .aw-dialog .af-inline-payment-form .aw-check{min-height:40px}
 .af-inline-card .af-inline-help,.af-inline-card .af-inline-warning{font-size:10px}
}

/* Reporting only: server totals follow actual payment dates, never accrual rows. */
.ar-reporting .af-period-strip{min-width:0;margin:6px 0 8px;color:var(--ar-ink,#29231f);font-size:11px;line-height:1.3}
.ar-reporting .af-period-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;margin-bottom:5px}
.ar-reporting .af-period-heading h2{font-family:inherit;font-size:12px;line-height:1.25;margin:0;font-weight:600}
.ar-reporting .af-period-heading p{font-size:10px;line-height:1.3;margin:2px 0 0;color:var(--ar-muted,#746a61)}
.ar-reporting .af-period-heading [data-af-period-new-card]{min-height:26px;padding:3px 7px;font-size:10px;line-height:1.25}
.ar-reporting .af-period-cards{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.ar-reporting .af-period-card{box-sizing:border-box;flex:0 1 240px;width:240px;max-width:280px;min-width:0;padding:6px 8px;border:1px solid var(--ar-line,#ddd5cc);border-radius:6px;background:var(--ar-bg,#fff)}
.ar-reporting .af-period-card h3{margin:0 0 4px;font-family:inherit;font-size:11px;line-height:1.25;font-weight:500;overflow-wrap:anywhere}
.ar-reporting .af-period-card h3 small{font-size:10px;font-weight:400;color:var(--ar-muted,#746a61)}
.ar-reporting .af-period-currency{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:2px 6px;min-width:0}
.ar-reporting .af-period-currency+.af-period-currency{margin-top:3px}
.ar-reporting .af-period-currency strong{font-size:12px;font-weight:600;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ar-reporting .af-period-currency small{font-size:10px;color:var(--ar-muted,#746a61)}
.ar-reporting .af-period-empty{font-size:11px;color:var(--ar-muted,#746a61)}
.ar-reporting .af-period-unknown{border-left:2px solid #c8994c}
.ar-reporting .af-period-undated{border-left:2px solid #ad7656}
.ar-reporting .af-period-card>p{font-size:10px;line-height:1.25;margin:4px 0 0;color:var(--ar-muted,#746a61)}
.ar-reporting :is(.af-period-unavailable,.af-period-warnings){font-size:11px;line-height:1.3;margin:4px 0;color:var(--rv-due,#89551e)}
.ar-reporting .af-period-warnings>summary{cursor:pointer;min-height:24px;align-content:center;overflow-wrap:anywhere}.ar-reporting .af-period-warnings ul{margin:2px 0 5px;padding-left:18px;overflow-wrap:anywhere}.ar-reporting .af-period-warnings li+li{margin-top:3px}
@media(max-width:680px){.ar-reporting .af-period-cards{gap:5px}.ar-reporting .af-period-card{flex:0 0 100%;width:100%;max-width:100%;padding:6px}.ar-reporting .af-period-heading [data-af-period-new-card]{min-height:40px;font-size:11px}.ar-reporting .af-period-warnings>summary{min-height:40px}}
@media(pointer:coarse){.ar-reporting .af-period-heading [data-af-period-new-card],.ar-reporting .af-period-warnings>summary{min-height:40px}}
@media print{.ar-reporting .af-period-heading [data-af-period-new-card]{display:none!important}.ar-reporting .af-period-strip{break-inside:avoid}.ar-reporting .af-period-card{background:#fff;color:#111}}
