#productReferenceLibrarySection .reference-filters.reference-master-filters { display:block; padding:12px 14px; border:1px solid #e1e1e5; border-radius:14px; background:#fff; color:#222; }
#productReferenceLibrarySection .reference-master-filter-grid { display:contents; }
#productReferenceLibrarySection .reference-master-filter-grid > .reference-master-filter-field { width:112px; flex:0 0 112px; }
#productReferenceLibrarySection .reference-master-filter-grid > .reference-master-filter-field > span { display:none; }
#productReferenceLibrarySection .reference-master-filter-field { display:flex; flex-direction:column; gap:5px; min-width:0; color:#555; font-size:12px; }
#productReferenceLibrarySection .reference-master-filter-field input { width:100%; min-width:0; height:36px; box-sizing:border-box; border:1px solid #dedee2; border-radius:8px; padding:0 11px; background:#fff; color:#222; font:inherit; font-size:13px; }
#productReferenceLibrarySection .reference-master-filter-field > input { flex:none; }
#productReferenceLibrarySection .reference-master-filter-field input:focus { outline:0; border-color:#777; }
#productReferenceLibrarySection .reference-master-price-filter { flex-direction:row; align-items:center; gap:8px; }
#productReferenceLibrarySection .reference-master-price-filter > span { white-space:nowrap; }
#productReferenceLibrarySection .reference-master-price-range { display:flex; align-items:center; gap:6px; min-width:0; }
#productReferenceLibrarySection .reference-master-price-range > span { color:#aaa; }
#productReferenceLibrarySection .reference-master-price-range input { appearance:textfield; }
#productReferenceLibrarySection .reference-master-price-range input::-webkit-inner-spin-button,
#productReferenceLibrarySection .reference-master-price-range input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
#productReferenceLibrarySection .reference-master-choice { position:relative; min-width:0; }
#productReferenceLibrarySection .reference-master-choice > summary { height:36px; box-sizing:border-box; padding:8px 22px 8px 8px; border:1px solid #dedee2; border-radius:8px; list-style:none; cursor:pointer; color:#222; font-size:13px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#productReferenceLibrarySection .reference-master-choice > summary::-webkit-details-marker { display:none; }
#productReferenceLibrarySection .reference-master-choice > summary:after { content:''; position:absolute; right:9px; top:13px; width:6px; height:6px; border-right:1px solid #777; border-bottom:1px solid #777; transform:rotate(45deg); }
#productReferenceLibrarySection .reference-master-choice[open] > summary,
#productReferenceLibrarySection .reference-master-choice > summary:focus { outline:0; border-color:#777; }
#productReferenceLibrarySection .reference-master-choice[open] > summary:after { transform:translateY(3px) rotate(225deg); }
#productReferenceLibrarySection .reference-master-choice-panel { position:absolute; z-index:12; top:42px; left:0; right:0; min-width:180px; padding:10px; border:1px solid #d7d7db; border-radius:10px; background:#fff; }
#productReferenceLibrarySection .reference-master-choice-list { max-height:224px; overflow-y:auto; overscroll-behavior:contain; margin-top:6px; scrollbar-width:thin; scrollbar-color:#ccc transparent; }
#productReferenceLibrarySection .reference-master-choice-list > label { display:flex; align-items:center; gap:9px; padding:9px 8px; border-radius:6px; color:#333; font-size:13px; cursor:pointer; }
#productReferenceLibrarySection .reference-master-choice-list > label:hover { background:#f4f4f5; }
#productReferenceLibrarySection .reference-master-choice-list > label:has(input:checked) { background:#eeeef0; }
#productReferenceLibrarySection .reference-master-choice-list input[type=checkbox] { appearance:none; flex:0 0 15px; width:15px; height:15px; min-width:15px; border-radius:4px; padding:0; margin:0; cursor:pointer; }
#productReferenceLibrarySection .reference-master-choice-list input[type=checkbox]:checked { background:#262626; border-color:#262626; }
#productReferenceLibrarySection .reference-master-choice-list input[type=checkbox]:checked:after { content:''; display:block; width:7px; height:3px; margin:3px 2px; border-left:1.5px solid #fff; border-bottom:1.5px solid #fff; transform:rotate(-45deg); }
#productReferenceLibrarySection .reference-master-filter-actions { display:flex; gap:6px; }
/* History counts must not widen the desktop action group and wrap every button. */
body:not(.is-mobile-viewport) #productReferenceLibrarySection .reference-master-filter-actions .reference-sync-entry { max-width:140px; box-sizing:border-box; overflow:hidden; text-overflow:ellipsis; }
#productReferenceLibrarySection .reference-master-filter-actions button { height:34px; padding:0 16px; border:1px solid #dedee2; border-radius:8px; background:#fff; color:#555; white-space:nowrap; }
#productReferenceLibrarySection .reference-master-filter-actions button:disabled { opacity:.5; cursor:wait; }
#productReferenceLibrarySection .reference-master-filter-chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding-top:8px; font-size:12px; color:#888; }
#productReferenceLibrarySection .reference-master-filter-chips button { min-height:27px; height:auto; max-width:100%; overflow-wrap:anywhere; padding:4px 10px; border:0; border-radius:6px; background:#f1f1f3; color:#444; text-align:left; }
@media (max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-filters.reference-master-filters { display:block; padding:12px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-filter-grid > .reference-master-filter-field { width:auto; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-filter-actions { width:100%; display:flex; flex-wrap:wrap; gap:6px; margin-left:0; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-choice-panel { min-width:0; }
}

#productReferenceLibrarySection .reference-master-choice-list > label[hidden] { display:none; }

#productReferenceLibrarySection .reference-master-searchbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
#productReferenceLibrarySection .reference-master-searchbar > input { flex:1 1 180px; max-width:240px; }
#productReferenceLibrarySection .reference-master-searchbar > .reference-master-price-filter { flex:0 0 240px; }
#productReferenceLibrarySection .reference-master-searchbar input { width:100%; min-width:0; height:36px; box-sizing:border-box; padding:0 12px; border:1px solid #dedee2; border-radius:8px; background:#fff; font:inherit; font-size:13px; color:#222; }
#productReferenceLibrarySection .reference-master-searchbar input:focus { outline:0; border-color:#777; }
#productReferenceLibrarySection .reference-master-searchbar button { height:36px; padding:0 10px; border:1px solid #dedee2; border-radius:8px; background:#fff; color:#444; }
#productReferenceLibrarySection .reference-master-searchbar .reference-master-search-button { background:#222; color:#fff; border-color:#222; }
#productReferenceLibrarySection .reference-master-searchbar button:disabled { opacity:.5; cursor:wait; }
@media (max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-searchbar { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-searchbar > input { max-width:none; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #productReferenceLibrarySection .reference-master-searchbar button { padding:0 8px; }
}

#productReferenceLibrarySection .reference-master-pagination { min-width:0; padding:8px 0 0; flex-wrap:wrap; row-gap:10px; }
#productReferenceLibrarySection .reference-master-pagination .reference-pagination-summary { white-space:nowrap; }
#productReferenceLibrarySection .reference-pagination-controls { display:flex; align-items:center; justify-content:flex-end; gap:4px; flex-wrap:wrap; margin-left:auto; }
#productReferenceLibrarySection .reference-pagination-controls button { min-width:30px; height:32px; padding:0 8px; border-radius:8px; background:#fff; color:#444; }
#productReferenceLibrarySection .reference-pagination-controls button[aria-current="page"] { background:#222; border-color:#222; color:#fff; opacity:1; cursor:default; }
#productReferenceLibrarySection .reference-pagination-ellipsis { min-width:16px; text-align:center; }
