/* Enhanced CSS for KE-WP Mapping Application */

/* CSS Design Tokens (Custom Properties) */
:root {
    /* VHP4Safety Color Palette */
    --color-primary-dark: #29235C;
    --color-primary-pink: #E6007E;
    --color-primary-blue: #307BBF;
    --color-secondary-light-blue: #93D5F6;
    --color-secondary-cyan: #009FE3;
    --color-secondary-orange: #EB5B25;
    --color-secondary-teal: #005A6C;
    --color-secondary-magenta: #B81178;
    --color-secondary-purple: #64358C;
    --color-teal-accent: #45A6B2;

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-border-light: #e2e8f0;
    --color-bg-light: #f8fafc;
    --color-bg-lighter: #f8f9fa;
    --color-bg-gray: #f1f5f9;
    --color-text-dark: #1f2937;
    --color-text-medium: #374151;
    --color-text-gray: #6b7280;
    --color-text-muted: #666666;
    --color-border-gray: #dddddd;

    /* Page Layout */
    --color-bg-page: #f5f5f7;
    --layout-max-width: 1100px;

    /* Semantic Status Colors (BRAND-03) */
    --color-status-high: #28a745;
    --color-status-medium: #f59e0b;
    --color-status-low: #dc3545;

    /* Z-Index Scale (BRAND-04) */
    --z-footer: 500;
    --z-dropdown: 1000;
    --z-modal: 1000;
    --z-modal-overlay: 999;
    --z-graph-panel: 10000;
    --z-tooltip: 10;

    /* Method Badge Colors (VHP4Safety secondary palette) */
    --color-method-gene: #45A6B2;
    --color-method-semantic: #64358C;
    --color-method-text: #EB5B25;
    --color-method-ontology: #B81178;

    /* Typography */
    --font-family-base: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-xs: 13px;
    --line-height-base: 1.6;

    /* Spacing Scale */
    --spacing-xs: 8px;
    --spacing-sm: 10px;
    --spacing-md: 12px;
    --spacing-lg: 15px;
    --spacing-xl: 16px;
    --spacing-2xl: 20px;
    --spacing-3xl: 24px;
    --spacing-4xl: 28px;
    --spacing-5xl: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 5px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-focus: 0 0 0 3px rgba(48, 123, 191, 0.1);
    --shadow-focus-teal: 0 0 0 3px rgba(0, 90, 108, 0.1);
}

/* Base styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    background-color: var(--color-bg-page);
    color: var(--color-primary-dark);
    line-height: 1.6;
    font-size: 16px;
}

/* Layout */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
    max-width: var(--layout-max-width);
    margin: 30px auto;
    padding: var(--spacing-5xl);
    background-color: var(--color-bg-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: visible;
}

/* ==========================================
   Site Header — Single-bar navigation
   ========================================== */
.site-header {
    background-color: var(--color-primary-dark);
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
}

.site-header__inner {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 56px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 16px;
    flex-shrink: 0;
}

