/* Modern Knowledge Base App Styles with Brand Colors Integration */

/* CSS Variables for Light and Dark Themes with Brand Colors */
:root {
    /* Brand Colors - Primary Integration */
    --brand-orange: #FF9100;
    --brand-golden: #FDCC59;
    --brand-dark-orange: #E67C00;
    --brand-gradient: linear-gradient(135deg, #FF9100, #FDCC59);
    --brand-gradient-reverse: linear-gradient(135deg, #FDCC59, #FF9100);
    --brand-glow: 0 0 20px rgba(255, 145, 0, 0.3);
    --brand-glow-strong: 0 0 30px rgba(255, 145, 0, 0.5);
    --brand-gradient-chat: linear-gradient(133deg, gold, red, gray);
    /* Light theme colors with brand integration */
    --primary-color: #FF9100;
    --primary-light: #FDCC59;
    --primary-dark: #E67C00;
    --secondary-color: #f1f5f9;
    --accent-color: #FDCC59;
    --success-color: #10b981;
    --warning-color: #FF9100;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-dashboard-header: 'Space Grotesk', sans-serif;
    --font-quick-actions: 'Rajdhani', sans-serif;
    --font-stats: 'Rajdhani', sans-serif;
    --font-documents: 'Inter', sans-serif;
    --font-activity: 'Rajdhani', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --font-body: 'Exo 2', sans-serif;
    
    /* Common variables */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --navbar-height: 80px;
    --footer-height: 60px;
    --transition: all 0.3s ease;
}

/* Dark theme colors with brand integration */
[data-theme="dark"] {
    --primary-color: #FF9100;
    --primary-light: #FDCC59;
    --primary-dark: #E67C00;
    --secondary-color: #1e293b;
    --accent-color: #FDCC59;
    --success-color: #34d399;
    --warning-color: #FF9100;
    --danger-color: #f87171;
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --card-bg: rgba(30, 41, 59, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Theme transition animation */
.theme-transitioning,
.theme-transitioning * {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease !important;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%); */
    /* background: linear-gradient(135deg, #03b69b 0%, #FDCC59 50%, #018974 100%) !important; */
    font-family: 'Exo 2', sans-serif;
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    min-height: 100vh;
}

.bitcount-grid-double {
    font-family: "Bitcount Grid Double", system-ui;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "CRSV" 0.5,
        "ELSH" 0,
        "ELXP" 0;
}

/* Animated Brand Background Layer */
@keyframes brandGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        120deg,
        rgba(255, 145, 0, 0.08),
        rgba(253, 204, 89, 0.08)
    );
    background-size: 300% 300%;
    animation: brandGradientShift 10s ease infinite;
    transform: translateY(var(--bg-scroll, 0));
    will-change: background-position, transform;
}

/* Navbar Styles - Always Dark with Brand Accents */
.navbar {
    --navbar-bg: rgba(15, 23, 42, 0.95) !important;
    --navbar-text-primary: #f8fafc !important;
    --navbar-text-secondary: #94a3b8 !important;
    --navbar-border: #334155 !important;
    --navbar-primary: #FF9100 !important;
    
    background: var(--navbar-bg) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
    height: var(--navbar-height);
    z-index: 1030;
    transition: var(--transition);
}

.navbar.navbar-scrolled {
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--navbar-primary) !important;
    display: flex;
    align-items: center;
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
}

.brand-text .brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--text-primary);
}

.brand-text .brand-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1;
    margin: 0;
    color: var(--text-secondary);
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 0.75rem;
    filter: brightness(1.2);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--navbar-text-secondary) !important;
    padding: 2.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover {
    color: var(--navbar-primary) !important;
    background-color: rgba(255, 145, 0, 0.1) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
}

/* Navbar Toggler */
.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    transition: background-color 0.3s ease !important;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em;
    height: 1.5em;
    filter: invert(1) brightness(100%) !important;
}

/* Theme Toggle Styles */
.theme-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--navbar-border);
    background: rgba(30, 41, 59, 0.8);
    color: var(--navbar-text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--brand-orange);
}

.result-snippet {
    line-height: 1.6;
    color: var(--text-secondary);
}

.result-snippet mark {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.3), rgba(253, 204, 89, 0.3));
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #333;
}

.score-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Loading States */
.spinner-border {
    border-color: rgba(255, 145, 0, 0.25);
    border-right-color: var(--brand-orange);
    filter: drop-shadow(0 0 5px rgba(255, 145, 0, 0.3));
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Smart Features */
.smart-features-panel {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.smart-btn {
    transition: all 0.3s ease;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.smart-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.smart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Follow-up Questions */
.followup-questions {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border: 1px solid rgba(255, 145, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    animation: slideIn 0.5s ease-out;
}

.followup-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.followup-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

/* Autocomplete Styles */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-item:hover {
    background-color: rgba(255, 145, 0, 0.1);
    color: var(--brand-orange);
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Suggestion Badges */
.suggestion-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-badge:hover {
    background: var(--brand-orange);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Step Icons */
.step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    box-shadow: var(--brand-glow);
    transition: var(--transition);
}

.step-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--brand-glow-strong);
    animation: brandPulse 2s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-gradient);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--brand-dark-orange), var(--brand-orange));
}

/* Glassmorphism Effect */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* Brand Highlight Utilities */
.brand-highlight {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.brand-glow {
    box-shadow: var(--brand-glow);
}

.brand-glow-strong {
    box-shadow: var(--brand-glow-strong);
}

/* Special Brand Effects */
@keyframes brandShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.quick-action-card:nth-child(even)::before {
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 145, 0, 0.2), 
        transparent
    );
    background-size: 200% 100%;
    animation: brandShimmer 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* Dark Theme Specific Enhancements */
[data-theme="dark"] .collapsible-section {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .section-header {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.1), rgba(253, 204, 89, 0.1));
}

