:root {
    --bg-dark: #0b0f19;
    --bg-card: #151c2c;
    --bg-card-hover: #1e283d;
    --border-color: #26334d;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --glass-bg: rgba(21, 28, 44, 0.75);
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) rgba(11, 15, 25, 0.6);
}

/* Global Modern Sleek Dark Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-text .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.nav-btn i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.badge-count {
    margin-left: auto;
    background: var(--warning);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 2px;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.nav-btn-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: left;
    display: block;
}

.badge-sub-mark {
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.1;
    text-transform: uppercase;
    display: inline-block;
    text-align: left;
    margin-top: 1px;
}

.badge-sub-mark.badge-admin {
    background: rgba(14, 165, 233, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-sub-mark.badge-superadmin {
    background: rgba(236, 72, 153, 0.16);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.38);
}

.badge-sub-mark.badge-superadmin-yolo {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.38);
}

/* Sidebar User Profile Card */
.sidebar-user-profile {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    margin-top: auto;
}

.sidebar-user-profile:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.sidebar-user-profile .user-avatar {
    font-size: 1.45rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-user-profile .user-meta-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.sidebar-user-profile .user-fullname {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-profile .user-role {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.sidebar-user-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-sidebar-user-action {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-sidebar-user-action.btn-sidebar-profile:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.btn-sidebar-user-action.btn-sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}


/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 32px;
    max-width: calc(100vw - 280px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.header-title h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.header-title .description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Tabs */
.tab-content {
    display: none;

    &.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }
}

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

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);

    h3 {
        font-family: 'Outfit', sans-serif;
        font-size: 1.1rem;
        font-weight: 600;
    }

    i {
        color: var(--primary);
    }
}

.space-between {
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;

    &.badge-info { background: rgba(59, 130, 246, 0.2); color: var(--primary); border: 1px solid var(--primary); }
}

/* Forms & Buttons */
.form-group {
    margin-bottom: 20px;

    label {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        margin-bottom: 8px;
        color: var(--text-main);
    }

    .help-text {
        display: block;
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-top: 6px;
    }
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-1 { flex: 1; }

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;

    i {
        position: absolute;
        left: 14px;
        color: var(--text-muted);
    }

    input {
        width: 100%;
        padding: 12px 14px 12px 42px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: #fff;
        font-size: 0.9rem;
        outline: none;
        transition: border 0.2s;

        &:focus {
            border-color: var(--primary);
        }
    }
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.model-info-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;

    h4 {
        font-size: 0.88rem;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--primary);
    }
}

.btn-group-scan {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;

    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
}

.btn-primary { background: var(--primary); color: #fff; &:hover:not(:disabled) { background: var(--primary-hover); } }
.btn-secondary { background: var(--bg-card-hover); color: var(--text-main); border: 1px solid var(--border-color); &:hover { background: #26334d; } }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 0.95rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px 12px; background: var(--bg-card-hover); color: #fff; border: 1px solid var(--border-color); }

/* Modal File Browser */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;

    &.show { display: flex; }
}

.modal-content {
    background: rgba(18, 24, 38, 0.96);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 16px;
    width: 580px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.12);
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-content.modal-content-lg {
    width: 620px;
    max-width: 92vw;
}

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

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);

    h3 {
        font-size: 1.15rem;
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #f8fafc;
        margin: 0;

        i {
            color: #3b82f6;
            width: 20px;
            height: 20px;
        }
    }
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;

    &:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Form Controls & Grids */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 580px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;

    i {
        width: 15px;
        height: 15px;
        color: #60a5fa;
    }
}

.req {
    color: #ef4444;
    font-weight: 700;
}

.form-control, .form-control-compact {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f8fafc;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;

    &:focus {
        border-color: #3b82f6;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    }

    &::placeholder {
        color: #64748b;
    }
}

input[type="date"].form-control,
input[type="date"].form-control-compact {
    color-scheme: dark;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 75px;
    line-height: 1.5;
}

.text-uppercase {
    text-transform: uppercase;
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.browser-breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
    word-break: break-all;
}

.browser-items-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 350px;
    overflow-y: auto;
}

.browser-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;

    &:hover, &.selected {
        background: var(--bg-card-hover);
        color: var(--primary);
    }

    i { color: var(--text-muted); }
    &.is-dir i { color: var(--warning); }
    &.is-pt i { color: var(--purple); }
}

.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.btn-save-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

/* Progress */
.progress-status-container {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    transition: width 0.3s ease;
}

.progress-stats {
    display: flex;
    gap: 16px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.species-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chip {
    background: var(--bg-card-hover);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);

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

/* Toolbar & Verification Workspace */
.toolbar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

/* Single-line sleek Verify Filter Toolbar */
.toolbar-card.verify-filter-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 14px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;

    .filter-group {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;

        label {
            font-size: 0.76rem;
            font-weight: 600;
            color: #94a3b8;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 5px;
            margin: 0;

            i {
                width: 14px;
                height: 14px;
                color: #60a5fa;
            }
        }

        select {
            height: 38px;
            width: 100%;
            background: var(--bg-dark);
            border: 1px solid var(--border-color);
            color: #f8fafc;
            padding: 0 10px;
            border-radius: 7px;
            font-size: 0.84rem;
            font-family: inherit;
            outline: none;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;

            &:focus {
                border-color: #3b82f6;
                box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
            }
        }
    }

    .conf-group {
        flex: 1.3 1 0;
        min-width: 220px;
    }

    .range-dual {
        display: flex;
        align-items: center;
        gap: 6px;
        height: 38px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 0 10px;

        span {
            font-size: 0.75rem;
            font-weight: 700;
            color: #60a5fa;
            font-family: monospace;
            min-width: 32px;
            text-align: center;
        }

        .range-sep {
            color: var(--text-muted);
            min-width: 8px;
            font-weight: 400;
        }

        input[type="range"] {
            flex: 1;
            height: 5px;
            border-radius: 999px;
            accent-color: #3b82f6;
            background: rgba(255, 255, 255, 0.15);
            padding: 0;
            margin: 0;
            border: none;
            cursor: pointer;
        }
    }

    .checkbox-filter-group {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-bottom: 0;

        .compact-checkbox-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            height: 38px;
            padding: 0 14px;
            background: rgba(30, 41, 59, 0.65);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 7px;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
            margin: 0;

            &:hover {
                background: rgba(59, 130, 246, 0.15);
                border-color: #3b82f6;
            }

            input[type="checkbox"] {
                width: 16px;
                height: 16px;
                margin: 0;
                accent-color: #3b82f6;
                cursor: pointer;
                border-radius: 4px;
            }

            .check-text {
                font-size: 0.82rem;
                font-weight: 600;
                color: #e2e8f0;
                user-select: none;
            }
        }
    }
}

/* Compact Custom Multi-Select Dropdown */
.custom-multi-dropdown-container {
    position: relative;
    width: 100%;
}

.multi-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;

    &:hover {
        border-color: var(--primary);
    }

    span {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .arrow-icon {
        color: var(--text-muted);
        transition: transform 0.2s;
    }
}

.custom-multi-dropdown-container.open .arrow-icon {
    transform: rotate(180deg);
}

.multi-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    z-index: 200;
}

.custom-multi-dropdown-container.open .multi-dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-header-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.dropdown-search {
    margin-bottom: 10px;

    input {
        width: 100%;
        padding: 8px 12px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        color: #fff;
        font-size: 0.85rem;
        outline: none;

        &:focus { border-color: var(--primary); }
    }
}

.dropdown-options-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-main);
    transition: background 0.15s;

    &:hover {
        background: var(--bg-card-hover);
        color: var(--primary);
    }

    &.selected {
        background: rgba(59, 130, 246, 0.15);
        color: var(--primary);
        font-weight: 600;
    }

    i { color: var(--text-muted); }
    &.selected i { color: var(--primary); }
}

