/* ========================================
   VF-Evals: Cybernetic Data Lab Theme
   A distinctive, modern interface design
======================================== */

/* ========================================
   CSS Variables & Design Tokens
======================================== */
:root {
    /* Primary Palette - Electric Cyan */
    --primary-50: #e0fefb;
    --primary-100: #b3fcf4;
    --primary-200: #80faec;
    --primary-300: #4df7e4;
    --primary-400: #26f5dc;
    --primary-500: #00F5D4;
    --primary-600: #00c4aa;
    --primary-700: #009380;
    --primary-800: #006255;
    --primary-900: #00312b;

    /* Accent Palette - Coral */
    --accent-50: #fff0f0;
    --accent-100: #ffe0e0;
    --accent-200: #ffc7c7;
    --accent-300: #ffa3a3;
    --accent-400: #ff7a7a;
    --accent-500: #FF6B6B;
    --accent-600: #e85555;
    --accent-700: #c44040;
    --accent-800: #9c3232;
    --accent-900: #742626;

    /* Secondary - Cool Blue */
    --secondary-500: #00BBF9;
    --secondary-600: #0099cc;

    /* Neutral Palette - Deep Navy */
    --bg-100: #0D1117;
    --bg-200: #161B22;
    --bg-300: #1C2128;
    --bg-400: #21262D;
    --bg-500: #30363D;
    --bg-600: #484F58;
    --bg-700: #6E7681;
    --bg-800: #8B949E;
    --bg-900: #C9D1D9;

    /* Text Colors */
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --text-inverse: #0D1117;

    /* Status Colors */
    --success: #3FB950;
    --success-bg: rgba(63, 185, 80, 0.15);
    --warning: #D29922;
    --warning-bg: rgba(210, 153, 34, 0.15);
    --error: #F85149;
    --error-bg: rgba(248, 81, 73, 0.15);
    --info: #58A6FF;
    --info-bg: rgba(88, 166, 255, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00F5D4 0%, #00BBF9 100%);
    --gradient-accent: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 245, 212, 0.4) 0%, transparent 70%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 245, 212, 0.3);
    --shadow-glow-accent: 0 0 40px rgba(255, 107, 107, 0.3);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-display: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Fira Code', monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-display);
    background: var(--bg-100);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Animated Background
======================================== */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 245, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.bg-glow-1 {
    top: -200px;
    left: -200px;
    background: rgba(0, 245, 212, 0.15);
    animation: float1 20s ease-in-out infinite;
}

.bg-glow-2 {
    bottom: -200px;
    right: -200px;
    background: rgba(255, 107, 107, 0.1);
    animation: float2 25s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(100px, 50px); }
    66% { transform: translate(-50px, 100px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-80px, -40px); }
    66% { transform: translate(40px, -80px); }
}

/* ========================================
   App Layout
======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ========================================
   Sidebar Navigation
======================================== */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: width var(--transition-base);
}

.sidebar-header {
    position: relative;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.5)); }
    50% { filter: drop-shadow(0 0 16px rgba(0, 245, 212, 0.8)); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-base);
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.nav-item.active {
    background: rgba(0, 245, 212, 0.1);
    color: var(--primary-500);
    border-color: rgba(0, 245, 212, 0.2);
}

.nav-item.active .nav-icon {
    color: var(--primary-500);
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-text {
    flex: 1;
}

.nav-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    transition: height var(--transition-base);
}

.nav-item.active .nav-indicator {
    height: 24px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-600);
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   Main Content Area
======================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 32px;
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

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

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

/* Panel Header */
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

.header-content {
    flex: 1;
}

.panel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

.header-badge {
    flex-shrink: 0;
}

/* ========================================
   Glass Card Component
======================================== */
.glass-card {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.glass-card .card-glow {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: var(--gradient-glow);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.glass-card:hover .card-glow {
    opacity: 1;
}

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

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   Button Components
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Primary Button with Glow */
.btn-glow {
    position: relative;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    z-index: -1;
    opacity: 0;
    filter: blur(12px);
    transition: opacity var(--transition-base);
}

.btn-glow:hover::before {
    opacity: 0.6;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-400);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-500);
    border-color: var(--border-strong);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Icon Only Button */
.btn-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon-only svg {
    width: 18px;
    height: 18px;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

/* ========================================
   Status Chips
======================================== */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-full);
    position: relative;
}

.status-chip::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-chip.idle {
    background: var(--bg-400);
    color: var(--text-secondary);
}

.status-chip.idle::before {
    background: var(--text-muted);
}

.status-chip.running {
    background: var(--info-bg);
    color: var(--info);
    animation: statusPulse 1.5s ease-in-out infinite;
}

.status-chip.running::before {
    background: var(--info);
    animation: pulse 1s ease-in-out infinite;
}

.status-chip.success {
    background: var(--success-bg);
    color: var(--success);
}

.status-chip.success::before {
    background: var(--success);
}

.status-chip.error {
    background: var(--error-bg);
    color: var(--error);
}

.status-chip.error::before {
    background: var(--error);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Count Badge */
.count-badge {
    display: inline-flex;
    padding: 6px 14px;
    background: var(--bg-400);
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ========================================
   Ingestion Tab Layout
======================================== */
.ingestion-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto 1fr;
    gap: 24px;
}

.upload-section {
    grid-row: 1;
    grid-column: 1;
}

.pipeline-section {
    grid-row: 1;
    grid-column: 2;
}

.console-section {
    grid-row: 2;
    grid-column: 1 / -1;
}

/* File Upload Zone */
.file-upload-zone {
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.file-upload-zone:hover {
    background: rgba(0, 245, 212, 0.03);
}

.file-upload-zone.dragover {
    background: rgba(0, 245, 212, 0.08);
    border-color: var(--primary-500);
}

/* Upload Visual */
.upload-visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.upload-rings {
    position: absolute;
    inset: 0;
}

.ring {
    position: absolute;
    border: 1px solid var(--primary-500);
    border-radius: 50%;
    opacity: 0.2;
}

.ring-1 {
    inset: 0;
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-2 {
    inset: 15px;
    animation: ringPulse 3s ease-in-out infinite 0.5s;
}

.ring-3 {
    inset: 30px;
    animation: ringPulse 3s ease-in-out infinite 1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

.upload-icon-wrapper {
    position: absolute;
    inset: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-300);
    border-radius: 50%;
    border: 2px solid var(--border-default);
}

.upload-icon-wrapper svg {
    width: 32px;
    height: 32px;
    color: var(--primary-500);
}

.upload-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.upload-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-link {
    color: var(--primary-500);
    text-decoration: underline;
    cursor: pointer;
}

.upload-formats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.format-tag {
    padding: 4px 12px;
    background: var(--bg-400);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-300);
    border-radius: var(--border-radius-md);
    margin: 20px;
    border: 1px solid var(--border-default);
}

.file-preview.hidden {
    display: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-500);
    border-radius: var(--border-radius-sm);
}

.file-icon-box svg {
    width: 24px;
    height: 24px;
    color: var(--text-inverse);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ========================================
   Pipeline Visualization
======================================== */
.pipeline-section .card-header {
    padding: 18px 24px;
}

.pipeline-visual {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 24px;
    gap: 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 140px;
}

.step-node {
    position: relative;
    width: 64px;
    height: 64px;
}

.node-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.node-core {
    position: absolute;
    inset: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-400);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.node-core svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

/* Step States */
.pipeline-step.active .node-ring {
    border-color: var(--primary-500);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
    animation: nodeGlow 1.5s ease-in-out infinite;
}

.pipeline-step.active .node-core {
    background: rgba(0, 245, 212, 0.2);
}

.pipeline-step.active .node-core svg {
    color: var(--primary-500);
}

.pipeline-step.done .node-ring {
    border-color: var(--success);
    background: rgba(63, 185, 80, 0.1);
}

.pipeline-step.done .node-core {
    background: var(--success);
}

.pipeline-step.done .node-core svg {
    color: var(--text-inverse);
}

@keyframes nodeGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 245, 212, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 245, 212, 0.5); }
}

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