.site-header__vhp-logo {
    color: white;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-header__divider {
    width: 1px;
    height: 24px;
    background-color: rgba(255,255,255,0.3);
}

.site-header__app-name {
    color: white;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.site-header__logo {
    height: 44px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.site-nav {
    flex: 1;
}

.site-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 56px;
}

.site-nav__link {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    height: 100%;
    transition: background-color 0.2s;
}

.site-nav__link:hover {
    background-color: rgba(255,255,255,0.08);
    color: white;
}

.site-nav__link.active {
    background-color: rgba(255,255,255,0.15);
    color: white;
    font-weight: 600;
}

.site-header__user {
    padding: 0 16px;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header__username {
    font-weight: 500;
    color: white;
}

.site-header__role {
    font-weight: 700;
    font-size: var(--font-size-xs);
}

.site-header__role--admin {
    color: var(--color-secondary-orange);
}

.site-header__role--guest {
    color: var(--color-secondary-light-blue);
}

.site-header__auth-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.site-header__auth-link:hover {
    text-decoration: underline;
    color: white;
}

.site-header__auth-link--guest {
    color: var(--color-secondary-light-blue);
}

.site-header__auth-sep {
    color: rgba(255,255,255,0.3);
    margin: 0 4px;
}

/* ==========================================
   Site Footer — Document flow
   ========================================== */
.site-footer {
    background-color: var(--color-bg-lighter);
    border-top: 1px solid var(--color-border-light);
    padding: 16px 0;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: auto;
}

.site-footer__inner {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 16px;
}

.site-footer__org {
    font-weight: 600;
    color: var(--color-text-gray);
}

.site-footer__sep {
    color: var(--color-border-light);
}

.site-footer__link {
    color: var(--color-primary-blue);
    text-decoration: none;
}

.site-footer__link:hover {
    text-decoration: underline;
}

.site-footer__doi a {
    color: var(--color-primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.site-footer__version {
    color: var(--color-text-muted);
}

/* DataTables specific */
.dt-center {
    text-align: center;
}

/* Input fields - universal styling */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    background-color: white;
    font-size: 14px;
    color: var(--color-primary-dark);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: var(--shadow-focus);
    background-color: white;
}

/* Table styling */
table {
    width: 100%;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

/* Button styling */
button,
.btn {
    background-color: var(--color-primary-pink);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
    background-color: var(--color-secondary-teal);
}

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

.propose-change {
    background-color: var(--color-primary-blue);
    padding: 8px 16px;
    font-size: 13px;
}

.propose-change:hover {
    background-color: var(--color-secondary-teal);
}

/* Form sections */
section {
    margin-bottom: 32px;
    padding: 28px;
    background-color: var(--color-bg-light);
    border-radius: var(--radius-2xl);
    border-left: 4px solid var(--color-primary-blue);
}

section h2 {
    color: var(--color-primary-dark);
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Dropdowns */
select {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    padding-right: 40px;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    background-color: white;
    font-size: 15px;
    color: var(--color-primary-dark);
    font-weight: 500;
    text-align: left;
    direction: ltr;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: var(--shadow-focus);
    background-color: white;
}

.dropdown-container {
    margin-bottom: 15px;
}

/* Confidence Assessment */
.assessment-step {
    margin-bottom: 28px;
    padding: 24px;
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.assessment-step h4 {
    margin-bottom: 15px;
    color: var(--color-text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-option {
    padding: 12px 20px;
    border: 2px solid var(--color-border-light);
    background-color: var(--color-bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-primary-dark);
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

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

.btn-option.selected {
    background-color: var(--color-primary-blue);
    color: white;
    border-color: var(--color-primary-blue);
}

.btn-option:active {
    transform: scale(0.97);
}

/* Tooltips */
.tooltip {
    display: inline-block;
    position: relative;
    cursor: help;
    color: #6366f1;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background-color: #e0e7ff;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 130%;
    transform: translateX(-50%);
    background: var(--color-text-dark);
    color: #fff;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-size: 13px;
    white-space: pre-line;
    max-width: 400px;
    min-width: 250px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    line-height: 1.4;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Buttons */
button, .btn {
    background-color: var(--color-primary-pink);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    text-decoration: none;
    min-width: 120px;
    text-align: center;
}

button:hover, .btn:hover {
    background-color: var(--color-secondary-teal);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--color-primary-pink) 0%, var(--color-secondary-magenta) 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--color-secondary-teal) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 90, 108, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-teal-accent) 0%, var(--color-secondary-teal) 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--color-secondary-teal) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(69, 166, 178, 0.4);
}

/* Messages */
#message {
    padding: var(--spacing-lg) 20px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    font-weight: 500;
    display: none;
}

#message:not(:empty) {
    display: block;
}

/* Existing entries table */
.existing-entries-container {
    margin: 20px 0;
    padding: var(--spacing-2xl);
    background: var(--color-bg-gray);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
}

/* Mapping preview styles */
.mapping-preview {
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.preview-section {
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary-blue);
}

.preview-section h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--color-primary-dark);
    font-size: 1.1em;
    font-weight: 600;
}

.preview-section p {
    margin: 8px 0;
    font-size: 14px;
}

.preview-section strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

@media (min-width: 768px) {
    .mapping-preview {
        grid-template-columns: 1fr 1fr;
    }
}

.existing-entries-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.existing-entries-table th,
.existing-entries-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.existing-entries-table th {
    background-color: var(--color-bg-light);
    font-weight: 600;
    color: var(--color-text-medium);
}

.existing-entries-table tbody tr:hover {
    background-color: var(--color-bg-light);
}

.confirmation-section {
    margin-top: 20px;
    text-align: center;
}

.confirmation-section p {
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--color-text-medium);
}

.confirmation-section button {
    margin: 0 10px;
}

/* Results section */
#step-3-result {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left-color: #0ea5e9;
}

#step-3-result p {
    margin: 10px 0;
    font-weight: 500;
}

#auto-confidence,
#auto-connection {
    color: var(--color-primary-blue);
    font-weight: 600;
}

/* Details/summary styling */
details {
    margin: 15px 0;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text-medium);
    padding: 5px 0;
}

summary:hover {
    color: var(--color-primary-blue);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: var(--spacing-2xl);
        border-radius: var(--radius-xl);
    }

    section {
        padding: var(--spacing-2xl);
        margin-bottom: 24px;
    }

    .btn-group {
        justify-content: center;
        gap: 8px;
    }

    .btn-option {
        padding: 10px 16px;
        font-size: 13px;
        min-width: auto;
    }

    .existing-entries-table {
        font-size: 13px;
    }

    .existing-entries-table th,
    .existing-entries-table td {
        padding: 6px;
    }

    .confirmation-section button {
        display: block;
        width: 100%;
        margin: 8px 0;
    }

    select {
        padding: var(--spacing-md) var(--spacing-xl);
        padding-right: 40px;
        font-size: 14px;
    }

    .tooltip::after {
        max-width: 280px;
        min-width: 200px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: var(--spacing-xl);
    }

    section h2 {
        font-size: 1.3em;
    }

    .btn-option {
        padding: 8px 12px;
        font-size: 12px;
    }

    button, .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary-blue);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Common utility classes for JavaScript-generated content */
