/* Modern Navbar Styles */
:root {
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-text: #334155;
    --nav-hover: #3b82f6;
    --nav-active: #2563eb;
    --nav-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.navbar-custom {
    background: var(--nav-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--nav-shadow);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
    font-weight: 800;
    color: #1e293b !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.brand-container {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.navbar-logo {
    max-height: 19px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.brand-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 32px; /* Align with text, after the icon */
    margin-top: -2px;
    letter-spacing: 0.2px;
}

.navbar-custom .navbar-brand i {
    color: var(--nav-hover);
}

.navbar-custom .nav-link {
    color: var(--nav-text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar-custom .nav-link i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    opacity: 0.8;
}

.navbar-custom .nav-link:hover {
    color: var(--nav-hover) !important;
    background: rgba(59, 130, 246, 0.1);
}

.navbar-custom .nav-item.active .nav-link,
.navbar-custom .nav-link.active {
    color: var(--nav-active) !important;
    background: rgba(37, 99, 235, 0.1);
    position: relative;
}

.navbar-custom .nav-item.active .nav-link::after,
.navbar-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--nav-active);
    border-radius: 10px 10px 0 0;
}

/* Dropdown styling */
.navbar-custom .dropdown-menu {
    border: none;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.navbar-custom .dropdown-item {
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar-custom .dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
    color: #64748b;
}

.navbar-custom .dropdown-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--nav-hover);
}

.navbar-custom .dropdown-item:hover i {
    color: var(--nav-hover);
}

/* Mobile Toggler */
.navbar-custom .navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-custom .navbar-toggler:focus {
    box-shadow: none;
}

.toggler-icon {
    width: 24px;
    height: 2px;
    background-color: var(--nav-text);
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

.toggler-icon::before,
.toggler-icon::after {
    content: '';
    width: 24px;
    height: 2px;
    background-color: var(--nav-text);
    display: block;
    position: absolute;
    transition: all 0.3s ease;
}

.toggler-icon::before { top: -8px; }
.toggler-icon::after { bottom: -8px; }

.navbar-toggler[aria-expanded="true"] .toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* User Profile Section */
.user-profile-nav .nav-link {
    background: rgba(226, 232, 240, 0.5);
    border-radius: 50px;
    padding: 0.4rem 1rem !important;
    margin-left: 1rem;
}

.user-profile-nav .user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.5rem;
}

.logout-link {
    background: rgba(220, 53, 69, 0.05);
    border-radius: 50px;
    padding: 0.4rem 1rem !important;
    transition: all 0.2s ease;
}

.logout-link:hover {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #dc3545 !important;
    transform: translateY(-1px);
}

.logout-link i {
    font-size: 1rem;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 1199.98px) {
    .navbar-custom .navbar-collapse {
        background: white;
        margin: 0 -1.5rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e2e8f0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-custom .nav-link.active::after {
        display: none;
    }
    
    .navbar-custom .nav-link {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.25rem;
    }
    
    .user-profile-nav .nav-link {
        margin-left: 0;
        margin-top: 1rem;
        border-radius: 8px;
        background: rgba(226, 232, 240, 0.3);
    }
}

/* Animation */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-custom .dropdown-menu.show {
    animation: slideDown 0.2s ease forwards;
}
