/* ================================
   AXIO - AI CODE ASSISTANT
   by Perfionix AI
   Modern, Premium Design System
   ================================ */

:root {
    /* Color Palette - Professional White & Gray */
    --primary-gradient: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    --secondary-gradient: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-gradient: linear-gradient(135deg, #6b7280 0%, #374151 100%);

    --primary: #4b5563;
    --primary-dark: #374151;
    --secondary: #6b7280;
    --accent: #374151;
    --success: #10b981;

    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;

    --text-primary: #000000;
    --text-secondary: #111827;
    --text-muted: #4b5563;

    --border-color: #d1d5db;
    /* Gray-300 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-primary: 'Inter',
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    --font-display: 'Space Grotesk',
        sans-serif;
    --font-code: 'JetBrains Mono',
        'Fira Code',
        'Consolas',
        monospace;

    /* Spacing */
    --spacing-xs: 0.35rem;
    --spacing-sm: 0.65rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.4rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Enhanced Animation Curves */
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --glass-blur: blur(20px) saturate(180%);

    /* Glow Effects */
    --glow-primary: rgba(75, 85, 99, 0.2);
    --glow-success: rgba(16, 185, 129, 0.2);
    --glow-accent: rgba(55, 65, 81, 0.2);
    --glow-warning: rgba(245, 158, 11, 0.2);

    /* Enhanced Shadows */
    --shadow-glow-primary: 0 0 20px var(--glow-primary), 0 0 40px var(--glow-primary);
    --shadow-glow-success: 0 0 20px var(--glow-success), 0 0 40px var(--glow-success);
    --shadow-glow-accent: 0 0 20px var(--glow-accent), 0 0 40px var(--glow-accent);
}

/* ================================
   RESET & BASE STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 13px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(75, 85, 99, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 114, 128, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundShift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(5%, -5%) rotate(1deg);
    }

    66% {
        transform: translate(-5%, 5%) rotate(-1deg);
    }
}

/* ================================
   LAYOUT
   ================================ */

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ================================
   SIDEBAR
   ================================ */

/* Enhanced Sidebar */
/* Enhanced Sidebar */
.sidebar {
    width: 210px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(249, 250, 251, 0.95) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.75rem;
    position: relative;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    transition: width 0.3s ease, transform 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* Sidebar Hidden State */
.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-100%);
}

.sidebar.collapsed * {
    visibility: hidden;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(75, 85, 99, 0.2);
    border-color: rgba(75, 85, 99, 0.4);
    transform: scale(1.05);
}

.sidebar-toggle:hover svg {
    stroke: var(--primary);
}

/* Sidebar Show Button (when sidebar is hidden) */
.sidebar-show-btn {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 28px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-left: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
}

.sidebar-show-btn.visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-show-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
    transition: all 0.3s ease;
}

.sidebar-show-btn:hover {
    width: 36px;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2) 0%, rgba(107, 114, 128, 0.2) 100%);
    border-color: var(--primary);
    box-shadow: 4px 0 20px rgba(75, 85, 99, 0.3);
}

.sidebar-show-btn:hover svg {
    stroke: #ffffff;
    transform: translateX(2px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 60%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

/* Sidebar Header */
.sidebar-header {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Ensure height matches view-header line */
    /* view-header: 1rem top pad + content + 1rem bot pad */
    /* sidebar: 1rem top pad (from sidebar) + content + 1rem bot pad (here) */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 0 10px rgba(75, 85, 99, 0.3));
    transition: all var(--transition-base);
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(75, 85, 99, 0.5));
}

.logo-image {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 8px rgba(75, 85, 99, 0.3));
    transition: all var(--transition-base);
}

.logo:hover .logo-image {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(75, 85, 99, 0.5));
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Enhanced Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: auto;
    padding: var(--spacing-sm) 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.5rem var(--spacing-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-lg);
}

.nav-item:hover {
    color: var(--text-primary);
    transform: translateX(6px);
}

.nav-item:hover::before {
    opacity: 0.1;
}

.nav-item:hover .nav-icon svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(75, 85, 99, 0.5));
}

.nav-item.active {
    color: var(--text-primary);
    background: rgba(75, 85, 99, 0.15);
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.2);
}

.nav-item.active::before {
    opacity: 0.2;
}

.nav-item.active .nav-icon svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 6px rgba(75, 85, 99, 0.6));
}

.nav-item.active .nav-indicator {
    opacity: 1;
    transform: scaleY(1);
}

.nav-icon {
    width: 15px;
    height: 15px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 15px;
    height: 15px;
    transition: all var(--transition-base);
    stroke: currentColor;
}

.nav-label {
    flex: 1;
    position: relative;
    z-index: 1;
    text-align: left;
}

.nav-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(55, 65, 81, 0.3);
    min-width: 20px;
    text-align: center;
}

.nav-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 60%;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: all var(--transition-base);
}

/* Enhanced Sidebar Footer */
.sidebar-footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-card {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(75, 85, 99, 0.2);
    backdrop-filter: blur(5px);
}

.stats-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
}

.stats-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
}

.stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 85, 99, 0.1);
    border-radius: var(--radius-sm);
}

.stat-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    flex: 1;
}

.stat-value {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(79, 172, 254, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.current-time svg {
    width: 20px;
    height: 20px;
    stroke: var(--success);
    animation: clockPulse 2s ease-in-out infinite;
}

@keyframes clockPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.view {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn var(--transition-base);
}

.view.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(249, 250, 251, 0.8) 100%);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    width: 100%;
    min-height: 70px;
    box-sizing: border-box;
}

.view-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-title svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
    filter: drop-shadow(0 0 8px rgba(75, 85, 99, 0.4));
}

.view-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.header-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.header-actions .btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: all var(--transition-base);
}

.header-actions .btn-icon:hover {
    background: rgba(75, 85, 99, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3);
}

.header-actions .btn-icon:hover svg {
    stroke: var(--primary);
}

.header-actions .btn-primary {
    height: 36px;
    padding: 0 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-actions .btn-primary span {
    font-size: 1rem;
    font-weight: 600;
}

/* ================================
   MODEL SELECTOR
   ================================ */

.model-selector {
    position: relative;
    z-index: 100;
}

.model-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.15) 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.model-selector-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
}

.model-selector-btn .dropdown-arrow {
    width: 14px;
    height: 14px;
    stroke: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.model-selector-btn:hover {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.25) 0%, rgba(107, 114, 128, 0.25) 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(75, 85, 99, 0.3);
}

.model-selector.active .model-selector-btn {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.3) 0%, rgba(107, 114, 128, 0.3) 100%);
    border-color: var(--primary);
}

.model-selector.active .dropdown-arrow {
    transform: rotate(180deg);
}

.model-name {
    color: var(--text-primary);
    font-weight: 600;
}

.model-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(75, 85, 99, 0.1),
        inset 0 1px 0 rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.model-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(75, 85, 99, 0.5), transparent);
}

.model-selector.active .model-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.model-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.model-option:last-child {
    border-bottom: none;
}

.model-option:hover {
    background: linear-gradient(90deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.1) 100%);
    padding-left: 20px;
}

.model-option:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 2px 2px 0;
}

.model-option.active {
    background: linear-gradient(90deg, rgba(75, 85, 99, 0.2) 0%, rgba(107, 114, 128, 0.15) 100%);
}

.model-option.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #00f2fe, #667eea);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.model-option-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.model-option-icon svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Futuristic Icon Animations */
@keyframes iconPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes iconGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px currentColor);
    }

    50% {
        filter: drop-shadow(0 0 6px currentColor);
    }
}

@keyframes iconRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Core Model - Neural Network Style */
.model-option-icon.gpt-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 15px rgba(75, 85, 99, 0.4);
    position: relative;
    overflow: hidden;
}

.model-option-icon.gpt-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255, 255, 255, 0.1), transparent 30%);
    animation: iconRotate 4s linear infinite;
}

.model-option-icon.gpt-icon svg {
    stroke: white;
    position: relative;
    z-index: 1;
}

.model-option-icon.gpt-icon .icon-core {
    animation: iconPulse 2s ease-in-out infinite;
}

.model-option:hover .model-option-icon.gpt-icon {
    box-shadow: 0 0 25px rgba(75, 85, 99, 0.6);
    transform: scale(1.05);
}

/* Gemini/Lite Model */
.model-option-icon.gemini-icon {
    background: linear-gradient(135deg, #4285f4 0%, #8b5cf6 100%);
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.4);
}