[data-theme="dark"] .stats-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .document-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .quick-action-card {
    background: rgba(255, 145, 0, 0.15) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border: 1px solid rgba(253, 204, 89, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(253, 204, 89, 0.2) !important;
}

/* Dark mode text colors for mobile cards */
[data-theme="dark"] .quick-action-card h6 {
    color: #f8fafc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .quick-action-card p {
    color: #cbd5e1 !important;
}

/* Dark mode hover effects for mobile cards */
[data-theme="dark"] .quick-action-card:hover {
    background: rgba(255, 145, 0, 0.25) !important;
    border-color: rgba(255, 145, 0, 0.4) !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(253, 204, 89, 0.3),
        0 0 60px rgba(255, 145, 0, 0.2),
        inset 0 0 20px rgba(253, 204, 89, 0.15) !important;
}

[data-theme="dark"] .card.border-primary,
[data-theme="dark"] .card.border-warning {
    background: rgba(255, 145, 0, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(253, 204, 89, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(253, 204, 89, 0.2) !important;
}

[data-theme="dark"] .result-snippet mark {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.4), rgba(253, 204, 89, 0.4));
    color: var(--text-primary);
}

[data-theme="dark"] .followup-questions {
    background: rgba(255, 145, 0, 0.1);
    border-color: rgba(255, 145, 0, 0.3);
}

[data-theme="dark"] .smart-features-panel {
    background: rgba(255, 145, 0, 0.1);
}

[data-theme="dark"] .typing-text {
    background: linear-gradient(135deg, #FF9100, #FDCC59, #22d3ee, #34d399);
    background-size: 400% 100%;
    animation: gradientFlow 4s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .typing-cursor {
    background-color: #FF9100;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
        --footer-height: 85px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .brand-text .brand-title {
        font-size: 1.1rem;
    }
    
    .brand-text .brand-subtitle {
        display: none;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .stats-card {
        height: auto;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stats-card h4 {
        font-size: 1.8rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .document-card {
        height: auto;
        min-height: 200px;
    }
    
    .document-actions {
        position: static;
        transform: none;
        background: var(--bg-secondary);
    }
    
    .section-content.expanded {
        max-height: none;
        padding: 1rem;
    }
    
    .section-header {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .message-bubble {
        max-width: 90%;
    }
    
    .upload-area {
        min-height: 200px;
    }
    
    .upload-content {
        padding: 1rem;
    }
    
    .main-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .chat-sidebar {
        margin-top: 1rem;
        position: static;
    }
    
    .theme-toggle-container {
        margin-left: 0.5rem;
    }
    
    .theme-toggle-btn {
        width: 45px;
        height: 45px;
    }
    
    .theme-toggle-btn .fas {
        font-size: 18px;
    }
    
    .typing-container {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .typing-prefix,
    .typing-text {
        font-size: 1rem;
    }
    
    .typing-text {
        min-width: 180px;
    }
    
    .typing-cursor {
        height: 1rem;
    }
    
    .section-main-title {
        font-size: 1.8rem;
    }
    
    .chat-fab {
        bottom: 20px !important;
        right: 20px !important;
        width: 70px !important;
        height: 70px !important;
        font-size: 1.6rem !important;
    }
    
    .quick-action-card {
        background: rgba(255, 145, 0, 0.08);
    }
    
    .navbar-toggler-icon {
        width: 1.8em !important;
        height: 1.8em !important;
    }
    
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        border-radius: var(--border-radius);
        margin-top: 0.5rem;
        padding: 1rem;
        border: 1px solid #334155;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
    
    .collapsible-section,
    .stats-card,
    .document-card,
    .quick-action-card {
        border-width: 2px;
        border-color: var(--text-primary);
    }
    
    .section-header:hover {
        background: var(--text-primary);
        color: var(--bg-primary);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .collapsible-section,
    .stats-card,
    .document-card,
    .quick-action-card,
    .chat-fab {
        animation: none !important;
        transition: none !important;
    }
    
    .section-content {
        transition: max-height 0.1s ease;
    }
    
    .quick-action-card::before,
    .quick-action-card::after,
    .chat-fab::before,
    .chat-fab::after {
        animation: none !important;
    }
    
    body::before {
        animation: none !important;
    }
}

/* Focus States for Accessibility */
.theme-toggle-btn:focus,
.btn:focus,
.quick-action-card:focus {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

/* Notification Toast Enhancements */
.notification-toast {
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    border: none;
    animation: slideInRight 0.3s ease-out;
}

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

/* Enhanced Modal Delete Warning */
.delete-warning {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.warning-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}

.warning-content {
    flex-grow: 1;
}

.warning-details {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid var(--danger-color);
}

.warning-details ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.warning-details li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* OpenAI Icon Integration */
.simple-icons--openai {
    display: inline-block;
    width: 36px;
    height: 36px;
    --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z'/%3E%3C/svg%3E");
    background-color: currentColor;
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Enhanced Chat FAB OpenAI Icon */
.chat-fab i.simple-icons--openai {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    display: inline-block !important;
    width: 32px !important;
    height: 32px !important;
    background-color: currentColor;
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    color: white;
}

.chat-fab:hover i.simple-icons--openai {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    color: white;
}

/* Final Brand Integration Touches */
.navbar-brand .brand-icon {
    background: var(--brand-gradient);
}

.brand-text .brand-title {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ensure all interactive elements have proper brand integration */
a:hover,
button:hover,
.btn:hover,
.card:hover {
    color: inherit;
    text-decoration: none;
}

/* Animation cleanup and final optimizations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Apply entrance animations */
.stats-card {
    animation: fadeInScale 0.5s ease-out;
}

.document-card {
    animation: slideUp 0.4s ease-out;
}

/* Ensure proper stacking context */
.navbar {
    z-index: 1030;
}

.chat-fab {
    z-index: 9999;
}

.modal {
    z-index: 1050;
}

.notifications-container {
    z-index: 1040;
}: var(--brand-orange);
    box-shadow: var(--brand-glow);
}

.theme-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 145, 0, 0.3);
}

.theme-toggle-btn .fas {
    font-size: 20px;
    transition: all 0.3s ease;
}

.theme-icon-light {
    color: #FDCC59;
    display: block;
}

.theme-icon-dark {
    color: #FF9100;
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: block;
}

/* Main Content Layout */
.main-content {
    flex: 1;
    padding-top: calc(var(--navbar-height) - 2rem);
    padding-bottom: calc(var(--footer-height) + 2rem);
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
}

/* Modern Footer */
.modern-footer {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
    height: var(--footer-height);
    box-shadow: 0 -2px 10px var(--shadow-color);
    z-index: 1020;
    transition: var(--transition);
    flex-shrink: 0;

}

.footer-links a {
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary) !important;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    background-color: rgba(255, 145, 0, 0.1);
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 1040;
    max-width: 400px;
}

.modern-alert {
    border: none;
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
}

/* Modern Cards with Brand Enhancement */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    color: var(--text-primary);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
    /* background: var(--card-bg); */
}

/* Enhanced Buttons with Brand Colors */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: var(--brand-gradient);
    box-shadow: var(--brand-glow);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-dark-orange), var(--brand-orange));
    transform: translateY(-2px);
    box-shadow: var(--brand-glow-strong);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--accent-color), #FFD54F);
    color: #333;
}

.btn-outline-primary {
    border: 2px solid var(--brand-orange);
    color: var(--brand-orange);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--brand-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--brand-glow);
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-success, .btn-outline-info, .btn-outline-warning, .btn-outline-danger {
    background: transparent;
    transition: var(--transition);
}

.btn-outline-success {
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: white;
}

.btn-outline-info {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline-info:hover {
    background: var(--accent-color);
    color: #333;
}

.btn-outline-warning {
    border: 2px solid var(--brand-orange);
    color: var(--brand-orange);
}

.btn-outline-warning:hover {
    background: var(--brand-orange);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Dashboard Container and Header */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: var(--font-dashboard-header);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    position: relative;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: 2px;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--brand-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-family: var(--font-dashboard-header);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(255, 145, 0, 0.3);
}

.dashboard-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Typing Animation with Brand Colors */
.typing-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    margin-top: 1rem;
    flex-wrap: wrap;
    position: relative;
    min-height: 2rem;
}

.typing-prefix {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.2;
}

.typing-text {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    min-height: 1.5rem;
    display: inline-block;
    position: relative;
    min-width: 200px;
    text-align: left;
    background: linear-gradient(135deg, #FF9100, #FDCC59, #06b6d4, #10b981);
    background-size: 400% 100%;
    animation: gradientFlow 4s ease-in-out infinite;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: baseline;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.44rem;
    background-color: var(--brand-orange) !important;
    animation: blink 1s infinite;
    position: absolute;
    margin-left: 2px;
    vertical-align: baseline;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.5);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Enhanced Quick Actions with Brand Glassmorphism */
.quick-actions-section {
    margin-bottom: 3rem;
    margin-top: 1rem;
    font-family: var(--font-quick-actions);
}

.dashboard-container .dashboard-header {
    margin-bottom: 2rem;
    padding: 2rem 1rem 0 1rem;
}

.dashboard-title {
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

/* Auth pages (login/register) proper spacing */
.auth-container {
    padding-top: 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-card {
    display: block;
    background: rgba(255, 145, 0, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    color: var(--text-primary);
    border: 1px solid rgba(255, 145, 0, 0.2) !important;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(255, 145, 0, 0.1),
        inset 0 1px 0 rgba(253, 204, 89, 0.2) !important;
}

.quick-action-card:hover {
    background: rgba(255, 145, 0, 0.15) !important;
    border-color: var(--brand-orange) !important;
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 20px 40px rgba(255, 145, 0, 0.3),
        0 0 40px rgba(253, 204, 89, 0.5),
        0 0 60px rgba(255, 145, 0, 0.3),
        0 0 80px rgba(253, 204, 89, 0.2),
        inset 0 0 20px rgba(253, 204, 89, 0.1) !important;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.stats-card.total::before {
    background: var(--brand-gradient);
}

.stats-card.processed::before {
    background: linear-gradient(90deg, #FDCC59, #FFD54F);
}

.stats-card.embeddings::before {
    background: linear-gradient(90deg, #FDCC59, #f59e0b);
}

.stats-card.size::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stats-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stats-card.total .stats-icon {
    background: var(--brand-gradient);
    box-shadow: var(--brand-glow);
}

.stats-card.processed .stats-icon {
    background: linear-gradient(135deg, #FDCC59, #FFD54F);
    box-shadow: 0 0 20px rgba(253, 204, 89, 0.4);
}

.stats-card.embeddings .stats-icon {
    background: linear-gradient(135deg, #FDCC59, #FDCC59);
}

.stats-card.size .stats-icon {
    background: linear-gradient(135deg, #fefe78, #ffa705);
}

.stats-content {
    flex-grow: 1;
    margin: 0 1rem;
}

.stats-content h4 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

.stats-content h4 .unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.stats-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.stats-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.stats-progress .progress-bar {
    height: 5%;
    background: var(--brand-gradient);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.stats-trend {
    color: var(--brand-orange);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 145, 0, 0.1);
}

/* Document Cards Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.document-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 240px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-card:hover {
    transform: translateY(-8px) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--brand-orange);
}

.document-card:hover .document-overlay {
    opacity: 1;
    transform: translateY(0);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-bottom: 1px solid var(--border-color);
}

.document-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.file-type-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--brand-orange);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.success {
    background: var(--brand-gradient);
    color: white;
}

.status-badge.warning {
    background: linear-gradient(135deg, #FDCC59, #FFD54F);
    color: #333;
}

.status-badge.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.document-body {
    padding: 1.25rem;
    flex-grow: 1;
}

.document-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.document-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.meta-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
    color: var(--brand-orange);
}

.document-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.document-card:hover .document-actions {
    transform: translateY(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn.view {
    background: var(--brand-gradient);
    color: white;
}

.action-btn.download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.search {
    background: linear-gradient(135deg, #FDCC59, #FFD54F);
    color: #333;
}

.action-btn.delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.action-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.95), rgba(253, 204, 89, 0.95));
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    padding: 2rem;
}

.overlay-content h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.overlay-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brand-gradient);
    z-index: 1;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 0;
    position: relative;
}

.activity-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.activity-icon.system {
    background: var(--brand-gradient);
    box-shadow: var(--brand-glow);
}

.activity-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.activity-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.activity-icon.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.activity-content {
    flex-grow: 1;
    padding-top: 0.25rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.activity-header h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.activity-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.empty-state h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}

/* View All Container */
.view-all-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Modern Tables */
.table {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: none;
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-tertiary);
    border: none;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem;
}

.table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    background: var(--card-bg);
    color: var(--text-primary);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(255, 145, 0, 0.05);
    transform: scale(1.01);
}

/* Enhanced Upload Area */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--card-bg);
    transition: var(--transition);
    cursor: pointer;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-area:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 145, 0, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover:before,
.upload-area.drag-over:before {
    opacity: 1;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--brand-orange);
    background: rgba(255, 145, 0, 0.05);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 145, 0, 0.2);
}

.upload-content {
    text-align: center;
    padding: 2rem;
    z-index: 1;
    position: relative;
    color: var(--text-primary);
}

.upload-content i {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 145, 0, 0.3));
}

/* Enhanced Chat Interface */
.chat-messages {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s ease-out;
}

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

.message-bubble {
    max-width: 85%;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    position: relative;
    word-wrap: break-word;
    line-height: 1.5;
}

.user-bubble {
    background: var(--brand-gradient);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: var(--shadow-md);
}

.bot-bubble {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--brand-orange);
    border-bottom-left-radius: 6px;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.user-avatar, .bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.user-avatar {
    background: var(--brand-gradient);
    color: white;
}

.bot-avatar {
    background: linear-gradient(135deg, var(--accent-color), #FFD54F);
    color: #333;
}

/* Enhanced Chat FAB with Brand Futuristic Design */
.chat-fab {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    top: auto !important;
    left: auto !important;
    
    width: 70px !important;
    height: 70px !important;
    background: var(--brand-gradient-chat);
    border: 1px solid rgba(253, 204, 89, 0.3);
    border-radius: 24px;
    
    display: flex !important;
    justify-content: center;
    align-items: center;
    
    z-index: 9999 !important;
    cursor: pointer;
    text-decoration: none;
    color: white;
    font-size: 1.8rem;
    
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    box-shadow: 
        0 8px 32px rgba(255, 145, 0, 0.3),
        0 0 20px rgba(253, 204, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: brandPulse 3s ease-in-out infinite;
    
    overflow: hidden;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.chat-fab::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #FDCC59;
    border-radius: 50%;
    box-shadow: 0 0 15px #FDCC59;
    animation: statusBlink 2s ease-in-out infinite;
}

.chat-fab::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: statusBlink 2s ease-in-out infinite reverse;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chat-fab:hover {
    transform: translateY(-4px) scale(1.05) !important;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 16px 48px rgba(255, 145, 0, 0.5),
        0 0 40px rgba(253, 204, 89, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    
    background: var(--brand-gradient-reverse);
    color: white !important;
    text-decoration: none !important;
}

.chat-fab i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.chat-fab:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.chat-fab:active {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 
        0 8px 24px rgba(255, 145, 0, 0.6),
        0 0 25px rgba(253, 204, 89, 0.5);
}

/* Form Controls */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 145, 0, 0.1);
    transform: translateY(-2px);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.chat-input {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.chat-input .form-control {
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    border-right: none;
    padding: 1rem 1.25rem;
}

.chat-input .btn {
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
    padding: 1rem 1.5rem;
}

/* Enhanced Badges */
.badge {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background: var(--brand-gradient) !important;
    color: white;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #FDCC59, #FFD54F) !important;
    color: #333;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626) !important;
    color: white;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--text-secondary), var(--border-color)) !important;
    color: var(--bg-primary);
}

.badge.bg-info {
    background: linear-gradient(135deg, var(--accent-color), #FFD54F) !important;
    color: #333;
}

/* Enhanced Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    border-left: 4px solid;
}

.alert-info {
    background: rgba(253, 204, 89, 0.1);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-left: 4px solid var(--success-color);
    color: #0f6a49;
    border-radius: 8px;
    border-left-color: var(--success-color);
}

.alert-warning {
    background: rgba(255, 145, 0, 0.15);
    border-left: 4px solid var(--brand-orange);
    color: #b8610a;
    border-radius: 8px;
    border-left-color: var(--brand-orange);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid var(--danger-color);
    color: #c53030;
    border-radius: 8px;
    border-left-color: var(--danger-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    border-radius: 8px;
}

/* Enhanced Progress Bars */
.progress {
    height: 12px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--border-radius-sm);
    background: var(--brand-gradient);
    transition: width 0.6s ease;
}

/* Enhanced Modals */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    background: var(--card-bg);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
    background: var(--card-bg);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    background: var(--card-bg);
}

.btn-close {
    filter: var(--text-primary) == #f8fafc ? invert(1) : invert(0);
}

/* Enhanced Analytics Cards */
.card.border-primary {
    background: rgba(255, 145, 0, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 145, 0, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(255, 145, 0, 0.1),
        inset 0 1px 0 rgba(253, 204, 89, 0.2) !important;
}

.card.border-success {
    background: rgba(16, 185, 129, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.card.border-info {
    background: rgba(253, 204, 89, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(253, 204, 89, 0.2) !important;
}

.card.border-warning {
    background: rgba(253, 204, 89, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(253, 204, 89, 0.2) !important;
}

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

.card.border-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(253, 204, 89, 0.6), transparent);
}

.card.border-primary:hover,
.card.border-success:hover,
.card.border-info:hover,
.card.border-warning:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 
        0 16px 40px rgba(255, 145, 0, 0.15),
        inset 0 1px 0 rgba(253, 204, 89, 0.3) !important;
}

/* Text Colors */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--brand-orange) !important;
}

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

.text-warning {
    color: var(--brand-golden) !important;
}

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

.text-info {
    color: var(--accent-color) !important;
}

/* Background Colors */
.bg-light {
    background-color: var(--bg-secondary) !important;
}

.bg-dark {
    background-color: var(--bg-primary) !important;
}

/* Enhanced Search Results */
.result-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color
    height: 1px;
    background: var(--brand-gradient);
    opacity: 0.8;
}

.quick-action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 145, 0, 0.1), 
        rgba(253, 204, 89, 0.1),
        transparent
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

.quick-action-card:hover::after {
    left: 100%;
}

.quick-action-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: var(--transition);
    box-shadow: var(--brand-glow);
}

.quick-action-icon.upload {
    background: var(--brand-gradient);
}

.quick-action-icon.chat {
    background: var(--brand-gradient-reverse);
}

.quick-action-icon.profile {
    background: var(--brand-gradient-reverse);
}

.quick-action-icon.process {
    /* background: linear-gradient(135deg, #5DC2AF 20%, #f9b07c 79%, #dc8649 100%); */
    background:linear-gradient(135deg,
        #5DC2AF 15%,       /* Mint green */
        #7FD1B7 30%,      /* Softer transition mint */
        #F9B07C 60%,      /* Peach */
        #F3A76F 80%,      /* Transition peach-orange */
        #DC8649 94%      /* Burnt orange */
        );

    border-radius: 30px; 
    box-shadow: 0 4px 13px rgba(93, 194, 175, 0.3), 0 4px 13px rgba(249, 176, 124, 0.2), 0 4px 13px rgba(220, 134, 73, 0.2);
}

.quick-action-icon.manage {
    background: var(--brand-gradient);
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1) rotate(5deg);
    animation: brandPulse 2s ease-in-out infinite;
}

.quick-action-card h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.quick-action-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Brand Pulse Animation */
@keyframes brandPulse {
    0%, 100% { 
        box-shadow: var(--brand-glow);
    }
    50% { 
        box-shadow: var(--brand-glow-strong);
    }
}

/* Accordion Style Quick Actions */
.accordion-container {
    width: 100%;
    margin: 0;
    padding: 0 1rem;
}

.quick-actions-accordion {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    background: transparent;
}

.accordion-item {
    position: relative;
    width: 16.666%;
    opacity: 0.7;
    overflow: hidden;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;

}

.accordion-item:first-child .accordion-overlay {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.accordion-item:last-child {
    border-right: none;
}

.accordion-item:last-child .accordion-overlay {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.accordion-item.chiirp-main {
    width: 50%;
    opacity: 1;
    animation: chiirpIntro 1.5s ease-out 0.5s both;
    border-right: 1px solid rgba(93, 194, 175, 0.2);
}

@keyframes chiirpIntro {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.accordion-item:hover,
.accordion-item:focus-within {
    width: 50%;
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255, 145, 0, 0.4)) drop-shadow(0 0 30px rgba(253, 204, 89, 0.3));
}

.accordion-item:hover ~ .accordion-item:last-child,
.accordion-item:focus-within ~ .accordion-item:last-child {
    width: 16.666%;
    opacity: 0.7;
}

/* Maintain expanded state longer for better click interaction */
.accordion-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item::after {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    pointer-events: none;
}

.accordion-item:hover::after {
    pointer-events: auto;
}

.accordion-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 10;
}

.accordion-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.5s ease;
    border-left: 3px solid transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-item.chiirp-main .accordion-overlay {
    background: linear-gradient(135deg, 
        rgba(93, 194, 175, 0.08) 15%,
        rgba(249, 176, 124, 0.08) 60%,
        rgba(220, 134, 73, 0.08) 85%);

}

.accordion-item.upload-action .accordion-overlay {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));

}