/* Universal Form & Search Inputs */
input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.88rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;

    &:focus {
        border-color: #3b82f6;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
    }

    &::placeholder {
        color: #64748b;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;

    label {
        font-size: 0.78rem;
        font-weight: 600;
        color: #cbd5e1;
        display: flex;
        align-items: center;
        gap: 6px;

        i {
            width: 15px;
            height: 15px;
            color: #60a5fa;
        }
    }

    select,
    input {
        width: 100%;
        height: 38px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        color: #f8fafc;
        padding: 0 12px;
        border-radius: 8px;
        font-size: 0.86rem;
        font-family: inherit;
        outline: none;
        transition: all 0.2s ease;
        box-sizing: border-box;

        &:focus {
            border-color: #3b82f6;
            background: rgba(15, 23, 42, 0.98);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
        }

        &::placeholder {
            color: #64748b;
        }
    }
}

.range-dual {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

/* ============================================================
   SPECIES VERIFICATION WORKBENCH (2 COLUMNS: LEFT CANVAS, RIGHT DETAILS)
   ============================================================ */
.verify-workbench, .verification-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(430px, 490px);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 24px;
}

@media (max-width: 1360px) {
    .verify-workbench, .verification-workspace {
        grid-template-columns: minmax(0, 1.2fr) minmax(390px, 440px);
    }
}

@media (max-width: 960px) {
    .verify-workbench, .verification-workspace {
        grid-template-columns: 1fr;
    }
}

.canvas-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.details-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;

    .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
        min-height: 0;
    }
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: 520px;
    max-height: 700px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#detection-canvas {
    max-width: 100%;
    max-height: 680px;
    object-fit: contain;
    transition: transform 0.05s ease-out;
}

.image-overlay-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 999px;
    display: flex;
    gap: 14px;
    font-size: 0.76rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);

    .stamp-item {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #e2e8f0;
    }
}

/* Floating Navigation Controls on Canvas (Góc phải bên dưới hình) */
.canvas-floating-nav {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);

    .btn-float-nav {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #f1f5f9;
        cursor: pointer;
        transition: all 0.2s ease;

        i, svg {
            width: 15px;
            height: 15px;
        }

        &:hover {
            background: #3b82f6;
            color: #ffffff;
            border-color: #3b82f6;
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
            transform: scale(1.06);
        }
    }

    .float-counter {
        font-size: 0.78rem;
        font-weight: 700;
        color: #f8fafc;
        min-width: 48px;
        text-align: center;
        user-select: none;
        padding: 0 4px;
    }
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 600;
}

.dropdown-action-group {
    position: relative;
}

.nav-arrows {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 50;
    margin-bottom: 6px;

    &.show { display: block; }
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 0.84rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.15s;

    &:hover { background: var(--primary); color: #fff; }
}

/* ============================================================
   DETECTIONS DETAIL LIST & COMPACT SINGLE-LINE CARDS
   ============================================================ */
.detections-list {
    max-height: 290px;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 4px;
}

.det-row-single {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;

    &:hover {
        border-color: var(--primary);
        background: rgba(59, 130, 246, 0.06);
    }

    &.verified-row {
        border-color: #10b981;
        background: rgba(16, 185, 129, 0.08);
    }
}

.det-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.det-left-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;

    .det-seq-num {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .det-species-title {
        font-weight: 700;
        font-size: 0.86rem;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .det-conf-chip {
        padding: 2px 7px;
        border-radius: 10px;
        font-size: 0.72rem;
        font-weight: 700;
        flex-shrink: 0;

        &.high { background: rgba(16, 185, 129, 0.2); color: #10b981; }
        &.med { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        &.low { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
    }
}

.det-right-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-confirmed {
    background: #10b981 !important;
    color: #fff !important;
    border: 1px solid #10b981 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s;

    i { width: 14px; height: 14px; }
}

.btn-outline-success {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s;

    &:hover {
        background: rgba(16, 185, 129, 0.15);
    }

    i { width: 14px; height: 14px; }
}

.btn-outline-warning {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
    padding: 4px 7px;
    border-radius: 6px;
    cursor: pointer;

    &:hover { background: rgba(245, 158, 11, 0.15); }
    i { width: 14px; height: 14px; }
}

.btn-outline-danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 4px 7px;
    border-radius: 6px;
    cursor: pointer;

    &:hover { background: rgba(239, 68, 68, 0.15); }
    i { width: 14px; height: 14px; }
}

.det-searchable-dropdown {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);

    .det-search-box {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 4px 8px;
        margin-bottom: 6px;

        i { width: 14px; height: 14px; color: var(--text-muted); }
        input {
            background: transparent;
            border: none;
            color: #fff;
            font-size: 0.8rem;
            width: 100%;
            outline: none;
        }
    }

    .det-species-list {
        max-height: 140px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 2px;

        .det-species-item {
            padding: 5px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            cursor: pointer;
            color: var(--text-main);

            &:hover {
                background: var(--primary);
                color: #fff;
            }
        }
    }
}

/* Metadata Box */
.metadata-detail-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;

    .metadata-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;

        h4 {
            margin: 0;
            font-size: 0.84rem;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 6px;

            i { width: 15px; height: 15px; color: var(--primary); }
        }
    }
}

.meta-list {
    list-style: none;
    font-size: 0.78rem;
    padding: 0;
    margin: 0;

    li {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08);

        span { color: var(--text-muted); }
        strong { color: #f1f5f9; }
    }
}

.meta-edit-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;

    .meta-edit-actions {
        display: flex;
        gap: 8px;
        margin-top: 4px;
    }
}

