* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
    font-size: 10pt;
    text-align: left;
    margin: 0;
    padding: 0;
    padding-top: 110px; /* Space for fixed header - increased to prevent content cutoff */
}

/* Global heading alignment */
h1, h2, h3, h4, h5, h6 {
    text-align: left;
}

/* Header Styles */
.header {
    background: white;
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

/* Admin Header Styling */
body.admin-page .header {
    background: #f8f9fa;
    border-bottom: 2px solid #2d5f3f;
}

body.admin-page .nav-link {
    color: #666 !important;
    opacity: 0.7 !important;
    text-decoration: none !important;
}

body.admin-page .nav-link:hover {
    color: #2d5f3f !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

body.admin-page .nav-item a {
    color: #666 !important;
    opacity: 0.7 !important;
    text-decoration: none !important;
}

body.admin-page .nav-item a:hover {
    color: #2d5f3f !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

/* Override any visited/active link styles in admin */
body.admin-page a:visited,
body.admin-page a:active,
body.admin-page .nav-link:visited,
body.admin-page .nav-link:active,
body.admin-page .nav-item a:visited,
body.admin-page .nav-item a:active {
    color: #666 !important;
    text-decoration: none !important;
    opacity: 0.7 !important;
}

body.admin-page a:visited:hover,
body.admin-page a:active:hover,
body.admin-page .nav-link:visited:hover,
body.admin-page .nav-link:active:hover,
body.admin-page .nav-item a:visited:hover,
body.admin-page .nav-item a:active:hover {
    color: #2d5f3f !important;
    text-decoration: none !important;
    opacity: 1 !important;
}



.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 3rem;
    flex-wrap: nowrap;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #333;
    font-size: 11pt;
    flex-shrink: 0;
    margin-right: 4rem; /* Add extra space after logo */
}

.logo a {
    display: block;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo img {
    height: auto;
    width: auto;
    max-height: 45px;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1rem; /* Reduced gap for more compact nav items */
    flex-shrink: 0;
    flex: 1; /* Take up remaining space */
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 400;
    padding: 0.75rem 0.75rem; /* Reduced horizontal padding for compactness */
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 10pt;
    white-space: nowrap;
}

.nav-link:hover {
    color: #2d5f3f;
}

.nav-icon {
    display: none;
}

/* Authentication Styles */
.auth-item {
    position: relative;
    flex-shrink: 0; /* Prevent the auth item from shrinking */
    margin-left: auto; /* Push to the right */
}

.user-profile {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    min-width: 40px; /* Ensure minimum width */
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile:hover {
    background-color: #f5f5f5;
}

.profile-icon {
    color: #555;
    transition: color 0.3s ease;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.user-profile:hover .profile-icon {
    color: #2d5f3f;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px; /* Reduced from 200px to save space */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 10pt;
    transition: background-color 0.3s ease;
}

.dropdown-link:hover {
    background-color: #f8f9fa;
    color: #2d5f3f;
}

.user-name {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    font-size: 10pt;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

/* Ensure nav menu has proper flex layout */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1; /* Allow nav menu to grow but keep auth item visible */
}

/* Protected page styles */
.protected-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 2rem 0;
    text-align: center;
}

.protected-notice h3 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.protected-notice p {
    color: #856404;
    margin: 0;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
}

.alert-success {
    background-color: #e8f5e8;
    color: #2d5f3f;
    border-color: #b3d9b3;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Sign-in modal without background overlay */
#signinModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

#signinModal.modal {
    box-shadow: none;
    max-height: 95vh;
    min-height: 400px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2d5f3f;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

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

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    margin: 0px;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    height: 38px;
    box-sizing: border-box;
}

/* Modal footer specific styling */
.modal-footer {
    height: 62px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-footer .btn-secondary {
    margin: 0px;
}

.cta-button.secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.cta-button.secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* Checkbox and Column Selector Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    accent-color: #2d5f3f;
    cursor: pointer;
}

.checkbox-group .form-label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
}

.column-selector-group {
    margin-left: 1.5rem;
    transition: all 0.3s ease;
}

.column-selector-group.show {
    display: block;
}

.column-selector-group.hide {
    display: none;
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 110px);
}

.admin-sidebar {
    width: 188px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 2rem 0;
    position: fixed;
    left: 0;
    top: 110px;
    height: calc(100vh - 110px);
    overflow-y: auto;
}

.admin-content {
    flex: 1;
    margin-left: 188px;
    padding: 2rem 3rem;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav li {
    margin: 0;
}

.admin-nav a {
    display: block;
    padding: 1rem 2rem;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 10pt;
}

.admin-nav a:hover {
    background: #e9ecef;
    color: #2d5f3f;
}

.admin-nav a.active {
    background: #2d5f3f !important;
    color: white !important;
    border-left: 4px solid #1e4029 !important;
}

.admin-nav a.active:visited,
.admin-nav a.active:link,
.admin-nav a.active:hover,
.admin-nav a.active:focus {
    color: white !important;
}

/* Stronger override for active admin nav items */
.admin-nav li a.active {
    background: #2d5f3f !important;
    color: #ffffff !important;
    border-left: 4px solid #1e4029 !important;
}

.admin-nav li a.active:visited,
.admin-nav li a.active:link,
.admin-nav li a.active:hover,
.admin-nav li a.active:focus {
    color: #ffffff !important;
    background: #2d5f3f !important;
}

.admin-sidebar h3 {
    padding: 1.5rem 2rem 1rem 2rem;
    margin: 0 0 0.5rem 0;
    color: #2d5f3f;
    font-size: 11pt;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

@media (max-width: 768px) {
    .admin-sidebar h3 {
        padding: 1rem 1.5rem 0.75rem 1.5rem;
        margin: 0 0 0.25rem 0;
        font-size: 10pt;
    }
}

/* Responsive admin layout */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        position: fixed;
        width: 210px;
        background: white;
        border: 1px solid #e9ecef;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-radius: 0 12px 12px 0;
        height: auto;
        top: 110px;
        padding: 0;
        overflow: visible;
    }
    
    /* Hide specific admin nav items on mobile */
    .admin-nav li.mobile-hidden {
        display: none !important;
    }
    
    /* Mobile admin nav styling with better contrast */
    .admin-sidebar .admin-nav a {
        color: #2d5f3f !important;
        background: white !important;
        border-bottom: 1px solid #e9ecef !important;
        font-weight: 500 !important;
    }
    
    .admin-sidebar .admin-nav a:hover {
        background: #f8f9fa !important;
        color: #1e4029 !important;
    }
    
    .admin-sidebar .admin-nav a.active {
        background: #2d5f3f !important;
        color: white !important;
        border-left: 4px solid #1e4029 !important;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        padding: 6rem 1rem 2rem 1rem;
    }
    
    .mobile-admin-toggle {
        display: block !important;
        position: fixed;
        top: 140px;
        right: 2rem;
        z-index: 1002;
        background: #2d5f3f;
        color: white;
        border: none;
        padding: 0.75rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14pt;
        font-weight: bold;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }
    
    .mobile-admin-toggle:hover {
        background: #1e4029;
        transform: scale(1.05);
    }
    
    /* Overlay for mobile sidebar */
    .admin-sidebar.open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.2);
        z-index: -1;
    }
}