.loading-container {
    text-align: center;
    padding: 30px;
    background-color: var(--color-bg-lighter);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.loading-title {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: var(--color-primary-dark);
}

.loading-subtitle {
    margin-bottom: 15px;
    color: var(--color-text-muted);
}

.loading-progress {
    margin-top: 15px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.confirmation-section {
    text-align: center;
    margin: 25px 0;
    padding: var(--spacing-2xl);
    background-color: var(--color-bg-lighter);
    border-radius: var(--radius-lg);
}

.confirmation-title {
    font-size: 16px;
    margin-bottom: 15px;
}

.confirmation-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-success-custom {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 10px;
}

.btn-secondary-custom {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.preview-section-ke {
    background-color: #f0f8ff;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary-blue);
    min-width: 0;
    word-wrap: break-word;
}

.preview-section-wp {
    background-color: #f0fff0;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary-pink);
    min-width: 0;
    word-wrap: break-word;
}

.preview-section-metadata {
    background-color: #fff8f0;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-secondary-orange);
    margin: 20px 0;
}

.preview-header-ke {
    color: var(--color-primary-blue);
    margin-top: 0;
}

.preview-header-wp {
    color: var(--color-primary-pink);
    margin-top: 0;
}

.preview-header-metadata {
    color: var(--color-secondary-orange);
    margin-top: 0;
}

.grid-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pathway-assessment-container {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    margin-bottom: 20px;
    background: #fefefe;
}

.assessment-result {
    margin-top: 15px;
    padding: 10px;
    background: var(--color-bg-lighter);
    border-radius: var(--radius-sm);
    display: none;
}

.suggestion-panel-container {
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-lighter);
    padding: var(--spacing-lg);
    margin: 10px 0;
    border-radius: var(--radius-sm);
}

.success-message-custom {
    text-align: center;
    margin-bottom: 20px;
}

.mapping-details-container {
    background-color: var(--color-bg-lighter);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: 10px 0;
}

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

.text-muted {
    color: var(--color-text-muted);
}

.pathway-thumbnail {
    width: 140px;
    height: 120px;
    border: 1px solid var(--color-border-gray);
    border-radius: 6px;
    background: var(--color-bg-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.search-loading {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--color-text-muted);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.assessment-step {
    animation: fadeIn 0.3s ease-out;
}

/* Method Filter Buttons */
.method-filter-btn:hover {
    background: var(--color-secondary-light-blue) !important;
    color: var(--color-primary-dark) !important;
    border-color: var(--color-secondary-light-blue) !important;
}

.method-filter-btn.active {
    background: var(--color-primary-blue) !important;
    color: white !important;
    border-color: var(--color-primary-blue) !important;
    font-weight: bold !important;
}

/* Quality Tier Badges for Pathway Suggestions */
.quality-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quality-badge.excellent {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quality-badge.good {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.quality-badge.moderate {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Focus states for accessibility */
button:focus,
select:focus,
.btn-option:focus {
    outline: 3px solid var(--color-primary-blue);
    outline-offset: 3px;
}

button:focus:not(:focus-visible),
select:focus:not(:focus-visible),
.btn-option:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-option {
        border-width: 3px;
    }
    
    .btn-option.selected {
        border-width: 4px;
    }
    
    button, .btn {
        border: 2px solid transparent;
    }
    
    button:hover, .btn:hover {
        border-color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Suggestion list collapse/expand */
.suggestion-item-hidden {
    display: none;
}

/* Step 2 Sub-tabs (#96) */
.step2-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border-light);
}

.step2-subtab {
    padding: 10px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--color-text-gray);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    min-width: auto;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.step2-subtab:hover {
    color: var(--color-primary-blue);
    background: rgba(48, 123, 191, 0.05);
}

.step2-subtab.active {
    color: var(--color-primary-blue);
    border-bottom-color: var(--color-primary-blue);
    background: transparent;
}

.step2-panel {
    min-height: 60px;
}

#selected-pathway-banner {
    padding: 12px 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: var(--radius-lg);
    margin-top: 12px;
    font-weight: 500;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#selected-pathway-banner .banner-dismiss {
    background: none;
    border: none;
    color: #155724;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    min-width: auto;
    line-height: 1;
}

/* KE Context Panel (#99) */
.ke-context-panel {
    margin-top: 12px;
    padding: 16px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-left: 4px solid var(--color-primary-blue);
    border-radius: var(--radius-lg);
}

.ke-context-panel .context-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.ke-context-panel .context-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text-medium);
}

.ke-context-panel .context-badge strong {
    color: var(--color-primary-dark);
}

.ke-context-panel details {
    margin: 8px 0 0 0;
    padding: 10px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.ke-context-panel details summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-medium);
    padding: 2px 0;
}

.ke-context-panel .context-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}

.ke-context-panel .context-table th,
.ke-context-panel .context-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.ke-context-panel .context-table th {
    background: var(--color-bg-light);
    font-weight: 600;
    color: var(--color-text-medium);
}

/* KE-01: Context panel title (prominent KE title in summary) */
.ke-context-panel > summary.ke-context-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ke-context-panel > summary.ke-context-title::marker,
.ke-context-panel > summary.ke-context-title::-webkit-details-marker {
    display: none;
}

.ke-context-panel > summary.ke-context-title::before {
    content: '\25BE';
    font-size: 12px;
    color: var(--color-primary-blue);
    transition: transform 0.15s;
}

.ke-context-panel:not([open]) > summary.ke-context-title::before {
    content: '\25B8';
}

/* EXPLO-01/02: Active filter chips above explore table */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
    margin-bottom: 12px;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 12px;
    background: #e8f2fc;
    border: 1px solid var(--color-primary-blue);
    border-radius: 9999px;
    font-size: var(--font-size-xs);
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.filter-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary-blue);
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    font-weight: bold;
}

.filter-chip-remove:hover {
    color: var(--color-primary-dark);
}

.filter-chips-clear {
    font-size: var(--font-size-xs);
    color: var(--color-primary-blue);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

/* Assessment Info Cards (#103) */
.assessment-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.assessment-info-card {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.assessment-info-card.ke-card {
    background: #f0f8ff;
    border-left: 4px solid var(--color-primary-blue);
}

.assessment-info-card.pw-card {
    background: #f0fff0;
    border-left: 4px solid var(--color-primary-pink);
}

.assessment-info-card h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assessment-info-card.ke-card h4 {
    color: var(--color-primary-blue);
}

.assessment-info-card.pw-card h4 {
    color: var(--color-primary-pink);
}

.assessment-info-card p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--color-text-medium);
}

.assessment-info-card a {
    color: var(--color-primary-blue);
    font-size: 12px;
    text-decoration: none;
}

.assessment-info-card a:hover {
    text-decoration: underline;
}

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