.model-option-icon.gemini-icon svg {
    stroke: white;
    fill: white;
}

/* Coder Model - Terminal/Matrix Style */
.model-option-icon.coder-icon {
    background: linear-gradient(135deg, #00d4aa 0%, #00b4d8 100%);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
    position: relative;
    overflow: hidden;
}

.model-option-icon.coder-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.model-option-icon.coder-icon svg {
    stroke: white;
    fill: none;
    position: relative;
    z-index: 1;
}

.model-option-icon.coder-icon .icon-code {
    animation: iconGlow 1.5s ease-in-out infinite;
}

.model-option:hover .model-option-icon.coder-icon {
    box-shadow: 0 0 25px rgba(0, 212, 170, 0.6);
    transform: scale(1.05);
}

/* Max Model - Quantum Power Style */
.model-option-icon.max-icon {
    background: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.4);
    position: relative;
    overflow: hidden;
}

.model-option-icon.max-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    animation: iconPulse 1.5s ease-in-out infinite;
}

.model-option-icon.max-icon svg {
    stroke: white;
    fill: none;
    position: relative;
    z-index: 1;
}

.model-option-icon.max-icon .icon-core {
    animation: iconPulse 1s ease-in-out infinite;
}

.model-option-icon.max-icon .icon-star {
    animation: iconGlow 2s ease-in-out infinite;
}

.model-option:hover .model-option-icon.max-icon {
    box-shadow: 0 0 30px rgba(247, 37, 133, 0.7), 0 0 60px rgba(255, 107, 53, 0.3);
    transform: scale(1.05);
}

.model-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.model-option-name {
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text-primary);
}

.model-option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.model-active-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #00f2fe 0%, #00d4aa 100%);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    position: relative;
}

.model-active-indicator::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.3);
    animation: activeRing 1.5s ease-in-out infinite;
}

@keyframes activeRing {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

.model-option.active .model-active-indicator {
    opacity: 1;
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.9), 0 0 30px rgba(0, 212, 170, 0.4);
    }
}

.model-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-option.unavailable:hover {
    background: transparent;
}

/* Model indicator in chat */
.model-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 8px;
}

.model-badge.gpt {
    background: rgba(16, 163, 127, 0.2);
    color: #10a37f;
}

.model-badge.gemini {
    background: rgba(66, 133, 244, 0.2);
    color: #4285f4;
}

/* ================================
   APIGEE TOGGLE
   ================================ */

.apigee-toggle {
    position: relative;
    z-index: 100;
}

.apigee-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.1) 100%);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.apigee-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: all var(--transition-base);
}

.apigee-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.apigee-toggle-btn:hover svg {
    stroke: #3b82f6;
}

.apigee-label {
    color: inherit;
    font-weight: 600;
}

.apigee-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(100, 100, 100, 0.3);
    color: var(--text-muted);
    transition: all var(--transition-base);
}

/* Active state */
.apigee-toggle.active .apigee-toggle-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(219, 234, 254, 0.8) 100%);
    border-color: #3b82f6;
    color: #1e3a8a;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(59, 130, 246, 0.1);
}

.apigee-toggle.active .apigee-toggle-btn svg {
    stroke: #2563eb;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.4));
}

.apigee-toggle.active .apigee-label {
    color: #1e3a8a;
}

.apigee-toggle.active .apigee-status {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Apigee Mode Welcome Message */
.apigee-welcome {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.5) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 16px 0;
}

.apigee-welcome h4 {
    color: #2563eb;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apigee-welcome ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apigee-welcome li {
    padding: 6px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.apigee-welcome li::before {
    content: ">";
    color: #3b82f6;
    /* Blue chevron */
    font-weight: bold;
}

.apigee-welcome code {
    background: rgba(59, 130, 246, 0.15);
    /* Light blue bg */
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #1d4ed8;
    /* Darker blue text for contrast */
}

/* Apigee Success Message */
.apigee-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(139, 195, 74, 0.1) 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 16px 0;
}

.apigee-success h4 {
    color: #4caf50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apigee-success .bundle-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 12px;
    font-family: var(--font-code);
    font-size: 0.85rem;
}

.apigee-success .bundle-info .label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.apigee-success .bundle-info .value {
    color: var(--text-primary);
}

/* Model Switch Notification */
.model-switch-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 16px auto;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.15) 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

.model-switch-notification .notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-switch-notification .notification-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
}

.model-switch-notification strong {
    color: var(--primary);
}

.model-switch-notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ================================
   CHAT VIEW
   ================================ */

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.message {
    display: flex;
    gap: var(--spacing-md);
    animation: slideIn var(--transition-base);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-glow);
}

/* Advanced AI Icon */
.ai-avatar {
    background: transparent;
    box-shadow: none;
    position: relative;
}

.ai-icon {
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-core {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 50%;
    position: relative;
    z-index: 3;
    box-shadow:
        0 0 20px rgba(75, 85, 99, 0.6),
        0 0 40px rgba(107, 114, 128, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    animation: corePulse 2s ease-in-out infinite;
}

.ai-core::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.ai-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-top-color: #667eea;
    border-right-color: #764ba2;
    border-radius: 50%;
    animation: ringRotate 3s linear infinite;
    z-index: 2;
}

.ai-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid transparent;
    border-bottom-color: rgba(240, 147, 251, 0.5);
    border-left-color: rgba(75, 85, 99, 0.5);
    border-radius: 50%;
    animation: ringRotate 2s linear infinite reverse;
}

.ai-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ai-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #f093fb);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(75, 85, 99, 0.8);
}

.ai-particles span:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: particleFloat1 2s ease-in-out infinite;
}

.ai-particles span:nth-child(2) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: particleFloat2 2s ease-in-out infinite 0.5s;
}

.ai-particles span:nth-child(3) {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    animation: particleFloat3 2s ease-in-out infinite 1s;
}

.ai-particles span:nth-child(4) {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    animation: particleFloat4 2s ease-in-out infinite 1.5s;
}

/* AI Icon Animations */
@keyframes corePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 20px rgba(75, 85, 99, 0.6),
            0 0 40px rgba(107, 114, 128, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.3);
    }

    50% {
        transform: scale(1.1);
        box-shadow:
            0 0 30px rgba(75, 85, 99, 0.8),
            0 0 60px rgba(107, 114, 128, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.5);
    }
}

@keyframes ringRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes particleFloat1 {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
        opacity: 0.5;
    }
}

@keyframes particleFloat2 {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(5px);
        opacity: 0.5;
    }
}

@keyframes particleFloat3 {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-50%) translateX(-5px);
        opacity: 0.5;
    }
}

@keyframes particleFloat4 {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-50%) translateX(5px);
        opacity: 0.5;
    }
}

/* Loading State - More Intense Animation */
.ai-avatar.loading .ai-core {
    animation: coreLoading 0.5s ease-in-out infinite;
}

.ai-avatar.loading .ai-ring {
    animation: ringLoading 0.8s linear infinite;
    border-top-color: #00f2fe;
    border-right-color: #4facfe;
}

.ai-avatar.loading .ai-ring::before {
    animation: ringLoading 0.6s linear infinite reverse;
    border-bottom-color: rgba(16, 185, 129, 0.7);
    border-left-color: rgba(79, 172, 254, 0.7);
}

.ai-avatar.loading .ai-particles span {
    animation-duration: 0.5s;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
}

