/*! Nexus AI Orchestrator v3.0 - World-Class UI */

:root {
    /* Core Colors */
    --void: #06060a;
    --obsidian: #0a0a0f;
    --charcoal: #12121a;
    --graphite: #1a1a24;
    --slate: #252532;
    --steel: #3a3a4a;
    --pewter: #6b6b7a;
    --silver: #9090a0;
    --cloud: #c8c8d4;
    --pearl: #e8e8f0;
    --white: #ffffff;
    
    /* Accent Colors */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #06b6d4;
    --secondary-light: #22d3ee;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(180deg, var(--charcoal) 0%, var(--void) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-sans);
    background: var(--void);
    color: var(--cloud);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--charcoal); }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--steel); }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.login-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.login-gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.login-gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.login-gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 1200px;
    width: 100%;
    padding: var(--space-xl);
    position: relative;
    z-index: 10;
}

@media (max-width: 968px) {
    .login-content { grid-template-columns: 1fr; max-width: 480px; }
    .login-branding { display: none; }
}

.login-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.login-logo-icon svg { width: 28px; height: 28px; color: white; }

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

.login-logo-tagline {
    display: block;
    font-size: 0.875rem;
    color: var(--pewter);
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.login-feature {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-feature-icon svg { width: 20px; height: 20px; color: var(--primary-light); }

.login-feature-text strong {
    display: block;
    color: var(--pearl);
    font-weight: 600;
    margin-bottom: 2px;
}

.login-feature-text span {
    font-size: 0.875rem;
    color: var(--pewter);
}

.login-stats {
    display: flex;
    gap: var(--space-xl);
}

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

.login-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-stat-label {
    font-size: 0.75rem;
    color: var(--pewter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card {
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.login-card-header { margin-bottom: var(--space-xl); }
.login-card-header h2 { font-size: 1.5rem; font-weight: 600; color: var(--pearl); }
.login-card-header p { color: var(--pewter); margin-top: var(--space-xs); }

.login-form { display: flex; flex-direction: column; gap: var(--space-lg); }

.form-group { display: flex; flex-direction: column; gap: var(--space-sm); }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--silver); }
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--graphite);
    border: 1px solid var(--slate);
    border-radius: var(--radius-lg);
    color: var(--pearl);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder { color: var(--steel); }
.form-hint { font-size: 0.75rem; color: var(--pewter); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

.radio-group { display: flex; flex-direction: column; gap: var(--space-sm); }
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--graphite);
    border: 1px solid var(--slate);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.radio-option:hover { border-color: var(--steel); background: var(--slate); }
.radio-option:has(input:checked) { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); }
.radio-option:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}
.radio-option input[type="radio"]:disabled { cursor: not-allowed; }
.radio-label { display: flex; flex-direction: column; gap: 2px; }
.radio-label strong { color: var(--pearl); font-size: 0.9rem; }
.radio-label small { color: var(--pewter); font-size: 0.8rem; }

.repo-badge-imported { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.repo-row-imported, .repo-card-imported { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.05); }
.repo-imported-actions { display: flex; gap: var(--space-sm); }
.btn-danger-outline {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.1); }
.btn-danger-outline:disabled { opacity: 0.5; cursor: not-allowed; }

/* Project Detail Page - Improved Layout */
.project-detail-grid { 
    display: grid; 
    grid-template-columns: 1fr 380px; 
    gap: var(--space-xl); 
    margin-top: var(--space-lg); 
}
@media (max-width: 1200px) { 
    .project-detail-grid { 
        grid-template-columns: 1fr 340px; 
        gap: var(--space-lg); 
    } 
}
@media (max-width: 968px) { 
    .project-detail-grid { 
        grid-template-columns: 1fr; 
    }
    .project-detail-sidebar { order: -1; }
}
.project-detail-main, .project-detail-sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: var(--space-md); 
}

/* Metrics Row - Responsive */
.metrics-row { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: var(--space-md); 
}
@media (max-width: 968px) { 
    .metrics-row { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}
@media (max-width: 600px) { 
    .metrics-row { 
        grid-template-columns: 1fr 1fr; 
    }
    .metrics-row .metric-card:last-child {
        grid-column: span 2;
    }
}
@media (max-width: 400px) { 
    .metrics-row { 
        grid-template-columns: 1fr; 
    }
    .metrics-row .metric-card:last-child {
        grid-column: span 1;
    }
}
.metric-card { 
    background: var(--graphite); 
    border: 1px solid var(--slate); 
    border-radius: var(--radius-lg); 
    padding: var(--space-md); 
}
.metric-card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: var(--space-xs); 
}
.stat-card-label { color: var(--pewter); font-size: 0.875rem; }
.stat-card-clickable { cursor: pointer; transition: all 0.2s; }
.stat-card-clickable:hover { transform: translateY(-2px); border-color: var(--primary); }
.metric-card-value { font-size: 1.25rem; font-weight: 600; color: var(--pearl); }
@media (max-width: 600px) {
    .metric-card-value { font-size: 1.1rem; }
}
.metric-bar.large { height: 6px; background: var(--slate); border-radius: 3px; overflow: hidden; }

/* Detail Sections */
.detail-section { 
    background: var(--graphite); 
    border: 1px solid var(--slate); 
    border-radius: var(--radius-lg); 
    padding: var(--space-md); 
}
@media (max-width: 600px) {
    .detail-section { padding: var(--space-sm); }
}
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: var(--space-md); 
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.section-header h3 { 
    display: flex; 
    align-items: center; 
    gap: var(--space-sm); 
    color: var(--pearl); 
    font-size: 0.9rem; 
    font-weight: 600; 
}
.repo-info-card { display: flex; flex-direction: column; }
.repo-info-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: var(--space-sm) 0; 
    border-bottom: 1px solid var(--slate); 
    flex-wrap: wrap;
    gap: var(--space-xs);
}
.repo-info-row:last-child { border-bottom: none; }
.repo-info-label { color: var(--pewter); font-size: 0.8rem; }
.repo-info-value { color: var(--pearl); font-size: 0.8rem; text-align: right; }
.empty-state-small { text-align: center; padding: var(--space-lg); color: var(--pewter); }
.empty-state-small p { margin-bottom: var(--space-sm); font-size: 0.875rem; }

