/* wwwroot/css/layout-styles.css - COMPLETE VERSION */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #6c757d;
    --success: #28a745;
    --dark: #1e293b;
    --light: #f8f9fa;
    --header-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --header-text: #f1f5f9;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

main {
    flex: 1;
    padding: 2rem 0;
    background: #0f172a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Header & Navigation ===== */
header {
    box-shadow: var(--shadow-lg);
    background: var(--header-bg);
    border-bottom: 1px solid #334155;
}

.navbar {
    background: var(--header-bg) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #475569 !important;
    padding: 1.2rem 0 !important;
}

.container-fluid {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Brand Logo - EPEX with Bouncing Letters Effect ===== */
.navbar-brand-container {
    margin-right: 1rem;
}

/* EPEX Brand Fix - Prevent RTL flipping */
.navbar-brand {
    font-family: 'Orbitron', 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 0.6rem 1.4rem;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    animation: brandGlow 3s infinite ease-in-out;
    overflow: visible;
    unicode-bidi: plaintext !important;
    direction: ltr !important;
}

    /* Bouncing effect on hover for each letter */
/* ===== Neo-Brutalism EPEX Logo ===== */
.navbar-brand-container {
    margin-right: 1rem;
}

.navbar-brand {
    font-family: 'Orbitron', 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    font-size: 2rem !important;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    padding: 0.5rem 1.5rem;
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    transition: all 0.2s ease;
    unicode-bidi: plaintext !important;
    direction: ltr !important;
    border: 2px solid #38bdf8;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
}

    .navbar-brand:hover {
        transform: translate(-3px, -3px);
        box-shadow: 6px 6px 0 #38bdf8;
        border-color: #818cf8;
    }

    .navbar-brand .logo-x {
        background: linear-gradient(135deg, #f472b6, #a855f7);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent !important;
        font-weight: 900;
    }

html[dir="rtl"] .navbar-brand {
    unicode-bidi: plaintext !important;
    direction: ltr !important;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem !important;
        padding: 0.3rem 1rem;
    }
}
.navbar-brand i {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-size: 2rem !important;
    margin-right: 0.6rem;
    filter: drop-shadow(0 2px 8px rgba(96, 165, 250, 0.4));
    transition: all 0.3s ease;
}

.navbar-brand:hover i {
    transform: scale(1.15) rotate(10deg);
    filter: drop-shadow(0 4px 15px rgba(96, 165, 250, 0.7));
}

/* ===== Navigation Links ===== */
.navbar-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.nav-item {
    margin: 0 0.2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--header-text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .nav-link:hover::before {
        width: 80%;
    }

    .nav-link:hover {
        background: rgba(96, 165, 250, 0.1);
        transform: translateY(-1px);
        color: #bfdbfe !important;
    }

    .nav-link.active {
        background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
        color: white !important;
        box-shadow: var(--shadow);
    }

        .nav-link.active::before {
            display: none;
        }

/* ===== Right Side Group ===== */
.right-side-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
    flex-wrap: nowrap;
}

/* ===== Admin Dropdown ===== */
.admin-dropdown-container {
    position: relative;
}

.admin-dropdown-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.55rem 1.3rem;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

    .admin-dropdown-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .admin-dropdown-btn:hover::before {
        left: 100%;
    }

    .admin-dropdown-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
        background: linear-gradient(135deg, #f59e0b, #b45309);
    }

    .admin-dropdown-btn i {
        font-size: 1rem;
        transition: transform 0.3s ease;
    }

    .admin-dropdown-btn:hover i {
        transform: scale(1.1);
    }

.admin-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: linear-gradient(135deg, #1e293b, #334155);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

    .admin-dropdown-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.dropdown-header {
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

    .dropdown-header i {
        font-size: 1.2rem;
    }

    .dropdown-header span {
        font-size: 0.95rem;
    }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .dropdown-item:hover {
        background: rgba(245, 158, 11, 0.2);
        color: #fbbf24;
        transform: translateX(4px);
        text-decoration: none;
    }

    .dropdown-item i {
        width: 24px;
        font-size: 1rem;
    }

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* ===== Search Component ===== */
.search-container {
    position: relative;
    margin: 0 0.5rem;
}

.search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 0.55rem 1.1rem;
    border-radius: 28px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

    .search-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;
    }

    .search-btn:hover::before {
        left: 100%;
    }

    .search-btn:hover {
        background: rgba(59, 130, 246, 0.2);
        border-color: #60a5fa;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
        color: white;
    }

    .search-btn i {
        font-size: 1rem;
        transition: transform 0.3s ease;
    }

    .search-btn:hover i {
        transform: scale(1.1);
    }

/* ===== Search Modal ===== */
.search-modal {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99999;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

    .search-modal.active {
        display: block;
    }

.search-modal-content {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

    .search-modal-content::-webkit-scrollbar {
        width: 8px;
    }

    .search-modal-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .search-modal-content::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.5);
        border-radius: 10px;
    }

        .search-modal-content::-webkit-scrollbar-thumb:hover {
            background: rgba(59, 130, 246, 0.8);
        }

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .search-modal-header h3 {
        color: white;
        font-size: 1.5rem;
        margin: 0;
    }

.close-search {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .close-search:hover {
        background: rgba(239, 68, 68, 0.3);
        transform: rotate(90deg);
    }

.search-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .search-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .search-submit:hover {
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    }

.search-tips {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-tip {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .search-tip:hover {
        background: rgba(59, 130, 246, 0.2);
        color: #60a5fa;
    }

.search-results-area {
    margin-top: 1rem;
}

.result-stats {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #60a5fa;
}

.search-result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .search-result-card:hover {
        transform: translateX(4px);
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.3);
    }

.search-result-title {
    color: #60a5fa;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-description {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.search-result-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.75rem;
}

.tool-type-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.platform-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.result-link {
    color: #10b981;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

    .result-link:hover {
        color: #34d399;
        transform: translateX(4px);
    }

.loading-spinner {
    text-align: center;
    padding: 2rem;
}

    .loading-spinner .spinner-border {
        width: 2rem;
        height: 2rem;
    }

.no-results {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

/* ===== Buttons ===== */
.btn-support-dashboard {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .btn-support-dashboard::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .btn-support-dashboard:hover::before {
        left: 100%;
    }

    .btn-support-dashboard:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
        background: linear-gradient(135deg, #dc2626, #b91c1c);
        color: white;
    }

    .btn-support-dashboard i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .btn-support-dashboard:hover i {
        transform: scale(1.1);
    }

/* ===== Auth Buttons ===== */
.auth-buttons {
    display: flex;
    gap: 0.8rem;
}

.btn-auth {
    padding: 0.55rem 1.3rem;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-login {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
}

    .btn-login:hover {
        background: rgba(59, 130, 246, 0.3);
        transform: translateY(-2px);
        border-color: #60a5fa;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        color: #93c5fd !important;
    }

.btn-register {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
        background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    }

.btn-auth::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-auth:hover::before {
    left: 100%;
}

.btn-auth i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-auth:hover i {
    transform: scale(1.1);
}

/* ===== Profile Section ===== */
.profile-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-profile-advanced {
    position: relative;
    padding: 0.55rem 1.3rem;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

    .btn-profile-advanced::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .btn-profile-advanced:hover::before {
        left: 100%;
    }

    .btn-profile-advanced:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
        background: linear-gradient(135deg, #059669 0%, #10b981 100%);
        color: white !important;
    }

.profile-avatar {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.btn-profile-advanced:hover .profile-avatar {
    transform: scale(1.1);
}

.profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.profile-badge {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    box-shadow: 0 0 0 2px #1e293b;
    animation: pulse 2s infinite;
}

/* Cart Button Styles */
.cart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f5f9;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

    .cart-btn:hover {
        background: rgba(225, 48, 108, 0.2);
        transform: scale(1.05);
    }

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #E1306C, #833AB4);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 5px rgba(225, 48, 108, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.55rem 1.3rem;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

    .btn-logout:hover {
        background: rgba(239, 68, 68, 0.3);
        transform: translateY(-2px);
        border-color: #f87171;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
        color: #fca5a5 !important;
    }

/* ===== Language Switcher ===== */
.language-switcher {
    margin-left: 0;
}

.lang-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: 1px solid #4f46e5;
    color: white;
    padding: 0.55rem 1.1rem;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

    .lang-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;
    }

    .lang-btn:hover::before {
        left: 100%;
    }

    .lang-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    }

    .lang-btn i {
        font-size: 0.9rem;
    }

/* ===== Notification System ===== */
.notification-system {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999999 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification-advanced {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    min-width: 320px;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    pointer-events: auto;
    animation: notificationSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: right center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .notification-advanced:hover {
        transform: translateX(-4px) scale(1.02);
        box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.4);
    }

    .notification-advanced.hiding {
        animation: notificationSlideOut 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    }

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
}

    .notification-icon::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

.notification-advanced:hover .notification-icon::before {
    opacity: 1;
}

.notification-icon i {
    position: relative;
    z-index: 1;
    animation: iconPulse 0.5s ease;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.3px;
}

.notification-message {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: progressShrink 3s linear forwards;
}

.notification-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

    .notification-close:hover {
        background: rgba(239, 68, 68, 0.3);
        color: #f87171;
        transform: rotate(90deg);
    }

.notification-advanced[data-type="success"] .notification-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.notification-advanced[data-type="error"] .notification-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.notification-advanced[data-type="info"] .notification-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.notification-advanced[data-type="warning"] .notification-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
}

@keyframes progressShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Notification Dropdown ===== */
#notificationDropdownContainer {
    position: fixed !important;
    top: 80px;
    right: 20px;
    z-index: 9999999 !important;
    pointer-events: none;
}

.notification-dropdown {
    position: absolute !important;
    top: 0;
    right: 0;
    width: 380px;
    max-height: 500px;
    overflow-y: auto;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    pointer-events: auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: fadeInDown 0.2s ease;
}

    .notification-dropdown::-webkit-scrollbar {
        width: 6px;
    }

    .notification-dropdown::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .notification-dropdown::-webkit-scrollbar-thumb {
        background: #4361ee;
        border-radius: 10px;
    }

        .notification-dropdown::-webkit-scrollbar-thumb:hover {
            background: #667eea;
        }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Language Selector Modal ===== */
.language-selector-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 450px;
    max-width: calc(100vw - 60px);
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 32px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 99999;
    display: none;
    animation: slideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

    .language-selector-modal.active {
        display: block;
    }

.language-selector-header {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    padding: 1.5rem 1.5rem;
    text-align: center;
    color: white;
}

    .language-selector-header h4 {
        margin: 0;
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.8rem;
    }

        .language-selector-header h4 i {
            font-size: 1.6rem;
        }

.language-options-list {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.lang-select-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.3rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #94a3b8;
}

    .lang-select-option i {
        font-size: 2.2rem;
        width: 55px;
        text-align: center;
    }

    .lang-select-option .lang-name {
        flex: 1;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .lang-select-option .lang-desc {
        font-size: 0.8rem;
        color: #64748b;
    }

    .lang-select-option:hover {
        background: rgba(59, 130, 246, 0.25);
        border-color: #3b82f6;
        transform: translateX(8px);
    }

/* ===== Chat Modal ===== */
.chat-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 60px);
    height: 550px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 28px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

    .chat-modal.active {
        display: flex;
    }

.chat-header {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

    .chat-header h4 {
        margin: 0;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

        .chat-header h4 i {
            font-size: 1.3rem;
        }

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-close, .chat-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-close:hover, .chat-back:hover {
        background: rgba(239, 68, 68, 0.8);
        transform: rotate(90deg);
    }

    .chat-back:hover {
        transform: translateX(-3px) rotate(0deg);
        background: rgba(59, 130, 246, 0.8);
    }

.chat-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
}

    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #3b82f6;
        border-radius: 10px;
    }

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

    .message.user {
        align-self: flex-end;
    }

    .message.support {
        align-self: flex-start;
    }

.message-bubble {
    padding: 0.8rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.support .message-bubble {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.2rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    width: fit-content;
}

    .typing-indicator span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #94a3b8;
        animation: typingBounce 1.4s infinite;
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 0.9rem;
    resize: none;
    font-family: inherit;
}

    .chat-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.1);
    }

.chat-send {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-send:hover {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }

    .chat-send:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.chat-footer-note {
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

/* ===== Support FAB ===== */
.support-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: supportPulse 2s infinite;
}

    .support-fab:hover {
        transform: scale(1.1) rotate(10deg);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    }

@keyframes supportPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* ===== Agent Status Button ===== */
.agent-status-container {
    position: relative;
    margin-right: 10px;
    z-index: 999999;
}

.agent-status-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e2e8f0;
    position: relative;
}

    .agent-status-btn:hover {
        background: rgba(131, 58, 180, 0.2);
        transform: scale(1.05);
    }

.agent-status-indicator {
    position: relative;
}

    .agent-status-indicator i {
        font-size: 1.2rem;
    }

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1a2e;
    transition: all 0.3s ease;
}

    .status-dot.online {
        background: #42b72a;
        box-shadow: 0 0 8px rgba(66, 183, 42, 0.6);
        animation: pulse-green 1.5s infinite;
    }

    .status-dot.offline {
        background: #F88379;
        box-shadow: 0 0 5px rgba(244, 33, 46, 0.5);
    }

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ===== Agent Status Popup - Enhanced Z-Index ===== */
.agent-status-popup {
    position: fixed;
    top: 55px;
    right: 0;
    width: 300px;
    background: linear-gradient(135deg, #1e1e3a, #1a1a2e);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(131, 58, 180, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 9999999 !important;
    overflow: hidden;
    animation: fadeInDown 0.2s ease;
    pointer-events: auto;
}

    /* Triangle arrow for popup */
    .agent-status-popup::before {
        content: '';
        position: absolute;
        top: -8px;
        right: 15px;
        width: 16px;
        height: 16px;
        background: linear-gradient(135deg, #1e1e3a, #1a1a2e);
        border-top: 1px solid rgba(131, 58, 180, 0.3);
        border-left: 1px solid rgba(131, 58, 180, 0.3);
        transform: rotate(45deg);
        z-index: -1;
    }

    /* Ensure popup appears above all cards */
    .agent-status-popup,
    .agent-status-popup * {
        z-index: 9999999;
    }

.agent-popup-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.2), rgba(253, 29, 29, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #f1f5f9;
}

    .agent-popup-header i {
        font-size: 1.2rem;
        color: #833AB4;
    }

.agent-popup-body {
    padding: 20px;
}

.agent-status-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.status-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

    .status-circle.online {
        background: rgba(66, 183, 42, 0.15);
        border: 2px solid #42b72a;
        box-shadow: 0 0 15px rgba(66, 183, 42, 0.3);
        animation: glow-green 2s infinite;
    }

    .status-circle.offline {
        background: rgba(244, 33, 46, 0.15);
        border: 2px solid #F88379;
    }

    .status-circle.online i {
        color: #42b72a;
    }

    .status-circle.offline i {
        color: #F88379;
    }

    .status-circle i {
        font-size: 1.5rem;
    }

@keyframes glow-green {
    0%, 100% {
        box-shadow: 0 0 15px rgba(66, 183, 42, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(66, 183, 42, 0.6);
    }
}

.status-text {
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.status-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

.agent-info-row {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
}

.agent-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #e2e8f0;
    margin-bottom: 8px;
}

    .agent-info-item:last-child {
        margin-bottom: 0;
    }

    .agent-info-item i {
        width: 20px;
        color: #833AB4;
    }

.agent-refresh-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .agent-refresh-btn:hover {
        background: rgba(131, 58, 180, 0.2);
        border-color: rgba(131, 58, 180, 0.4);
    }

/* ===== Fix overflow issues with cards ===== */
.session-card,
.extraction-card,
.tool-admin-card,
.dashboard-stat-card,
.stat-card {
    position: relative;
    overflow: visible !important;
    z-index: 1;
}

/* RTL Adjustments for Agent Popup */
html[dir="rtl"] .agent-status-popup {
    right: auto;
    left: 0;
}

    html[dir="rtl"] .agent-status-popup::before {
        right: auto;
        left: 15px;
    }

html[dir="rtl"] .agent-status-container {
    margin-right: 0;
    margin-left: 10px;
}

/* ===== Admin RTL Adjustments ===== */
.navbar-brand-container.admin-margin {
    margin-right: 1rem;
}

html[dir="rtl"] .navbar-brand-container.admin-margin {
    margin-right: 0;
    margin-left: 1rem;
}

.navbar-brand-container:not(.admin-margin) {
    margin-right: -1rem;
}

html[dir="rtl"] .navbar-brand-container:not(.admin-margin) {
    margin-right: 0;
    margin-left: -1rem;
}

html[dir="rtl"] .navbar-brand-container {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] .navbar-brand i {
    margin-right: 0;
    margin-left: 0.6rem;
}

html[dir="rtl"] .right-side-group {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .search-input {
    padding: 1rem 1.2rem 1rem 3rem;
}

html[dir="rtl"] .search-submit {
    right: auto;
    left: 5px;
}

html[dir="rtl"] .search-result-card:hover {
    transform: translateX(-4px);
}

html[dir="rtl"] .admin-dropdown-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-4px);
}

html[dir="rtl"] .support-fab {
    right: auto;
    left: 30px;
}

html[dir="rtl"] .language-selector-modal,
html[dir="rtl"] .chat-modal,
html[dir="rtl"] .new-message-notification {
    right: auto;
    left: 30px;
}

html[dir="rtl"] .notification-system {
    right: auto;
    left: 20px;
}

html[dir="rtl"] #notificationDropdownContainer {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .notification-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .notification-advanced {
    animation: notificationSlideInRTL 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

    html[dir="rtl"] .notification-advanced.hiding {
        animation: notificationSlideOutRTL 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    }

@keyframes notificationSlideInRTL {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notificationSlideOutRTL {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .right-side-group {
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .language-selector-modal {
        width: calc(100vw - 40px);
        bottom: 80px;
        right: 20px;
    }

    .chat-modal {
        width: calc(100vw - 40px);
        height: 65vh;
        bottom: 80px;
        right: 20px;
    }

    .new-message-notification {
        bottom: 80px;
        right: 20px;
        left: auto;
    }

    html[dir="rtl"] .language-selector-modal,
    html[dir="rtl"] .chat-modal,
    html[dir="rtl"] .new-message-notification {
        right: auto;
        left: 20px;
    }

    .lang-select-option {
        padding: 1rem;
    }

        .lang-select-option i {
            font-size: 1.8rem;
            width: 45px;
        }

        .lang-select-option .lang-name {
            font-size: 1rem;
        }

    .admin-dropdown-menu {
        min-width: 260px;
        right: -20px;
    }

    html[dir="rtl"] .admin-dropdown-menu {
        left: -20px;
        right: auto;
    }

    .notification-dropdown {
        width: calc(100vw - 40px);
        right: 10px;
        left: auto;
    }

    html[dir="rtl"] .notification-dropdown {
        right: auto;
        left: 10px;
    }

    #notificationDropdownContainer {
        right: 10px;
    }

    html[dir="rtl"] #notificationDropdownContainer {
        left: 10px;
        right: auto;
    }

    .right-side-group {
        justify-content: center;
    }

    .admin-dropdown-container {
        order: 1;
    }

    .navbar-brand {
        font-size: 1.8rem !important;
        padding: 0.4rem 1rem;
    }

        .navbar-brand i {
            font-size: 1.6rem !important;
        }
}

/* ===== Utility Classes ===== */
.card {
    position: relative;
    z-index: 1;
}

.tools-container {
    position: relative;
    z-index: 1;
}

.search-modal {
    z-index: 99999 !important;
}

.chat-modal {
    z-index: 99999 !important;
}

.language-selector-modal {
    z-index: 99999 !important;
}

.support-fab {
    z-index: 99999 !important;
}

/* ===== Brand Logo - EPEX with Image Logo Only ===== */
.navbar-brand-container {
    margin-right: 1rem;
}

/* Logo only brand styling */
.navbar-brand.logo-brand {
    background: transparent !important;
    backdrop-filter: none;
    border: none !important;
    padding: 0.3rem 0.6rem;
    animation: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    /* Remove glow effect for logo-only */
    .navbar-brand.logo-brand:hover {
        background: transparent !important;
        border: none !important;
        box-shadow: none;
        transform: scale(1.02);
    }

/* Logo image styling */
.brand-logo-img {
    height: 42px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(96, 165, 250, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bouncing effect for logo on hover */
.navbar-brand.logo-brand:hover .brand-logo-img {
    animation: bounceLogo 0.5s cubic-bezier(0.36, 0.97, 0.56, 1.02) forwards;
    filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.5));
}

/* Logo bounce animation */
@keyframes bounceLogo {
    0% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-10px) scale(1.05);
    }

    70% {
        transform: translateY(3px) scale(0.98);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Responsive logo size */
@media (max-width: 768px) {
    .brand-logo-img {
        height: 34px;
    }
}

/* Remove any old brand styles that might interfere */
.navbar-brand::before {
    display: none !important;
}

.navbar-brand i {
    display: none;
}

.notification-trigger {
    position: relative;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 28px;
    padding: 0.55rem 1rem;
    color: white;
    cursor: pointer;
}

.mark-all-read-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.new-message-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 99999;
    animation: slideUp 0.3s ease, fadeOut 0.5s ease 4.5s forwards;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ===== Fix for page-specific containers that might conflict ===== */
#customAlertContainer {
    position: relative;
    z-index: 100;
    margin: 0 0 20px 0;
}

/* Ensure page alerts don't overflow */
.custom-alert {
    word-break: break-word;
    max-width: 100%;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Fix any button text overflow */
.btn-extract, .btn-stop, .btn-primary-custom {
    white-space: normal;
    word-break: break-word;
}

/* Ensure session status doesn't overlap */
.session-status {
    overflow: hidden;
}

/* Custom alert close button */
.custom-alert-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: inherit;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: auto;
}

    .custom-alert-close:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(1.1);
    }

/* Responsive fixes for session status */
@media (max-width: 640px) {
    .session-status {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

        .session-status > div:first-child {
            text-align: center;
        }

        .session-status > div:last-child {
            text-align: center;
        }

    .status-badge {
        justify-content: center;
        display: inline-flex;
        width: auto;
        max-width: 100%;
    }

    .btn-primary-custom {
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }
}

/* Fix RTL specific issues */
html[dir="rtl"] .session-status {
    direction: rtl;
}

html[dir="rtl"] .custom-alert {
    direction: rtl;
    text-align: center;
}

html[dir="rtl"] .custom-alert-close {
    margin-left: 0;
    margin-right: auto;
}

/* Animation improvements */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(225, 48, 108, 0.4);
        border-color: rgba(225, 48, 108, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(225, 48, 108, 0);
        border-color: rgba(225, 48, 108, 0.7);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading spinner animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

/* ===== Hide Header on Login & Register Pages ===== */
body.no-header header,
body.no-header .navbar {
    display: none !important;
}

body.no-header main {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optional: Center the form container */
body.no-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body.no-header .row {
    width: 100%;
}
