/* Navigation Styles for Enterprise Financial Analytics Platform */
/* Enhanced Version with Premium Button Styling */

/* Main Navigation Bar */
.enterprise-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.nav-logo {
    font-size: 24px;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

/* Enhanced Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

/* Hover effect with subtle background */
.nav-link:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(59, 130, 246, 0.1));
    color: white;
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

/* Active state - premium gradient style */
.nav-link.active {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.nav-link.active:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

/* Icon styling */
.nav-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
}

.nav-link.active .nav-icon {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Text styling */
.nav-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Enhanced Action Buttons (Theme toggle, etc) */
.nav-button {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(59, 130, 246, 0.2));
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.nav-button:active {
    transform: translateY(0) scale(0.98);
}

/* Premium Logout Button Styling */
.logout-button {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-left: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    position: relative;
    overflow: hidden;
}

/* Logout button hover effect */
.logout-button:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    border-color: rgba(220, 38, 38, 0.6);
}

.logout-button:active {
    transform: translateY(0) scale(0.98);
}

/* Logout button shine effect */
.logout-button::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 ease;
}

.logout-button:hover::before {
    left: 100%;
}

/* Badge for notifications or counts */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Loading state for buttons */
.nav-button.loading,
.logout-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.nav-button.loading::after,
.logout-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Adjust main container for fixed navigation */
body {
    padding-top: 60px;
}

.enterprise-container {
    padding-top: 20px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-title {
        display: none;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-link {
        padding: 10px 14px;
        gap: 6px;
    }
    
    .nav-icon {
        font-size: 24px;
    }
    
    .nav-button {
        padding: 10px 12px;
    }
    
    .logout-button {
        padding: 10px 16px;
        font-size: 13px;
        margin-left: 8px;
    }
}

/* Dark Mode Support */
body.theme-dark {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 50%, #1e293b 100%);
    color: #e2e8f0;
}

body.theme-dark .enterprise-navigation {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.theme-dark .enterprise-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.9) 100%);
    color: #e2e8f0;
}

body.theme-dark .enterprise-header h1 {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-dark .enterprise-header .subtitle {
    color: #cbd5e1;
}

body.theme-dark .enterprise-card {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.95) 0%, rgba(71, 85, 105, 0.9) 100%);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

body.theme-dark .card-title,
body.theme-dark .stat-label,
body.theme-dark .form-label {
    color: #e2e8f0;
}

body.theme-dark .stat-value {
    color: #f1f5f9;
}

body.theme-dark .form-control {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

body.theme-dark .form-control:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: #60a5fa;
    color: #f1f5f9;
}

body.theme-dark .btn-enterprise {
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .quick-filter-item,
body.theme-dark .form-group {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .quick-filter-item:hover,
body.theme-dark .form-group:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(96, 165, 250, 0.4);
}

body.theme-dark select option {
    background: #1e293b;
    color: #e2e8f0;
}

body.theme-dark .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #e2e8f0;
    border-left-color: #60a5fa;
}

body.theme-dark .alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #e2e8f0;
    border-left-color: #34d399;
}

/* Dark mode navigation enhancements */
body.theme-dark .nav-link:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(59, 130, 246, 0.15));
    border-color: rgba(96, 165, 250, 0.4);
}

body.theme-dark .nav-button {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(59, 130, 246, 0.08));
    border-color: rgba(96, 165, 250, 0.25);
}

body.theme-dark .nav-button:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(59, 130, 246, 0.18));
    border-color: rgba(96, 165, 250, 0.45);
}

/* Navigation Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    display: none;
    z-index: 1001;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

body.theme-dark .nav-dropdown-menu {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-color: rgba(148, 163, 184, 0.3);
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

body.theme-dark .nav-dropdown-item {
    color: #cbd5e1;
}

.nav-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.08));
    color: #3b82f6;
    padding-left: 22px;
}

body.theme-dark .nav-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(59, 130, 246, 0.1));
    color: #60a5fa;
}

.nav-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.8), transparent);
    margin: 6px 0;
}

body.theme-dark .nav-dropdown-divider {
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.3), transparent);
}

/* Focus states for accessibility */
.nav-link:focus,
.nav-button:focus,
.logout-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

/* Disabled state */
.nav-link.disabled,
.nav-button:disabled,
.logout-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== NAV HELP BUTTON ==================== */
/* Dark background help button matching nav bar style */
.nav-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    position: relative;
}

.nav-help-btn .help-icon {
    font-size: 16px;
    line-height: 1;
    color: #ef4444;
}

.nav-help-btn .help-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.nav-help-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-help-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Focus state for accessibility */
.nav-help-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Hide floating help widgets when using nav button */
.tutorial-help-button,
#aiHelpWidget,
.ai-help-widget,
.ai-help-floating-btn,
.help-float-btn {
    display: none !important;
}

/* Mobile responsive for help button */
@media (max-width: 768px) {
    .nav-help-btn {
        padding: 6px 12px;
    }
    
    .nav-help-btn .help-icon {
        font-size: 14px;
    }
    
    .nav-help-btn .help-text {
        font-size: 12px;
    }
}

/* ==================== LANGUAGE TOGGLE BUTTON ==================== */
/* Purple gradient button for language switching */
.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.lang-toggle-btn .lang-flag {
    font-size: 16px;
    line-height: 1;
}

.lang-toggle-btn .lang-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.lang-toggle-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.5);
}

.lang-toggle-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Shine effect on hover */
.lang-toggle-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 ease;
}

.lang-toggle-btn:hover::before {
    left: 100%;
}

/* Focus state for accessibility */
.lang-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Dark mode support - matches nav bar dark style */
/* Target both theme-dark class AND default state (since page has dark bg by default) */
body:not(.theme-light) .lang-toggle-btn,
body.theme-dark .lang-toggle-btn {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(100, 116, 139, 0.4) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body:not(.theme-light) .lang-toggle-btn .lang-flag,
body.theme-dark .lang-toggle-btn .lang-flag {
    color: #60a5fa !important;
}

body:not(.theme-light) .lang-toggle-btn .lang-text,
body.theme-dark .lang-toggle-btn .lang-text {
    color: #e2e8f0 !important;
}

body:not(.theme-light) .lang-toggle-btn:hover,
body.theme-dark .lang-toggle-btn:hover {
    background: rgba(51, 65, 85, 0.9) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body:not(.theme-light) .lang-toggle-btn:focus,
body.theme-dark .lang-toggle-btn:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Light mode - keep purple gradient */
body.theme-light .lang-toggle-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25) !important;
}

body.theme-light .lang-toggle-btn .lang-flag,
body.theme-light .lang-toggle-btn .lang-text {
    color: white !important;
}

body.theme-light .lang-toggle-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lang-toggle-btn {
        padding: 8px 12px;
    }
    
    .lang-toggle-btn .lang-flag {
        font-size: 18px;
    }
    
    .lang-toggle-btn .lang-text {
        display: none;
    }
}