/* Task List - Mobile Optimized */
.task-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.task-item { 
    display: flex; 
    align-items: center; 
    gap: var(--space-sm); 
    padding: var(--space-sm); 
    background: var(--charcoal); 
    border-radius: var(--radius-md); 
    transition: all 0.2s; 
}
.task-item:hover { background: var(--slate); }
.task-item.task-completed { opacity: 0.6; }
.task-item.task-completed .task-title { text-decoration: line-through; }
.task-checkbox { 
    width: 22px; 
    height: 22px; 
    border: 2px solid var(--steel); 
    border-radius: 5px; 
    background: transparent; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--success); 
    transition: all 0.2s; 
    flex-shrink: 0; 
}
.task-checkbox:hover { border-color: var(--primary); }
.task-item.task-completed .task-checkbox { background: var(--success); border-color: var(--success); }
.task-content { flex: 1; min-width: 0; }
.task-title { display: block; color: var(--pearl); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-due { display: block; color: var(--pewter); font-size: 0.7rem; margin-top: 2px; }
.task-actions { display: flex; align-items: center; gap: var(--space-xs); }
.task-priority { font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 500; }
@media (max-width: 500px) {
    .task-priority { display: none; }
}
.priority-low { background: rgba(107, 114, 128, 0.2); color: var(--pewter); }
.priority-medium { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.priority-high { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.priority-critical { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.btn-icon-sm { 
    width: 26px; 
    height: 26px; 
    border: none; 
    background: transparent; 
    color: var(--pewter); 
    cursor: pointer; 
    border-radius: var(--radius-sm); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
}
.btn-icon-sm:hover { background: var(--slate); color: var(--danger); }

/* Info List */
.info-list { display: flex; flex-direction: column; }
.info-row { 
    display: flex; 
    justify-content: space-between; 
    padding: var(--space-xs) 0; 
    border-bottom: 1px solid var(--slate); 
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--pewter); font-size: 0.8rem; }
.info-value { color: var(--pearl); font-size: 0.8rem; }

/* Status Badges */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 500; text-transform: capitalize; }
.status-green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-yellow { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-gray { background: rgba(107, 114, 128, 0.2); color: var(--pewter); }
.status-blue { background: rgba(59, 130, 246, 0.2); color: var(--info); }

/* Buttons */
.btn-ghost { 
    background: transparent; 
    border: none; 
    color: var(--pewter); 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: var(--space-xs); 
    padding: var(--space-xs) var(--space-sm); 
    border-radius: var(--radius-sm); 
    transition: all 0.2s; 
    font-size: 0.875rem;
}
.btn-ghost:hover { color: var(--pearl); background: var(--slate); }
.page-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
@media (max-width: 600px) {
    .page-actions { gap: var(--space-xs); }
    .page-actions .btn-secondary,
    .page-actions .btn-danger-outline { 
        padding: var(--space-xs) var(--space-sm); 
        font-size: 0.8rem; 
    }
}

/* Page Header - Mobile */
.page-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    gap: var(--space-md);
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .page-header { flex-direction: column; }
    .page-header .page-title { width: 100%; }
    .page-header .page-actions { width: 100%; justify-content: flex-end; }
}
.page-title h1 { font-size: 1.5rem; margin-bottom: var(--space-xs); }
@media (max-width: 600px) {
    .page-title h1 { font-size: 1.25rem; }
}
.page-title > p { color: var(--pewter); font-size: 0.875rem; }

/* Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-3 { gap: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-pewter { color: var(--pewter); }

/* Project Screenshot/Preview - Mobile Optimized */
.project-screenshot-container { margin-bottom: var(--space-md); }
.screenshot-wrapper { 
    position: relative; 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    background: var(--graphite); 
    aspect-ratio: 16/9; 
}
@media (max-width: 968px) {
    .screenshot-wrapper { border-radius: var(--radius-md); }
}
.project-screenshot { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.screenshot-placeholder { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: var(--space-sm); 
    color: var(--pewter); 
    min-height: 180px;
}
.placeholder-icon { opacity: 0.4; }
.placeholder-icon svg { width: 40px; height: 40px; }
@media (max-width: 600px) {
    .placeholder-icon svg { width: 32px; height: 32px; }
}
.placeholder-text { font-size: 0.8rem; opacity: 0.6; }
.screenshot-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); 
    display: flex; 
    align-items: flex-end; 
    justify-content: center; 
    gap: var(--space-sm); 
    padding: var(--space-md); 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}
.screenshot-wrapper:hover .screenshot-overlay { opacity: 1; }
/* Always show overlay on touch devices */
@media (hover: none) {
    .screenshot-overlay { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%); }
}
.btn-overlay { 
    display: flex; 
    align-items: center; 
    gap: var(--space-xs); 
    padding: var(--space-xs) var(--space-md); 
    background: rgba(255,255,255,0.15); 
    backdrop-filter: blur(8px); 
    border: 1px solid rgba(255,255,255,0.2); 
    border-radius: var(--radius-md); 
    color: white; 
    font-size: 0.8rem; 
    font-weight: 500; 
    cursor: pointer; 
    transition: all 0.2s; 
    text-decoration: none; 
}
@media (max-width: 600px) {
    .btn-overlay { padding: var(--space-xs) var(--space-sm); font-size: 0.75rem; }
    .btn-overlay span { display: none; }
    .btn-overlay svg { width: 18px; height: 18px; }
}
.btn-overlay:hover { background: rgba(255,255,255,0.25); }
.btn-overlay:active { transform: scale(0.95); }
.btn-overlay-secondary { background: rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.4); }
.btn-overlay-secondary:hover { background: rgba(139,92,246,0.5); }
.screenshot-meta { margin-top: var(--space-xs); }
.app-url-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: var(--space-xs); 
    font-size: 0.7rem; 
    color: var(--pewter); 
    padding: 2px var(--space-sm); 
    background: var(--slate); 
    border-radius: var(--radius-sm); 
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-url-badge svg { width: 10px; height: 10px; flex-shrink: 0; }