.step-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Pipeline Connector */
.pipeline-connector {
    flex: 0 0 60px;
    height: 64px;
    display: flex;
    align-items: center;
    position: relative;
}

.connector-line {
    width: 100%;
    height: 2px;
    background: var(--bg-500);
    position: relative;
}

.connector-pulse {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    opacity: 0;
}

.pipeline-step.done + .pipeline-connector .connector-line {
    background: var(--success);
}

.pipeline-step.active + .pipeline-connector .connector-pulse {
    animation: connectorFlow 1.5s ease-in-out infinite;
}

@keyframes connectorFlow {
    0% { left: 0; opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}

.pipeline-section .btn-primary {
    margin: 0 24px 24px;
    width: calc(100% - 48px);
}

/* ========================================
   Console Output
======================================== */
.console-body {
    padding: 0;
}

.console-output {
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.4);
    padding: 16px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.log-entry {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-prefix {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.log-entry.system .log-prefix {
    background: var(--bg-500);
    color: var(--text-muted);
}

.log-entry.info .log-prefix {
    background: var(--info-bg);
    color: var(--info);
}

.log-entry.success .log-prefix {
    background: var(--success-bg);
    color: var(--success);
}

.log-entry.warning .log-prefix {
    background: var(--warning-bg);
    color: var(--warning);
}

.log-entry.error .log-prefix {
    background: var(--error-bg);
    color: var(--error);
}

.log-message {
    color: var(--text-secondary);
    word-break: break-word;
}

.log-entry.success .log-message {
    color: var(--success);
}

.log-entry.error .log-message {
    color: var(--error);
}

/* ========================================
   Data Viewer Tab
======================================== */
.data-viewer-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.filter-panel {
    align-self: start;
    position: sticky;
    top: 32px;
}

.filter-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
}

.select-input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-input:hover {
    border-color: var(--border-strong);
}

.select-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.select-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions .btn {
    flex: 1;
}

/* Data Panel */
.data-panel {
    min-height: 500px;
}

.data-content {
    padding: 20px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Data Item Card */
.data-item {
    padding: 20px;
    background: var(--bg-300);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--primary-500);
    transition: all var(--transition-fast);
}

.data-item:hover {
    border-color: var(--border-default);
    background: var(--bg-400);
}

/* Clickable Data Item */
.data-item-clickable {
    cursor: pointer;
    position: relative;
}

.data-item-clickable:hover {
    border-left-color: var(--secondary-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 245, 212, 0.1);
}

.data-item-clickable:active {
    transform: translateY(0);
}

.data-item-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.data-item-view-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.data-item-view-hint svg {
    width: 14px;
    height: 14px;
}

.data-item-clickable:hover .data-item-view-hint {
    color: var(--primary-500);
}

.data-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.data-item-id {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary-500);
}

.data-item-category {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.data-item-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
}

.empty-state.inline {
    padding: 40px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.4;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Evaluation Tab
======================================== */
.evaluation-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: auto 1fr;
    gap: 24px;
}

.selection-panel {
    grid-row: 1 / 3;
    align-self: start;
    max-height: calc(100vh - 200px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.selection-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.tree-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.tree-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-500);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Selection Tree */
.tree-list {
    list-style: none;
}

.tree-item {
    margin: 4px 0;
}

.tree-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
}

.tree-item-content:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.tree-toggle:hover {
    color: var(--text-primary);
}

.tree-toggle.expanded {
    transform: rotate(90deg);
}

.tree-toggle.placeholder {
    visibility: hidden;
}

.tree-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-500);
    cursor: pointer;
    flex-shrink: 0;
}

.tree-label {
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    flex: 1;
    color: var(--text-primary);
}

.tree-children {
    list-style: none;
    padding-left: 28px;
    display: none;
}

.tree-children.visible {
    display: block;
}

/* Evaluation Pipeline Panel */
.eval-pipeline-panel {
    grid-column: 2;
}

.eval-pipeline-visual {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
}

.eval-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-300);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.eval-step.active {
    border-color: var(--primary-500);
    background: rgba(0, 245, 212, 0.08);
}

.eval-step.done {
    border-color: var(--success);
    background: rgba(63, 185, 80, 0.08);
}

.eval-step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-400);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.eval-step-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.eval-step.active .eval-step-icon {
    background: rgba(0, 245, 212, 0.2);
}

.eval-step.active .eval-step-icon svg {
    color: var(--primary-500);
}

.eval-step.done .eval-step-icon {
    background: var(--success);
}

.eval-step.done .eval-step-icon svg {
    color: var(--text-inverse);
}

.eval-step-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.eval-step-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.eval-step-status {
    margin-left: auto;
}

.eval-connector {
    width: 40px;
    height: 2px;
    background: var(--bg-500);
    flex-shrink: 0;
}

.eval-pipeline-panel .btn-primary {
    margin: 0 24px 24px;
    width: calc(100% - 48px);
}

/* Test Run Name Input */
.testrun-name-section {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    margin-top: 8px;
}

.testrun-name-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.testrun-name-label .label-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-500);
}

.testrun-name-label .optional-tag {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}

