/* Scoped presentation fixes. No authentication or permission changes. */
.research-sections { margin: 20px 0 28px; padding: 20px; border: 1px solid var(--line, #26354b); border-radius: 16px; background: var(--bg-card, #18253c); }
.research-sections h3 { margin: 0 0 8px; }
.research-sections p { margin: 0 0 14px; color: var(--text-muted, #b2c2d6); }
.research-section-links { display: flex; flex-wrap: wrap; gap: 10px; }
.research-section-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line, #314359); border-radius: 10px; text-decoration: none; overflow-wrap: anywhere; max-width: 100%; }
.research-section-links small { color: var(--text-muted, #b2c2d6); white-space: nowrap; }
/* Custom columns live inside the research channel, including old menu records. */
body:not(:has(.admin-layout)) .main-nav a[href*="c=section"] { display: none !important; }
.user-nav-toggle { display: none; }
body:not(:has(.admin-layout)) .user-dashboard .data-table .badge { position: static !important; transform: none !important; display: inline-flex; margin: 0; }
@media (max-width: 768px) {
 body:not(:has(.admin-layout)) .site-header { position: relative !important; top: auto; height: auto !important; }
 body:not(:has(.admin-layout)) .header-container { height: auto !important; min-height: 0; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
 body:not(:has(.admin-layout)) .header-container .logo { flex: 1 1 150px; min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
 body:not(:has(.admin-layout)) .header-actions { flex: 0 1 auto; min-width: 0; max-width: 100%; margin-left: auto; }
 body:not(:has(.admin-layout)) .user-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 100%; }
 body:not(:has(.admin-layout)) .user-info { max-width: 130px; min-width: 0; }
 body:not(:has(.admin-layout)) .user-info > a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 body:not(:has(.admin-layout)) .user-info .points-badge { display: none !important; }
 body:not(:has(.admin-layout)) .user-menu .btn-admin { display: inline-flex !important; visibility: visible !important; align-items: center; min-height: 40px; padding: 8px 12px; font-size: 13px; white-space: nowrap; position: static; }
 body:not(:has(.admin-layout)) .user-menu .btn-logout { display: inline-flex; align-items: center; min-height: 40px; }
 body:not(:has(.admin-layout)) .site-main { padding-top: 0; min-width: 0; }
 body:not(:has(.admin-layout)) .user-dashboard { grid-template-columns: minmax(0, 1fr) !important; width: 100%; min-width: 0; gap: 18px; padding-top: 16px; }
 body:not(:has(.admin-layout)) .user-sidebar { position: static !important; width: 100%; min-width: 0; box-sizing: border-box; padding: 14px 16px; text-align: left; order: -1; }
 body:not(:has(.admin-layout)) .user-sidebar > .user-avatar-lg,
 body:not(:has(.admin-layout)) .user-sidebar > .user-bio,
 body:not(:has(.admin-layout)) .user-sidebar > p { display: none; }
 body:not(:has(.admin-layout)) .user-sidebar h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
 body:not(:has(.admin-layout)) .user-sidebar.is-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
 body:not(:has(.admin-layout)) .user-nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--link, #39d6e2); background: transparent; border: 1px solid var(--line, #314359); border-radius: 9px; cursor: pointer; }
 body:not(:has(.admin-layout)) .user-sidebar .dashboard-nav { grid-column: 1 / -1; margin-top: 0; min-width: 0; }
 body:not(:has(.admin-layout)) .user-sidebar.is-compact:not(.is-nav-open) .dashboard-nav { display: none; }
 body:not(:has(.admin-layout)) .dashboard-nav-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
 body:not(:has(.admin-layout)) .dashboard-nav a { min-height: 44px; padding: 8px 10px; overflow-wrap: anywhere; }
 body:not(:has(.admin-layout)) .dashboard-content { min-width: 0; max-width: 100%; }
 body:not(:has(.admin-layout)) .dashboard-content h2 { margin-top: 0; }
 body:not(:has(.admin-layout)) .user-dashboard .stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
 body:not(:has(.admin-layout)) .user-dashboard .stat-card { min-width: 0; padding: 15px 10px; }
 /* Cards preserve the full title and date; no clipped desktop columns. */
 body:not(:has(.admin-layout)) .user-dashboard .data-table.mobile-records { display: block !important; width: 100%; max-width: 100%; min-width: 0; table-layout: auto; white-space: normal; overflow: visible; background: transparent; border: 0; box-shadow: none; }
 body:not(:has(.admin-layout)) .mobile-records thead { display: none; }
 body:not(:has(.admin-layout)) .mobile-records tbody { display: grid; gap: 12px; }
 body:not(:has(.admin-layout)) .mobile-records tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 16px; border: 1px solid var(--line, #26354b); border-radius: 12px; background: var(--bg-card, #18253c); }
 body:not(:has(.admin-layout)) .user-dashboard .mobile-records tbody td { display: block; width: auto; min-width: 0; max-width: 100%; padding: 0; border: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; word-break: normal; text-align: left; }
 body:not(:has(.admin-layout)) .mobile-records td::before { content: attr(data-mobile-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: normal; color: var(--text-muted, #b2c2d6); }
 body:not(:has(.admin-layout)) .mobile-records td:first-child,
 body:not(:has(.admin-layout)) .mobile-records td[colspan] { grid-column: 1 / -1; }
 body:not(:has(.admin-layout)) .mobile-records td a { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
 body:not(:has(.admin-layout)) .mobile-records .badge,
 body:not(:has(.admin-layout)) .mobile-records .badge-approved { position: static !important; transform: none !important; display: inline-flex; margin: 0; }
 body:not(:has(.admin-layout)) .user-dashboard input:not([type="checkbox"]):not([type="radio"]),
 body:not(:has(.admin-layout)) .user-dashboard select,
 body:not(:has(.admin-layout)) .user-dashboard textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
 body:not(:has(.admin-layout)) .user-dashboard .settings-tabs { flex-wrap: wrap; }
 .research-sections { padding: 16px; }
 .research-section-links { display: grid; grid-template-columns: minmax(0, 1fr); }
 .research-section-links a { justify-content: space-between; }
}