/* Screenshot Modal Styles */
.form-divider { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-lg) 0; color: var(--pewter); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--slate); }
.form-hint { font-size: 0.75rem; color: var(--pewter); margin-top: var(--space-xs); }
.current-preview { margin-top: var(--space-lg); }
.preview-thumbnail { background: var(--charcoal); border: 1px solid var(--slate); border-radius: var(--radius-md); overflow: hidden; max-height: 150px; }
.preview-thumbnail img { width: 100%; height: auto; max-height: 150px; object-fit: cover; }

.login-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all 0.2s;
}

.login-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.login-submit svg { width: 18px; height: 18px; }

.login-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--steel);
    font-size: 0.875rem;
}

.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--slate);
}

.login-toggle { text-align: center; color: var(--pewter); font-size: 0.875rem; }
.login-toggle a { color: var(--primary-light); text-decoration: none; font-weight: 500; }
.login-toggle a:hover { text-decoration: underline; }

.login-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.75rem;
    color: var(--steel);
}

.hidden { display: none !important; }

/* ===== APP LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: var(--obsidian);
    border-right: 1px solid var(--graphite);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.app-main {
    flex: 1;
    margin-left: 260px;
    padding: var(--space-xl);
    min-height: 100vh;
    background: var(--void);
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--graphite);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-icon svg { width: 22px; height: 22px; color: white; }

.sidebar-logo-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pearl);
}

.sidebar-logo-version {
    display: block;
    font-size: 0.625rem;
    color: var(--pewter);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.sidebar-nav-section {
    margin-bottom: var(--space-lg);
}

.sidebar-nav-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.75rem var(--space-md);
    border-radius: var(--radius-lg);
    color: var(--silver);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.sidebar-nav-item:hover {
    background: var(--graphite);
    color: var(--pearl);
}

.sidebar-nav-item.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-nav-badge {
    margin-left: auto;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--success);
    color: white;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--graphite);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    transition: background 0.2s;
}

.sidebar-user:hover { background: var(--graphite); }

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { display: block; font-weight: 500; color: var(--pearl); font-size: 0.875rem; }
.sidebar-user-role { display: block; font-size: 0.75rem; color: var(--pewter); }

.sidebar-logout {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--pewter);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.sidebar-user:hover .sidebar-logout { opacity: 1; }
.sidebar-logout:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* ===== LOADING STATE ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    gap: var(--space-md);
}

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

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

.loading-state p { color: var(--pewter); font-size: 0.875rem; }

/* ===== DASHBOARD ===== */
.dashboard { max-width: 1400px; margin: 0 auto; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.dashboard-greeting h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--pearl);
    margin-bottom: var(--space-xs);
}

.dashboard-date { color: var(--pewter); font-size: 0.875rem; }

.dashboard-actions { display: flex; gap: var(--space-md); }

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

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

.btn-secondary {
    background: var(--graphite);
    border: 1px solid var(--slate);
    color: var(--cloud);
}

.btn-secondary:hover { background: var(--slate); border-color: var(--steel); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(1.1); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(1.1); }

.btn-primary svg, .btn-secondary svg, .btn-success svg, .btn-danger svg {
    width: 18px;
    height: 18px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.stat-card-primary::before { background: var(--primary); }
.stat-card-purple::before { background: linear-gradient(90deg, #8b5cf6, #a855f7); }
.stat-card-green::before { background: var(--success); }
.stat-card-blue::before { background: var(--info); }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    background: var(--graphite);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--silver);
}

.stat-card-icon svg { width: 20px; height: 20px; }

.stat-card-trend {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pearl);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--pewter);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

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

.dashboard-section {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pearl);
}

.section-header h2 svg { width: 18px; height: 18px; color: var(--primary-light); }

.section-link {
    font-size: 0.875rem;
    color: var(--primary-light);
    text-decoration: none;
}

.section-link:hover { text-decoration: underline; }

/* ===== PRIORITY CARDS ===== */
.priority-list { display: flex; flex-direction: column; gap: var(--space-md); }

.priority-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--graphite);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease-out backwards;
    animation-delay: var(--delay, 0s);
    cursor: pointer;
}

.priority-card:hover { background: var(--slate); transform: translateX(4px); border-left: 3px solid var(--primary); }

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

.priority-rank {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

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

.priority-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.priority-header h3 { font-size: 0.9375rem; font-weight: 600; color: var(--pearl); }
.priority-score { font-size: 0.875rem; font-weight: 600; color: var(--primary-light); }
.priority-reason { font-size: 0.8125rem; color: var(--pewter); margin-bottom: var(--space-sm); }

.priority-meta { display: flex; justify-content: space-between; align-items: center; }

.health-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
}

.health-bar {
    width: 60px;
    height: 4px;
    background: var(--slate);
    border-radius: 2px;
    overflow: hidden;
}

.health-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.health-healthy .health-fill, .health-fill.health-healthy { background: var(--success); }
.health-warning .health-fill, .health-fill.health-warning { background: var(--warning); }
.health-critical .health-fill, .health-fill.health-critical { background: var(--danger); }

.priority-status, .project-status {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.status-active, .status-green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-blocked, .status-red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.status-review, .status-yellow { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-planning, .status-blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.status-completed, .status-gray { background: var(--slate); color: var(--pewter); }
.status-purple { background: rgba(139, 92, 246, 0.15); color: var(--primary-light); }

/* ===== ACTIVITY FEED ===== */
.activity-feed { display: flex; flex-direction: column; }
.activity-badge { font-size: 0.75rem; font-weight: 500; color: var(--primary-light); }

.activity-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.activity-item:hover { background: var(--graphite); }
.activity-item.unread { background: rgba(139, 92, 246, 0.05); }

.activity-icon {
    width: 32px;
    height: 32px;
    background: var(--graphite);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg { width: 16px; height: 16px; color: var(--silver); }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-size: 0.875rem; color: var(--cloud); margin-bottom: 2px; }
.activity-message { font-size: 0.8125rem; color: var(--pewter); }
.activity-time { font-size: 0.75rem; color: var(--steel); }

/* ===== QUICK ACTIONS ===== */
.quick-actions { display: flex; flex-direction: column; gap: var(--space-sm); }

.quick-action {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--graphite);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.quick-action:hover {
    background: var(--slate);
    border-color: var(--primary);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-icon svg { width: 20px; height: 20px; color: var(--primary-light); }
.quick-action-text strong { display: block; color: var(--pearl); font-size: 0.9375rem; }
.quick-action-text span { font-size: 0.8125rem; color: var(--pewter); }

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    max-width: 600px;
    margin: var(--space-xl) auto;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--graphite);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.empty-state-icon svg { width: 40px; height: 40px; color: var(--pewter); }

.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pearl);
    margin-bottom: var(--space-md);
}