/* Thumbnail Grid */
.thumbnail-grid-section {
    margin-top: 24px;

    h4 { margin-bottom: 12px; font-size: 0.94rem; color: #fff; }
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.thumb-card {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    &:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }

    &.active {
        border-color: #3b82f6;
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    }

    .thumb-badge {
        position: absolute;
        bottom: 4px;
        right: 4px;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;

        &.badge-status-unverified { background: rgba(245, 158, 11, 0.9); color: #000; }
        &.badge-status-confirmed { background: rgba(16, 185, 129, 0.9); color: #fff; }
        &.badge-status-corrected { background: rgba(59, 130, 246, 0.9); color: #fff; }
        &.badge-status-rejected { background: rgba(239, 68, 68, 0.9); color: #fff; }
    }
}

.thumb-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;

    &:hover, &.active {
        transform: translateY(-2px);
        border-color: var(--primary);
    }

    img {
        width: 100%;
        height: 90px;
        object-fit: cover;
    }
}

.thumb-info {
    padding: 6px;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Analytics Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    &.blue { background: rgba(59, 130, 246, 0.2); color: var(--primary); }
    &.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
    &.purple { background: rgba(139, 92, 246, 0.2); color: var(--purple); }
    &.orange { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    display: block;
}

.metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-card {
    canvas {
        max-height: 280px;
    }
}

/* Taxonomy Grid & Cards */
.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.taxonomy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;

    &:hover {
        transform: translateY(-3px);
        border-color: var(--primary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

.taxonomy-card-media {
    position: relative;
    width: 100%;
    height: 150px;
    background: #0f172a;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    &:hover img {
        transform: scale(1.05);
    }

    .no-photo-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: #64748b;
        font-size: 0.75rem;
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    }

    .taxonomy-media-overlay {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

.taxonomy-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

/* Species Modal Photo Upload Styling */
.sp-photo-upload-container {
    margin-top: 4px;
}

.sp-photo-preview-box {
    width: 100%;
    height: 140px;
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;

    &:hover {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.08);
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sp-photo-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        color: #94a3b8;
        font-size: 0.78rem;
        text-align: center;
        padding: 10px;
    }
}

.taxonomy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;

    h3 {
        font-family: 'Outfit', sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .scientific-name {
        font-style: italic;
        font-size: 0.85rem;
        color: var(--primary);
    }

    .vietnamese-name {
        font-size: 0.8rem;
        color: var(--text-muted);
    }
}

.iucn-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;

    &.iucn-CR { background: rgba(239, 68, 68, 0.25); color: #ef4444; border: 1px solid #ef4444; }
    &.iucn-EN { background: rgba(249, 115, 22, 0.25); color: #f97316; border: 1px solid #f97316; }
    &.iucn-VU { background: rgba(245, 158, 11, 0.25); color: #f59e0b; border: 1px solid #f59e0b; }
    &.iucn-NT { background: rgba(234, 179, 8, 0.25); color: #eab308; border: 1px solid #eab308; }
    &.iucn-LC { background: rgba(16, 185, 129, 0.25); color: #10b981; border: 1px solid #10b981; }
}

.taxonomy-body {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;

    .tax-detail {
        margin-bottom: 6px;
        strong { color: var(--text-main); }
    }
}

.taxonomy-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.8rem;

    .det-count {
        background: var(--bg-dark);
        padding: 4px 10px;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        color: var(--primary);
        font-weight: 600;
    }
}

/* Export Options */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.option-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.option-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    &.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
    &.blue { background: rgba(59, 130, 246, 0.2); color: var(--primary); }
    &.purple { background: rgba(139, 92, 246, 0.2); color: var(--purple); }
}

.option-text {
    flex: 1;

    h4 { font-size: 1.05rem; margin-bottom: 4px; }
    p { font-size: 0.85rem; color: var(--text-muted); }
}

/* ============================================================
   ZOOM & PAN CONTROLS OVERLAY
   ============================================================ */
.canvas-zoom-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 4px 8px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-zoom {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
        background: var(--primary);
        color: #fff;
    }
}

.zoom-level-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    min-width: 44px;
    text-align: center;
}

.canvas-wrapper {
    cursor: grab;
    user-select: none;
    position: relative;

    &.grabbing {
        cursor: grabbing !important;
    }
}

/* ============================================================
   INTERACTIVE PER-DETECTION ITEM CARD (SINGLE-LINE COMPACT)
   ============================================================ */
.det-card-interactive {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.2s ease;

    &:hover, &.highlighted {
        border-color: var(--primary);
        box-shadow: 0 0 0 1px var(--primary), 0 2px 8px rgba(59, 130, 246, 0.2);
        background: rgba(30, 41, 59, 0.95);
    }

    &.is-confirmed {
        border-color: rgba(16, 185, 129, 0.6);
        background: rgba(16, 185, 129, 0.08);
    }
}

.det-row-single {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.det-left-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.det-index {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.det-species-name {
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    max-width: 120px;
}

.conf-badge-compact {
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;

    &.high { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
    &.mid { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
    &.low { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
}

.det-actions-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 26px;
    padding: 0 6px;
    border-radius: 5px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;

    i {
        width: 13px;
        height: 13px;
    }
}

.btn-outline-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);

    &:hover {
        background: #10b981;
        color: #fff;
    }
}

.btn-confirmed {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);

    &:hover {
        background: #059669;
        border-color: #059669;
    }
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
    padding: 0 6px;

    &:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }
}

.btn-outline-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    padding: 0 6px;

    &:hover {
        background: #ef4444;
        color: #fff;
    }
}

.det-searchable-dropdown {
    position: relative;
    margin-top: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow);
    z-index: 40;
    animation: fadeIn 0.15s ease-in-out;
}

.det-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;

    i {
        position: absolute;
        left: 10px;
        width: 15px;
        height: 15px;
        color: var(--text-muted);
    }

    input {
        width: 100%;
        padding: 8px 10px 8px 32px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        color: #fff;
        font-size: 0.85rem;
        outline: none;

        &:focus {
            border-color: var(--primary);
        }
    }
}

.det-species-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.det-species-item {
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 0.84rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;

    &:hover {
        background: var(--primary);
        color: #fff;
    }

    &.active {
        background: rgba(59, 130, 246, 0.2);
        color: var(--primary);
        font-weight: 600;
    }
}

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

/* ============================================================
   METADATA INLINE EDIT FORM
   ============================================================ */
.metadata-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;

    h4 {
        margin: 0;
        font-size: 0.92rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.meta-edit-form {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
}

.form-group-compact {
    margin-bottom: 10px;

    label {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 0.78rem;
        color: var(--text-muted);
        margin-bottom: 4px;
    }
}

.form-row-compact {
    display: flex;
    gap: 10px;
}

.form-control-compact {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;

    &:focus {
        border-color: var(--primary);
    }
}

.meta-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* ============================================================
   PROJECT SWITCHER IN TOPBAR
   ============================================================ */
.header-left-cluster {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.project-header-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;

    .project-icon {
        width: 17px;
        height: 17px;
        color: var(--primary);
    }

    .project-selector-label {
        font-size: 0.8rem;
        color: var(--text-muted);
        font-weight: 500;
    }

    select {
        background: transparent;
        border: none;
        color: #fff;
        font-weight: 600;
        font-size: 0.86rem;
        outline: none;
        cursor: pointer;
        max-width: 240px;

        option {
            background: var(--bg-card);
            color: #fff;
        }
    }
}

/* ============================================================
   PROJECT OVERVIEW BANNER
   ============================================================ */
.project-banner-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-banner-info {
    flex: 1;

    .banner-badge {
        display: inline-block;
        background: rgba(59, 130, 246, 0.2);
        color: var(--primary);
        border: 1px solid rgba(59, 130, 246, 0.4);
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    h2 {
        font-size: 1.25rem;
        margin: 0 0 6px 0;
        color: #fff;
    }

    p {
        color: var(--text-muted);
        font-size: 0.85rem;
        margin: 0 0 10px 0;
        line-height: 1.4;
    }

    .banner-meta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        font-size: 0.8rem;
        color: var(--text-muted);

        span {
            display: flex;
            align-items: center;
            gap: 5px;

            i {
                width: 14px;
                height: 14px;
                color: var(--primary);
            }
        }
    }
}

.project-banner-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.pstat-item {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
    min-width: 95px;

    .pstat-num {
        display: block;
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--primary);
    }

    .pstat-lbl {
        font-size: 0.72rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* ============================================================
   GIS LAYOUT & MAP STYLING
   ============================================================ */
.gis-layout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

@media (max-width: 1100px) {
    .gis-layout-grid {
        grid-template-columns: 1fr;
    }
}

.gis-map-card {
    display: flex;
    flex-direction: column;
}

.interactive-gis-map {
    height: 560px;
    width: 100%;
    border-radius: 0 0 10px 10px;
    background: #0f172a;
    z-index: 1;
}

.map-controls-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-tip-pill {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;

    i {
        width: 13px;
        height: 13px;
    }
}

.layer-switch-btns {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);

    .btn {
        border: none;
        border-radius: 0;
        padding: 4px 10px;
        font-size: 0.75rem;

        &.active {
            background: var(--primary);
            color: #fff;
        }
    }
}

/* ============================================================
   STATION MANAGER & CARDS LIST
   ============================================================ */
.station-manager-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.station-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.station-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 14px 0 12px 0;
}

.stations-list-header {
    margin-bottom: 10px;

    h4 {
        margin: 0;
        font-size: 0.88rem;
        font-weight: 700;
        color: #38bdf8;
        display: flex;
        align-items: center;
        gap: 6px;
    }
}

.stations-cards-container {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.35) rgba(15, 23, 42, 0.6);
}

.stations-cards-container::-webkit-scrollbar {
    width: 5px;
}

.stations-cards-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}

.stations-cards-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stations-cards-container::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.station-card-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;

    &:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }

    .st-info {
        display: flex;
        flex-direction: column;
        gap: 3px;

        .st-header-row {
            display: flex;
            align-items: center;
            gap: 6px;

            .st-code {
                font-weight: 700;
                font-size: 0.88rem;
                color: #fff;
            }

            .st-name {
                font-size: 0.8rem;
                color: var(--text-muted);
            }
        }

        .st-meta-row {
            display: flex;
            gap: 8px;
            font-size: 0.72rem;
            color: var(--text-muted);

            .coord {
                color: var(--primary);
                font-family: monospace;
            }
        }
    }

    .st-actions {
        display: flex;
        align-items: center;
        gap: 6px;

        .st-btn-icon {
            width: 30px;
            height: 30px;
            padding: 0;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(30, 41, 59, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #cbd5e1;
            cursor: pointer;
            transition: all 0.2s ease;

            i {
                width: 14px;
                height: 14px;
            }

            &:hover {
                background: rgba(59, 130, 246, 0.2);
                border-color: #3b82f6;
                color: #60a5fa;
            }

            &.btn-delete {
                border-color: rgba(239, 68, 68, 0.3);
                color: #f87171;

                &:hover {
                    background: rgba(239, 68, 68, 0.2);
                    border-color: #ef4444;
                    color: #ef4444;
                }
            }
        }
    }
}