@keyframes coreLoading {

    0%,
    100% {
        transform: scale(1);
        background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #667eea 100%);
        box-shadow:
            0 0 25px rgba(16, 185, 129, 0.8),
            0 0 50px rgba(79, 172, 254, 0.6),
            inset 0 0 12px rgba(255, 255, 255, 0.5);
    }

    50% {
        transform: scale(1.2);
        background: linear-gradient(135deg, #4facfe 0%, #667eea 50%, #00f2fe 100%);
        box-shadow:
            0 0 35px rgba(16, 185, 129, 1),
            0 0 70px rgba(79, 172, 254, 0.8),
            inset 0 0 18px rgba(255, 255, 255, 0.7);
    }
}

@keyframes ringLoading {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.message.user .message-avatar {
    background: var(--secondary-gradient);
    order: 2;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message.user .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-content p,
.message-content .message-text {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    line-height: 1.6;
    margin-bottom: var(--spacing-xs);
    border: 1px solid #d1d5db;
    /* Lighter gray border for better visibility */
    font-size: 1.05rem;
    font-weight: 500;
}

.message.user .message-content p,
.message.user .message-content .message-text {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 var(--spacing-sm);
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0 var(--spacing-sm);
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(75, 85, 99, 0.15);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: rgba(75, 85, 99, 0.3);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3);
}

.suggestion-chip:active {
    transform: translateY(0);
}

.suggestion-chip .chip-icon {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .suggestion-chips {
        gap: 0.4rem;
    }

    .suggestion-chip {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Follow-up Suggestion Chips */
.followup-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0.5rem 3.5rem;
    padding: 0 var(--spacing-sm);
    animation: fadeInUp 0.3s ease-out;
}

.followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: var(--radius-full, 20px);
    color: var(--text-primary, #e0e0e0);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    animation: fadeInUp 0.4s ease-out both;
}

.followup-chip:nth-child(1) {
    animation-delay: 0s;
}

.followup-chip:nth-child(2) {
    animation-delay: 0.1s;
}

.followup-chip:nth-child(3) {
    animation-delay: 0.2s;
}

.followup-chip:hover {
    background: rgba(75, 85, 99, 0.25);
    border-color: var(--primary, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3);
}

.followup-chip:active {
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .followup-suggestions {
        margin-left: 0;
        gap: 0.4rem;
    }

    .followup-chip {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        max-width: 220px;
    }
}

/* Search Indicator */
.message.searched .message-content::before {
    content: '🔍 Web Search';
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
    color: white;
    font-weight: 600;
}

.typing-status {
    display: block;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: var(--spacing-xs);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Typing Cursor */
.typing-cursor {
    display: inline;
    color: var(--primary);
    font-weight: bold;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Message Actions - Edit Button */
.message-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(75, 85, 99, 0.15);
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.message-action-btn:hover {
    background: rgba(75, 85, 99, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(75, 85, 99, 0.4);
}

.message-action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.speak-btn.speaking {
    color: var(--accent);
    background: rgba(250, 112, 154, 0.15);
    animation: pulseSpeaker 1.5s infinite;
}

@keyframes pulseSpeaker {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 112, 154, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(250, 112, 154, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 112, 154, 0);
    }
}

.message.user .message-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message.user .message-action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* Edit Container */
.edit-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
    animation: fadeIn var(--transition-fast);
}

.edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--spacing-md);
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-glow);
}

.edit-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(55, 65, 81, 0.3);
}

.edit-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.edit-buttons .btn-primary {
    background: var(--success-gradient);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.edit-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.edit-buttons .btn-secondary {
    background: var(--bg-hover);
    border: 1px solid #9ca3af;
}

.edit-buttons .btn-secondary:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: var(--text-muted);
}

/* Chat Input */
.chat-input-container {
    padding: 1rem 1.5rem;
    background: transparent;
    border-top: none;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: var(--font-primary);
    resize: none;
    max-height: 100px;
    padding: 0.5rem;
    line-height: 1.5;
}

#chat-input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    text-align: center;
}

/* ================================
   BUTTONS
   ================================ */

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #9ca3af;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-hover);
    transform: scale(1.1);
}

.btn-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Search Button */
.btn-search {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(250, 112, 154, 0.3);
}

.btn-search:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(250, 112, 154, 0.5);
}

.btn-search:active {
    transform: scale(0.95);
}

/* Voice Input Button */
.btn-voice {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-voice:hover {
    transform: scale(1.1);
    background: #f3f4f6;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-voice:active {
    transform: scale(0.95);
}

.btn-voice.listening {
    background: var(--accent-gradient);
    color: white;
    border: none;
    animation: pulseMic 1.5s infinite alternate;
}

@keyframes pulseMic {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 112, 154, 0.4);
    }

    100% {
        box-shadow: 0 0 0 10px rgba(250, 112, 154, 0);
    }
}

/* Voice Mode active — persistent glow when voice mode is ON */
.voice-mode-active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
    animation: pulseMicGreen 1.8s infinite alternate !important;
}

@keyframes pulseMicGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
}

/* ================================
   TASKS VIEW
   ================================ */

.tasks-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.tasks-filters {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #9ca3af;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.task-item {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid #9ca3af;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-base);
    animation: slideIn var(--transition-base);
}

.task-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.task-checkbox:hover {
    border-color: var(--primary);
}

.task-item.completed .task-checkbox {
    background: var(--success-gradient);
    border-color: transparent;
    position: relative;
}

.task-item.completed .task-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-priority {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.task-priority.high {
    background: rgba(55, 65, 81, 0.2);
    color: #f5576c;
}

.task-priority.medium {
    background: rgba(254, 225, 64, 0.2);
    color: #fee140;
}

.task-priority.low {
    background: rgba(16, 185, 129, 0.2);
    color: #00f2fe;
}

.task-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    opacity: 0;
}

.task-item:hover .task-delete {
    opacity: 1;
}

.task-delete:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* ================================
   NOTES VIEW
   ================================ */

.notes-grid {
    padding: var(--spacing-xl);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    overflow-y: auto;
}

.note-card {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid #9ca3af;
    transition: all var(--transition-base);
    cursor: pointer;
    animation: slideIn var(--transition-base);
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.note-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.note-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    opacity: 0;
}

.note-card:hover .note-delete {
    opacity: 1;
}

.note-delete:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.note-content {
    color: var(--text-secondary);
    font-size: 1.0rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================
   REMINDERS VIEW
   ================================ */

.reminders-list {
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow-y: auto;
}

.reminder-item {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid #9ca3af;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all var(--transition-base);
    animation: slideIn var(--transition-base);
    position: relative;
    overflow: hidden;
}

.reminder-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
}

.reminder-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.reminder-icon {
    font-size: 2rem;
}

.reminder-content {
    flex: 1;
}

.reminder-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.reminder-datetime {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.reminder-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.reminder-delete:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* ================================
   REMINDER NOTIFICATION POPUP
   ================================ */

.reminder-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(55, 65, 81, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(55, 65, 81, 0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.reminder-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.reminder-notification.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.reminder-notification-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    padding-top: 24px;
}

.reminder-notification-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.2) 0%, rgba(250, 112, 154, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: bellRing 0.5s ease-in-out infinite alternate;
}

@keyframes bellRing {
    0% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(5deg);
    }
}

.reminder-notification-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent);
    filter: drop-shadow(0 0 8px rgba(55, 65, 81, 0.5));
}

.reminder-notification-text {
    flex: 1;
    min-width: 0;
}

.reminder-notification-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reminder-notification-message {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.reminder-notification-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reminder-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reminder-notification-close svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
}

.reminder-notification-close:hover {
    background: rgba(55, 65, 81, 0.2);
}

.reminder-notification-close:hover svg {
    stroke: var(--accent);
}

.reminder-notification-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.reminder-notification-actions button {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 1.0rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-dismiss {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

.btn-dismiss:hover {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

.btn-snooze {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.3);
}

.btn-snooze:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4);
}

/* Mobile responsiveness for notification */
@media (max-width: 480px) {
    .reminder-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .reminder-notification-content {
        padding: 16px;
        padding-top: 20px;
    }

    .reminder-notification-icon {
        width: 40px;
        height: 40px;
    }

    .reminder-notification-icon svg {
        width: 20px;
        height: 20px;
    }

    .reminder-notification-actions {
        padding: 0 16px 16px;
    }
}

/* ================================
   EMPTY STATE
   ================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-muted);
    min-height: 300px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ================================
   MODAL
   ================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid #9ca3af;
    animation: slideIn var(--transition-base);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition-base);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #9ca3af;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border: 1px solid #9ca3af;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* ================================
   SCROLLBAR
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-header .logo h1,
    .tagline,
    .nav-label,
    .nav-badge,
    .stats-card,
    .current-time {
        display: none;
    }

    .nav-item {
        justify-content: center;
    }

    .view-header {
        padding: var(--spacing-md);
    }

    .view-header h2 {
        font-size: 1.25rem;
    }

    .chat-messages {
        padding: var(--spacing-md);
    }

    .message-content {
        max-width: 85%;
    }

    .notes-grid {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }
}

/* ================================
   LOADING ANIMATION
   ================================ */

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--spacing-md);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}



/* Inline code */
.message-text code:not(pre code) {
    background: rgba(75, 85, 99, 0.15);
    color: #a8b5ff;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.message.user .message-text code:not(pre code) {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Code blocks */
.message-text pre {
    background: #1a1b26;
    border-radius: var(--radius-md);
    padding: 0;
    margin: var(--spacing-sm) 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-md);
    position: relative;
}

