/* ===================================
   MODERN NAVBAR STYLES - ProjectLib
   =================================== */

/* Modern Navbar Container */
.modern-navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.5) inset !important;
    padding: 0.75rem 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modern-navbar.scrolled {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.7) inset !important;
    border-bottom-color: rgba(124, 58, 237, 0.2) !important;
}

/* Dark Theme Support */
[data-theme="dark"] .modern-navbar {
    background: rgba(30, 41, 59, 0.95) !important;
    border-bottom-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(168, 85, 247, 0.1) inset;
}

[data-theme="dark"] .modern-navbar.scrolled {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(168, 85, 247, 0.2) inset;
}

/* ===================================
   BRAND LOGO STYLES
   =================================== */

.navbar-brand.modern-brand,
.modern-brand {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 0.5rem 1rem !important;
    border-radius: 14px !important;
    margin-right: 32px !important;
    /* Added spacing between brand and nav items */
}

.navbar-brand.modern-brand:hover,
.modern-brand:hover {
    transform: translateY(-2px) !important;
}

.brand-logo-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.brand-icon-container {
    position: relative !important;
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.brand-icon {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: brandFloat 3s ease-in-out infinite !important;
}

@keyframes brandFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-4px);
    }
}

.brand-text-modern {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    letter-spacing: -0.02em !important;
    transition: all 0.3s ease !important;
}

[data-theme="dark"] .brand-text-modern {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 50%, #d8b4fe 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.navbar-brand.modern-brand:hover .brand-text-modern,
.modern-brand:hover .brand-text-modern {
    letter-spacing: 0.02em !important;
}

/* ===================================
   NAVIGATION MENU STYLES
   =================================== */

.modern-nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    /* Increased from 4px to 12px for better spacing */
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.modern-nav-item {
    position: relative !important;
}

.modern-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    background: transparent !important;
}

.modern-nav-link::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08)) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    border-radius: 12px !important;
}

.modern-nav-link:hover::before {
    opacity: 1 !important;
}

.modern-nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
}

.nav-icon-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.modern-nav-link:hover .nav-icon-wrapper {
    transform: scale(1.15) rotate(5deg) !important;
}

.nav-text {
    position: relative !important;
    z-index: 1 !important;
}

/* Active Link State */
.modern-nav-link.active {
    color: white !important;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.2) inset !important;
}

.modern-nav-link.active::before {
    opacity: 0 !important;
}

.modern-nav-link.active:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.3) inset !important;
}

.modern-nav-link.active .nav-icon-wrapper,
.modern-nav-link.active .nav-icon-wrapper i,
.modern-nav-link.active .nav-text {
    opacity: 1 !important;
    color: white !important;
}

[data-theme="dark"] .modern-nav-link.active {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%) !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
}

/* Dropdown Arrow */
.dropdown-arrow-icon {
    font-size: 0.7rem !important;
    transition: transform 0.3s ease !important;
}

.modern-nav-link.dropdown-toggle[aria-expanded="true"] .dropdown-arrow-icon {
    transform: rotate(180deg) !important;
}

/* ===================================
   DROPDOWN MENU STYLES
   =================================== */

.modern-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 16px;
    padding: 8px;
    margin-top: 8px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    min-width: 280px;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="dark"] .modern-dropdown-menu {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(168, 85, 247, 0.1) inset;
}

.modern-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.modern-dropdown-item:hover::before {
    opacity: 1;
}