.testrun-name-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.testrun-name-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.testrun-name-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.testrun-name-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Detail Testrun Name in header */
.detail-testrun-name {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.15), rgba(0, 187, 249, 0.1));
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-500);
    margin-right: 12px;
}

.detail-testrun-name:empty {
    display: none;
}

/* Testrun name in table */
.testrun-name-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.testrun-name-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(0, 187, 249, 0.05));
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-400);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.testrun-name-badge.empty {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    font-style: italic;
}

/* Evaluation Console */
.eval-console-panel {
    grid-column: 2;
}

/* ========================================
   Results Tab
======================================== */
.results-container {
    width: 100%;
}

.results-view {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

.results-view.active-view {
    display: block;
}

.results-view.hidden {
    display: none;
}

/* Results Table Card */
.results-table-card,
.results-detail-card {
    width: 100%;
}

.table-container {
    overflow-x: auto;
    padding: 0 0 20px;
}

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

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-300);
    border-bottom: 1px solid var(--border-default);
}

.data-table td {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Prevent hover effect on empty rows */
tr.empty-row,
tr.empty-row:hover,
tr.empty-row:focus,
tr.empty-row:active,
.data-table tbody tr.empty-row,
.data-table tbody tr.empty-row:hover,
.sortable-table tbody tr.empty-row,
.sortable-table tbody tr.empty-row:hover {
    background: transparent !important;
    background-color: transparent !important;
    cursor: default !important;
    box-shadow: none !important;
    transition: none !important;
    outline: none !important;
}

tr.empty-row td,
.data-table .empty-row td,
.sortable-table .empty-row td {
    text-align: center;
    padding: 60px 20px;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    transition: none !important;
}

.empty-row .empty-state {
    pointer-events: auto;
    cursor: default;
}

/* Score Display */
.score-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-value {
    font-family: var(--font-mono);
    font-weight: 600;
    min-width: 28px;
}

.score-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-500);
    border-radius: 3px;
    overflow: hidden;
    max-width: 100px;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.score-low .score-bar-fill {
    background: var(--error);
}

.score-medium .score-bar-fill {
    background: var(--warning);
}

.score-high .score-bar-fill {
    background: var(--success);
}

/* Overall Score Badge */
.overall-score-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overall-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
}

.overall-badge.low {
    background: var(--error-bg);
    color: var(--error);
}

.overall-badge.medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.overall-badge.high {
    background: var(--success-bg);
    color: var(--success);
}

/* Extraction Score Badge */
.extraction-score-cell {
    display: flex;
    align-items: center;
}

.extraction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
    background: var(--bg-500);
    color: var(--text-muted);
}

.extraction-badge.low {
    background: var(--error-bg);
    color: var(--error);
}

.extraction-badge.medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.extraction-badge.high {
    background: var(--success-bg);
    color: var(--success);
}

/* Detail View Header */
.results-detail-card .card-header {
    gap: 20px;
}

.results-detail-card .card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-detail-card .card-header code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary-500);
    background: rgba(0, 245, 212, 0.1);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
}

/* Action Button in Table */
.action-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ========================================
   Scrollbar Styling
======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-700);
}

/* ========================================
   Header Actions
======================================== */
.header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ========================================
   Export Modal
======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    background: var(--bg-200);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 245, 212, 0.1);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.05) 0%, transparent 100%);
}

.modal-title-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    flex-shrink: 0;
}

.modal-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-inverse);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-300);
}

/* Export Sections */
.export-section {
    margin-bottom: 24px;
}

.export-section:last-child {
    margin-bottom: 0;
}

.export-section-title {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

/* Export Scope Cards */
.export-scope-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.export-scope-card {
    cursor: pointer;
}

.export-scope-card input[type="radio"] {
    display: none;
}

.scope-card-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-300);
    border: 2px solid var(--border-default);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.export-scope-card:hover .scope-card-content {
    border-color: var(--border-strong);
    background: var(--bg-400);
}

.export-scope-card.active .scope-card-content {
    border-color: var(--primary-500);
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.15) 0%, rgba(0, 187, 249, 0.1) 100%);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.scope-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-400);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.scope-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.export-scope-card.active .scope-icon {
    background: var(--gradient-primary);
    box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}

.export-scope-card.active .scope-icon svg {
    color: var(--text-inverse);
}

.scope-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scope-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scope-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Export Filters Grid */
.export-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.text-input:hover {
    border-color: var(--border-strong);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

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

/* Export Options Grid */
.export-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-300);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.export-option:hover {
    border-color: var(--border-default);
    background: var(--bg-400);
}

.export-option input[type="checkbox"] {
    display: none;
}

.option-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-fast);
}

.export-option input:checked + .option-checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.export-option input:checked + .option-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid var(--text-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Export Preview */
.export-preview {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(0, 187, 249, 0.08);
    border: 1px solid rgba(0, 187, 249, 0.2);
    border-radius: var(--border-radius-md);
    margin-top: 24px;
}

.preview-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.preview-icon svg {
    width: 100%;
    height: 100%;
    color: var(--secondary-500);
}

.preview-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Export Toast Notification */
.export-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.export-toast.success {
    border-color: rgba(63, 185, 80, 0.3);
    background: linear-gradient(135deg, var(--bg-300) 0%, rgba(63, 185, 80, 0.1) 100%);
}

.export-toast.error {
    border-color: rgba(248, 81, 73, 0.3);
    background: linear-gradient(135deg, var(--bg-300) 0%, rgba(248, 81, 73, 0.1) 100%);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.export-toast.success .toast-icon svg {
    color: var(--success);
}

.export-toast.error .toast-icon svg {
    color: var(--error);
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ========================================
   Row Detail Modal (Data Viewer)
======================================== */
.row-detail-modal-container {
    max-width: 800px;
    max-height: 85vh;
}

.row-detail-icon {
    background: linear-gradient(135deg, #00BBF9, #00F5D4);
}

.modal-subtitle code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary-500);
    background: rgba(0, 245, 212, 0.1);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
}

.row-detail-body {
    max-height: 60vh;
    overflow-y: auto;
}

.row-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 40px;
    color: var(--text-muted);
}

.row-detail-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 40px;
    text-align: center;
}

.row-detail-error .error-icon {
    width: 48px;
    height: 48px;
    color: var(--error);
    opacity: 0.7;
}

.row-detail-error .error-icon svg {
    width: 100%;
    height: 100%;
}

.row-detail-error p {
    color: var(--error);
    font-size: 0.95rem;
}

/* Row Detail Content */
.row-detail-content {
    padding: 0;
}

.row-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.row-detail-section {
    background: var(--bg-300);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.row-detail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 14px 20px;
    background: var(--bg-400);
    border-bottom: 1px solid var(--border-subtle);
    margin: 0;
}