.message-text pre code {
    display: block;
    padding: var(--spacing-md);
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #a9b1d6;
    background: transparent;
}

/* Code block header with language label */
.code-block-wrapper {
    position: relative;
    margin: var(--spacing-sm) 0;
}

.code-header {
    background: #16161e;
    padding: var(--spacing-xs) var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.code-language {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.code-copy-btn {
    background: rgba(75, 85, 99, 0.2);
    border: 1px solid rgba(75, 85, 99, 0.3);
    color: #a8b5ff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.code-copy-btn:hover {
    background: rgba(75, 85, 99, 0.3);
    border-color: rgba(75, 85, 99, 0.5);
    transform: translateY(-1px);
}

.code-copy-btn:active {
    transform: translateY(0);
}

.code-copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: #00f2fe;
}

.code-copy-btn.copy-error,
.diagram-action-btn.copy-error {
    background: rgba(55, 65, 81, 0.2);
    border-color: rgba(55, 65, 81, 0.3);
    color: #f5576c;
}

/* Syntax highlighting overrides for better visibility */
.hljs {
    background: #1a1b26 !important;
    color: #a9b1d6 !important;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: #bb9af7 !important;
}

.hljs-function .hljs-keyword {
    color: #7dcfff !important;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
    color: #9ece6a !important;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
    color: #565f89 !important;
}

.hljs-number,
.hljs-regexp,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
    color: #ff9e64 !important;
}

.hljs-built_in,
.hljs-class .hljs-title {
    color: #e0af68 !important;
}

/* Markdown elements in messages */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4,
.message-text h5,
.message-text h6 {
    color: var(--text-primary);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    line-height: 1.3;
}

.message-text h1 {
    font-size: 1.75rem;
}

.message-text h2 {
    font-size: 1.5rem;
}

.message-text h3 {
    font-size: 1.25rem;
}

.message-text h4 {
    font-size: 1.1rem;
}

.message-text h1:first-child,
.message-text h2:first-child,
.message-text h3:first-child {
    margin-top: 0;
}

.message-text p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text ul,
.message-text ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.message-text li {
    margin: var(--spacing-xs) 0;
    line-height: 1.6;
}

.message-text blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.message-text a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.message-text a:hover {
    border-bottom-color: var(--primary);
}

.message-text hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-md) 0;
}

.message-text table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-size: 1.0rem;
}

.message-text th,
.message-text td {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid #9ca3af;
    text-align: left;
}

.message-text th {
    background: var(--bg-hover);
    font-weight: 600;
    color: var(--text-primary);
}

.message-text td {
    color: var(--text-secondary);
}

/* Strong and emphasis */
.message-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.message-text em {
    color: var(--text-secondary);
    font-style: italic;
}

/* Scrollbar for code blocks */
.message-text pre code::-webkit-scrollbar {
    height: 8px;
}

.message-text pre code::-webkit-scrollbar-track {
    background: #16161e;
}

.message-text pre code::-webkit-scrollbar-thumb {
    background: #2d2d4a;
    border-radius: 4px;
}

.message-text pre code::-webkit-scrollbar-thumb:hover {
    background: #3d3d5a;
}

/* ================================
   DOCIQ - DOCUMENT INTELLIGENCE
   ================================ */

.dociq-container {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

/* Upload Section */
.dociq-upload-section {
    width: 350px;
    min-width: 300px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(249, 250, 251, 0.95) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    padding-top: calc(var(--spacing-lg) + 30px);
    overflow-y: auto;
    position: relative;
    transition: all 0.3s ease;
}

.dociq-upload-section.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    border-right: none;
}

/* DocIQ Close Button */
.dociq-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.dociq-close-btn:hover {
    background: rgba(55, 65, 81, 0.1);
    border-color: rgba(55, 65, 81, 0.3);
    color: var(--accent);
}

.dociq-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* DocIQ Show Button */
.dociq-show-btn {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid #9ca3af;
    border-left: none;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dociq-container:has(.dociq-upload-section.collapsed) .dociq-show-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dociq-show-btn:hover {
    width: 32px;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(75, 85, 99, 0.2) 100%);
    border-color: rgba(75, 85, 99, 0.3);
    color: var(--primary);
}

.dociq-show-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.upload-area {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.06) 0%, rgba(107, 114, 128, 0.03) 100%);
    border: 2px dashed rgba(75, 85, 99, 0.3);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    max-width: 380px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(75, 85, 99, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.upload-area:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 85, 99, 0.2);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.drag-over {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(79, 172, 254, 0.1) 100%);
    border-style: solid;
}

.upload-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.12) 0%, rgba(107, 114, 128, 0.08) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: uploadPulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

.upload-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary);
}

@keyframes uploadPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(75, 85, 99, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(75, 85, 99, 0);
    }
}

.upload-area h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.upload-area p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    max-width: 90%;
}

.upload-btn {
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: var(--radius-md);
    justify-content: center;
}

.upload-btn svg {
    width: 16px;
    height: 16px;
}

.supported-formats {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1;
}

.supported-formats span {
    background: rgba(75, 85, 99, 0.08);
    border: 1px solid rgba(75, 85, 99, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    display: inline-block;
}

/* Uploaded Documents List */
.uploaded-docs {
    margin-top: var(--spacing-xl);
    flex: 1;
}

.uploaded-docs h4 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.0rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.uploaded-docs h4 svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.no-docs {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--spacing-lg);
}

.doc-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    animation: slideIn var(--transition-base);
}

.doc-item:hover {
    background: rgba(75, 85, 99, 0.15);
    border-color: var(--primary);
    transform: translateX(4px);
}

.doc-item.processing {
    border-color: var(--success);
    animation: processingPulse 1.5s ease-in-out infinite;
}

@keyframes processingPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 15px 5px rgba(16, 185, 129, 0);
    }
}

.doc-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2), rgba(107, 114, 128, 0.2));
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.doc-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

.doc-icon.pdf {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.2), rgba(250, 112, 154, 0.2));
}

.doc-icon.pdf svg {
    stroke: #f5576c;
}

.doc-icon.word {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(16, 185, 129, 0.2));
}

.doc-icon.word svg {
    stroke: #4facfe;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-size {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.doc-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.doc-status.ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.doc-status.processing {
    background: rgba(254, 225, 64, 0.15);
    color: #fee140;
}

.doc-status.error {
    background: rgba(55, 65, 81, 0.15);
    color: #f5576c;
}

.doc-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    opacity: 0;
}

.doc-item:hover .doc-remove {
    opacity: 1;
}

.doc-remove:hover {
    color: #f5576c;
    background: rgba(55, 65, 81, 0.1);
}

.doc-remove svg {
    width: 16px;
    height: 16px;
}

/* DocIQ Chat Section */
.dociq-chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.dociq-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.dociq-input-container {
    padding: 1rem 1.5rem;
    background: transparent;
    border-top: none;
}

.dociq-input-wrapper {
    display: flex;
    gap: 0.5rem;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
    max-width: 900px;
    margin: 0 auto;
}

.dociq-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.dociq-input-wrapper.disabled {
    opacity: 0.6;
    pointer-events: none;
}

#dociq-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.0rem;
    font-family: var(--font-primary);
    resize: none;
    max-height: 100px;
    padding: 0.5rem;
    line-height: 1.4;
}

#dociq-input::placeholder {
    color: var(--text-muted);
}

#dociq-input:disabled {
    cursor: not-allowed;
}

#dociq-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

#dociq-send:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

#dociq-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#dociq-send svg {
    width: 20px;
    height: 20px;
}

/* DocIQ Badge Styling */
.dociq-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(75, 85, 99, 0.3);
    }

    50% {
        box-shadow: 0 2px 15px rgba(75, 85, 99, 0.6);
    }
}