.mobile-admin-toggle {
    display: none;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Admin Result Cards */
.admin-result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    padding-bottom: 50px;
}

.admin-result-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.admin-card-content {
    position: relative;
    padding: 2rem;
}

.admin-card-header {
    margin-bottom: 1rem;
}

.admin-card-title {
    font-size: 11pt;
    font-weight: 600;
    color: #2d5f3f;
    margin: 0;
    line-height: 1.4;
}

.admin-card-title a {
    color: #2d5f3f;
    text-decoration: none;
}

.admin-card-title a:hover {
    text-decoration: underline;
}

.admin-card-body {
    margin-bottom: 2.5rem;
}

.admin-field {
    margin: 0.5rem 0;
    font-size: 10pt;
    color: #666;
    line-height: 1.4;
}

.admin-field strong {
    color: #333;
    font-weight: 600;
}

.admin-card-edit {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-card-edit:hover {
    background: #2d5f3f;
    color: white;
}

.admin-card-edit .edit-icon {
    color: #2d5f3f;
    transition: color 0.3s ease;
}

.admin-card-edit:hover .edit-icon {
    color: white;
}

/* User Management Styles */
.users-card, .add-user-card, .stats-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    margin-bottom: 2rem;
}

.user-list {
    margin-top: 1rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.user-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2d5f3f;
    font-size: 11pt;
}

.user-info p {
    margin: 0.25rem 0;
    font-size: 9pt;
    color: #666;
}

.user-actions button {
    background: #2d5f3f;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10pt;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-actions button:hover:not(:disabled) {
    background: #1e4029;
    transform: translateY(-1px);
}

.user-actions button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-item h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 10pt;
}

.stat-number {
    font-size: 16pt;
    font-weight: bold;
    color: #2d5f3f;
    margin: 0;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 10pt;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Table Display Styles */
.tables-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    margin-bottom: 2rem;
}

.table-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.table-item:last-child {
    margin-bottom: 0;
}

.table-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2d5f3f;
    font-size: 11pt;
    font-weight: 600;
}

.table-meta {
    margin: 0.5rem 0;
    color: #666;
    font-size: 9pt;
}

.table-columns {
    margin: 0.5rem 0 0 0;
    color: #495057;
    font-size: 9pt;
    line-height: 1.4;
}

.no-data-text, .error-text, .loading-text {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

.error-text {
    color: #dc3545;
}

/* Compact Pagination Styles */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    flex-wrap: nowrap;
}

.pagination-btn {
    background: white;
    border: 1px solid #d0d7de;
    color: #24292f;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 8pt;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #2d5f3f;
    color: #2d5f3f;
}

.pagination-btn.active {
    background: #2d5f3f;
    border-color: #2d5f3f;
    color: white;
    font-weight: 600;
}

.pagination-btn:disabled {
    background: #f6f8fa;
    color: #8b949e;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-dots {
    color: #656d76;
    padding: 0 0.2rem;
    font-size: 8pt;
}

.page-info {
    margin-left: 0.5rem;
    color: #656d76;
    font-size: 8pt;
    white-space: nowrap;
    background: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .pagination-container {
        gap: 0.15rem;
        padding: 0.4rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 0.25rem 0.4rem;
        font-size: 7pt;
        min-width: 24px;
        height: 24px;
    }
    
    .page-info {
        margin-left: 0;
        margin-top: 0.25rem;
        font-size: 7pt;
        order: 10;
        flex-basis: 100%;
        text-align: center;
    }
}



/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

.content-section {
    background: white;
    padding: 0 1rem;
    text-align: left;
}

.hero-section {
    text-align: left;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, #f8fdf9 0%, #e8f5e8 100%);
    margin: -4rem -3rem 4rem -3rem;
}

.hero-section .main-container {
    text-align: left;
}

.hero-section h1 {
    font-size: 18pt;
    color: #2d5f3f;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
}

.hero-section p {
    color: #666;
    font-size: 10pt;
    max-width: 800px;
    margin: 0 0 2rem 0;
    line-height: 1.6;
    text-align: left;
}

.cta-button {
    display: inline-block;
    background: #2d5f3f;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 10pt;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-align: center;
}

.cta-button:hover {
    background: #1e4029;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.3);
}

.content-section h1 {
    font-size: 12pt;
    color: #2d5f3f;
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-align: left;
}

.content-section p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 10pt;
    line-height: 1.7;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

/* Features Section */
.features-section {
    margin-top: 0; /* Removed vertical spacing */
    margin-bottom: 3rem; /* Add padding after the cards section */
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 0; /* Removed to eliminate gap */
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-card h3 {
    color: #2d5f3f;
    font-size: 12pt;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 10pt;
}

.feature-link {
    color: #2d5f3f;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #2d5f3f;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.3s ease;
}

.feature-link:hover {
    background: #2d5f3f;
    color: white;
}

/* Featured Studies Section */
.featured-studies-section {
    margin-top: 2rem;
}

.study-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
}

.study-card h2 {
    color: #2d5f3f;
    font-size: 14pt;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
}

.study-meta {
    color: #888;
    font-size: 9pt;
    margin-bottom: 1rem;
    font-style: italic;
    text-align: left;
}

.study-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 10pt;
    text-align: left;
}

.study-highlights {
    background: #f8fdf9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid #2d5f3f;
}

.study-highlights h3 {
    color: #2d5f3f;
    font-size: 11pt;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

.study-highlights ul {
    margin: 0;
    padding-left: 1.5rem;
    text-align: left;
}

.study-highlights li {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 10pt;
    line-height: 1.5;
    text-align: left;
}

.study-link {
    display: inline-block;
    background: #2d5f3f;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 10pt;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.study-link:hover {
    background: #1e4029;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.3);
}

/* Registration Form */
.registration-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 100px;
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #00bcd4;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.required {
    color: #e91e63;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.1);
}

/* Radio button group styles for field-specific search */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2d5f3f;
    cursor: pointer;
}

.radio-option label {
    font-size: 10pt;
    color: #333;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.radio-option input[type="radio"]:checked + label {
    color: #2d5f3f;
    font-weight: 500;
}

/* Mobile responsive stacking */
@media (max-width: 768px) {
    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }
}

.form-help {
    font-size: 9pt;
    color: #666;
    margin-top: 0.25rem;
    display: block;
    font-style: italic;
    text-align: left;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
}