.project-linking-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* ============================================================
   SPATIAL BIODIVERSITY MAP & OCCURRENCE MATRIX
   ============================================================ */
.spatial-map-card {
    border-radius: 12px;
    overflow: hidden;
}

.spatial-biodiversity-map {
    height: 440px;
    width: 100%;
    background: #0f172a;
}

.map-species-picker {
    display: flex;
    align-items: center;
    gap: 8px;

    label {
        font-size: 0.82rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
    }

    select {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: #fff;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.84rem;
        font-weight: 600;
        outline: none;
        cursor: pointer;

        &:focus {
            border-color: var(--primary);
        }
    }
}

.spatial-map-footer {
    display: flex;
    justify-content: space-around;
    padding: 12px 18px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);

    .smap-metric {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.84rem;

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

        .smap-val {
            font-weight: 700;
        }
    }
}

.matrix-card {
    .table-responsive {
        max-height: 340px;
        overflow: auto;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.82rem;

        th, td {
            padding: 9px 12px;
            text-align: center;
            border-bottom: 1px solid var(--border-color);
            border-right: 1px solid rgba(255, 255, 255, 0.05);
        }

        th {
            background: rgba(30, 41, 59, 0.95);
            color: var(--text-muted);
            font-weight: 600;
            position: sticky;
            top: 0;
            z-index: 5;
            white-space: nowrap;
        }

        th:first-child, td:first-child {
            text-align: left;
            position: sticky;
            left: 0;
            background: var(--bg-card);
            z-index: 6;
            font-weight: 600;
        }

        tr:hover td {
            background: rgba(59, 130, 246, 0.08);
        }

        .cell-count {
            display: inline-block;
            padding: 2px 7px;
            border-radius: 10px;
            font-weight: 700;
            font-size: 0.76rem;
            background: rgba(16, 185, 129, 0.18);
            color: #10b981;

            &.zero {
                background: transparent;
                color: var(--text-muted);
                opacity: 0.35;
                font-weight: 400;
            }
        }
    }
}

/* ============================================================
   LEAFLET CUSTOM DARK THEME POPUPS & MARKERS
   ============================================================ */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 12px 14px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95) !important;
}

.popup-station-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.popup-stat-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    font-weight: 600;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* ============================================================
   AUTHENTICATION / LOGIN OVERLAY & CARD (EXECUTIVE GRADE)
   ============================================================ */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
    backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-overlay.show {
    display: flex;
}

.auth-card {
    position: relative;
    background: rgba(18, 24, 38, 0.94);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(59, 130, 246, 0.15);
    animation: authCardEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes authCardEnter {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-card-ambient-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 140px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.35), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

.auth-brand {
    text-align: center;
    margin-bottom: 22px;
    position: relative;

    .auth-logo-icon {
        width: 58px;
        height: 58px;
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
        border-radius: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        margin-bottom: 12px;
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);

        i {
            width: 32px;
            height: 32px;
        }
    }

    h2 {
        font-size: 1.45rem;
        color: #f8fafc;
        margin: 0 0 4px 0;
        font-weight: 800;
        font-family: 'Outfit', sans-serif;
        letter-spacing: -0.01em;
    }

    p {
        color: #94a3b8;
        font-size: 0.84rem;
        margin: 0 0 10px 0;
    }

    .auth-badge-live {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 10px;
        background: rgba(59, 130, 246, 0.12);
        border: 1px solid rgba(59, 130, 246, 0.25);
        border-radius: 20px;
        font-size: 0.72rem;
        color: #60a5fa;
        font-weight: 600;

        .pulse-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #10b981;
            box-shadow: 0 0 8px #10b981;
        }
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    padding: 11px 40px 11px 40px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;

    &:focus {
        border-color: #3b82f6;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    }

    &:focus + .auth-input-icon,
    &:focus ~ .auth-input-icon {
        color: #3b82f6;
    }

    &::placeholder {
        color: #475569;
    }
}

.auth-eye-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;

    &:hover {
        color: #f8fafc;
    }

    i {
        width: 17px;
        height: 17px;
    }
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    animation: shake 0.3s ease;
}

.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
    margin-top: 4px;

    &:hover {
        background: linear-gradient(135deg, #60a5fa, #3b82f6);
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
        transform: translateY(-1px);
    }

    &:active {
        transform: translateY(1px);
    }

    i {
        width: 17px;
        height: 17px;
        transition: transform 0.2s;
    }

    &:hover i {
        transform: translateX(3px);
    }
}