.accordion-item.cards-action .accordion-overlay {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(129, 199, 132, 0.05));
}

.accordion-item.pdfs-action .accordion-overlay {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(100, 181, 246, 0.05));

}

.accordion-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 1;
}

.accordion-item:hover .accordion-overlay::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
}

/* Hover border effects for each action */
.accordion-item.chiirp-main:hover .accordion-overlay {
    box-shadow: 
        0 0 30px rgba(93, 194, 175, 0.4),
        0 0 50px rgba(93, 194, 175, 0.2),
        inset 0 0 20px rgba(93, 194, 175, 0.1);
}

.accordion-item.upload-action:hover .accordion-overlay {
    box-shadow: 
        0 0 30px rgba(255, 145, 0, 0.4),
        0 0 50px rgba(255, 145, 0, 0.2),
        inset 0 0 20px rgba(255, 145, 0, 0.1);
}

.accordion-item.cards-action:hover .accordion-overlay {
    box-shadow: 
        0 0 30px rgba(76, 175, 80, 0.4),
        0 0 50px rgba(76, 175, 80, 0.2),
        inset 0 0 20px rgba(76, 175, 80, 0.1);
}

.accordion-item.pdfs-action:hover .accordion-overlay {
    box-shadow: 
        0 0 30px rgba(33, 150, 243, 0.4),
        0 0 50px rgba(33, 150, 243, 0.2),
        inset 0 0 20px rgba(33, 150, 243, 0.1);
}

.accordion-content {
    text-align: center;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.accordion-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.accordion-content h4 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease 0.2s;
}

.accordion-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.accordion-item.chiirp-main .accordion-content p {
    opacity: 1;
    transform: translateY(0);
}

.accordion-item:not(.chiirp-main) .accordion-content p {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.3s;
}

.action-hint {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 145, 0, 0.2);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-orange);
    border: 1px solid rgba(255, 145, 0, 0.3);
}

.accordion-item:hover .accordion-content p {
    opacity: 1;
    transform: translateY(0);
}

.accordion-item .quick-action-icon {
    margin-bottom: 1.5rem;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.accordion-item.chiirp-main .quick-action-icon {
    transform: scale(1);
}

.accordion-item:hover .quick-action-icon {
    transform: scale(1) rotate(5deg);
    animation: brandPulse 2s ease-in-out infinite;
}

/* Special animations for Chiirp AI */
.accordion-item.chiirp-main:hover .quick-action-icon {
    animation: chiirpFocus 2s ease-in-out infinite;
}

.accordion-item.chiirp-main:hover .action-icon-img {
    animation: chiirpShake 0.6s ease-in-out infinite alternate;
}

@keyframes chiirpFocus {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 0 4px 13px rgba(93, 194, 175, 0.3), 
                    0 4px 13px rgba(249, 176, 124, 0.2), 
                    0 4px 13px rgba(220, 134, 73, 0.2);
    }
    25% {
        transform: scale(1.05) rotate(-2deg);
        box-shadow: 0 6px 20px rgba(93, 194, 175, 0.4), 
                    0 6px 20px rgba(249, 176, 124, 0.3), 
                    0 6px 20px rgba(220, 134, 73, 0.3);
    }
    50% { 
        transform: scale(1.1) rotate(0deg);
        box-shadow: 0 8px 25px rgba(93, 194, 175, 0.5), 
                    0 8px 25px rgba(249, 176, 124, 0.4), 
                    0 8px 25px rgba(220, 134, 73, 0.4);
    }
    75% {
        transform: scale(1.05) rotate(2deg);
        box-shadow: 0 6px 20px rgba(93, 194, 175, 0.4), 
                    0 6px 20px rgba(249, 176, 124, 0.3), 
                    0 6px 20px rgba(220, 134, 73, 0.3);
    }
}

@keyframes chiirpShake {
    0% { 
        transform: translateX(0px) rotate(0deg) scale(1);
        filter: brightness(1) drop-shadow(0 0 5px rgba(93, 194, 175, 0.3));
    }
    25% { 
        transform: translateX(-1px) rotate(-1deg) scale(1.02);
        filter: brightness(1.1) drop-shadow(0 0 8px rgba(249, 176, 124, 0.4));
    }
    50% { 
        transform: translateX(1px) rotate(1deg) scale(1.05);
        filter: brightness(1.2) drop-shadow(0 0 12px rgba(93, 194, 175, 0.5));
    }
    75% { 
        transform: translateX(-1px) rotate(-0.5deg) scale(1.02);
        filter: brightness(1.1) drop-shadow(0 0 8px rgba(220, 134, 73, 0.4));
    }
    100% { 
        transform: translateX(0px) rotate(0deg) scale(1);
        filter: brightness(1) drop-shadow(0 0 5px rgba(93, 194, 175, 0.3));
    }
}

/* Color overlays for each action */
.accordion-item.chiirp-main::before {
    background: linear-gradient(135deg, rgba(93, 194, 175, 0.2), rgba(249, 176, 124, 0.2));
}

.accordion-item.upload-action::before {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.2), rgba(253, 204, 89, 0.2));
}

.accordion-item.cards-action::before {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(129, 199, 132, 0.2));
}

.accordion-item.pdfs-action::before {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(100, 181, 246, 0.2));
}

