/* assets/css/style.css - SciMetrics World-Class Academic SaaS Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ─── Background Layers (Kunduzgi rejim / Light Mode) ─── */
    --bg-app: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-input: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --bg-card: var(--bg-surface);
    --primary-color: var(--primary);

    /* ─── Borders (Aniq, nafis, professional) ─── */
    --border-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-focus: #2563eb;

    /* ─── Text Hierarchy (Yuqori kontrast va tiniq o'qilishi) ─── */
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-tertiary: #94a3b8;

    /* ─── Brand / Primary ─── */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-mid: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --primary-glow: 0 8px 20px rgba(37, 99, 235, 0.22);

    /* ─── Academic Platforms ─── */
    --scopus-orange: #ea580c;
    --scopus-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    --scopus-bg: #fff7ed;
    --scopus-border: #fed7aa;

    --scholar-blue: #2563eb;
    --scholar-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --scholar-bg: #eff6ff;
    --scholar-border: #bfdbfe;

    /* ─── Semantic Colors ─── */
    --emerald: #059669;
    --emerald-bg: #ecfdf5;
    --emerald-border: #a7f3d0;
    --emerald-glow: rgba(5, 150, 105, 0.15);

    --amber: #d97706;
    --amber-bg: #fffbeb;
    --amber-border: #fde68a;

    --rose: #e11d48;
    --rose-bg: #fff1f2;
    --rose-border: #fecdd3;

    /* ─── Purple accent ─── */
    --violet: #7c3aed;
    --violet-bg: #f5f3ff;
    --violet-border: #ddd6fe;

    /* ─── Geometry ─── */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 26px;
    --radius-full: 9999px;

    /* ─── Typography ─── */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* ─── Layered Shadows ─── */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-dropdown: 0 16px 36px -8px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.04);
    --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --shadow-inner: inset 0 1px 2px rgba(15, 23, 42, 0.05);

    /* ─── Transitions ─── */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Dark Theme (Tungi rejim / Dark Mode) ─── */
body.dark-theme,
html.dark-theme,
:root[data-theme="dark"] {
    /* ─── Background Layers (Premium Dark Slate palitra) ─── */
    --bg-app: #090d16;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2337;
    --bg-subtle: #162035;
    --bg-input: #0d1424;
    --bg-glass: rgba(17, 24, 39, 0.88);
    --bg-card: var(--bg-surface);
    --primary-color: var(--primary);

    /* ─── Borders (Yupqa, nozik, bloklarni aniq ajratuvchi) ─── */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.22);
    --border-focus: #3b82f6;

    /* ─── Text Hierarchy (Yuqori kontrast, ravshan va yengil o'qiladigan) ─── */
    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-tertiary: #64748b;

    /* ─── Brand / Primary ─── */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.18);
    --primary-mid: #60a5fa;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
    --primary-glow: 0 8px 24px rgba(59, 130, 246, 0.35);

    /* ─── Academic Platforms ─── */
    --scopus-orange: #fb923c;
    --scopus-gradient: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    --scopus-bg: rgba(234, 88, 12, 0.16);
    --scopus-border: rgba(251, 146, 60, 0.35);

    --scholar-blue: #60a5fa;
    --scholar-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --scholar-bg: rgba(59, 130, 246, 0.16);
    --scholar-border: rgba(96, 165, 250, 0.35);

    /* ─── Semantic Colors ─── */
    --emerald: #34d399;
    --emerald-bg: rgba(16, 185, 129, 0.16);
    --emerald-border: rgba(52, 211, 153, 0.35);
    --emerald-glow: rgba(16, 185, 129, 0.25);

    --amber: #fbbf24;
    --amber-bg: rgba(245, 158, 11, 0.16);
    --amber-border: rgba(251, 191, 36, 0.35);

    --rose: #f87171;
    --rose-bg: rgba(239, 68, 68, 0.16);
    --rose-border: rgba(248, 113, 113, 0.35);

    --violet: #a78bfa;
    --violet-bg: rgba(139, 92, 246, 0.16);
    --violet-border: rgba(167, 139, 250, 0.35);

    /* ─── Layered Shadows (Dark modega mos keluvchi nozik chegara nurlari) ─── */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(59, 130, 246, 0.35);
    --shadow-dropdown: 0 16px 40px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    --shadow-modal: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.14);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(37, 99, 235, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 0%, rgba(124, 58, 237, 0.03) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    font-feature-settings: 'ss01', 'cv01';
    transition: background-color 0.22s ease, color 0.22s ease;
}

body.dark-theme,
html.dark-theme {
    background-color: var(--bg-app);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(59, 130, 246, 0.07) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 0%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar Navigation (Stationary & Fixed) ─── */
.sidebar {
    width: 268px;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    height: calc(100vh - 64px);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.03);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(37,99,235,0.15) 0%, transparent 40%, rgba(124,58,237,0.1) 100%);
    pointer-events: none;
}

body.dark-theme .sidebar,
html.dark-theme .sidebar {
    background: rgba(9, 13, 22, 0.96);
    backdrop-filter: blur(20px) saturate(1.4);
    border-right-color: rgba(255, 255, 255, 0.07);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.55);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    user-select: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo:hover .logo-icon {
    transform: translateY(-1px) scale(1.04);
}

.logo-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.4px;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-subtitle {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.2;
    white-space: nowrap;
}

/* User Profile Badge inside Sidebar */
.user-profile-badge {
    margin: 20px 16px 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
}

body.dark-theme .user-profile-badge,
html.dark-theme .user-profile-badge {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.user-profile-badge:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

body.dark-theme .user-profile-badge:hover,
html.dark-theme .user-profile-badge:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.user-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.3);
}

.user-meta-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Links */
.sidebar-nav {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.nav-section-title {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-tertiary);
    letter-spacing: 0.8px;
    padding: 14px 12px 6px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 550;
    transition: var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
    user-select: none;
}

.nav-item i {
    font-size: 14px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.nav-item:hover {
    background: linear-gradient(105deg, rgba(37, 99, 235, 0.08), rgba(79, 70, 229, 0.04));
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.1);
    transform: translateX(3px);
}

.nav-item:hover i {
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

body.dark-theme .nav-item.active,
html.dark-theme .nav-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.4);
}

.nav-item.active i {
    color: #ffffff;
}

body.dark-theme .nav-item:hover,
html.dark-theme .nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

body.dark-theme .nav-item:hover i,
html.dark-theme .nav-item:hover i {
    color: #60a5fa;
}

.nav-item.active::before {
    display: none;
}

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent, rgba(248,250,252,0.92));
}

