.commission-ledger-tabs{display:flex;gap:22px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.commission-ledger-tabs button{border:0;border-bottom:2px solid transparent;background:none;padding:0 2px 12px;color:var(--muted);font:inherit;font-weight:600}
.commission-ledger-tabs button[aria-selected=true]{color:var(--primary);border-bottom-color:var(--primary)}
.commission-period{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-bottom:18px}
.commission-period label{display:grid;gap:6px;font-size:11px;color:var(--muted)}
.commission-period input{width:160px;border:1px solid #dfe4ee;border-radius:9px;padding:10px 12px;background:#fff;color:var(--ink)}
.commission-period .commission-person-search input{width:190px}.commission-period>.ghost-button{margin-left:auto}
.commission-ledger-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}
.commission-ledger-cards>div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px}
.commission-ledger-cards span{display:block;font-size:12px;color:var(--muted);margin-bottom:12px}.commission-ledger-cards b{font-size:25px;color:var(--primary)}.commission-ledger-cards small{font-size:12px;font-weight:400}
.commission-ledger-hint{font-size:12px;color:var(--muted);line-height:1.8;margin:12px 0 18px}
.commission-settings-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}
.commission-settings-shortcuts button{position:relative;text-align:left;border:1px solid var(--line);border-radius:12px;padding:18px 34px 18px 18px;background:#fff;color:var(--ink);font:inherit}
.commission-settings-shortcuts button:hover{border-color:var(--primary);background:#f8faff}.commission-settings-shortcuts b{display:block;font-size:14px;margin-bottom:7px}.commission-settings-shortcuts small{font-size:11px;color:var(--muted);line-height:1.6}.commission-settings-shortcuts span{position:absolute;right:16px;top:18px;color:var(--primary)}
#operationsRuleForm input{max-width:180px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;color:var(--ink)}
.payment-plan-status{align-items:center;gap:16px}.payment-plan-status label{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:13px}.payment-plan-status .filter-select{min-width:190px}
@media(max-width:800px){.commission-settings-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.payment-plan-status{flex-wrap:wrap}}
.commission-ledger-table{overflow:auto}.commission-ledger-table table{min-width:990px}.commission-ledger-table td{vertical-align:top}.commission-ledger-table td>b{display:block}.commission-ledger-table .row-actions{gap:7px;min-width:180px;flex-wrap:wrap}.commission-ledger-table .row-actions button{font-size:11px;padding:7px 9px}.commission-ledger-table td:nth-child(1){max-width:240px}.commission-ledger-table td .subtext{white-space:normal}
.commission-allocation-modal.modal.wide{width:min(1060px,96vw)}.commission-allocation-modal .modal-body{background:#fafbfe}
.allocation-context{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.allocation-context b{font-size:16px}.allocation-context small{display:block;color:var(--muted);font-size:11px;margin-top:6px}.allocation-context>strong{font-size:25px;color:var(--primary);white-space:nowrap}
.allocation-excluded{font-size:12px;margin:16px 0}.allocation-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px}.allocation-section-head>div{display:flex;align-items:center;gap:12px}.allocation-section-head b{font-size:13px}
.allocation-grid-head{display:grid;grid-template-columns:88px minmax(150px,1.8fr) 100px 85px minmax(100px,1fr) 36px;gap:10px;padding:0 13px;margin-bottom:7px;font-size:11px;color:var(--muted)}
.allocation-row{display:grid;grid-template-columns:88px minmax(150px,1.8fr) 100px 85px minmax(100px,1fr) 36px;gap:10px;align-items:center;border:1px solid var(--line);border-radius:8px;background:#fff;padding:9px 12px;margin-bottom:7px}
.allocation-row>label{display:grid;gap:6px;color:var(--muted);font-size:11px;min-width:0}.allocation-row input,.allocation-row select{width:100%;padding:9px 8px;border:1px solid #dde3ee;border-radius:7px;background:#fff;min-width:0;color:var(--ink)}.allocation-row input:disabled{background:#f4f6fa;color:#8b94a5}
.allocation-row>label{font-size:0;gap:0}.allocation-row input,.allocation-row select{font-size:12px}.allocation-row .picker-hint{display:none}
.allocation-row .entity-picker{min-width:0}.allocation-row .picker-hint{font-size:10px}.allocation-row .entity-picker-options{z-index:50;max-height:200px;overflow:auto;min-width:180px}.allocation-row .allocation-remove{font-size:11px;margin-top:23px;padding:8px 0}.allocation-paid{grid-column:2/-1;color:var(--muted);font-size:10px}.allocation-total{padding:12px 14px;background:#edf2ff;color:#3454b2;font-size:12px;border-radius:8px;margin:12px 0 18px}.allocation-history{margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--line)}.allocation-history small{display:block;margin-top:5px;font-size:11px;color:var(--muted)}.allocation-history p{font-size:12px;color:var(--muted)}
@media(min-width:801px){.allocation-row .allocation-remove{margin-top:0}}
@media(max-width:800px){.commission-ledger-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.allocation-grid-head{display:none}.allocation-row{grid-template-columns:85px minmax(130px,1fr) 95px}.allocation-row>label{font-size:11px;gap:6px}.allocation-row .allocation-remove{margin-top:15px}.allocation-row .allocation-paid{grid-column:1/-1}.allocation-section-head{flex-wrap:wrap}.commission-period>.ghost-button{margin-left:0}}
@media(max-width:480px){.commission-period label{flex:1;min-width:130px}.commission-period input,.commission-period .commission-person-search input{width:100%}.commission-ledger-cards>div{padding:14px}.commission-ledger-cards b{font-size:21px}.allocation-row{grid-template-columns:1fr 1fr}.allocation-recipient{grid-column:2}.allocation-context{align-items:flex-start}.allocation-context>strong{font-size:21px}}
.matching-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 24px}.matching-page-head h2{margin:0 0 8px;font-size:24px}.matching-page-head p{margin:0;color:var(--muted);font-size:13px}
.matching-flow{display:flex;align-items:center;gap:18px;padding:20px 24px;border:1px solid #dfe5f3;border-radius:14px;background:#fff;margin-bottom:26px}.matching-flow>div,.matching-flow>button{display:flex;gap:12px;align-items:center;flex:1;border:0;background:none;text-align:left;font:inherit;color:var(--ink);padding:0}.matching-flow>span{color:#b6bfd4}.matching-flow i{display:grid;place-items:center;font-style:normal;width:32px;height:32px;border-radius:50%;background:#eef2ff;color:var(--primary);font-weight:600;flex-shrink:0}.matching-flow small{display:block;color:var(--muted);font-size:11px;margin-top:5px}.matching-flow b{font-size:13px}
.matching-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.matching-filter{display:flex;gap:8px}.matching-filter button{border:0;border-radius:8px;background:transparent;color:var(--muted);padding:10px 16px;font:inherit;font-size:13px}.matching-filter button[aria-selected=true]{background:#e7edff;color:var(--primary);font-weight:600}
.matching-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.matching-rule-card{padding:22px;border:1px solid var(--line);border-radius:14px;background:#fff;min-width:0}.matching-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.matching-card-top>small,.matching-rule-card>small{font-size:11px;color:var(--muted)}.matching-rule-card h3{font-size:17px;margin:19px 0 14px;overflow-wrap:anywhere}.matching-rule-card>strong{font-size:15px;color:var(--primary);display:block;line-height:1.7}.matching-rule-card>p{font-size:12px;color:var(--muted);margin:6px 0 18px}.matching-business-types{display:flex;gap:5px;flex-wrap:wrap;margin:13px 0 20px}.matching-business-types span{font-size:10px;color:var(--muted);background:#f4f6fb;padding:4px 6px;border-radius:4px}.matching-card-actions{display:flex;gap:8px;border-top:1px solid #f0f2f7;padding-top:15px;align-items:center}.matching-card-actions button{font-size:11px}.matching-card-actions .link-button{margin-left:auto}.matching-card-actions button:disabled{color:#b1b7c5;cursor:default}.matching-footnote{color:var(--muted);font-size:11px;line-height:1.9;margin:18px 0 26px}.matching-advanced summary{font-size:12px;font-weight:600;cursor:pointer}
.matching-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.matching-form-grid label,.matching-method-fields>label,.matching-member-block>label{display:grid;gap:8px;font-size:12px;color:var(--muted)}.matching-form-grid input,.matching-form-grid select,.matching-method-fields input,.matching-tier-table input,.matching-member-block select,.matching-member-block input{width:100%;min-width:0;padding:11px 12px;border:1px solid #dfe4ef;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.matching-checks{border:0;margin:0;padding:0;min-width:0;display:flex;gap:14px;align-items:center;flex-wrap:wrap}.matching-checks legend{font-size:12px;color:var(--muted);margin-bottom:10px}.matching-checks label{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--ink)}.matching-checks input{width:auto}.matching-method-fields,[data-match-method=discount_tier]{margin:22px 0}.matching-method-fields[hidden],[data-match-method][hidden]{display:none}.matching-tier-table{margin:16px 0}.matching-tier-table input{max-width:100px}.matching-member-block{padding:20px 0;border-bottom:1px solid var(--line)}.matching-member-block h3{font-size:14px;margin:0 0 14px}.matching-binding-description{font-size:12px;color:var(--primary);line-height:1.7}.matching-personal-override input{max-width:230px}.matching-personal-override[hidden]{display:none}.matching-member-cell{min-width:180px;max-width:260px}.matching-member-summary>span{display:block;line-height:1.7;font-size:11px;margin-bottom:7px;white-space:normal}.matching-member-summary small{display:block;font-size:10px;color:var(--muted)}.matching-member-cell .link-button{font-size:11px;margin-top:6px}
.matching-participants{padding:15px 16px;background:#fff;border:1px solid var(--line);border-radius:10px;margin:18px 0}.matching-participants summary{font-size:13px;font-weight:600;cursor:pointer}.matching-participant-search{margin:14px 0 10px;padding:10px 12px;width:100%;border:1px solid var(--line);border-radius:7px;background:#fafbfe;color:var(--ink);font:inherit;font-size:12px}.matching-participant-list{max-height:225px;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.matching-participant{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:11px;cursor:pointer;font-size:12px}.matching-participant:has(input:checked){border-color:#acbcf5;background:#f5f7ff}.matching-participant[hidden]{display:none}.matching-participant>input{width:auto}.matching-participant>span{flex:1;min-width:0}.matching-participant em{font-size:10px;font-style:normal;font-weight:400;color:var(--primary);margin-left:6px}.matching-participant small{display:block;font-size:10px;color:var(--muted);margin-top:6px;line-height:1.6}.matching-participant strong{color:var(--primary);white-space:nowrap}.matching-participants>p{font-size:10px;margin:12px 0 0}
.matching-allocation-edit{border-top:1px solid var(--line);padding:14px 0;margin:0 0 12px}.matching-allocation-edit>summary{cursor:pointer;color:var(--primary);font-size:12px;font-weight:600}.matching-allocation-edit .allocation-section-head{margin-top:16px}
.matching-sprint-options{display:grid;gap:10px;margin-top:18px}.commission-builder-block[hidden]{display:none!important}
.matching-team-table{overflow-x:auto}.matching-team-table .data-table{min-width:1120px}.matching-team-table th{white-space:nowrap}.matching-team-table td:nth-child(2) .tag,.matching-team-table td:nth-child(3) .tag{white-space:nowrap}.matching-team-table th:last-child,.matching-team-table td:last-child{position:sticky;right:0;background:#fff;box-shadow:-6px 0 8px -8px #7d8bab;min-width:85px}.matching-team-table th:last-child{background:#fafbfc}
.matching-binding-count{border:0;border-radius:6px;padding:5px 7px;background:#f0f3ff;color:var(--primary);font:inherit;font-size:11px;white-space:nowrap}.matching-binding-count:hover{background:#e5ebff}.matching-rule-card .matching-rule-people{font-size:12px;line-height:1.8;color:var(--ink);margin:-3px 0 16px;min-height:42px;overflow-wrap:anywhere}.matching-rule-people>span{display:block;color:var(--muted);font-size:10px;margin-bottom:3px}
.matching-bindings-context{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:15px}.matching-bindings-context strong{font-size:14px}.matching-bindings-context>p{width:100%;color:var(--muted);font-size:11px;line-height:1.8;margin:0}.matching-binding-formula{font-size:12px;line-height:1.8;color:var(--primary);margin:12px 0 18px}.matching-binding-formula summary{cursor:pointer}.matching-bindings-table table{min-width:680px}.matching-bindings-table td{font-size:12px}.matching-bindings-table td,.matching-bindings-table th{padding:12px 10px}.matching-bindings-table td:nth-child(4){max-width:270px;line-height:1.8}.matching-personal-value{color:var(--primary);font-weight:600}
.matching-scope-readonly{padding:1px 0}.matching-scope-readonly>span{display:block;color:var(--muted);font-size:12px;margin-bottom:12px}.matching-scope-readonly>strong{display:block;font-size:13px;color:var(--ink)}.matching-scope-readonly>small{display:block;color:var(--muted);font-size:10px;line-height:1.8;margin-top:9px}.matching-role-advanced{margin:20px 0;padding:12px 14px;border:1px solid var(--line);border-radius:8px}.matching-role-advanced>summary{cursor:pointer;color:var(--muted);font-size:12px}.matching-role-advanced .matching-checks{margin-top:16px}.matching-role-advanced p{font-size:11px;line-height:1.8}
@media(max-width:1150px){.matching-rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.matching-flow{gap:10px;padding:16px}.matching-flow small{display:none}.matching-flow i{width:25px;height:25px}.matching-flow b{font-size:11px}.matching-flow>div,.matching-flow>button{gap:7px}.matching-rule-grid{grid-template-columns:1fr}.matching-toolbar{align-items:flex-start;flex-direction:column}.matching-filter{gap:2px}.matching-filter button{padding:8px 11px}.matching-page-head{align-items:flex-start}.matching-form-grid{grid-template-columns:1fr}.matching-participant-list{grid-template-columns:1fr}}
.commission-statistics-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:20px 0}
.commission-statistics-cards.personal{grid-template-columns:repeat(2,minmax(0,1fr))}
.commission-statistics-cards .panel{margin:0;padding:24px;display:flex;flex-direction:column;gap:16px}
.commission-statistics-cards span,.statistics-caption{color:var(--muted,#7b87a3);font-size:14px}
.commission-statistics-cards b{font-size:30px;line-height:1.2;color:var(--primary,#4559db);font-variant-numeric:tabular-nums}
.statistics-amount{font-weight:700;color:var(--primary,#4559db);font-variant-numeric:tabular-nums}
.statistics-date{white-space:nowrap}.statistics-caption{margin:18px 0 24px}.statistics-unallocated{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.commission-ledger-tabs small{font-size:12px;font-weight:400}.commission-ledger-table .row-actions{flex-wrap:wrap}
@media(max-width:900px){.commission-statistics-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.commission-statistics-cards .panel{padding:18px}.statistics-unallocated{align-items:flex-start;flex-direction:column}}

.statistics-personal-table .data-table{min-width:680px;width:100%}
.statistics-people-table .data-table{min-width:680px;width:100%}
.matching-page-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.matching-rule-status{display:flex;gap:8px;align-items:center;margin:17px 0 -4px;color:var(--muted);font-size:11px}.matching-rule-status small{margin-left:auto;font-size:10px}.matching-rule-card.is-paused{background:#fafbfe}.matching-rule-card.is-paused>strong{color:var(--muted)}
.matching-status-switch{width:34px;height:20px;padding:2px;border:0;border-radius:12px;background:#c4cbdb;display:flex;align-items:center;cursor:pointer;flex-shrink:0}.matching-status-switch>span{display:block;width:16px;height:16px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}.matching-status-switch[aria-checked=true]{background:var(--primary,#4559db)}.matching-status-switch[aria-checked=true]>span{transform:translateX(14px)}.matching-status-switch:disabled{opacity:.55;cursor:wait}.matching-status-switch:focus-visible{outline:3px solid #aab8f3;outline-offset:3px}
.matching-form-grid .matching-enabled-field{display:flex;gap:9px;align-items:center;color:var(--ink);font-size:12px}.matching-enabled-field input{width:auto}.matching-enabled-field span{color:var(--muted);font-size:11px}
.matching-preview-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.matching-preview-form .full-row{grid-column:1/-1}.matching-preview-form>label{display:grid;gap:8px;color:var(--muted);font-size:12px}.matching-preview-form input,.matching-preview-form select{width:100%;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;color:var(--ink);background:#fff}.matching-preview-submit{display:flex;justify-content:space-between;align-items:center;gap:20px}.matching-preview-submit p{font-size:11px;color:var(--muted);line-height:1.8;margin:0;max-width:560px}.matching-preview-submit button{flex-shrink:0}
.matching-preview-result-head{display:flex;justify-content:space-between;align-items:baseline;gap:15px;margin:25px 0 14px;border-top:1px solid var(--line);padding-top:22px}.matching-preview-result-head h3{font-size:16px;margin:0}.matching-preview-result-head>span{font-size:11px;color:var(--muted)}.matching-preview-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.matching-preview-totals>div{padding:15px;border:1px solid var(--line);border-radius:10px;background:#f8faff}.matching-preview-totals span{display:block;font-size:11px;color:var(--muted);margin-bottom:9px}.matching-preview-totals b{font-size:21px;color:var(--primary);font-variant-numeric:tabular-nums}.matching-preview-note{font-size:11px;line-height:1.8;color:var(--muted);margin:16px 0}.matching-preview-table{min-width:680px}.matching-preview-table th{white-space:nowrap}.matching-preview-table td{padding:15px 10px;vertical-align:top}.matching-preview-entry{display:flex;gap:7px;align-items:flex-start;cursor:pointer;font-size:12px}.matching-preview-entry>input{margin-top:2px}.matching-preview-entry b{color:var(--primary);font-variant-numeric:tabular-nums}.matching-preview-entry small{display:block;color:var(--muted);font-size:10px;line-height:1.7;margin-top:3px}.matching-preview-entry.unselected{opacity:.6}.matching-preview-modal .modal-body{padding-bottom:16px}
@media(max-width:700px){.matching-preview-form{grid-template-columns:repeat(2,minmax(0,1fr))}.matching-preview-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.matching-preview-submit,.matching-preview-result-head{align-items:flex-start;flex-direction:column}.matching-preview-submit button{width:100%}}

.matching-preview-conditions>summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--primary);padding:0 0 14px}.matching-preview-conditions[open]>summary{margin-bottom:6px}.matching-preview-modal .matching-preview-table td{padding:11px 10px}

.matching-preview-form .matching-preview-unbound{display:flex;align-items:center;gap:8px;font-size:11px;line-height:1.7}.matching-preview-unbound input{width:auto;flex-shrink:0}
.matching-preview-modal .matching-preview-result-head{margin:12px 0 8px;padding-top:12px}.matching-preview-modal .matching-preview-totals{margin:10px 0}.matching-preview-modal .matching-preview-totals>div{padding:12px}.matching-preview-modal .matching-preview-totals span{margin-bottom:7px}.matching-preview-modal .matching-preview-totals b{font-size:20px}.matching-preview-modal .matching-preview-note{margin:10px 0;line-height:1.6}.matching-preview-modal .matching-preview-table td{padding:7px 10px}#matchingPreviewResult>.subtext{margin:8px 0;font-size:10px;line-height:1.5}
