.libraries-table-toolbar { flex-wrap: wrap; gap: .75rem; }
.libraries-row-control { display: flex; align-items: center; gap: .6rem; }
.libraries-row-control label { margin: 0; white-space: nowrap; }
.libraries-row-control select { width: 85px; }
.libraries-table-scroll { max-height: 620px; }
.libraries-table-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--tblr-bg-surface, #fff); }
#libraries-map { height: 480px; min-width: 0; background: #eaf2f7; }
.library-map-hint { display: flex; align-items: center; gap: 10px; font-size: .75rem; color: #64748b; line-height: 1.5; }
.library-cluster-hint { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #eff6ff; border: 3px solid #2563eb; color: #1e40af; font-weight: 800; }
.library-type-symbol, .library-popup-emblem { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; color: #fff; background: var(--library-color); }
.library-type-symbol svg { width: 23px; height: 23px; }
.library-type-legend { display: inline-flex; }
.library-marker { border: 0; background: none; }
.library-pin { display: flex; position: relative; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; border: 2px solid #fff; background: var(--library-color); color: #fff; box-shadow: 0 3px 10px #0f172a40; }
.library-pin:after { content: ''; position: absolute; bottom: -6px; left: 12px; width: 10px; height: 10px; background: var(--library-color); border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.library-pin svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.library-marker:focus-visible .library-pin, .library-cluster:focus-visible { outline: 3px solid #0f172a; outline-offset: 4px; }
.library-cluster { background: none; border: 0; }
.library-cluster-ring { width: 56px; height: 56px; padding: 4px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 5px #ffffff60, 0 4px 14px #0f172a33; }
.library-cluster-center { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #0f172a; line-height: 1; }
.library-cluster-center strong { font-size: 17px; font-weight: 800; }
.library-cluster-center small { font-size: 8px; font-weight: 600; margin-top: 3px; color: #64748b; }
.library-map-popup { overflow-wrap: anywhere; font: 12px/1.5 system-ui, sans-serif; color: #334155; }
.library-popup-header { padding: 18px 34px 14px 18px; background: linear-gradient(135deg, #f0f6ff, #fff); border-bottom: 1px solid #e2e8f0; border-top: 4px solid var(--library-color); }
.library-popup-category { display: flex; align-items: center; gap: 10px; }
.library-popup-emblem { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 3px 8px #0f172a1a; }
.library-popup-emblem svg { width: 25px; height: 25px; }
.library-map-popup-type { font-size: 10px; font-weight: 800; color: var(--library-color); text-transform: uppercase; letter-spacing: .04em; }
.library-popup-code { font-size: 10px; margin-top: 3px; color: #64748b; }
.library-map-popup h3 { margin: 12px 0 9px; font-size: 16px; font-weight: 750; line-height: 1.35; color: #0f172a; }
.library-map-popup-badges { display: flex; flex-wrap: wrap; gap: 6px; font-size: 10px; }
.library-status, .library-verification { display: inline-flex; padding: 3px 8px; border-radius: 5px; font-weight: 650; }
.library-status-active { background: #dcfce7; color: #166534; }
.library-status-pending { background: #fef3c7; color: #92400e; }
.library-status-inactive { background: #fee2e2; color: #991b1b; }
.library-verification { background: #eaf0f8; color: #475569; }
.library-popup-body { padding: 15px 18px; max-height: 225px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #fff; }
.library-popup-body:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.library-popup-address { display: flex; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid #edf2f7; }
.library-popup-address > svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--library-color); margin-top: 2px; }
.library-popup-address strong { display: block; color: #334155; font-size: 12px; font-weight: 650; }
.library-popup-address div div { margin-top: 3px; color: #64748b; font-size: 11px; }
.library-map-popup-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); gap: 14px 12px; margin: 14px 0; }
.library-info-block dt { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 500; color: #64748b; }
.library-info-block dt svg { width: 14px; height: 14px; flex-shrink: 0; }
.library-info-block dd { margin: 5px 0 0; font-size: 11px; color: #334155; }
.library-info-wide { grid-column: 1 / -1; }
.library-schedule-row { padding: 4px 7px; border-radius: 4px; }
.library-schedule-row:nth-child(odd) { background: #f1f5f9; }
.library-popup-gps { padding: 8px; border: 1px dashed #cbd5e1; border-radius: 5px; color: #64748b; font: 10px/1.5 monospace; }
.library-map-popup-actions { display: flex; gap: 8px; padding: 12px 16px; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.library-map-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; padding: 10px 8px; border-radius: 6px; text-decoration: none; font-size: 11px; font-weight: 650; white-space: nowrap; }
.library-map-action svg { width: 16px; height: 16px; flex-shrink: 0; }
.library-detail-overlay a.library-map-action-primary { background: var(--library-color); color: #fff; }
.library-detail-overlay a.library-map-action-secondary { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
.library-map-action:hover { filter: brightness(.95); text-decoration: none; }
.library-detail-overlay .leaflet-popup-content { margin: 0; }
.library-detail-overlay .leaflet-popup-content-wrapper { padding: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 36px #0f172a40; }
#libraries-map .library-detail-overlay a.leaflet-popup-close-button { top: 10px; right: 8px; width: 26px; height: 26px; line-height: 24px; border-radius: 50%; background: #fff; color: #64748b; border: 1px solid #e2e8f0; }
@media (max-width: 575px) {
    #libraries-map { height: 420px; }
    .libraries-table-toolbar > .card-title { width: 100%; }
    .libraries-table-scroll + .card-footer .pagination { flex-wrap: wrap; gap: .2rem; margin-left: 0 !important; }
    .library-popup-header { padding-left: 13px; }
    .library-popup-body { padding: 12px 13px; max-height: 190px; }
    .library-map-popup h3 { font-size: 14px; }
    .library-map-popup-actions { padding: 10px; gap: 6px; }
    .library-map-action { font-size: 10px; padding: 10px 6px; }
}
.library-profile-dialog { padding:0; border:0; border-radius:18px; width:min(820px, calc(100vw - 24px)); max-height:90vh; color:var(--tblr-body-color, #182433); box-shadow:0 24px 80px #0f172a55; }
.library-profile-dialog::backdrop { background:#0f172a99; backdrop-filter:blur(3px); }
.library-profile-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:24px; color:#fff; background:linear-gradient(120deg, #116a69, #164a70); }
.library-profile-heading h2 { font-size:1.45rem; margin:6px 0; overflow-wrap:anywhere; }
.library-profile-heading p { opacity:.88; overflow-wrap:anywhere; }
.library-profile-body { padding:24px; background:var(--tblr-body-bg, #fff); }
.library-profile-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 28px; margin:0; }
.library-profile-fields dt { color:#64748b; font-size:.8rem; font-weight:500; margin-bottom:4px; }
.library-profile-fields dd { margin:0; overflow-wrap:anywhere; white-space:pre-line; }
.library-profile-footer { padding:16px 24px; text-align:right; border-top:1px solid #e2e8f0; }
.library-directory-actions .btn { width:34px; height:34px; flex-shrink:0; }
.library-directory-actions .ti { font-size:19px; }
.library-action-tooltip { position:fixed; z-index:2000; border-radius:6px; background:#182433; color:#fff; padding:6px 10px; font-size:12px; pointer-events:none; max-width:calc(100vw - 16px); }
.library-legend-filter.active,.library-legend-subfilter.active { background:#e5f3f2; color:#115e59; border-left:3px solid #0d9488; }
.library-legend-grid { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); }
.library-legend-grid section { min-width:0; }
.library-legend-grid section + section { border-left:1px solid var(--tblr-border-color,#e2e8f0); }
.library-legend-title { font-size:.85rem; padding:12px 14px; margin:0; background:var(--tblr-bg-surface-secondary,#f8fafc); border-bottom:1px solid var(--tblr-border-color,#e2e8f0); }
.library-legend-options { max-height:360px; overflow-y:auto; overscroll-behavior:contain; }
.library-legend-grid section:first-child .library-legend-options { max-height:none; }
.library-legend-options .list-group-item { padding:10px 12px; font-size:.8rem; overflow-wrap:anywhere; border-radius:0; }
.library-legend-options .library-type-legend { flex-shrink:0; }
@media(max-width:575px) { .library-profile-fields { grid-template-columns:1fr; } .library-profile-heading,.library-profile-body { padding:18px; } }
.library-directory-tabs { scroll-margin-top:100px; }
.library-filter-tab-row { display:grid; grid-template-columns:72px minmax(0,1fr); gap:12px; align-items:start; }
.library-filter-tab-row > strong { font-size:.85rem; padding-top:9px; }
.library-filter-tabs { display:flex; gap:7px; overflow-x:auto; padding:2px 1px 8px; }
.library-filter-tab { display:block; flex-shrink:0; padding:8px 13px; border:1px solid var(--tblr-border-color,#dbe3eb); border-radius:9px; color:var(--tblr-body-color,#334155); font-size:.85rem; white-space:nowrap; text-decoration:none; }
.library-filter-tab:hover { background:#eef6f6; text-decoration:none; }
.library-filter-tab.active { color:#fff; background:#116a69; border-color:#116a69; }
@media(max-width:575px) { .library-filter-tab-row { grid-template-columns:1fr; gap:4px; } }
.library-marker-selected .library-pin{filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 10px #f59e0b);outline:4px solid #f59e0b;outline-offset:4px;border-radius:50%}.library-coordinate{white-space:nowrap}.library-profile-dialog{border:0;border-radius:20px;box-shadow:0 24px 80px #102b4840;width:min(880px,calc(100vw - 24px));max-height:90dvh;padding:0}.library-profile-dialog::backdrop{background:#102b4880;backdrop-filter:blur(4px)}.library-profile-heading{background:linear-gradient(125deg,#143c60,#1d7179);color:white;padding:1.5rem}.library-profile-heading h2{font-size:1.65rem;margin:.4rem 0}.library-profile-heading .small{letter-spacing:.13em;opacity:.75}.library-profile-body{padding:1.5rem;background:#f5f8fc}.library-profile-fields>div{padding:.85rem 1rem;background:white;border:1px solid #e5ebf2;border-radius:10px;min-width:0}.library-profile-fields dt{font-size:.75rem;color:#63758b;margin-bottom:.35rem}.library-profile-fields dd{font-size:.95rem;color:#20354e;overflow-wrap:anywhere;white-space:pre-wrap;margin:0}.library-profile-section{border-top:1px solid #dce4ee;margin-top:1.8rem;padding-top:1.3rem}.library-profile-footer{position:sticky;bottom:0;background:white;border-top:1px solid #e5ebf2;padding:.85rem 1.5rem;text-align:right}@media(max-width:600px){.library-profile-heading,.library-profile-body{padding:1rem}.library-profile-heading h2{font-size:1.3rem}}