body.dark-theme .sidebar-footer,
html.dark-theme .sidebar-footer {
    background: linear-gradient(180deg, transparent, rgba(9,13,22,0.90));
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 12px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
}

body.dark-theme .system-status,
html.dark-theme .system-status {
    background: rgba(13, 21, 38, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--emerald);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.status-title {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
}

.status-desc {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-app);
    isolation: isolate;
    margin-left: 268px;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
}

/* ─── Topbar (Unified Full-Width Header) ─── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.8), 0 4px 18px rgba(15, 23, 42, 0.04);
}

body.dark-theme .topbar,
html.dark-theme .topbar {
    background: rgba(9, 13, 22, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.topbar-brand {
    width: 268px;
    min-width: 268px;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    flex-shrink: 0;
}

body.dark-theme .topbar-brand,
html.dark-theme .topbar-brand {
    border-right-color: rgba(255, 255, 255, 0.07);
}

.topbar-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 100%;
    min-width: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 5px 13px;
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    transition: var(--transition-fast);
}

body.dark-theme .breadcrumb,
html.dark-theme .breadcrumb {
    background: rgba(22, 32, 53, 0.55);
    border-color: rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
}

.breadcrumb i {
    color: var(--primary);
    font-size: 13px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ─── Theme Toggle Button in Topbar ─── */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--bg-subtle);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.theme-toggle-btn .theme-icon-light {
    display: none;
    color: #f59e0b;
}

.theme-toggle-btn .theme-icon-dark {
    display: inline-block;
    color: #64748b;
}

body.dark-theme .theme-toggle-btn .theme-icon-dark,
html.dark-theme .theme-toggle-btn .theme-icon-dark {
    display: none;
}

body.dark-theme .theme-toggle-btn .theme-icon-light,
html.dark-theme .theme-toggle-btn .theme-icon-light {
    display: inline-block;
}

body.dark-theme .theme-toggle-btn,
html.dark-theme .theme-toggle-btn {
    background: #162035;
    border-color: rgba(255, 255, 255, 0.12);
    color: #fbbf24;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

body.dark-theme .theme-toggle-btn:hover,
html.dark-theme .theme-toggle-btn:hover {
    background: #1f2d48;
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

/* User Profile Dropdown in Topbar */
.user-dropdown-container {
    position: relative;
}

.user-dropdown-trigger {
    margin: 0;
    padding: 6px 14px 6px 6px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    outline: none;
    user-select: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.user-dropdown-trigger:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.user-dropdown-container.open .user-dropdown-trigger {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 6px 16px rgba(15, 23, 42, 0.08);
}

body.dark-theme .user-dropdown-trigger,
html.dark-theme .user-dropdown-trigger {
    background: rgba(22, 32, 53, 0.8);
    border-color: rgba(255, 255, 255, 0.09);
}

body.dark-theme .user-dropdown-trigger:hover,
html.dark-theme .user-dropdown-trigger:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark-theme .user-dropdown-container.open .user-dropdown-trigger,
html.dark-theme .user-dropdown-container.open .user-dropdown-trigger {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.user-dropdown-caret {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.user-dropdown-container.open .user-dropdown-caret {
    transform: rotate(180deg);
    color: #3b82f6;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.16), 0 10px 20px -8px rgba(15, 23, 42, 0.08);
    z-index: 1100;
    display: none;
    overflow: hidden;
}

.user-dropdown-container.open .user-dropdown-menu {
    display: block;
    animation: userDropdownAnim 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes userDropdownAnim {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.dark-theme .user-dropdown-menu,
html.dark-theme .user-dropdown-menu {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.65);
}

.user-dropdown-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.dark-theme .user-dropdown-header,
html.dark-theme .user-dropdown-header {
    background: linear-gradient(135deg, #090d16 0%, #111827 100%);
    border-bottom-color: rgba(255, 255, 255, 0.09);
}

.user-dropdown-header-info {
    min-width: 0;
    flex: 1;
}

.user-dropdown-header-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .user-dropdown-header-name,
html.dark-theme .user-dropdown-header-name {
    color: #f8fafc;
}

.user-dropdown-header-role {
    font-size: 11px;
    margin-top: 4px;
}

.user-dropdown-body {
    padding: 8px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    transition: all 0.18s ease;
}

body.dark-theme .user-dropdown-item,
html.dark-theme .user-dropdown-item {
    color: #cbd5e1;
}

.user-dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(2px);
}

body.dark-theme .user-dropdown-item:hover,
html.dark-theme .user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.user-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

body.dark-theme .user-dropdown-icon,
html.dark-theme .user-dropdown-icon {
    background: rgba(255, 255, 255, 0.06);
}

.user-dropdown-item:hover .user-dropdown-icon {
    background: #e2e8f0;
}

body.dark-theme .user-dropdown-item:hover .user-dropdown-icon,
html.dark-theme .user-dropdown-item:hover .user-dropdown-icon {
    background: rgba(255, 255, 255, 0.12);
}

.user-dropdown-text {
    flex: 1;
    min-width: 0;
}

.user-dropdown-title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
}

.user-dropdown-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.2;
}

.user-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 8px;
}

body.dark-theme .user-dropdown-divider,
html.dark-theme .user-dropdown-divider {
    background: rgba(255, 255, 255, 0.08);
}

.user-dropdown-item.item-logout {
    color: #ef4444;
}

.user-dropdown-item.item-logout .user-dropdown-icon {
    background: #fef2f2;
    color: #ef4444;
}

body.dark-theme .user-dropdown-item.item-logout .user-dropdown-icon,
html.dark-theme .user-dropdown-item.item-logout .user-dropdown-icon {
    background: rgba(239, 68, 68, 0.15);
}

.user-dropdown-item.item-logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

body.dark-theme .user-dropdown-item.item-logout:hover,
html.dark-theme .user-dropdown-item.item-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.user-topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
}

.user-topbar-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.chip-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.chip-role-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}

.btn-icon:hover {
    background: var(--bg-subtle);
    color: var(--text-main);
    transform: translateY(-1px);
}

#sidebarToggle {
    display: none;
}