/* Quick Demo Accounts */
.demo-accounts-box {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    .demo-header {
        margin-bottom: 10px;
    }

    .demo-title {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.76rem;
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;

        i {
            width: 14px;
            height: 14px;
            color: #f59e0b;
        }
    }

    .demo-cards-list {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .demo-card-item {
        display: flex;
        align-items: center;
        gap: 12px;
        background: rgba(30, 41, 59, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        padding: 9px 12px;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
            background: rgba(59, 130, 246, 0.15);
            border-color: rgba(59, 130, 246, 0.45);
            transform: translateX(4px);

            .demo-arrow {
                color: #60a5fa;
                transform: translateX(2px);
            }
        }

        .demo-avatar {
            font-size: 1.15rem;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

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

        .demo-name {
            font-size: 0.82rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        .demo-role {
            font-size: 0.72rem;
            color: #94a3b8;
            margin-top: 2px;

            .demo-user-tag {
                color: #38bdf8;
                font-family: monospace;
                font-weight: 600;
            }
        }

        .demo-arrow {
            width: 16px;
            height: 16px;
            color: #475569;
            flex-shrink: 0;
            transition: all 0.2s;
        }
    }
}

/* ============================================================
   USER PROFILE BADGE ON TOPBAR
   ============================================================ */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;

    .user-avatar {
        font-size: 1.2rem;
        line-height: 1;
    }

    .user-meta-info {
        display: flex;
        flex-direction: column;

        .user-fullname {
            font-size: 0.84rem;
            font-weight: 700;
            color: #fff;
            line-height: 1.2;
        }

        .user-role {
            font-size: 0.7rem;
            color: var(--primary);
            font-weight: 600;
        }
    }
    
    transition: all 0.2s ease;
    &:hover {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(56, 189, 248, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.btn-avatar-opt {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.2s;
    
    &:hover {
        background: rgba(56, 189, 248, 0.2);
        border-color: #38bdf8;
        transform: scale(1.15);
    }
}

.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 1100px) {
    .admin-stats-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* ============================================================
   PROJECTS HUB & CARDS GRID
   ============================================================ */
.projects-hub-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.search-filter-box {
    position: relative;
    display: flex;
    align-items: center;

    i {
        position: absolute;
        left: 12px;
        width: 18px;
        height: 18px;
        color: var(--text-muted);
    }

    input {
        width: 100%;
        padding: 10px 14px 10px 38px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: #fff;
        font-size: 0.88rem;
        outline: none;
        transition: border-color 0.2s;

        &:focus {
            border-color: var(--primary);
        }
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.project-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: var(--shadow);

    &:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    &.active-project {
        border-color: var(--primary);
        background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }

    .pcard-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 10px;

        .pcard-code {
            background: rgba(59, 130, 246, 0.18);
            color: var(--primary);
            font-size: 0.75rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 6px;
        }

        .pcard-status {
            font-size: 0.72rem;
            color: #10b981;
            background: rgba(16, 185, 129, 0.15);
            padding: 2px 7px;
            border-radius: 10px;
            font-weight: 600;
        }
    }

    h3 {
        font-size: 1.1rem;
        color: #fff;
        margin: 0 0 8px 0;
        font-weight: 700;
        line-height: 1.35;
    }

    p {
        font-size: 0.82rem;
        color: var(--text-muted);
        margin: 0 0 14px 0;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .pcard-meta-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 0.78rem;
        color: var(--text-muted);
        margin-bottom: 16px;

        div {
            display: flex;
            align-items: center;
            gap: 6px;

            i {
                width: 14px;
                height: 14px;
                color: var(--primary);
            }
        }
    }

    .pcard-stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
        text-align: center;
        margin-bottom: 16px;

        .pstat-box {
            .val {
                display: block;
                font-size: 1.1rem;
                font-weight: 800;
                color: #fff;
            }
            .lbl {
                font-size: 0.68rem;
                color: var(--text-muted);
                text-transform: uppercase;
            }
        }
    }

    .pcard-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-top: 14px;

        .pcard-btn-main {
            flex: 1;
            height: 36px;
            padding: 0 14px;
            border-radius: 8px;
            font-size: 0.84rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            cursor: pointer;
            border: 1px solid rgba(59, 130, 246, 0.4);
            background: rgba(59, 130, 246, 0.14);
            color: #60a5fa;
            transition: all 0.2s ease;

            i {
                width: 16px;
                height: 16px;
            }

            &:hover {
                background: #3b82f6;
                color: #fff;
                box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
                transform: translateY(-1px);
            }

            &.active-proj {
                background: rgba(16, 185, 129, 0.16);
                border-color: #10b981;
                color: #34d399;

                &:hover {
                    background: #10b981;
                    color: #fff;
                    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
                }
            }
        }

        .pcard-btn-icon {
            width: 36px;
            height: 36px;
            padding: 0;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(30, 41, 59, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #cbd5e1;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;

            i {
                width: 15px;
                height: 15px;
            }

            &:hover {
                background: rgba(59, 130, 246, 0.2);
                border-color: #3b82f6;
                color: #60a5fa;
                transform: translateY(-1px);
            }

            &.btn-delete {
                border-color: rgba(239, 68, 68, 0.3);
                color: #f87171;

                &:hover {
                    background: rgba(239, 68, 68, 0.2);
                    border-color: #ef4444;
                    color: #ef4444;
                    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
                }
            }

            &.btn-members {
                border-color: rgba(56, 189, 248, 0.3);
                color: #38bdf8;

                &:hover {
                    background: rgba(56, 189, 248, 0.2);
                    border-color: #38bdf8;
                    color: #fff;
                    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
                }
            }
        }
    }

    .pcard-members-row {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 6px 10px;
        margin-bottom: 14px;
        transition: all 0.2s ease;

        &:hover {
            border-color: rgba(56, 189, 248, 0.4);
            background: rgba(56, 189, 248, 0.08);
        }

        .member-avatars-stack {
            display: flex;
            align-items: center;

            .m-avatar-stack {
                width: 24px;
                height: 24px;
                border-radius: 50%;
                background: #1e293b;
                border: 2px solid #0f172a;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                font-size: 0.78rem;
                margin-left: -6px;

                &:first-child {
                    margin-left: 0;
                }
            }
        }

        .members-count-badge {
            font-size: 0.78rem;
            font-weight: 700;
            color: #38bdf8;
            display: inline-flex;
            align-items: center;
            gap: 4px;

            i, svg {
                width: 13px;
                height: 13px;
            }
        }

        .members-invite-link {
            margin-left: auto;
            font-size: 0.74rem;
            color: #94a3b8;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-weight: 600;

            i, svg {
                width: 12px;
                height: 12px;
            }

            &:hover {
                color: #38bdf8;
            }
        }
    }
}

/* ============================================================
   INVITE MEMBERS MODAL STYLING
   ============================================================ */
.invite-member-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;

    h4 {
        margin: 0 0 4px 0;
        font-size: 0.96rem;
        color: #38bdf8;
        display: flex;
        align-items: center;
        gap: 6px;

        i, svg {
            width: 16px;
            height: 16px;
        }
    }

    .invite-form-grid {
        display: flex;
        gap: 10px;
        align-items: flex-end;
        flex-wrap: wrap;
    }
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;

    th {
        background: rgba(15, 23, 42, 0.95);
        color: #94a3b8;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: #cbd5e1;
        vertical-align: middle;
    }

    tbody tr:hover {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* ============================================================
   STATION DIRECT FILE UPLOAD BOX
   ============================================================ */
.station-upload-box {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 14px 18px;

    .upload-box-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;

        .upload-header-title {
            display: flex;
            align-items: center;
            gap: 8px;

            i {
                color: var(--primary);
                width: 18px;
                height: 18px;
            }

            h4 {
                margin: 0;
                font-size: 0.88rem;
                color: #fff;
            }
        }

        .upload-actions-btns {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: nowrap;

            .btn {
                white-space: nowrap;
                height: 36px;
                padding: 0 14px;
                font-size: 0.84rem;
                display: inline-flex;
                align-items: center;
                gap: 6px;
            }

            .btn-queue-scan-action {
                background: rgba(16, 185, 129, 0.16);
                border: 1px solid #10b981;
                color: #34d399;
                font-weight: 700;

                .badge-count {
                    background: #10b981;
                    color: #fff;
                    font-size: 0.74rem;
                    font-weight: 800;
                    padding: 1px 7px;
                    border-radius: 999px;
                    margin-left: 2px;
                    transition: all 0.2s;
                }

                &:hover {
                    background: #10b981;
                    color: #fff;
                    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);

                    .badge-count {
                        background: #064e3b;
                        color: #6ee7b7;
                    }
                }
            }
        }
    }
}

/* Upload Success Alert Banner */
.upload-success-banner {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 8px 0 14px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    animation: fadeInBanner 0.25s ease-out;

    .banner-icon {
        i {
            width: 22px;
            height: 22px;
            color: #10b981;
            margin-top: 2px;
        }
    }

    .banner-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 3px;

        .banner-title {
            font-weight: 700;
            color: #34d399;
            font-size: 0.88rem;
        }

        .banner-path {
            font-size: 0.78rem;
            color: #cbd5e1;
            display: flex;
            align-items: center;
            gap: 6px;
            word-break: break-all;

            i {
                width: 14px;
                height: 14px;
                color: #60a5fa;
                flex-shrink: 0;
            }

            code {
                background: rgba(15, 23, 42, 0.8);
                border: 1px solid rgba(255, 255, 255, 0.1);
                padding: 2px 7px;
                border-radius: 4px;
                color: #38bdf8;
                font-family: monospace;
                font-weight: 600;
            }
        }

        .banner-sub {
            font-size: 0.75rem;
            color: #94a3b8;
        }
    }

    .banner-close {
        background: none;
        border: none;
        color: #94a3b8;
        font-size: 1.3rem;
        cursor: pointer;
        padding: 0 4px;
        line-height: 1;
        transition: color 0.15s;

        &:hover {
            color: #fff;
        }
    }
}

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

.dropzone-area {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    transition: all 0.2s ease;

    &:hover, &.dragover {
        border-color: var(--primary);
        background: rgba(59, 130, 246, 0.08);
    }

    .drop-icon {
        width: 32px;
        height: 32px;
        color: var(--primary);
        margin-bottom: 6px;
    }

    p {
        margin: 0 0 4px 0;
        font-size: 0.84rem;
        color: var(--text-main);
    }

    .drop-hint {
        font-size: 0.74rem;
        color: var(--text-muted);
    }
}

/* ============================================================
   SPECIES LIBRARY CARDS & IUCN BADGES
   ============================================================ */
.iucn-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;

    &.iucn-CR { background: #ef4444; color: #fff; }
    &.iucn-EN { background: #ea580c; color: #fff; }
    &.iucn-VU { background: #f59e0b; color: #000; }
    &.iucn-NT { background: #84cc16; color: #000; }
    &.iucn-LC { background: #10b981; color: #fff; }
    &.iucn-DD { background: #64748b; color: #fff; }
}

.taxonomy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;

    &:hover {
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    }

    .taxonomy-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 8px;

        h3 {
            font-size: 1.05rem;
            color: #fff;
            margin: 0;
        }

        .scientific-name {
            font-style: italic;
            color: var(--primary);
            font-size: 0.84rem;
        }

        .vietnamese-name {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
    }

    .taxonomy-body {
        margin: 10px 0;
        font-size: 0.8rem;
        color: var(--text-main);

        .tax-detail {
            margin-bottom: 3px;
            color: var(--text-muted);
            strong { color: #fff; }
        }

        p {
            margin: 8px 0 0 0;
            color: var(--text-muted);
            font-size: 0.78rem;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
    }

    .taxonomy-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border-color);
        padding-top: 10px;
        margin-top: 8px;

        .det-count {
            font-weight: 700;
            color: var(--primary);
            font-size: 0.82rem;
        }

        .tax-actions {
            display: flex;
            align-items: center;
            gap: 6px;

            .btn-tax-edit {
                background: rgba(56, 189, 248, 0.08);
                color: #38bdf8;
                border: 1px solid rgba(56, 189, 248, 0.35);
                padding: 4px 10px;
                border-radius: 6px;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                gap: 5px;
                font-size: 0.78rem;
                font-weight: 600;
                transition: all 0.2s ease;

                i, svg {
                    width: 14px;
                    height: 14px;
                }

                &:hover {
                    background: rgba(56, 189, 248, 0.2);
                    border-color: #38bdf8;
                    color: #ffffff;
                    transform: translateY(-1px);
                }
            }

            .btn-tax-del {
                background: rgba(239, 68, 68, 0.08);
                color: #ef4444;
                border: 1px solid rgba(239, 68, 68, 0.35);
                padding: 4px 8px;
                border-radius: 6px;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                transition: all 0.2s ease;

                i, svg {
                    width: 14px;
                    height: 14px;
                }

                &:hover {
                    background: rgba(239, 68, 68, 0.2);
                    border-color: #ef4444;
                    color: #ffffff;
                    transform: translateY(-1px);
                }
            }
        }
    }
}

/* ============================================================
   UPLOAD OPTIONS & ASYNC QUEUE STYLING
   ============================================================ */
.upload-options-row {
    margin: 10px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;

    .checkbox-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 0.82rem;
        color: #94a3b8;
        cursor: pointer;
        user-select: none;

        input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #3b82f6;
            cursor: pointer;
        }

        span {
            color: #cbd5e1;
        }
    }
}

/* ============================================================
   GLOBAL FLOATING BACKGROUND AI HUB (Bottom-Right Widget)
   ============================================================ */
.global-queue-hub {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.2);
    z-index: 99999;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpQueue 0.35s ease-out;

    &.minimized {
        width: 260px;
        .queue-hub-body {
            display: none;
        }
    }

    &.paused {
        border-color: rgba(245, 158, 11, 0.4);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
        .queue-pulse-dot {
            background: #f59e0b;
            box-shadow: 0 0 8px #f59e0b;
            animation: none;
        }
    }

    &.completed {
        border-color: rgba(16, 185, 129, 0.4);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
        .queue-pulse-dot {
            background: #10b981;
            box-shadow: 0 0 8px #10b981;
            animation: none;
        }
    }
}

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

.queue-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    .queue-hub-title {
        display: flex;
        align-items: center;
        gap: 8px;

        .queue-pulse-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #3b82f6;
            box-shadow: 0 0 8px #3b82f6;
            animation: queuePulse 1.4s infinite ease-in-out;
        }

        .queue-title-text {
            font-size: 0.86rem;
            font-weight: 700;
            color: #f8fafc;
            letter-spacing: 0.2px;
        }
    }

    .queue-hub-actions {
        display: flex;
        align-items: center;
        gap: 6px;

        .btn-queue-icon {
            width: 28px;
            height: 28px;
            padding: 0;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #cbd5e1;
            cursor: pointer;
            transition: all 0.15s ease;

            i {
                width: 14px;
                height: 14px;
            }

            &:hover {
                background: rgba(59, 130, 246, 0.2);
                border-color: #3b82f6;
                color: #60a5fa;
            }

            &.btn-queue-cancel:hover {
                background: rgba(239, 68, 68, 0.2);
                border-color: #ef4444;
                color: #ef4444;
            }
        }
    }
}

@keyframes queuePulse {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}

.queue-hub-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    .queue-progress-bar-bg {
        width: 100%;
        height: 7px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        overflow: hidden;
        position: relative;

        .queue-progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
            border-radius: 999px;
            transition: width 0.3s ease;
        }
    }

    .queue-info-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.78rem;

        .queue-count-text {
            color: #f8fafc;
            font-weight: 700;
        }

        .queue-speed-text {
            color: #38bdf8;
            font-family: monospace;
            font-weight: 600;
        }
    }

    .queue-file-row {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.76rem;
        color: #94a3b8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        i {
            width: 14px;
            height: 14px;
            color: #60a5fa;
            flex-shrink: 0;
        }

        span {
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    .queue-eta-row {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        color: #94a3b8;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 8px;

        i {
            width: 13px;
            height: 13px;
            color: #fbbf24;
        }

        strong {
            color: #fde68a;
        }
    }
}