.accordion-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 0;
    transition: all 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.accordion-item:first-child::before {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.accordion-item:last-child::before {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.accordion-item:hover::before {
    width: 100%;
}

/* Dark Mode Styles for Accordion */
[data-theme="dark"] .quick-actions-accordion {
    border: 1px solid rgba(51, 65, 85, 0.3);
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.8) 0%, 
        rgba(30, 41, 59, 0.8) 50%, 
        rgba(15, 23, 42, 0.8) 100%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .accordion-item {
    border-right: 1px solid rgba(51, 65, 85, 0.2);
}

[data-theme="dark"] .accordion-overlay {
    background: rgba(30, 41, 59, 0.6) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
}

[data-theme="dark"] .accordion-item.chiirp-main .accordion-overlay {
    background: linear-gradient(135deg, 
        rgba(93, 194, 175, 0.15) 15%,
        rgba(249, 176, 124, 0.15) 60%,
        rgba(220, 134, 73, 0.15) 85%) !important;
    border: 3px solid rgba(93, 194, 175, 0.4) !important;
    box-shadow: 
        0 0 20px rgba(93, 194, 175, 0.2),
        inset 0 1px 0 rgba(93, 194, 175, 0.1);
}

[data-theme="dark"] .accordion-item.upload-action .accordion-overlay {
    background: linear-gradient(135deg, 
        rgba(255, 145, 0, 0.12) 0%, 
        rgba(253, 204, 89, 0.12) 100%) !important;
    border: 3px solid rgba(255, 145, 0, 0.4) !important;
    box-shadow: 
        0 0 20px rgba(255, 145, 0, 0.2),
        inset 0 1px 0 rgba(255, 145, 0, 0.1);
}

[data-theme="dark"] .accordion-item.cards-action .accordion-overlay {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.12) 0%, 
        rgba(129, 199, 132, 0.12) 100%) !important;
    border: 3px solid rgba(76, 175, 80, 0.4) !important;
    box-shadow: 
        0 0 20px rgba(76, 175, 80, 0.2),
        inset 0 1px 0 rgba(76, 175, 80, 0.1);
}

[data-theme="dark"] .accordion-item.pdfs-action .accordion-overlay {
    background: linear-gradient(135deg, 
        rgba(33, 150, 243, 0.12) 0%, 
        rgba(100, 181, 246, 0.12) 100%) !important;
    border: 3px solid rgba(33, 150, 243, 0.4) !important;
    box-shadow: 
        0 0 20px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(33, 150, 243, 0.1);
}

/* Dark mode text colors */
[data-theme="dark"] .accordion-content h3,
[data-theme="dark"] .accordion-content h4 {
    color: #f8fafc !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .accordion-content p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .action-hint {
    background: rgba(255, 145, 0, 0.25) !important;
    border: 1px solid rgba(255, 145, 0, 0.4) !important;
    color: #fbbf24 !important;
}

/* Dark mode hover effects for accordion items */
[data-theme="dark"] .accordion-item.chiirp-main:hover .accordion-overlay {
    border: 4px solid rgba(93, 194, 175, 0.7) !important;
    box-shadow: 
        0 0 30px rgba(93, 194, 175, 0.4),
        0 0 50px rgba(93, 194, 175, 0.2),
        inset 0 0 20px rgba(93, 194, 175, 0.15) !important;
}

[data-theme="dark"] .accordion-item.upload-action:hover .accordion-overlay {
    border: 4px solid rgba(255, 145, 0, 0.7) !important;
    box-shadow: 
        0 0 30px rgba(255, 145, 0, 0.4),
        0 0 50px rgba(255, 145, 0, 0.2),
        inset 0 0 20px rgba(255, 145, 0, 0.15) !important;
}

[data-theme="dark"] .accordion-item.cards-action:hover .accordion-overlay {
    border: 4px solid rgba(76, 175, 80, 0.7) !important;
    box-shadow: 
        0 0 30px rgba(76, 175, 80, 0.4),
        0 0 50px rgba(76, 175, 80, 0.2),
        inset 0 0 20px rgba(76, 175, 80, 0.15) !important;
}

[data-theme="dark"] .accordion-item.pdfs-action:hover .accordion-overlay {
    border: 4px solid rgba(33, 150, 243, 0.7) !important;
    box-shadow: 
        0 0 30px rgba(33, 150, 243, 0.4),
        0 0 50px rgba(33, 150, 243, 0.2),
        inset 0 0 20px rgba(33, 150, 243, 0.15) !important;
}

/* Dark mode overlay before effects */
[data-theme="dark"] .accordion-overlay::before {
    background: linear-gradient(135deg, 
        rgba(148, 163, 184, 0.08) 0%, 
        rgba(148, 163, 184, 0.04) 50%, 
        rgba(148, 163, 184, 0.02) 100%) !important;
}

[data-theme="dark"] .accordion-item:hover .accordion-overlay::before {
    background: linear-gradient(135deg, 
        rgba(148, 163, 184, 0.12) 0%, 
        rgba(148, 163, 184, 0.06) 50%, 
        rgba(148, 163, 184, 0.04) 100%) !important;
}

/* Dark mode dashboard title */
[data-theme="dark"] .dashboard-title {
    color: #f8fafc !important;
    text-shadow: 0 0 30px rgba(255, 145, 0, 0.5) !important;
}

/* Dark mode typing animation */
[data-theme="dark"] .typing-prefix,
[data-theme="dark"] .typing-text {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .typing-cursor {
    background-color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5) !important;
}

/* Responsive Design for Accordion */
@media (max-width: 992px) {
    .quick-actions-accordion {
        height: 320px;
    }
    
    .accordion-content h3 {
        font-size: 1.8rem;
    }
    
    .accordion-content h4 {
        font-size: 1.2rem;
    }
    
    .accordion-overlay {
        padding: 1.5rem;
    }
}

/* Mobile uses original card layout - no special accordion CSS needed */

/* Collapsible Sections */
.collapsible-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.collapsible-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.section-header:hover {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.1), rgba(253, 204, 89, 0.1));
}

.section-header.expanded {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.08), rgba(253, 204, 89, 0.08));
}

.section-title-group {
    flex-grow: 1;
}

.section-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    line-height: 1.2;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
    display: block;
}

.document-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 0.5rem;
}

.collapse-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-toggle:hover {
    background: rgba(255, 145, 0, 0.1);
    color: var(--brand-orange);
    transform: scale(1.1);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.5rem;
    opacity: 0;
}

.section-content.expanded {
    max-height: 3000px;
    padding: 2rem 1.5rem;
    opacity: 1;
}

/* Enhanced Stats Cards with Brand Colors */
.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* ===== IMPROVED FLOATING CHAT BUBBLE STYLES ===== */
/* Replace the floating chat section in your style.css with this improved version */

/* Floating Chat Container */
.floating-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Chat Bubble Button */
.chat-bubble-btn {
    width: 70px;
    height: 70px;
    /* background: var(--brand-gradient-chat); */
    background:linear-gradient(135deg,
    #5DC2AF 15%,       /* Mint green */
    #7FD1B7 30%,      /* Softer transition mint */
    #F9B07C 60%,      /* Peach */
    #F3A76F 80%,      /* Transition peach-orange */
    #DC8649 94%      /* Burnt orange */
    );
    border: 1px solid rgba(253, 204, 89, 0.3);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(255, 145, 0, 0.3),
        0 0 20px rgba(253, 204, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: brandPulse 3s ease-in-out infinite;
    overflow: hidden;
    position: relative;
}

.chat-bubble-btn::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #FDCC59;
    border-radius: 50%;
    box-shadow: 0 0 15px #FDCC59;
    animation: statusBlink 2s ease-in-out infinite;
}

.chat-bubble-btn::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: statusBlink 2s ease-in-out infinite reverse;
}

.chat-bubble-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 16px 48px rgba(255, 145, 0, 0.5),
        0 0 40px rgba(253, 204, 89, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    background: var(--brand-gradient-reverse);
}