.empty-state p {
    color: var(--pewter);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.empty-state .btn-primary { margin: 0 auto; }

.empty-state-help {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--graphite);
    text-align: left;
}

.empty-state-help h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cloud);
    margin-bottom: var(--space-md);
}

.empty-state-help ol {
    list-style: none;
    counter-reset: step;
}

.empty-state-help li {
    counter-increment: step;
    padding: var(--space-sm) 0;
    padding-left: var(--space-xl);
    position: relative;
    color: var(--silver);
}

.empty-state-help li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--graphite);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
}

.empty-state-help li strong { color: var(--pearl); }

.empty-state-inline {
    padding: var(--space-lg);
    text-align: center;
    color: var(--pewter);
    font-size: 0.875rem;
}

/* ===== PAGE CONTAINER ===== */
.page-container { max-width: 1400px; margin: 0 auto; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--pearl);
    margin-bottom: var(--space-xs);
}

.page-title p { color: var(--pewter); font-size: 0.875rem; }

/* ===== PROJECT CARDS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.project-scale {
    font-size: 0.6875rem;
    color: var(--pewter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pearl);
    margin-bottom: var(--space-sm);
}

.project-desc {
    font-size: 0.875rem;
    color: var(--pewter);
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-metrics { margin-bottom: var(--space-lg); }

.metric { margin-bottom: var(--space-md); }
.metric:last-child { margin-bottom: 0; }

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: var(--space-xs);
}

.metric-header span:first-child { color: var(--pewter); }
.metric-value { font-weight: 600; color: var(--cloud); }
.metric-value.health-healthy { color: var(--success); }
.metric-value.health-warning { color: var(--warning); }
.metric-value.health-critical { color: var(--danger); }

.metric-bar {
    height: 6px;
    background: var(--slate);
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

.metric-fill.health-healthy { background: var(--success); }
.metric-fill.health-warning { background: var(--warning); }
.metric-fill.health-critical { background: var(--danger); }
.metric-fill.priority { background: var(--gradient-primary); }

.project-footer {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--graphite);
}

.project-agents, .project-tasks {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--pewter);
}

.project-agents svg, .project-tasks svg { width: 16px; height: 16px; }

/* ===== AGENTS PAGE ===== */
.agents-overview {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.swarm-status { display: flex; align-items: center; gap: var(--space-2xl); }

.swarm-visual {
    position: relative;
    width: 200px;
    height: 200px;
}

.swarm-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.swarm-center svg { width: 28px; height: 28px; color: white; }

.swarm-node {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--graphite);
    border: 2px solid var(--slate);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    animation: orbit 20s linear infinite;
    animation-delay: calc(var(--i) * -2.86s);
}

.swarm-node.working { border-color: var(--success); box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
.swarm-node.thinking { border-color: var(--primary); animation: pulse 2s ease-in-out infinite; }

@keyframes orbit {
    from { transform: rotate(0deg) translateX(70px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(70px) rotate(-360deg); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

.swarm-stats { display: flex; gap: var(--space-xl); }

.swarm-stat { text-align: center; }
.swarm-stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--pearl); }
.swarm-stat-label { font-size: 0.75rem; color: var(--pewter); text-transform: uppercase; }

.agents-section { margin-bottom: var(--space-xl); }
.section-title { font-size: 1.125rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-xs); }
.section-title.danger { color: var(--danger); }
.section-desc { font-size: 0.875rem; color: var(--pewter); margin-bottom: var(--space-lg); }

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.agent-card {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all 0.2s;
}

.agent-card:hover { border-color: var(--slate); }
.agent-card.working { border-color: var(--success); }
.agent-card.thinking { border-color: var(--primary); }

.agent-card-header { display: flex; gap: var(--space-md); margin-bottom: var(--space-lg); }

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.agent-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: var(--pewter);
    border: 2px solid var(--charcoal);
    border-radius: 50%;
}

.agent-card.working .agent-status-dot { background: var(--success); }
.agent-card.thinking .agent-status-dot { background: var(--primary); animation: pulse 2s infinite; }

.agent-info h3 { font-size: 1rem; font-weight: 600; color: var(--pearl); }
.agent-type { font-size: 0.8125rem; color: var(--pewter); }

.agent-task {
    background: var(--graphite);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.agent-task-label { font-size: 0.6875rem; color: var(--steel); text-transform: uppercase; margin-bottom: var(--space-xs); }
.agent-task p { font-size: 0.875rem; color: var(--cloud); }

.agent-stats { display: flex; justify-content: space-between; margin-bottom: var(--space-md); }
.agent-stat { text-align: center; }
.agent-stat-value { display: block; font-size: 1.25rem; font-weight: 600; color: var(--pearl); }
.agent-stat-label { font-size: 0.6875rem; color: var(--pewter); text-transform: uppercase; }

.agent-trust .trust-bar {
    height: 4px;
    background: var(--slate);
    border-radius: 2px;
    overflow: hidden;
}

.trust-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.5s;
}

.agent-types-preview { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

.agent-type-preview {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--graphite);
    border-radius: var(--radius-lg);
}

.agent-type-preview .agent-type-icon { font-size: 1.25rem; }
.agent-type-preview .agent-type-name { font-size: 0.875rem; color: var(--cloud); }

.agent-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--graphite);
}

