/* Resource library pages. Approved prototype: white filter bar, 5-up card grid, black tags with green text,
   green button with black text, sharp corners. */
.rs { font-family: Inter, Arial, sans-serif; color: #1c1e1a; display: flex; flex-direction: column; gap: 20px; }
.rs *, .rs *::before, .rs *::after { box-sizing: border-box; }
.rs-bar { background: #fff; border: 1px solid #e7e5e4; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.rs-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rs-field { display: flex; flex-direction: column; gap: 4px; flex: 0 0 220px; margin: 0; }
.rs-field[hidden] { display: none; }
.rs-field-grow { flex: 1 1 260px; }
.rs-label { font-size: 13px; font-weight: 600; color: #57534e; }
.rs-select, .rs-search { height: 48px; border: 1px solid #d6d3d1; background: #fff; font: inherit; font-size: 14px; color: #1c1e1a; padding: 0 10px; border-radius: 0; width: 100%; margin: 0; }
.rs-select-sm { height: 36px; width: auto; font-size: 13px; padding: 0 8px; }
.rs-search-wrap { position: relative; display: block; }
.rs-search-icon { position: absolute; left: 12px; top: 12px; color: #57534e; display: flex; }
.rs-search { padding-left: 36px; }
.rs-select:focus, .rs-search:focus { outline: 2px solid #1c1e1a; outline-offset: -1px; border-color: #1c1e1a; }
.rs-bar-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid #e7e5e4; padding-top: 12px; }
.rs-bar-left, .rs-bar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rs-count { font-size: 14px; font-weight: 600; }
.rs-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #57534e; margin: 0; }
.rs-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: #1c1e1a; text-decoration: underline; cursor: pointer; }
.rs-link[hidden] { display: none; }
.rs-link:disabled { opacity: 0.6; cursor: default; }
.rs-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid #1c1e1a; background: #fff; color: #1c1e1a; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 0; text-decoration: none; }
.rs-btn-primary { background: #111; border-color: #111; color: #fff; }
.rs-btn-primary:hover { background: #2b2b2b; }
.rs-btn:disabled { background: #e7e5e4; border-color: #e7e5e4; color: #6b6e66; cursor: default; }
.rs-btn:focus-visible, .rs-link:focus-visible, .rs-preview:focus-visible { outline: 2px solid #1c1e1a; outline-offset: 2px; }
.rs-msg { margin: 0; padding: 12px 14px; background: #fff; border: 1px solid #e7e5e4; font-size: 14px; }
.rs-msg-error { background: #fbeceb; border-color: #f0cfcb; color: #8a2a22; }
.rs-status:empty { display: none; }
.rs-empty { grid-column: 1 / -1; margin: 0; padding: 32px 16px; background: #fff; border: 1px solid #e7e5e4; text-align: center; color: #57534e; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rs-empty p { margin: 0; }
.rs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.rs-card { background: #fff; border: 1px solid #e7e5e4; display: flex; flex-direction: column; }
.rs-card.is-selected { border-color: #1c1e1a; box-shadow: inset 0 0 0 1px #1c1e1a; }
.rs-card-top { position: relative; }
.rs-preview { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; background: #f5f5f4; border: 0; padding: 0; cursor: pointer; color: #8a8d84; overflow: hidden; }
.rs-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.rs-check { position: absolute; top: 8px; right: 8px; display: flex; padding: 4px; background: rgba(255,255,255,0.9); cursor: pointer; margin: 0; }
.rs-check input { width: 18px; height: 18px; margin: 0; accent-color: #1c1e1a; cursor: pointer; }
.rs-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.rs-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rs-tag { background: #1c1e1a; color: #8cc63e; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 6px; }
.rs-tag-light { background: #f5f5f4; color: #1c1e1a; }
.rs-name { margin: 4px 0 0; font-family: Inter, Arial, sans-serif; font-size: 15px; font-weight: 700; line-height: 1.3; word-break: break-word; }
.rs-sub { margin: 0; font-size: 13px; line-height: 1.4; color: #57534e; }
.rs-card-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 14px; }
@media (max-width: 1279px) { .rs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991px) { .rs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .rs-field { flex: 1 1 100%; } }
@media (max-width: 479px) { .rs-grid { grid-template-columns: 1fr; } }