.modern-dropdown-item:hover {
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.dropdown-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.modern-dropdown-item:hover .dropdown-item-icon {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .modern-dropdown-item:hover .dropdown-item-icon {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.dropdown-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.modern-dropdown-item:hover .dropdown-item-title {
    color: var(--primary-color);
}

.modern-dropdown-item:hover .dropdown-item-desc {
    color: var(--text-primary);
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   =================================== */

/* Mobile Menu Button */
.floating-mobile-menu-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border: none;
    color: white;
    font-size: 1.3rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-mobile-menu-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-mobile-menu-btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .floating-mobile-menu-btn {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.98px) {
    .floating-mobile-menu-btn {
        display: flex;
    }

    .modern-nav-menu {
        display: none !important;
    }

    /* Hide desktop navbar completely on mobile */
    .modern-navbar,
    nav.navbar,
    .navbar-expand-lg,
    .navbar-collapse {
        display: none !important;
    }
}

/* Mobile Offcanvas Menu Enhancements */
.offcanvas {
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .offcanvas {
    background: var(--bg-white);
}

.offcanvas-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(168, 85, 247, 0.05));
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.offcanvas-title .brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .offcanvas-title .brand-text {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offcanvas-body {
    padding: 1.5rem;
}

.offcanvas .nav-link {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.offcanvas .nav-link:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08));
    color: var(--primary-color);
    transform: translateX(4px);
}

.offcanvas .nav-link.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .offcanvas .nav-link.active {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

.offcanvas .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Services Collapsible in Mobile Menu */
.offcanvas .collapse .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* ===================================
   USER & NOTIFICATION STYLES
   =================================== */

.modern-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    font-weight: 600;
}

.modern-user-trigger:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .modern-user-trigger {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
}

[data-theme="dark"] .modern-user-trigger:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
}

.user-avatar-trigger {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

[data-theme="dark"] .avatar-initials {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
}

.user-name-trigger {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.modern-user-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Modern User Panel */
.modern-user-panel {
    min-width: 300px;
    border-radius: 16px;
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    margin-top: 12px !important;
}

[data-theme="dark"] .modern-user-panel {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(168, 85, 247, 0.1) inset;
}

.user-panel-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(168, 85, 247, 0.05));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-panel-avatar .avatar-initials-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .user-panel-avatar .avatar-initials-large {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
}

.user-panel-info {
    flex: 1;
}

.user-panel-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.user-panel-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #dc2626;
}

.role-badge-worker {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    color: #2563eb;
}

.role-badge-user {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.1));
    color: #7c3aed;
}

.user-panel-menu {
    padding: 8px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.user-menu-item:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08));
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.user-menu-item svg {
    flex-shrink: 0;
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.user-menu-item.admin-item:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.08));
    color: #dc2626 !important;
}

.user-menu-item.coupon-item:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.08));
    color: #d97706 !important;
}

.user-menu-item.logout-item:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.08));
    color: #dc2626 !important;
}

/* Modern Notification Trigger */
.modern-notification-trigger {
    position: relative;
    padding: 10px;
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.modern-notification-trigger:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .modern-notification-trigger {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
}

.notification-badge {
    position: absolute;
    top: 9px !important;
    /* Overlap at the top */
    right: 15px !important;
    /* Overlap at the right */
    width: 12px !important;
    /* Increased from 10px to 12px */
    height: 12px !important;
    /* Increased from 10px to 12px */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0 !important;
    /* Hide any text */
    font-weight: 700;
    border-radius: 50% !important;
    /* Perfect circle */
    padding: 0 !important;
    /* No padding, just a dot */
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4), 0 0 0 2px white !important;
    animation: notificationPulse 2s ease-in-out infinite;
    z-index: 10 !important;
    /* Ensure it appears in front */
}

@keyframes notificationPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4), 0 0 0 2px white;
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6), 0 0 0 2px white;
    }
}

/* ===================================
   SIGNUP BUTTON STYLES
   =================================== */

/* Signup button hover effect */
.navbar-nav .btn[href*="register"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4) !important;
}

.navbar-nav .btn[href*="register"]:active {
    transform: translateY(0) !important;
}

/* ===================================
   SCROLLBAR STYLES
   =================================== */

.modern-dropdown-menu::-webkit-scrollbar,
.modern-user-panel::-webkit-scrollbar {
    width: 6px;
}

.modern-dropdown-menu::-webkit-scrollbar-track,
.modern-user-panel::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 10px;
}

.modern-dropdown-menu::-webkit-scrollbar-thumb,
.modern-user-panel::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 10px;
}

.modern-dropdown-menu::-webkit-scrollbar-thumb:hover,
.modern-user-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

@media (max-width: 1199.98px) {
    .modern-nav-menu {
        gap: 2px;
    }

    .modern-nav-link {
        padding: 10px 14px !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 991.98px) {
    .modern-navbar {
        padding: 1rem 0 !important;
    }

    .brand-text-modern {
        font-size: 1.25rem;
    }

    .brand-icon-container {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 575.98px) {
    .brand-text-modern {
        font-size: 1.15rem;
    }

    .floating-mobile-menu-btn {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }
}

/* ===================================
   ANIMATIONS & TRANSITIONS
   =================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}