.password-requirements {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.submit-btn {
    width: 100%;
    background: #00bcd4;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #00acc1;
}

.login-link {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.login-link a {
    color: #00bcd4;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
    font-size: 10pt;
    text-align: right;
}

.alert.success {
    background: #e8f5e8;
    color: #2d5f3f;
    border: 1px solid #b3d9b3;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Styles */
.site-footer {
    background: #2d5f3f;
    color: white;
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo-section {
    text-align: left;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: #e8f5e8;
    font-size: 10pt;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 12pt;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left;
}

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

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

.footer-section a {
    color: #e8f5e8;
    text-decoration: none;
    font-size: 10pt;
    transition: color 0.3s ease;
}

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

.footer-contact {
    color: #e8f5e8;
    font-size: 10pt;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-contact strong {
    color: white;
}

.footer-social {
    margin-top: 1.5rem;
}

.footer-social a {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: background 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: #e8f5e8;
    font-size: 9pt;
}

.footer-bottom a {
    color: #e8f5e8;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-bottom a:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-container {
        padding: 0 1.5rem;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    margin-right: 1rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .logo {
        margin-right: 2rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 9pt;
    }
    
    .main-container {
        padding: 2rem 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 90px; /* Increased padding for mobile header */
    }
    
    .nav-container {
        padding: 1rem 1.5rem;
        position: relative;
    }
    
    .logo {
        margin-right: 1rem;
        flex: 1;
    }
    
    .logo img {
        max-height: 35px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f0f0f0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        gap: 0;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        font-size: 10pt;
        border-radius: 0;
    }
    
    .auth-item {
        margin-left: 0;
        padding: 1rem 0;
        display: flex;
        justify-content: center;
    }
    
    .upload-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .main-container {
        padding: 2rem 1.5rem;
    }
    
    .content-section {
        padding: 0 0.5rem;
    }
    
    .content-section h1 {
        font-size: 11pt;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 80px; /* Increased padding for small mobile screens */
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .logo img {
        max-height: 30px;
    }
    
    .main-container {
        padding: 1.5rem 1rem;
    }
    
    .content-section h1 {
        font-size: 10pt;
    }
    
    .content-section p {
        font-size: 9pt;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 11pt;
    }
    
    .feature-card p {
        font-size: 9pt;
    }
    
    .feature-link {
        font-size: 9pt;
        padding: 0.75rem 1.5rem;
    }
}

/* Data Management Styles */
.data-section {
    margin-bottom: 3rem;
}

/* Results section alignment */
#resultsSection {
    margin-top: 0;
    margin-bottom: 2rem;
    order: -1; /* Ensure it appears first in flex layout */
}

#resultsSection .results-card {
    margin-top: 0;
    margin-bottom: 2rem;
    padding: 2rem 2.5rem;
}

#resultsSection .results-card h3 {
    margin-bottom: 0.5rem;
}

/* Edit Modal Styles */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.edit-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.edit-modal-header h3 {
    margin: 0;
    color: #2d5f3f;
    font-size: 12pt;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #333;
}

.edit-modal-body {
    padding: 2rem;
}

#editFormFields {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 10pt;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2d5f3f;
    color: white;
}

.btn-primary:hover {
    background: #1e4029;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 10pt;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Delete Confirmation Modal */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.delete-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.delete-modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.delete-modal-header h3 {
    margin: 0;
    color: #dc3545;
    font-size: 12pt;
    font-weight: 600;
}

.delete-modal-body {
    padding: 2rem;
}

.delete-modal-text {
    color: #495057;
    font-size: 10pt;
    line-height: 1.5;
    margin-bottom: 2rem;
    text-align: center;
}

.delete-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.delete-modal-actions .btn-secondary,
.delete-modal-actions .btn-danger {
    min-width: 100px;
}

/* Results header with Add button */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h3 {
    margin: 0;
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .results-header .btn-primary {
        width: 100%;
        text-align: center;
    }
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-card, .tables-card, .search-card, .results-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.upload-description {
    font-size: 9pt;
    color: #666;
    margin-bottom: 1rem;
    text-align: left;
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 9pt;
    color: #2d5f3f;
    font-weight: bold;
}

.upload-card h3, .tables-card h3, .search-card h3, .results-card h3 {
    color: #2d5f3f;
    margin-bottom: 1.5rem;
    font-size: 12pt;
    text-align: left;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 10pt;
}

.form-input, .file-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 10pt;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    text-align: left;
}

.form-input:focus, .file-input:focus {
    outline: none;
    border-color: #2d5f3f;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 8pt;
}

.table-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #2d5f3f;
}

.table-info h4 {
    color: #2d5f3f;
    margin-bottom: 0.5rem;
    font-size: 11pt;
    text-align: left;
}

.table-meta {
    color: #666;
    font-size: 9pt;
    margin-bottom: 0.5rem;
}

.table-columns {
    color: #555;
    font-size: 9pt;
}

.loading-text, .no-data-text, .error-text {
    text-align: left;
    color: #666;
    font-style: italic;
    padding: 2.5rem;
    font-size: 10pt;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.results-table th {
    background: #2d5f3f;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-table tr:nth-child(even) {
    background: #f8f9fa;
}

.results-table tr:hover {
    background: #e8f5e8;
}

.cta-button[type="submit"] {
    border: none;
    cursor: pointer;
}

.cta-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Research Results Card Styles */
.research-result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.research-result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.research-card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.research-card-title {
    margin: 0;
    font-size: 12pt;
    line-height: 1.4;
}

.research-title-link {
    color: #2d5f3f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.research-title-link:hover {
    color: #1e4029;
    text-decoration: underline;
}

.research-title-text {
    color: #333;
    font-weight: 600;
}

.research-card-content {
    color: #666;
    font-size: 10pt;
    line-height: 1.6;
}

.research-card-content p {
    margin: 0 0 0.75rem 0;
}

.research-card-content p:last-child {
    margin-bottom: 0;
}

.research-publication,
.research-author,
.research-source,
.research-intervention {
    color: #555;
}

.research-publication strong,
.research-author strong,
.research-source strong,
.research-intervention strong {
    color: #2d5f3f;
    font-weight: 600;
}

/* Legacy styles for backward compatibility */
.research-result-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.research-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.research-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

/* Mobile responsiveness for cards */
@media (max-width: 768px) {
    .research-result-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .research-card-title {
        font-size: 11pt;
    }
    
    .research-card-content {
        font-size: 9pt;
    }
}

@media (max-width: 480px) {
    .research-result-card {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .research-card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .research-card-title {
        font-size: 10pt;
    }
}

.research-title {
    color: #2d5f3f;
    font-size: 12pt;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: left;
}

.research-meta {
    color: #666;
    font-size: 9pt;
}

.research-year {
    font-weight: 500;
    color: #2d5f3f;
}

.research-type {
    background: #e8f5e8;
    color: #2d5f3f;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 8pt;
    font-weight: 500;
}

.research-authors, .research-journal {
    margin-bottom: 0.75rem;
    color: #555;
    font-size: 10pt;
}

.research-abstract {
    margin-bottom: 1rem;
    color: #666;
}

.research-abstract p {
    margin-top: 0.5rem;
    line-height: 1.6;
    font-size: 10pt;
}

.research-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.research-link {
    color: #2d5f3f;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border: 1px solid #2d5f3f;
    border-radius: 4px;
    font-size: 9pt;
    transition: all 0.3s ease;
}

.research-link:hover {
    background: #2d5f3f;
    color: white;
}

.research-tags {
    color: #777;
    font-size: 9pt;
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
}

/* Responsive adjustments for research results */
@media (max-width: 768px) {
    .research-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .research-link {
        text-align: center;
    }
    
    .research-title {
        font-size: 1.1rem;
    }
}

/* Pagination Styles */

/* Statistics Page Styles */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-card h3 {
    color: #2d5f3f;
    font-size: 11pt;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 28pt;
    font-weight: bold;
    color: #2d5f3f;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-description {
    color: #666;
    font-size: 9pt;
    margin: 0;
}

.activity-card, .database-status-card, .controls-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.activity-card h3, .database-status-card h3, .controls-card h3 {
    color: #2d5f3f;
    font-size: 12pt;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

#userActivityContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 100%;
    overflow: hidden;
}

.activity-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    min-width: 0; /* Allow items to shrink below their content size */
}

.activity-metric h4 {
    color: #2d5f3f;
    font-size: 10pt;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 20pt;
    font-weight: bold;
    color: #2d5f3f;
    margin-bottom: 0.25rem;
}

.activity-metric p {
    color: #666;
    font-size: 9pt;
    margin: 0;
}

#databaseStatusContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.status-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-item h4 {
    color: #2d5f3f;
    font-size: 10pt;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-value {
    font-size: 14pt;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.controls-container {
    text-align: center;
}

.control-description {
    color: #666;
    font-size: 9pt;
    margin-top: 1rem;
}

/* Mobile responsive adjustments for statistics */
@media (max-width: 768px) {
    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 22pt;
    }
    
    .activity-card, .database-status-card, .controls-card {
        padding: 1.5rem;
    }
    
    #userActivityContainer, #databaseStatusContainer {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 18pt;
    }
    
    .metric-value {
        font-size: 16pt;
    }
    
    .activity-card, .database-status-card, .controls-card {
        padding: 1rem;
    }
}

/* Users list styles - matching About Me card design */
.users-list {
    margin-top: 1rem;
}

.user-name-display {
    color: #2d5f3f;
    font-weight: 600;
}

.role-selection {
    display: flex;
    align-items: center;
}

/* Role Dropdown Styles */
/* Custom Role Dropdown Styles */
.role-selection {
    position: relative;
    display: inline-block;
}

.role-dropdown-container {
    position: relative;
    width: 140px;
}

.role-dropdown-button {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 10pt;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.role-dropdown-button:hover {
    border-color: #2d5f3f;
}

.role-dropdown-button.active {
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.role-dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.role-dropdown-button.active .role-dropdown-arrow {
    transform: rotate(180deg);
}

.role-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #2d5f3f;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(45, 95, 63, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.role-dropdown-menu.show {
    display: block;
}

.role-dropdown-option {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 10pt;
    border-bottom: 1px solid #f0f0f0;
}

.role-dropdown-option:last-child {
    border-bottom: none;
}

.role-dropdown-option:hover {
    background-color: #f8f9fa;
}

.role-dropdown-option.selected {
    background-color: #e8f5e8;
    color: #2d5f3f;
    font-weight: 500;
}

/* Hide the original select dropdown */
.role-dropdown {
    display: none;
}

/* Favorite Items Styling */
.favorite-item {
    position: relative;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    overflow: hidden;
}

/* Removed hover effect to eliminate shading */

.favorite-content {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative; /* Enable absolute positioning for child elements */
    margin: 0; /* Remove any margin to extend full width */
    /* Remove right padding - let icons overlay the content area */
}

.favorite-title {
    font-weight: 600;
    font-size: 10pt;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    padding-right: 3rem; /* Add padding to title to avoid overlapping with icons */
}

.favorite-date {
    font-size: 9pt;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Permalink icon removed from favorites cards */

/* Favorites page save icon container - updated for unified approach */
.favorite-item .card-actions-container {
    position: absolute;
    bottom: 0.75rem;
    right: 10px;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 8px;
}



.save-icon-container .save-icon {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 4px;
}

.save-icon-container .save-icon:hover {
    transform: scale(1.1);
}

.save-icon-container .save-icon.saved svg {
    fill: #2d5f3f;
}

.save-icon-container .save-icon:not(.saved) svg {
    fill: none;
    stroke: #666;
    stroke-width: 2;
}

.save-icon-container .save-icon:not(.saved):hover svg {
    stroke: #2d5f3f;
}

/* Old tooltip styles - replaced with enhanced version below */

/* Users header with search */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.users-header h3 {
    margin: 0;
}

.search-users-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-users-btn {
    background: #2d5f3f;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-users-btn:hover {
    background: #1e4029;
    transform: translateY(-1px);
}

.search-users-input-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-users-input {
    width: 180px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 10pt;
    background: white;
    transition: all 0.2s ease;
}

.search-users-input:focus {
    outline: none;
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
}

.clear-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #5a6268;
}

/* Compact Pagination controls for users */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    gap: 0.25rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.pagination-btn {
    background: white;
    color: #24292f;
    border: 1px solid #d0d7de;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 8pt;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #2d5f3f;
    color: #2d5f3f;
}

.pagination-btn:disabled {
    background: #f6f8fa;
    color: #8b949e;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    color: #656d76;
    font-size: 8pt;
    font-weight: 500;
    margin-left: 0.5rem;
    background: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

/* Mobile responsiveness for users list */
@media (max-width: 768px) {
    .role-dropdown {
        width: 120px;
        padding: 0.3rem 0.4rem;
        font-size: 9pt;
    }
    
    .user-name-display strong {
        font-size: 9pt;
    }
    
    .pagination-controls {
        gap: 0.15rem;
        padding: 0.4rem;
        flex-wrap: wrap;
    }
    
    .pagination-controls .page-info {
        margin-left: 0;
        margin-top: 0.25rem;
        font-size: 7pt;
        order: 10;
        flex-basis: 100%;
        text-align: center;
    }
    
    .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-users-container {
        align-self: flex-end;
    }
    
    .search-users-input {
        width: 140px;
    }
}
    
    .users-table th:not(:first-child) {
        width: 25%;
    }
    
    .user-name {
        font-size: 14px;
    }
}

/* Dashboard Grid Styles for My Stuff page - Vertical stacking for all layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* About Me Card Styles */
.about-content {
    padding-top: 1rem;
}

.user-details {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Three-column layout for About Me section */
.about-content .detail-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 1rem;
}

/* Ensure users list detail items use flex layout, not grid */
.users-list .detail-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

/* Icon columns for user management */
.user-icon-column,
.email-verification-column {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: default;
    transition: all 0.2s ease;
}

.user-icon-column:hover,
.email-verification-column:hover {
    transform: scale(1.1);
}

.role-icon {
    font-size: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    line-height: 1;
    color: #2d5f3f !important;
    font-weight: bold;
    transition: all 0.2s ease;
}

.role-icon svg {
    stroke: #2d5f3f;
    transition: all 0.2s ease;
}

.email-verification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all 0.2s ease;
}

.email-verification-icon svg {
    stroke: #2d5f3f;
    transition: all 0.2s ease;
}

.role-icon:hover {
    color: #245032 !important;
    transform: scale(1.1);
}

.role-icon:hover svg {
    stroke: #245032;
}

/* Role Assignment Popup Menu */
.user-icon-column {
    position: relative;
    cursor: pointer;
}

.role-assignment-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999 !important;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s ease;
}

