/* Research Hub — Bootstrap 5 theme + custom components */

:root {
    --bs-primary: #1e3c72;
    --bs-primary-rgb: 30, 60, 114;
    --bs-secondary: #2a5298;
    --bs-info: #4a90e2;
    --bs-success: #2d8659;
    --bs-warning: #e67e22;
    --bs-font-sans-serif: 'Inter', system-ui, sans-serif;
    --rh-heading-font: 'Playfair Display', Georgia, serif;
    --rh-accent-light: #e8f4f8;

    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --accent-blue: #4a90e2;
    --light-blue: #e8f4f8;
    --green: #2d8659;
    --orange: #e67e22;
    --purple: #8e44ad;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);

    /* Admin navy palette — higher contrast on dark surfaces */
    --rh-admin-bg: #0c1a33;
    --rh-admin-surface: #152a4a;
    --rh-admin-header: #1a3560;
    --rh-admin-elevated: #1e3f6e;
    --rh-admin-border: #4a6fa5;
    --rh-admin-muted: rgba(240, 244, 248, 0.9);
    --rh-text-on-dark: #f4f7fb;
    --rh-text-muted-dark: rgba(220, 230, 245, 0.88);
    --rh-accent-on-dark: #93c5fd;
    --rh-accent-on-dark-hover: #bfdbfe;
    --rh-top-bar-height: 44px;
}

/* Compact top bar — nav opens in offcanvas modal */
.rh-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: var(--rh-top-bar-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem;
    background: linear-gradient(90deg, #0f2444 0%, #1a3560 100%);
    border-bottom: 1px solid var(--rh-admin-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.rh-nav-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--rh-accent-on-dark) !important;
    border-color: var(--rh-accent-on-dark) !important;
    color: #0c1a33 !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.rh-nav-open-btn:hover,
.rh-nav-open-btn:focus {
    background: var(--rh-accent-on-dark-hover) !important;
    border-color: var(--rh-accent-on-dark-hover) !important;
    color: #0c1a33 !important;
}

.rh-top-bar-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rh-text-on-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.rh-top-bar-docs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.rh-top-bar-docs a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rh-accent-on-dark);
    text-decoration: none;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.rh-top-bar-docs a:hover {
    color: var(--rh-text-on-dark);
    background: rgba(255, 255, 255, 0.1);
}

.rh-top-bar-docs a.current {
    color: var(--rh-text-on-dark);
    background: rgba(255, 255, 255, 0.18);
}

.rh-top-bar-docs a.nav-deprecated {
    color: rgba(220, 230, 245, 0.55);
}

.rh-top-bar-docs a.nav-deprecated:hover {
    color: rgba(240, 244, 248, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.rh-top-bar-docs a.nav-deprecated.current {
    color: rgba(240, 244, 248, 0.9);
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 575.98px) {
    .rh-top-bar-title {
        display: none;
    }
}

/* Intro: disclaimer + on-page TOC (clears fixed top bar) */
.rh-mockup-intro {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--rh-top-bar-height) + 2.5rem) 1rem 1.25rem;
}

.rh-mockup-disclaimer {
    background: #fff8e6;
    border: 1px solid #e8d9a8;
    border-left: 4px solid #d4a017;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.92rem;
    color: #5a4d20;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.rh-mockup-disclaimer strong {
    color: #6b5612;
}

.rh-mockup-disclaimer a {
    color: #1a73e8;
}

.rh-page-toc {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem 1.15rem;
    box-shadow: var(--shadow);
}

.rh-page-toc h2 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.rh-page-toc-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.85rem;
}

.rh-page-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.35rem 1rem;
}

.rh-page-toc-grid .toc-link {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 0.35rem 0.4rem;
    border-radius: 4px;
    border-left: none;
}

.rh-page-toc-grid .toc-link:hover {
    background: var(--light-blue);
    color: var(--secondary-blue);
}

.rh-page-toc-grid .toc-link.active {
    background: var(--light-blue);
    color: var(--primary-blue);
    font-weight: 600;
}

.rh-page-toc-grid .toc-link i {
    width: 1.1rem;
    text-align: center;
    margin-right: 0.35rem;
    color: var(--text-light);
}

