﻿/* ============================================
   BEEC NAVBAR OPTIMIZATION
   ============================================ */

/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header Fixed - Top Bar */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .header-fixed .container {
        max-width: 100%;
        padding: 0 2rem;
    }

    .header-fixed .flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 4.3rem;
    }

/* Logo Styles */
.logobeec {
    height: 3.2rem;
    width: auto;
    transition: transform 0.3s ease;
}

    .logobeec:hover {
        transform: scale(1.05);
    }

/* Main Navbar - Navigation Bar */
.nav-fixed {
    position: fixed;
    top: 4.3rem;
    left: 0;
    right: 0;
    z-index: 1030;
    background: linear-gradient(135deg, #0ea5a5 0%, #0B948B 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0;
    border: none;
    border-radius: 0;
    min-height: 50px;
}

.navColor {
    background: transparent !important;
    border: none !important;
}

.navbar-default {
    background: transparent;
    border: none;
}

/* Navbar Links */
.nav-fixed .navbar-nav > li > a {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 14px;
    padding: 15px 18px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .nav-fixed .navbar-nav > li > a:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }

    .nav-fixed .navbar-nav > li > a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: #ffffff;
        transition: width 0.3s ease;
    }

.nav-fixed .navbar-nav > li:hover > a::after {
    width: 80%;
}

/* Active Menu Item */
.nav-fixed .navbar-nav > li.active > a,
.nav-fixed .navbar-nav > li.active > a:hover,
.nav-fixed .navbar-nav > li.active > a:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Dropdown Menu Styles */
.nav-fixed .dropdown-menu {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    padding: 8px 0;
    min-width: 240px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-fixed .dropdown-menu > li > a {
    color: #4a5568 !important;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .nav-fixed .dropdown-menu > li > a:hover {
        background: linear-gradient(135deg, #0ea5a5 0%, #0B948B 100%) !important;
        color: #ffffff !important;
        padding-left: 24px;
    }

    .nav-fixed .dropdown-menu > li > a i,
    .nav-fixed .dropdown-menu > li > a span {
        transition: all 0.2s ease;
    }

    .nav-fixed .dropdown-menu > li > a:hover i {
        transform: scale(1.1);
    }

/* Divider */
.nav-fixed .dropdown-menu .divider {
    margin: 8px 0;
    border-top: 1px solid #e2e8f0;
}

/* Dropdown Arrow */
.nav-fixed .dropdown.menu.arrow-dropdown > a::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-fixed .dropdown.menu.arrow-dropdown.open > a::before {
    opacity: 1;
}

/* Icons Styling */
.nav-fixed .navbar-nav > li > a i {
    font-size: 16px;
}

/* Top Bar Menu (Right Side) */
.header-fixed .navbar-nav > li > a {
    color: #4a5568;
    font-size: 14px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

    .header-fixed .navbar-nav > li > a:hover {
        color: #0B948B;
        background: rgba(14, 165, 165, 0.1);
        border-radius: 6px;
    }

.header-fixed .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    margin-top: 5px;
}

    .header-fixed .dropdown-menu > li > a {
        padding: 8px 16px;
        color: #4a5568;
        transition: all 0.2s ease;
    }

        .header-fixed .dropdown-menu > li > a:hover {
            background: #f1f5f9;
            color: #0B948B;
            padding-left: 20px;
        }

/* Notification Badge */
#lbNumberNotification {
    background-color: #ef4444 !important;
    color: #fff;
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Notification Box */
.divNotificationBox {
    max-height: 400px;
    overflow-y: auto;
    width: 360px !important;
    background: #ffffff;
    border-radius: 8px;
}

    .divNotificationBox::-webkit-scrollbar {
        width: 6px;
    }

    .divNotificationBox::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .divNotificationBox::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 3px;
    }

        .divNotificationBox::-webkit-scrollbar-thumb:hover {
            background: #0B948B;
        }

/* User Menu Icon */
.fa-user-circle {
    color: #0B948B !important;
    font-size: 28px !important;
    transition: transform 0.3s ease;
}

    .fa-user-circle:hover {
        transform: rotate(360deg);
    }

/* Content Offset */
.margin-10 {
    margin-top: 0 !important;
    padding-top: calc(4.3rem + 55px) !important;
}


/* Caret Icon */
.caret {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.dropdown.open .caret {
    transform: rotate(180deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-fixed .flex {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }

    .header-fixed .width70,
    .header-fixed .justify-end,
    .header-fixed > div[style*="width: 12%"] {
        width: 100% !important;
        justify-content: center !important;
        margin: 5px 0;
    }

    .logobeec {
        height: 2.5rem;
        margin: 0.5rem auto !important;
    }

    .nav-fixed {
        position: relative;
        top: 0;
    }

    .margin-10 {
        padding-top: 20px;
    }

    .nav-fixed .navbar-nav {
        margin: 0;
    }

        .nav-fixed .navbar-nav > li > a {
            padding: 12px 15px;
        }

    .nav-fixed .dropdown-menu {
        position: static;
        float: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.95);
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .header-fixed .container {
        padding: 0 1rem;
    }

    .nav-fixed .navbar-nav > li > a {
        font-size: 13px;
        padding: 10px 12px;
    }

    .divNotificationBox {
        width: 100% !important;
        max-width: 300px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix Datepicker z-index */
.datepicker,
.datepicker-dropdown {
    z-index: 9999 !important;
}

/* Print Styles */
@media print {
    .header-fixed,
    .nav-fixed {
        display: none !important;
    }

    .margin-10 {
        padding-top: 0 !important;
    }
}

/* Performance Optimization */
.nav-fixed,
.header-fixed {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

    /* Accessibility */
    .nav-fixed .navbar-nav > li > a:focus,
    .header-fixed .navbar-nav > li > a:focus {
        outline: 2px solid #0B948B;
        outline-offset: 2px;
    }

    /* Icon Colors Override */
    .nav-fixed .navbar-nav > li > a span[style*="color:chocolate"] i {
        color: #ffd700 !important;
    }

.arrow-dropdown {
    position: relative;
}

    /* Tạo mũi tên */
    .arrow-dropdown .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -10px; /* nằm trên dropdown */
        left: 40px; /* canh vị trí mũi tên, bạn chỉnh theo menu */
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid white; /* màu nền của dropdown */
        z-index: 1000;
    }

/* Đảm bảo dropdown có nền và đổ bóng */
.dropdown-menu {
    border: none !important;
    border-radius: 0.6rem !important;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.25);
}

.arrow-dropdown .dropdown-menu {
    top: calc(100% + 1.5px); /* chỉnh khoảng cách */
}
.width70 {
    width: 70% !important;
}