/* Main Container */
.content-container {
    padding: 28px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    animation: pageFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.content-container::before {
    content: "";
    position: absolute;
    inset: 10px 20px auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Page Header ─── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(226, 232, 240, 0.75);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
}

body.dark-theme .page-header,
html.dark-theme .page-header {
    background: rgba(13, 21, 38, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.page-title-group {
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-main);
    line-height: 1.15;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    max-width: 760px;
    line-height: 1.5;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    line-height: 1.4;
    letter-spacing: 0.015em;
    position: relative;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 60%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 8px 20px rgba(37, 99, 235, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 14px 32px rgba(37, 99, 235, 0.45);
    transform: translateY(-2px) scale(1.015);
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 60%, #5b21b6 100%);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(15,23,42,0.05), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.btn-secondary:hover {
    background: #f8fafc;
    color: var(--text-main);
    border-color: var(--border-strong);
    box-shadow: 0 4px 12px rgba(15,23,42,0.1);
    transform: translateY(-1.5px);
}

body.dark-theme .btn-secondary,
html.dark-theme .btn-secondary {
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05) inset;
}

body.dark-theme .btn-secondary:hover,
html.dark-theme .btn-secondary:hover {
    background: var(--bg-subtle);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc1a47, #b81038);
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 16px rgba(220, 26, 71, 0.32);
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-danger:hover {
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 10px 24px rgba(220, 26, 71, 0.48);
    transform: translateY(-1.5px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 13px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
}

/* ─── Cards ─── */
.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.dark-theme .card,
html.dark-theme .card {
    background: rgba(17, 24, 39, 0.92);
    border-color: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2.5px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 40%, #818cf8 70%, #a78bfa 100%);
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    padding: 15px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, rgba(248,250,252,0.6) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

body.dark-theme .card-header,
html.dark-theme .card-header {
    background: linear-gradient(180deg, rgba(26, 35, 55, 0.7) 0%, rgba(17, 24, 39, 0.1) 100%);
    border-bottom-color: rgba(255,255,255,0.08);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 15.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    letter-spacing: -0.25px;
}

.card-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1.5;
}

.card-body {
    padding: 22px;
}

/* KPI Hero Banner - Symmetrical Elevation */
.kpi-hero-banner {
    margin-bottom: 24px;
    background: linear-gradient(135deg, #090e17 0%, #0f172a 45%, #1e1b4b 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    box-shadow: 0 14px 35px -5px rgba(15, 23, 42, 0.4);
    position: relative;
    overflow: hidden;
}

.kpi-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.kpi-hero-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.kpi-hero-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.kpi-hero-tag {
    font-size: 11px;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.kpi-hero-meta {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.kpi-hero-title {
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    margin: 4px 0 6px;
    letter-spacing: -0.3px;
}

.kpi-hero-percent {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 26px;
    font-weight: 800;
}

.kpi-hero-stats {
    font-size: 13px;
    color: #cbd5e1;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.icon-blue { color: #38bdf8; margin-right: 5px; }
.icon-green { color: #4ade80; margin-right: 5px; }
.icon-purple { color: #c084fc; margin-right: 5px; }

.kpi-hero-btn {
    padding: 11px 22px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Metric Cards Grid - Perfect Quad Symmetry */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.metric-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 180px;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37,99,235,0.03), transparent 40%, rgba(168,85,247,0.02));
    pointer-events: none;
}

body.dark-theme .metric-card,
html.dark-theme .metric-card {
    background: rgba(13, 21, 38, 0.9);
    border-color: rgba(255, 255, 255, 0.09);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), 0 0 0 1px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.22);
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.metric-card:hover .metric-icon {
    transform: scale(1.08);
}

.icon-researchers {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-pubs {
    background: #f3e8ff;
    color: #7c3aed;
}

body.dark-theme .icon-pubs,
html.dark-theme .icon-pubs {
    background: rgba(124, 58, 237, 0.15);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.05;
    letter-spacing: -1.5px;
    display: flex;
    align-items: center;
    flex: 1;
    margin: 6px 0 10px;
    font-variant-numeric: tabular-nums;
}

.metric-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    min-height: 32px;
}

.metric-link {
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
    margin-right: -4px;
}

.metric-link:hover {
    background: var(--primary-light);
    text-decoration: none;
}

.metric-subtext {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Metric Composite Cards - Equal Column Tri-Split */
.card-scopus-highlight {
    border-color: var(--scopus-border);
    background: linear-gradient(150deg, var(--bg-surface) 65%, var(--scopus-bg) 100%);
}

.card-scholar-highlight {
    border-color: var(--scholar-border);
    background: linear-gradient(150deg, var(--bg-surface) 65%, var(--scholar-bg) 100%);
}

.metric-composite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex: 1;
    margin: 4px 0 8px;
}

.comp-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.comp-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.comp-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
    line-height: 1.15;
}

.comp-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    flex-shrink: 0;
}

.text-scopus { color: var(--scopus-orange) !important; }
.text-scholar { color: var(--scholar-blue) !important; }
.text-accent { color: var(--primary) !important; }
.text-amber { color: var(--amber) !important; }

/* Stat Cards for Analytics & Salohiyat - Strict Symmetry */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.stat-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 160px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-strong);
}

.stat-card-primary {
    background: linear-gradient(135deg, var(--bg-surface) 65%, var(--primary-light) 100%);
    border-color: var(--scholar-border);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin: 6px 0 4px;
    letter-spacing: -1px;
}

.stat-value-green { color: var(--emerald); }
.stat-value-amber { color: var(--amber); }

.stat-subtext {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.stat-degrees-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon-box {
    transform: scale(1.08);
}

.stat-icon-blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon-green {
    background: var(--emerald-bg);
    color: var(--emerald);
}

.stat-icon-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.stat-icon-amber {
    background: var(--amber-bg);
    color: var(--amber);
}

.progress-bar-wrap {
    height: 6px;
    border-radius: 4px;
    background: var(--bg-subtle);
    overflow: hidden;
    margin-top: 14px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary-gradient);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badges */
.badge {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.badge-scopus {
    background: var(--scopus-bg);
    color: var(--scopus-orange);
    border: 1px solid var(--scopus-border);
}

.badge-scholar {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border: 1px solid var(--scholar-border);
}

.badge-secondary {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Quartiles */
.badge-q {
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-q1 {
    background: var(--emerald-bg);
    color: var(--emerald);
    border: 1px solid var(--emerald-border);
}

.badge-q2 {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.badge-q3 {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.badge-q4 {
    background: var(--rose-bg);
    color: var(--rose);
    border: 1px solid var(--rose-border);
}

/* Charts Row - Symmetrical 2-Column Grid */
.charts-row {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.charts-row .chart-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chart-card .card-header {
    min-height: 68px;
}

.chart-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 22px;
}

.chart-legend-custom {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
}

.legend-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 600;
}

.legend-box::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.scopus-legend::before { background: var(--scopus-orange); }
.scholar-legend::before { background: var(--scholar-blue); }

/* Dashboard Split Grid - Symmetrical Proportion */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.dashboard-split-grid > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dashboard-split-grid > .card .card-header {
    min-height: 68px;
}

/* Tables - Symmetrical Column Geometry */
.table-responsive {
    overflow-x: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--bg-surface);
    flex: 1;
}

.modern-table,
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: left;
}

.modern-table th,
.table th {
    background: rgba(241, 245, 249, 0.85);
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 13px 18px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

body.dark-theme .modern-table th,
html.dark-theme .modern-table th,
body.dark-theme .table th,
html.dark-theme .table th {
    background: rgba(22, 32, 54, 0.85);
}

.modern-table td,
.table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    color: var(--text-secondary);
    vertical-align: middle;
    transition: background 0.12s ease;
}

body.dark-theme .modern-table td,
html.dark-theme .modern-table td,
body.dark-theme .table td,
html.dark-theme .table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.modern-table tr:hover td,
.table tr:hover td {
    background: rgba(241, 245, 249, 0.7);
}

body.dark-theme .modern-table tr:hover td,
html.dark-theme .modern-table tr:hover td,
body.dark-theme .table tr:hover td,
html.dark-theme .table tr:hover td {
    background: rgba(22, 32, 54, 0.5);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table th:first-child,
.modern-table td:first-child {
    width: 60px;
    text-align: center;
    padding-left: 20px;
}

.modern-table th.text-center,
.modern-table td.text-center {
    width: 95px;
    text-align: center;
}

.modern-table th:last-child,
.modern-table td:last-child {
    width: 65px;
    text-align: right;
    padding-right: 20px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.table-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
    display: block;
    line-height: 1.3;
}

.user-name:hover {
    color: var(--primary);
}

.user-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    display: block;
    margin-top: 1px;
}

/* Rank Medals */
.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    font-family: var(--font-heading);
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #cbd5e1, #64748b);
    color: #fff;
}

.rank-3 {
    background: linear-gradient(135deg, #f59e0b, #92400e);
    color: #fff;
}

.badge-h {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.badge-scopus-h {
    background: var(--scopus-bg);
    color: var(--scopus-orange);
    border: 1px solid var(--scopus-border);
}

.badge-scholar-h {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border: 1px solid var(--scholar-border);
}

.citations-total {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
}

/* ─── Forms & Inputs ─── */
.form-control, .form-select {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-inner);
    appearance: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--border-strong);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    background: var(--bg-surface);
}

.form-select option, select option {
    background-color: var(--bg-surface);
    color: var(--text-main);
}

.form-control::placeholder, input::placeholder, textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.85;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-hint {
    font-size: 11.5px;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* Researchers Directory Grid */
.researchers-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.researcher-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

body.dark-theme .researcher-box,
html.dark-theme .researcher-box {
    background: rgba(13, 21, 38, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
}

.researcher-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), 0 0 0 1px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.2);
}

.r-box-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.r-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.r-head-meta { flex: 1; min-width: 0; }

.r-degree-pill {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.r-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.r-dept {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.r-inst {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.r-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.r-metric-block {
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
}

.r-metric-block.scopus-block {
    border-color: var(--scopus-border);
    background: var(--scopus-bg);
}

.r-metric-block.scholar-block {
    border-color: var(--scholar-border);
    background: var(--scholar-bg);
}

.r-metric-badge {
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scopus-block .r-metric-badge { color: var(--scopus-orange); }
.scholar-block .r-metric-badge { color: var(--scholar-blue); }

.r-metric-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}

.r-sub { color: var(--text-muted); margin-right: 4px; }
.r-val { font-weight: 800; color: var(--text-main); }

.r-ids-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.id-tag {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.r-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.sync-time {
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.r-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-action-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.r-actions .btn-sm {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ─── Modals ─── */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 14, 28, 0.65);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-dialog {
    width: 100%;
    max-width: 620px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal), 0 0 0 1px rgba(37,99,235,0.06);
    overflow: hidden;
    animation: modalAppear 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-theme .modal-dialog,
html.dark-theme .modal-dialog {
    background: rgba(13, 21, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-subtle);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: var(--text-main); }

.modal-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    box-shadow: var(--shadow-xs);
}

.alert-success {
    background: var(--emerald-bg);
    border: 1px solid var(--emerald-border);
    color: var(--emerald);
}

.alert-danger {
    background: var(--rose-bg);
    border: 1px solid var(--rose-border);
    color: var(--rose);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

/* Navigation Badges & Items */
.user-meta-wrap {
    overflow: hidden;
}

.nav-item.nav-item-highlight {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.nav-item.nav-item-highlight.active,
.nav-item.nav-item-highlight:hover {
    background: rgba(37, 99, 235, 0.14) !important;
}

.nav-section-spaced {
    margin-top: 16px;
}

.nav-item-logout {
    color: var(--rose) !important;
}

.nav-item-logout:hover {
    background: var(--rose-bg) !important;
}

.badge-nav-cyan {
    background: #0284c7;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
}

.badge-nav-green {
    background: var(--emerald);
    color: #ffffff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
}

.badge-nav-gold {
    background: #fef3c7;
    color: #b45309;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
}

body.dark-theme .badge-nav-gold,
html.dark-theme .badge-nav-gold {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* User Position Badge in Topbar */
.user-position-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px);
}

body.dark-theme .user-position-badge,
html.dark-theme .user-position-badge {
    background: rgba(15, 23, 42, 0.4) !important;
}

.user-position-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.badge-gear {
    font-size: 11px;
    opacity: 0.75;
    margin-left: 2px;
}

/* Quick Stats Pills */
.quick-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.pill-scopus {
    background: var(--scopus-bg);
    color: var(--scopus-orange);
    border: 1px solid var(--scopus-border);
}

.pill-scholar {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border: 1px solid var(--scholar-border);
}

/* Scope Banner */
.scope-banner {
    background: linear-gradient(90deg, rgba(236,253,245,0.9) 0%, rgba(239,246,255,0.9) 50%, rgba(245,243,255,0.9) 100%);
    border-bottom: 1px solid rgba(186, 230, 253, 0.8);
    padding: 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #0369a1;
    font-weight: 600;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.08);
}

body.dark-theme .scope-banner,
html.dark-theme .scope-banner {
    background: linear-gradient(90deg, rgba(6, 95, 70, 0.2) 0%, rgba(30, 58, 138, 0.2) 50%, rgba(76, 29, 149, 0.2) 100%);
    border-bottom-color: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.scope-banner-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scope-banner-icon {
    font-size: 13px;
}

.scope-banner-note {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.alert-container {
    padding: 0 28px;
    margin-top: 16px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* KPI Hero Banner */
.kpi-hero-banner {
    margin-bottom: 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #e0e7ff 100%);
    color: var(--text-main);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-xl);
    padding: 26px 32px;
    box-shadow: 0 10px 30px -8px rgba(37, 99, 235, 0.15);
    overflow: hidden;
    position: relative;
}

body.dark-theme .kpi-hero-banner,
html.dark-theme .kpi-hero-banner {
    background: linear-gradient(135deg, #0a0f1d 0%, #0f172a 45%, #1e1b4b 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.45);
}

.kpi-hero-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

body.dark-theme .kpi-hero-banner::before,
html.dark-theme .kpi-hero-banner::before {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
}

.kpi-hero-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.kpi-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-hero-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.kpi-hero-tag {
    font-size: 11px;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.kpi-hero-meta {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

body.dark-theme .kpi-hero-meta { color: #94a3b8; }

.kpi-hero-title {
    margin: 6px 0 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

body.dark-theme .kpi-hero-title { color: #fff; }

.kpi-hero-percent {
    background: linear-gradient(135deg, #2563eb, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 27px;
}

body.dark-theme .kpi-hero-percent,
html.dark-theme .kpi-hero-percent {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-hero-stats {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

body.dark-theme .kpi-hero-stats { color: #cbd5e1; }

.kpi-hero-stats .icon-blue { color: #38bdf8; margin-right: 5px; }
.kpi-hero-stats .icon-green { color: #4ade80; margin-right: 5px; }
.kpi-hero-stats .icon-purple { color: #c084fc; margin-right: 5px; }

.kpi-hero-btn {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45) !important;
}

/* Salohiyat stat cards */
.stats-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 22px;
    border-radius: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-label {
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    margin: 6px 0;
    letter-spacing: -0.8px;
    line-height: 1.05;
    color: var(--text-main);
}

.stat-subtext {
    font-size: 12.5px;
    color: var(--text-muted);
}

.stat-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.stat-icon-green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.2);
}

.stat-icon-purple {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #7c3aed;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.2);
}

.stat-icon-amber {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.2);
}

.stat-card-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.85));
    border: 1.5px solid #bfdbfe;
}

body.dark-theme .stat-card-primary,
html.dark-theme .stat-card-primary {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(37, 99, 235, 0.1));
    border-color: rgba(59, 130, 246, 0.35);
}

.stat-card-primary .stat-label { color: #1d4ed8; }
.stat-card-primary .stat-value { color: #1e40af; font-size: 40px; }

body.dark-theme .stat-card-primary .stat-label { color: #60a5fa; }
body.dark-theme .stat-card-primary .stat-value { color: #93c5fd; }

.progress-bar-wrap {
    margin-top: 16px;
    height: 8px;
    border-radius: 6px;
    background: rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

body.dark-theme .progress-bar-wrap,
html.dark-theme .progress-bar-wrap {
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #0284c7, #38bdf8);
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-value-green { color: var(--emerald) !important; }
.stat-value-purple { color: #7c3aed !important; }
.stat-value-amber { color: var(--amber) !important; }

.stat-degrees-row {
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Notice banner */
.notice-banner {
    margin-bottom: 20px;
    background: var(--scopus-bg);
    border: 1.5px solid var(--scopus-border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.notice-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notice-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--scopus-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.notice-banner-title {
    font-weight: 800;
    font-size: 15px;
    color: #9a3412;
}

body.dark-theme .notice-banner-title { color: #fb923c; }

.notice-banner-desc {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: #c2410c;
}

body.dark-theme .notice-banner-desc { color: #fdba74; }

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-tab {
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-full);
}

/* Nav badge alignment */
.nav-item .badge {
    margin-left: auto;
    flex-shrink: 0;
}

/* Page & card animations */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.metrics-grid .metric-card {
    animation: cardSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.metrics-grid .metric-card:nth-child(1) { animation-delay: 0.04s; }
.metrics-grid .metric-card:nth-child(2) { animation-delay: 0.08s; }
.metrics-grid .metric-card:nth-child(3) { animation-delay: 0.12s; }
.metrics-grid .metric-card:nth-child(4) { animation-delay: 0.16s; }

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.metric-card:hover::after {
    opacity: 1;
}

/* Table zebra striping */
.modern-table tbody tr:nth-child(even) td {
    background: var(--bg-subtle);
}

body.dark-theme .modern-table tbody tr:nth-child(even) td,
html.dark-theme .modern-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

/* Text selection */
::selection {
    background: rgba(37, 99, 235, 0.18);
    color: var(--text-main);
}


/* Filter Bars & Toolbar */
.filter-bar-card {
    padding: 16px 20px;
    margin-bottom: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13.5px;
    pointer-events: none;
}

.search-input-wrap .search-field {
    padding-left: 40px !important;
    padding-right: 36px !important;
}

.search-input-wrap .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 19px;
    text-decoration: none;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-input-wrap .search-clear:hover {
    color: var(--rose);
    background: var(--rose-bg);
}

.filter-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-tabs, .platform-tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar,
.platform-tabs-bar::-webkit-scrollbar {
    height: 4px;
}

.filter-tabs .filter-tab,
.platform-tabs-bar .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Researcher Profile Hero */
.profile-hero {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

body.dark-theme .profile-hero,
html.dark-theme .profile-hero {
    background: linear-gradient(135deg, rgba(15,23,42,0.98) 0%, rgba(30,41,59,0.9) 100%);
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.profile-hero-content {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}

.profile-avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: var(--primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.profile-main-info {
    flex: 1;
    min-width: 0;
}

.profile-badges-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.badge-degree {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-dept {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-time {
    font-size: 11px;
    color: var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.profile-fullname {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.profile-faculty {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.profile-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.profile-link-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-scopus-ext:hover {
    background: var(--scopus-bg);
    color: var(--scopus-orange);
    border-color: var(--scopus-border);
}

.btn-scholar-ext:hover {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border-color: var(--scholar-border);
}

.profile-hero-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: nowrap;
}
.profile-hero-actions form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

/* Profile Metric Highlights inside view.php */
.profile-metric-big {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 12px 0 6px;
}

.metric-item-main {
    display: flex;
    flex-direction: column;
}

.sub-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.big-number {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.metric-item-secondary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.sec-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.sec-label { color: var(--text-muted); }
.sec-val { font-weight: 700; color: var(--text-main); }
.sec-code {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.value-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 6px;
}

.metric-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.pill-inline {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
}

.res-pub-tab.active-tab {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    font-size: 54px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3, .empty-state h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 440px;
    margin-bottom: 18px;
}

/* Settings Grid Split Utility Classes */
.settings-grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.settings-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========================================================
   MASTERCLASS RESPONSIVE DESIGN & ADAPTIVE LAYOUTS
   ======================================================== */

/* Laptops & Standard Desktops (<= 1280px) */
@media (max-width: 1280px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .charts-row {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 18px;
    }
    .dashboard-split-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}

/* Tablets & iPads Landscape/Portrait (<= 1024px) */
@media (max-width: 1024px) {
    /* Drawer offcanvas sidebar */
    .sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        bottom: 0;
        height: calc(100vh - 60px);
        width: 270px;
        transform: translateX(-100%);
        box-shadow: var(--shadow-modal);
        z-index: 1050;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: 60px;
    }

    .topbar {
        padding: 0;
        height: 60px;
    }

    .topbar-brand {
        width: auto;
        min-width: 0;
        border-right: none;
        padding: 0 8px 0 16px;
    }

    .topbar-content {
        padding: 0 16px 0 6px;
    }

    #sidebarToggle {
        display: inline-flex;
    }

    .content-container {
        padding: 20px;
    }

    .content-container::before {
        display: none;
    }

    .quick-stats {
        display: none;
    }

    /* Grids collapse to single or 2 columns */
    .charts-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .dashboard-split-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .settings-grid-split,
    .settings-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .profile-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .profile-hero-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
        margin-top: 6px;
    }

    .badge-time {
        margin-left: 0;
    }
}

/* Mobile Devices & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    .topbar {
        padding: 0;
        height: 56px;
    }

    .sidebar {
        top: 56px;
        height: calc(100vh - 56px);
    }

    .main-wrapper {
        margin-top: 56px;
    }

    .breadcrumb {
        display: none;
    }

    .user-position-badge {
        padding: 6px 10px;
        font-size: 11.5px;
    }

    .content-container {
        padding: 14px 16px;
    }

    .page-header {
        padding: 16px;
        border-radius: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
        letter-spacing: -0.4px;
    }

    .page-subtitle {
        font-size: 12.5px;
    }

    .page-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-actions .btn {
        flex: 1;
        min-width: 130px;
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .researchers-card-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Filters Stacked */
    .filter-bar-card {
        padding: 14px 16px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-input-wrap,
    .filter-select-wrap {
        width: 100% !important;
        min-width: 100% !important;
    }

    .filter-form > div:last-child {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .filter-form > div:last-child .btn {
        flex: 1;
        justify-content: center;
    }

    /* KPI Hero Banner */
    .kpi-hero-banner {
        padding: 20px;
        border-radius: 18px;
    }

    .kpi-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .kpi-hero-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .kpi-hero-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
        border-radius: 14px;
    }

    .kpi-hero-title {
        font-size: 18px;
    }

    .kpi-hero-percent {
        font-size: 24px;
    }

    .kpi-hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 12.5px;
    }

    .kpi-hero-btn {
        width: 100%;
        justify-content: center;
    }

    /* Scope Banner */
    .scope-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 16px;
    }

    .alert-container {
        padding: 0 16px;
    }

    /* Form rows */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Modals */
    .modal-dialog {
        border-radius: 16px;
        max-height: 90vh;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 16px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables */
    .modern-table th,
    .modern-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Compact Mobile Screens (<= 480px) */
@media (max-width: 480px) {
    .topbar {
        padding: 0;
        height: 52px;
    }

    .sidebar {
        top: 52px;
        height: calc(100vh - 52px);
    }

    .main-wrapper {
        margin-top: 52px;
    }

    .user-position-badge {
        padding: 4px 8px;
        font-size: 11px;
    }

    .user-position-badge span {
        max-width: 85px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .content-container {
        padding: 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .researcher-box {
        padding: 16px;
        border-radius: 14px;
    }

    .r-avatar {
        width: 44px;
        height: 44px;
        font-size: 17px;
        border-radius: 12px;
    }

    .r-name {
        font-size: 14.5px;
    }

    .r-metrics-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .r-metric-block {
        padding: 9px 11px;
    }

    .r-box-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .r-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .profile-avatar-large {
        width: 68px;
        height: 68px;
        font-size: 28px;
        border-radius: 18px;
    }

    .profile-fullname {
        font-size: 20px;
    }

    .profile-metric-big {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .metric-item-secondary {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 10px;
        width: 100%;
    }
}

/* ─────────────────────────────────────────────────────────────
   SUPPLEMENTAL COMPONENTS
   Missing / incomplete styles referenced in templates
   ───────────────────────────────────────────────────────────── */

/* Chart card flex helpers */
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Recent Publications List (dashboard) */
.recent-pubs-list {
    padding: 6px 0;
    flex: 1;
    overflow-y: auto;
}

.recent-pub-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.55);
    transition: background 0.14s ease;
}

body.dark-theme .recent-pub-item,
html.dark-theme .recent-pub-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

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

.recent-pub-item:hover {
    background: rgba(241, 245, 249, 0.65);
}

body.dark-theme .recent-pub-item:hover,
html.dark-theme .recent-pub-item:hover {
    background: rgba(22, 32, 54, 0.5);
}

.pub-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding-top: 2px;
}

.pub-year {
    font-size: 10.5px;
    color: var(--text-tertiary);
    font-weight: 600;
    white-space: nowrap;
}

.pub-content {
    flex: 1;
    min-width: 0;
}

.pub-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-main);
    line-height: 1.45;
    display: block;
    transition: color 0.15s ease;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pub-title:hover {
    color: var(--primary);
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.pub-meta i {
    margin-right: 3px;
    opacity: 0.7;
}

.pub-cits-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 7px 11px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 42px;
    text-align: center;
    transition: var(--transition-fast);
}

body.dark-theme .pub-cits-pill,
html.dark-theme .pub-cits-pill {
    background: rgba(22, 32, 54, 0.7);
}

.pub-cits-pill i {
    font-size: 10px;
    opacity: 0.6;
}

.pub-cits-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Quartile Badges */
.badge-q {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-block;
}

.badge-q1 {
    background: var(--emerald-bg);
    color: var(--emerald);
    border: 1px solid var(--emerald-border);
}

.badge-q2 {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border: 1px solid var(--scholar-border);
}

.badge-q3 {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.badge-q4 {
    background: var(--rose-bg);
    color: var(--rose);
    border: 1px solid var(--rose-border);
}

.badge-scholar {
    background: var(--scholar-bg);
    color: var(--scholar-blue);
    border: 1px solid var(--scholar-border);
}

/* Notice Banner (department_head) */
.notice-banner {
    margin-bottom: 24px;
    border-color: var(--scholar-border);
    background: linear-gradient(135deg, var(--bg-surface) 60%, var(--scholar-bg) 100%);
}

.notice-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    flex: 1;
}

.notice-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.notice-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}

.notice-banner-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.notice-banner.card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 0;
    gap: 16px;
}

/* Global Utility Additions */
.icon-blue { color: var(--primary) !important; }
.icon-green { color: var(--emerald) !important; }
.icon-purple { color: var(--violet) !important; }
.icon-orange { color: var(--scopus-orange) !important; }

.text-primary { color: var(--primary) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-violet { color: var(--violet) !important; }
.text-rose { color: var(--rose) !important; }

.font-mono { font-family: var(--font-mono) !important; }
.font-heading { font-family: var(--font-heading) !important; }

/* Page header action button row */
.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Topbar search enhancement */
.topbar-search-input {
    background: rgba(241, 245, 249, 0.7);
    border: 1.5px solid transparent;
    transition: var(--transition);
}

.topbar-search-input:focus {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.dark-theme .topbar-search-input,
html.dark-theme .topbar-search-input {
    background: rgba(22, 32, 54, 0.7);
}

body.dark-theme .topbar-search-input:focus,
html.dark-theme .topbar-search-input:focus {
    background: var(--bg-surface);
}

/* Improved scope tabs */
.scope-tabs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 12px;
    flex-wrap: wrap;
}

body.dark-theme .scope-tabs-bar,
html.dark-theme .scope-tabs-bar {
    background: rgba(22, 32, 54, 0.7);
}

.scope-tab {
    padding: 7px 15px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    white-space: nowrap;
    border: 1px solid transparent;
}

.scope-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.75);
}

.scope-tab.active {
    background: var(--bg-surface);
    color: var(--primary);
    font-weight: 700;
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: var(--shadow-xs);
}

body.dark-theme .scope-tab:hover,
html.dark-theme .scope-tab:hover {
    background: rgba(13, 21, 38, 0.6);
}

body.dark-theme .scope-tab.active,
html.dark-theme .scope-tab.active {
    background: rgba(13, 21, 38, 0.9);
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ─────────────────────────────────────────────────────────────
   RESEARCHER PROFILE HERO (view.php)
   ───────────────────────────────────────────────────────────── */
.profile-hero {
    display: flex;
    flex-direction: column;
    padding: 30px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(ellipse at right, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.profile-hero-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.profile-main-info {
    flex: 1;
    min-width: 0;
}

.profile-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.badge-degree {
    background: var(--emerald-bg);
    color: var(--emerald);
    border: 1px solid var(--emerald-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
}

.badge-dept {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-time {
    color: var(--text-muted);
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.profile-fullname {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.2;
}

.profile-faculty {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 14px;
}

.profile-bio {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 800px;
}

.profile-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
}

.profile-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-scopus-ext {
    color: var(--scopus-orange);
    border-color: rgba(234, 88, 12, 0.3);
    background: rgba(234, 88, 12, 0.05);
}
.btn-scopus-ext:hover {
    background: rgba(234, 88, 12, 0.1);
    border-color: var(--scopus-orange);
}

.btn-scholar-ext {
    color: var(--scholar-blue);
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.05);
}
.btn-scholar-ext:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--scholar-blue);
}

.btn-orcid-ext {
    color: #a6ce39;
    border-color: rgba(166, 206, 57, 0.3);
    background: rgba(166, 206, 57, 0.05);
}
.btn-orcid-ext:hover {
    background: rgba(166, 206, 57, 0.1);
    border-color: #a6ce39;
}

.profile-hero-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .profile-hero-content {
        flex-direction: column;
    }
    .profile-hero-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 20px;
    }
    .profile-avatar-large {
        width: 80px; height: 80px; font-size: 32px;
    }
}

/* ─────────────────────────────────────────────────────────────
   METRICS GRID (Profile View)
   ───────────────────────────────────────────────────────────── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-scopus-highlight {
    border-top: 4px solid var(--scopus-orange);
}

.card-scholar-highlight {
    border-top: 4px solid var(--scholar-blue);
}

.card-wos-highlight {
    border-top: 4px solid #7c3aed;
}

.card-rg-highlight {
    border-top: 4px solid #0d9488;
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.metric-brand-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-metric-big {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.metric-item-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
    min-width: 110px;
}

.sub-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.big-number {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.text-scopus { color: var(--scopus-orange); }
.text-scholar { color: var(--scholar-blue); }
.text-wos { color: #7c3aed; }
.text-rg { color: #0d9488; }

.sec-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}
.sec-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sec-label {
    color: var(--text-secondary);
}

.sec-val {
    font-weight: 700;
    color: var(--text-main);
}

.sec-code {
    background: var(--bg-input);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.metric-label {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    margin: 10px 0;
}

.value-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.metric-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.pill-inline {
    background: var(--bg-subtle);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .profile-metric-big {
        flex-direction: column;
    }
    .metric-item-main {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 15px;
        align-items: center;
    }
}

/* ─────────────────────────────────────────────────────────────
   CHART LEGEND CUSTOM
   ───────────────────────────────────────────────────────────── */
.chart-legend-custom {
    display: flex;
    gap: 16px;
    align-items: center;
}
.legend-box {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.legend-box::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.scopus-legend::before { background: var(--scopus-orange); }
.scholar-legend::before { background: var(--scholar-blue); }

/* ─────────────────────────────────────────────────────────────
   PUBLICATIONS TABLE CELLS (Profile View)
   ───────────────────────────────────────────────────────────── */
.pub-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pub-link {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s ease;
}
.pub-link:hover {
    color: var(--primary);
}

.pub-authors-small {
    font-size: 11.5px;
    color: var(--text-muted);
}

.doi-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: fit-content;
    margin-top: 4px;
}

.journal-name {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12.5px;
    display: block;
    margin-bottom: 4px;
}

.citescore-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.pub-year-badge {
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-subtle);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

.badge-cits {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    min-width: 36px;
    text-align: center;
}
.scopus-cits {
    color: var(--scopus-orange);
    background: rgba(234, 88, 12, 0.1);
}
.scholar-cits {
    color: var(--scholar-blue);
    background: rgba(37, 99, 235, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   DARK THEME OVERRIDES FOR PROFILE
   ───────────────────────────────────────────────────────────── */
body.dark-theme .profile-link-btn,
html.dark-theme .profile-link-btn {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .metric-card,
html.dark-theme .metric-card {
    background: rgba(13, 21, 38, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .sec-code,
body.dark-theme .pill-inline,
body.dark-theme .doi-pill,
body.dark-theme .pub-year-badge,
body.dark-theme .badge-dept,
html.dark-theme .badge-dept {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .scopus-cits,
html.dark-theme .scopus-cits {
    background: rgba(234, 88, 12, 0.2);
}

body.dark-theme .scholar-cits,
html.dark-theme .scholar-cits {
    background: rgba(37, 99, 235, 0.2);
}

/* ─────────────────────────────────────────────────────────────
   ANIMATIONS & EMPTY STATES
   ───────────────────────────────────────────────────────────── */

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* Focus Ring */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3) !important;
    border-color: var(--primary) !important;
}

body.dark-theme input:focus, body.dark-theme select:focus, body.dark-theme textarea:focus,
html.dark-theme input:focus, html.dark-theme select:focus, html.dark-theme textarea:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3) !important;
}

/* Fade In */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: var(--bg-surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}
.empty-state i {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}
.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
}

/* ==========================================================================
   WORLD-CLASS VISUAL DESIGN & AESTHETICS ELEVATION (2026 NEXT-GEN SAAS)
   ========================================================================== */

/* ─── Ambient Glow & Mesh Backgrounds ─── */
.content-container {
    position: relative;
    padding-bottom: 48px;
}

.content-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 500px;
    height: 350px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, rgba(79, 70, 229, 0.02) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

body.dark-theme .content-container::before,
html.dark-theme .content-container::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.04) 50%, transparent 70%);
}

/* ─── Page Header Visual Polish ─── */
.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.035em;
    line-height: 1.25;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 5px 0 0 0;
    font-weight: 450;
    line-height: 1.5;
    max-width: 780px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─── Enhanced Cards & Surfaces ─── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 6px 20px -3px rgba(15, 23, 42, 0.04);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.24s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.16);
    border-color: rgba(37, 99, 235, 0.24);
}

body.dark-theme .card,
html.dark-theme .card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-theme .card:hover,
html.dark-theme .card:hover {
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(59, 130, 246, 0.35), 0 0 24px -4px rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 18px 18px 0 0;
}

body.dark-theme .card-header,
html.dark-theme .card-header {
    background: linear-gradient(180deg, rgba(26, 35, 55, 0.6) 0%, rgba(17, 24, 39, 0.2) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 750;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* ─── Metric & KPI Cards Luxury Upgrade ─── */
.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px 26px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03), 0 8px 24px -4px rgba(15, 23, 42, 0.04);
    transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(37, 99, 235, 0.25);
    border-color: rgba(37, 99, 235, 0.3);
}

body.dark-theme .metric-card,
html.dark-theme .metric-card {
    background: rgba(17, 24, 39, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-theme .metric-card:hover,
html.dark-theme .metric-card:hover {
    box-shadow: 0 18px 40px -6px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(59, 130, 246, 0.4), 0 0 28px -4px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.metric-card:hover .metric-icon {
    transform: scale(1.12) rotate(4deg);
}

.metric-value {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    margin: 8px 0 12px;
}

.metric-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

/* Metric Composite Rows (Scopus / Scholar stats) */
.metric-composite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 10px 0;
}

body.dark-theme .metric-composite,
html.dark-theme .metric-composite {
    background: rgba(13, 20, 36, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}

.comp-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    flex: 1;
}

.comp-label {
    font-size: 11px;
    font-weight: 650;
    color: var(--text-muted);
}

.comp-val {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.comp-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    margin: 0 8px;
    opacity: 0.7;
}

/* ─── State of the Art Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(0) scale(0.975);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #4f46e5 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #4338ca 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--border-strong);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

body.dark-theme .btn-secondary,
html.dark-theme .btn-secondary {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

body.dark-theme .btn-secondary:hover,
html.dark-theme .btn-secondary:hover {
    background: rgba(40, 53, 76, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 9px;
}

/* ─── Ultra-Refined Data Tables ─── */
.table-responsive {
    overflow-x: auto;
    border-radius: 16px;
}

.modern-table,
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.modern-table th,
.table th {
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 20px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

body.dark-theme .modern-table th,
html.dark-theme .modern-table th,
body.dark-theme .table th,
html.dark-theme .table th {
    background: rgba(22, 32, 54, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.modern-table td,
.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

body.dark-theme .modern-table td,
html.dark-theme .modern-table td,
body.dark-theme .table td,
html.dark-theme .table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.modern-table tr:hover td,
.table tr:hover td {
    background: rgba(37, 99, 235, 0.035);
}

body.dark-theme .modern-table tr:hover td,
html.dark-theme .modern-table tr:hover td,
body.dark-theme .table tr:hover td,
html.dark-theme .table tr:hover td {
    background: rgba(59, 130, 246, 0.06);
}

/* ─── Pills & Badges Perfection ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.badge-scopus {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

body.dark-theme .badge-scopus,
html.dark-theme .badge-scopus {
    background: rgba(234, 88, 12, 0.15);
    color: #fb923c;
    border-color: rgba(234, 88, 12, 0.3);
}

.badge-scholar {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

body.dark-theme .badge-scholar,
html.dark-theme .badge-scholar {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-color: rgba(37, 99, 235, 0.3);
}

.badge-q1 {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 800;
}

body.dark-theme .badge-q1,
html.dark-theme .badge-q1 {
    background: rgba(5, 150, 105, 0.2);
    color: #34d399;
    border-color: rgba(5, 150, 105, 0.35);
}

.badge-q2 {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 800;
}

body.dark-theme .badge-q2,
html.dark-theme .badge-q2 {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border-color: rgba(37, 99, 235, 0.35);
}

/* ─── Search, Form Inputs & Select Controls ─── */
.form-control,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select.form-control {
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:hover,
input[type="text"]:hover,
select.form-control:hover {
    border-color: var(--border-strong);
}

.form-control:focus,
input[type="text"]:focus,
input[type="search"]:focus,
select.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
    outline: none !important;
}

body.dark-theme .form-control:focus,
html.dark-theme .form-control:focus,
body.dark-theme input:focus,
html.dark-theme input:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22) !important;
}

/* ─── Modern Dialogs & Modals ─── */
.modal,
.modal-overlay {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.65);
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content,
.modal-box {
    border-radius: 22px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modalPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ─── Global Sleek Scrollbar ─── */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.55);
}

body.dark-theme ::-webkit-scrollbar-thumb,
html.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
}

body.dark-theme ::-webkit-scrollbar-thumb:hover,
html.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