/* Shrink mockup screen previews for faster scanning */
.rh-mockups-page .main-content.rh-preview-scale {
    padding-top: 0.5rem;
    zoom: 0.75;
}

@supports not (zoom: 1) {
    .rh-mockups-page .main-content.rh-preview-scale {
        transform: scale(0.75);
        transform-origin: top center;
        width: 133.333%;
        margin-left: -16.6665%;
        margin-bottom: -25%;
    }
}

/* Modal offcanvas — collapsed by default, compact width */
.rh-toc-offcanvas {
    --bs-offcanvas-width: min(240px, 88vw);
    top: var(--rh-top-bar-height);
    height: calc(100% - var(--rh-top-bar-height));
}

.rh-toc-offcanvas .offcanvas-body {
    overflow-y: auto;
}

.rh-toc-header {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--light-blue) 100%);
    border-bottom: 1px solid var(--border-color);
}

.rh-toc-header .offcanvas-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.rh-toc-search-wrap {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--gray-medium);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 2;
}

.rh-toc-search {
    font-size: 0.8rem;
    border-color: var(--border-color);
}

.main-content {
    padding-top: var(--rh-top-bar-height);
    margin-left: 0;
    width: 100%;
}

.rh-anchor {
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}

.rh-accent-box {
    background: var(--light-blue);
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.rh-logo {
    font-family: var(--rh-heading-font);
}

/* Hero */
.hero .rh-hero-btn {
    color: var(--primary-blue);
    font-weight: 600;
}

.hero h1, .hero h2, .hero h3 {
    color: var(--white);
}

.hero-stat-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 0.5rem;
}

.hero .stat-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.hero .stat-number {
    color: #cfe8ff;
}

.rh-hero-nav .navbar-brand,
.rh-hero-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.rh-hero-nav .nav-link:hover {
    color: var(--white) !important;
}

/* Global blue accents (public content areas) */
.main-content a:not(.btn):not(.nav-link):not(.toc-link):not(.navbar-brand) {
    color: var(--accent-blue);
}

.main-content a:not(.btn):not(.nav-link):not(.toc-link):not(.navbar-brand):hover {
    color: var(--secondary-blue);
}

.auth-header h1 {
    color: var(--primary-blue);
}

.nav-tabs .nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--accent-blue);
}

.table thead {
    background: var(--light-blue);
}

.table thead th {
    color: var(--primary-blue);
    font-weight: 600;
}

/* stat-card blue tint defined in Stats Section below */

.screen-section:not(.hero):not(.admin-section):not(.auth-section) h2 {
    color: var(--primary-blue);
}

/* Bootstrap button compatibility — explicit white label (avoids clash with legacy .btn-primary) */
.btn.btn-primary:not(.rh-hero-btn):not(.rh-nav-open-btn) {
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-color: #ffffff;
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: #ffffff;
    font-weight: 600;
}