.agent-actions .btn-sm {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

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

.agent-actions .btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.agent-actions .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.agent-actions .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.agent-actions .btn-secondary {
    background: var(--graphite);
    color: var(--cloud);
    border: 1px solid var(--slate);
}

.agent-actions .btn-secondary:hover { background: var(--slate); }

.agent-actions .btn-ghost {
    background: transparent;
    color: var(--pewter);
    border: none;
}

.agent-actions .btn-ghost:hover { color: var(--cloud); background: var(--graphite); }

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.activity-item {
    display: grid;
    grid-template-columns: 80px 120px 1fr;
    gap: var(--space-md);
    padding: var(--space-sm);
    background: var(--graphite);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.activity-time { color: var(--pewter); }
.activity-action { color: var(--primary); font-family: var(--font-mono); font-size: 0.75rem; }
.activity-summary { color: var(--cloud); }

.empty-state-sm {
    text-align: center;
    padding: var(--space-xl);
    color: var(--pewter);
}

/* Agent Project Display */
.agent-project {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--graphite);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 0.8125rem;
    color: var(--cloud);
}

.agent-project svg { width: 14px; height: 14px; color: var(--primary); }

/* Agent Inline Activity Log */
.agent-activity-log {
    background: var(--obsidian);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    max-height: 200px;
    overflow: hidden;
}

/* Expanded activity log - fills space to right */
.agent-activity-log.expanded {
    position: absolute;
    left: calc(100% + 16px);
    top: 0;
    bottom: 0;
    width: calc(100vw - 100% - 380px);
    min-width: 400px;
    max-width: 800px;
    max-height: none;
    margin: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s ease-out;
    z-index: 10;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Speech bubble arrow pointing to Activity button */
.agent-activity-log.expanded::before {
    content: '';
    position: absolute;
    left: -12px;
    bottom: 24px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid var(--graphite);
}

.agent-activity-log.expanded::after {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 25px;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-right: 11px solid var(--obsidian);
}

/* Make agent card relative for positioning */
.agent-card { position: relative; }

.activity-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--graphite);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cloud);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-log-header .btn-icon {
    background: none;
    border: none;
    color: var(--pewter);
    cursor: pointer;
    padding: 2px;
}

.activity-log-header .btn-icon:hover { color: var(--cloud); }
.activity-log-header .btn-icon svg { width: 14px; height: 14px; }

.activity-log-content {
    padding: var(--space-sm);
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.75rem;
}

.agent-activity-log.expanded .activity-log-content {
    max-height: calc(100% - 40px);
}

/* Close hint in expanded mode */
.activity-log-header .close-hint {
    display: none;
    font-size: 0.6875rem;
    color: var(--pewter);
    font-weight: 400;
    text-transform: none;
}

.agent-activity-log.expanded .activity-log-header .close-hint {
    display: inline;
}

.log-entry {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    background: var(--charcoal);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

/* Activity action type colors */
.log-entry.log-grey { border-left: 3px solid var(--pewter); }
.log-entry.log-grey .log-action { color: var(--pewter); }

.log-entry.log-green { border-left: 3px solid var(--success); }
.log-entry.log-green .log-action { color: var(--success); }

.log-entry.log-red { border-left: 3px solid var(--danger); }
.log-entry.log-red .log-action { color: var(--danger); }

.log-entry.log-yellow { border-left: 3px solid var(--warning); }
.log-entry.log-yellow .log-action { color: var(--warning); }

/* Legacy classes for findings */
.log-entry.log-error { border-left: 3px solid var(--danger); }
.log-entry.log-warning { border-left: 3px solid var(--warning); }
.log-entry.log-success { border-left: 3px solid var(--success); }
.log-entry.log-info { border-left: 3px solid var(--primary); }

.log-severity {
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
}

.log-entry.log-error .log-severity { color: var(--danger); }
.log-entry.log-warning .log-severity { color: var(--warning); }
.log-entry.log-success .log-severity { color: var(--success); }

.log-title { color: var(--pearl); flex: 1; }
.log-file { color: var(--pewter); font-family: var(--font-mono); font-size: 0.6875rem; width: 100%; }
.log-time { color: var(--steel); font-size: 0.6875rem; min-width: 60px; }
.log-action { color: var(--primary); font-family: var(--font-mono); font-size: 0.6875rem; }
.log-summary { color: var(--cloud); flex: 1; }

/* ===== DELIBERATIONS ===== */
.escalation-alert {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
}

.escalation-alert svg { width: 18px; height: 18px; }

.deliberations-section { margin-bottom: var(--space-xl); }
.deliberations-section.escalated .deliberation-card { border-color: rgba(239, 68, 68, 0.3); }
.deliberations-section.resolved .deliberation-card { opacity: 0.7; }

.deliberations-list { display: flex; flex-direction: column; gap: var(--space-md); }

.deliberation-card {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all 0.2s;
}

.deliberation-card:hover { border-color: var(--slate); }
.deliberation-card.escalated { background: rgba(239, 68, 68, 0.05); }

.deliberation-header { display: flex; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-md); }
.deliberation-status { font-size: 0.6875rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); text-transform: uppercase; }
.deliberation-project { font-size: 0.75rem; color: var(--pewter); }

.deliberation-topic { font-size: 1.125rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-sm); }
.deliberation-context { font-size: 0.875rem; color: var(--pewter); margin-bottom: var(--space-lg); }

.deliberation-progress { margin-bottom: var(--space-lg); }
.progress-header { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--pewter); margin-bottom: var(--space-xs); }

.progress-bar {
    height: 6px;
    background: var(--slate);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s;
}

.progress-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--steel); }

.deliberation-actions { display: flex; gap: var(--space-md); }
.deliberation-actions .btn-success, .deliberation-actions .btn-danger { flex: 1; justify-content: center; }

.deliberation-footer { font-size: 0.75rem; color: var(--steel); }
.deliberation-time { color: var(--pewter); }

.deliberation-flow { display: flex; align-items: center; justify-content: center; gap: var(--space-md); flex-wrap: wrap; }
.flow-step { text-align: center; max-width: 140px; }
.flow-icon { width: 48px; height: 48px; background: var(--graphite); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-sm); }
.flow-icon svg { width: 24px; height: 24px; color: var(--primary-light); }
.flow-step span { font-size: 0.8125rem; color: var(--pewter); }
.flow-arrow { font-size: 1.5rem; color: var(--slate); }

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