/* Assessment Step Collapsed (#103) */
.assessment-step-collapsed {
    padding: 10px 16px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.assessment-step-collapsed .collapsed-summary {
    font-size: 14px;
    color: var(--color-text-medium);
}

.assessment-step-collapsed .collapsed-summary strong {
    color: var(--color-primary-dark);
}

.assessment-step-collapsed .collapsed-edit-btn {
    background: none;
    border: 1px solid var(--color-primary-blue);
    color: var(--color-primary-blue);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    min-width: auto;
    font-weight: 500;
}

.assessment-step-collapsed .collapsed-edit-btn:hover {
    background: var(--color-primary-blue);
    color: white;
}

/* Assessment button card-style icons */
.assessment-step .btn-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.assessment-step .btn-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
}

.btn-option-icon {
    display: block;
    max-height: 50px;
    max-width: 100%;
    margin-bottom: 8px;
    object-fit: contain;
}

.btn-option-label {
    font-size: 13px;
    line-height: 1.3;
}

.btn-option-icon,
.btn-option-label {
    pointer-events: none;
}

@media (max-width: 768px) {
    .assessment-step .btn-option {
        flex: 1 1 calc(50% - 12px);
    }
}

/* Collapsible step headers */
.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible::after {
    content: ' \25BE';
    font-size: 14px;
}

.collapsible.collapsed::after {
    content: ' \25B8';
}

.step-summary {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted, #6b7280);
    margin-left: 4px;
}

/* KE Biological Level Badge */
.ke-biolevel-badge {
    display: inline-block;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
}

/* ============================================================
   Phase 8 Utility Classes
   ============================================================ */

/* Status Badges (BRAND-03) */
.badge-status-high { background-color: var(--color-status-high); color: white; padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: var(--font-size-xs); }
.badge-status-medium { background-color: var(--color-status-medium); color: #212529; padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: var(--font-size-xs); }
.badge-status-low { background-color: var(--color-status-low); color: white; padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: var(--font-size-xs); }

/* Method Badges */
.badge-method-gene,
.badge-method-semantic,
.badge-method-text,
.badge-method-ontology {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}
.badge-method-gene { background-color: var(--color-method-gene); }
.badge-method-semantic { background-color: var(--color-method-semantic); }
.badge-method-text { background-color: var(--color-method-text); }
.badge-method-ontology { background-color: var(--color-method-ontology); }

/* Modal / Overlay */
.modal-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: var(--z-modal); background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 25px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: var(--z-modal-overlay); }

/* Login Modal */
.login-modal { display: flex; align-items: center; justify-content: center; }
.login-modal__panel { position: relative; width: 340px; max-width: 90vw; padding: 32px; text-align: center; top: auto; left: auto; transform: none; }
.login-modal__close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text-muted); }
.login-modal__close:hover { color: var(--color-text-primary); }
.login-modal__title { margin: 0 0 24px; font-size: 1.25rem; font-weight: 600; }
.login-modal__providers { display: flex; flex-direction: column; gap: 10px; }
.login-modal__divider { margin: 20px 0; border: none; border-top: 1px solid var(--color-border-light); }
.login-modal__guest-form { display: flex; gap: 8px; }
.login-modal__guest-input { flex: 1; padding: 8px 12px; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); font-size: 0.875rem; }
.login-modal__guest-btn { padding: 8px 16px; background: var(--color-primary-dark); color: white; border: none; border-radius: var(--radius-md); font-size: 0.875rem; cursor: pointer; white-space: nowrap; }
.login-modal__guest-btn:hover { opacity: 0.9; }

/* Provider Buttons */
.btn-provider { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 500; text-decoration: none; color: white; transition: opacity 0.15s; }
.btn-provider:hover { opacity: 0.9; text-decoration: none; color: white; }
.btn-provider__icon { flex-shrink: 0; }
.btn-provider--github { background: #24292e; }
.btn-provider--orcid { background: #A6CE39; color: #fff; }
.btn-provider--ls { background: #2B579A; }
.btn-provider--surf { background: #0077C8; }

/* WikiPathways embed viewer */
.wp-explore-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-modal);
    width: 70vw;
    height: 70vh;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.wp-explore-modal.is-visible {
    display: flex;
}
.wp-explore-modal__header {
    padding: var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--color-bg-lighter);
}
.wp-explore-modal__header-info {
    flex: 1;
    min-width: 0;
}
.wp-explore-modal__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wp-explore-modal__meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.wp-explore-modal__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 8px);
    flex-shrink: 0;
}
.wp-explore-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    color: var(--color-text-muted);
}
.wp-explore-modal__close:hover {
    color: var(--color-text-dark);
}
.wp-explore-modal__body {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.wp-embed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--color-text-muted);
}
.wp-embed-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    color: var(--color-text-muted);
}
.wp-embed-error a {
    color: var(--color-primary-blue);
}
.wp-preview-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    vertical-align: middle;
    color: var(--color-primary-blue);
    opacity: 0.7;
    transition: opacity 0.15s;
}
.wp-preview-btn:hover {
    opacity: 1;
}
.wp-preview-btn svg {
    display: inline-block;
    vertical-align: middle;
}