.btn.btn-primary:not(.rh-hero-btn):not(.rh-nav-open-btn):hover,
.btn.btn-primary:not(.rh-hero-btn):not(.rh-nav-open-btn):focus,
.btn.btn-primary:not(.rh-hero-btn):not(.rh-nav-open-btn):active {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.btn.btn-secondary {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: var(--white);
}

.btn.btn-outline-secondary {
    color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

.btn-submit {
    background: var(--green) !important;
    color: var(--white) !important;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn-reset {
    background: var(--gray-medium);
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
}

/* Cards */
.researcher-card.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.researcher-card.card:hover {
    transform: translateY(-5px);
}

/* Tables */
.table-responsive.admin-table,
.table-responsive.researchers-table {
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.admin-section .table-responsive.admin-table {
    border-color: var(--rh-admin-border);
}

/* Admin navy theme — blue, not black/white */
.admin-section {
    background: var(--rh-admin-bg);
    color: var(--rh-text-on-dark);
}

.admin-section h1,
.admin-section h2,
.admin-section h3,
.admin-section h4,
.admin-section h5,
.admin-section h6 {
    color: var(--rh-text-on-dark);
}

.admin-section .text-muted,
.admin-section small:not([style]) {
    color: var(--rh-text-muted-dark) !important;
}

.admin-section a:not(.btn):not(.nav-link):not(.navbar-brand):not(.toc-link) {
    color: var(--rh-accent-on-dark);
}

.admin-section a:not(.btn):not(.nav-link):not(.navbar-brand):not(.toc-link):hover {
    color: var(--rh-accent-on-dark-hover);
}

.admin-section .btn.btn-primary {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
}

.admin-section .btn.btn-primary:hover,
.admin-section .btn.btn-primary:focus,
.admin-section .btn.btn-primary:active {
    background-color: #60a5fa;
    border-color: #60a5fa;
    color: #0c1a33;
}

.admin-section .admin-header {
    background: var(--rh-admin-header);
    border-bottom-color: var(--rh-admin-border);
}

.admin-section .dashboard-card,
.admin-section .dashboard-card.card {
    background: var(--rh-admin-surface);
    border-color: var(--rh-admin-border);
}

.admin-section .form-control,
.admin-section .form-select,
.admin-section .rh-admin-input {
    background: var(--rh-admin-elevated);
    border-color: var(--rh-admin-border);
    color: var(--white);
}

.admin-section .form-control:focus,
.admin-section .form-select:focus {
    background: var(--rh-admin-elevated);
    border-color: var(--accent-blue);
    color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.admin-section .admin-nav {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.admin-section .nav-tabs .nav-link {
    color: var(--rh-admin-muted);
}

.admin-section .nav-tabs .nav-link.active {
    color: var(--white);
    background: var(--rh-admin-surface);
    border-color: var(--rh-admin-border) var(--rh-admin-border) var(--rh-admin-surface);
}

.admin-section .table {
    --bs-table-bg: var(--rh-admin-surface);
    --bs-table-color: var(--white);
    --bs-table-striped-bg: var(--rh-admin-elevated);
    --bs-table-hover-bg: rgba(74, 144, 226, 0.15);
    --bs-table-border-color: var(--rh-admin-border);
}

.admin-section .table thead {
    background: var(--rh-admin-header);
}

.admin-section .table thead th {
    color: var(--white);
    border-color: var(--rh-admin-border);
}

.admin-section .modal-content {
    background: var(--rh-admin-surface);
    border-color: var(--rh-admin-border);
    color: var(--white);
}

.admin-section .modal-header {
    background: var(--rh-admin-header);
    border-bottom-color: var(--rh-admin-border);
    color: var(--white);
}

.admin-section .modal-header .btn-close {
    filter: invert(1);
}

.admin-section .project-card,
.admin-section .news-item {
    background: var(--rh-admin-surface) !important;
    border-color: var(--rh-admin-border) !important;
}

.admin-section .chart-placeholder {
    background: var(--rh-admin-elevated) !important;
    color: var(--rh-admin-muted) !important;
}

.verification-input input.form-control {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0;
}

/* Unified status badges */
.rh-badge-active, .badge-active, .status-active {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.rh-badge-pending, .badge-pending, .status-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.rh-badge-inactive, .badge-inactive, .status-inactive {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

/* Tab overflow */
.overflow-auto .nav-tabs {
    flex-wrap: nowrap;
}

/* Print */
@media print {
    .rh-toc-offcanvas,
    .rh-top-bar,
    .offcanvas-backdrop {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--white);
    scroll-behavior: smooth;
    display: block !important;
}

.main-content {
    flex: none !important;
    width: 100%;
    max-width: 100%;
}

/* Table of Contents — compact modal nav */
.toc-nav {
    padding: 0.25rem 0.35rem 0.75rem;
}

.toc-group {
    margin-bottom: 0.15rem;
}

.toc-group[open] > .toc-section-title {
    color: var(--primary-blue);
}

.toc-section-title {
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.45rem 0.55rem;
    color: var(--text-light);
    margin: 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px;
    user-select: none;
}

.toc-section-title::-webkit-details-marker {
    display: none;
}

.toc-section-title::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.toc-group[open] > .toc-section-title::after {
    transform: rotate(180deg);
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    font-size: 0.78rem;
    line-height: 1.3;
    border-left: 2px solid transparent;
    margin: 0 0.25rem 1px;
    gap: 0.35rem;
}

.toc-link:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    border-left-color: var(--accent-blue);
}

.toc-link.active {
    background: var(--rh-accent-light);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    font-weight: 600;
}

.toc-link i {
    width: 14px;
    flex-shrink: 0;
    font-size: 0.72rem;
    opacity: 0.85;
    text-align: center;
}

.toc-link.toc-hidden {
    display: none;
}

.toc-group.toc-group-hidden {
    display: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.screen-section {
    min-height: auto;
    padding: 2rem 1.5rem;
    border-bottom: 2px solid var(--gray-medium);
    page-break-inside: avoid;
}

.screen-section:last-child {
    border-bottom: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation Header */
.nav-header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 1rem;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-family: 'Playfair Display', serif;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    font-size: 0.9rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.hero h1 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.hero .btn-primary {
    background: var(--white);
    color: var(--primary-blue);
}

.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-blue);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: var(--light-blue);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Researcher Profiles Section */
.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.researcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.researcher-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.researcher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.researcher-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.researcher-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.researcher-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.researcher-title {
    color: var(--text-light);
    font-size: 0.8rem;
}

.researcher-institution {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.researcher-bio {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.keyword {
    background: var(--gray-light);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.researcher-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    flex: 1;
}

/* Search Interface */
.search-section {
    background: var(--light-blue);
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.5rem 1.5rem 1.5rem 3.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: center;
}

.filter-tag {
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
}

/* Thematic Areas */
.thematic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .thematic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .thematic-grid {
        grid-template-columns: 1fr;
    }
}

.thematic-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid;
}

.thematic-card.sustainability {
    border-top-color: var(--green);
}

.thematic-card.health {
    border-top-color: var(--orange);
}

.thematic-card.digital {
    border-top-color: var(--purple);
}

.thematic-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.thematic-card.sustainability .thematic-icon {
    color: var(--green);
}

.thematic-card.health .thematic-icon {
    color: var(--orange);
}

.thematic-card.digital .thematic-icon {
    color: var(--purple);
}

.thematic-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.thematic-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Intake Form */
.form-section {
    background: var(--light-blue);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-submit {
    background: var(--accent-blue);
    color: var(--white);
}

.btn-submit:hover {
    background: var(--secondary-blue);
}

.btn-reset {
    background: var(--gray-medium);
    color: var(--text-dark);
}

/* Request Portal */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.portal-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s;
}

.portal-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.portal-icon {
    font-size: 2rem;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
}

.portal-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.portal-card p {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 2rem 1.5rem;
    text-align: center;
}

.footer h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    text-align: left;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

/* Partners/Logos Section */
.partners-section {
    background: var(--gray-light);
    padding: 2rem 1.5rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    align-items: center;
    justify-items: center;
    margin-top: 1.5rem;
}

.partner-logo {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.8;
    transition: all 0.3s;
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.partner-name {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
}

.hero-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.hero-logo {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Profile Detail Page */
.profile-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 1.5rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.profile-header-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 3rem;
    font-weight: 700;
    border: 4px solid rgba(255,255,255,0.3);
}

.profile-info h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.profile-info .title {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.profile-info .institution {
    font-size: 1rem;
    opacity: 0.8;
}

.profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.profile-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.profile-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-medium);
}

.publications-list {
    list-style: none;
}

.publications-list li {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-medium);
    margin-bottom: 0.5rem;
}

.publications-list li:last-child {
    border-bottom: none;
}

.publication-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.publication-details {
    font-size: 0.9rem;
    color: var(--text-light);
}

.partnerships-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.partnership-item {
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
}

.partnership-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.partnership-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-card {
    background: var(--light-blue);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.contact-card h3 {
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-info strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

/* Search Results Page */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-count {
    color: var(--text-light);
    font-size: 1rem;
}

.sort-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

.result-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2rem;
    transition: all 0.3s;
}

.result-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.result-match-score {
    background: var(--accent-blue);
    color: var(--white);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-match-score .score {
    font-size: 2rem;
    font-weight: 700;
}

.result-match-score .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Success Stories */
.story-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.story-header {
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
    color: var(--white);
    padding: 2rem;
}

.story-header h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.story-content {
    padding: 2rem;
}

.story-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-medium);
}

.story-stat {
    text-align: center;
}

.story-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.story-stat .label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Researcher Dashboard */
.dashboard-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--gray-medium);
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.stat-box .label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Researcher Table View */
.table-view-section {
    background: var(--gray-light);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.25rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.view-toggle button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.view-toggle button.active {
    background: var(--accent-blue);
    color: var(--white);
}

.researchers-table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.researchers-table table {
    width: 100%;
    border-collapse: collapse;
}

.researchers-table thead {
    background: var(--primary-blue);
    color: var(--white);
}

.researchers-table th {
    padding: 0.75rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.researchers-table th:first-child {
    padding-left: 2rem;
}

.researchers-table th:last-child {
    padding-right: 2rem;
}

.researchers-table tbody tr {
    border-bottom: 1px solid var(--gray-medium);
    transition: background 0.2s;
}

.researchers-table tbody tr:hover {
    background: var(--light-blue);
}

.researchers-table tbody tr:last-child {
    border-bottom: none;
}

.researchers-table td {
    padding: 0.75rem 0.75rem;
    vertical-align: middle;
}

.researchers-table td:first-child {
    padding-left: 2rem;
}

.researchers-table td:last-child {
    padding-right: 2rem;
}

.table-researcher-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.table-researcher-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.table-researcher-details .title {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.table-researcher-details .institution {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.table-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 400px;
}

.table-keyword {
    background: var(--gray-light);
    color: var(--text-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.table-action-btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
}

.table-action-btn-primary:hover {
    background: #60a5fa;
    color: #0c1a33;
}

.table-action-btn-secondary {
    background: var(--gray-medium);
    color: var(--text-dark);
}

.table-action-btn-secondary:hover {
    background: var(--border-color);
}

.table-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pagination-btn.active {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
}

.table-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.table-filter {
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.table-filter:hover,
.table-filter.active {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
}

/* Login/Registration Pages */
.auth-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray-medium);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    border-color: var(--accent-blue);
    background: var(--light-blue);
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--gray-medium);
}

.divider span {
    background: var(--white);
    padding: 0 1rem;
    color: var(--text-light);
    position: relative;
}

/* Notifications/Messages */
.notification-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    gap: 1rem;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--gray-light);
}

.notification-item.unread {
    background: var(--light-blue);
}

.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-icon.info {
    background: var(--light-blue);
    color: var(--accent-blue);
}

.notification-icon.success {
    background: #d1fae5;
    color: #059669;
}

.notification-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.notification-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

/* Partner Dashboard */
.partner-dashboard-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.partner-dashboard-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-medium);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--accent-blue);
}

.timeline-content {
    background: var(--gray-light);
    padding: 1rem;
    border-radius: 8px;
}

.timeline-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Settings Page */
.settings-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-medium);
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-medium);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    flex: 1;
}