.row-detail-fields {
    display: flex;
    flex-direction: column;
}

.row-detail-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.row-detail-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-edit-field {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.btn-edit-field svg {
    width: 14px;
    height: 14px;
}

.btn-edit-field:hover {
    opacity: 1;
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(0, 245, 212, 0.08);
}

.row-detail-field.field-editing {
    background: rgba(0, 245, 212, 0.03);
    border-left: 3px solid var(--primary-500);
}

.row-detail-field-value.editing {
    padding: 0;
}

.field-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all var(--transition-fast);
    resize: vertical;
}

.field-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--bg-200);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

.field-input.field-json-input {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.field-edit-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.field-edit-controls.hidden {
    display: none;
}

.btn-save-field,
.btn-cancel-field {
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-save-field {
    background: var(--primary-500);
    color: var(--text-inverse);
}

.btn-save-field:hover:not(:disabled) {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 245, 212, 0.3);
}

.btn-save-field:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel-field {
    background: var(--bg-400);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-cancel-field:hover {
    background: var(--bg-500);
    color: var(--text-primary);
}

.field-update-success {
    position: absolute;
    top: 16px;
    right: 20px;
    padding: 6px 12px;
    background: var(--success);
    color: var(--text-inverse);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
    z-index: 10;
}

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

.row-detail-field-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
}

/* Field Value Styles */
.field-null {
    color: var(--text-muted);
    font-style: italic;
}

.field-boolean {
    font-family: var(--font-mono);
    font-weight: 600;
}

.field-boolean.true {
    color: var(--success);
}

.field-boolean.false {
    color: var(--error);
}

.field-number {
    font-family: var(--font-mono);
    color: var(--secondary-500);
}

.field-date {
    color: var(--text-secondary);
}

.field-string {
    color: var(--text-primary);
}

.field-empty {
    color: var(--text-muted);
    font-style: italic;
}

.field-long-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: var(--font-display);
}

.field-json {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 250px;
    margin: 0;
    color: var(--text-secondary);
}

/* Array Display */
.field-array-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.field-array-item {
    padding: 6px 12px;
    background: var(--bg-400);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

/* Category Display */
.field-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-category-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 245, 212, 0.05);
    border: 1px solid rgba(0, 245, 212, 0.15);
    border-radius: var(--border-radius-sm);
}

.field-category-name {
    font-weight: 600;
    color: var(--primary-500);
    font-size: 0.95rem;
}

.field-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.field-subcategory-tag {
    padding: 4px 10px;
    background: var(--bg-400);
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

/* ========================================
   Lead Data Evaluation Styles
======================================== */

.lead-data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-400);
    border-bottom: 1px solid var(--border-subtle);
}

.lead-data-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.lead-data-metric .metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.lead-data-metric .metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.lead-data-metric .metric-value.score-high {
    color: var(--success);
}

.lead-data-metric .metric-value.score-medium {
    color: var(--warning);
}

.lead-data-metric .metric-value.score-low {
    color: var(--error);
}

.lead-data-fields-table {
    padding: 16px 20px;
    overflow-x: auto;
}

.field-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.field-comparison-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-500);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-default);
}

.field-comparison-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.field-comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.field-comparison-table tbody tr.status-match {
    background: rgba(63, 185, 80, 0.05);
}

.field-comparison-table tbody tr.status-mismatch {
    background: rgba(248, 81, 73, 0.08);
}

.field-comparison-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.field-comparison-table .field-name {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary-400);
    white-space: nowrap;
}

.field-comparison-table .field-expected,
.field-comparison-table .field-actual {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    max-width: 250px;
    word-break: break-word;
}

.field-comparison-table .field-status {
    text-align: center;
    width: 50px;
}

.field-comparison-table .null-value {
    color: var(--text-muted);
    font-style: italic;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    font-weight: 700;
}

.status-icon.match {
    background: var(--success-bg);
    color: var(--success);
}

.status-icon.mismatch {
    background: var(--error-bg);
    color: var(--error);
}

.status-icon.missing {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-icon.extra {
    background: var(--info-bg);
    color: var(--info);
}

/* Primary Field Styling */
.row-detail-field.primary .row-detail-field-value {
    font-family: var(--font-mono);
    color: var(--primary-500);
    background: rgba(0, 245, 212, 0.08);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

/* Success button temp state */
.btn-success-temp {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--text-inverse) !important;
}

/* ========================================
   Clickable Row ID Link (Results Details)
======================================== */
.row-id-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 245, 212, 0.08);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.row-id-link code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary-500);
    transition: color var(--transition-fast);
}

.row-id-link .row-id-eye-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.row-id-link:hover {
    background: rgba(0, 245, 212, 0.15);
    border-color: var(--primary-500);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 245, 212, 0.2);
}

.row-id-link:hover code {
    color: var(--primary-400);
}

.row-id-link:hover .row-id-eye-icon {
    color: var(--primary-500);
    transform: scale(1.1);
}

.row-id-link:active {
    transform: translateY(0);
}

/* ========================================
   Pagination (Data Viewer)
======================================== */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-300);
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-left,
.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.pagination-select-wrapper {
    position: relative;
}

.pagination-select {
    padding: 6px 30px 6px 12px;
    font-size: 0.85rem;
    min-width: 70px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-400);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn svg {
    width: 18px;
    height: 18px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-500);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Page Numbers */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.page-number-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-number-btn:hover:not(.active) {
    background: var(--bg-400);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.page-number-btn.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-color: transparent;
    font-weight: 600;
}

.page-ellipsis {
    padding: 0 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pagination-info {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-400);
    border-radius: var(--border-radius-sm);
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-left,
    .pagination-center,
    .pagination-right {
        width: 100%;
        justify-content: center;
    }
    
    .pagination-left {
        order: 2;
    }
    
    .pagination-center {
        order: 1;
    }
    
    .pagination-right {
        order: 3;
    }
}

/* ========================================
   Results Filter Bar
======================================== */
.results-filter-card {
    margin-bottom: 24px;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 20px 24px;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-bar-left {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    flex: 1;
}

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

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

/* Search Input */
.search-filter {
    min-width: 200px;
}

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

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:hover {
    border-color: var(--border-strong);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.search-input:focus + .search-icon,
.search-input-wrapper:has(.search-input:focus) .search-icon {
    color: var(--primary-500);
}

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

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-full);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-400);
}

