:root {
    --header-height: 74px;
    --primary-color: #3CB8E6;
    --primary-hover: #2a9fd6;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-white: #ffffff;
    --border-light: #eff2f5;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* border-bottom: 1px solid var(--border-light); replaced with shadow for cleaner look */
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    transition: all 0.3s ease;
}

.dashboard-header {
    width: 100%;
}

@media (min-width: 992px) {
    .dashboard-header {
        padding-left: 280px; /* Sidebar width */
    }
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

/* Branding & Logo */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mask {
    width: 100%;
    height: 100%;
    -webkit-mask-image: url('/images/logo.png');
    mask-image: url('/images/logo.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: var(--primary-color);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Navigation */
.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Actions & User Profile */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.action-btn:hover {
    background: rgba(60, 184, 230, 0.1);
    color: var(--primary-color);
}

.badge-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    border: 1px solid white;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50px;
    transition: all 0.2s;
}

.user-profile-btn:hover {
    background: rgba(60, 184, 230, 0.05);
}

.header-avatar-container {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    background: #f8f9fa;
}

.header-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-avatar-monogram {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name-short {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Auth Buttons */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-text {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-primary-sm {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(60, 184, 230, 0.2);
}

.btn-primary-sm:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(60, 184, 230, 0.3);
}

/* Dropdown Modern */
.user-dropdown-wrapper {
    position: relative;
}

.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 260px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-dropdown);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-light);
}

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

.dropdown-header-modern {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.static-monogram {
    background: #e9ecef;
    color: var(--text-dark);
}

.dropdown-user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-user-details strong {
    font-size: 0.95rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.dropdown-item-modern:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-item-modern.text-danger:hover {
    background: #fff5f5;
    color: #dc3545;
}

.dropdown-divider-modern {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* Mobile Responsive */
.header-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-only {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: white;
    padding: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    max-height: 400px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-link {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary-mobile {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 991px) {
    .desktop-nav {
        display: none;
    }

    .user-name-short {
        display: none;
    }

    .header-toggle-btn {
        display: block;
    }

    .mobile-only {
        display: block;
    }

    .auth-actions {
        display: none;
    }
}