.settings-label h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.settings-label p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.settings-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Email Templates Admin */
.template-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-item {
    background: var(--rh-admin-surface);
    border: 1px solid var(--rh-admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-info h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.template-info p {
    color: var(--rh-text-muted-dark);
    font-size: 0.9rem;
}

/* Analytics Dashboard */
.chart-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.chart-placeholder {
    height: 300px;
    background: var(--gray-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
}

.metric-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.metric-card .metric-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.metric-card .metric-change {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #059669;
}

/* Admin/Backend Styles */
.admin-header {
    background: var(--rh-admin-header);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rh-admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    gap: 1rem;
}

.admin-nav a {
    color: var(--rh-text-muted-dark);
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--rh-accent-on-dark);
    color: #0c1a33;
}

.admin-content {
    padding: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background: var(--rh-admin-surface);
    border: 1px solid var(--rh-admin-border);
    border-radius: 6px;
    padding: 1rem;
}

.dashboard-card h3 {
    color: var(--rh-text-muted-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    opacity: 1;
}

.dashboard-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rh-accent-on-dark);
    margin-bottom: 0.35rem;
}

.dashboard-card .change {
    font-size: 0.85rem;
    color: #4ade80;
}

.admin-table {
    width: 100%;
    background: var(--rh-admin-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rh-admin-border);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--rh-admin-header);
}

