/* Palette AI - Base Styles */
/* Reset, typography, core variables, and utilities */

/* ============================================================================
   DARK THEME VARIABLES - Phase 1
   ============================================================================ */

/* ============================================================================
   CSS VARIABLES - LIGHT & DARK THEMES
   ============================================================================ */

   :root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --border-hover: #9ca3af;
    
    --accent-primary: #007aff;
    --accent-hover: #0051d5;
    --accent-light: #e0f2fe;
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transition System - Phase 10 */
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 350ms;
    --transition-pane: 400ms;
    --easing: cubic-bezier(0.4, 0.0, 0.2, 1);
    
    /* Legacy - kept for compatibility */
    --transition-speed: 200ms;
}

/* ============================================================================
   MODERN DARK THEME - PHASE 10.5 (LibreChat-inspired)
   ============================================================================ */

/* Set dark as default - no theme attribute needed */
:root,
[data-theme="dark"] {
    /* Backgrounds - Layered depth */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #343541;
    --bg-hover: #3e3e4e;
    
    /* Text - Optimized contrast */
    --text-primary: #ececf1;
    --text-secondary: #c5c5d2;
    --text-tertiary: #8e8ea0;
    --text-muted: #6e6e80;
    
    /* Borders - Subtle */
    --border-primary: #3e3e4e;
    --border-secondary: #2a2a2a;
    --border-hover: #565869;
    
    /* Accent - Modern green (LibreChat style) */
    --accent-primary: #10a37f;
    --accent-hover: #0d8c6d;
    --accent-light: #1a9c7f;
    --accent-secondary: #19c37d; /* For gradients */
    
    /* Status colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Shadows - Enhanced depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Keep light theme for users who want it */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-muted: #d1d5db;
    
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --border-hover: #9ca3af;
    
    --accent-primary: #10a37f;
    --accent-hover: #0d8c6d;
    --accent-light: #e0f2fe;
    --accent-secondary: #19c37d;
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Smooth theme transitions */
.theme-transitioning,
.theme-transitioning * {
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                border-color var(--transition-speed) ease !important;
}

/* ============================================================================
   ACCESSIBILITY - REDUCED MOTION (Phase 10)
   ============================================================================ */

   @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   ACCESSIBILITY - FOCUS INDICATORS (Phase 10)
   ============================================================================ */

/* Modern focus indicator - only shows on keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default focus outline (focus-visible replaces it) */
:focus:not(:focus-visible) {
    outline: none;
}

/* Specific focus styles for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================================================
   END DARK THEME VARIABLES
   ============================================================================ */

/* Force dark mode - prevent any white backgrounds */
* {
    background-color: inherit;
}

body, html {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Prevent white backgrounds in any containers */
div, section, article, aside, main, header, footer {
    background-color: transparent;
}

/* Only specific components should have backgrounds */
.sidebar,
.app-header,
.chat-area,
.artifact-pane {
    background: var(--bg-secondary);
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif; 
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7; /* Increased from 1.6 */
    font-size: 15px; /* Up from default 14px */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

h3 {
    font-size: 16px;
    margin: 0;
}

h5 {
    font-size: 14px;
    margin: 0 0 8px 0;
}

p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Smooth height transitions */
@keyframes expandHeight {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes collapseHeight {
    from {
        max-height: 500px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

/* Message slide-in animation */
.message-slide-in {
    animation: messageSlideIn 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

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

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(300px);
    }
}

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

@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* ============================================================================
   KEYBOARD SHORTCUTS MODAL - PHASE 5
   ============================================================================ */

   .keyboard-shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 200ms ease;
}

.shortcuts-modal-content {
    background: var(--bg-tertiary);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shortcuts-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.shortcuts-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.shortcuts-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 28px;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 150ms ease;
}

.shortcuts-modal-close:hover {
    background: var(--error);
    color: white;
}

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

.shortcuts-category {
    margin-bottom: 28px;
}

.shortcuts-category:last-child {
    margin-bottom: 0;
}

.shortcuts-category h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: background 150ms ease;
}

.shortcut-item:hover {
    background: var(--bg-hover);
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 140px;
}

kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.shortcut-description {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    flex: 1;
}

.shortcuts-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.shortcuts-modal-footer kbd {
    margin: 0 2px;
}

/* ============================================================================
   LOADING STATES & SKELETONS - PHASE 7
   ============================================================================ */

/* Skeleton Base */
.skeleton-item {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton Conversations */
.skeleton-conversations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.skeleton-conversation-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    animation: fadeIn 300ms ease;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-title {
    height: 16px;
    width: 70%;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-subtitle {
    height: 12px;
    width: 50%;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Skeleton Messages */
.skeleton-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.skeleton-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 80%;
    animation: fadeIn 300ms ease;
}

.skeleton-message.user {
    align-self: flex-end;
}

.skeleton-message.assistant {
    align-self: flex-start;
}

.skeleton-message-line {
    height: 14px;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-message-line.long { width: 100%; }
.skeleton-message-line.medium { width: 75%; }
.skeleton-message-line.short { width: 50%; }

/* Skeleton Analytics */
.skeleton-analytics {
    padding: 20px;
}

.skeleton-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.skeleton-stat-card {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-stat-label {
    height: 12px;
    width: 60%;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-stat-value {
    height: 24px;
    width: 80%;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-chart {
    height: 200px;
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Upload Progress */
.upload-progress {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    margin: 8px 0;
    animation: slideDown 200ms ease;
}

.upload-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.upload-icon {
    font-size: 20px;
}

.upload-details {
    flex: 1;
}

.upload-filename {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-size {
    font-size: 11px;
    color: var(--text-tertiary);
}

.upload-progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.upload-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 150ms ease;
}

.upload-status {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
}

/* Operation Progress */
.operation-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin: 12px 0;
}

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

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

.operation-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.operation-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Page Transition */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 300ms ease;
}

.page-transition-overlay.active {
    opacity: 1;
}

.page-transition-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Theme Toggle Button */
#themeToggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 18px;
    transition: all 150ms ease;
}

#themeToggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* ============================================================================
   MOBILE RESPONSIVE IMPROVEMENTS - PHASE 7
   ============================================================================ */

/* Mobile First - Base styles optimized for small screens */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, .btn, a.clickable {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Stack header elements */
    .header {
        flex-wrap: wrap;
        padding: 8px 12px;
    }
    
    .header-left, .header-right {
        flex: 1 1 100%;
    }
    
    /* Full width modals on mobile */
    .modal-content, .settings-modal .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
    }
    
    /* Adjust input area for mobile keyboard */
    .input-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Better code block handling */
    .code-block-wrapper {
        font-size: 12px;
    }
    
    pre code {
        font-size: 12px !important;
        line-height: 1.4;
    }
    
    /* Source cards stack better */
    .source-card {
        padding: 10px;
    }
    
    /* Analytics grid responsive */
    .analytics-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Sidebar behavior */
    .sidebar {
        position: fixed;
        left: -280px;
        transition: left 300ms ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: var(--shadow-lg);
    }
    
    /* Overlay when sidebar open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .analytics-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .chat-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ============================================================================
   PREVENT BLUR ON CONVERSATION SWITCHING
   ============================================================================ */

   #conversationsList,
   #conversationsList *,
   .conversation-item,
   .conversation-item * {
       backface-visibility: hidden !important;
       -webkit-backface-visibility: hidden !important;
       transform: translateZ(0) !important;
       -webkit-transform: translateZ(0) !important;
       filter: none !important;
       will-change: auto !important;
   }
   
   /* Remove any backdrop filters that might cause blur */
   .sidebar,
   .conversation-list-container {
       backdrop-filter: none !important;
       -webkit-backdrop-filter: none !important;
   }

   /* KILL ALL LOADING TRANSITIONS ON CONVERSATION SWITCH */
.chat-area,
.chat-messages,
#results,
#chatArea {
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
}

/* Prevent any loading overlays */
.loading-overlay,
.chat-loading,
.page-transition-overlay {
    display: none !important;
    opacity: 0 !important;
}

/* Skip Navigation Link - WCAG AA Compliance */
.skip-navigation {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    transition: top 0.2s;
}

.skip-navigation:focus {
    top: 0;
}

/* ============================================================================
   SMOOTH TRANSITIONS - PHASE 10
   ============================================================================ */

   .smooth-transition {
    transition: all var(--transition-normal) var(--easing);
}

.fade-in {
    animation: fadeIn 200ms var(--easing);
}

.fade-out {
    animation: fadeOut 200ms var(--easing);
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.slide-in-left {
    animation: slideInLeft 250ms var(--easing);
}

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

/* Optimized for performance */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
}

.no-animation {
    animation: none !important;
    transition: none !important;
}

/* ============================================================================
   LUCIDE ICONS - CRITICAL FIX
   ============================================================================ */

/* ALL icons must not intercept clicks */
i[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    pointer-events: none !important; /* CRITICAL */
}

/* Button icons specifically */
button i[data-lucide],
.header-icon-btn i[data-lucide],
.chat-input-btn i[data-lucide],
.chat-header-btn i[data-lucide] {
    pointer-events: none !important; /* Force it */
}

.header-icon-btn:hover i[data-lucide],
.chat-input-btn:hover i[data-lucide],
.chat-header-btn:hover i[data-lucide] {
    transform: scale(1.1);
}

/* Send button special color */
#sendBtn i[data-lucide] {
    color: white;
    pointer-events: none; /* CRITICAL: Don't intercept clicks */
}

/* ============================================================================
   ONBOARDING TUTORIAL STYLES (Shepherd.js)
   ============================================================================ */

   .shepherd-theme-custom {
    z-index: 10000;
}

.shepherd-modal-overlay-container {
    z-index: 9999;
}

.shepherd-element {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.shepherd-header {
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    border-radius: 12px 12px 0 0;
}

.shepherd-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.shepherd-text {
    padding: 20px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.shepherd-text p {
    margin: 0 0 12px 0;
}

.shepherd-text p:last-child {
    margin-bottom: 0;
}

.shepherd-text ul {
    margin: 8px 0;
    padding-left: 20px;
}

.shepherd-text li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.shepherd-footer {
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-primary);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.shepherd-button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shepherd-button:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.shepherd-button-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.shepherd-button-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.shepherd-button:not(.shepherd-button-secondary) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.shepherd-button:not(.shepherd-button-secondary):hover {
    background: var(--accent-hover);
}

.shepherd-cancel-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.shepherd-cancel-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.shepherd-arrow {
    display: none;
}

/* Highlighted element during tour - GREEN OUTLINE */
.shepherd-highlight {
    outline: 3px solid var(--accent-primary) !important;
    outline-offset: 4px !important;
    border-radius: 8px !important;
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.2),
                0 0 20px rgba(16, 163, 127, 0.4) !important;
    position: relative !important;
    z-index: 10001 !important;
    animation: shepherd-pulse 2s ease-in-out infinite !important;
}

/* Pulsing animation for extra attention */
@keyframes shepherd-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.2),
                    0 0 20px rgba(16, 163, 127, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 163, 127, 0.3),
                    0 0 30px rgba(16, 163, 127, 0.6);
    }
}