.reference-table { overflow: visible; font-size: .875rem; }
.ref-toolbar, .ref-footer { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 20px; }
.reference-table label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.reference-table input, .reference-table select, .reference-table button, .ref-columns summary { font: inherit; color: var(--text); background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 8px 12px; min-height: 36px; }
.reference-table button, .ref-columns summary { cursor: pointer; }
.reference-table button:hover, .ref-columns summary:hover { background: var(--bg-surface-secondary); }
.reference-table :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.reference-table button:disabled { opacity: .45; cursor: default; }
.ref-search { flex: 1; min-width: 220px; }
.ref-columns { position: relative; }
.ref-columns > div { position: absolute; right: 0; top: 42px; z-index: 3; background: var(--bg-surface); border: 1px solid var(--border-color); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px; width: 210px; }
.ref-columns label { flex-direction: row; align-items: center; padding: 4px; }
.ref-columns > #mt-columns { left: 0; right: auto; }
#mt-filters input[type=number] { width: 110px; }
.ref-columns input { min-height: auto; accent-color: var(--primary); }
.ref-hint { padding: 0 20px 14px; color: var(--text-secondary); font-size: .8125rem; }
.ref-scroll { overflow-x: auto; border-block: 1px solid var(--border-color); }
.reference-table table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.reference-table th, .reference-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-color-light); }
.reference-table th { background: var(--bg-surface-secondary); font-weight: 500; }
.reference-table th button { border: 0; background: transparent; padding: 0; min-height: 24px; width: 100%; text-align: inherit; font-weight: 600; }
.reference-table td:first-child { font-weight: 500; }
.reference-table tbody tr:hover { background: var(--bg-surface-secondary); }
.reference-table .ref-number { text-align: right; font-variant-numeric: tabular-nums; }
.reference-table .ref-filter th { padding-top: 0; }
.ref-filter input { width: 100%; min-width: 95px; max-width: 200px; font-weight: 400; }
.reference-table .ref-group-row { background: var(--primary-lt); }
.ref-group-row button { background: transparent; border: 0; font-weight: 600; }
.ref-footer { align-items: center; }
.ref-footer > span:first-child { margin-right: auto; color: var(--text-secondary); }
.ref-footer label { flex-direction: row; align-items: center; }
.ref-source { color: var(--text-secondary); font-size: .8125rem; margin-top: 16px; }
.ref-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 768px) { .ref-toolbar, .ref-footer { padding: 14px; } .ref-search { flex-basis: 100%; } .ref-footer > span:first-child { flex-basis: 100%; } }
