/* 
 * Palantir-Inspired Professional Dashboard Theme
 * Replaces neon colors with muted, professional enterprise styling
 */

:root {
    /* Professional Color Palette - Palantir-Inspired */
    --palantir-bg-primary: #0e141b;
    --palantir-bg-secondary: #1C1C1E;
    --palantir-bg-tertiary: #242426;
    --palantir-bg-card: #1E1E20;
    
    /* Palantir Section Header Styling */
    --section-title-bg: linear-gradient(90deg, #1e293b 0%, #2d3748 100%);
    --section-title-border: rgba(255, 255, 255, 0.08);
    --section-title-text: #e2e8f0;
    --section-title-subtext: #94a3b8;
    
    /* Text Colors - Refined Slate Tones */
    --palantir-text-primary: #e2e8f0;
    --palantir-text-secondary: #94a3b8;
    --palantir-text-muted: #64748b;
    
    /* Professional Accent Colors */
    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --section-glow: rgba(59, 130, 246, 0.15);
    --palantir-blue: #3b82f6;
    --palantir-teal: #14B8A6;
    --palantir-cyan: #06B6D4;
    --palantir-green: #10B981;
    --palantir-yellow: #F59E0B;
    --palantir-red: #EF4444;
    
    /* Refined Gradients - Enterprise Grade */
    --gradient-blue: linear-gradient(90deg, #1e293b 0%, #2d3748 100%);
    --gradient-blue-accent: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --gradient-teal: linear-gradient(90deg, #1e293b 0%, #2d3748 100%);
    --gradient-cyan: linear-gradient(90deg, #1e293b 0%, #2d3748 100%);
    --gradient-green: linear-gradient(90deg, #1e293b 0%, #2d3748 100%);
    --gradient-red: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --gradient-yellow: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    
    /* Border & Divider Colors */
    --palantir-border: rgba(255, 255, 255, 0.08);
    --palantir-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --palantir-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --palantir-font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override Arkham Variables with Professional Colors */
.palantir-dashboard {
    --bg-primary: var(--palantir-bg-primary);
    --bg-secondary: var(--palantir-bg-secondary);
    --bg-tertiary: var(--palantir-bg-tertiary);
    --text-primary: var(--palantir-text-primary);
    --text-secondary: var(--palantir-text-secondary);
    --text-muted: var(--palantir-text-muted);
    --border-subtle: var(--palantir-border);
    
    /* Replace neon colors with muted professional ones */
    --primary-green: var(--palantir-green);
    --primary-cyan: var(--palantir-blue);
    --success-green: var(--palantir-green);
    --danger-red: var(--palantir-red);
    --warning-gold: var(--palantir-yellow);
    --warning-yellow: var(--palantir-yellow);
    
    /* Override Arkham colors */
    --arkham-darker: var(--palantir-bg-primary);
    --arkham-dark: var(--palantir-bg-secondary);
    --arkham-dark-accent: var(--palantir-bg-tertiary);
    --arkham-border: var(--palantir-border);
    --arkham-highlight: var(--palantir-blue);
    --arkham-success: var(--palantir-green);
    --arkham-warning: var(--palantir-yellow);
    --arkham-danger: var(--palantir-red);
    --arkham-muted: var(--palantir-text-secondary);
    --neon-blue: var(--palantir-blue);
    --neon-purple: var(--palantir-blue);
    
    background-color: var(--palantir-bg-primary);
    color: var(--palantir-text-primary);
    font-family: var(--palantir-font-family);
}

/* ===== DASHBOARD CARDS ===== */

/* Main Quick Action Cards - Professional Styling */
.palantir-dashboard .modern-card {
    background: var(--palantir-bg-card);
    border: 1px solid var(--palantir-border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.palantir-dashboard .modern-card-header {
    background: var(--section-title-bg);
    color: var(--section-title-text);
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--section-title-border);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px var(--section-glow);
}

.palantir-dashboard .modern-card-body {
    padding: 1.25rem;
    background: var(--palantir-bg-card);
    color: var(--section-title-subtext);
}

/* Quick Action Cards - Muted Gradients */
.palantir-dashboard .palantir-header-green {
    background: var(--gradient-blue) !important;
    color: white !important;
}

.palantir-dashboard .palantir-header-red {
    background: var(--gradient-red) !important;
    color: white !important;
}

.palantir-dashboard .palantir-header-blue {
    background: var(--gradient-blue) !important;
    color: white !important;
}

.palantir-dashboard .palantir-header-yellow {
    background: var(--gradient-yellow) !important;
    color: white !important;
}

.palantir-dashboard .palantir-header-cyan {
    background: var(--gradient-blue) !important;
    color: white !important;
}

.palantir-dashboard .palantir-header-teal {
    background: var(--gradient-blue) !important;
    color: white !important;
}

/* ===== BUTTONS ===== */

/* Primary Buttons - Professional Blue */
.palantir-dashboard .btn-modern-primary,
.palantir-dashboard .btn-modern-success {
    background: var(--gradient-blue-accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px var(--section-glow);
}

.palantir-dashboard .btn-modern-primary:hover,
.palantir-dashboard .btn-modern-success:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--section-glow);
}

/* Secondary Buttons - Muted Gray */
.palantir-dashboard .btn-modern-secondary {
    background: var(--palantir-bg-tertiary);
    color: var(--palantir-text-primary);
    border: 1px solid var(--palantir-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.palantir-dashboard .btn-modern-secondary:hover {
    background: var(--palantir-bg-secondary);
    border-color: var(--palantir-border-hover);
    transform: translateY(-1px);
}

/* Danger Buttons - Muted Red */
.palantir-dashboard .btn-modern-danger {
    background: var(--palantir-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.palantir-dashboard .btn-modern-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Warning Buttons - Muted Yellow */
.palantir-dashboard .btn-modern-warning {
    background: var(--palantir-yellow);
    color: #1C1C1E;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.palantir-dashboard .btn-modern-warning:hover {
    background: #D97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Small Button Variants */
.palantir-dashboard .btn-modern-xs,
.palantir-dashboard .btn-modern-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* ===== BADGES ===== */

/* Professional Badge Styling */
.palantir-dashboard .badge-modern,
.palantir-dashboard .badge-modern-secondary {
    background: var(--palantir-bg-tertiary);
    color: var(--palantir-text-primary);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    border: 1px solid var(--palantir-border);
}

.palantir-dashboard .badge-modern-cyan {
    background: rgba(59, 130, 246, 0.15);
    color: var(--palantir-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.palantir-dashboard .badge-modern-success {
    background: rgba(59, 130, 246, 0.15);
    color: var(--palantir-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.palantir-dashboard .badge-modern-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--palantir-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ===== TRENDING SECTIONS ===== */

/* Trending Mission/Scam/Investigation Cards */
.palantir-dashboard .modern-section .modern-card > .modern-card {
    background: var(--palantir-bg-secondary);
    border: 1px solid var(--palantir-border);
    transition: all var(--transition-base);
}

.palantir-dashboard .modern-section .modern-card > .modern-card:hover {
    background: var(--palantir-bg-tertiary);
    border-color: var(--palantir-border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Section Headers - Palantir-Inspired Slate Gradients */
.palantir-dashboard .modern-section > .modern-card > .modern-card-header {
    background: var(--section-title-bg);
    border-bottom: 1px solid var(--section-title-border);
    box-shadow: 0 2px 8px var(--section-glow);
}

/* Trending Missions Header */
.palantir-dashboard .modern-section:nth-of-type(3) .modern-card-header {
    background: var(--section-title-bg);
    border-bottom: 1px solid var(--section-title-border);
    box-shadow: 0 2px 8px var(--section-glow);
}

/* Trending Scam Reports Header */
.palantir-dashboard .modern-section:nth-of-type(4) .modern-card-header {
    background: var(--section-title-bg);
    border-bottom: 1px solid var(--section-title-border);
    box-shadow: 0 2px 8px var(--section-glow);
}

/* Trending Investigations Header */
.palantir-dashboard .modern-section:nth-of-type(5) .modern-card-header {
    background: var(--section-title-bg);
    border-bottom: 1px solid var(--section-title-border);
    box-shadow: 0 2px 8px var(--section-glow);
}

/* ===== ACTIVITY FEED ===== */

/* Palantir-Style Activity Feed */
.palantir-dashboard .activity-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--palantir-border) !important;
    transition: background var(--transition-fast);
}

.palantir-dashboard .activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.palantir-dashboard .activity-item:last-child {
    border-bottom: none !important;
}

.palantir-dashboard .activity-icon i {
    color: var(--palantir-blue);
}

.palantir-dashboard .activity-content strong {
    color: var(--palantir-text-primary);
    font-weight: 500;
}

.palantir-dashboard .activity-content .text-secondary {
    color: var(--palantir-text-secondary) !important;
}

.palantir-dashboard .activity-content .text-muted {
    color: var(--palantir-text-muted) !important;
    font-size: 0.75rem;
}

/* Activity Feed Header */
.palantir-dashboard .modern-section:has(.activity-item) > .modern-card > .modern-card-header {
    background: var(--section-title-bg);
    border-bottom: 1px solid var(--section-title-border);
    box-shadow: 0 2px 8px var(--section-glow);
}

/* LIVE Badge - Subtle Blue */
.palantir-dashboard .modern-card-header .badge-modern {
    background: rgba(59, 130, 246, 0.2);
    color: var(--palantir-blue);
    border: 1px solid rgba(59, 130, 246, 0.4);
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
}

.palantir-dashboard .palantir-live-badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--palantir-blue) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    font-size: 0.6875rem !important;
    padding: 0.125rem 0.5rem !important;
}

/* ===== LEADERBOARD ===== */

/* Leaderboard Container */
.palantir-dashboard .leaderboard-container {
    background: transparent;
}

/* Leaderboard Tabs - Clean Segmented Controls */
.palantir-dashboard .leaderboard-container .nav-tabs {
    border-bottom: 1px solid var(--palantir-border) !important;
    background: transparent;
}

.palantir-dashboard .leaderboard-container .nav-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--palantir-text-secondary) !important;
    padding: 0.75rem 1.25rem;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    font-weight: 500;
}

.palantir-dashboard .leaderboard-container .nav-tabs .nav-link:hover {
    color: var(--palantir-text-primary) !important;
    background: rgba(255, 255, 255, 0.03);
}

.palantir-dashboard .leaderboard-container .nav-tabs .nav-link.active {
    color: var(--palantir-blue) !important;
    border-bottom-color: var(--palantir-blue) !important;
    background: rgba(59, 130, 246, 0.05);
}

/* Leaderboard Items - Muted Backgrounds */
.palantir-dashboard .leaderboard-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--palantir-border) !important;
    transition: all var(--transition-base);
}

.palantir-dashboard .leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--palantir-blue) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Leaderboard Rank Badges - Muted Colors */
.palantir-dashboard .leaderboard-item .rank-badge i {
    filter: brightness(0.9);
}

/* Leaderboard Stat Badges */
.palantir-dashboard .leaderboard-item .badge {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
}

.palantir-dashboard .leaderboard-item .badge[style*="background-color: var(--primary-green)"] {
    background-color: var(--palantir-blue) !important;
}

.palantir-dashboard .leaderboard-item .badge[style*="background-color: var(--success-green)"] {
    background-color: var(--palantir-blue) !important;
}

.palantir-dashboard .leaderboard-item .badge[style*="background-color: var(--warning-gold)"] {
    background-color: var(--palantir-yellow) !important;
    color: #1C1C1E !important;
}

/* Leaderboard Filter Controls */
.palantir-dashboard .leaderboard-container .form-select {
    background-color: var(--palantir-bg-tertiary);
    border-color: var(--palantir-border);
    color: var(--palantir-text-primary);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.palantir-dashboard .leaderboard-container .form-select:focus {
    border-color: var(--palantir-blue);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
    background-color: var(--palantir-bg-secondary);
}

.palantir-dashboard .leaderboard-container .form-select:hover {
    border-color: var(--palantir-border-hover);
}

/* ===== WELCOME SECTION ===== */

.palantir-dashboard .welcome-section {
    background-color: var(--palantir-bg-secondary);
    border-bottom: 1px solid var(--palantir-border);
}

.palantir-dashboard .welcome-section h2 {
    color: var(--palantir-text-primary);
    font-weight: 600;
}

.palantir-dashboard .welcome-section .text-muted {
    color: var(--palantir-text-secondary) !important;
}

/* Onboarding Progress - Professional Blue */
.palantir-dashboard .onboarding-compact .badge,
.palantir-dashboard .user-level-compact .badge {
    background-color: var(--palantir-blue) !important;
    color: white !important;
}

.palantir-dashboard .onboarding-compact .progress-bar {
    background: var(--palantir-blue) !important;
}

.palantir-dashboard .user-level-compact .progress-bar {
    background: var(--palantir-blue) !important;
}

.palantir-dashboard .onboarding-compact a,
.palantir-dashboard .user-level-compact a {
    color: var(--palantir-blue) !important;
}

.palantir-dashboard .onboarding-compact a:hover,
.palantir-dashboard .user-level-compact a:hover {
    color: #2563EB !important;
    text-decoration: underline;
}

/* ===== SEARCH BAR ===== */

.palantir-dashboard .search-bar-container {
    background-color: var(--palantir-bg-secondary);
    border-bottom: 1px solid var(--palantir-border);
}

.palantir-dashboard #global-search {
    background-color: var(--palantir-bg-tertiary) !important;
    color: var(--palantir-text-primary);
    border: 1px solid var(--palantir-border);
    transition: all var(--transition-fast);
}

.palantir-dashboard #global-search:focus {
    background-color: var(--palantir-bg-secondary) !important;
    border-color: var(--palantir-blue);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

/* ===== TASK CENTER (PI Users) ===== */

.palantir-dashboard .modern-section:has(#taskCenterContent) .modern-card-header {
    background: var(--section-title-bg);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--section-glow);
}

.palantir-dashboard .modern-section:has(#taskCenterContent) .modern-card-body {
    background: var(--palantir-bg-card);
}

/* ===== TYPOGRAPHY ===== */

.palantir-dashboard h1,
.palantir-dashboard h2,
.palantir-dashboard h3,
.palantir-dashboard h4,
.palantir-dashboard h5,
.palantir-dashboard h6 {
    color: var(--palantir-text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.palantir-dashboard .text-uppercase {
    letter-spacing: 0.02em;
}

.palantir-dashboard .text-light {
    color: var(--palantir-text-primary) !important;
}

.palantir-dashboard .text-secondary {
    color: var(--palantir-text-secondary) !important;
}

.palantir-dashboard .text-muted {
    color: var(--palantir-text-muted) !important;
}

.palantir-dashboard .text-info {
    color: var(--palantir-blue) !important;
}

.palantir-dashboard .text-success {
    color: var(--palantir-green) !important;
}

.palantir-dashboard .text-warning {
    color: var(--palantir-yellow) !important;
}

.palantir-dashboard .text-danger {
    color: var(--palantir-red) !important;
}

/* ===== STAT VALUES ===== */

.palantir-dashboard .stat-value {
    color: var(--palantir-text-primary);
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .palantir-dashboard .modern-card-header {
        font-size: 0.8125rem;
        padding: 0.75rem 0.875rem;
    }
    
    .palantir-dashboard .modern-card-body {
        padding: 1rem;
    }
    
    .palantir-dashboard .btn-modern-primary,
    .palantir-dashboard .btn-modern-secondary,
    .palantir-dashboard .btn-modern-danger,
    .palantir-dashboard .btn-modern-warning {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }
}

/* ===== ANIMATIONS ===== */

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

.palantir-dashboard .animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.palantir-dashboard .animate-delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.palantir-dashboard .animate-delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.palantir-dashboard .animate-delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}