.modal {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-2xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease-out;
}

.modal-lg { max-width: 900px; }

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

.modal-container { padding: var(--space-xl); }

.modal-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    position: relative;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.modal-header h2 { font-size: 1.25rem; font-weight: 600; color: var(--pearl); }
.modal-header p { font-size: 0.875rem; color: var(--pewter); margin-top: var(--space-xs); }

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--pewter);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover { background: var(--graphite); color: var(--cloud); }

.modal-form { display: flex; flex-direction: column; gap: var(--space-lg); }
.form-textarea { font-family: var(--font-sans); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--graphite);
    margin-top: var(--space-lg);
}

/* Agent Type Selection */
.agent-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

@media (max-width: 900px) { .agent-type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .agent-type-grid { grid-template-columns: 1fr; } }

.agent-type-option { cursor: pointer; }
.agent-type-option input { display: none; }

.agent-type-card {
    background: var(--graphite);
    border: 2px solid var(--slate);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all 0.2s;
}

.agent-type-option:hover .agent-type-card { border-color: var(--steel); }
.agent-type-option input:checked + .agent-type-card { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); }

.agent-type-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.agent-type-card .agent-type-icon { font-size: 1.5rem; }
.agent-type-tier { font-size: 0.6875rem; padding: 2px 6px; background: var(--slate); border-radius: var(--radius-sm); color: var(--pewter); text-transform: uppercase; }
.agent-type-card h4 { font-size: 0.9375rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-xs); }
.agent-type-card p { font-size: 0.8125rem; color: var(--pewter); margin-bottom: var(--space-sm); }
.agent-type-model { font-size: 0.6875rem; color: var(--steel); font-family: var(--font-mono); }

/* ===== ONBOARDING ===== */
.onboarding { max-width: 900px; margin: 0 auto; padding: var(--space-xl) 0; }

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

.onboarding-header { margin-bottom: var(--space-2xl); }

.onboarding-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-glow);
}

.onboarding-icon svg { width: 40px; height: 40px; color: white; }

.onboarding-header h1 { font-size: 2rem; font-weight: 700; color: var(--pearl); margin-bottom: var(--space-sm); }
.onboarding-header p { font-size: 1.125rem; color: var(--pewter); }

.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 500px;
    margin: 0 auto var(--space-2xl);
    text-align: left;
}

.onboarding-step {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    opacity: 0.5;
    transition: all 0.3s;
}

.onboarding-step.active { opacity: 1; border-color: var(--primary); }

.step-number {
    width: 40px;
    height: 40px;
    background: var(--graphite);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--pewter);
    flex-shrink: 0;
}

.onboarding-step.active .step-number { background: var(--gradient-primary); color: white; }

.step-content h3 { font-size: 1rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-xs); }
.step-content p { font-size: 0.875rem; color: var(--pewter); margin-bottom: var(--space-md); }

.onboarding-features { text-align: center; }
.onboarding-features h2 { font-size: 1.25rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-lg); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 500px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.feature-icon svg { width: 24px; height: 24px; color: var(--primary-light); }

.feature-card h4 { font-size: 0.9375rem; font-weight: 600; color: var(--pearl); margin-bottom: var(--space-xs); }
.feature-card p { font-size: 0.8125rem; color: var(--pewter); }

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--charcoal);
    border: 1px solid var(--graphite);
    border-radius: var(--radius-lg);
    color: var(--cloud);
    font-size: 0.9375rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    z-index: 2000;
}

.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }

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

/* ===== GIT INTEGRATION ===== */
.git-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.git-provider-card {
    background: var(--nexus-obsidian);
    border: 1px solid var(--nexus-graphite);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.2s ease;
}

.git-provider-card:hover {
    border-color: var(--nexus-pewter);
}

.git-provider-card.connected {
    border-color: var(--status-success);
}

.provider-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.provider-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.provider-icon svg {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
}

.provider-info {
    flex: 1;
}

.provider-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--nexus-white);
    margin-bottom: 4px;
}

.provider-info p {
    font-size: 0.875rem;
    color: var(--nexus-pewter);
}

.provider-status .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.provider-status .status-badge svg {
    width: 14px;
    height: 14px;
}

.provider-status .status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-success);
}

.provider-status .status-badge.neutral {
    background: var(--nexus-graphite);
    color: var(--nexus-pewter);
}

.provider-details {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--nexus-graphite);
    border-bottom: 1px solid var(--nexus-graphite);
    margin-bottom: var(--space-md);
}

.provider-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.provider-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
}

.provider-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--nexus-graphite);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--nexus-pewter);
}

.provider-username {
    font-weight: 500;
    color: var(--nexus-white);
}

.provider-email {
    font-size: 0.875rem;
    color: var(--nexus-pewter);
}

.provider-meta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.75rem;
    color: var(--nexus-pewter);
}

.meta-item.warning {
    color: var(--status-warning);
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item.warning svg {
    width: 14px;
    height: 14px;
}

.provider-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.provider-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.provider-actions button svg {
    width: 16px;
    height: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid var(--status-critical);
    color: var(--status-critical);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Git Repos Modal */
.repo-list {
    max-height: 400px;
    overflow-y: auto;
}

.repo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--nexus-graphite);
}

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

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

.repo-name {
    font-weight: 500;
    color: var(--nexus-white);
    display: flex;
    align-items: center;
    gap: 6px;
}

.repo-name svg {
    width: 14px;
    height: 14px;
    color: var(--nexus-pewter);
}

.repo-description {
    font-size: 0.875rem;
    color: var(--nexus-pewter);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repo-meta {
    display: flex;
    gap: var(--space-md);
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--nexus-pewter);
}

/* Global SVG constraint */
svg {
    flex-shrink: 0;
    max-width: 100%;
    max-height: 100%;
}

/* Constrain SVGs that appear inline in text */
h1 svg, h2 svg, h3 svg, p svg, span svg, button svg, a svg, label svg {
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    display: inline-block;
}

/* Empty state icons */
.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nexus-graphite);
    border-radius: var(--radius-lg);
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

/* Section titles with icons */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--nexus-white);
}

