/* ===========================
   NAVIGATION BAR STYLES
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

/* ===========================
   NAVBAR CONTAINER
   =========================== */

.navbar-modern {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    padding: 0;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 2px solid var(--primary-light);
    margin: 0;
    line-height: 1;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* ===========================
   LOGO SECTION
   =========================== */

.navbar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
    min-width: fit-content;
}

.navbar-logo a:hover {
    transform: scale(1.05);
}

.navbar-logo i {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



/* ===========================
   NAVBAR RIGHT SECTION
   =========================== */

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: fit-content;
}

.nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    position: relative;
    font-size: 20px;
}

.nav-icon:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.icon-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.nav-icon:hover .icon-label {
    opacity: 1;
}

/* ===========================
   USER DROPDOWN
   =========================== */

.nav-dropdown {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.nav-user-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-user-btn.active i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--bg-light);
    border-left-color: var(--primary-color);
    padding-left: 20px;
}

.dropdown-item i {
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.logout-item {
    color: #ef4444;
}

.logout-item:hover {
    background-color: #fee2e2;
}

.logout-item i {
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ===========================
   MOBILE MENU TOGGLE
   =========================== */

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   MOBILE MENU
   =========================== */

.navbar-mobile {
    display: none;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.navbar-mobile.active {
    display: flex;
    max-height: 500px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.mobile-search-input:focus {
    border-color: var(--primary-color);
}

.mobile-search button {
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-search button:hover {
    background: var(--primary-dark);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-item:hover {
    background: var(--bg-white);
    color: var(--primary-color);
    transform: translateX(5px);
}

.mobile-nav-item i {
    font-size: 16px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
    .navbar-container {
        gap: 15px;
    }

    .icon-label {
        display: none;
    }

    .nav-icon {
        font-size: 18px;
    }

    .user-name {
        display: none;
    }

    .nav-user-btn {
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 10px 15px;
        gap: 10px;
    }

    .navbar-logo a {
        font-size: 18px;
    }

    .navbar-right {
        gap: 10px;
    }

    .nav-icon {
        font-size: 16px;
    }

    .nav-user-btn {
        padding: 5px 6px;
    }

    .profile-img {
        width: 28px;
        height: 28px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-mobile {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
    }

    .nav-dropdown-menu {
        position: fixed;
        top: auto;
        right: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 8px 10px;
        gap: 8px;
    }

    .navbar-logo a {
        font-size: 16px;
    }

    .navbar-logo i {
        font-size: 24px;
    }

    .navbar-right {
        gap: 8px;
    }

    .nav-icon {
        font-size: 14px;
        gap: 2px;
    }
}