/* ============================================================
   MENU 3: IMAGE DATA MANAGEMENT HUB & INGESTION HISTORY
   ============================================================ */
.data-hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dh-danger-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;

    .btn {
        height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
}

.data-hub-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;

    .dh-view-tabs {
        display: flex;
        gap: 6px;
        background: var(--bg-dark);
        padding: 4px;
        border-radius: 8px;
        border: 1px solid var(--border-color);

        .dh-tab-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border-radius: 6px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.86rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;

            i {
                width: 16px;
                height: 16px;
            }

            &:hover {
                color: #fff;
            }

            &.active {
                background: rgba(59, 130, 246, 0.2);
                color: #60a5fa;
                box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
            }
        }
    }

    .dh-view-controls {
        display: flex;
        align-items: center;
        gap: 12px;

        .dh-perf-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid rgba(56, 189, 248, 0.3);
            border-radius: 8px;
            padding: 6px 12px;
            cursor: pointer;
            transition: all 0.2s;

            input {
                accent-color: #38bdf8;
                cursor: pointer;
            }

            .perf-label {
                font-size: 0.8rem;
                font-weight: 600;
                color: #38bdf8;
                display: inline-flex;
                align-items: center;
                gap: 5px;

                i {
                    width: 14px;
                    height: 14px;
                    color: #fbbf24;
                }
            }

            &:hover {
                border-color: #38bdf8;
                background: rgba(56, 189, 248, 0.08);
            }
        }
    }
}