/* DocIQ Document context indicator */
.dociq-context {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(75, 85, 99, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.dociq-context svg {
    width: 12px;
    height: 12px;
}

/* Upload progress bar */
.upload-progress {
    width: 100%;
    height: 4px;
    background: rgba(75, 85, 99, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

.upload-progress-bar {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressGlow 1s ease-in-out infinite;
}

@keyframes progressGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
    }
}

/* Responsive DocIQ */
@media (max-width: 1024px) {
    .dociq-container {
        flex-direction: column;
    }

    .dociq-upload-section {
        width: 100%;
        min-width: unset;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .upload-area {
        padding: var(--spacing-lg);
    }

    .upload-icon {
        width: 60px;
        height: 60px;
    }

    .upload-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* ================================
   VIZIQ - DATA INTELLIGENCE
   ================================ */

.viziq-container {
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: var(--spacing-xl);
    background: var(--bg-primary);
}

/* VizIQ Upload Section */
.viziq-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: var(--spacing-xl);
}

.viziq-upload-area {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%);
    border: 2px dashed rgba(75, 85, 99, 0.4);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) calc(var(--spacing-xl) * 2);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    max-width: 600px;
    width: 100%;
}

.viziq-upload-area:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.1) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(75, 85, 99, 0.25);
}

.viziq-upload-area.drag-over {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(79, 172, 254, 0.1) 100%);
    border-style: solid;
}

.viziq-icon {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2) 0%, rgba(55, 65, 81, 0.15) 100%);
}

.viziq-upload-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.viziq-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.viziq-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.viziq-feature {
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.viziq-feature strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .viziq-features {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .viziq-feature {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* VizIQ Processing Animation */
.viziq-processing {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
}

.processing-animation {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(75, 85, 99, 0.2);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing-text h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.processing-text p {
    color: var(--text-muted);
    font-size: 1.0rem;
}

.processing-steps {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.processing-steps .step {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(75, 85, 99, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.processing-steps .step.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.4);
}

.processing-steps .step.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.step-icon {
    font-size: 1rem;
}

/* VizIQ Dashboard */
.viziq-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    min-height: calc(100vh - 120px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid #9ca3af;
}

.dashboard-title h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.dashboard-title p {
    color: var(--text-muted);
    font-size: 1.0rem;
}

.dashboard-meta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.kpi-card {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid #9ca3af;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.kpi-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 85, 99, 0.15);
    border-radius: var(--radius-md);
}

.kpi-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-display);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -1px;
    line-height: 1;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    margin-top: var(--spacing-xs);
}

.kpi-change.positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.kpi-change.negative {
    color: #f5576c;
    background: rgba(55, 65, 81, 0.1);
}

.kpi-change svg {
    width: 12px;
    height: 12px;
}

.kpi-description {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: var(--spacing-sm);
    opacity: 0.8;
}

/* Charts Section */
.charts-section {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 1px solid #9ca3af;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* Trend chart takes full width in second row */
.chart-card:last-child {
    grid-column: 1 / -1;
}

.chart-card {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid #9ca3af;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chart-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 50%;
}

.chart-type-badge {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2), rgba(107, 114, 128, 0.15));
    border-radius: 20px;
    font-size: 0.65rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
    margin: var(--spacing-md) 0;
}

.chart-insight {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.08) 0%, rgba(107, 114, 128, 0.05) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    position: relative;
}

.chart-insight::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: 10px;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0 var(--spacing-xs);
    font-size: 1.0rem;
}

.chart-insight p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.chart-insight strong {
    color: var(--primary);
    font-weight: 600;
}

/* Insights Section - Horizontal */
.insights-section {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 1px solid #9ca3af;
}

.insights-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.insight-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid #9ca3af;
    transition: all var(--transition-base);
}

.insight-card:hover {
    border-color: var(--primary);
    background: rgba(75, 85, 99, 0.08);
}

.insight-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 85, 99, 0.15);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.insight-icon.trend-up {
    background: rgba(16, 185, 129, 0.15);
}

.insight-icon.trend-down {
    background: rgba(55, 65, 81, 0.15);
}

.insight-icon.warning {
    background: rgba(254, 225, 64, 0.15);
}

.insight-content h5 {
    color: var(--text-primary);
    font-size: 1.0rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.insight-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Data Preview Table */
.data-preview-section {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 1px solid #9ca3af;
}

.data-table-container {
    overflow-x: auto;
    max-height: 400px;
    border-radius: var(--radius-md);
    border: 1px solid #9ca3af;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2) 0%, rgba(107, 114, 128, 0.15) 100%);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
    z-index: 1;
}

.data-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-table tr:hover td {
    background: rgba(75, 85, 99, 0.05);
}

.data-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tr:nth-child(even):hover td {
    background: rgba(75, 85, 99, 0.08);
}

/* VizIQ Badge */
.viziq-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: badgePulse 2s ease-in-out infinite;
}