.section-title svg {
    width: 20px;
    height: 20px;
}

.section-title.danger {
    color: var(--status-critical);
}

/* Deliberation flow icons */
.flow-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nexus-graphite);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.flow-icon svg {
    width: 20px;
    height: 20px;
}

.deliberation-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.flow-step {
    text-align: center;
    max-width: 150px;
}

.flow-step span {
    font-size: 0.75rem;
    color: var(--nexus-pewter);
    display: block;
}

.flow-arrow {
    color: var(--nexus-pewter);
    font-size: 1.5rem;
}

/* Escalation alert */
.escalation-alert {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--status-critical);
    border-radius: var(--radius-md);
    color: var(--status-critical);
    font-weight: 500;
}

.escalation-alert svg {
    width: 18px;
    height: 18px;
}

/* Git Repositories Section */
.git-repos-section {
    margin-top: var(--space-xl);
}

.git-repos-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.git-repos-section .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--nexus-white);
}

.section-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.search-box .input-field {
    width: 240px;
    padding: 8px 12px;
    background: var(--nexus-obsidian);
    border: 1px solid var(--nexus-graphite);
    border-radius: var(--radius-md);
    color: var(--nexus-white);
    font-size: 0.875rem;
}

.search-box .input-field:focus {
    border-color: var(--accent-primary);
    outline: none;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--nexus-obsidian);
    border: 1px solid var(--nexus-graphite);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-toggle-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--nexus-pewter);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn:hover {
    background: var(--nexus-graphite);
    color: var(--nexus-white);
}

.view-toggle-btn.active {
    background: var(--accent-primary);
    color: var(--nexus-white);
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.provider-repos {
    margin-bottom: var(--space-xl);
}

.provider-repos-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--nexus-white);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--nexus-graphite);
}

.provider-repos-title svg {
    width: 20px;
    height: 20px;
}

.repo-count {
    font-weight: 400;
    color: var(--nexus-pewter);
    font-size: 0.875rem;
}

/* View modes - Row is default */
.repos-view-row .repos-grid { display: none !important; }
.repos-view-row .repos-list { display: block !important; }
.repos-view-card .repos-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-lg); }
.repos-view-card .repos-list { display: none !important; }

.repos-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--nexus-pewter);
}

/* ═══════════════════════════════════════════════════════════════ */
/* ROW VIEW - Professional Table Layout                            */
/* ═══════════════════════════════════════════════════════════════ */
.repos-list {
    background: var(--nexus-obsidian);
    border: 1px solid var(--nexus-graphite);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.repo-row {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 100px 60px 60px 110px 80px;
    align-items: center;
    gap: var(--space-md);
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s ease;
}

.repo-row:last-child { border-bottom: none; }
.repo-row:hover { background: rgba(255,255,255,0.03); }

.repo-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.repo-row-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    color: var(--nexus-pewter);
    flex-shrink: 0;
}

.repo-row-icon svg { width: 16px !important; height: 16px !important; max-width: 16px; max-height: 16px; }

.repo-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.repo-row-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--nexus-white);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repo-row-name:hover { color: var(--accent-primary); }

.repo-row-badges {
    display: flex;
    gap: 6px;
}

.repo-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.repo-badge-fork {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.repo-badge-private {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.repo-row-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--nexus-pewter);
}

.repo-row-stars,
.repo-row-forks {
    font-size: 0.8rem;
    color: var(--nexus-pewter);
    text-align: center;
}

.repo-row-updated {
    font-size: 0.75rem;
    color: var(--nexus-pewter);
    opacity: 0.7;
    text-align: right;
}

.repo-row-actions { flex-shrink: 0; }

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

/* ═══════════════════════════════════════════════════════════════ */
/* CARD VIEW - Rich Visual Cards                                   */
/* ═══════════════════════════════════════════════════════════════ */
.repo-card {
    background: linear-gradient(145deg, var(--nexus-obsidian), rgba(30,30,35,1));
    border: 1px solid var(--nexus-graphite);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.repo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.repo-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

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

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

.repo-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    color: var(--nexus-pewter);
}

.repo-card-icon svg { width: 20px !important; height: 20px !important; max-width: 20px; max-height: 20px; }

/* Global SVG constraints for repo views */
.repo-row svg, .repo-card svg, .repos-list svg, .repos-grid svg {
    max-width: 24px !important;
    max-height: 24px !important;
}

.provider-repos-title svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
}

.repo-card-badges {
    display: flex;
    gap: 6px;
}

.repo-card-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--nexus-white);
    text-decoration: none;
    margin-bottom: 8px;
    display: block;
    line-height: 1.3;
}

.repo-card-name:hover { color: var(--accent-primary); }

.repo-card-desc {
    font-size: 0.85rem;
    color: var(--nexus-pewter);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    opacity: 0.85;
}

.repo-card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--nexus-pewter);
    margin-bottom: 16px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.repo-card-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.repo-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.repo-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.repo-card-updated {
    font-size: 0.75rem;
    color: var(--nexus-pewter);
    opacity: 0.6;
}

.error-text {
    color: var(--status-critical);
    text-align: center;
    padding: var(--space-md);
}

/* Button variants */
.btn-outline {
    background: transparent;
    border: 1px solid var(--nexus-graphite);
    color: var(--nexus-white);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Git Benefits Section */
.git-help-section {
    margin-top: var(--space-xl);
}

.git-help-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--nexus-white);
    margin-bottom: var(--space-md);
}

.git-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.benefit-card {
    padding: var(--space-md);
}

.benefit-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nexus-white);
    margin-bottom: var(--space-xs);
}

.benefit-card p {
    font-size: 0.85rem;
    color: var(--nexus-pewter);
    line-height: 1.4;
}

.benefit-icon {
    margin-bottom: var(--space-sm);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

/* ===== IMPORTED REPOSITORIES ===== */
.imported-repos-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--slate);
}

.imported-repos-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.imported-repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.imported-repo-card {
    background: var(--graphite);
    border: 1px solid var(--slate);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all 0.2s ease;
}

.imported-repo-card:hover {
    border-color: var(--steel);
    box-shadow: var(--shadow-md);
}

