/* Resource Manager Public CSS */
:root {
    --rm-primary: #2f328b;
    --rm-primary-dark: #252870;
    --rm-secondary: #f8a428;
    --rm-secondary-dark: #e69520;
    --rm-light: #f8f9fa;
    --rm-border: #e0e0e0;
    --rm-text: #333;
    --rm-text-light: #666;
}

/* Layout */
.rm-resources-wrapper { display: flex; gap: 30px; max-width: 1200px; margin: 0 auto; padding: 20px; }
.rm-sidebar { width: 250px; flex-shrink: 0; }
.rm-main-content { flex: 1; min-width: 0; }

/* Sidebar Filters */
.rm-filter-section { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.rm-filter-section h3 { margin: 0 0 15px; font-size: 16px; color: var(--rm-primary); }
.rm-filter-options { display: flex; flex-direction: column; gap: 10px; }
.rm-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.rm-checkbox input { width: 18px; height: 18px; accent-color: var(--rm-primary); }
.rm-select { width: 100%; padding: 10px 12px; border: 1px solid var(--rm-border); border-radius: 6px; font-size: 14px; }

/* Content Header */
.rm-content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.rm-results-count { font-size: 14px; color: var(--rm-text-light); }
.rm-results-count strong { color: var(--rm-primary); }
.rm-sort-options { display: flex; align-items: center; gap: 10px; }
.rm-sort-options label { font-size: 14px; color: var(--rm-text-light); }
.rm-sort-options .rm-select { width: auto; }

/* Search */
.rm-search-box { display: flex; margin-bottom: 25px; }
.rm-search-box input { flex: 1; padding: 12px 15px; border: 1px solid var(--rm-border); border-radius: 8px 0 0 8px; font-size: 14px; }
.rm-search-box input:focus { outline: none; border-color: var(--rm-primary); }
.rm-search-box button { padding: 12px 20px; background: var(--rm-primary); color: #fff; border: none; border-radius: 0 8px 8px 0; cursor: pointer; }

/* Resources Grid */
.rm-resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* Resource Card */
.rm-resource-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 15px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.rm-resource-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.rm-card-thumbnail { position: relative; height: 160px; overflow: hidden; background: var(--rm-light); }
.rm-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.rm-card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.rm-card-badge { position: absolute; top: 10px; left: 10px; background: var(--rm-secondary); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.rm-card-content { padding: 15px; }
.rm-card-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--rm-text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--rm-text-light); }
.rm-file-type { background: var(--rm-light); padding: 2px 8px; border-radius: 4px; }
.rm-card-footer { padding: 0 15px 15px; display: flex; align-items: center; justify-content: space-between; }
.rm-download-btn { display: flex; align-items: center; gap: 6px; background: var(--rm-primary); color: #fff; border: none; padding: 10px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.rm-download-btn:hover { background: var(--rm-primary-dark); }
.rm-download-count { font-size: 12px; color: var(--rm-text-light); }

/* Loading */
.rm-loading { text-align: center; padding: 30px; color: var(--rm-text-light); }
.rm-no-results { text-align: center; padding: 50px 20px; background: var(--rm-light); border-radius: 12px; color: var(--rm-text-light); }

/* Load More */
.rm-load-more { text-align: center; margin-top: 30px; }

/* Buttons */
.rm-btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
.rm-btn-primary { background: var(--rm-primary); color: #fff; }
.rm-btn-primary:hover { background: var(--rm-primary-dark); color: #fff; }
.rm-btn-secondary { background: var(--rm-secondary); color: #fff; }
.rm-btn-secondary:hover { background: var(--rm-secondary-dark); color: #fff; }
.rm-btn-block { display: block; width: 100%; text-align: center; }

/* Forms */
.rm-register-wrapper, .rm-login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 20px; }
.rm-register-box, .rm-login-box { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); padding: 30px 35px; max-width: 450px; width: 100%; }
.rm-register-box h2, .rm-login-box h2 { text-align: center; margin: 0 0 10px; color: var(--rm-primary); font-size: 24px; }
.rm-register-desc, .rm-login-desc { text-align: center; color: var(--rm-text-light); margin-bottom: 25px; font-size: 14px; }
.rm-form-row { margin-bottom: 18px; }
.rm-form-row:last-child { margin-bottom: 0; }
.rm-form-row label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--rm-text); font-size: 14px; }
.rm-form-row label .required { color: #dc3545; }
.rm-form-row input[type="text"], .rm-form-row input[type="email"], .rm-form-row input[type="tel"], .rm-form-row input[type="password"] { width: 100%; padding: 12px 14px; border: 1px solid var(--rm-border); border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.rm-form-row input:focus { border-color: var(--rm-primary); outline: none; box-shadow: 0 0 0 3px rgba(47,50,139,0.1); }
.rm-form-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--rm-text-light); }
.rm-form-footer a { color: var(--rm-primary); }

/* User Type Options */
.rm-user-type-options { display: flex; gap: 15px; }
.rm-radio-card { flex: 1; cursor: pointer; position: relative; }
.rm-radio-card input { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; accent-color: var(--rm-primary); margin: 0; z-index: 2; cursor: pointer; }
.rm-radio-content { position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 15px; border: 2px solid var(--rm-border); border-radius: 10px; transition: all 0.2s; }
.rm-radio-card input:checked + .rm-radio-content { border-color: var(--rm-primary); background: rgba(47,50,139,0.05); }
.rm-radio-icon { font-size: 32px; margin-bottom: 8px; }
.rm-radio-label { font-size: 14px; font-weight: 500; }

/* Remember Row */
.rm-remember-row { display: flex; justify-content: space-between; align-items: center; }
.rm-forgot-link { font-size: 13px; color: var(--rm-primary); }

/* Success */
.rm-register-success { text-align: center; padding: 20px 0; }
.rm-success-icon { font-size: 60px; margin-bottom: 15px; }
.rm-register-success h3 { color: var(--rm-primary); margin: 0 0 10px; }
.rm-register-success p { color: var(--rm-text-light); margin-bottom: 20px; }

/* Popup */
.rm-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.rm-popup-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.rm-popup-content { position: relative; background: #fff; border-radius: 12px; padding: 30px; max-width: 400px; width: 90%; text-align: center; }
.rm-popup-close { position: absolute; top: 15px; right: 15px; background: #fff; border: none; font-size: 24px; cursor: pointer; color: var(--rm-text-light); z-index: 10; width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 50%; }
.rm-popup-close:hover { color: var(--rm-text); background: var(--rm-light); }
.rm-popup-content h2 { margin: 0 0 10px; color: var(--rm-primary); }
.rm-popup-content p { color: var(--rm-text-light); margin-bottom: 20px; }
.rm-popup-actions { display: flex; gap: 10px; justify-content: center; }

/* Auth Popup */
.rm-auth-popup-content { max-width: 520px; padding: 0; text-align: left; }
.rm-auth-tabs { display: flex; border-bottom: 2px solid var(--rm-border); }
.rm-auth-tab { flex: 1; padding: 10px 20px; background: none; border: none; font-size: 14px; font-weight: 500; color: var(--rm-text-light); cursor: pointer; transition: all 0.2s; position: relative; }
.rm-auth-tab:hover { color: var(--rm-primary); }
.rm-auth-tab.active { color: var(--rm-primary); }
.rm-auth-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--rm-primary); }
.rm-auth-panel { padding: 15px 20px; }
.rm-auth-panel .rm-form { text-align: left; }
.rm-auth-panel .rm-form-row { margin-bottom: 10px; }
.rm-auth-panel .rm-form-row label { margin-bottom: 3px; font-size: 13px; }
.rm-auth-panel .rm-form-row input[type="text"],
.rm-auth-panel .rm-form-row input[type="email"],
.rm-auth-panel .rm-form-row input[type="tel"],
.rm-auth-panel .rm-form-row input[type="password"] { padding: 8px 10px; font-size: 13px; }
.rm-auth-panel .rm-user-type-options { gap: 10px; }
.rm-auth-panel .rm-radio-content { padding: 10px 8px; }
.rm-auth-panel .rm-radio-icon { font-size: 22px; margin-bottom: 3px; }
.rm-auth-panel .rm-radio-label { font-size: 12px; }
.rm-auth-panel .rm-btn { padding: 10px 20px; font-size: 13px; }

/* Pending Popup */
.rm-pending-message { padding: 20px 0; }
.rm-pending-icon { font-size: 60px; margin-bottom: 15px; }
.rm-pending-message h3 { color: var(--rm-primary); margin: 0 0 15px; font-size: 20px; }
.rm-pending-message p { color: var(--rm-text-light); margin: 0 0 10px; font-size: 14px; line-height: 1.6; }
.rm-pending-note { font-size: 13px !important; color: var(--rm-text-light); opacity: 0.8; }

/* Responsive */
@media (max-width: 768px) {
    .rm-resources-wrapper { flex-direction: column; }
    .rm-sidebar { width: 100%; }
    .rm-resources-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .rm-content-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .rm-user-type-options { flex-direction: column; }
}

