/* Resources Manager. Portal look: sharp corners, white cards, green with black text, red for danger. */
.ra { font-family: Inter, Arial, sans-serif; color: #1c1e1a; display: flex; flex-direction: column; gap: 14px; }
.ra *, .ra-backdrop * { box-sizing: border-box; }
.ra-view { display: flex; flex-direction: column; gap: 14px; }
.ra-loading { margin: 0; padding: 32px 0; color: #57534e; }
.ra-status:empty { display: none; }
.ra-msg { margin: 0; padding: 12px 14px; font-size: 14px; background: #fff; border: 1px solid #e7e5e4; }
.ra-msg[hidden] { display: none; }
.ra-msg-ok { border-color: #cfe3b3; background: #eef6e3; color: #2f4d12; }
.ra-msg-error { border-color: #f0cfcb; background: #fbeceb; color: #8a2a22; }
.ra-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid #d6d3d1; background: #fff; font: inherit; font-size: 14px; color: #1c1e1a; cursor: pointer; border-radius: 0; }
.ra-tab:hover { border-color: #1c1e1a; }
.ra-tab.is-on { background: #1c1e1a; border-color: #1c1e1a; color: #fff; }
.ra-tab-count { font-size: 12px; font-weight: 600; padding: 1px 6px; background: #f5f5f4; color: #1c1e1a; }
.ra-tab.is-on .ra-tab-count { background: #8cc63e; }
.ra-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ra-search { flex: 1 1 280px; }
.ra-select { width: auto; min-width: 140px; }
.ra-input { height: 48px; width: 100%; padding: 0 10px; border: 1px solid #d6d3d1; background: #fff; font: inherit; font-size: 14px; font-weight: 400; color: #1c1e1a; border-radius: 0; margin: 0; }
.ra-input:focus { outline: 2px solid #1c1e1a; outline-offset: -1px; border-color: #1c1e1a; }
.ra-textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.ra-btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; 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; white-space: nowrap; }
.ra-btn:hover { background: #f5f5f4; }
.ra-btn-primary { background: #111; border-color: #111; color: #fff; }
.ra-btn-primary:hover { background: #2b2b2b; }
.ra-btn-danger { background: #8a2a22; border-color: #8a2a22; color: #fff; }
.ra-btn-danger:hover { background: #6f2019; }
.ra-btn-danger-outline { border-color: #8a2a22; color: #8a2a22; }
.ra-btn-danger-outline:hover { background: #fbeceb; }
.ra-btn:disabled { opacity: 0.55; cursor: default; }
.ra-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: #1c1e1a; text-decoration: underline; cursor: pointer; }
.ra-danger { color: #8a2a22; }
.ra-btn:focus-visible, .ra-link:focus-visible, .ra-tab:focus-visible, .ra-name:focus-visible, .ra-back:focus-visible { outline: 2px solid #1c1e1a; outline-offset: 2px; }
.ra-bulk { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #1c1e1a; color: #fff; }
.ra-bulk[hidden] { display: none; }
.ra-bulk .ra-btn { height: 34px; }
.ra-bulk .ra-link { color: #fff; }
.ra-bulk-count { font-size: 14px; font-weight: 600; }
.ra-table { background: #fff; border: 1px solid #e7e5e4; }
.ra-row { display: grid; grid-template-columns: 32px 64px minmax(0, 1.4fr) minmax(0, 1fr) 150px 110px; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e7e5e4; font-size: 14px; }
.ra-row:last-child { border-bottom: 0; }
.ra-row.is-selected { background: #fafaf9; }
.ra-head { background: transparent; font-size: 13px; font-weight: 600; color: #57534e; }
.ra-c-check input { width: 17px; height: 17px; margin: 0; accent-color: #1c1e1a; }
.ra-c-thumb img { width: 64px; height: 48px; object-fit: contain; background: #fff; border: 1px solid #e7e5e4; display: block; }
.ra-thumb-empty { display: flex; align-items: center; justify-content: center; width: 64px; height: 48px; background: #f5f5f4; color: #8a8d84; font-size: 12px; }
.ra-c-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ra-name { font-weight: 600; color: #1c1e1a; text-decoration: none; overflow-wrap: anywhere; }
.ra-name:hover { text-decoration: underline; }
.ra-sub { margin: 0; font-size: 13px; color: #57534e; }
.ra-sub-strong { font-size: 13px; overflow-wrap: anywhere; }
.ra-empty { margin: 0; padding: 24px 14px; color: #57534e; }
.ra-back { align-self: flex-start; font-size: 14px; color: #1c1e1a; text-decoration: underline; }
.ra-edit-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ra-title { margin: 0; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 26px; overflow-wrap: anywhere; }
.ra-badge { display: inline-block; padding: 3px 8px; font-size: 12px; font-weight: 600; background: #f5f5f4; color: #57534e; }
.ra-edit { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr); gap: 16px; align-items: start; }
.ra-main, .ra-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ra-card { background: #fff; border: 1px solid #e7e5e4; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ra-card[hidden], .ra-label[hidden], .ra-upwrap[hidden], .ra-links[hidden], .ra-progress[hidden] { display: none; }
.ra-h3 { margin: 0; font-size: 15px; font-weight: 700; }
.ra-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ra-label, .ra-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; }
.ra-label-text { font-size: 13px; font-weight: 600; }
.ra-optional { font-weight: 400; color: #57534e; }
.ra-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ra-check input { width: 18px; height: 18px; margin: 0; accent-color: #1c1e1a; }
.ra-links { display: flex; flex-direction: column; gap: 12px; }
.ra-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-chips:empty { display: none; }
.ra-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 9px; background: #1c1e1a; color: #fff; font-size: 13px; font-weight: 600; }
.ra-chip-x { width: 22px; height: 22px; border: 0; background: transparent; color: #8cc63e; font-size: 16px; line-height: 1; cursor: pointer; }
.ra-pick { position: relative; }
.ra-pick-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: 280px; overflow: auto; background: #fff; border: 1px solid #1c1e1a; border-top: 0; box-shadow: 0 6px 20px rgba(28, 30, 26, 0.12); }
.ra-pick-menu[hidden] { display: none; }
.ra-pick-item { padding: 8px 12px; font-size: 14px; font-weight: 400; cursor: pointer; }
.ra-pick-item:hover { background: #f5f5f4; }
.ra-pick-empty { padding: 8px 12px; font-size: 14px; font-weight: 400; color: #57534e; }
.ra-upwrap { display: flex; flex-direction: column; gap: 10px; }
.ra-files { display: flex; flex-direction: column; gap: 6px; }
.ra-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e7e5e4; font-size: 14px; }
.ra-file-fmt { min-width: 44px; padding: 2px 6px; background: #1c1e1a; color: #8cc63e; font-size: 11px; font-weight: 700; text-align: center; }
.ra-file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ra-new { font-size: 12px; font-weight: 600; color: #2f4d12; }
.ra-drop { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border: 1px dashed #a8a29e; background: #fafaf9; }
.ra-drop.is-over { border-color: #1c1e1a; background: #eef6e3; }
.ra-progress { font-size: 13px; font-weight: 600; }
.ra-preview { background: #f5f5f4; border: 1px solid #e7e5e4; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; }
.ra-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ra-preview .ra-thumb-empty { width: auto; height: auto; background: none; }
.ra-side-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ra-save-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ra-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(28, 30, 26, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; font-family: Inter, Arial, sans-serif; color: #1c1e1a; }
.ra-dialog { background: #fff; width: 100%; max-width: 480px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.ra-dialog-title { margin: 0; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 21px; overflow-wrap: anywhere; }
.ra-text { margin: 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 991px) { .ra-edit { grid-template-columns: 1fr; } .ra-side { order: -1; } }
@media (max-width: 767px) {
  .ra-row { grid-template-columns: 28px 56px minmax(0, 1fr); }
  .ra-hide-sm { display: none; }
  .ra-two { grid-template-columns: 1fr; }
}
.ra-btn[hidden] { display: none; }