.filter-chip.active {
    background: rgba(0, 245, 212, 0.15);
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chip-dot.success {
    background: var(--success);
}

.chip-dot.error {
    background: var(--error);
}

.chip-dot.processing {
    background: var(--info);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Date Range Filter */
.date-filter {
    min-width: 200px;
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input {
    padding: 8px 12px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    min-width: 130px;
    transition: all var(--transition-fast);
}

.date-input:hover {
    border-color: var(--border-strong);
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.date-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Score Range Filter */
.score-filter {
    min-width: 140px;
}

.score-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-input {
    width: 65px;
    padding: 8px 10px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.score-input:hover {
    border-color: var(--border-strong);
}

.score-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

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

.score-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Remove spinner arrows from number inputs */
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input[type=number] {
    -moz-appearance: textfield;
}

/* Active Filters Display */
.active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 245, 212, 0.03);
    flex-wrap: wrap;
}

.active-filters-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.active-filters-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--bg-400);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.active-filter-tag strong {
    color: var(--primary-500);
    font-weight: 600;
}

.filter-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.filter-tag-remove:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-tag-remove svg {
    width: 12px;
    height: 12px;
}

/* ========================================
   Sortable Table Headers
======================================== */
.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}

.sortable-table th.sortable:hover {
    background: var(--bg-400);
}

.sortable-table th.sortable .th-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-icon {
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0.3;
    transition: opacity var(--transition-fast);
}

.sortable-table th.sortable:hover .sort-icon {
    opacity: 0.6;
}

.sort-icon svg {
    width: 12px;
    height: 12px;
}

.sort-icon .sort-asc,
.sort-icon .sort-desc {
    display: block;
    margin: -3px 0;
}

/* Active sort states */
.sortable-table th.sortable.sort-asc .sort-icon,
.sortable-table th.sortable.sort-desc .sort-icon {
    opacity: 1;
}

.sortable-table th.sortable.sort-asc .sort-icon .sort-asc {
    color: var(--primary-500);
}

.sortable-table th.sortable.sort-asc .sort-icon .sort-desc {
    opacity: 0.2;
}

.sortable-table th.sortable.sort-desc .sort-icon .sort-desc {
    color: var(--primary-500);
}

.sortable-table th.sortable.sort-desc .sort-icon .sort-asc {
    opacity: 0.2;
}

/* Table Header Info */
.table-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filtered-badge {
    background: rgba(0, 245, 212, 0.15);
    color: var(--primary-500);
    border: 1px solid rgba(0, 245, 212, 0.3);
}

/* Filter Text Input */
.filter-text-input {
    padding: 8px 12px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    min-width: 140px;
    transition: all var(--transition-fast);
}

.filter-text-input:hover {
    border-color: var(--border-strong);
}

.filter-text-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

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

/* Warning chip dot */
.chip-dot.warning {
    background: var(--warning);
}

/* Details Filter Card */
.details-filter-card {
    margin-bottom: 20px;
}

.details-filter-card .filter-bar {
    padding: 16px 20px;
    gap: 16px;
}

.details-filter-card .filter-bar-left {
    gap: 16px;
}

/* Results Header with Mini Sort Buttons */
.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-sort-group {
    display: flex;
    gap: 4px;
}

.mini-sort-btn {
    padding: 4px 8px;
    background: var(--bg-400);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mini-sort-btn:hover {
    background: var(--bg-500);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.mini-sort-btn.active {
    background: rgba(0, 245, 212, 0.2);
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.mini-sort-btn.sort-asc::after {
    content: ' ↑';
}

.mini-sort-btn.sort-desc::after {
    content: ' ↓';
}

/* ========================================
   Utility Classes
======================================== */
.hidden {
    display: none !important;
}

.monospace {
    font-family: var(--font-mono);
}

/* ========================================
   Mobile Header
======================================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 200;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: rgba(0, 245, 212, 0.1);
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-icon {
    width: 32px;
    height: 32px;
}

.mobile-logo-icon svg {
    width: 100%;
    height: 100%;
}

.mobile-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-header-spacer {
    width: 44px;
}

/* Sidebar Close Button (visible only on mobile) */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 16px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.sidebar-close-btn:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: var(--error);
    color: var(--error);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ========================================
   Responsive Design
======================================== */

/* Large Desktop - 1400px+ (default) */

/* Medium Desktop - 1200px to 1400px */
@media (max-width: 1400px) {
    .ingestion-layout {
        gap: 20px;
    }
    
    .pipeline-visual {
        padding: 24px 16px;
    }
    
    .pipeline-step {
        max-width: 120px;
    }
    
    .pipeline-connector {
        flex: 0 0 40px;
    }
}

/* Small Desktop / Large Tablet - 1024px to 1200px */
@media (max-width: 1200px) {
    .ingestion-layout {
        grid-template-columns: 1fr;
    }
    
    .pipeline-section {
        grid-column: 1;
    }
    
    .console-section {
        grid-column: 1;
    }
    
    .evaluation-layout {
        grid-template-columns: 1fr;
    }
    
    .selection-panel {
        grid-row: auto;
        max-height: 400px;
    }
    
    .eval-pipeline-panel {
        grid-column: 1;
    }
    
    .eval-console-panel {
        grid-column: 1;
    }
    
    /* Pipeline visual remains horizontal but smaller */
    .pipeline-visual {
        gap: 8px;
    }
    
    .pipeline-step {
        max-width: 100px;
    }
    
    .step-node {
        width: 56px;
        height: 56px;
    }
    
    .node-core svg {
        width: 20px;
        height: 20px;
    }
    
    .step-title {
        font-size: 0.8rem;
    }
    
    .step-desc {
        font-size: 0.7rem;
    }
}

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
    /* Collapsed sidebar - icons only */
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .logo-text,
    .nav-text {
        display: none;
    }
    
    .client-selector-container {
        padding: 8px;
    }
    
    .client-selector-label span {
        display: none;
    }
    
    .client-selector-label svg {
        width: 18px;
        height: 18px;
    }
    
    .client-selector-wrapper {
        display: none;
    }
    
    .btn-add-client {
        width: 100%;
        height: 36px;
    }
    
    .nav-item {
        justify-content: center;
        padding: 14px;
    }
    
    .nav-icon {
        margin: 0;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
        padding: 24px;
    }
    
    .data-viewer-layout {
        grid-template-columns: 1fr;
    }
    
    .filter-panel {
        position: relative;
        top: auto;
    }
    
    .panel-title {
        font-size: 1.75rem;
    }
    
    /* Eval steps stack on tablet */
    .eval-pipeline-visual {
        flex-direction: column;
        gap: 16px;
    }
    
    .eval-step {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .eval-connector {
        width: 2px;
        height: 24px;
        margin: 0 auto;
    }
    
    /* Table horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 700px;
    }
    
    #details-table {
        min-width: 800px;
    }
    
    /* System status simplified */
    .system-status span {
        display: none;
    }
}

/* Mobile Landscape / Small Tablet - 600px to 768px */
@media (max-width: 768px) {
    /* Show mobile header, transform sidebar to drawer */
    .mobile-header {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 150;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Restore sidebar elements when opened as drawer */
    .sidebar.open .logo-text,
    .sidebar.open .nav-text,
    .sidebar.open .system-status span {
        display: flex;
    }
    
    .sidebar.open .sidebar-close-btn {
        display: flex;
    }
    
    .sidebar.open .client-selector-container {
        padding: 12px 16px;
    }
    
    .sidebar.open .client-selector-label span {
        display: inline;
    }
    
    .sidebar.open .client-selector-wrapper {
        display: block;
    }
    
    .sidebar.open .btn-add-client {
        width: 32px;
        height: 32px;
    }
    
    .sidebar.open .nav-item {
        justify-content: flex-start;
        padding: 14px 16px;
    }
    
    /* Hide elements by default on mobile (before opening) */
    .logo-text,
    .nav-text,
    .system-status span,
    .client-selector-wrapper,
    .client-selector-label span {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 14px;
    }
    
    .client-selector-container {
        padding: 8px;
    }
    
    .btn-add-client {
        width: 100%;
        height: 36px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .panel-title {
        font-size: 1.5rem;
    }
    
    .panel-desc {
        font-size: 0.9rem;
    }
    
    .header-badge {
        align-self: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Pipeline goes vertical */
    .pipeline-visual {
        flex-direction: column;
        align-items: center;
        padding: 24px 16px;
    }
    
    .pipeline-step {
        flex-direction: row;
        max-width: 100%;
        width: 100%;
        gap: 16px;
    }
    
    .step-node {
        flex-shrink: 0;
    }
    
    .step-label {
        text-align: left;
        flex: 1;
    }
    
    .pipeline-connector {
        flex: 0 0 auto;
        width: 2px;
        height: 32px;
    }
    
    .connector-line {
        width: 2px;
        height: 100%;
    }
    
    .connector-pulse {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }
    
    @keyframes connectorFlow {
        0% { top: 0; opacity: 1; }
        100% { top: calc(100% - 8px); opacity: 0; }
    }
    
    /* Data grid single column */
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    /* Upload zone smaller */
    .file-upload-zone {
        padding: 32px 20px;
    }
    
    .upload-visual {
        width: 100px;
        height: 100px;
    }
    
    .upload-icon-wrapper {
        inset: 28px;
    }
    
    .upload-text h3 {
        font-size: 1rem;
    }
    
    /* Console smaller */
    .console-output {
        height: 180px;
        font-size: 0.8rem;
    }
    
    /* Filter bar responsive */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    
    .filter-bar-left {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .search-filter {
        min-width: unset;
    }
    
    .filter-chips {
        flex-wrap: wrap;
    }
    
    .date-filter {
        min-width: unset;
    }
    
    .date-range-inputs {
        flex-wrap: wrap;
    }
    
    .date-input {
        flex: 1;
        min-width: 120px;
    }
    
    .score-filter {
        min-width: unset;
    }
    
    .score-range-inputs {
        justify-content: flex-start;
    }
    
    .filter-bar-right {
        justify-content: flex-end;
    }
    
    /* Details filter responsive */
    .details-filter-card .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .details-filter-card .filter-bar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-text-input {
        width: 100%;
        min-width: unset;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .results-sort-group {
        margin-left: 0;
    }
    
    /* Cards smaller padding */
    .card-header {
        padding: 14px 16px;
    }
    
    .card-header h2 {
        font-size: 0.9rem;
    }
    
    /* Modal responsive */
    .modal-overlay {
        padding: 12px;
    }
    
    .modal-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--border-radius-md);
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
    }
    
    .export-scope-options {
        grid-template-columns: 1fr;
    }
    
    .export-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .export-options-grid {
        grid-template-columns: 1fr;
    }
    
    .scope-card-content {
        padding: 14px;
    }
    
    .modal-title-section {
        gap: 12px;
    }
    
    .modal-icon {
        width: 40px;
        height: 40px;
    }
    
    .modal-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    /* Row detail modal */
    .row-detail-modal-container {
        max-width: 100%;
    }
    
    /* Tree selection */
    .tree-container {
        max-height: 300px;
    }
    
    /* Buttons touch friendly */
    .btn {
        padding: 14px 20px;
        min-height: 48px;
    }
    
    .btn-sm {
        padding: 10px 14px;
        min-height: 40px;
    }
    
    .btn-icon-only {
        width: 44px;
        height: 44px;
    }
    
    /* Inputs touch friendly */
    .select-input,
    .text-input,
    .form-input,
    .search-input,
    .date-input,
    .score-input {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .form-textarea {
        font-size: 16px;
    }
    
    /* Status chips */
    .status-chip {
        padding: 10px 14px;
    }
    
    /* Clickup modal */
    .clickup-modal-container {
        max-width: 100%;
    }
    
    .clickup-scores-grid {
        justify-content: center;
    }
    
    .clickup-score-item {
        min-width: 70px;
        padding: 8px 12px;
    }
}

/* Mobile Portrait - under 600px */
@media (max-width: 600px) {
    .main-content {
        padding: 72px 12px 12px;
    }
    
    .panel-header {
        margin-bottom: 20px;
    }
    
    .panel-title {
        font-size: 1.35rem;
    }
    
    /* Glass card adjustments */
    .glass-card {
        border-radius: var(--border-radius-md);
    }
    
    /* File upload */
    .file-upload-zone {
        padding: 24px 16px;
    }
    
    .upload-visual {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }
    
    .upload-icon-wrapper {
        inset: 20px;
    }
    
    .upload-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }
    
    .upload-text h3 {
        font-size: 0.95rem;
    }
    
    .upload-text p {
        font-size: 0.8rem;
    }
    
    .upload-formats {
        gap: 6px;
        margin-top: 16px;
    }
    
    .format-tag {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .file-preview {
        margin: 12px;
        padding: 12px 16px;
    }
    
    .file-icon-box {
        width: 36px;
        height: 36px;
    }
    
    .file-icon-box svg {
        width: 20px;
        height: 20px;
    }
    
    .file-name {
        font-size: 0.9rem;
    }
    
    .file-size {
        font-size: 0.75rem;
    }
    
    /* Pipeline visual even smaller */
    .pipeline-visual {
        padding: 16px 12px;
    }
    
    .step-node {
        width: 48px;
        height: 48px;
    }
    
    .node-core {
        inset: 6px;
    }
    
    .node-core svg {
        width: 18px;
        height: 18px;
    }
    
    .step-title {
        font-size: 0.85rem;
    }
    
    .step-desc {
        font-size: 0.7rem;
    }
    
    .pipeline-section .btn-primary,
    .eval-pipeline-panel .btn-primary {
        margin: 0 12px 16px;
        width: calc(100% - 24px);
    }
    
    /* Console */
    .console-output {
        height: 150px;
        padding: 12px;
        font-size: 0.75rem;
        line-height: 1.6;
    }
    
    .log-entry {
        gap: 8px;
    }
    
    .log-prefix {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    
    /* Eval steps */
    .eval-step {
        padding: 16px;
        gap: 12px;
    }
    
    .eval-step-icon {
        width: 40px;
        height: 40px;
    }
    
    .eval-step-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .eval-step-info h3 {
        font-size: 0.9rem;
    }
    
    .eval-step-info p {
        font-size: 0.8rem;
    }
    
    /* Test run name */
    .testrun-name-section {
        padding: 16px;
    }
    
    .testrun-name-label {
        font-size: 0.85rem;
    }
    
    .testrun-name-input {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    /* Data items */
    .data-item {
        padding: 16px;
    }
    
    .data-item-id {
        font-size: 0.85rem;
    }
    
    .data-item-category {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .data-item-content {
        font-size: 0.85rem;
    }
    
    /* Filter panel */
    .filter-content {
        padding: 16px;
        gap: 16px;
    }
    
    .filter-group label {
        font-size: 0.75rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    /* Table adjustments */
    .data-table th,
    .data-table td {
        padding: 12px;
        font-size: 0.8rem;
    }
    
    .data-table th {
        font-size: 0.7rem;
    }
    
    /* Score cells */
    .score-bar {
        max-width: 60px;
    }
    
    .overall-badge {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 40px;
    }
    
    /* Pagination */
    .pagination-container {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-left,
    .pagination-center,
    .pagination-right {
        width: 100%;
        justify-content: center;
    }
    
    .pagination-left {
        order: 2;
    }
    
    .pagination-center {
        order: 1;
    }
    
    .pagination-right {
        order: 3;
    }
    
    .pagination-btn {
        width: 32px;
        height: 32px;
    }
    
    .page-number-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .page-numbers {
        gap: 2px;
        margin: 0 4px;
    }
    
    /* Empty state */
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-icon {
        width: 60px;
        height: 60px;
    }
    
    .empty-state h3 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
    
    /* Modal adjustments */
    .modal-overlay {
        padding: 8px;
    }
    
    .modal-container {
        max-height: 100%;
        border-radius: var(--border-radius-sm);
    }
    
    .modal-header {
        padding: 14px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-subtitle {
        font-size: 0.8rem;
    }
    
    .modal-body {
        padding: 14px;
    }
    
    .modal-footer {
        padding: 14px;
    }
    
    .scope-icon {
        width: 32px;
        height: 32px;
    }
    
    .scope-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .scope-title {
        font-size: 0.9rem;
    }
    
    .scope-desc {
        font-size: 0.75rem;
    }
    
    .export-section-title {
        font-size: 0.75rem;
    }
    
    /* Row detail */
    .row-detail-section-title {
        font-size: 0.7rem;
        padding: 12px 16px;
    }
    
    .row-detail-field {
        padding: 12px 16px;
    }
    
    .row-detail-field-label {
        font-size: 0.75rem;
    }
    
    .row-detail-field-value {
        font-size: 0.9rem;
    }
    
    /* ClickUp modal */
    .clickup-modal-body {
        padding: 16px;
    }
    
    .clickup-score-section {
        padding: 12px;
    }
    
    .clickup-section-title {
        font-size: 0.75rem;
    }
    
    .clickup-scores-grid {
        gap: 8px;
    }
    
    .clickup-score-item {
        min-width: 60px;
        padding: 6px 10px;
    }
    
    .clickup-score-item .score-label {
        font-size: 9px;
    }
    
    .clickup-score-item .score-value {
        font-size: 14px;
    }
    
    .clickup-additional-summary {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    .clickup-additional-content {
        padding: 14px;
    }
    
    /* Selection tree */
    .selection-panel {
        max-height: 350px;
    }
    
    .tree-container {
        max-height: 250px;
    }
    
    .tree-item-content {
        padding: 6px 8px;
    }
    
    .tree-label {
        font-size: 0.85rem;
    }
    
    /* Active filters */
    .active-filters {
        padding: 10px 16px;
    }
    
    .active-filter-tag {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* Client selector */
    .client-selector-container {
        padding: 10px 12px;
    }
    
    .client-selector-label {
        font-size: 10px;
    }
    
    .client-selector {
        padding: 10px 28px 10px 10px;
        font-size: 14px;
    }
    
    .btn-add-client {
        width: 38px;
        height: 38px;
    }
    
    /* ClickUp button in table */
    .btn-clickup {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .clickup-icon {
        width: 12px;
        height: 12px;
    }
}

/* Extra Small - under 400px */
@media (max-width: 400px) {
    .mobile-header {
        padding: 0 12px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }
    
    .mobile-logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .mobile-logo-text {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 68px 10px 10px;
    }
    
    .panel-title {
        font-size: 1.2rem;
    }
    
    .header-actions .btn {
        padding: 12px 14px;
        font-size: 0.8rem;
        min-width: unset;
    }
    
    .filter-chips {
        gap: 4px;
    }
    
    .filter-chip {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Pipeline as simple list */
    .pipeline-step {
        gap: 12px;
    }
    
    .step-node {
        width: 44px;
        height: 44px;
    }
    
    .node-core {
        inset: 5px;
    }
    
    /* Pagination simplified */
    .page-numbers {
        display: none;
    }
    
    .pagination-info {
        font-size: 0.75rem;
    }
}

/* ========================================
   Safe Area Insets (Notched Devices)
======================================== */
@supports (padding: env(safe-area-inset-top)) {
    .mobile-header {
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
    
    .main-content {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    @media (max-width: 768px) {
        .main-content {
            padding-top: calc(80px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 600px) {
        .main-content {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
    }
    
    .sidebar {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .modal-overlay {
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

/* ========================================
   Touch & Performance Optimizations
======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices for better performance */
    .glass-card:hover {
        border-color: var(--border-default);
        box-shadow: none;
    }
    
    .glass-card:hover .card-glow {
        opacity: 0;
    }
    
    .btn:hover:not(:disabled) {
        transform: none;
    }
    
    .btn-primary:hover:not(:disabled) {
        box-shadow: var(--shadow-sm);
    }
    
    .data-item:hover {
        background: var(--bg-300);
    }
    
    /* Larger touch targets */
    .nav-item {
        min-height: 52px;
    }
    
    .tree-item-content {
        min-height: 44px;
    }
    
    .filter-chip {
        min-height: 40px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bg-glow {
        display: none;
    }
    
    .ring {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-color: var(--primary-500);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.2);
        --border-default: rgba(255, 255, 255, 0.3);
        --border-strong: rgba(255, 255, 255, 0.5);
    }
    
    .btn-primary {
        border: 2px solid var(--primary-500);
    }
    
    .glass-card {
        border-width: 2px;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .mobile-header,
    .sidebar,
    .sidebar-overlay,
    .bg-grid,
    .bg-glow,
    .header-actions,
    .filter-bar,
    .pagination-container,
    .modal-overlay {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 20px;
    }
    
    .glass-card {
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* ========================================
   Client Selector Styles
======================================== */
.client-selector-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-300);
    border-radius: var(--border-radius-md);
    margin-top: 16px;
    border: 1px solid var(--border-subtle);
}

.client-selector-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.client-selector-label svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary-500);
}

.client-selector-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-selector-wrapper {
    position: relative;
    flex: 1;
}

.client-selector {
    width: 100%;
    padding: 8px 32px 8px 12px;
    background: var(--bg-200);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.client-selector:hover {
    border-color: var(--primary-500);
    background: var(--bg-300);
}

.client-selector:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.client-selector-wrapper .select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-secondary);
    pointer-events: none;
}

.btn-add-client {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px dashed var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-client:hover {
    background: var(--bg-400);
    border-color: var(--primary-500);
    color: var(--primary-500);
    border-style: solid;
}

.btn-add-client svg {
    width: 16px;
    height: 16px;
}

/* Create Client Modal Specific Styles */
.create-client-modal-container {
    max-width: 480px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.required-star {
    color: var(--accent-500);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-200);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 14px;
    transition: all var(--transition-fast);
}

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

.form-input:hover {
    border-color: var(--border-strong);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.form-input.error {
    border-color: var(--error);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

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

.form-error {
    margin-top: 6px;
    color: var(--error);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-error::before {
    content: "⚠";
}

/* Client badge in selector */
.client-selector option {
    padding: 8px 12px;
    background: var(--bg-200);
}

/* No client selected state */
.no-client-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 16px;
    background: var(--warning-bg);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: var(--border-radius-md);
    color: var(--warning);
    font-size: 13px;
}

.no-client-warning svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========================================
   ClickUp Button Styles
======================================== */
.btn-clickup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-clickup:hover:not(:disabled) {
    background: linear-gradient(135deg, #8B78FF 0%, #A080EB 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.4);
}

.btn-clickup:active:not(:disabled) {
    transform: translateY(0);
}

.btn-clickup:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-clickup.loading {
    pointer-events: none;
}

.btn-clickup.loading .clickup-icon {
    animation: spin 1s linear infinite;
}

.btn-clickup.success {
    background: linear-gradient(135deg, var(--success) 0%, #4BC85E 100%);
}

.btn-clickup.success:hover:not(:disabled) {
    background: linear-gradient(135deg, #4BC85E 0%, #5CD86E 100%);
    box-shadow: 0 4px 12px rgba(63, 185, 80, 0.4);
}

.clickup-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.clickup-btn-text {
    line-height: 1;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Toast warning style */
.export-toast.warning {
    border-left-color: var(--warning);
}

.export-toast.warning .toast-icon {
    color: var(--warning);
}

.export-toast.info {
    border-left-color: var(--info);
}

.export-toast.info .toast-icon {
    color: var(--info);
}

/* ========================================
   ClickUp Modal Styles
======================================== */
.clickup-modal-container {
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.clickup-modal-header {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.15) 0%, rgba(147, 112, 219, 0.1) 100%);
    border-bottom: 1px solid rgba(123, 104, 238, 0.2);
}

.clickup-modal-icon {
    background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%) !important;
}

.clickup-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 24px;
}

/* Score Section */
.clickup-score-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-200);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-subtle);
}

.clickup-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.clickup-scores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.clickup-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-300);
    border-radius: var(--border-radius-sm);
    min-width: 80px;
}

.clickup-score-item.overall {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.2) 0%, rgba(147, 112, 219, 0.15) 100%);
    border: 1px solid rgba(123, 104, 238, 0.3);
}

.clickup-score-item .score-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.clickup-score-item .score-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.clickup-score-item .score-value.high {
    color: var(--success);
}

.clickup-score-item .score-value.medium {
    color: var(--warning);
}

.clickup-score-item .score-value.low {
    color: var(--error);
}

.no-scores {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

/* Form Textarea */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-200);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    transition: all var(--transition-fast);
}

.form-textarea::placeholder {
    color: var(--text-muted);
    font-family: var(--font-display);
}

.form-textarea:hover {
    border-color: var(--border-strong);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.form-textarea.expanded {
    min-height: 300px;
}

.form-textarea-sm {
    font-size: 12px;
}

/* Expand Toggle Button */
.btn-expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 8px;
    background: var(--bg-300);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    vertical-align: middle;
}

.btn-expand-toggle:hover {
    background: var(--bg-400);
    color: var(--text-primary);
}

.btn-expand-toggle.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: var(--text-inverse);
}

.btn-expand-toggle svg {
    width: 14px;
    height: 14px;
}

/* Additional Section (Collapsible) */
.clickup-additional-section {
    margin-top: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.clickup-additional-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-200);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    list-style: none;
}

.clickup-additional-summary::-webkit-details-marker {
    display: none;
}

.clickup-additional-summary:hover {
    background: var(--bg-300);
    color: var(--text-primary);
}

.clickup-additional-summary svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.clickup-additional-section[open] .clickup-additional-summary svg {
    transform: rotate(90deg);
}

.clickup-additional-content {
    padding: 16px;
    background: var(--bg-100);
    border-top: 1px solid var(--border-subtle);
}

.clickup-additional-content .form-group {
    margin-bottom: 16px;
}

.clickup-additional-content .form-group:last-child {
    margin-bottom: 0;
}

/* ClickUp Submit Button */
.btn-clickup-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-clickup-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #8B78FF 0%, #A080EB 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(123, 104, 238, 0.4);
}

.btn-clickup-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-clickup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-clickup-submit svg {
    width: 18px;
    height: 18px;
}

.btn-clickup-submit .btn-spinner {
    animation: spin 1s linear infinite;
}

/* Modal Subtitle styling */
#clickup-modal-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
}