/* Unified Single-Line Control & Search Bar for Menu 3 */
.dh-project-header-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    gap: 14px;
    overflow-x: auto;

    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 6px;

        label {
            font-size: 0.76rem;
            font-weight: 600;
            color: #94a3b8;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 5px;
            margin: 0;

            i {
                width: 14px;
                height: 14px;
                color: #60a5fa;
            }
        }

        select, input {
            height: 38px;
            width: 100%;
            background: var(--bg-dark);
            border: 1px solid var(--border-color);
            color: #f8fafc;
            padding: 0 10px;
            border-radius: 7px;
            font-size: 0.84rem;
            font-family: inherit;
            outline: none;
            transition: all 0.2s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;

            &:focus {
                border-color: #3b82f6;
                box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
            }
        }
    }

    .project-group {
        flex: 1.4;
        min-width: 220px;

        label i {
            color: #a855f7;
        }

        select {
            font-weight: 600;
        }
    }

    .station-group {
        flex: 1.1;
        min-width: 170px;
    }

    .search-group {
        flex: 1.4;
        min-width: 190px;
    }

    .dh-header-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
        margin-bottom: 1px;

        button {
            height: 38px;
            white-space: nowrap;
        }
    }
}

/* Photo Grid dedicated filter toolbar inside Tab 2 */
.dh-grid-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;

    .filter-group {
        flex: 1;
        min-width: 180px;
        display: flex;
        flex-direction: column;
        gap: 6px;

        label {
            font-size: 0.76rem;
            font-weight: 600;
            color: #94a3b8;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 5px;

            i {
                width: 14px;
                height: 14px;
                color: #60a5fa;
            }
        }

        select, input {
            height: 38px;
            width: 100%;
            background: var(--bg-dark);
            border: 1px solid var(--border-color);
            color: #f8fafc;
            padding: 0 10px;
            border-radius: 7px;
            font-size: 0.84rem;
        }
    }

    .dh-grid-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
    }
}

/* History Ingestion Table */
.history-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.history-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;

    thead {
        background: #090d16;
        position: sticky;
        top: 0;
        z-index: 2;

        th {
            padding: 12px 14px;
            font-size: 0.76rem;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            white-space: nowrap;
        }
    }

    tbody {
        tr {
            transition: background 0.15s ease;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            &:last-child td {
                border-bottom: none;
            }

            &:hover {
                background: rgba(59, 130, 246, 0.06);
            }
        }

        td {
            padding: 12px 14px;
            font-size: 0.84rem;
            vertical-align: middle;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        }
    }

    .cell-datetime {
        display: flex;
        flex-direction: column;
        gap: 2px;
        white-space: nowrap;

        .date-val {
            font-weight: 700;
            color: #f1f5f9;
            font-size: 0.86rem;
        }

        .time-val {
            font-size: 0.74rem;
            color: #64748b;
            font-family: monospace;
        }
    }

    .project-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(99, 102, 241, 0.12);
        border: 1px solid rgba(99, 102, 241, 0.35);
        color: #a5b4fc;
        padding: 3px 8px;
        border-radius: 6px;
        font-size: 0.76rem;
        font-weight: 700;
        white-space: nowrap;

        i {
            width: 13px;
            height: 13px;
        }
    }

    .station-cell {
        display: flex;
        flex-direction: column;
        gap: 2px;

        .st-code {
            font-weight: 700;
            color: #38bdf8;
            font-size: 0.86rem;
        }

        .st-sub {
            font-size: 0.74rem;
            color: #94a3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }
    }

    .count-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 4px 10px;
        border-radius: 999px;
        font-weight: 700;
        font-size: 0.8rem;
        white-space: nowrap;

        &.blue {
            background: rgba(59, 130, 246, 0.15);
            color: #60a5fa;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        &.green {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }
    }

    .storage-text {
        font-family: monospace;
        font-weight: 600;
        color: #cbd5e1;
        font-size: 0.82rem;
    }

    .folder-path-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(15, 23, 42, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 4px 8px;
        border-radius: 6px;
        max-width: 240px;
        cursor: pointer;
        transition: all 0.2s;

        i {
            width: 14px;
            height: 14px;
            color: #60a5fa;
            flex-shrink: 0;
        }

        span {
            font-family: monospace;
            font-size: 0.74rem;
            color: #94a3b8;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        &:hover {
            border-color: #3b82f6;
            background: rgba(59, 130, 246, 0.1);

            span {
                color: #e2e8f0;
            }
        }
    }

    .ai-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 0.74rem;
        font-weight: 700;
        white-space: nowrap;

        i {
            width: 13px;
            height: 13px;
        }

        &.completed {
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.4);
            color: #34d399;
        }

        &.queued {
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid rgba(245, 158, 11, 0.4);
            color: #fbbf24;
        }
        &.processing {
            background: rgba(59, 130, 246, 0.15);
            border: 1px solid rgba(59, 130, 246, 0.4);
            color: #60a5fa;
            animation: pulse 1.5s infinite;
        }
    }

    .table-actions-cluster {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        justify-content: flex-end;

        .btn-tbl-view {
            height: 30px;
            padding: 0 10px;
            font-size: 0.78rem;
            font-weight: 600;
            border-radius: 6px;
            background: rgba(59, 130, 246, 0.15);
            border: 1px solid rgba(59, 130, 246, 0.35);
            color: #60a5fa;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: all 0.15s;

            &:hover {
                background: #3b82f6;
                color: #fff;
            }
        }

        .btn-tbl-rescan {
            height: 30px;
            padding: 0 10px;
            font-size: 0.78rem;
            font-weight: 600;
            border-radius: 6px;
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.35);
            color: #34d399;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: all 0.15s;

            &:hover {
                background: #10b981;
                color: #fff;
            }
        }

        .btn-tbl-del {
            height: 30px;
            padding: 0 10px;
            font-size: 0.78rem;
            font-weight: 600;
            border-radius: 6px;
            background: rgba(239, 68, 68, 0.12);
            border: 1px solid rgba(239, 68, 68, 0.35);
            color: #f87171;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: all 0.15s;

            &:hover {
                background: #ef4444;
                color: #fff;
            }
        }
    }
}

/* Detailed Grid View & Caching */
.dh-grid-selection-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;

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

        .cache-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.75rem;
            color: #34d399;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.25);
            padding: 2px 8px;
            border-radius: 999px;

            i {
                width: 12px;
                height: 12px;
            }
        }
    }

    .selection-right {
        display: flex;
        align-items: center;
        gap: 14px;

        .page-size-selector {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--text-muted);

            select {
                background: var(--bg-dark);
                border: 1px solid var(--border-color);
                border-radius: 6px;
                color: #fff;
                padding: 4px 8px;
                font-size: 0.8rem;
                outline: none;
            }
        }

        .dh-page-info {
            font-size: 0.82rem;
            color: var(--text-muted);
        }
    }
}