.role-assignment-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.role-assignment-menu.position-above {
    top: auto;
    bottom: 100%;
    transform: translateX(-50%) translateY(10px);
}

.role-assignment-menu.position-above.active {
    transform: translateX(-50%) translateY(0);
}

.role-menu-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.role-options {
    padding: 8px 0;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.role-option:hover {
    background-color: #e8f5e8;
    color: #2d5f3f;
}

.role-option.selected {
    background-color: #f0f8f0;
    color: #2d5f3f;
    font-weight: 600;
}

.role-option .role-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: #2d5f3f;
}

.role-option .role-icon svg {
    stroke: #2d5f3f;
}

.role-option:hover .role-icon {
    color: #2d5f3f;
}

.role-option:hover .role-icon svg {
    stroke: #2d5f3f;
}

/* Ensure user row has proper z-index when role menu is open */
.detail-item.has-role-menu-open {
    z-index: 998 !important;
    position: relative !important;
}

/* Users header controls styling */
.users-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.all-users-filter {
    margin-right: 0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #2d5f3f;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #2d5f3f;
    border-color: #2d5f3f;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.email-verification-icon:hover {
    transform: scale(1.1);
}

.email-verification-icon:hover svg {
    stroke: #245032;
}

/* Special styling for archived users */
.user-icon-column[title*="Archived"] .role-icon {
    color: #dc3545 !important;
}