.admin-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--white);
    border-bottom: 1px solid var(--rh-admin-border);
    font-size: 0.85rem;
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--rh-admin-border);
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.admin-table tr:hover {
    background: var(--rh-admin-elevated);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fbbf24;
    color: #78350f;
}

.status-active {
    background: #4ade80;
    color: #14532d;
}

.status-completed {
    background: #60a5fa;
    color: #1e3a8a;
}

.status-rejected {
    background: #f87171;
    color: #7f1d1d;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-edit {
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
}

.btn-delete {
    background: #ef4444;
    color: var(--white);
}

.btn-view {
    background: #10b981;
    color: var(--white);
}

.form-modal {
    background: var(--rh-admin-surface);
    border: 1px solid var(--rh-admin-border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.form-modal h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.form-group label {
    color: rgba(255,255,255,0.9);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--rh-admin-elevated);
    border-color: var(--rh-admin-border);
    color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
}

.ai-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.ai-tool-card {
    background: var(--rh-admin-surface);
    border: 1px solid var(--rh-admin-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.ai-tool-card h4 {
    color: var(--white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-tool-card .icon {
    color: var(--accent-blue);
}

.ai-tool-card p {
    color: var(--rh-text-muted-dark);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.run-button {
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

.search-results {
    background: var(--rh-admin-surface);
    border: 1px solid var(--rh-admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--rh-admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-info h5 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.result-info p {
    color: var(--rh-text-muted-dark);
    font-size: 0.85rem;
}

.match-score {
    background: var(--accent-blue);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.page-break {
    page-break-before: always;
    border-top: 5px solid #666;
    padding-top: 3rem;
}

/* Print Styles */
@media print {
    .screen-section {
        page-break-after: always;
        min-height: auto;
        padding: 2rem 1rem;
    }

    .nav-header {
        position: static;
        box-shadow: none;
        border-bottom: 2px solid var(--border-color);
    }

    .btn {
        border: 1px solid var(--border-color);
        background: var(--white) !important;
        color: var(--text-dark) !important;
    }

    .researcher-card:hover,
    .portal-card:hover {
        transform: none;
    }

    .page-break {
        page-break-before: always;
    }
}

/* 2FA Styles */
.two-factor-section {
    background: var(--gray-light);
}

.qr-code-container {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 400px;
}

.qr-code-placeholder {
    width: 200px;
    height: 200px;
    background: var(--gray-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.backup-codes {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.backup-code {
    display: inline-block;
    background: var(--gray-light);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.verification-input {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.verification-input input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.verification-input input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

/* ORCID/Google Scholar Integration */
.orcid-button {
    background: #A6CE39;
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.orcid-button:hover {
    background: #8FB32D;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.scholar-button {
    background: #4285F4;
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.scholar-button:hover {
    background: #357AE8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.import-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.import-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.import-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--light-blue);
    border-radius: 6px;
    font-size: 0.9rem;
}

.import-status.success {
    background: #d1fae5;
    color: #065f46;
}

.import-status.error {
    background: #fee2e2;
    color: #991b1b;
}

/* User Invitation Styles */
.invitation-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.invitation-card:hover {
    box-shadow: var(--shadow);
}

.invitation-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.invitation-form {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Cloud API Search */
.api-search-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.api-endpoint {
    background: var(--rh-admin-elevated);
    color: #4ade80;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.api-response {
    background: var(--gray-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.api-response pre {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Backend Research Area */
.research-area-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--gray-medium);
    margin-bottom: 2rem;
}

.research-tab {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s;
}

.research-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.news-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.news-item:hover {
    box-shadow: var(--shadow);
}

.news-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-active-project {
    background: #d1fae5;
    color: #065f46;
}

.badge-completed {
    background: #dbeafe;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .verification-input {
        flex-wrap: wrap;
    }

    .verification-input input {
        width: 45px;
        height: 50px;
    }
}