/* Chart.js Custom Tooltip */
.chartjs-tooltip {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive VizIQ */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insights-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .viziq-container {
        padding: var(--spacing-md);
    }

    .dashboard-header {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .dashboard-meta {
        flex-wrap: wrap;
        justify-content: center;
    }

    .processing-steps {
        flex-wrap: wrap;
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-card:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card:nth-child(3),
    .chart-card:last-child {
        grid-column: 1;
    }

    .insights-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .insights-list {
        grid-template-columns: 1fr;
    }
}

/* ================================
   COMING SOON POPUP
   ================================ */

.coming-soon-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.coming-soon-popup.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.coming-soon-content {
    background: var(--bg-secondary);
    border: 1px solid #9ca3af;
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.coming-soon-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.coming-soon-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coming-soon-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.coming-soon-content p strong {
    color: var(--primary);
}

.coming-soon-sub {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-top: 4px;
}

.coming-soon-close {
    margin-top: 20px;
    padding: 10px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coming-soon-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.4);
}

/* ================================
   MOBILE RESPONSIVE STYLES
   ================================ */

/* Mobile Header - Hidden on desktop */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

/* Hamburger Menu Button with 3 Lines */
.hamburger-menu {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu:hover {
    background: rgba(75, 85, 99, 0.2);
    border-color: var(--primary);
}

.hamburger-menu:hover span {
    background: var(--primary);
}

/* Hamburger animation when sidebar is open */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    background: rgba(75, 85, 99, 0.1);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.mobile-menu-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
}

.mobile-menu-btn:hover {
    background: rgba(75, 85, 99, 0.2);
    border-color: var(--primary);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.mobile-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mobile-logo span {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-view-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 6px 12px;
    background: rgba(75, 85, 99, 0.1);
    border-radius: 6px;
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
        padding: var(--spacing-md);
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-item {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .view-header {
        padding: var(--spacing-md);
    }

    .view-header h2 {
        font-size: 1.25rem;
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {

    /* Show mobile header */
    .mobile-header {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    /* Show overlay when active */
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar-overlay.active {
        pointer-events: auto;
    }

    /* App container adjustments */
    .app-container {
        flex-direction: column;
        padding-top: 60px;
    }

    /* Sidebar transforms to slide-out menu */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        max-width: 75vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        padding: 16px 12px;
        background: var(--bg-secondary);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar::after {
        display: none;
    }

    /* Sidebar header on mobile */
    .sidebar-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
        display: block !important;
        visibility: visible !important;
    }

    .sidebar-header .logo {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        visibility: visible !important;
    }

    /* Show logo icon on mobile */
    .sidebar-header .logo-icon {
        display: block !important;
        width: 38px;
        height: 38px;
        min-width: 38px;
        flex-shrink: 0;
        visibility: visible !important;
    }

    .sidebar-header .logo-text {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar-header .logo-text h1,
    .sidebar-header .logo h1 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 1.3rem !important;
        margin: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        font-weight: 700 !important;
        line-height: 1.2;
    }

    .sidebar-header .logo-text .tagline,
    .sidebar-header .logo .tagline {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 0.7rem !important;
        color: #9ca3af !important;
        margin: 0;
    }

    /* Navigation menu on mobile */
    .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1;
    }

    .nav-item {
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 1.0rem;
        gap: 10px;
    }

    .nav-item .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-item .nav-label {
        font-size: 1.0rem;
    }

    .nav-item .nav-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Sidebar footer on mobile - Stats & Time */
    .sidebar-footer {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
        display: block !important;
    }

    .stats-card {
        padding: 10px;
        margin-bottom: 10px;
        background: rgba(75, 85, 99, 0.05);
        border-radius: 8px;
        border: 1px solid #9ca3af;
        display: block !important;
    }

    .stats-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .stats-header svg {
        width: 16px;
        height: 16px;
    }

    .stats-header h3 {
        font-size: 0.8rem;
        margin: 0;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        font-size: 0.8rem;
    }

    .stat-item .stat-icon {
        width: 18px;
        height: 18px;
    }

    .stat-item .stat-icon svg {
        width: 14px;
        height: 14px;
    }

    .stat-item .stat-label {
        flex: 1;
        font-size: 0.75rem;
    }

    .stat-item .stat-value {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .current-time {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 0.8rem;
        padding: 8px 10px;
        background: rgba(75, 85, 99, 0.1);
        border-radius: 8px;
        color: var(--text-secondary);
    }

    .current-time svg {
        width: 16px;
        height: 16px;
    }

    /* Main content full width */
    .main-content {
        width: 100%;
        height: calc(100vh - 60px);
    }

    /* View header adjustments */
    .view-header {
        padding: var(--spacing-sm) var(--spacing-md);
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .view-header .view-title {
        flex: 1;
        min-width: 150px;
    }

    .view-header .view-title h2 {
        font-size: 1.1rem;
    }

    .view-header .view-title svg {
        width: 20px;
        height: 20px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn-icon {
        width: 36px;
        height: 36px;
    }

    /* Model Selector Mobile */
    .model-selector-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .model-selector-btn svg:first-child {
        display: none;
    }

    .model-dropdown {
        min-width: 200px;
        right: -10px;
    }

    /* Chat Container */
    .chat-container {
        height: calc(100vh - 140px);
    }

    .chat-messages {
        padding: var(--spacing-sm);
    }

    .message {
        max-width: 95%;
        gap: 8px;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .message-avatar.ai-avatar .ai-icon {
        width: 32px;
        height: 32px;
    }

    .message-content {
        padding: var(--spacing-sm);
    }

    .message-text {
        font-size: 1.0rem;

        font-size: 1.05rem;
        line-height: 1.6;
        color: #000000;
    }

    /* Chat Input */
    .chat-input-container {
        padding: var(--spacing-sm);
    }

    .chat-input-wrapper {
        padding: 8px;
    }

    #chat-input {
        font-size: 0.95rem;
        min-height: 40px;


        .btn-send {
            width: 40px;
            height: 40px;
        }

        .input-hint {
            font-size: 0.7rem;
            display: none;
        }

        /* DocIQ Mobile */
        .dociq-container {
            flex-direction: column;
            height: auto;
            min-height: calc(100vh - 120px);
            overflow-y: auto;
        }

        .dociq-upload-section {
            width: 100%;
            max-width: none;
            min-width: unset;
            border-right: none;
            border-bottom: 1px solid var(--border-color);
            padding: 12px;
            flex-shrink: 0;
        }

        .upload-area {
            padding: 16px;
            border-radius: 12px;
        }

        .upload-icon {
            width: 50px;
            height: 50px;
            margin-bottom: 12px;
        }

        .upload-icon svg {
            width: 24px;
            height: 24px;
        }

        .upload-area h3 {
            font-size: 0.95rem;
            margin-bottom: 4px;
        }

        .upload-area p {
            font-size: 0.8rem;
            margin-bottom: 12px;
        }

        .upload-area .upload-btn {
            padding: 8px 16px;
            font-size: 0.85rem;
        }

        .supported-formats {
            margin-top: 10px;
        }

        .supported-formats span {
            font-size: 0.7rem;
        }

        /* Uploaded docs list mobile */
        .uploaded-docs {
            margin-top: 12px;
            padding: 10px;
        }

        .uploaded-docs h4 {
            font-size: 0.85rem;
            margin-bottom: 8px;
        }

        .docs-list {
            max-height: 120px;
            overflow-y: auto;
        }

        .doc-item {
            padding: 8px 10px;
            font-size: 0.8rem;
            border-radius: 8px;
            margin-bottom: 6px;
        }

        .doc-item .doc-name {
            font-size: 0.8rem;
        }

        .doc-item .doc-size {
            font-size: 0.7rem;
        }

        /* DocIQ Chat Section Mobile */
        .dociq-chat-section {
            flex: 1;
            min-height: 350px;
            display: flex;
            flex-direction: column;
        }

        .dociq-messages {
            padding: 10px;
            flex: 1;
            overflow-y: auto;
        }

        .dociq-messages .message {
            max-width: 95%;
        }

        .dociq-messages .message-content {
            padding: 10px 12px;
        }

        .dociq-messages .message-text {
            font-size: 1.0rem;

            font-size: 1.05rem;
            line-height: 1.6;
            color: #000000;
        }

        /* DocIQ Input Mobile */
        .dociq-input-container {
            padding: 10px;
            border-top: 1px solid var(--border-color);
        }

        .dociq-input-wrapper {
            padding: 8px 12px;
            border-radius: 12px;
        }

        #dociq-input {
            font-size: 1.0rem;
            min-height: 36px;
        }

        #dociq-send {
            width: 36px;
            height: 36px;
        }

        #dociq-send svg {
            width: 18px;
            height: 18px;
        }

        .dociq-input-container .input-hint {
            font-size: 0.7rem;
            margin-top: 6px;
        }

        /* DocIQ View Header Mobile */
        #dociq-view .view-header {
            padding: 10px 12px;
            flex-wrap: nowrap;
            gap: 8px;
        }

        #dociq-view .view-header .view-title {
            min-width: auto;
            flex: 1;
        }

        #dociq-view .view-header .view-title h2 {
            font-size: 0.95rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #dociq-view .view-header .view-title svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        #dociq-view .header-actions {
            flex-shrink: 0;
        }

        #dociq-view .header-actions .btn-icon {
            width: 32px;
            height: 32px;
        }

        /* Tasks, Notes, Reminders Mobile */
        .tasks-container,
        .notes-grid,
        .reminders-list {
            padding: var(--spacing-sm);
        }

        .task-item {
            padding: var(--spacing-sm);
        }

        .note-card {
            padding: var(--spacing-sm);
        }

        .reminder-item {
            padding: var(--spacing-sm);
            flex-direction: column;
            align-items: flex-start;
            gap: var(--spacing-sm);
        }

        /* Modal Mobile */
        .modal-content {
            width: 95%;
            max-width: none;
            margin: var(--spacing-sm);
            max-height: 90vh;
        }

        .modal-header {
            padding: var(--spacing-md);
        }

        .modal-body {
            padding: var(--spacing-md);
        }

        /* Buttons */
        .btn-primary {
            padding: 10px 16px;
            font-size: 1.0rem;
        }

        /* Stats Card in Sidebar */
        .stats-card {
            padding: var(--spacing-sm);
        }

        .sidebar-footer {
            padding: var(--spacing-sm) 0;
        }

        /* Code blocks */
        .code-block {
            font-size: 0.8rem;
        }

        .code-block pre {
            padding: var(--spacing-sm);
        }
    }

    /* Small Mobile (max-width: 480px) */
    @media (max-width: 480px) {
        .mobile-header {
            padding: 0 var(--spacing-sm);
            height: 56px;
        }

        .mobile-menu-btn {
            width: 36px;
            height: 36px;
        }

        .mobile-logo img {
            width: 28px;
            height: 28px;
        }

        .mobile-logo span {
            font-size: 1.1rem;
        }

        .sidebar {
            width: 260px;
        }

        .logo-icon {
            width: 50px;
            height: 50px;
        }

        .logo h1 {
            font-size: 1.25rem;
        }

        .nav-item {
            padding: 10px 12px;
            font-size: 1.0rem;
        }

        .nav-label {
            font-size: 0.85rem;
        }

        .view-header {
            padding: var(--spacing-xs) var(--spacing-sm);
        }

        .view-header .view-title h2 {
            font-size: 1rem;
        }

        .header-actions .btn-icon {
            width: 32px;
            height: 32px;
        }

        .model-selector-btn {
            padding: 4px 8px;
        }

        .model-name {
            font-size: 0.75rem;
        }

        .chat-messages {
            padding: var(--spacing-xs);
        }

        .message {
            gap: 6px;
        }

        .message-avatar {
            width: 28px;
            height: 28px;
            font-size: 1.0rem;
        }

        .message-content {
            padding: 10px;
        }

        .message-text {
            font-size: 0.85rem;

            font-size: 1.05rem;
            line-height: 1.6;
            color: #000000;
        }

        .chat-input-container {
            padding: var(--spacing-xs);
        }

        #chat-input {
            font-size: 1.0rem;


            .btn-send {
                width: 36px;
                height: 36px;
            }

            /* VizIQ Mobile */
            .viziq-container {
                height: auto;
                min-height: calc(100vh - 120px);
                padding: 12px;
                overflow-y: auto;
            }

            .viziq-upload-section {
                min-height: auto;
                padding: 20px 0;
                gap: 16px;
            }

            .viziq-upload-area {
                padding: 20px 16px;
                max-width: 100%;
                border-radius: 12px;
            }

            .viziq-upload-area .upload-icon {
                width: 50px;
                height: 50px;
                margin-bottom: 12px;
            }

            .viziq-upload-area .upload-icon svg {
                width: 24px;
                height: 24px;
            }

            .viziq-upload-area h3 {
                font-size: 0.95rem;
                margin-bottom: 6px;
            }

            .viziq-upload-area p {
                font-size: 0.8rem;
                margin-bottom: 12px;
            }

            .viziq-upload-buttons {
                flex-direction: column;
                gap: 10px;
                width: 100%;
            }

            .viziq-upload-buttons .btn-primary {
                width: 100%;
                padding: 10px 16px;
                font-size: 0.85rem;
            }

            .viziq-upload-area .supported-formats {
                margin-top: 12px;
            }

            .viziq-upload-area .supported-formats span {
                font-size: 0.7rem;
            }

            /* VizIQ Processing Mobile */
            .viziq-processing {
                padding: 16px;
                max-width: 100%;
            }

            .processing-animation {
                flex-direction: column;
                text-align: center;
                gap: 12px;
                margin-bottom: 16px;
            }

            .processing-spinner {
                width: 50px;
                height: 50px;
            }

            .processing-text h4 {
                font-size: 1rem;
            }

            .processing-text p {
                font-size: 0.8rem;
            }

            .processing-steps {
                flex-wrap: wrap;
                justify-content: center;
                gap: 8px;
            }

            .processing-steps .step {
                padding: 6px 10px;
                font-size: 0.7rem;
            }

            .step-icon {
                font-size: 0.85rem;
            }

            /* VizIQ Dashboard Mobile */
            .viziq-dashboard {
                gap: 12px;
                min-height: auto;
            }

            .dashboard-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                padding: 12px;
                border-radius: 10px;
            }

            .dashboard-title h3 {
                font-size: 1rem;
            }

            .dashboard-title p {
                font-size: 0.75rem;
            }

            .dashboard-meta {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                width: 100%;
            }

            .dashboard-meta .meta-item {
                font-size: 0.7rem;
                padding: 4px 8px;
                background: rgba(75, 85, 99, 0.1);
                border-radius: 6px;
            }

            /* KPI Grid Mobile */
            .kpi-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            .kpi-card {
                padding: 12px;
                border-radius: 10px;
            }

            .kpi-icon {
                width: 36px;
                height: 36px;
                margin-bottom: 8px;
            }

            .kpi-icon svg {
                width: 18px;
                height: 18px;
            }

            .kpi-value {
                font-size: 1.25rem;
            }

            .kpi-label {
                font-size: 0.7rem;
            }

            .kpi-change {
                font-size: 0.65rem;
                margin-top: 4px;
            }

            /* Charts Section Mobile */
            .charts-section {
                margin-top: 12px;
                width: 100%;
                overflow: hidden;
            }

            .charts-section .section-title {
                font-size: 1.0rem;
                margin-bottom: 12px;
                padding: 0 4px;
            }

            .charts-grid {
                display: flex !important;
                flex-direction: column !important;
                gap: 12px;
                width: 100%;
            }

            .chart-card {
                width: 100% !important;
                max-width: 100% !important;
                padding: 12px;
                border-radius: 10px;
                grid-column: auto !important;
                box-sizing: border-box;
            }

            .chart-card:last-child {
                grid-column: auto !important;
            }

            .chart-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                margin-bottom: 12px;
                padding-bottom: 8px;
            }

            .chart-title {
                font-size: 1.0rem;
            }

            .chart-title::before {
                width: 6px;
                height: 6px;
            }

            .chart-type-badge {
                padding: 3px 8px;
                font-size: 0.6rem;
            }

            .chart-container {
                height: 250px !important;
                width: 100% !important;
                min-height: 220px;
                max-height: 280px;
                position: relative !important;
                margin: 10px 0;
                display: block !important;
                box-sizing: border-box;
            }

            .chart-container canvas {
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                display: block !important;
            }

            .chart-canvas-container {
                height: 250px !important;
                width: 100% !important;
                position: relative;
                display: block !important;
            }

            /* Full width chart card */
            .chart-card.full-width {
                width: 100% !important;
                grid-column: auto !important;
            }

            .chart-insight {
                margin-top: 12px;
                padding: 10px 12px;
                font-size: 0.8rem;
                border-radius: 8px;
            }

            .chart-insight::before {
                font-size: 0.85rem;
                top: -8px;
                left: 10px;
            }

            .chart-insight p {
                font-size: 0.8rem;
                line-height: 1.5;
                margin: 0;
            }

            .chart-insight strong {
                color: var(--primary);
            }

            /* Insights Section Mobile */
            .insights-section {
                margin-top: 8px;
            }

            .insights-section .section-title {
                font-size: 1.0rem;
                margin-bottom: 10px;
            }

            .insights-list {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .insight-card {
                padding: 12px;
                border-radius: 10px;
            }

            .insight-card .insight-icon {
                width: 32px;
                height: 32px;
                font-size: 1rem;
            }

            .insight-card h4 {
                font-size: 0.85rem;
            }

            .insight-card p {
                font-size: 0.75rem;
            }

            /* Data Preview Section Mobile */
            .data-preview-section {
                margin-top: 8px;
            }

            .data-preview-section .section-title {
                font-size: 1.0rem;
                margin-bottom: 10px;
            }

            .data-table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: 8px;
            }

            .data-table {
                min-width: 400px;
            }

            .data-table th,
            .data-table td {
                padding: 8px 10px;
                font-size: 0.7rem;
            }

            /* VizIQ View Header Mobile */
            #viziq-view .view-header {
                padding: 10px 12px;
                flex-wrap: nowrap;
                gap: 8px;
            }

            #viziq-view .view-header .view-title {
                min-width: auto;
                flex: 1;
            }

            #viziq-view .view-header .view-title h2 {
                font-size: 0.95rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            #viziq-view .view-header .view-title svg {
                width: 18px;
                height: 18px;
                flex-shrink: 0;
            }

            #viziq-view .header-actions {
                flex-shrink: 0;
                gap: 6px;
            }

            #viziq-view .header-actions .btn-icon {
                width: 32px;
                height: 32px;
            }
        }

        /* Landscape Mobile */
        @media (max-width: 768px) and (orientation: landscape) {
            .mobile-header {
                height: 50px;
            }

            .app-container {
                padding-top: 50px;
            }

            .main-content {
                height: calc(100vh - 50px);
            }

            .chat-container {
                height: calc(100vh - 120px);
            }

            .sidebar {
                padding-top: var(--spacing-sm);
            }

            .logo-icon {
                width: 40px;
                height: 40px;
            }

            .sidebar-header {
                margin-bottom: var(--spacing-md);
                padding-bottom: var(--spacing-sm);
            }
        }

        /* Touch-friendly adjustments */
        @media (hover: none) and (pointer: coarse) {
            .nav-item:hover {
                transform: none;
            }

            .nav-item:active {
                background: rgba(75, 85, 99, 0.2);
            }

            .btn-icon:hover {
                transform: none;
            }

            .btn-icon:active {
                transform: scale(0.95);
            }

            .model-option:hover {
                background: transparent;
            }

            .model-option:active {
                background: rgba(75, 85, 99, 0.15);
            }

            /* Larger touch targets */
            .task-checkbox {
                width: 24px;
                height: 24px;
            }

            .message-action-btn {
                width: 32px;
                height: 32px;
            }
        }

        /* Safe area for notched phones */
        @supports (padding: max(0px)) {
            .mobile-header {
                padding-left: max(var(--spacing-md), env(safe-area-inset-left));
                padding-right: max(var(--spacing-md), env(safe-area-inset-right));
            }

            .sidebar {
                padding-left: max(var(--spacing-md), env(safe-area-inset-left));
            }

            .chat-input-container {
                padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
            }
        }

        /* ================================
   CODE RUNNER MODAL (Backend Code Execution)
   ================================ */
    }

    .code-runner-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .code-runner-modal.active {
        opacity: 1;
        visibility: visible;
    }

    .runner-modal-container {
        background: var(--bg-secondary);
        border: 1px solid #9ca3af;
        border-radius: var(--radius-xl);
        width: 90%;
        max-width: 900px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .code-runner-modal.active .runner-modal-container {
        transform: translateY(0);
    }

    .runner-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        background: linear-gradient(135deg, rgba(75, 85, 99, 0.15) 0%, rgba(107, 114, 128, 0.1) 100%);
        border-bottom: 1px solid var(--border-color);
    }

    .runner-header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .runner-icon {
        font-size: 1.5rem;
    }

    .runner-modal-header h3 {
        margin: 0;
        font-size: 1.1rem;
        color: var(--text-primary);
    }

    .runner-language-badge {
        background: var(--primary-gradient);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .runner-header-actions {
        display: flex;
        gap: 0.5rem;
    }

    .runner-action-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        border: none;
        border-radius: var(--radius-md);
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
        background: rgba(0, 0, 0, 0.1);
        color: var(--text-primary);
    }

    .runner-action-btn:hover {
        background: rgba(0, 0, 0, 0.15);
    }

    .runner-action-btn.primary {
        background: var(--primary-gradient);
        color: white;
    }

    .runner-action-btn.primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(75, 85, 99, 0.4);
    }

    .runner-action-btn.close {
        padding: 0.5rem;
    }

    .runner-action-btn svg {
        width: 18px;
        height: 18px;
    }

    .runner-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .runner-section {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid #9ca3af;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .runner-section .section-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: rgba(75, 85, 99, 0.1);
        border-bottom: 1px solid var(--border-color);
    }

    .section-icon {
        font-size: 1rem;
    }

    .section-title {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 1.0rem;
    }

    .section-hint {
        margin-left: auto;
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .runner-code-display {
        margin: 0;
        padding: 1rem;
        max-height: 200px;
        overflow-y: auto;
        background: var(--bg-primary);
        font-family: var(--font-code);
        font-size: 0.85rem;
    }

    .runner-code-display code {
        font-family: inherit;
    }

    .runner-section textarea {
        width: 100%;
        min-height: 80px;
        padding: 1rem;
        background: var(--bg-primary);
        border: none;
        color: var(--text-primary);
        font-family: var(--font-code);
        font-size: 0.85rem;
        resize: vertical;
    }

    .runner-section textarea:focus {
        outline: none;
    }

    .runner-section textarea::placeholder {
        color: var(--text-muted);
    }

    .runner-output {
        padding: 1rem;
        min-height: 120px;
        background: var(--bg-primary);
        font-family: var(--font-code);
        font-size: 0.85rem;
    }

    .output-placeholder {
        color: var(--text-muted);
        font-style: italic;
    }

    .runner-loading {
        display: flex;
        align-items: center;
        gap: 1rem;
        color: var(--primary);
    }

    .runner-spinner {
        width: 20px;
        height: 20px;
        border: 2px solid var(--border-color);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .output-section {
        margin-bottom: 1rem;
    }

    .output-section:last-child {
        margin-bottom: 0;
    }

    .output-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-secondary);
    }

    .output-content {
        margin: 0;
        padding: 0.75rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: var(--radius-sm);
        white-space: pre-wrap;
        word-break: break-word;
        color: var(--success);
    }

    .output-content.error {
        color: var(--accent);
    }

    .output-meta {
        margin-top: 1rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    /* Mobile responsiveness */
    @media (max-width: 768px) {
        .runner-modal-container {
            width: 95%;
            max-height: 95vh;
        }

        .runner-modal-header {
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .runner-header-actions {
            width: 100%;
            justify-content: flex-end;
        }

        .runner-action-btn.primary {
            flex: 1;
            justify-content: center;
        }

        .runner-code-display {
            max-height: 150px;
        }
    }
}
 
 / *   V i z I Q   D a t a   P r e v i e w   P a g i n a t i o n   * / 
 . p a g i n a t i o n - c o n t r o l s   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   f l e x - e n d ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 5 r e m ; 
         m a r g i n - t o p :   1 r e m ; 
         p a d d i n g - t o p :   1 r e m ; 
         b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
 } 
 
 . p a g e - b t n   { 
         w i d t h :   3 2 p x ; 
         h e i g h t :   3 2 p x ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         b a c k g r o u n d :   v a r ( - - b g - p r i m a r y ) ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
         f o n t - s i z e :   0 . 9 r e m ; 
         f o n t - w e i g h t :   5 0 0 ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   a l l   v a r ( - - t r a n s i t i o n - b a s e ) ; 
 } 
 
 . p a g e - b t n : h o v e r : n o t ( . d i s a b l e d )   { 
         b a c k g r o u n d :   v a r ( - - b g - h o v e r ) ; 
         c o l o r :   v a r ( - - p r i m a r y ) ; 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y ) ; 
 } 
 
 . p a g e - b t n . a c t i v e   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y ) ; 
 } 
 
 . p a g e - b t n . d i s a b l e d   { 
         o p a c i t y :   0 . 5 ; 
         c u r s o r :   n o t - a l l o w e d ; 
         b a c k g r o u n d :   v a r ( - - b g - t e r t i a r y ) ; 
 } 
 
 
 
 / *   D o c I Q   U p l o a d   A r e a   F i x e s   * / 
 . d o c i q - u p l o a d - s e c t i o n   { 
         p a d d i n g :   1 . 5 r e m ; 
         b a c k g r o u n d :   v a r ( - - b g - s e c o n d a r y ) ; 
         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         m a r g i n - b o t t o m :   1 . 5 r e m ; 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 
 . u p l o a d - a r e a   { 
         b o r d e r :   2 p x   d a s h e d   r g b a ( 7 5 ,   8 5 ,   9 9 ,   0 . 3 ) ; 
         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
         p a d d i n g :   2 . 5 r e m   1 . 5 r e m ; 
         t e x t - a l i g n :   c e n t e r ; 
         b a c k g r o u n d :   # f f f f f f ; 
         t r a n s i t i o n :   a l l   v a r ( - - t r a n s i t i o n - b a s e ) ; 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 7 5 r e m ; 
         m a r g i n - b o t t o m :   1 . 5 r e m ; 
 } 
 
 . u p l o a d - a r e a : h o v e r ,   . u p l o a d - a r e a . d r a g o v e r   { 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y ) ; 
         b a c k g r o u n d :   r g b a ( 7 5 ,   8 5 ,   9 9 ,   0 . 0 2 ) ; 
 } 
 
 . u p l o a d - i c o n   { 
         w i d t h :   6 4 p x ; 
         h e i g h t :   6 4 p x ; 
         b a c k g r o u n d :   v a r ( - - b g - t e r t i a r y ) ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         m a r g i n - b o t t o m :   0 . 5 r e m ; 
         c o l o r :   v a r ( - - p r i m a r y ) ; 
 } 
 
 . u p l o a d - i c o n   s v g   { 
         w i d t h :   3 2 p x ; 
         h e i g h t :   3 2 p x ; 
 } 
 
 . u p l o a d - a r e a   h 3   { 
         f o n t - s i z e :   1 . 2 r e m ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
         m a r g i n :   0 ; 
 } 
 
 . u p l o a d - a r e a   p   { 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
         f o n t - s i z e :   0 . 9 5 r e m ; 
         m a r g i n :   0 ; 
 } 
 
 . u p l o a d - b t n   { 
         m a r g i n - t o p :   0 . 5 r e m ; 
         p a d d i n g :   0 . 6 r e m   1 . 2 r e m ; 
         f o n t - s i z e :   0 . 9 r e m ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 5 r e m ; 
 } 
 
 . u p l o a d - b t n   s v g   { 
         w i d t h :   1 6 p x ; 
         h e i g h t :   1 6 p x ; 
 } 
 
 . s u p p o r t e d - f o r m a t s   { 
         f o n t - s i z e :   0 . 8 r e m ; 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
         o p a c i t y :   0 . 8 ; 
         m a r g i n - t o p :   0 . 5 r e m ; 
 } 
 
 . u p l o a d e d - d o c s   h 4   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 5 r e m ; 
         f o n t - s i z e :   1 . 0 5 r e m ; 
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
         m a r g i n - b o t t o m :   1 r e m ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         p a d d i n g - b o t t o m :   0 . 5 r e m ; 
 } 
 
 . u p l o a d e d - d o c s   h 4   s v g   { 
         w i d t h :   1 8 p x ; 
         h e i g h t :   1 8 p x ; 
         s t r o k e :   v a r ( - - p r i m a r y ) ; 
 } 
 
 
 