/* ============================================
   PROFESSIONAL NAVBAR STYLING
   ============================================ */

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

html {
    font-size: 90%;
}

html, body {
    scroll-behavior: smooth;
}

/* Fix page content padding for fixed navbar */
body {
    padding-top: 50px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 48px !important;
    }
}

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

.navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 8px 18px !important;
    min-height: 50px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        linear-gradient(225deg, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   NAVBAR BRAND/LOGO
   ============================================ */

.navbar-brand {
    padding: 0 10px !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
    color: white !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 230px !important;
}

.navbar-brand::after {
    content: '';
    display: none;
}

.navbar-brand img {
    height: 28px !important;
    width: auto !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
}

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

.navbar-nav {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}

#usernavigation.navbar-nav.ms-auto,
.usernavigation.navbar-nav.ms-auto {
    margin-left: auto !important;
    justify-content: flex-end !important;
}

.modern-right-nav {
    margin-left: auto !important;
    justify-content: flex-end !important;
    display: flex !important;
}

.nav-link {
    color: white !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    margin: 0 3px !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
    font-size: 0.85rem !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    text-transform: capitalize !important;
    letter-spacing: 0.2px !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    color: white !important;
    transform: translateY(-3px) !important;
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1) !important;
}

.nav-link.active::before {
    width: 80%;
}

.nav-link i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

/* ============================================
   RIGHT UTILITIES
   ============================================ */

.navbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
}

/* Search Bar */
.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-wrapper:hover,
.search-wrapper:focus-within {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.search-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 0.9rem !important;
    padding: 0 10px !important;
    outline: none !important;
    width: 220px !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.search-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-wrapper:hover .search-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Notification Bell */
.notification-icon {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.notification-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.1) rotate(10deg);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    border: 2px solid #1e3a8a;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Theme Toggle */
.theme-toggle {
    width: 45px !important;
    height: 45px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.theme-toggle:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    transform: rotate(180deg) !important;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-menu:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.user-menu:hover .user-avatar {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-name {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
}

.user-status {
    color: rgba(59, 130, 246, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
}

.user-dropdown-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.user-menu:hover .user-dropdown-icon {
    color: #3b82f6;
    transform: rotate(180deg);
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    padding: 8px 0 !important;
    margin-top: 10px !important;
    backdrop-filter: none !important;
}

.dropdown-item {
    color: #374151 !important;
    padding: 10px 18px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.dropdown-item:hover {
    background: #f0f9ff !important;
    color: #1e40af !important;
    padding-left: 24px !important;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.dropdown-divider {
    margin: 6px 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

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

@media (max-width: 1024px) {
    .search-input {
        width: 150px !important;
    }

    .navbar {
        padding: 8px 16px !important;
        min-height: 48px !important;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 8px 14px !important;
        min-height: 46px !important;
    }

    .navbar-nav {
        display: none !important;
    }

    .search-wrapper {
        display: none !important;
    }

    .nav-link {
        padding: 10px 15px !important;
        margin: 0 3px !important;
        font-size: 0.85rem !important;
    }

    .user-info {
        display: none !important;
    }

    .navbar-right {
        gap: 10px !important;
    }

    .user-menu {
        padding: 10px 14px !important;
    }

    .user-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 576px) {
    .notification-icon,
    .theme-toggle {
        width: 40px !important;
        height: 40px !important;
    }

    .user-avatar {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    .navbar {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    }

    .search-wrapper {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu {
        background: #1f2937 !important;
    }

    .dropdown-item {
        color: #e5e7eb !important;
    }

    .dropdown-item:hover {
        background: #2d3748 !important;
        color: #93c5fd !important;
    }
}

/* ============================================
   FOOTER STYLING
   ============================================ */

#page-footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#page-footer .footer-container {
    justify-content: flex-start !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* ============================================
   BREADCRUMB STYLING
   ============================================ */

.breadcrumb {
    background: transparent !important;
    padding: 15px 0 15px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem !important;
}

.breadcrumb-item.active {
    color: #1e40af !important;
    font-weight: 700 !important;
}

.breadcrumb-item a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.breadcrumb-item a:hover {
    color: #1e40af !important;
}

/* ============================================
   PAGE HEADER VISIBILITY
   ============================================ */

.page-context-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.page-header-headings {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 40px 0 20px 0 !important;
}

.page-header-headings h1,
.page-header-headings h1.h2 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #333 !important;
    background-color: transparent !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
}

h1 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333 !important;
}

/* ============================================
   NAVIGATION LINKS VISIBILITY
   ============================================ */

/* Main navbar - keep all nav-links white */
.nav-link {
    color: white !important;
}

.nav-link:hover {
    color: white !important;
}

.nav-link.active {
    color: #93c5fd !important;
}

/* Admin page tabs ONLY - override to black */
.moremenu .nav-link {
    color: #000000 !important;
}

.moremenu .nav-link:hover {
    color: #000000 !important;
}

.moremenu .nav-link.active {
    color: #000000 !important;
}

.more-nav .nav-link {
    color: #000000 !important;
}

.more-nav .nav-link:hover {
    color: #000000 !important;
}

.more-nav .nav-link.active {
    color: #000000 !important;
}

.navbar svg {
    fill: white !important;
    stroke: white !important;
}

.navbar i,
.navbar .fa,
.navbar .fas,
.navbar .far,
.navbar .fab {
    color: white !important;
}

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

.navbar {
    animation: slideDown 0.5s ease;
}