.chat-bubble-btn i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.chat-bubble-btn:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Chat Window - IMPROVED SIZE AND POSITIONING */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 420px; /* Increased from 380px */
    height: 550px; /* Increased from 500px */
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 145, 0, 0.1);
    border: 1px solid rgba(255, 145, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-window.open {
    display: flex;
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Chat Header - IMPROVED SPACING */
.chat-header {
    background: var(--brand-gradient);
    color: white;
    padding: 1.25rem 1.5rem; /* Increased padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1rem; /* Increased gap */
}

.chat-avatar {
    width: 44px; /* Slightly larger */
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem; /* Larger icon */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-header-text h6 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem; /* Slightly larger */
    letter-spacing: 0.02em;
}

.chat-header-text p {
    margin: 0;
    font-size: 0.85rem; /* Slightly larger */
    opacity: 0.9;
    margin-top: 0.2rem;
}

.chat-header-actions {
    display: flex;
    gap: 0.25rem;
}

.chat-action-btn,
.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.6rem; /* Increased padding */
    border-radius: 8px; /* Less rounded */
    transition: all 0.2s ease;
    width: 40px; /* Slightly larger */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-action-btn:hover,
.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Chat Messages Area - IMPROVED LAYOUT */
.chat-messages {
    flex: 1;
    padding: 1.5rem; /* Increased padding */
    overflow-y: auto;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Increased gap between messages */
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem; /* Increased gap */
    animation: slideInMessage 0.3s ease-out;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px; /* Larger avatars */
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Larger icon */
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.message-avatar.bot {
    background: var(--brand-gradient);
    color: white;
}

.message-avatar.user {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

/* IMPROVED MESSAGE BUBBLES - WIDER AND BETTER POSITIONED */
.message-bubble {
    max-width: 85%; /* Increased from 75% */
    min-width: 120px; /* Added minimum width */
    padding: 1rem 1.25rem; /* Increased padding */
    border-radius: 20px; /* More rounded */
    font-size: 0.95rem; /* Slightly larger text */
    line-height: 1.5; /* Better line height */
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-bubble.bot {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.message-bubble.user {
    background: var(--brand-gradient);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: 0 3px 12px rgba(255, 145, 0, 0.25);
}

.message-sources {
    font-size: 0.8rem; /* Slightly larger */
    opacity: 0.85;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.4;
}

.message-confidence {
    font-size: 0.75rem; /* Slightly larger */
    padding: 0.3rem 0.6rem; /* More padding */
    border-radius: 12px; /* More rounded */
    margin-top: 0.5rem;
    display: inline-block;
    font-weight: 600;
}

.confidence-high { 
    background: rgba(16, 185, 129, 0.2); 
    color: #065f46; 
}

.confidence-medium { 
    background: rgba(245, 158, 11, 0.2);
    color: #92400e; 
}

.confidence-low { 
    background: rgba(239, 68, 68, 0.2); 
    color: #991b1b; 
}


/* IMPROVED TYPING INDICATOR */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Increased gap */
    padding: 1rem 1.25rem; /* Increased padding */
    background: var(--card-bg);
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    max-width: 85%;
    border: 1px solid var(--border-color);
}

.typing-indicator span {
    font-size: 0.9rem; /* Slightly larger */
    color: var(--text-secondary);
}

.typing-dots {
    display: flex;
    gap: 6px; /* Increased gap */
}

.typing-dot {
    width: 10px; /* Larger dots */
    height: 10px;
    background: var(--brand-orange);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* IMPROVED WELCOME MESSAGE */
.welcome-message {
    text-align: center;
    padding: 2.5rem 1.5rem; /* Increased padding */
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 3.5rem; /* Larger icon */
    color: var(--brand-orange);
    margin-bottom: 1.5rem; /* Increased margin */
    filter: drop-shadow(0 4px 8px rgba(255, 145, 0, 0.3));
}

.welcome-message h6 {
    color: var(--text-primary);
    margin-bottom: 0.75rem; /* Increased margin */
    font-weight: 700;
    font-size: 1.15rem; /* Larger text */
}

.welcome-message p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem; /* Larger text */
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

/* IMPROVED CHAT SUGGESTIONS */
.chat-suggestions {
    margin: 1.25rem 0; /* Increased margin */
    padding: 1.25rem; /* Increased padding */
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.08), rgba(253, 204, 89, 0.08));
    border: 1px solid rgba(255, 145, 0, 0.25);
    border-radius: var(--border-radius);
    animation: slideInMessage 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(255, 145, 0, 0.1);
}

.suggestions-header {
    margin-bottom: 1rem; /* Increased margin */
}

.suggestions-header small {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem; /* Slightly larger */
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Increased gap */
}

.suggestion-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* More rounded */
    padding: 0.875rem 1.125rem; /* Increased padding */
    font-size: 0.9rem; /* Larger text */
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    line-height: 1.4;
}

.suggestion-btn:hover {
    background: var(--brand-orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 145, 0, 0.3);
    border-color: var(--brand-orange);
}

.suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 145, 0, 0.2);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 15px; 
    height: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    animation: bounceIn 0.5s ease-out;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/* IMPROVED RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .floating-chat-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-bubble-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .chat-window {
        width: calc(100vw - 30px); /* Better mobile width */
        height: 75vh; /* Better mobile height */
        bottom: 90px;
        right: -5px;
    }
    
    .chat-header {
        padding: 1rem 1.25rem;
    }
    
    .chat-header-text h6 {
        font-size: 1rem;
    }
    
    .chat-header-text p {
        font-size: 0.8rem;
    }
    
    .chat-messages {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .message-bubble {
        max-width: 90%; /* Wider on mobile */
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
    }
    
    .chat-input-container {
        padding: 1rem 1.25rem;
    }
    
    .chat-input {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
        min-height: 44px;
    }
    
    .chat-send-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .chat-suggestions {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .suggestion-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .welcome-message {
        padding: 2rem 1.25rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .welcome-message h6 {
        font-size: 1.05rem;
    }
    
    .welcome-message p {
        font-size: 0.9rem;
    }
}

/* IMPROVED ANIMATIONS */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typingBounce {
    0%, 60%, 100% { 
        transform: translateY(0);
        opacity: 1;
    }
    30% { 
        transform: translateY(-12px);
        opacity: 0.7;
    }
}

@keyframes bounceIn {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% { 
        transform: scale(1.3);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* IMPROVED SCROLLBAR */
.chat-messages::-webkit-scrollbar {
    width: 6px; /* Slightly wider */
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.4), rgba(253, 204, 89, 0.4));
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.6), rgba(253, 204, 89, 0.6));
}

/* IMPROVED DARK THEME SUPPORT */
[data-theme="dark"] .chat-window {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 145, 0, 0.15);
}

[data-theme="dark"] .chat-messages {
    background: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .chat-input-container {
    background: rgba(30, 41, 59, 0.96);
    border-top-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .typing-indicator {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .confidence-high { 
    background: rgba(16, 185, 129, 0.3); 
    color: #34d399; 
}

[data-theme="dark"] .confidence-medium { 
    background: rgba(245, 158, 11, 0.3); 
    color: #fbbf24; 
}

[data-theme="dark"] .confidence-low { 
    background: rgba(239, 68, 68, 0.3); 
    color: #f87171; 
}

[data-theme="dark"] .chat-suggestions {
    background: rgba(255, 145, 0, 0.12);
    border-color: rgba(255, 145, 0, 0.3);
}

[data-theme="dark"] .suggestion-btn {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.6);
    color: var(--text-primary);
}

[data-theme="dark"] .suggestion-btn:hover {
    background: var(--brand-orange);
    color: white;
}

[data-theme="dark"] .message-bubble.user {
    background: var(--brand-gradient);
    box-shadow: 0 3px 12px rgba(255, 145, 0, 0.4);
}

[data-theme="dark"] .chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* ACCESSIBILITY IMPROVEMENTS */
.chat-bubble-btn:focus,
.chat-close-btn:focus,
.chat-action-btn:focus,
.chat-send-btn:focus,
.suggestion-btn:focus {
    outline: 3px solid var(--brand-orange);
    outline-offset: 2px;
}

.chat-input:focus {
    outline: none;
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .chat-window,
    .message-bubble,
    .typing-indicator,
    .chat-suggestions {
        border-width: 2px;
        border-color: var(--text-primary);
    }
    
    .chat-bubble-btn {
        border-width: 3px;
    }
    
    .suggestion-btn:hover {
        background: var(--text-primary) !important;
        color: var(--bg-primary) !important;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    .chat-bubble-btn,
    .chat-window,
    .chat-message,
    .typing-dot,
    .notification-badge {
        animation: none !important;
        transition: opacity 0.1s ease !important;
    }
    
    .chat-bubble-btn::before,
    .chat-bubble-btn::after {
        animation: none !important;
    }
    
    .chat-send-btn:hover:not(:disabled) {
        transform: none !important;
    }
    
    .suggestion-btn:hover {
        transform: none !important;
    }
}

/* HIDE OLD CHAT FAB */
.chat-fab {
    display: none !important;
}

/* ===== MODAL Z-INDEX FIX ===== */
/* Add this to your style.css to fix chat history modal issues */

/* Ensure Bootstrap modals have proper z-index hierarchy */
.modal {
    z-index: 10050 !important; /* Higher than floating chat */
}

.modal-backdrop {
    z-index: 10040 !important; /* Just below modal but above everything else */
}

/* When modal is open, ensure floating chat doesn't interfere */
body.modal-open .floating-chat-container {
    z-index: 9999; /* Keep below modal */
}

/* Ensure modal content is interactive */
.modal-dialog {
    position: relative;
    z-index: 10051 !important;
}

.modal-content {
    position: relative;
    z-index: 10052 !important;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
}

/* Fix modal body scrolling */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    z-index: 10053;
}

/* Ensure modal buttons are clickable */
.modal-header,
.modal-footer {
    position: relative;
    z-index: 10054;
}

.modal-header .btn-close,
.modal-footer .btn {
    /* position: relative; */
    z-index: 10055;
}

/* Specific fix for chat history modal */
#historyModal {
    z-index: 10050 !important;
}

#historyModal .modal-dialog {
    z-index: 10051 !important;
}

#historyModal .modal-content {
    z-index: 10052 !important;
}

#historyContent {
    position: relative;
    z-index: 10053;
    max-height: 60vh;
    overflow-y: auto;
}

/* Ensure proper pointer events */
.modal.show {
    pointer-events: auto !important;
}

.modal.show .modal-dialog {
    pointer-events: auto !important;
}

.modal.show .modal-content {
    pointer-events: auto !important;
}

/* When floating chat is open and modal is open, hide floating chat temporarily */
body.modal-open .floating-chat-container .chat-window.open {
    opacity: 0.3;
    pointer-events: none;
    transform: scale(0.95) translateY(10px);
}

/* Dark theme support for modals */
[data-theme="dark"] .modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .modal-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .modal-footer {
    background: rgba(15, 23, 42, 0.8);
    border-top-color: rgba(51, 65, 85, 0.8);
}

/* Custom scrollbar for modal content */
#historyContent::-webkit-scrollbar {
    width: 8px;
}

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

#historyContent::-webkit-scrollbar-thumb {
    background: var(--brand-gradient);
    border-radius: 4px;
}

#historyContent::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--brand-dark-orange), var(--brand-orange));
}

/* Modern Search Container */
.search-container {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
    margin: 0 2rem;
}

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

}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 20px 0 50px;
    border: 2px solid transparent;
    border-radius: 24px;
    background: var(--search-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 4px rgba(255, 145, 0, 0.1), 0 8px 25px -5px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 2;
    transition: all 0.3s ease;
}

.search-input:focus + .search-icon {
    color: var(--brand-orange);
    transform: scale(1.1);
}

.search-shortcut {
    position: absolute;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.search-input:focus ~ .search-shortcut {
    opacity: 0;
    transform: scale(0.9);
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 145, 0, 0.2);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.search-section {
    padding: 16px 0;
}

.search-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.search-section-header {
    padding: 0 20px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.search-result-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
    background: rgba(255, 145, 0, 0.1);
    border-left-color: var(--brand-orange);
    transform: translateX(4px);
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-snippet {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-highlight {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.3), rgba(253, 204, 89, 0.3));
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

.file-icon {
    color: #ef4444;
}

.confidence-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.confidence-high { 
    background: rgba(16, 185, 129, 0.2); 
    color: #065f46; 
}

.confidence-medium { 
    background: rgba(245, 158, 11, 0.2); 
    color: #92400e; 
}

.confidence-low { 
    background: rgba(239, 68, 68, 0.2); 
    color: #991b1b; 
}

.search-suggestions {
    padding: 16px 20px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.02);
}

.suggestion-item:hover {
    background: rgba(255, 145, 0, 0.1);
    transform: translateX(4px);
}

.suggestion-icon {
    color: var(--text-secondary);
    margin-right: 12px;
    width: 16px;
}

.search-empty,
.search-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.search-loading {
    padding: 20px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 145, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--brand-orange);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        margin: 1rem 0;
        max-width: none;
        order: 3;
        flex-basis: 100%;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] {
    --search-bg: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .search-section:not(:last-child) {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .suggestion-item {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .search-shortcut {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .confidence-high { 
    background: rgba(16, 185, 129, 0.3); 
    color: #34d399; 
}

[data-theme="dark"] .confidence-medium { 
    background: rgba(245, 158, 11, 0.3); 
    color: #fbbf24; 
}

[data-theme="dark"] .confidence-low { 
    background: rgba(239, 68, 68, 0.3); 
    color: #f87171; 
}

/* ===== SIMPLE GURU CARDS STYLES - Replace the previous Guru CSS with this ===== */

/* Guru Cards Container */
.guru-cards-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Section - Uses your existing brand variables */
.guru-search-section {
    background: var(--brand-gradient);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    color: white;
    text-align: center;
    box-shadow: var(--brand-glow);
}

.guru-search-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.guru-search-section p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    color: white;
}

.guru-search-box {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.guru-search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.guru-search-input:focus {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.guru-search-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.guru-search-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    color: white;
}

/* Results Header */
.guru-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.guru-results-header h2 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}

.guru-results-count {
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Cards Grid */
.guru-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Individual Cards */
.guru-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.guru-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--brand-gradient);
    z-index: 1;
}

.guru-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 145, 0, 0.15);
    border-color: var(--brand-orange);
}