.data-hub-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dh-image-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;

    &:hover {
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
        transform: translateY(-2px);
    }

    &.selected {
        border-color: #3b82f6;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    }

    .dh-card-thumb-wrap {
        position: relative;
        height: 140px;
        background: #090d16;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.2s ease;
        }

        &:hover img {
            transform: scale(1.04);
        }

        /* On-demand placeholder state */
        .dh-thumb-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            color: #64748b;
            padding: 12px;
            text-align: center;
            width: 100%;
            height: 100%;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));

            i {
                width: 28px;
                height: 28px;
                color: #475569;
            }

            .btn-load-thumb {
                background: rgba(59, 130, 246, 0.15);
                border: 1px solid rgba(59, 130, 246, 0.35);
                color: #60a5fa;
                font-size: 0.72rem;
                font-weight: 700;
                padding: 4px 10px;
                border-radius: 999px;
                cursor: pointer;
                transition: all 0.2s;
                display: inline-flex;
                align-items: center;
                gap: 4px;

                &:hover {
                    background: #3b82f6;
                    color: #fff;
                }
            }
        }

        .dh-checkbox-overlay {
            position: absolute;
            top: 8px;
            left: 8px;
            z-index: 2;
            background: rgba(15, 23, 42, 0.75);
            border-radius: 4px;
            padding: 2px 4px;
        }

        .dh-status-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            z-index: 2;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;

            &.completed { background: rgba(16, 185, 129, 0.88); color: #fff; }
            &.queued { background: rgba(245, 158, 11, 0.88); color: #fff; }
            &.processing { background: rgba(59, 130, 246, 0.88); color: #fff; }
        }

        .dh-det-count-badge {
            position: absolute;
            bottom: 8px;
            left: 8px;
            z-index: 2;
            background: rgba(15, 23, 42, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #38bdf8;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
    }

    .dh-card-body {
        padding: 10px 12px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;

        .dh-card-filename {
            font-weight: 700;
            font-size: 0.82rem;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dh-card-meta {
            font-size: 0.74rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .dh-card-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 6px;
            padding-top: 6px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);

            .btn-card-action {
                height: 26px;
                padding: 0 8px;
                border-radius: 6px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 4px;
                font-size: 0.72rem;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.2s ease;
                background: transparent;
                font-family: inherit;

                i, svg {
                    width: 13px;
                    height: 13px;
                }
            }

            .btn-card-view {
                background: rgba(59, 130, 246, 0.1);
                border: 1px solid rgba(59, 130, 246, 0.35);
                color: #60a5fa;

                &:hover {
                    background: #3b82f6;
                    color: #ffffff;
                    border-color: #3b82f6;
                    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
                }
            }

            .btn-card-rescan {
                background: rgba(16, 185, 129, 0.1);
                border: 1px solid rgba(16, 185, 129, 0.35);
                color: #34d399;

                &:hover {
                    background: #10b981;
                    color: #ffffff;
                    border-color: #10b981;
                    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
                }
            }

            .btn-card-del {
                width: 26px;
                padding: 0;
                background: rgba(239, 68, 68, 0.1);
                border: 1px solid rgba(239, 68, 68, 0.35);
                color: #f87171;

                &:hover {
                    background: #ef4444;
                    color: #ffffff;
                    border-color: #ef4444;
                    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
                }
            }
        }
    }
}

/* Data Hub Pagination Controls */
.dh-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;

    #dh-page-display {
        font-size: 0.88rem;
        font-weight: 600;
        color: #f1f5f9;
        min-width: 90px;
        text-align: center;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-dh-page {
        height: 34px;
        padding: 0 16px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        background: rgba(30, 41, 59, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #e2e8f0;
        font-family: inherit;

        i, svg {
            width: 15px;
            height: 15px;
        }

        &:hover:not(:disabled) {
            background: #3b82f6;
            color: #ffffff;
            border-color: #3b82f6;
            box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
        }

        &:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            background: rgba(15, 23, 42, 0.4);
            border-color: rgba(255, 255, 255, 0.06);
            color: #64748b;
        }
    }
}

/* Lightbox Modal */
.dh-modal-view {
    max-width: 900px !important;
    width: 90vw;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;

    .dh-modal-title {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #f8fafc;

        h3 {
            margin: 0;
            font-size: 1rem;
            word-break: break-all;
        }
    }

    .dh-modal-body {
        display: flex;
        gap: 20px;
        padding: 16px 20px;

        @media (max-width: 768px) {
            flex-direction: column;
        }

        .dh-modal-img-wrap {
            flex: 1.6;
            min-height: 360px;
            background: #000;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;

            img {
                width: 100%;
                height: 100%;
                max-height: 480px;
                object-fit: contain;
            }
        }

        .dh-modal-meta-pane {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;

            .meta-section-title {
                font-size: 0.86rem;
                font-weight: 700;
                color: #38bdf8;
                display: flex;
                align-items: center;
                gap: 6px;
                margin-bottom: 4px;
            }

            .meta-item-row {
                display: flex;
                justify-content: space-between;
                font-size: 0.8rem;
                color: #94a3b8;
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);
                padding-bottom: 6px;

                strong {
                    color: #f1f5f9;
                    font-weight: 600;
                }
            }

            .dh-modal-actions {
                display: flex;
                flex-direction: column;
                gap: 8px;
                margin-top: 10px;
            }
        }
    }
}

/* ============================================================
   ADMIN MODEL SETTINGS & HYPERPARAMETERS CENTER
   ============================================================ */
.badge-admin-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-model-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    .admin-header-left {
        display: flex;
        align-items: center;
        gap: 16px;

        .admin-badge-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background: rgba(168, 85, 247, 0.15);
            border: 1px solid rgba(168, 85, 247, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #c084fc;
            flex-shrink: 0;

            i {
                width: 26px;
                height: 26px;
            }
        }

        h2 {
            margin: 0 0 4px 0;
            font-size: 1.3rem;
            font-weight: 700;
            color: #f8fafc;
        }

        p {
            margin: 0;
            color: #94a3b8;
            font-size: 0.85rem;
        }
    }

    .role-pill-admin {
        background: rgba(245, 158, 11, 0.15);
        color: #fbbf24;
        border: 1px solid rgba(245, 158, 11, 0.3);
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 0.78rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
}

.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;

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

.admin-settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.hw-status-box {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 14px;

    .hw-status-item {
        display: flex;
        flex-direction: column;
        gap: 4px;

        .hw-label {
            font-size: 0.72rem;
            color: #94a3b8;
            font-weight: 600;
        }

        .hw-val {
            font-size: 0.84rem;
            color: #f1f5f9;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 4px;

            &.highlight {
                color: #38bdf8;
            }
        }
    }
}

.model-species-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;

    .model-species-badge {
        background: rgba(30, 41, 59, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #cbd5e1;
        font-size: 0.74rem;
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: 500;
    }
}

.param-slider-group {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;

    .param-slider-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;

        label {
            font-size: 0.84rem;
            color: #e2e8f0;
            margin: 0;
        }

        .param-value-pill {
            background: #3b82f6;
            color: #fff;
            font-size: 0.78rem;
            font-weight: 700;
            padding: 2px 10px;
            border-radius: 12px;
        }
    }

    input[type="range"] {
        width: 100%;
        accent-color: #3b82f6;
        cursor: pointer;
    }

    .param-hint {
        display: block;
        font-size: 0.72rem;
        color: #94a3b8;
        margin-top: 6px;
    }
}

.test-controls-bar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;

    @media (max-width: 768px) {
        flex-direction: column;
        align-items: stretch;
    }
}

.test-visualizer-container {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
}

.test-visualizer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    min-height: 420px;

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

.test-canvas-wrapper {
    background: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;

    .canvas-header-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #0f172a;
        padding: 8px 14px;
        font-size: 0.8rem;
        color: #94a3b8;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);

        .latency-badge {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.3);
            font-size: 0.72rem;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 6px;
        }
    }

    .canvas-image-stage {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        min-height: 380px;

        img {
            max-width: 100%;
            max-height: 460px;
            object-fit: contain;
            display: block;
        }

        .bboxes-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
    }
}

.test-detections-sidebar {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);

    h4 {
        margin: 0;
        font-size: 0.92rem;
        color: #f1f5f9;
        font-weight: 700;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
    }

    .detections-list-scroll {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 380px;
        overflow-y: auto;
    }

    .test-det-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 10px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        .det-left {
            display: flex;
            flex-direction: column;
            gap: 2px;

            .det-sp-name {
                font-size: 0.88rem;
                font-weight: 700;
                color: #38bdf8;
            }

            .det-bbox-coords {
                font-size: 0.7rem;
                color: #64748b;
                font-family: monospace;
            }
        }

        .det-conf-pill {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.3);
            font-size: 0.78rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 6px;
        }
    }
}


