/* Shared compact table presentation. */
.data-table table{border-collapse:separate;border-spacing:0;font-size:13px;line-height:1.35;color:#39474e}
.data-table thead th{padding:7px 8px;height:34px;font-size:12px;font-weight:600;vertical-align:middle;background:#f0f4f7;color:#44555f;border:0;border-right:1px solid #e2e8ec;border-bottom:1px solid #cbd5dd;box-sizing:border-box}
.data-table tbody td{padding:6px 8px;height:34px;font-size:13px;vertical-align:middle;border:0;border-right:1px solid #edf0f2;border-bottom:1px solid #e4e9ed;box-sizing:border-box}
.data-table tbody tr:nth-child(even)>td{background:#f8fafb}
.data-table tbody tr:hover>td{background:#edf5fc}
.data-table thead th:last-child,.data-table tbody td:last-child{border-right:0}
.data-table .column-sort{padding:0;min-height:20px;gap:6px;font-size:inherit;font-weight:inherit;line-height:1.35}
.data-table .column-sort span{flex-shrink:0;font-size:12px;color:#5e829b}
.data-table td.number{font-variant-numeric:tabular-nums;white-space:nowrap}
.data-table td small{font-size:11px;line-height:1.3;margin-top:2px}
.data-table .person{gap:7px}.data-table .person strong{font-weight:500}
.data-table .avatar{width:26px;height:26px;flex-shrink:0}
.data-table .badge{padding:2px 5px;margin:1px 2px 1px 0;line-height:1.25}
.data-table .fee-check{padding:3px 6px;font-size:12px;line-height:1.3}
.data-table td .secondary{padding:4px 7px;font-size:12px;min-height:26px}
.content .data-table .icon-action{min-width:28px;min-height:28px;padding:5px}
.data-table tfoot th,.data-table tfoot td{padding:7px 8px;font-size:12px;border:0;border-top:2px solid #a8c4d8;background:#eaf4fb;font-variant-numeric:tabular-nums}
.data-table.cav-grid tbody td:first-child{background:#f8fbfd}
.data-table.cav-grid tbody tr:nth-child(even)>td:first-child{background:#f1f6fa}
.data-table.cav-grid tbody tr:hover>td:first-child{background:#edf5fc}
.data-table tbody tr.row-warning>td,.data-table tbody tr.row-warning:hover>td,.data-table.cav-grid tbody tr.row-warning>td:first-child{background:#fff7d9}
.data-table tbody tr.row-omitted>td,.data-table tbody tr.row-omitted:hover>td{background:#e9ecef;color:#687078}
.table-export-bar{padding:4px 8px;min-height:36px;align-items:center;border-bottom:1px solid #e2e8ec}
.movement-panels .table-export-bar{min-height:36px;padding:4px 8px}
.table-export{width:28px;height:28px;border-color:transparent;border-radius:4px}
.table-export:hover{border-color:#c8ded0}
.data-table .empty{padding:12px 8px;margin:0;font-size:13px;color:#697b85}
@media(max-width:700px){.data-table tbody td{padding:7px 8px}.content .data-table .icon-action{min-width:36px;min-height:36px}.data-table td .secondary{min-height:36px}.data-table .column-sort{min-height:30px}}
.position-filters{margin-bottom:12px}.position-notes{display:flex;flex-wrap:wrap;gap:8px 18px}.position-notes .check{margin:6px 0;font-size:12px}.position-filter-label{font-size:13px}.position-history{margin-top:12px}.position-history h3{font-size:16px;margin-bottom:6px}.position-timeline{list-style:none;margin:18px 0 0;padding:0 0 0 16px}.position-timeline li{position:relative;display:flex;justify-content:space-between;gap:16px;padding:8px 12px 14px 22px;border-left:2px solid #dce7ee}.timeline-dot{position:absolute;left:-6px;top:12px;width:10px;height:10px;border-radius:50%;background:#548fb7;border:2px solid white;box-shadow:0 0 0 1px #dce7ee}.timeline-dot.buy{background:#298551}.timeline-dot.sell{background:#c45b53}.position-timeline time,.position-timeline small{display:block;font-size:12px;color:#687980}.position-timeline strong{display:block;font-size:13px;font-weight:500;margin:3px 0}.timeline-quantity{text-align:right;font-variant-numeric:tabular-nums}.data-table tr.position-selected>td{box-shadow:inset 0 -2px #5b9fd1}.data-table tr[tabindex="0"]{cursor:pointer}.data-table tr[tabindex="0"]:focus-visible{outline:2px solid #5b9fd1;outline-offset:-2px}.remember-user{margin:16px 0}.position-filters .text-button{font-size:12px;color:#317da9}
.positions-layout .position-filters{padding:10px 12px;margin-bottom:0;min-height:var(--filter-height,80px)}.positions-layout .entity-filters{gap:10px;margin:0;align-items:center}.positions-layout .entity-filters>label{min-width:160px}.positions-layout .entity-filters>div{flex:1;min-width:220px}.positions-layout input[type=date]{min-height:32px;padding:6px 8px;margin-top:4px}.positions-layout .position-notes{gap:3px 12px}.positions-layout .position-notes .check{margin:3px 0;font-size:11px}.positions-layout .position-filter-label{font-size:12px}.positions-layout .text-button{padding:3px 0}.positions-layout .negative-filter{float:right;font-size:12px;margin:0 0 6px 12px}.positions-layout .position-table-panel .table-scroll{height:var(--positions-height,260px);max-height:none;min-height:120px}.positions-layout .position-history{padding:12px 16px;margin-top:0;max-height:50vh;overflow:auto}.positions-layout .position-history>p{font-size:12px;margin:4px 0 10px}.positions-layout .position-history h3{font-size:14px;margin:0}.positions-layout .position-timeline{margin-top:10px}.positions-layout .position-timeline li{padding-top:4px;padding-bottom:10px}.positions-layout .position-alert{text-align:center;width:60px}.positions-layout th:nth-child(6) .column-sort{justify-content:flex-end}@media(max-width:700px){.positions-layout .negative-filter{float:none;margin:0 0 8px}.positions-layout .position-notes .check{font-size:12px}.positions-layout .position-history{max-height:55vh}}
.global-search{position:relative;flex:1;max-width:460px;min-width:160px;margin:0 24px;color:#e8edf0}.global-search-input{display:flex;align-items:center;gap:8px;border:1px solid #ffffff35;border-radius:6px;background:#30383b66;padding:0 10px}.global-search-input input[type=search]{border:0;background:transparent;color:#fff;margin:0;padding:8px 0;min-height:34px;font-size:12px}.global-search-input input::placeholder{color:#d0d7da}.global-search-input input:focus{outline:0}.global-search-input:focus-within{outline:2px solid #9dcced}.search-clear{border:0;background:transparent;color:inherit;box-shadow:none;padding:4px;font-size:20px;min-width:26px}.global-search-results{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:30;max-height:70vh;overflow:auto;background:white;border:1px solid #d4dfe6;border-radius:6px;box-shadow:0 8px 24px #0003;color:#40515c}.search-summary{display:flex;align-items:center;justify-content:space-between;padding:5px 12px;font-size:11px;border-bottom:1px solid #e6edf1}.global-search-results h3{font-size:11px;font-weight:600;background:#f0f5f8;padding:7px 12px;margin:0;color:#5f7788}.search-hit{display:block;width:100%;text-align:left;background:transparent;padding:8px 12px;border:0;border-radius:0;color:#40515c}.search-hit:hover,.search-hit:focus-visible{background:#eaf4fc}.search-hit strong{display:block;font-size:12px;font-weight:500;overflow-wrap:anywhere}.search-hit small{display:block;font-size:11px;color:#6b7f8a;margin-top:2px}.search-more{border:0;background:transparent;color:#327ead;padding:7px 12px;font-size:11px}.global-search-results p{font-size:12px;padding:12px;margin:0}@media(max-width:700px){.app-topbar{flex-wrap:wrap;height:auto;min-height:56px;padding:8px 12px;gap:8px}.global-search{order:3;max-width:none;flex-basis:100%;margin:0}.global-search-results{max-height:65vh}}
.manual-cav-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}@media(max-width:600px){.manual-cav-fields{grid-template-columns:1fr}}

.movement-status-filters{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px 0}.movement-status-filters .secondary{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:5px 8px}.movement-status-filters .selected{background:#e8f2fa;color:#256b9a;border-color:#5b9fd1}.movement-status-filters .badge{margin:0}.movement-filter-note{margin:6px 12px 10px}
.data-table .column-filter{display:block;width:100%;min-width:85px;max-width:240px;min-height:28px;margin:5px 0 0;padding:3px 22px 3px 6px;font-size:11px;font-weight:400;color:#44555f;background-color:white;border:1px solid #cbd5dd;border-radius:3px}.data-table .column-filter:focus{outline:2px solid #5b9fd1;outline-offset:1px}.column-filter-summary{margin-right:auto;display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;color:#526570}.column-filter-summary .text-button{padding:3px 6px;color:#256b9a;font-size:12px}.column-filter-summary span{font-size:11px}

.table-filter-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:28px;margin:0 6px 0 0;padding:4px;border:1px solid transparent;border-radius:4px;color:#587283;cursor:pointer}.table-filter-toggle input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.table-filter-toggle:has(input:checked){background:#e8f2fa;color:#256b9a;border-color:#5b9fd1}.table-filter-toggle:focus-within{outline:2px solid #5b9fd1;outline-offset:2px}.table-filter-toggle:hover{background:#e8f2fa}.data-table input.column-filter{padding:4px 6px;min-height:28px}
.table-export-bar{justify-content:flex-start}.table-export-bar>.table-export{margin-left:auto;flex-shrink:0}.table-export-bar>.table-filter-toggle{flex-shrink:0}
.payout-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.payout-grid label{min-width:0}.payout-grid select{width:100%}.payout-editor fieldset{border:0;padding:0;min-width:0}.payout-editor h3{margin-top:24px}.payout-editor>.entity-actions,.payout-editor form>.entity-actions{margin-top:24px}.payout-tier{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;border-bottom:1px solid #dbe4eb}.payout-tier>label{flex:1;min-width:120px}.payout-tier .check{font-size:12px}.payout-adjustment,.payout-override{padding:16px;margin:12px 0;border:1px solid #dbe4eb;border-radius:4px;background:#f8fbfd}.payout-adjustment .entity-actions{align-items:center}.payout-adjustment .entity-actions strong{margin-right:auto}
.payout-modal input[type=checkbox]{width:auto;flex:none}.payout-modal .payout-editor h3{padding-bottom:8px;border-bottom:1px solid #dbe4eb}

/* Size columns from their contents, then use any remaining container width. */
.table-scroll.data-table { width:100%; max-width:100%; min-width:0; box-sizing:border-box; overflow:auto; }
.data-table>table { table-layout:auto; width:max-content; min-width:100%; max-width:none; white-space:nowrap; }
.data-table thead th,.data-table tbody td,.data-table tfoot th,.data-table tfoot td { padding-left:4px; padding-right:4px; }
.data-table .column-sort { width:auto; min-width:100%; gap:4px; justify-content:flex-start; }
/* Filters occupy the column width without enlarging it when opened. */
.data-table input.column-filter { box-sizing:border-box; width:0; min-width:100%; max-width:none; }
.data-table td button+button { margin-left:3px; }
.pagination-arrow { display:inline-flex; align-items:center; justify-content:center; min-width:34px; min-height:34px; padding:6px; }
@media(max-width:700px){.pagination-arrow{min-width:44px;min-height:44px}}

.data-table tr.row-selected td { background: #eef5ff; }

.payout-warnings summary { cursor:pointer; font-weight:600; }
.payout-warnings summary .badge { margin-left:8px; border-radius:999px; }
.table-export-bar>.bulk-trigger{margin-left:0}
.table-bulk-menu{position:fixed;inset:auto;margin:0;padding:6px;max-width:min(320px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;border:1px solid #d7e0e5;border-radius:5px;background:white;color:#263238;box-shadow:0 4px 16px #0003}
.table-bulk-menu p{margin:4px 8px 8px;font-size:12px;color:#52616b}
.table-bulk-actions{display:flex;flex-direction:column;gap:2px}
.table-bulk-actions>button{width:100%;text-align:left;border:0;background:transparent;box-shadow:none;padding:8px 12px;color:inherit}
.table-bulk-actions>button:hover:not(:disabled){background:#e9f3fc}
.table-export-bar>.bulk-trigger{color:#163f6b}
.table-export-bar>.bulk-trigger:hover{color:#0b2d50;background:#e8f0f8}
.cav-bulk-actions{display:contents}
.table-bulk-actions .cav-bulk-actions>button{width:100%;text-align:left;border:0;background:transparent;box-shadow:none;padding:8px 12px;color:inherit}
.table-bulk-actions .cav-bulk-actions>button:hover:not(:disabled){background:#e9f3fc}

.positions-layout .position-filters{padding:14px 16px}
.position-filter-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px 28px;padding-bottom:14px;border-bottom:1px solid #e2e8ed}
.position-filter-toolbar .position-date{display:flex;flex-direction:column;gap:4px;flex:0 1 180px;margin:0;font-size:12px}
.position-filter-toolbar .position-date input{width:100%;margin:0}
.position-visibility{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;min-height:34px}
.positions-layout .position-visibility .check{display:flex;align-items:center;gap:8px;margin:0;font-size:12px}
.position-note-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 8px}
.position-note-heading .count{margin-left:8px;font-size:11px;color:#687980}
.positions-layout .position-notes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:8px 20px}
.positions-layout .position-notes .check{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:12px;line-height:1.5;min-width:0}
.positions-layout .position-notes input[type=checkbox]{flex-shrink:0;margin-top:2px}
.positions-layout .position-notes .check span{overflow-wrap:anywhere}
@media(max-width:600px){.position-visibility{flex-direction:column;align-items:flex-start;gap:10px}.position-filter-toolbar{align-items:flex-start;gap:14px}.position-filter-toolbar .position-date{flex-basis:100%}}
.adjustment-options{max-height:200px;overflow:auto;border:1px solid #dbe4eb;background:#fff;margin:12px 0;padding:8px}.adjustment-options label{display:flex;align-items:center;gap:10px;white-space:nowrap;margin:0;padding:8px}.adjustment-options input[type=checkbox]{width:16px;min-height:16px;margin:0;flex-shrink:0}.adjustments-table{width:100%;border-collapse:collapse}.adjustments-table th,.adjustments-table td{text-align:left;padding:10px;border-bottom:1px solid #dbe4eb;white-space:nowrap}.adjustments-table td input[type=number]{width:110px;min-height:38px}.adjustments-table search-select{min-width:205px}.adjustments-table .entity-actions{flex-wrap:nowrap}

.adjustment-modal{width:min(800px,94vw)}.adjustment-modal-content{padding:20px;max-height:65vh;overflow:auto}.adjustment-modal .adjustment-options{max-height:260px}