.imported-repo-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.imported-repo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.imported-repo-icon svg {
    width: 20px;
    height: 20px;
    color: var(--silver);
}

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

.imported-repo-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 var(--space-xs) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imported-repo-branch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--pewter);
}

.imported-repo-branch svg {
    width: 12px;
    height: 12px;
}

.sync-progress {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.sync-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--slate);
    border-radius: 3px;
    overflow: hidden;
}

.sync-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sync-progress-text {
    font-size: 0.75rem;
    color: var(--silver);
    font-weight: 500;
    min-width: 35px;
}

.sync-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
}

.sync-error .error-text {
    font-size: 0.75rem;
    color: var(--danger);
}

.imported-repo-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.imported-repo-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--pewter);
}

.imported-repo-stats .stat-item svg {
    width: 12px;
    height: 12px;
}

.imported-repo-languages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.lang-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--slate);
    border-radius: 10px;
    color: var(--silver);
    border-left: 2px solid var(--lang-color, var(--pewter));
}

.imported-repo-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Repository Detail View */
.repo-detail-view {
    padding: var(--space-lg);
}

.repo-detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--slate);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: transparent;
    border: none;
    color: var(--silver);
    cursor: pointer;
    font-size: 0.875rem;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--slate);
    color: var(--white);
}

.repo-detail-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.repo-detail-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate);
    border-radius: var(--radius-md);
}

.repo-detail-icon svg {
    width: 24px;
    height: 24px;
    color: var(--silver);
}

.repo-detail-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.repo-detail-url {
    font-size: 0.8rem;
    color: var(--pewter);
    text-decoration: none;
}

.repo-detail-url:hover {
    color: var(--primary-light);
}

.repo-detail-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
}

/* File Browser */
.repo-file-browser {
    background: var(--graphite);
    border: 1px solid var(--slate);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.file-browser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--slate);
    background: var(--charcoal);
}

.file-browser-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.current-branch {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--pewter);
}

.current-branch svg {
    width: 14px;
    height: 14px;
}

.branch-select {
    background: var(--slate);
    border: 1px solid var(--steel);
    border-radius: var(--radius-sm);
    color: var(--white);
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.file-browser-path {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-md);
    background: var(--charcoal);
    border-bottom: 1px solid var(--slate);
    font-size: 0.8rem;
    color: var(--pewter);
    overflow-x: auto;
}

.path-segment {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
}

.path-segment:hover {
    background: var(--slate);
    color: var(--white);
}

.file-list {
    max-height: 500px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--slate);
    cursor: pointer;
    transition: background 0.15s;
}

.file-item:hover {
    background: var(--slate);
}

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

.file-item.directory .file-name {
    color: var(--primary-light);
}

.file-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    width: 16px;
    height: 16px;
    color: var(--pewter);
}

.file-item.directory .file-icon svg {
    color: var(--warning);
}

.file-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--cloud);
}

.file-size {
    font-size: 0.75rem;
    color: var(--pewter);
}

.file-ext {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 2px;
    background: var(--slate);
    color: var(--silver);
}

.file-ext.js { background: #f7df1e20; color: #f7df1e; }
.file-ext.ts { background: #3178c620; color: #3178c6; }
.file-ext.jsx, .file-ext.tsx { background: #61dafb20; color: #61dafb; }
.file-ext.php { background: #777bb420; color: #777bb4; }
.file-ext.py { background: #3572a520; color: #3572a5; }
.file-ext.css, .file-ext.scss { background: #563d7c20; color: #a86cdb; }
.file-ext.html { background: #e34c2620; color: #e34c26; }
.file-ext.json { background: #29292920; color: #9e9e9e; }
.file-ext.md { background: #08345120; color: #519aba; }

/* Sidebar */
.repo-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sidebar-section {
    background: var(--graphite);
    border: 1px solid var(--slate);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.sidebar-section h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 var(--space-md) 0;
}

.sidebar-section h3 svg {
    width: 16px;
    height: 16px;
    color: var(--pewter);
}

/* Branch List */
.branch-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.branch-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--charcoal);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.branch-name {
    flex: 1;
    color: var(--cloud);
    font-family: monospace;
}

.branch-item.default .branch-name {
    color: var(--primary-light);
}

.branch-item.agent .branch-name {
    color: var(--secondary);
}

.badge-default, .badge-agent {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.badge-default {
    background: var(--primary);
    color: var(--white);
}

.badge-agent {
    background: var(--secondary);
    color: var(--void);
}

.branch-item.more {
    color: var(--pewter);
    font-style: italic;
}

/* Commit List */
.commit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.commit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--slate);
}

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

.commit-sha {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--primary-light);
    background: var(--slate);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

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

.commit-message {
    display: block;
    font-size: 0.8rem;
    color: var(--cloud);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commit-meta {
    font-size: 0.7rem;
    color: var(--pewter);
}

.commit-item.agent-commit {
    background: rgba(6, 182, 212, 0.05);
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    margin: 0 calc(-1 * var(--space-xs));
}

/* Stats Grid */
.repo-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.stat-box {
    text-align: center;
    padding: var(--space-sm);
    background: var(--charcoal);
    border-radius: var(--radius-sm);
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--pewter);
}

/* File Viewer Modal */
.modal-lg {
    max-width: 900px;
}

.file-path-display {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--pewter);
}

.file-content {
    background: var(--void);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow: auto;
    max-height: 500px;
    margin: 0;
}

.file-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--cloud);
    white-space: pre;
}

.empty-text {
    color: var(--pewter);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--space-lg);
}

.empty-state-inline {
    background: var(--graphite);
    border: 1px dashed var(--slate);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.empty-state-inline p {
    color: var(--pewter);
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .repo-detail-content {
        grid-template-columns: 1fr;
    }
    
    .repo-detail-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-main { margin-left: 0; }
    .dashboard-header { flex-direction: column; gap: var(--space-md); }
    .dashboard-actions { width: 100%; }
    .dashboard-actions button { flex: 1; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .git-providers-grid { grid-template-columns: 1fr; }
    .imported-repos-grid { grid-template-columns: 1fr; }
    .repo-detail-header { flex-wrap: wrap; }
}