/* WikiPathways mapping modal */
.wp-mapping-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-modal);
    width: 70vw;
    height: 70vh;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.wp-mapping-modal.is-visible {
    display: flex;
}
.wp-mapping-modal__body {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.wp-mapping-modal__genes {
    padding: 8px var(--spacing-xl);
    border-top: 1px solid var(--color-border-light);
    font-size: 12px;
    color: var(--color-text-muted);
    max-height: 60px;
    overflow-y: auto;
    flex-shrink: 0;
    background: var(--color-bg-lighter);
}
.wp-mapping-modal__genes strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.wp-gene-list {
    display: inline;
    word-break: break-word;
}

/* Outlined Panel */
.panel-outlined { background: white; border: 1px solid var(--color-border-light); border-radius: var(--radius-lg); padding: var(--spacing-2xl); }

/* Form Element Resets (sharp + minimal) */
input, select, textarea, button { font-family: var(--font-family-base); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select { border: 1px solid var(--color-border-light); border-radius: 0; padding: 8px 10px; font-size: var(--font-size-sm); }

/* Primary CTA Button */
.btn-primary { background-color: var(--color-primary-pink); color: white; border: none; border-radius: 0; padding: 10px 20px; font-weight: 600; font-size: var(--font-size-sm); cursor: pointer; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.9; }

/* Link Color Override */
a { color: var(--color-primary-blue); }
a:hover { color: var(--color-secondary-teal); }

/* Score Bar Fill */
.score-bar-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }

/* Select2 Overrides (sharp + minimal) */
.select2-container--default .select2-selection--single { border: 1px solid var(--color-border-light); border-radius: 0; height: 38px; background-color: white; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; color: var(--color-primary-dark); padding-left: 10px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
.select2-container--default.select2-container--focus .select2-selection--single { border-color: var(--color-primary-blue); box-shadow: var(--shadow-focus); }
.select2-dropdown { border: 1px solid var(--color-border-light); border-radius: 0; z-index: var(--z-dropdown); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--color-primary-blue); }

/* DataTable Header Overrides */
table.dataTable thead th { background-color: var(--color-primary-dark); color: white; font-weight: 600; font-size: var(--font-size-sm); padding: 10px 12px; border-bottom: 2px solid var(--color-primary-dark); }
table.dataTable tbody tr:nth-child(even) { background-color: var(--color-bg-light); }
table.dataTable tbody tr:hover { background-color: #e8f0fe; }
table.dataTable tbody td { padding: 8px 12px; font-size: var(--font-size-sm); border-bottom: 1px solid var(--color-border-light); }

/* Text Utility */
.text-muted-italic { color: var(--color-text-muted); font-style: italic; }

/* ============================================================
   Phase 8-03: Tab Buttons
   ============================================================ */
.tab-switcher {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--color-primary-blue);
}

.tab-btn {
    padding: 12px 24px;
    border: 1px solid var(--color-border-light);
    border-bottom: none;
    background: var(--color-bg-gray);
    color: var(--color-text-medium);
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    border-radius: 0;
    margin-right: 4px;
    min-width: auto;
}

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

.tab-btn:hover:not(.active) {
    background: var(--color-border-light);
}

/* Confidence Filter Buttons */
.conf-filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--color-primary-blue);
    background: white;
    color: var(--color-primary-blue);
    cursor: pointer;
    font-size: 13px;
    border-radius: 0;
    min-width: auto;
}

.conf-filter-btn.active {
    background: var(--color-primary-blue);
    color: white;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border-light);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 350px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Thank You Modal */
.thank-you-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    justify-content: center;
    align-items: center;
}

.thank-you-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}

.thank-you-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-muted);
    line-height: 1;
    min-width: auto;
    padding: 0;
}

.thank-you-check {
    font-size: 60px;
    color: var(--color-status-high);
    margin-bottom: 20px;
}

.thank-you-title {
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

.thank-you-message {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 25px;
}

.thank-you-summary {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.thank-you-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Form Label */
.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-primary-dark);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 5px;
}

/* Stat Card */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 20px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-card--blue { border-top: 4px solid var(--color-primary-blue); }
.stat-card--teal { border-top: 4px solid var(--color-teal-accent); }
.stat-card--dark { border-top: 4px solid var(--color-primary-dark); }

.stat-card__value {
    font-size: 36px;
    font-weight: 700;
}

.stat-card--blue .stat-card__value { color: var(--color-primary-blue); }
.stat-card--teal .stat-card__value { color: var(--color-teal-accent); }
.stat-card--dark .stat-card__value { color: var(--color-primary-dark); }

.stat-card__label {
    font-size: var(--font-size-sm);
    color: var(--color-text-gray);
    margin-top: 4px;
}