.user-icon-column[title*="Archived"] .role-icon:hover {
    color: #c82333 !important;
}

/* Adjust user name display to take remaining space */
.user-name-display {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0; /* Allow text truncation */
}

.user-name-display strong {
    color: #2d5f3f;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.about-content .detail-item > strong {
    text-align: left;
    color: #2d5f3f;
    font-weight: 600;
    grid-column: 1;
}

.about-content .detail-item > span {
    text-align: left;
    color: #333;
    font-weight: 500;
    grid-column: 2;
    justify-self: start;
}

.about-content .detail-item .edit-btn,
.about-content .detail-item .resend-btn {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
}

/* Inline edit input styling */
.about-content .inline-edit-input {
    grid-column: 2;
    justify-self: start;
    width: 100%;
    max-width: 300px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #2d5f3f;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(45, 95, 63, 0.1);
}

.about-content .inline-edit-input:focus {
    outline: none;
    border-color: #1e4029;
    box-shadow: 0 2px 8px rgba(45, 95, 63, 0.2);
}

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

.user-details:hover {
    border-color: #2d5f3f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.detail-item strong {
    color: #2d5f3f;
    font-weight: 600;
}

.detail-item span {
    color: #333;
    font-weight: 500;
}

/* Editable detail items */
.editable-item {
    position: relative;
}

.edit-btn {
    background-color: #2d5f3f;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 1rem;
    transition: background-color 0.2s ease;
}

.edit-btn:hover {
    background-color: #245f3a;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Collections Grid Styles - Vertical stacking for wider cards */
.collections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.collection-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.collection-card:hover {
    border-color: #2d5f3f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

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

.collection-name {
    color: #2d5f3f;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.collection-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.collection-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
}

.item-count {
    color: #2d5f3f;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state h3 {
    color: #888;
    margin-bottom: 0.5rem;
}

.create-collection-btn {
    background-color: #2d5f3f;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.create-collection-btn:hover {
    background-color: #245f3a;
}

/* Modal overlay styles for deletion confirmation */
#delete-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500;
}

#delete-confirm-overlay[style*="display: none"] {
    display: none !important;
}

#delete-confirm-overlay[style*="display: block"] {
    display: flex !important;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Specific styling for delete confirmation modal */
#delete-confirm-overlay .modal {
    max-width: 300px;
    padding: 0.75rem;
    max-height: 25vh;
}

#delete-confirm-overlay .modal h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

#delete-confirm-overlay .modal p {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

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

#delete-confirm-overlay .modal-actions {
    margin-top: 0.25rem;
    gap: 0.5rem;
}

#delete-confirm-overlay .btn-secondary,
#delete-confirm-overlay .btn-danger {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    min-width: 60px;
}

.inline-edit-input,
.inline-edit-textarea,
.inline-edit-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
    width: auto;
    min-width: 200px;
    margin-left: 0.5rem;
}

.inline-edit-textarea {
    resize: vertical;
    font-family: inherit;
    min-width: 300px;
}

.inline-edit-input:focus,
.inline-edit-textarea:focus,
.inline-edit-select:focus {
    outline: none;
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.message-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

.message-content.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message-content.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.message-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.edit-form {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Password Reset Modal */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.password-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.password-modal-header h3 {
    margin: 0;
    color: #2d5f3f;
    font-size: 12pt;
    font-weight: 600;
}

.password-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-modal-close:hover {
    color: #333;
    background: #e9ecef;
}

.password-modal-body {
    padding: 2rem;
}

.password-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 10pt;
    display: none;
}

.password-input-group {
    margin-bottom: 1.5rem;
}

.password-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 10pt;
}

.password-input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 10pt;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.password-input-group input:focus {
    outline: none;
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
}

.password-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.password-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 10pt;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
}

.password-btn-primary {
    background: #2d5f3f;
    color: white;
}

.password-btn-primary:hover {
    background: #1e4029;
}

.password-btn-secondary {
    background: #6c757d;
    color: white;
}

.password-btn-secondary:hover {
    background: #545b62;
}