.guru-card:hover .card-click-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Click Hint */
.card-click-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--brand-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 145, 0, 0.3);
}

.card-click-hint i {
    margin-right: 5px;
}

.guru-card-header {
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-bottom: 1px solid var(--border-color);
}

.guru-card-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.guru-card-type {
    background: var(--brand-gradient);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.guru-card-content {
    padding: 25px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.guru-content-preview {
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

.guru-content-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guru-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: auto;
}

.guru-card-collection {
    background: var(--brand-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guru-card-date {
    font-style: italic;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.guru-view-card-btn {
    background: var(--brand-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.guru-view-card-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.4);
}

/* Error and Empty States */
.guru-error-message {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #dc2626;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    border: 1px solid #fecaca;
}

.guru-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin: 40px 0;
}

.guru-no-results h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.guru-no-results i {
    font-size: 4rem;
    color: var(--brand-orange);
    margin-bottom: 20px;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .guru-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .guru-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .guru-search-box {
        flex-direction: column;
        gap: 15px;
    }
    
    .guru-card {
        min-height: 280px;
    }
    
    .guru-card-title {
        font-size: 1.2em;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .guru-card-meta {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ===== GURU MODAL STYLES ===== */

.guru-modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
}

.guru-modal-header {
    background: var(--brand-gradient);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 25px 30px;
    border-bottom: none;
}

.modal-title-section {
    flex-grow: 1;
}

.guru-modal-header .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.modal-meta-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.guru-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.guru-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.guru-modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--card-bg);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-content .spinner-border {
    margin-bottom: 20px;
    border-color: rgba(255, 145, 0, 0.25);
    border-right-color: var(--brand-orange);
}

.card-content-display {
    line-height: 1.7;
    color: var(--text-primary);
}

.error-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.error-content i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.error-content h5 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.guru-modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 20px 20px;
    padding: 20px 30px;
}

.guru-modal-footer .btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.guru-modal-footer .btn-primary {
    background: var(--brand-gradient);
    border: none;
}

.guru-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.4);
}

/* Modal Content Styling */
.card-content-display .guru-content .ghq-card-content__paragraph {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.card-content-display .guru-content .ghq-card-content__large-heading {
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1.5rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--brand-orange);
    padding-bottom: 0.5rem;
}

.card-content-display .guru-content .ghq-card-content__small-heading {
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
    border-left: 4px solid var(--brand-orange);
    padding-left: 15px;
}

.card-content-display .guru-content .ghq-card-content__link,
.card-content-display .guru-content a {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 600;
}

.card-content-display .guru-content .ghq-card-content__link:hover,
.card-content-display .guru-content a:hover {
    text-decoration: underline;
}

.card-content-display .guru-content .ghq-is-empty {
    display: none;
}

.card-content-display .guru-content .ghq-card-content__image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Support for Modal */
[data-theme="dark"] .guru-modal-content {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .guru-modal-body {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .guru-modal-footer {
    background: rgba(15, 23, 42, 0.9);
    border-top-color: rgba(51, 65, 85, 0.8);
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-meta-badges {
        flex-direction: column;
        gap: 8px;
    }
    
    .guru-modal-header {
        padding: 20px;
    }
    
    .guru-modal-body {
        padding: 20px;
    }
    
    .guru-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .card-click-hint {
        display: none;
    }
}

/* ===== GURU CARD DETAIL PAGE STYLES ===== */

.guru-card-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.guru-card-detail {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.guru-card-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--brand-gradient);
    z-index: 1;
}

.guru-card-detail-header {
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.05), rgba(253, 204, 89, 0.05));
    border-bottom: 1px solid var(--border-color);
}

.guru-card-detail-title {
    font-size: 2.2em;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    line-height: 1.2;
    font-weight: 700;
}

.guru-card-meta-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.guru-meta-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.guru-meta-item i {
    color: var(--brand-orange);
}

.guru-card-detail-content {
    padding: 40px;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1.1em;
}

.guru-back-btn {
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.guru-back-btn:hover {
    background: var(--brand-orange);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.guru-tags-section {
    padding: 30px 40px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.guru-tags-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guru-tag {
    background: var(--brand-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* Enhanced Guru Content Styling */
.guru-content .ghq-card-content__paragraph {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.guru-content .ghq-card-content__large-heading {
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1.5rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--brand-orange);
    padding-bottom: 0.5rem;
}

.guru-content .ghq-card-content__small-heading {
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
    border-left: 4px solid var(--brand-orange);
    padding-left: 15px;
}

.guru-content .ghq-card-content__link,
.guru-content a {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 600;
}

.guru-content .ghq-card-content__link:hover,
.guru-content a:hover {
    text-decoration: underline;
}

.guru-content .ghq-is-empty {
    display: none;
}

.guru-content .ghq-card-content__image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .guru-search-box {
        flex-direction: column;
    }
    
    .guru-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .guru-card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .guru-card-meta {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ===== MOBILE AND TABLET NAVBAR FIXES ===== */

/* Fix 1: Mobile navbar height - increase from 70px to proper height */
@media (max-width: 768px) {
    :root {
        --navbar-height: 85px !important; /* Increased from 70px */
    }
    
    .navbar {
        height: var(--navbar-height) !important;
        padding: 1.2rem 0 !important; /* Increased padding */
        min-height: 85px !important; /* Ensure minimum height */
    }
    
    .navbar .container {
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .navbar-brand {
        font-size: 1.4rem !important; /* Slightly larger on mobile */
        padding: 0.5rem 0 !important;
    }
    
    .navbar-logo {
        height: 36px !important; /* Slightly larger logo */
        width: auto;
        margin-right: 0.75rem;
    }
    
    /* Fix navbar brand text */
    .navbar-brand p {
        font-size: 20px !important; /* Adjust brand text size */
        padding-top: 12px !important;
        margin: 0 !important;
    }
    
    /* Improve navbar toggler */
    .navbar-toggler {
        padding: 0.5rem 0.75rem !important;
        margin-left: auto;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .navbar-toggler-icon {
        width: 1.8em !important;
        height: 1.8em !important;
        background-size: 100% 100% !important;
    }
    
    /* Fix collapsed navbar */
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98) !important;
        border-radius: 12px !important;
        margin-top: 1rem !important;
        padding: 1.5rem !important;
        border: 1px solid #334155 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem !important;
        margin: 0.25rem 0 !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        color: var(--navbar-text-secondary) !important;
        font-size: 1.1rem !important;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 145, 0, 0.15) !important;
        color: var(--navbar-primary) !important;
        transform: translateX(5px) !important;
    }
}

/* Fix 2: Tablet search bar issues - Split into smaller tablets vs iPad */
@media (min-width: 769px) and (max-width: 834px) {
    /* Smaller tablets */
    .search-container {
        margin: 0 1rem !important;
        max-width: 350px !important;
        flex-grow: 1;
    }
    
    .search-input-wrapper {
        position: relative;
        width: 100%;
    }
    
    .search-input {
        width: 100% !important;
        height: 44px !important;
        padding: 0 16px 0 45px !important;
        font-size: 15px !important;
        border-radius: 22px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid transparent !important;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    .search-input::placeholder {
        color: var(--text-secondary) !important;
        font-size: 14px !important;
        font-weight: 400 !important;
    }
    
    .search-icon {
        left: 16px !important;
        font-size: 16px !important;
        color: var(--text-secondary) !important;
    }
    
    .search-shortcut {
        right: 12px !important;
        padding: 3px 6px !important;
        font-size: 11px !important;
        border-radius: 4px !important;
        background: rgba(0, 0, 0, 0.1) !important;
    }
}

/* Fix 2b: iPad-specific improvements (835px to 1024px) */
@media (min-width: 835px) and (max-width: 1024px) {
    .search-container {
        margin: 0 1.5rem !important;
        max-width: 450px !important; /* More generous width for iPad */
        flex-grow: 1;
    }
    
    .search-input-wrapper {
        position: relative;
        width: 100%;
    }
    
    .search-input {
        width: 100% !important;
        height: 48px !important; /* Keep desktop-like height for iPad */
        padding: 0 20px 0 50px !important; /* More comfortable padding */
        font-size: 16px !important; /* Keep readable font size */
        border-radius: 24px !important; /* Match desktop styling */
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid transparent !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    .search-input:focus {
        border-color: var(--brand-orange) !important;
        box-shadow: 0 0 0 4px rgba(255, 145, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(-1px) !important;
    }
    
    .search-input::placeholder {
        color: var(--text-secondary) !important;
        font-size: 15px !important; /* Slightly larger for better readability */
        font-weight: 400 !important;
    }
    
    .search-icon {
        left: 18px !important;
        font-size: 18px !important; /* Keep icon size readable */
        color: var(--text-secondary) !important;
    }
    
    .search-input:focus + .search-icon {
        color: var(--brand-orange) !important;
        transform: scale(1.05) !important;
    }
    
    .search-shortcut {
        right: 15px !important;
        padding: 4px 8px !important;
        font-size: 12px !important; /* Readable shortcut text */
        border-radius: 6px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        opacity: 0.8 !important;
    }
    
    .search-input:focus ~ .search-shortcut {
        opacity: 0 !important;
        transform: scale(0.9) !important;
    }
}

/* iPad Landscape specific fixes - covers Safari on iPadOS */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape), 
       screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
    .search-container {
        margin: 0 2rem !important;
        max-width: 600px !important;
        flex-grow: 1;
    }
    
    .search-input-wrapper {
        position: relative;
        width: 100%;
    }
    
    .search-input {
        width: 100% !important;
        height: 52px !important;
        padding: 0 24px 0 55px !important;
        font-size: 17px !important;
        border-radius: 26px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        border: 2px solid transparent !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
        transition: all 0.3s ease !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    
    .search-input:focus {
        border-color: var(--brand-orange) !important;
        box-shadow: 0 0 0 4px rgba(255, 145, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.2) !important;
        transform: translateY(-2px) !important;
    }
    
    .search-input::placeholder {
        color: var(--text-secondary) !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        opacity: 0.8 !important;
    }
    
    .search-icon {
        left: 20px !important;
        font-size: 20px !important;
        color: var(--text-secondary) !important;
        opacity: 0.7 !important;
    }
    
    .search-input:focus + .search-icon {
        color: var(--brand-orange) !important;
        transform: scale(1.1) !important;
        opacity: 1 !important;
    }
    
    .search-shortcut {
        right: 18px !important;
        padding: 5px 10px !important;
        font-size: 13px !important;
        border-radius: 7px !important;
        background: rgba(0, 0, 0, 0.12) !important;
        opacity: 0.8 !important;
        color: var(--text-secondary) !important;
        font-weight: 600 !important;
    }
    
    .search-input:focus ~ .search-shortcut {
        opacity: 0 !important;
        transform: scale(0.9) !important;
    }
    
    /* Enhanced navbar spacing for iPad landscape */
    .navbar .container {
        max-width: none !important;
        padding: 0 2rem !important;
    }
    
    .navbar-brand {
        margin-right: 1.5rem !important;
    }
    
    .navbar-nav {
        gap: 1rem !important;
        margin-left: 1rem !important;
    }
}

/* iPad Pro and larger tablets in landscape */
@media (min-width: 1367px) and (max-width: 1440px) and (orientation: landscape),
       screen and (min-device-width: 1367px) and (max-device-width: 1440px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
    .search-container {
        margin: 0 2.5rem !important;
        max-width: 700px !important;
        flex-grow: 1;
    }
    
    .search-input {
        height: 54px !important;
        padding: 0 28px 0 60px !important;
        font-size: 18px !important;
        border-radius: 27px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    }
    
    .search-input::placeholder {
        font-size: 17px !important;
        font-weight: 500 !important;
        opacity: 0.85 !important;
    }
    
    .search-icon {
        left: 22px !important;
        font-size: 22px !important;
    }
    
    .search-shortcut {
        right: 20px !important;
        padding: 6px 12px !important;
        font-size: 14px !important;
    }
}

/* Dark theme adjustments for iPad landscape */
[data-theme="dark"] {
    /* iPad Landscape */
    @media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
        .search-input {
            background: rgba(30, 41, 59, 0.98) !important;
            color: var(--text-primary) !important;
        }
        
        .search-input::placeholder {
            color: var(--text-secondary) !important;
            opacity: 0.9 !important;
        }
        
        .search-shortcut {
            background: rgba(255, 255, 255, 0.15) !important;
            color: var(--text-secondary) !important;
        }
    }
    
    /* iPad Pro Landscape */
    @media (min-width: 1367px) and (max-width: 1440px) and (orientation: landscape) {
        .search-input {
            background: rgba(30, 41, 59, 0.98) !important;
            color: var(--text-primary) !important;
        }
        
        .search-input::placeholder {
            color: var(--text-secondary) !important;
            opacity: 0.9 !important;
        }
        
        .search-shortcut {
            background: rgba(255, 255, 255, 0.15) !important;
            color: var(--text-secondary) !important;
        }
    }
}

/* Common tablet dropdown and nav styles */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Fix search dropdown on tablet */
    .search-dropdown {
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        margin-top: 6px !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Adjust navbar nav links on tablet */
    .navbar-nav {
        gap: 0.5rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0.9rem !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }
    
    .navbar-nav .nav-link span {
        display: inline !important; /* Keep text visible on tablet */
    }
}

/* Fix 3: Better responsive breakpoints */
@media (max-width: 992px) {
    .navbar-nav .nav-link span {
        margin-left: 0.4rem !important;
    }
}

/* Fix 4: Improve search on very small screens */
@media (max-width: 480px) {
    .search-container {
        order: 3 !important;
        flex-basis: 100% !important;
        max-width: none !important;
        margin: 1rem 0 0 0 !important;
    }
    
    .search-input {
        height: 48px !important; /* Larger touch target on small screens */
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0 20px 0 50px !important;
    }
    
    .search-icon {
        left: 18px !important;
        font-size: 18px !important;
    }
    
    .search-shortcut {
        display: none !important; /* Hide shortcut on very small screens */
    }
    
    .navbar-collapse {
        padding: 1rem !important;
        margin-top: 0.5rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.9rem 1rem !important;
        font-size: 1rem !important;
    }
}

/* Fix 5: Dark theme adjustments for mobile/tablet */
[data-theme="dark"] {
    --search-bg: rgba(30, 41, 59, 0.95) !important;
}

@media (max-width: 768px) {
    [data-theme="dark"] .navbar-collapse {
        background: rgba(15, 23, 42, 0.98) !important;
        border-color: rgba(51, 65, 85, 0.8) !important;
    }
    
    [data-theme="dark"] .search-shortcut {
        background: rgba(255, 255, 255, 0.1) !important;
        color: rgba(255, 255, 255, 0.7) !important;
    }
}

/* Fix 6: Ensure proper main content spacing on mobile */
@media (max-width: 768px) {
    .main-content {
        padding-top: calc(var(--navbar-height) + 1rem) !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .dashboard-container {
        padding: 0 0.5rem !important;
    }
    
    .dashboard-header {
        padding: 1.5rem 0 !important;
        margin-bottom: 2rem !important;
    }
    
    .dashboard-title {
        font-size: 2rem !important; /* Smaller on mobile */
    }
    
    .dashboard-subtitle {
        font-size: 1rem !important;
    }
}

/* Fix 7: Theme toggle adjustments */
@media (max-width: 768px) {
    .theme-toggle-container {
        margin-left: 0.5rem !important;
        order: 4 !important;
    }
    
    .theme-toggle-btn {
        width: 45px !important;
        height: 45px !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .theme-toggle-btn .fas {
        font-size: 18px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .theme-toggle-btn {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Fix 8: Navbar brand improvements */
@media (max-width: 768px) {
    .navbar-brand {
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        margin-right: auto !important;
        max-width: 70% !important; /* Prevent overflow */
    }
    
    .navbar-brand p {
        font-family: Audiowide, sans-serif !important;
        font-size: 18px !important;
        color: #FF9100 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Fix 9: Dropdown menu improvements */
@media (max-width: 768px) {
    .dropdown-menu {
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid var(--border-color) !important;
        background: var(--card-bg) !important;
        backdrop-filter: blur(20px) !important;
        margin-top: 0.5rem !important;
    }
    
    .dropdown-item {
        padding: 0.8rem 1.2rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        margin: 0.2rem !important;
        transition: all 0.3s ease !important;
    }
    
    .dropdown-item:hover {
        background: rgba(255, 145, 0, 0.1) !important;
        color: var(--brand-orange) !important;
        transform: translateX(5px) !important;
    }
}

/* Fix 10: Ensure search dropdown works well on all screen sizes */
@media (max-width: 480px) {
    .search-dropdown {
        left: -10px !important;
        right: -10px !important;
        max-height: 60vh !important;
        border-radius: 12px !important;
    }
    
    .search-result-item,
    .suggestion-item {
        padding: 1rem !important;
        margin: 0.25rem !important;
    }
    
    .search-result-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .search-result-snippet {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
}

/* Fix 11: Animation and transition improvements for mobile */
@media (max-width: 768px) {
    .navbar,
    .navbar-collapse,
    .search-input,
    .nav-link {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .navbar-collapse.collapsing {
        transition: height 0.35s ease !important;
    }
    
    .navbar-collapse.show {
        animation: slideDown 0.3s ease-out !important;
    }
}

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

/* Fix 12: Logo and brand text alignment */
@media (max-width: 768px) {
    .navbar-brand {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 !important;
    }
    
    .navbar-logo {
        flex-shrink: 0 !important;
        margin-right: 0.5rem !important;
    }
    
    .navbar-brand p {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
        flex-grow: 1 !important;
    }
}

/* Final responsive polish */
@media (min-width: 1025px) {
    .search-container {
        max-width: 500px !important;
        margin: 0 2rem !important;
    }
}

@media (min-width: 1200px) {
    .search-container {
        max-width: 600px !important;
    }
}

.action-icon-img {
    width: 2rem;  /* 32px - same as the font-size of the original icon */
    height: 2rem;
    object-fit: contain; /* Maintains aspect ratio */
    filter: brightness(0) invert(1); /* Makes the image white like the original icons */
    transition: all 0.3s ease;
}

/* If you want the image to keep its original colors instead of being white */
.action-icon-img.keep-colors {
    filter: none; /* Remove the white filter */
}

/* Dark theme adjustments */
[data-theme="dark"] .action-icon-img {
    filter: brightness(0) invert(1); /* Keep white in dark theme */
}

[data-theme="dark"] .action-icon-img.keep-colors {
    filter: brightness(1.2); /* Slightly brighter in dark theme */
}

/* Hover effects */
.quick-action-icon:hover .action-icon-img {
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.quick-action-icon:hover .action-icon-img.keep-colors {
    transform: scale(1.1);
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 145, 0, 0.5));
}

/* CSS for chat avatar image */
.chat-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 2px !important;
    filter: none !important; /* Keep original colors of your logo */
    transition: all 0.3s ease !important;
}

/* Alternative: If you want the logo to be white like the original icon */
.chat-avatar-img.white-logo {
    filter: brightness(0) invert(1) !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .chat-avatar-img {
    background: rgba(255, 255, 255, 0.05) !important;
    /* Keep original colors in dark theme too */
}

/* Hover effect for bot avatar */
.message-avatar.bot:hover .chat-avatar-img {
    transform: scale(1.1) !important;
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.3) !important;
}

/* Ensure the avatar container maintains its styling */
.message-avatar.bot {
    background: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* If you want to adjust the avatar size specifically */
.message-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message-avatar {
        width: 32px !important;
        height: 32px !important;
    }
    
    .chat-avatar-img {
        padding: 1px !important;
    }
}

/* Optional: Add a subtle border around the bot avatar */
.message-avatar.bot {
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    box-sizing: border-box !important;
}

/* Animation when message appears */
.chat-message.bot .message-avatar {
    animation: avatarAppear 0.3s ease-out !important;
}

@keyframes avatarAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Copy button styles for chat messages */
.message-bubble {
    position: relative;
}

.copy-message-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: var(--text-secondary);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-message-btn:hover {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
    transform: scale(1.05);
}

.copy-message-btn:active {
    transform: scale(0.95);
}

/* Show copy button on message hover */
.chat-message.bot:hover .copy-message-btn {
    opacity: 1;
    visibility: visible;
}

/* Success state */
.copy-message-btn.copy-success {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Error state */
.copy-message-btn.copy-error {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Adjust message content to make room for copy button */
.message-content {
    padding-right: 40px; /* Make space for copy button */
}

/* Dark theme adjustments */
[data-theme="dark"] .copy-message-btn {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
    color: var(--text-primary);
}

[data-theme="dark"] .copy-message-btn:hover {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .copy-message-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        /* Always show on mobile since hover doesn't work well */
        opacity: 0.7;
        visibility: visible;
    }
    
    .copy-message-btn:hover {
        opacity: 1;
    }
    
    .message-content {
        padding-right: 45px; /* More space on mobile */
    }
}

/* Animation for copy feedback */
@keyframes copyFeedback {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.copy-message-btn.copy-success,
.copy-message-btn.copy-error {
    animation: copyFeedback 0.3s ease;
}

/* Ensure copy button doesn't interfere with text selection */
.copy-message-btn {
    user-select: none;
    -webkit-user-select: none;
}

/* Style for when copy button is focused (accessibility) */
.copy-message-btn:focus {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
    opacity: 1;
    visibility: visible;
}

/* Tooltip-like effect for better UX */
.copy-message-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 20;
}

.copy-message-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Hide tooltip on mobile */
@media (max-width: 768px) {
    .copy-message-btn::after {
        display: none;
    }
}

/* Add these styles to the existing <style> section in chat.html */

/* Copy button for main chat messages */
.copy-message-btn-main {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.copy-message-btn-main:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: scale(1.05);
}

.copy-message-btn-main:active {
    transform: scale(0.95);
}

/* Show copy button on message hover */
.bot-bubble:hover .copy-message-btn-main {
    opacity: 1;
}

/* Copy success state */
.copy-message-btn-main.copy-success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    opacity: 1;
}

/* Copy error state */
.copy-message-btn-main.copy-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    opacity: 1;
}

/* Ensure message bubble has relative positioning for absolute button */
.bot-bubble {
    position: relative;
}

/* Adjust message text to make room for copy button */
.bot-bubble .message-text {
    padding-right: 35px;
    min-height: 20px;
}

/* Ensure action icon image styling is consistent */
.action-icon-img {
    width: 30px;
    height: 30px;
    border-radius: 20%;
    object-fit: cover;
}

/* Dark mode adjustments */
[data-theme="dark"] .copy-message-btn-main {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

[data-theme="dark"] .copy-message-btn-main:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Emergency fix for document card actions */
.document-card .document-actions {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 20 !important;
}

.document-card:hover .document-actions {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.document-card {
    overflow: hidden !important;
}

/* FIXED NOTIFICATION BADGE - POPS OUT FROM CHAT BUBBLE */
.notification-badge {
    position: absolute;
    top: -8px;  /* Move further outside the button */
    right: -8px; /* Move further outside the button */
    min-width: 24px; /* Larger for better visibility */
    height: 24px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 3px solid white; /* White border to separate from button */
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 0 0 1px rgba(239, 68, 68, 0.2); /* Extra border for definition */
    z-index: 10; /* Above the chat button */
    
    /* Initial hidden state */
    transform: scale(0);
    opacity: 0;
    
    /* Animation properties */
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth easing */
    animation-fill-mode: forwards;
}

/* Show animation - bouncy pop-in */
.notification-badge.show {
    animation-name: notificationPopIn;
}

@keyframes notificationPopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Attention-grabbing pulse animation that runs continuously */
.notification-badge.pulse {
    animation: notificationPulse 2s ease-in-out infinite;
}

/* Search Controls and Mode Buttons */
.search-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.search-mode-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-mode-btn i {
    font-size: 0.875rem;
}

.search-mode-btn .btn-text {
    font-size: 0.875rem;
}

.escalate-support-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
}

.escalate-support-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-color: #047857;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
    .search-controls {
        gap: 0.25rem;
    }

    .search-mode-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .search-mode-btn .btn-text {
        display: none;
    }
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 12px rgba(239, 68, 68, 0.4),
            0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow:
            0 6px 16px rgba(239, 68, 68, 0.6),
            0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Shake animation for extra attention */
.notification-badge.shake {
    animation: notificationShake 0.5s ease-in-out infinite;
}

@keyframes notificationShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Hide animation - scale down and fade */
.notification-badge.hide {
    animation: notificationPopOut 0.3s ease-in forwards;
}

@keyframes notificationPopOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Ensure the chat button doesn't clip the badge */
.chat-bubble-btn {
    /* Add some space around the button for the badge */
    position: relative;
    /* Remove overflow hidden if it exists */
    overflow: visible !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .notification-badge {
    border-color: rgba(15, 23, 42, 1); /* Match dark background */
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.5),
        0 0 0 1px rgba(239, 68, 68, 0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .notification-badge {
        top: -6px;
        right: -6px;
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
        border-width: 2px;
    }
}

/* Accessibility - respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .notification-badge {
        animation: none !important;
    }
    
    .notification-badge.show {
        transform: scale(1);
        opacity: 1;
    }
    
    .notification-badge.hide {
        transform: scale(0);
        opacity: 0;
    }
}

/* Optional: Add a subtle glow effect */
.notification-badge.glow {
    animation: notificationGlow 3s ease-in-out infinite;
}

@keyframes notificationGlow {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(239, 68, 68, 0.4),
            0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 
            0 6px 16px rgba(239, 68, 68, 0.6),
            0 0 0 4px rgba(239, 68, 68, 0.2);
    }
}

/* Footer Styles */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: smaller;

}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.footer-brand:hover {
    color: var(--brand-orange);
    text-decoration: none;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.footer-brand-text {
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.footer-right {
    color: #94a3b8;
    font-size: smaller;
}

/* About Modal Styles */
.about-modal .modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.about-modal .modal-header {
    background: var(--brand-gradient);
    color: white;
    border: none;
    padding: 2rem 2.5rem;
    text-align: center;
}

.about-modal .modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.about-modal .modal-body {
    padding: 2.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h4 {
    color: var(--brand-orange);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
}

.about-section h4 i {
    width: 24px;
    text-align: center;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-orange);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: var(--brand-glow);
}

.feature-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

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

.steps-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--brand-orange);
}

.step-number {
    background: var(--brand-gradient);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.future-items {
    list-style: none;
    padding: 0;
}

.future-items li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.future-items li i {
    color: var(--brand-orange);
    width: 20px;
    text-align: center;
}

.guidelines-list {
    list-style: none;
    padding: 0;
}

.guidelines-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 145, 0, 0.05);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--brand-orange);
}

.guidelines-list li i {
    color: var(--brand-orange);
    margin-top: 0.25rem;
    width: 16px;
    text-align: center;
}

.guidelines-list li span {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

.cta-section {
    background: var(--brand-gradient);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 2rem;
    box-shadow: var(--brand-glow);
}

.cta-section h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.cta-section p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    position: sticky;
    top: 1.5rem;
    right: 2rem;

}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        gap: 1rem;
    }

    .about-modal .modal-body {
        padding: 2rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-modal .modal-title {
        font-size: 1.6rem;
    }

    .modal-close-btn {
        top: 1rem;
        right: 1.5rem;
    }
}



html {
    height: 100%;
}

body {
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Remove the force-sticky-footer class if it exists, or override it */
body.force-sticky-footer {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Main content should grow to push footer down */
.main-content {
    flex: 1 0 auto !important; /* Grow and shrink, but with auto basis */
    padding-top: calc(var(--navbar-height) - 2rem);
    padding-bottom: 2rem; /* Reduced bottom padding */
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
}

/* Footer should not grow */
.modern-footer {
    flex-shrink: 0 !important; /* Prevent footer from shrinking */
    margin-top: auto !important; /* Push to bottom */
    position: relative !important; /* Not fixed */
    bottom: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    height: var(--footer-height);
    box-shadow: 0 -2px 10px var(--shadow-color);
    z-index: 1020;
}

/* Remove any conflicting styles */
.navbar {
    position: fixed !important; /* Keep navbar fixed */
    top: 0;
    width: 100%;
    z-index: 1030;
}

/* Ensure container doesn't interfere */
.container-fluid {
    flex: 1 0 auto;
}

/* Alternative Grid Solution (if flexbox doesn't work) */
body.use-grid {
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
    min-height: 100vh !important;
}

body.use-grid .navbar {
    grid-row: 1;
}

body.use-grid .main-content {
    grid-row: 2;
    padding-top: 0; /* Since navbar is in grid, not fixed */
}

body.use-grid .modern-footer {
    grid-row: 3;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        min-height: calc(100vh - 70px - 70px); /* Adjusted for mobile navbar/footer heights */
        padding-bottom: 1rem;
    }
}

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    background: var(--card-bg);
    min-width: 280px;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

.dropdown-header {
    font-weight: 700;
    color: var(--brand-orange);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem 0.25rem 1rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.1), rgba(253, 204, 89, 0.1));
    border-radius: 8px;
    margin: 0.25rem 0.75rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 8px;
    margin: 0.25rem 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(255, 145, 0, 0.1);
    color: var(--brand-orange);
    transform: translateX(4px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

.dropdown-item:hover i {
    opacity: 1;
    color: var(--brand-orange);
}

.dropdown-divider {
    margin: 0.75rem 1rem;
    border-color: var(--border-color);
    opacity: 0.5;
}

/* Dark theme adjustments */
[data-theme="dark"] .dropdown-menu {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .dropdown-header {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.15), rgba(253, 204, 89, 0.15));
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 145, 0, 0.15);
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 260px;
        margin-top: 0.25rem;
        max-height: 60vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        position: absolute !important;
        transform: none !important;
        will-change: transform !important;
    }
    
    /* Ensure navbar dropdown parent has relative positioning */
    .navbar-nav .dropdown {
        position: relative !important;
    }
    
    /* Prevent body scrolling when dropdown is open */
    body.dropdown-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    /* Enhanced dropdown positioning for mobile */
    .navbar-nav .dropdown.show .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: auto !important;
        right: 0 !important;
        min-width: 280px !important;
        max-width: calc(100vw - 1rem) !important;
        z-index: 10001 !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        margin-top: 0.5rem !important;
        transform: none !important;
    }
    
    .dropdown-item {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .dropdown-header {
        padding: 0.75rem 1rem 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* iPhone specific fixes - 393x852 and similar dimensions */
@media (max-width: 414px) and (min-height: 800px), 
       screen and (max-device-width: 414px) and (min-device-height: 800px) {
    .dropdown-menu {
        max-height: 55vh !important;
        font-size: 15px !important;
        border-radius: 16px !important;
    }
    
    .dropdown-item {
        padding: 0.875rem 1rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.4 !important;
    }
    
    .dropdown-header {
        font-size: 13px !important;
        padding: 0.75rem 1rem 0.5rem !important;
        font-weight: 600 !important;
    }
    
    .navbar-nav .dropdown.show .dropdown-menu {
        left: auto !important;
        right: 0 !important;
        min-width: 300px !important;
        max-width: calc(100vw - 1rem) !important;
        margin-top: 0.5rem !important;
        bottom: auto !important;
        max-height: 50vh !important;
        position: absolute !important;
        top: 100% !important;
    }
    
    /* Ensure proper touch scrolling on iPhone */
    .dropdown-menu {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
}

/* Smooth dropdown animation */
.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Badge indicators for dynamic content */
.dropdown-item .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Special styling for action items */
.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.dropdown-item.text-success:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.dropdown-item.text-warning:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}