/* Download Card */
.download-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.download-card {
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.download-card--blue { border-top: 4px solid var(--color-primary-blue); }
.download-card--teal { border-top: 4px solid var(--color-teal-accent); }
.download-card--dark { border-top: 4px solid var(--color-primary-dark); }

.download-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.download-card__title {
    font-size: 16px;
    margin: 0;
    color: var(--color-primary-dark);
}

.download-card__badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.download-card__badge--blue { background: #e8f0fb; color: var(--color-primary-blue); }
.download-card__badge--teal { background: #e5f5f6; color: var(--color-teal-accent); }
.download-card__badge--dark { background: #edeaf5; color: var(--color-primary-dark); }

.download-card__desc {
    font-size: 13px;
    color: var(--color-text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.download-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Button link (styled <a> as button) */
.btn-link-blue {
    background: var(--color-primary-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 0;
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: inline-block;
    font-weight: 600;
}

.btn-link-blue:hover { opacity: 0.9; color: white; }

.btn-link-teal {
    background: var(--color-teal-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 0;
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: inline-block;
    font-weight: 600;
}

.btn-link-teal:hover { opacity: 0.9; color: white; }

.btn-link-dark {
    background: var(--color-primary-dark);
    color: white;
    padding: 8px 16px;
    border-radius: 0;
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: inline-block;
    font-weight: 600;
}

.btn-link-dark:hover { opacity: 0.9; color: white; }

.btn-link-outline-blue {
    background: white;
    color: var(--color-primary-blue);
    border: 2px solid var(--color-primary-blue);
    padding: 8px 18px;
    border-radius: 0;
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: inline-block;
    font-weight: 600;
}

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

/* Info Banner */
.info-banner {
    background: var(--color-bg-light);
    border: 1px solid var(--color-primary-blue);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 28px;
    font-size: var(--font-size-sm);
    color: var(--color-primary-dark);
}

/* Warning Banner */
.warning-banner {
    background: #fffbeb;
    border: 1px solid var(--color-status-medium);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: var(--font-size-xs);
    color: #78350f;
}

/* Coverage Indicator */
.coverage-indicator {
    display: none;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-primary-blue);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* Clear Button (secondary) */
.btn-clear {
    background: var(--color-text-gray);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 0;
    cursor: pointer;
    font-size: var(--font-size-sm);
    min-width: auto;
}

/* Admin Header Banner */
.admin-header-banner {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--color-secondary-orange) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.admin-header-banner h2 {
    margin: 0;
    color: white;
}

/* Confidence Classes (from scoring-guide.html) */
.confidence-high { color: var(--color-status-high); font-weight: 600; }
.confidence-medium { color: var(--color-status-medium); font-weight: 600; }
.confidence-low { color: var(--color-status-low); font-weight: 600; }

/* Danger Button */
.btn-danger { background-color: var(--color-status-low); color: white; border: none; border-radius: 0; padding: 10px 20px; font-weight: 600; cursor: pointer; }
.btn-danger:hover { opacity: 0.9; }

/* Map Link (inline in gap tables) */
.btn-map-link {
    padding: 4px 10px;
    background: var(--color-primary-blue);
    color: white;
    border-radius: 0;
    text-decoration: none;
    font-size: var(--font-size-xs);
}

.btn-map-link:hover { opacity: 0.9; color: white; }

/* Login Warning */
.login-warning {
    color: var(--color-status-low);
    font-weight: bold;
}

/* ============================================================
   Admin Panel Classes (proposals, guest codes)
   ============================================================ */

/* Proposal Actions */
.proposal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.proposal-actions button { padding: 6px 12px; font-size: 12px; min-width: 80px; }

.btn-approve { background-color: var(--color-status-high); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.btn-approve:hover { opacity: 0.85; }
.btn-reject { background-color: var(--color-status-low); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.btn-reject:hover { opacity: 0.85; }
.btn-view { background-color: var(--color-teal-accent); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.btn-view:hover { opacity: 0.85; }

/* Proposal Status */
.status-pending { color: var(--color-secondary-orange); font-weight: bold; }
.status-approved { color: var(--color-status-high); font-weight: bold; }
.status-rejected { color: var(--color-status-low); font-weight: bold; }
.status-active { color: var(--color-status-high); font-weight: bold; }
.status-expired { color: var(--color-text-gray); font-weight: bold; }
.status-revoked { color: var(--color-status-low); font-weight: bold; }
.status-exhausted { color: var(--color-secondary-orange); font-weight: bold; }

.proposal-detail { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* Filter Section */
.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

/* Guest Code Admin */
.create-form {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 25px;
}
.create-form h3 { margin-top: 0; color: var(--color-primary-dark); }

.form-row { display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-weight: bold; font-size: var(--font-size-xs); color: var(--color-primary-dark); }
.form-group input, .form-group select { padding: 8px 12px; border: 1px solid var(--color-border-light); border-radius: var(--radius-sm); font-size: var(--font-size-sm); }

.btn-create { background: var(--color-status-high); color: white; border: none; padding: 9px 20px; border-radius: var(--radius-sm); font-size: var(--font-size-sm); font-weight: bold; cursor: pointer; }
.btn-create:hover { opacity: 0.85; }

.btn-revoke { background: var(--color-status-low); color: white; border: none; padding: 5px 12px; border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; min-width: auto; }
.btn-revoke:hover { opacity: 0.85; }

.code-display { font-family: monospace; font-size: var(--font-size-xs); color: var(--color-text-muted); }

.code-reveal-modal .generated-code {
    font-family: monospace;
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary-blue);
    background: #e8f0fb;
    padding: 15px;
    border-radius: var(--radius-lg);
    margin: 15px 0;
    letter-spacing: 2px;
    user-select: all;
}

.btn-copy { background: var(--color-primary-blue); color: white; border: none; padding: 8px 20px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--font-size-sm); min-width: auto; }
.btn-copy:hover { opacity: 0.85; }
.btn-close-modal { background: var(--color-text-gray); color: white; border: none; padding: 8px 20px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--font-size-sm); margin-left: 10px; min-width: auto; }
.btn-close-modal:hover { opacity: 0.85; }

/* Detail Table (mapping_detail) */
.detail-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.detail-table__th { text-align: left; padding: 8px 12px; background: var(--color-bg-light); width: 220px; border: 1px solid var(--color-border-light); font-weight: 600; }
.detail-table__td { padding: 8px 12px; border: 1px solid var(--color-border-light); }

/* Guest Login */
.guest-login-container {
    max-width: 420px;
    margin: 80px auto;
    padding: 40px;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    text-align: center;
}
.guest-login-container h2 { color: var(--color-primary-dark); margin-bottom: 10px; }
.guest-login-container p { color: var(--color-text-muted); margin-bottom: 25px; font-size: var(--font-size-sm); }
.guest-login-container input[type="text"] { text-align: center; letter-spacing: 2px; }
.guest-login-container input[type="text"]:focus { border-color: var(--color-primary-blue); }
.guest-login-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.guest-login-container button[type="submit"]:hover { opacity: 0.9; }
.guest-login-container .error-message {
    color: var(--color-status-low);
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    background: #fdf0f0;
    border-radius: var(--radius-md);
}
.alt-login { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--color-border-light); font-size: var(--font-size-sm); color: var(--color-text-muted); }
.alt-login a { color: var(--color-primary-blue); text-decoration: none; font-weight: bold; }
.alt-login a:hover { text-decoration: underline; }

/* Error Page */
.error-page-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
}
.error-page-icon { font-size: 64px; color: var(--color-status-low); margin-bottom: 20px; }
.error-page-message { font-size: 18px; color: var(--color-primary-dark); margin-bottom: 30px; line-height: 1.6; }
.error-page-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Phase 8-04: JS-Generated Element Classes
   Replaces inline color/background/z-index styles in main.js
   ============================================================ */

/* GO suggestion selected state */
.go-suggestion-item--selected {
    border-left-color: var(--color-primary-blue) !important;
    background: #f0f7ff !important;
}

/* Spinner Utility Classes */
.spinner { display: inline-block; border-radius: 50%; animation: spin 1s linear infinite; }
.spinner--lg { width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top-color: var(--color-primary-blue); }
.spinner--md { width: 24px; height: 24px; border: 3px solid #f3f3f3; border-top-color: var(--color-primary-blue); }
.spinner--sm { width: 20px; height: 20px; border: 2px solid #f3f3f3; border-top-color: var(--color-primary-blue); }
.spinner--xs { width: 16px; height: 16px; border: 2px solid #f3f3f3; border-top-color: var(--color-primary-blue); }

/* Gene info panel (light blue info box in suggestions) */
.gene-info-panel {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 14px;
}

/* Suggestion item (WP suggestion cards) */
.suggestion-item {
    margin-bottom: 15px;
    padding: 12px;
    background-color: white;
    border: 1px solid var(--color-border-gray);
    border-left-width: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.suggestion-item--gene { border-left-color: var(--color-status-high); }
.suggestion-item--semantic { border-left-color: var(--color-method-semantic); }
.suggestion-item--gene-semantic { border-left-color: var(--color-secondary-purple); }
.suggestion-item--multi-match { border-left-color: var(--color-secondary-magenta); }
.suggestion-item--other { border-left-color: var(--color-teal-accent); }

/* Score Bar Fill Variants (by method) */
.score-bar-fill--gene { background-color: var(--color-method-gene); }
.score-bar-fill--semantic { background-color: var(--color-method-semantic); }
.score-bar-fill--text { background-color: var(--color-method-text); }
.score-bar-fill--ontology { background-color: var(--color-method-ontology); }
.score-bar-fill--combined { background-color: var(--color-primary-blue); }
.score-bar-fill--high { background-color: var(--color-status-high); }
.score-bar-fill--medium { background-color: var(--color-status-medium); }
.score-bar-fill--low { background-color: var(--color-status-low); }

/* Score Bar Track (background container) */
.score-bar-track {
    width: 60px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.score-bar-track--sm {
    width: 50px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

/* Confidence Bar (box display with colored border/bg) */
.confidence-bar-box {
    width: 80px;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.confidence-bar-box--high {
    background-color: #e6ffe6;
    border: 1px solid var(--color-status-high);
}
.confidence-bar-box--medium {
    background-color: #fffde6;
    border: 1px solid var(--color-status-medium);
}
.confidence-bar-box--low {
    background-color: #ffe6e6;
    border: 1px solid var(--color-status-low);
}

.confidence-bar-track {
    width: 100%;
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 4px;
    border: 1px solid #ddd;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}
.confidence-bar-fill--high { background: linear-gradient(135deg, var(--color-status-high), #20c157); }
.confidence-bar-fill--medium { background: linear-gradient(135deg, var(--color-status-medium), #e8ad00); }
.confidence-bar-fill--low { background: linear-gradient(135deg, var(--color-status-low), #c82333); }

.confidence-bar-value {
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}
.confidence-bar-value--high { color: var(--color-status-high); }
.confidence-bar-value--medium { color: #856404; }
.confidence-bar-value--low { color: var(--color-status-low); }

/* Biolevel Badge Per-Level */
.ke-biolevel-badge--molecular { background-color: var(--color-primary-blue); }
.ke-biolevel-badge--cellular { background-color: var(--color-teal-accent); }
.ke-biolevel-badge--tissue { background-color: var(--color-secondary-teal); }
.ke-biolevel-badge--organ { background-color: var(--color-secondary-purple); }
.ke-biolevel-badge--individual { background-color: var(--color-secondary-orange); }
.ke-biolevel-badge--population { background-color: var(--color-secondary-magenta); }

/* Method score detail panels (inside suggestion items) */
.method-detail--gene {
    font-size: 11px;
    color: #155724;
    margin-bottom: 4px;
    padding: 4px;
    background: #d4edda;
    border-radius: 3px;
}
.method-detail--semantic {
    font-size: 11px;
    color: #6a1b9a;
    margin-bottom: 4px;
    padding: 4px;
    background: #f3e5f5;
    border-radius: 3px;
}
.method-detail--gene-sm {
    font-size: 11px;
    color: #155724;
    margin-top: 8px;
    padding: 6px;
    background: #d4edda;
    border-radius: 3px;
}
.method-detail--semantic-sm {
    font-size: 11px;
    color: #6a1b9a;
    margin-top: 8px;
    padding: 6px;
    background: #f3e5f5;
    border-radius: 3px;
}

/* Match type inline scores (GO suggestions) */
.score-detail--semantic-inline {
    font-size: 11px;
    color: #6a1b9a;
    padding: 3px 6px;
    background: #f3e5f5;
    border-radius: 3px;
    display: inline-block;
    margin-right: 6px;
}
.score-detail--definition-inline {
    font-size: 11px;
    color: #7b1fa2;
    padding: 3px 6px;
    background: #ede7f6;
    border-radius: 3px;
    display: inline-block;
    margin-right: 6px;
}
.score-detail--gene-inline {
    font-size: 11px;
    color: #155724;
    padding: 3px 6px;
    background: #d4edda;
    border-radius: 3px;
    display: inline-block;
    margin-right: 6px;
}

/* GO match badge (small inline) */
.badge-match--semantic {
    background: var(--color-method-semantic);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}
.badge-match--gene {
    background: var(--color-method-gene);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}
.badge-match--depth {
    background: var(--color-bg-muted, #f0f0f0);
    color: var(--color-text-muted, #666);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

/* Direction badges for GO suggestion cards and KE title area */
.badge-direction {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: var(--radius-full, 50px);
    font-size: 10px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}
.badge-direction--positive {
    background-color: var(--color-status-high);
}
.badge-direction--negative {
    background-color: var(--color-status-low);
}
.badge-direction-align {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.badge-direction-align--match {
    color: var(--color-status-high);
}
.badge-direction-align--mismatch {
    color: var(--color-status-low);
}
.badge-direction-ke {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: var(--radius-full, 50px);
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 6px;
}

/* Ontology tag chip */
.ontology-tag-chip {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--color-bg-light);
    color: var(--color-method-gene);
    border: 1px solid var(--color-border-light);
    border-radius: 3px;
    white-space: nowrap;
}

/* Confirmation Dialog Overlay */
.confirmation-dialog {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirmation-dialog__panel {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}
.confirmation-dialog__skipped {
    border: 1px solid #f8d7da;
    background: #f8d7da;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}
.confirmation-dialog__skipped h4 { margin: 0 0 8px 0; color: #721c24; }
.confirmation-dialog__skipped p { margin: 0; color: #721c24; }

/* Pathway Preview Modal */
.pathway-preview-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: var(--z-graph-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.pathway-preview-modal__panel {
    background: white;
    border-radius: 12px;
    width: 95vw;
    max-width: 1400px;
    height: 95vh;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.pathway-preview-modal__header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-lighter);
    border-radius: 8px 8px 0 0;
}
.pathway-preview-modal__close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    min-width: auto;
}
.pathway-preview-modal__close:hover { background: #e9ecef; }
.pathway-preview-modal__body {
    padding: 20px;
    overflow: auto;
    flex: 1;
    max-height: calc(95vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pathway-preview-modal__svg-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    border: 1px solid var(--color-border-gray);
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    position: relative;
    min-height: 300px;
    max-height: calc(95vh - 200px);
    overflow: hidden;
}

/* Method Filter Buttons (WP suggestions) */
.method-filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--color-primary-blue);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    transition: all 0.2s;
}
.method-filter-btn--active {
    background: var(--color-primary-blue);
    color: white;
}
.method-filter-btn--inactive {
    background: white;
    color: var(--color-primary-blue);
}

/* GO Suggestion Item */
.go-suggestion-item {
    margin-bottom: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.go-suggestion-item--high { border-left: 4px solid var(--color-status-high); }
.go-suggestion-item--medium { border-left: 4px solid var(--color-status-medium); }
.go-suggestion-item--low { border-left: 4px solid var(--color-status-low); }

/* Pagination Buttons */
.pagination-btn {
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.pagination-btn--active {
    border: 1px solid var(--color-primary-blue);
    background: white;
    color: var(--color-primary-blue);
}
.pagination-btn--disabled {
    border: 1px solid #ccc;
    background: #f0f0f0;
    color: #999;
    cursor: default;
}

/* Search Result Item */
.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    transition: background 0.15s;
}
.search-result-item:hover,
.search-result-item.active {
    background: var(--color-bg-lighter);
}
.search-result-item::after {
    content: 'Select \2192';
    float: right;
    font-size: 11px;
    color: var(--color-primary-blue);
    opacity: 0;
    transition: opacity 0.15s;
}
.search-result-item:hover::after,
.search-result-item.active::after {
    opacity: 1;
}

/* Pathway preview button (in suggestion list) */
.pathway-preview-trigger {
    font-size: 11px;
    padding: 4px 8px;
    background: #e3f2fd;
    border: 1px solid var(--color-primary-blue);
    border-radius: 3px;
    color: var(--color-primary-blue);
    cursor: pointer;
    margin-top: 8px;
}

/* Show more suggestions button */
.show-more-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-primary-blue);
    color: var(--color-primary-blue);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

/* GO assessment result panel */
.go-assessment-result-panel {
    margin-top: 15px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border-left: 4px solid var(--color-primary-blue);
}

/* KE Info biolevel inline chip */
.biolevel-chip {
    background-color: #e3f2fd;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Metadata preview chip (orange/amber) */
.metadata-chip {
    background-color: #ffd7b5;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
}

/* Entry status new badge */
.entry-status-new { color: var(--color-status-high); font-weight: 600; }

/* Text color utilities */
.text-muted { color: var(--color-text-muted); }
.text-dark-heading { color: var(--color-primary-dark); }
.text-link-blue { color: var(--color-primary-blue); }
.text-subtle { color: #555; }
.text-small-muted { font-size: 12px; color: var(--color-text-muted); }
.text-xsmall-muted { font-size: 11px; color: var(--color-text-muted); font-style: italic; }

/* Gene Overlap Result Panel */
.gene-overlap-found {
    margin-top: 10px;
    padding: 8px 12px;
    background: #d4edda;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    font-size: 13px;
}
.gene-overlap-empty {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--color-bg-lighter);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}
.gene-overlap-loading {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--color-bg-lighter);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* GO assessment result wrapper */
.go-assessment-wrapper {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

/* Confirmation section (GO submit) */
.confirmation-section--warning {
    text-align: center;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
}

/* Preview section card */
.preview-section-card {
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: 15px;
    background: var(--color-bg-light);
}

/* Highlight (search match in text) */
mark.search-highlight {
    background-color: #fff3cd;
    padding: 1px 2px;
}