/* Mobile responsive adjustments for password modal */
@media (max-width: 480px) {
    .password-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .password-modal-header,
    .password-modal-body,
    .password-modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .password-modal-footer {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .password-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .password-input-group input {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

.edit-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.edit-input:focus {
    outline: none;
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
}

.save-btn, .cancel-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background-color 0.2s ease;
}

.save-btn {
    background-color: #2d5f3f;
    color: white;
}

.save-btn:hover {
    background-color: #245f3a;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

/* Unified Card Actions Container */
.card-actions-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Save icon styling */
.save-icon-container {
    display: flex;
    align-items: center;
    z-index: 10;
    position: relative; /* Enable tooltips */
}

.save-icon {
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: block;
    width: 24px;
    height: 24px;
}

.save-icon:hover {
    color: #2d5f3f;
    transform: scale(1.1);
}

.save-icon.saved {
    color: #2d5f3f;
    fill: #2d5f3f;
}

/* Favorites table specific card-actions-container styling */
.favorites-table .card-actions-container {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    z-index: auto;
    width: 64px;
    height: 32px;
}

.favorites-table .share-container {
    display: flex;
    align-items: center;
}

.favorites-table .share-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    color: #2d5f3f;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorites-table .share-button:hover {
    background-color: rgba(45, 95, 63, 0.1);
    color: #1e4029;
}

.favorites-table .share-button svg {
    width: 16px;
    height: 16px;
}

.favorites-table .action-btn svg {
    width: 16px;
    height: 16px;
}

.favorites-table .action-btn {
    padding: 2px;
}

/* Content Analytics Styling */
.content-analytics-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.analytics-row:last-child {
    margin-bottom: 0;
}

.analytics-item h4 {
    color: #2d5f3f;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.analytics-list {
    min-height: 120px;
}

.term-item, .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.term-item:last-child, .category-item:last-child {
    border-bottom: none;
}

.term-name, .category-name {
    color: #333;
    font-weight: 500;
}

.term-count, .category-percent {
    color: #2d5f3f;
    font-weight: 600;
    font-size: 0.9rem;
}

.engagement-metrics, .search-patterns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-item, .pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.metric-label, .pattern-label {
    color: #666;
    font-size: 0.9rem;
}

.metric-value, .pattern-value {
    color: #2d5f3f;
    font-weight: 600;
    font-size: 1rem;
}

.no-data, .error-state {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.error-state {
    color: #d32f2f;
}

/* Login Chart, Search Chart, Users Chart, and Sessions Chart Styling */
.login-chart, .search-chart, .users-chart, .sessions-chart {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.search-chart {
    margin: 0px;
}

.users-chart {
    margin: 0px;
}

.login-chart {
    margin: 0px;
}

.sessions-chart {
    margin: 0px;
}

.activity-metric h4 {
    margin-bottom: 1rem;
    margin-top: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.chart-footer {
    margin: 0px;
    text-align: center;
    padding: 0.25rem;
}

.chart-title {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

.chart-title .metric-value {
    color: #2d5f3f;
    font-weight: 500;
    font-size: 0.85rem;
}

.chart-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Line chart specific styling */
.line-chart {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-svg {
    width: 100%;
    height: 100px;
    max-width: 100%;
    box-sizing: border-box;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    height: 80px;
    width: 100%;
    padding: 0 0.5rem;
}

.bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bar {
    background: linear-gradient(to top, #2d5f3f, #4a7c59);
    width: 100%;
    max-width: 25px;
    border-radius: 2px 2px 0 0;
    position: relative;
    transition: opacity 0.2s ease;
    cursor: pointer;
    min-height: 2px;
}

.bar:hover {
    opacity: 0.8;
}

.bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #2d5f3f;
    white-space: nowrap;
}

.bar-label {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.chart-error {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Mobile optimization for Content Analytics and Charts */
@media (max-width: 768px) {
    .analytics-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-analytics-card {
        padding: 1rem;
    }
    
    .term-item, .category-item {
        padding: 0.25rem 0;
    }
    
    .metric-item, .pattern-item {
        padding: 0.375rem;
    }
    
    .login-chart, .search-chart, .users-chart {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }
    
    .search-chart {
        margin: 0px;
    }

    .users-chart {
        margin: 0px;
    }
    
    .login-chart {
        margin: 0px;
    }
    
    .activity-metric h4 {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }
    
    .chart-footer {
        margin: 0px;
        padding: 0.2rem;
    }
    
    .chart-title {
        font-size: 0.75rem;
    }
    
    .chart-title .metric-value {
        font-size: 0.8rem;
    }
    
    .chart-bars {
        gap: 0.25rem;
        height: 60px;
        padding: 0 0.25rem;
    }
    
    .bar {
        max-width: 20px;
    }
    
    .bar-value {
        font-size: 9px;
        top: -16px;
    }
    
    .bar-label {
        font-size: 10px;
    }
}

/* Mobile optimization for My Library tables */
@media (max-width: 768px) {
    .favorites-table {
        margin: 0 -0.5rem;
        width: calc(100% + 1rem);
    }
    
    .favorites-table .icon-cell {
        width: 24px !important;
        padding-right: 0.125rem !important;
    }
    
    .favorites-table .date-cell {
        width: 80px !important;
        font-size: 12px;
    }
    
    .favorites-table .actions-cell {
        width: 50px !important;
    }
    
    .favorites-table .card-actions-container {
        width: 50px;
        height: 28px;
        gap: 2px;
    }
    
    .search-detail-item {
        padding: 0.5rem 0.25rem;
    }
    
    .search-detail-icon {
        flex-shrink: 0;
        width: 16px;
    }
}

.favorites-share-popup {
    position: fixed;
    z-index: 998;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 200px;
}

.favorites-share-popup .share-menu-header {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.favorites-share-popup .share-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.favorites-share-popup .share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.favorites-share-popup .share-option:hover {
    background-color: #f5f5f5;
}

/* Custom tooltip for save icons */
.save-icon-container[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 153, 115, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11pt;
    font-weight: 400;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.save-icon-container[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(102, 153, 115, 0.95);
    z-index: 1001;
    pointer-events: none;
}

/* Ensure result cards have relative positioning for absolute save icon */
.research-result-card {
    position: relative;
    padding-bottom: 40px; /* Add space for save icon */
}

/* Favorites list styling */
.favorite-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    padding-bottom: 40px; /* Add space for action icons */
    margin-bottom: 0.5rem;
    background-color: white; /* Clean white background */
    border-radius: 6px;
    border-left: 3px solid #2d5f3f;
    position: relative; /* Enable absolute positioning for action icons */
}

.favorite-type {
    font-size: 12px;
    font-weight: 600;
    color: #2d5f3f;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.favorite-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.favorite-date {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.placeholder-text {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Save Message Modal Styles */
.save-message-modal {
    max-width: 400px;
    width: 90%;
}

.save-message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    padding-top: 10px;
    padding-left: 10px;
    border-bottom: 1px solid #eee;
}

.save-message-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    box-sizing: border-box;
}

.save-message-success .save-message-icon {
    background-color: #2d5f3f;
}

.save-message-error .save-message-icon {
    background-color: #dc3545;
}

.save-message-info .save-message-icon {
    background-color: #7db8a3;
}

.save-message-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
}

.save-message-body {
    margin-bottom: 1.5rem;
}

.save-message-body p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    text-align: left;
    padding-left: 20px;
}

.save-message-footer {
    display: flex;
    justify-content: flex-end;
}

.save-message-footer .btn-primary {
    min-width: 80px;
    padding: 0.5rem 1rem;
}

/* My Favorites Card Styles */
.favorites-content {
    padding-top: 1rem;
}

.favorites-section {
    margin-bottom: 2rem;
}

.favorites-section h4 {
    margin: 0 0 0.5rem 0;
    color: #2d5f3f;
    font-size: 1.1rem;
    font-weight: 600;
}

.favorites-section p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.recent-searches-list {
    margin: 1rem 0;
}

.recent-search-item {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recent-search-item:last-child {
    margin-bottom: 0;
}

.recent-search-item:hover {
    border-color: #2d5f3f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.search-term {
    font-weight: 600;
    color: #2d5f3f;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-meta {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.8rem;
}

.search-source {
    background: #2d5f3f;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.search-count {
    font-style: italic;
}

/* Search link styling for My Stuff page */
.search-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.search-link:hover {
    text-decoration: none;
    color: inherit;
}

.search-item {
    padding: 0.75rem 1rem;
    border-left: 3px solid #2d5f3f;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-item:hover {
    background-color: #e9ecef;
    border-left-color: #1e4129;
    transform: translateX(2px);
}

.search-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.search-term {
    color: #2d5f3f;
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
    margin-right: 1rem;
}

.search-metadata {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
}

.search-count {
    color: #666;
    font-style: italic;
    min-width: 20px;
}

.search-date {
    color: #888;
    font-size: 0.8rem;
    min-width: 80px;
}

.search-table {
    background: #2d5f3f;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 20px;
}

.search-details {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.favorites-subsection {
    margin-bottom: 2rem;
}

.favorites-subsection:last-child {
    margin-bottom: 0;
}

.favorites-subsection h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #2d5f3f;
    padding-bottom: 0.5rem;
}

.favorites-list {
    margin: 1rem 0;
}

.favorite-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.favorite-content {
    flex: 1;
    margin-right: 1rem;
}

.favorite-item:last-child {
    margin-bottom: 0;
}

.favorite-item:hover {
    border-color: #2d5f3f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.favorite-title {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.favorite-date {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.favorite-save-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
}

/* Positioning for card actions container in favorites cards */
.favorite-item .card-actions-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-item .save-icon-container {
    display: flex;
    align-items: center;
}

.favorite-save-icon {
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    color: #666;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    min-height: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background-color: #2d5f3f;
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.modal-close:hover,
.modal-close:focus {
    opacity: 0.7;
}

.modal-body {
    padding: 1.5rem 2rem 2rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.modal-body .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-color: #f8f9fa;
}

.modal-body .form-input:focus {
    outline: none;
    border-color: #2d5f3f;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
}

.modal-body .submit-button {
    width: 100%;
    background-color: #2d5f3f;
    color: white;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body .submit-button:hover {
    background-color: #245f3a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.3);
}

.modal-body .submit-button:active {
    transform: translateY(0);
}



/* Modal Alert Styles */
.modal-body .alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-body .alert.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.modal-body .alert.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

.favorite-save-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.favorite-save-icon.saved {
    color: #2d5f3f;
    fill: #2d5f3f;
    opacity: 1;
}

/* Confirmation modal button styling */
.confirmation-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 2rem 1.5rem 2rem;
}

.confirmation-btn {
    min-width: 100px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    line-height: 1.2;
}

.confirmation-btn.btn-secondary {
    background-color: #666;
    color: white;
}

.confirmation-btn.btn-secondary:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.confirmation-btn.btn-primary {
    background-color: #2d5f3f;
    color: white;
}

.confirmation-btn.btn-primary:hover {
    background-color: #1e3f2a;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-secondary:active {
    background-color: #495057;
    transform: translateY(1px);
}

/* Recent searches styling - card format like About Me */
.search-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

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

.search-detail-item:hover {
    background-color: #f8f9fa;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
}

.search-detail-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
    gap: 0.5rem;
}

.search-detail-link:hover {
    text-decoration: none;
    color: inherit;
}

.search-detail-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
    margin-right: 0.5rem;
    justify-content: center;
}

.search-detail-icon .target-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.search-detail-item:hover .search-detail-icon .target-icon {
    opacity: 1;
}

.search-detail-label {
    font-weight: 500;
    color: #2d5f3f;
    cursor: pointer;
    flex-grow: 1;
}

.search-detail-value {
    color: #666;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Clickable favorites styling */
.clickable-favorite {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    width: 100%; /* Extend to full width of parent favorite-item */
    margin: -1rem; /* Negative margin to offset parent padding */
    padding: 1rem; /* Add back the padding so content stays in place */
}

/* Removed hover shading effect */

/* Duplicate rule removed - main rule is above */

.favorite-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.favorite-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.favorite-title {
    font-weight: 500;
    color: #2d5f3f;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.favorite-date {
    color: #666;
    font-size: 0.85rem;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .user-details,
    .favorites-list {
        padding: 0.75rem;
    }
    
    .detail-item,
    .favorite-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Mobile responsive for About Me three-column layout */
    .about-content .detail-item {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 0.5rem;
    }
    
    .favorite-type {
        min-width: 70px;
        font-size: 11px;
    }
}

/* Social Sharing Styles */
.share-container {
    position: relative;
    display: inline-block;
}

.share-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #2d5f3f;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Share icon tooltips - same styling as save icon tooltips */
.share-container[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 153, 115, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11pt;
    font-weight: 400;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-container[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(102, 153, 115, 0.95);
    z-index: 1001;
    pointer-events: none;
}

.share-button:hover {
    background-color: #f5f5f5;
    color: #2d5f3f;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999 !important;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

/* Special positioning for favorites cards to appear on top */
.favorite-item .share-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 999 !important;
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-menu-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.share-options {
    padding: 8px 0;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.share-option:hover,
.share-option.twitter:hover,
.share-option.linkedin:hover,
.share-option.facebook:hover,
.share-option.email:hover,
.share-option.copy:hover {
    background-color: #e8f5e8;
    color: #2d5f3f;
}

.share-option svg {
    flex-shrink: 0;
}

/* Research card social sharing positioning - Override for share positioning */
.research-result-card.has-share-open,
.favorite-item.has-share-open,
.study-card.has-share-open {
    z-index: 998 !important;
    position: relative !important;
}

.favorite-item.has-share-open .card-actions-container {
    z-index: 999 !important;
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
}

.favorite-item.has-share-open .share-menu {
    z-index: 999 !important;
    position: absolute !important;
}

/* Featured study cards positioning */
.study-card {
    position: relative;
}

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

.study-header h2 {
    flex: 1;
    margin: 0;
    margin-right: 1rem;
}

.study-card .card-actions-container {
    position: relative;
    align-self: flex-start;
    z-index: 998;
    padding-top: 5px;
}

.study-card.has-share-open .card-actions-container {
    z-index: 998 !important;
}

.study-card .share-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 999999 !important;
    min-width: 200px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.2s ease !important;
}

.study-card .share-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Ensure favorites cards can be elevated */
.favorite-item {
    position: relative;
}

.favorite-item .share-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 999999;
}

/* Share container within unified actions */
.card-actions-container .share-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Ensure favorites table share containers have proper positioning context */
.favorites-table .table-actions .share-container {
    position: relative;
}

/* Ensure share menu positions correctly within card-actions-container - but not for study cards */
.favorite-item .card-actions-container .share-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 999999 !important;
    margin-top: 5px;
}

.favorite-item .card-actions-container .share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Legacy positioning for cards not yet using unified container */
.research-result-card .share-container:not(.card-actions-container .share-container) {
    position: absolute;
    bottom: 1rem;
    right: 4rem;
    z-index: 999998;
}

.favorite-item .share-container:not(.card-actions-container .share-container) {
    position: absolute;
    bottom: 0.75rem;
    right: 3rem;
    z-index: 999998;
}

/* Mobile responsiveness for share menu */
@media (max-width: 768px) {
    .share-menu {
        right: -10px;
        min-width: 180px;
    }
    
    .share-option {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .share-menu-header {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    /* Mobile responsive for unified card actions */
    .card-actions-container {
        bottom: 0.75rem;
        right: 10px;
    }
    
    /* Legacy mobile positioning for cards not using unified container */
    .research-result-card .share-container:not(.card-actions-container .share-container) {
        right: 3.5rem;
        bottom: 0.75rem;
    }
    
    .favorite-item .share-container:not(.card-actions-container .share-container) {
        right: 2.5rem;
        bottom: 0.75rem;
    }
}

/* Favorites Table Styling */
.favorites-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 1rem;
    border: 1px solid #e0e0e0;
}

.favorites-table thead {
    background-color: #6ba377;
    color: white;
}

.favorites-table th {
    padding: 0.5rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.favorites-table .actions-column {
    width: 120px;
    text-align: center;
}

.favorites-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.favorites-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.favorites-table td {
    padding: 1rem;
    vertical-align: middle;
}

.title-cell {
    max-width: 400px;
}

.favorite-title-link {
    color: #2d5f3f;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.favorite-title-link:hover {
    color: #1e4029;
    text-decoration: underline;
}

.date-cell {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

.actions-cell {
    text-align: center;
}

.table-actions {
    display: flex;
    position: relative;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #2d5f3f;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0px;
}

.action-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.action-btn.share-btn:hover {
    color: #1e4029;
}

.action-btn.unsave-btn:hover {
    color: #2d5f3f;
}

.action-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

/* Table Share Popup */
.table-share-popup {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    min-width: 200px;
    max-width: 250px;
    z-index: 999;
}

.table-share-popup .share-menu-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 0.9rem;
}

.table-share-popup .share-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-share-popup .share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: #333;
    font-size: 0.9rem;
}

.table-share-popup .share-option:hover {
    background-color: #f5f5f5;
}

.table-share-popup .share-option svg {
    color: #2d5f3f;
}

/* Icon cell styling for combined favorites */
.favorites-table .icon-cell {
    width: 40px;
    padding-right: 0.5rem;
    text-align: center;
    vertical-align: middle;
}

/* Search results and favorites pagination styling */
.pagination-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Specific styling for favorites pagination to reduce spacing */
#favoritesPaginationContainer {
    margin: 0;
    padding: 0;
    border-top: none;
    background-color: white;
}

.pagination-btn {
    background-color: #2d5f3f;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #1e3f2a;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-btn.active {
    background-color: #1e3f2a;
    font-weight: bold;
}

.pagination-dots {
    color: #666;
    font-size: 0.9rem;
    padding: 0 0.25rem;
}

.page-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-left: 1rem;
    padding: 0.5rem;
}

/* Admin section content headings and text - no padding */
.admin-container .content-card h3,
.admin-container .card-content > p {
    padding: 0;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Distribution cards styling */
.distribution-card {
    background: #f8f9fa !important;
    border-left: 4px solid #2d5f3f !important;
    transition: all 0.2s ease;
}

.distribution-card:hover {
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.15);
    transform: translateY(-1px);
}

.distribution-card .collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.distribution-card .collection-header h4 {
    margin: 0;
    color: #2d5f3f;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.distribution-card .collection-header p {
    margin: 2px 0 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.2;
}

.distribution-card .action-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.distribution-card .action-btn:hover {
    background-color: rgba(45, 95, 63, 0.1);
}

.distribution-card .action-btn svg {
    transition: all 0.2s;
}

.distribution-card .action-btn:hover svg {
    stroke: #1e4029;
}

/* Distribution container empty state */
.distributions-container .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.distributions-container .empty-state h3 {
    color: #2d5f3f;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.distributions-container .empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Templates Page Styling */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.template-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: #2d5f3f;
    box-shadow: 0 4px 8px rgba(45, 95, 63, 0.1);
}

.template-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.template-header h3 {
    color: #2d5f3f;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.template-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.template-content {
    position: relative;
}

.template-content .form-group {
    margin-bottom: 1rem;
}

.template-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.template-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.template-content textarea:focus {
    outline: none;
    border-color: #2d5f3f;
    box-shadow: 0 0 0 2px rgba(45, 95, 63, 0.1);
}

.template-actions {
    margin-top: 1rem;
    text-align: right;
}

.template-actions .btn {
    background-color: #2d5f3f;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 120px;
}

.template-actions .btn:hover {
    background-color: #245032;
    transform: translateY(-1px);
}

.template-actions .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.template-actions .btn-loading {
    display: none;
}

/* Alert styling for template page */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    max-width: 400px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive adjustments for templates page */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .template-card {
        padding: 1rem;
    }
    
    .template-header h3 {
        font-size: 1.1rem;
    }
    
    .template-description {
        font-size: 0.85rem;
    }
    
    .template-content textarea {
        min-height: 100px;
        font-size: 0.85rem;
    }
    
    .alert {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        margin: 0;
    }
}
