/**
 * Elegant Top Navigation Layout Styles
 * Modern, clean design with proper spacing and responsive behavior
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --top-header-height: 70px;
    --topnav-height: 64px;
    --header-total-height: calc(var(--top-header-height) + var(--topnav-height));
    --top-header-bg: #ffffff;
    --topnav-bg: #15487B;
    --topnav-text: #ffffff;
    --topnav-hover: rgba(255, 255, 255, 0.18);
    --topnav-hover-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
    --topnav-active: #f57a36;
    --topnav-active-gradient: linear-gradient(135deg, #f57a36 0%, #ff8c4a 100%);
    --header-nav-hover: linear-gradient(135deg, rgba(21, 72, 123, 0.08) 0%, rgba(21, 72, 123, 0.12) 100%);
    --header-nav-active: linear-gradient(135deg, rgba(21, 72, 123, 0.15) 0%, rgba(21, 72, 123, 0.2) 100%);
    --filter-sidebar-width: 240px;
    --transition-speed: 0.3s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Elegant Top Header Styles
   ============================================ */
.top-header.elegant-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-header-height);
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid rgba(21, 72, 123, 0.08);
    z-index: 1040;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.top-header .header-content {
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: visible;
}

/* Logo - Elegant Styling */
.header-left {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
    height: 100%;
}

.header-logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.logo-img:hover {
    opacity: 0.9;
}

/* Header Navigation Links */
.header-nav-links {
    display: flex;
    align-items: center;
    height: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overflow: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 1;
}

.header-nav-links::-webkit-scrollbar {
    display: none;
}

.header-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.header-nav-item {
    position: relative;
    white-space: nowrap;
}

.header-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #536485;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: all var(--transition-speed) var(--transition-easing);
    gap: 6px;
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
}

.header-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: var(--header-nav-hover);
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-easing);
    z-index: 0;
}

.header-nav-link:hover {
    background: var(--header-nav-hover);
    color: #15487B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 72, 123, 0.15);
    border-color: rgba(21, 72, 123, 0.1);
}

.header-nav-link:hover i {
    transform: scale(1.1);
    transition: transform var(--transition-speed) var(--transition-easing);
}

.header-nav-link.active {
    background: var(--header-nav-active);
    color: #15487B;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.2);
    border-color: rgba(21, 72, 123, 0.2);
}

.header-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #15487B 0%, #f57a36 100%);
    border-radius: 3px 3px 0 0;
}

.header-nav-link.dropdown-toggle {
    cursor: pointer;
}

.header-nav-link.dropdown-toggle:hover {
    background: var(--header-nav-hover);
    color: #15487B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 72, 123, 0.15);
}

.header-nav-link.dropdown-toggle[aria-expanded="true"] {
    background: var(--header-nav-active);
    color: #15487B;
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.2);
}

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

.header-nav-link.dropdown-toggle::after {
    margin-left: 6px;
    border-top: 0;
    border-right: 4px solid transparent;
    border-bottom: 0;
    border-left: 4px solid transparent;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
    vertical-align: middle;
    display: none; /* Hide arrow completely */
}

.header-nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* Header Dropdown Menus */
.header-nav-item.dropdown {
    position: relative;
    z-index: 1065;
}

.header-nav-item.dropdown.show {
    z-index: 1070;
}

.header-nav-menu .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: auto !important;
    border: 1px solid rgba(21, 72, 123, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(21, 72, 123, 0.05);
    padding: 4px;
    min-width: 240px;
    margin-top: 0 !important;
    background: #ffffff !important;
    z-index: 1070 !important;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-speed) var(--transition-easing), 
                visibility var(--transition-speed) var(--transition-easing), 
                transform var(--transition-speed) var(--transition-easing);
    pointer-events: none;
    overflow: visible;
    clip: none !important;
    clip-path: none !important;
    max-height: none !important;
}

.header-nav-menu .dropdown-menu.show,
.header-nav-menu .dropdown-menu[data-bs-popper],
.header-nav-menu .dropdown-menu[style*="position"],
.header-nav-menu .dropdown-menu[style*="display: block"],
.header-nav-menu .dropdown-menu[style*="display:block"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
    z-index: 1070 !important;
    clip: none !important;
    clip-path: none !important;
    max-height: none !important;
}

/* Ensure dropdowns are visible above header */
.top-header {
    z-index: 1040;
}

.header-nav-item.dropdown {
    z-index: 1061;
}

.header-nav-item.dropdown.show {
    z-index: 1062;
}

.header-nav-menu .dropdown-item,
.topnav-bar .dropdown-item {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.772rem;
    color: #536485;
    transition: all var(--transition-speed) var(--transition-easing);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    position: relative;
    margin: 1px 0;
    border: 1px solid transparent;
}

.header-nav-menu .dropdown-item:hover,
.topnav-bar .dropdown-item:hover {
    background: var(--header-nav-hover);
    color: #15487B;
    padding-left: 18px;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.1);
    border-color: rgba(21, 72, 123, 0.1);
}

.header-nav-menu .dropdown-item:hover i,
.topnav-bar .dropdown-item:hover i {
    transform: scale(1.1);
    transition: transform var(--transition-speed) var(--transition-easing);
}

.header-nav-menu .dropdown-item.active,
.topnav-bar .dropdown-item.active {
    background: var(--header-nav-active);
    color: #15487B;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.15);
    border-color: rgba(21, 72, 123, 0.2);
}

.header-nav-menu .dropdown-item.active::before,
.topnav-bar .dropdown-item.active::before {
    display: none;
}

.header-nav-menu .dropdown-divider {
    margin: 4px 0;
    border-top-color: #e9edf4;
}

.header-nav-menu .dropdown-header {
    padding: 6px 14px 4px;
    font-size: 0.653rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Overflow dropdown positioning */
.header-nav-item.overflow-dropdown .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* Ensure dropdowns are never clipped */
.top-header,
.top-header .container-fluid,
.top-header .header-content,
.header-nav-links,
.header-nav-menu,
.header-nav-item {
    overflow: visible !important;
}

/* Force dropdown visibility when Bootstrap shows it */
.header-nav-menu .dropdown-menu[style*="position: absolute"],
.header-nav-menu .dropdown-menu[style*="position:fixed"],
.header-nav-menu .dropdown-menu[style*="display: block"],
.header-nav-menu .dropdown-menu[style*="display:block"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    z-index: 1070 !important;
}

/* Fix for dropdown positioning when near edge */
.header-nav-item.dropdown:last-child .dropdown-menu,
.header-nav-item.overflow-dropdown .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* Smooth dropdown animation */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-nav-links-mobile {
    padding: 12px 0;
}

.header-nav-links-mobile .header-nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.header-nav-links-mobile .header-nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
}

/* Global Search - Modern Design */
.header-center {
    display: flex;
    align-items: center;
    height: 100%;
}

.global-search {
    position: relative;
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1.5px solid #e9edf4;
    border-radius: 12px;
    transition: all var(--transition-speed);
    overflow: hidden;
}

.search-wrapper:focus-within {
    background: #ffffff;
    border-color: #15487B;
    box-shadow: 0 0 0 4px rgba(21, 72, 123, 0.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #6c757d;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 120px 0 48px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: #2c3e50;
    transition: all var(--transition-speed);
}

.search-input:focus {
    outline: none;
    color: #2c3e50;
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-shortcut {
    position: absolute;
    right: 12px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e9edf4;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #6c757d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    pointer-events: none;
    letter-spacing: 0.5px;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    margin-top: 4px;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    z-index: 1050;
}

.search-results-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0.75rem;
}

/* Header Icon Buttons - Elegant */
.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: #536485;
    font-size: 1.25rem;
    transition: all var(--transition-speed);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.header-icon-btn:hover {
    background: #f0f3f6;
    color: #15487B;
    transform: translateY(-1px);
}

.header-icon-btn:active {
    transform: translateY(0);
}

.header-icon-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(21, 72, 123, 0.15);
}

/* Notification Badge */
.notification-badge-top {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* Profile Button - Modern Design */
.header-profile-btn {
    display: flex;
    align-items: center;
    padding: 6px 10px 6px 6px;
    border: 1.5px solid #e9edf4;
    background: #ffffff;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-speed);
    gap: 8px;
    flex-shrink: 0;
    height: 42px;
}

.header-profile-btn:hover {
    border-color: #15487B;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(21, 72, 123, 0.12);
    transform: translateY(-1px);
}

.header-profile-btn:active {
    transform: translateY(0);
}

.profile-avatar,
.profile-avatar-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #15487B 0%, #1a5a9e 100%);
    border-radius: 50%;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.2);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.profile-avatar-lg {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
}

.profile-avatar .avatar-image,
.profile-avatar-lg .avatar-image-lg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profile-avatar-lg .avatar-image-lg {
    width: 52px;
    height: 52px;
}

.profile-info {
    text-align: left;
    line-height: 1.3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.profile-role {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Profile Dropdown - Elegant */
.profile-dropdown {
    min-width: 300px;
    padding: 0;
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 8px !important;
}

.profile-dropdown .dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9edf4;
}

.profile-dropdown .dropdown-item {
    padding: 12px 20px;
    font-size: 0.9rem;
    color: #536485;
    transition: all 0.2s;
    border-radius: 0;
}

.profile-dropdown .dropdown-item:hover {
    background: #f0f3f6;
    color: #15487B;
    padding-left: 24px;
}

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

.profile-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* ============================================
   Top Navigation Bar Styles
   ============================================ */
.topnav-bar {
    position: fixed;
    top: var(--top-header-height);
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: var(--topnav-bg);
    z-index: 1035;
    padding: 0;
    box-shadow: 0 4px 20px rgba(21, 72, 123, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    overflow: visible !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.topnav-left {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent overflow */
    display: flex;
    align-items: center;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Icon Wrapper - Contains icon and label */
.topnav-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 4px 8px;
    border-radius: 0;
    transition: background-color 0.2s ease;
    min-width: 56px;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Topnav Dropdown Item - New structure for dropdowns */
.topnav-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 4px 8px;
    min-width: 56px;
}

.topnav-dropdown-item:hover {
    text-decoration: none;
    color: inherit;
}

.topnav-dropdown-item .topnav-icon-label {
    order: 1;
}

.topnav-dropdown-item .dropdown-menu {
    order: 2;
}

.topnav-icon-wrapper:hover {
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
}

.topnav-icon-wrapper:hover .topnav-icon-label {
    opacity: 1;
}

.topnav-icon-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--topnav-text);
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
    transform: none !important;
    margin: 0 !important;
}

.topnav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--topnav-text);
    font-size: 1.15rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    transform: none !important;
}

/* Allow span elements to act as icon buttons for links */
.topnav-icon-wrapper > span.topnav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.topnav-icon-btn:hover {
    background: var(--topnav-hover);
}

.topnav-icon-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.topnav-icon-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Tasks Button in Navbar */
.topnav-tasks-btn {
    position: relative;
}

.topnav-tasks-btn.active {
    background: rgba(245, 122, 54, 0.12) !important;
}

.topnav-tasks-btn.active .topnav-icon-btn {
    background: var(--topnav-active) !important;
    color: #ffffff !important;
    transform: none !important;
    margin: 0 !important;
}

.topnav-tasks-btn.active .topnav-icon-label {
    color: #ffffff !important;
    opacity: 1;
    font-weight: 500;
    transform: none !important;
    margin: 0 !important;
}

/* Topnav Dropdown Menus */
.topnav-bar .dropdown {
    position: relative;
    overflow: visible !important;
}

/* Topnav Dropdown Menus - Match Header Style */
.topnav-bar .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 240px;
    margin-top: 0 !important;
    background: #ffffff !important;
    z-index: 1080 !important;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.2s ease-out;
    pointer-events: none;
    overflow: visible;
    clip: none !important;
    clip-path: none !important;
    max-height: none !important;
}

.topnav-bar .dropdown-menu.show,
.topnav-bar .dropdown-menu[data-bs-popper],
.topnav-bar .dropdown-menu[style*="position"],
.topnav-bar .dropdown-menu[style*="display: block"],
.topnav-bar .dropdown-menu[style*="display:block"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
    z-index: 1080 !important;
    clip: none !important;
    clip-path: none !important;
    max-height: none !important;
}

/* Notification dropdown specific positioning */
.topnav-bar .notification-dropdown {
    min-width: 320px;
    max-height: 480px;
    padding: 0;
    border: none;
}

.topnav-bar .notification-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
    z-index: 1080 !important;
}

/* Profile dropdown */
.topnav-bar .profile-dropdown {
    min-width: 280px;
    padding: 0;
}

.topnav-bar .profile-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
    z-index: 1080 !important;
}

/* Ensure all containers allow overflow */
.topnav-bar,
.topnav-bar .container-fluid,
.topnav-right,
.topnav-dropdown-item {
    overflow: visible !important;
}

/* Topnav profile item */
.topnav-profile-item {
    padding: 0;
}

.topnav-bar .dropdown-menu.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Ensure topnav items are always visible and properly spaced */
.topnav-right {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
}

.topnav-dropdown-item,
.topnav-icon-wrapper {
    display: flex !important;
    visibility: visible !important;
}

/* Tasks Dropdown Specific Styling */
.topnav-tasks-dropdown {
    min-width: 220px;
    margin-top: 0 !important;
}

.topnav-tasks-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.topnav-tasks-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.topnav-tasks-dropdown .dropdown-item:hover {
    background: rgba(21, 72, 123, 0.08);
    color: #15487B;
}

.topnav-tasks-dropdown .dropdown-item.active {
    background: rgba(21, 72, 123, 0.12);
    color: #15487B;
    font-weight: 500;
}

.topnav-bar .profile-dropdown {
    min-width: 300px;
    padding: 0;
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 8px !important;
}

/* Responsive adjustments for topnav dropdowns */
@media (max-width: 576px) {
    .topnav-bar .dropdown-menu {
        position: fixed !important;
        top: calc(var(--header-total-height, 134px) + 6px) !important;
        left: 12px !important;
        right: 12px !important;
        width: calc(100vw - 24px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - var(--header-total-height, 134px) - 24px) !important;
        overflow-y: auto !important;
        padding: 12px !important;
        border-radius: 14px !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 12000 !important;
    }

    .topnav-bar .notification-dropdown,
    .topnav-bar .profile-dropdown,
    .topnav-bar .topnav-tasks-dropdown {
        width: 100% !important;
        min-width: 0 !important;
        max-height: calc(100vh - var(--header-total-height, 134px) - 24px);
    }

    .topnav-bar .notification-dropdown .notification-list {
        max-height: calc(100vh - var(--header-total-height, 134px) - 160px);
    }
}

/* Final mobile overrides (placed at end to win specificity) */
@media (max-width: 576px) {
    .top-layout-page .topnav-bar .dropdown-menu {
        position: fixed !important;
        top: calc(var(--header-total-height, 134px) + 6px) !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - var(--header-total-height, 134px) - 20px) !important;
        overflow-y: auto !important;
        padding: 12px !important;
        margin: 0 !important;
        border-radius: 14px !important;
        transform: none !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
        z-index: 13000 !important;
    }

    .top-layout-page .topnav-bar .notification-dropdown,
    .top-layout-page .topnav-bar .profile-dropdown,
    .top-layout-page .topnav-bar .topnav-tasks-dropdown {
        width: 100% !important;
        min-width: 0 !important;
        max-height: calc(100vh - var(--header-total-height, 134px) - 20px) !important;
    }

    .top-layout-page .topnav-bar .notification-dropdown .notification-list {
        max-height: calc(100vh - var(--header-total-height, 134px) - 160px) !important;
    }
}

/* Profile Avatar Button - Awesome Design */
.topnav-profile-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    outline: none;
}

.topnav-profile-avatar-btn:hover {
    transform: scale(1.1);
}

.topnav-profile-avatar-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.topnav-profile-avatar-btn:active {
    transform: scale(1.05);
}

.profile-avatar-circle {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #15487B 0%, #1a5a9e 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.topnav-profile-avatar-btn:hover .profile-avatar-circle {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.profile-avatar-circle .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profile-avatar-circle .avatar-initials {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.avatar-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    pointer-events: none;
}

.topnav-profile-avatar-btn:hover .avatar-ring {
    border-color: rgba(255, 255, 255, 0.3);
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Active state when dropdown is open */
.topnav-profile-avatar-btn[aria-expanded="true"] .profile-avatar-circle {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.topnav-profile-avatar-btn[aria-expanded="true"] .avatar-ring {
    border-color: rgba(255, 255, 255, 0.5);
    animation: pulse-ring 1.5s ease-out infinite;
}

.notification-badge-topnav {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--topnav-bg);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
    z-index: 10;
    pointer-events: none;
}

.topnav-bar,
.topnav-bar.navbar,
.topnav-bar .container-fluid,
.topnav-bar .navbar-collapse,
.topnav-bar .topnav-menu {
    border-radius: 0 !important;
}

.topnav-bar .container-fluid {
    max-width: 100% !important;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-width: 0; /* Allow flex container to shrink */
}

/* Topnav Breadcrumb Styling */
.topnav-breadcrumb {
    margin: 0;
    padding: 0;
    min-width: 0; /* Allow to shrink */
    overflow: hidden; /* Prevent overflow */
    flex-shrink: 1; /* Allow to shrink */
}

.topnav-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
}

.topnav-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    max-width: 200px; /* Limit max width */
    overflow: hidden;
    text-overflow: ellipsis;
}

.topnav-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ffffff;
    padding: 0 0.5rem;
    font-size: 1rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.topnav-breadcrumb .breadcrumb-item a,
.topnav-breadcrumb .breadcrumb-item span {
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}

.topnav-breadcrumb .breadcrumb-item a:hover {
    opacity: 0.8;
}

.topnav-breadcrumb .breadcrumb-item.active {
    color: #ffffff !important;
}

/* Topnav Page Title Styling */
.topnav-page-title {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}

.topnav-page-title .page-title {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px; /* Limit max width */
}

.topnav-page-title .page-title i {
    font-size: 1rem;
    opacity: 0.9;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

/* Responsive: Hide page title on medium and small screens */
@media (max-width: 991.98px) {
    .topnav-page-title {
        display: none;
    }
    
    /* Adjust breadcrumb spacing when page title is hidden */
    .topnav-breadcrumb {
        margin-right: 0.5rem;
    }
}
    font-weight: 500;
}

.topnav-breadcrumb .breadcrumb-item i {
    font-size: 0.9rem;
}

.topnav-bar .navbar-toggler {
    color: var(--topnav-text);
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 6px 12px;
}

.topnav-bar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navigation Menu */
.topnav-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
    height: 100%;
}

.topnav-menu .nav-item {
    position: relative;
}

.topnav-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--topnav-text);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 10px;
    margin: 6px 2px;
    transition: all var(--transition-speed) var(--transition-easing);
    text-decoration: none;
    gap: 8px;
    position: relative;
    border: 1px solid transparent;
}

.topnav-menu .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: var(--topnav-hover-gradient);
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-easing);
    z-index: 0;
}

.topnav-menu .nav-link:hover {
    background: var(--topnav-hover-gradient);
    color: var(--topnav-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.topnav-menu .nav-link:hover i {
    transform: scale(1.15);
    transition: transform var(--transition-speed) var(--transition-easing);
}

.topnav-menu .nav-link.active {
    background: var(--topnav-active-gradient);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(245, 122, 54, 0.4);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.topnav-menu .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px 3px 0 0;
}

.topnav-menu .nav-link i {
    font-size: 1rem;
    transition: transform var(--transition-speed) var(--transition-easing);
    position: relative;
    z-index: 1;
}

.header-nav-link i {
    transition: transform var(--transition-speed) var(--transition-easing);
    position: relative;
    z-index: 1;
}

/* Dropdown Toggle Arrow */
.topnav-menu .dropdown-toggle::after {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    content: "";
    border-top: 5px solid;
    border-right: 5px solid transparent;
    border-bottom: 0;
    border-left: 5px solid transparent;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.topnav-menu .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Dropdown Menus - Removed duplicate, using styles from line 589 */

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

/* Overflow Dropdown */
.overflow-dropdown .nav-link {
    padding: 12px 14px;
}

.overflow-dropdown .nav-link i {
    font-size: 1.3rem;
}

.overflow-menu {
    min-width: 260px;
    max-height: 420px;
    overflow-y: auto;
}

/* ============================================
   Main Content Area
   ============================================ */
.top-layout-page {
    padding-top: var(--header-total-height);
    min-height: 100vh;
    background: var(--default-body-bg-color, #f0f1f7);
    display: flex;
    flex-direction: column;
}

.top-layout-page .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    width: 100%;
}

/* Global spacing for all admin pages - remove blank space between topnav and content */
.top-layout-page .main-content .container-fluid {
    padding-top: 8px !important;
    margin-top: 0 !important;
}

.top-layout-page .main-content .row:first-child {
    margin-top: 0 !important;
}

/* Ensure all pages have consistent spacing */
.top-layout-page .main-content.app-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.top-layout-page .main-content.app-content .container-fluid {
    padding-top: 8px !important;
    margin-top: 0 !important;
}

/* Responsive container-fluid padding for all views */
@media (max-width: 767.98px) {
    .top-layout-page .main-content .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 8px !important;
    }
}

@media (max-width: 575.98px) {
    .top-layout-page .main-content .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-top: 6px !important;
    }
}

/* ============================================
   Page Filter Sidebar
   ============================================ */
.page-with-filters {
    display: flex;
    min-height: calc(100vh - var(--header-total-height));
    flex: 1 1 auto;
}

.filter-sidebar {
    width: var(--filter-sidebar-width);
    min-width: var(--filter-sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e9edf4;
    padding: 20px;
    overflow-y: auto;
    transition: all var(--transition-speed);
    height: calc(100vh - var(--header-total-height));
    position: sticky;
    top: var(--header-total-height);
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9edf4;
}

.filter-sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #15487B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #f0f3f6;
    color: #15487B;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 12px;
}

.filter-content {
    flex: 1;
    overflow-x: hidden;
}

/* ============================================
   Search Overlay Modal - Smart Elegant Design
   ============================================ */
.search-overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1070;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-overlay-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.search-overlay-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.2);
}

.search-overlay-modal.active .search-overlay-container {
    transform: translateY(0);
}

/* Integrated Search Header */
.search-overlay-header-integrated {
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e9edf4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.search-overlay-search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #f8f9fa;
    border: 2px solid #e9edf4;
    border-radius: 12px;
    padding: 0;
    transition: all 0.2s ease;
    position: relative;
}

.search-overlay-search-wrapper:focus-within {
    background: #ffffff;
    border-color: #15487B;
    box-shadow: 0 0 0 4px rgba(21, 72, 123, 0.1);
}

.search-overlay-icon {
    position: absolute;
    left: 20px;
    font-size: 1.5rem;
    color: #6c757d;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.search-overlay-search-wrapper:focus-within .search-overlay-icon {
    color: #15487B;
}

.search-overlay-input {
    flex: 1;
    height: 64px;
    padding: 0 60px 0 60px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 400;
    outline: none;
}

.search-overlay-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-overlay-close-btn {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-overlay-close-btn:hover {
    background: #e9ecef;
    color: #15487B;
    transform: rotate(90deg);
}

/* Full Width Results Container */
.search-overlay-results-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    padding: 0;
    width: 100%;
}

.search-overlay-results-container .search-results-dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
    margin: 0;
    padding: 0;
    display: block;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Desktop - Large screens (992px+) - Show header nav, hide hamburger */
@media (min-width: 992px) {
    /* Hide hamburger on desktop - Bootstrap d-lg-none should handle this,
       but we add explicit rules for specificity */
    .top-header .navbar-toggler.d-lg-none {
        display: none !important;
    }
    
    .top-header .navbar-collapse.d-lg-none {
        display: none !important;
    }
    
    /* Show header nav links on desktop */
    .header-nav-links.d-lg-flex {
        display: flex !important;
    }
}

/* Extra Large screens and below (1400px) */
@media (max-width: 1399.98px) {
    .header-nav-link {
        padding: 8px 12px;
        font-size: 0.825rem;
    }
}

@media (max-width: 1199.98px) {
    :root {
        --topnav-height: 52px;
    }
    
    .logo-img {
        max-width: 140px;
    }

    .profile-info {
        display: none !important;
    }
    
    .header-nav-link {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .header-nav-link i {
        font-size: 0.9rem;
    }
    
    /* Topnav fixes for 1024px and similar */
    .topnav-bar {
        height: var(--topnav-height);
        min-height: var(--topnav-height);
    }
    
    .topnav-bar .container-fluid {
        height: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Breadcrumb adjustments */
    .topnav-breadcrumb .breadcrumb-item {
        max-width: 150px;
        font-size: 0.8rem;
    }
    
    .topnav-right {
        gap: 6px;
        flex-wrap: nowrap;
        height: 100%;
        align-items: center;
    }
    
    .topnav-icon-label {
        display: none;
    }
    
    .topnav-icon-wrapper {
        gap: 0;
        min-width: auto;
        padding: 4px;
        flex-shrink: 0;
    }
    
    .topnav-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .profile-avatar-circle {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --top-header-height: 64px;
        --topnav-height: 52px;
    }

    /* Header adjustments for tablet */
    .top-header.elegant-header {
        padding: 0 0.5rem;
    }
    
    .top-header .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Topnav adjustments for tablet */
    .topnav-bar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Breadcrumb adjustments for tablet */
    .topnav-breadcrumb {
        margin-right: 0.25rem;
    }
    
    .topnav-breadcrumb .breadcrumb {
        font-size: 0.75rem;
    }
    
    .topnav-breadcrumb .breadcrumb-item {
        max-width: 120px;
    }
    
    .topnav-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.25rem;
        font-size: 0.9rem;
    }
    
    /* Topnav right icons adjustments */
    .topnav-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .topnav-icon-label {
        font-size: 0.65rem;
    }
    
    /* Show hamburger menu on tablet */
    .top-header .navbar-toggler.d-lg-none {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid rgba(21, 72, 123, 0.2);
        border-radius: 8px;
        background: rgba(21, 72, 123, 0.05);
        color: #15487B;
        margin-left: auto;
        margin-right: 0;
        transition: all 0.2s ease;
        order: 2;
    }
    
    /* Hide desktop nav links on tablet */
    .header-nav-links.d-lg-flex {
        display: none !important;
    }
    
    .top-header .navbar-toggler:hover,
    .top-header .navbar-toggler:focus {
        background: rgba(21, 72, 123, 0.1);
        border-color: #15487B;
        box-shadow: none;
    }
    
    .top-header .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2315487B' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }

    /* Extra small phones: tighten right spacing further */
    @media (max-width: 575.98px) {
        .top-header .container-fluid {
            padding-left: 0.35rem;
            padding-right: 0.35rem;
        }
    }
    
    /* Mobile Navigation Collapse on tablet */
    .top-header .navbar-collapse {
        position: absolute;
        top: var(--top-header-height);
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e9edf4;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        z-index: 1050;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height));
        overflow-y: auto;
    }
    
    .top-header .navbar-collapse.show {
        display: block !important;
    }

    /* Hide desktop nav links on tablet */
    .header-nav-links.d-lg-flex {
        display: none !important;
    }
    
    /* Tablet Nav Menu Styles */
    .header-nav-links-mobile {
        display: block;
        padding: 12px;
    }
    
    .header-nav-links-mobile .header-nav-menu {
        flex-direction: column;
        gap: 4px;
    }
    
    .header-nav-links-mobile .header-nav-item {
        width: 100%;
    }
    
    .header-nav-links-mobile .header-nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: 8px;
        justify-content: flex-start;
        font-size: 0.9rem;
    }
    
    .header-nav-links-mobile .dropdown-menu {
        position: static !important;
        display: none;
        background: #f8f9fa;
        border: none;
        border-radius: 8px;
        box-shadow: none;
        margin: 4px 0 8px 0 !important;
        padding: 8px;
    }
    
    .header-nav-links-mobile .dropdown-menu.show {
        display: block !important;
    }

    .topnav-bar {
        height: var(--topnav-height);
        min-height: var(--topnav-height);
    }
    
    .topnav-bar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        height: 100%;
    }

    .topnav-right {
        gap: 6px;
        padding: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        height: 100%;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .topnav-right::-webkit-scrollbar {
        display: none;
    }

    /* Hide labels on smaller screens */
    .topnav-icon-label {
        display: none;
    }

    .topnav-icon-wrapper {
        gap: 0;
        min-width: auto;
        padding: 4px;
        flex-shrink: 0;
    }

    .topnav-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
    }

    .topnav-icon-wrapper > span.topnav-icon-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Profile avatar size on tablet */
    .profile-avatar-circle {
        width: 38px;
        height: 38px;
    }
    
    .profile-avatar-circle .avatar-initials {
        font-size: 0.95rem;
    }

    .topnav-bar .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--topnav-bg);
        padding: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height));
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-radius: 0 !important;
    }

    .topnav-menu {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .topnav-menu .nav-item {
        width: 100%;
    }

    .topnav-menu .nav-link {
        margin: 0;
        border-radius: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    /* Topnav dropdowns on mobile/tablet - proper positioning */
    .topnav-bar .dropdown {
        position: relative;
    }
    
    .topnav-bar .dropdown-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: auto !important;
        background: #ffffff !important;
        border: 1px solid #e9edf4 !important;
        border-radius: 12px !important;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important;
        padding: 8px !important;
        min-width: 240px !important;
        max-width: calc(100vw - 20px) !important;
        width: auto !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        z-index: 1080 !important;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height) - 20px) !important;
        overflow-y: auto !important;
        transform: none !important;
    }
    
    /* Ensure dropdowns are visible when shown */
    .topnav-bar .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Profile dropdown - wider on mobile */
    .topnav-bar .profile-dropdown {
        min-width: 280px !important;
        max-width: calc(100vw - 20px) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    /* Notification dropdown - wider on mobile */
    .topnav-bar .notification-dropdown {
        min-width: 320px !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height) - 20px) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    /* Tasks dropdown */
    .topnav-bar .topnav-tasks-dropdown {
        min-width: 220px !important;
        max-width: calc(100vw - 20px) !important;
        right: 0 !important;
        left: auto !important;
    }

    .topnav-bar .dropdown-item {
        color: #536485 !important;
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
        white-space: normal !important;
    }

    .topnav-bar .dropdown-item:hover {
        background: rgba(21, 72, 123, 0.08) !important;
        color: #15487B !important;
    }
    
    .topnav-bar .dropdown-header {
        padding: 10px 14px 6px !important;
        font-size: 0.75rem !important;
        color: #6c757d !important;
    }
    
    .topnav-bar .dropdown-divider {
        margin: 6px 0 !important;
        border-top-color: #e9edf4 !important;
    }

    .filter-sidebar {
        position: fixed;
        left: 0;
        top: var(--header-total-height);
        bottom: 0;
        height: auto;
        z-index: 1030;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .filter-sidebar.show {
        transform: translateX(0);
    }

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

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1025;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed);
    }

    .filter-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 767.98px) {
    :root {
        --top-header-height: 60px;
        --topnav-height: 52px;
    }

    /* Header adjustments for mobile */
    .top-header.elegant-header {
        padding: 0;
    }
    
    .top-header .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Topnav adjustments for mobile */
    .topnav-bar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        flex-wrap: nowrap;
    }
    
    /* Breadcrumb adjustments for mobile - truncate more aggressively */
    .topnav-left {
        min-width: 0;
        overflow: hidden;
        flex: 0 1 auto; /* Allow to shrink but don't grow */
    }
    
    .topnav-breadcrumb {
        margin-right: 0.25rem;
        max-width: calc(100vw - 300px); /* Leave space for icons */
    }
    
    .topnav-breadcrumb .breadcrumb {
        font-size: 0.7rem;
        overflow: hidden;
    }
    
    .topnav-breadcrumb .breadcrumb-item {
        max-width: 100px;
        font-size: 0.7rem;
    }
    
    .topnav-breadcrumb .breadcrumb-item:first-child {
        display: none; /* Hide Dashboard on mobile */
    }
    
    .topnav-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Topnav right icons - ensure they don't overflow */
    .topnav-right {
        gap: 2px;
        flex-shrink: 0;
        min-width: fit-content;
    }
    
    .topnav-dropdown-item {
        min-width: 44px;
    }
    
    .topnav-icon-label {
        font-size: 0.6rem;
    }
    
    .top-header .header-content {
        flex-wrap: wrap;
    }

    .header-logo .logo-img {
        height: 32px;
        max-width: 100px;
    }
    
    /* Mobile Menu Toggle Button */
    .top-header .navbar-toggler.d-lg-none {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid rgba(21, 72, 123, 0.2);
        border-radius: 8px;
        background: rgba(21, 72, 123, 0.05);
        color: #15487B;
        margin-left: auto;
        margin-right: 0;
        transition: all 0.2s ease;
        order: 2;
    }
    
    /* Hide desktop nav links on mobile */
    .header-nav-links.d-lg-flex {
        display: none !important;
    }
    
    .top-header .navbar-toggler:hover,
    .top-header .navbar-toggler:focus {
        background: rgba(21, 72, 123, 0.1);
        border-color: #15487B;
        box-shadow: none;
    }
    
    .top-header .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2315487B' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
    
    /* Mobile Navigation Collapse */
    .top-header .navbar-collapse {
        position: absolute;
        top: var(--top-header-height);
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e9edf4;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        z-index: 1050;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height));
        overflow-y: auto;
    }
    
    .top-header .navbar-collapse.collapsing {
        height: auto;
        transition: opacity 0.2s ease;
    }
    
    .top-header .navbar-collapse.show {
        display: block !important;
    }
    
    /* Hide desktop nav links on mobile */
    .header-nav-links.d-lg-flex {
        display: none !important;
    }
    
    /* Mobile Nav Menu Styles */
    .header-nav-links-mobile {
        display: block;
        padding: 12px;
    }
    
    .header-nav-links-mobile .header-nav-menu {
        flex-direction: column;
        gap: 4px;
    }
    
    .header-nav-links-mobile .header-nav-item {
        width: 100%;
    }
    
    .header-nav-links-mobile .header-nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: 8px;
        justify-content: flex-start;
        font-size: 0.9rem;
    }
    
    .header-nav-links-mobile .header-nav-link:hover {
        transform: none;
    }
    
    .header-nav-links-mobile .dropdown-menu {
        position: static !important;
        display: none;
        background: #f8f9fa;
        border: none;
        border-radius: 8px;
        box-shadow: none;
        margin: 4px 0 8px 0 !important;
        padding: 8px;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .header-nav-links-mobile .dropdown-menu.show {
        display: block !important;
    }
    
    .header-nav-links-mobile .dropdown-item {
        padding: 10px 16px;
        border-radius: 6px;
        font-size: 0.85rem;
    }
    
    .header-nav-links-mobile .dropdown-header {
        padding: 8px 16px 4px;
        font-size: 0.7rem;
    }

    /* Topnav adjustments */
    .topnav-bar {
        min-height: var(--topnav-height);
    }
    
    .topnav-bar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .topnav-right {
        gap: 2px;
        flex-wrap: nowrap;
        justify-content: flex-end;
        width: 100%;
    }

    .topnav-icon-wrapper {
        padding: 2px;
        flex-shrink: 0;
    }
    
    .topnav-dropdown-item {
        padding: 2px;
        min-width: auto;
        flex-shrink: 0;
    }

    .topnav-icon-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .topnav-icon-wrapper > span.topnav-icon-btn {
        width: 34px;
        height: 34px;
    }

    .topnav-profile-avatar-btn {
        padding: 0;
    }

    .profile-avatar-circle {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }

    .profile-avatar-circle .avatar-initials {
        font-size: 0.9rem;
    }

    .top-layout-page .main-content {
        padding: 0;
    }
    
    .top-layout-page .main-content .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .filter-sidebar {
        width: 100%;
        max-width: 300px;
    }

    .search-overlay-header-integrated {
        padding: 16px 12px;
    }

    .search-overlay-search-wrapper {
        max-width: 100%;
    }

    .search-overlay-input {
        height: 52px;
        font-size: 1rem;
        padding: 0 44px 0 44px;
    }

    .search-overlay-icon {
        left: 14px;
        font-size: 1.2rem;
    }

    .search-overlay-close-btn {
        right: 6px;
        width: 32px;
        height: 32px;
    }

    .search-overlay-results-container .search-category-header,
    .search-overlay-results-container .search-result-item {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Profile dropdown mobile positioning */
    .topnav-bar .profile-dropdown {
        min-width: 280px;
        right: -10px !important;
    }
    
    /* Notification dropdown mobile */
    .topnav-bar .notification-dropdown {
        min-width: 300px;
        right: -50px !important;
        max-height: 70vh;
    }
    
    /* Tasks dropdown mobile */
    .topnav-bar .topnav-tasks-dropdown {
        min-width: 200px;
        right: 0 !important;
        left: auto !important;
    }
}

/* ============================================
   Hide Old Sidebar Styles
   ============================================ */
.top-layout-page .app-sidebar,
.top-layout-page #sidebar,
.top-layout-page .main-sidebar-header {
    display: none !important;
}

/* ============================================
   Footer Adjustments
   ============================================ */
.top-layout-page .footer {
    margin-left: 0 !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.footer {
    text-align: center !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.footer .container {
    text-align: center !important;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.full-width-content {
    max-width: 100%;
}

.content-with-filter {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-total-height));
}

/* Sticky footer: keep footer at bottom on short pages */
.top-layout-page > .footer {
    margin-top: auto;
}

.content-with-filter > .footer {
    margin-top: auto;
}

/* ============================================
   Extra Small Screen Styles (< 576px)
   ============================================ */
@media (max-width: 575.98px) {
    :root {
        --top-header-height: 56px;
        --topnav-height: 48px;
    }
    
    /* Very small header */
    .top-header .container-fluid {
        padding-left: 6px;
        padding-right: 6px;
    }
    
    .header-logo .logo-img {
        height: 28px;
        max-width: 85px;
    }
    
    .header-left {
        flex-shrink: 0;
    }
    
    /* Mobile toggle button adjustment */
    .top-header .navbar-toggler {
        width: 34px;
        height: 34px;
        margin-left: auto;
        margin-right: 0;
    }
    
    .top-header .navbar-toggler-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Very small topnav */
    .topnav-bar .container-fluid {
        padding-left: 6px;
        padding-right: 6px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
    }
    
    /* Breadcrumb - hide all except last item on very small screens */
    .topnav-breadcrumb {
        max-width: calc(100vw - 280px);
        margin-right: 0.25rem;
    }
    
    .topnav-breadcrumb .breadcrumb-item {
        max-width: 80px;
        font-size: 0.65rem;
    }
    
    .topnav-breadcrumb .breadcrumb-item:not(:last-child) {
        display: none; /* Hide all except last breadcrumb item */
    }
    
    .topnav-breadcrumb .breadcrumb-item:last-child::before {
        content: ""; /* Remove separator for last item */
        padding: 0;
    }
    
    .topnav-right {
        gap: 1px;
        flex-shrink: 0;
    }
    
    .topnav-icon-wrapper,
    .topnav-dropdown-item {
        padding: 1px;
    }
    
    .topnav-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .topnav-icon-wrapper > span.topnav-icon-btn {
        width: 32px;
        height: 32px;
    }
    
    .profile-avatar-circle {
        width: 32px;
        height: 32px;
    }
    
    .profile-avatar-circle .avatar-initials {
        font-size: 0.8rem;
    }
    
    /* Mobile nav menu very small */
    .header-nav-links-mobile {
        padding: 8px;
    }
    
    .header-nav-links-mobile .header-nav-link {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .header-nav-links-mobile .dropdown-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Dropdown adjustments for very small screens */
    .topnav-bar .dropdown-menu {
        min-width: 200px !important;
        max-width: calc(100vw - 16px) !important;
        right: 0 !important;
        left: auto !important;
        padding: 6px !important;
    }
    
    .topnav-bar .profile-dropdown {
        min-width: 260px !important;
        max-width: calc(100vw - 16px) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .topnav-bar .profile-dropdown .dropdown-header {
        padding: 12px !important;
    }
    
    .topnav-bar .profile-dropdown .dropdown-item {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }
    
    .profile-avatar-lg {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .topnav-bar .notification-dropdown {
        min-width: 280px !important;
        max-width: calc(100vw - 16px) !important;
        right: 0 !important;
        left: auto !important;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height) - 16px) !important;
    }
    
    .topnav-bar .topnav-tasks-dropdown {
        min-width: 200px !important;
        max-width: calc(100vw - 16px) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .topnav-bar .dropdown-item {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
}

/* Very Small Screens (≤425px) - Adjust dropdown positioning */
@media (max-width: 425px) {
    /* Topnav dropdowns - full width, positioned to stay in viewport */
    .topnav-bar .dropdown-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 10px !important;
        left: auto !important;
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    /* Profile dropdown - full width */
    .topnav-bar .profile-dropdown {
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        right: 10px !important;
        left: auto !important;
    }
    
    /* Notification dropdown - full width */
    .topnav-bar .notification-dropdown {
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        right: 10px !important;
        left: auto !important;
        max-height: calc(100vh - var(--top-header-height) - var(--topnav-height) - 20px) !important;
    }
    
    /* Tasks dropdown - full width */
    .topnav-bar .topnav-tasks-dropdown {
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        right: 10px !important;
        left: auto !important;
    }
    
    /* Ensure dropdowns are visible */
    .topnav-bar .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Dropdown items - adjust padding for very small screens */
    .topnav-bar .dropdown-item {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
    }
    
    .topnav-bar .dropdown-header {
        padding: 10px 12px 6px !important;
        font-size: 0.75rem !important;
    }
}
    
    /* Content padding for very small screens */
    .top-layout-page .main-content .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .search-overlay-header-integrated {
        padding: 12px 8px;
    }
    
    .search-overlay-input {
        height: 48px;
        font-size: 0.95rem;
        padding: 0 40px 0 40px;
    }
    
    .search-overlay-icon {
        left: 12px;
        font-size: 1.1rem;
    }
    
    .search-overlay-close-btn {
        right: 4px;
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
}

/* ============================================
   Very Small Screens (< 400px)
   ============================================ */
@media (max-width: 399.98px) {
    :root {
        --top-header-height: 52px;
        --topnav-height: 44px;
    }
    
    .header-logo .logo-img {
        height: 24px;
        max-width: 70px;
    }
    
    .top-header .navbar-toggler {
        width: 32px;
        height: 32px;
        margin-left: auto;
        margin-right: 0;
    }
    
    .topnav-icon-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .topnav-icon-wrapper > span.topnav-icon-btn {
        width: 30px;
        height: 30px;
    }
    
    .profile-avatar-circle {
        width: 30px;
        height: 30px;
    }
    
    .profile-avatar-circle .avatar-initials {
        font-size: 0.75rem;
    }
    
    /* Hide less important icons on very small screens */
    .topnav-dropdown-item:has(.fe-settings) {
        display: none;
    }
}

/* ============================================
   Landscape Mobile Adjustments
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --top-header-height: 50px;
        --topnav-height: 44px;
    }
    
    .top-header .navbar-collapse {
        max-height: calc(100vh - var(--top-header-height));
    }
    
    .topnav-bar .dropdown-menu {
        max-height: calc(100vh - var(--header-total-height) - 20px);
        overflow-y: auto;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .header-nav-link {
        min-height: 44px;
    }
    
    .topnav-icon-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover transforms on touch devices */
    .header-nav-link:hover,
    .topnav-menu .nav-link:hover {
        transform: none;
    }
    
    .module-card:hover {
        transform: none;
    }
}

/* ============================================
   Dashboard & Content Responsive Styles
   ============================================ */
/* Stats Overview Responsive */
@media (max-width: 991.98px) {
    .stats-overview {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .stats-overview h4 {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .stat-card-number {
        font-size: 1.35rem;
    }
    
    .stat-card-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .stats-overview {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-overview h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-card-number {
        font-size: 1.25rem;
    }
    
    .stat-card-label {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }
    
    /* Module cards responsive */
    .module-card {
        padding: 1rem;
    }
    
    .module-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .module-title {
        font-size: 1rem;
    }
    
    .module-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
    
    .module-stats {
        padding-top: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    /* Modern card responsive */
    .modern-card-header {
        padding: 0.75rem 1rem;
    }
    
    .modern-card-header h4 {
        font-size: 0.9rem;
    }
    
    .modern-card-body {
        padding: 0.875rem;
    }
    
    .modern-list-item {
        padding: 0.625rem;
        margin-bottom: 0.375rem;
    }
    
    .item-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        margin-right: 0.625rem;
    }
    
    .item-title {
        font-size: 0.8rem;
    }
    
    .item-meta-item {
        font-size: 0.7rem;
    }
    
    .item-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 575.98px) {
    .stats-overview {
        padding: 0.875rem;
    }
    
    .stats-overview h4 {
        font-size: 0.9rem;
    }
    
    .stats-overview .row {
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .stats-overview .row > [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
    }
    
    .stat-card {
        padding: 0.625rem;
    }
    
    .stat-card-number {
        font-size: 1.15rem;
    }
    
    .stat-card-label {
        font-size: 0.65rem;
    }
    
    /* Module grid responsive */
    .module-card {
        padding: 0.875rem;
    }
    
    .module-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0.625rem;
    }
    
    .module-title {
        font-size: 0.95rem;
        margin-bottom: 0.375rem;
    }
    
    .module-description {
        font-size: 0.72rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    /* Modern cards extra small */
    .modern-card-header {
        padding: 0.625rem 0.875rem;
    }
    
    .modern-card-header h4 {
        font-size: 0.85rem;
    }
    
    .modern-card-body {
        padding: 0.75rem;
    }
    
    .modern-list-item {
        padding: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modern-list-item .item-icon {
        display: none;
    }
    
    .modern-list-item .item-badge {
        align-self: flex-start;
    }
}

/* ============================================
   Form and Card Responsive Styles
   ============================================ */
@media (max-width: 767.98px) {
    .card {
        border-radius: 8px;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Button groups responsive */
    .btn-group-responsive {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-responsive .btn {
        width: 100%;
    }
    
    /* Page header responsive */
    .page-header-breadcrumb {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    /* Breadcrumb responsive */
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    /* Table responsive enhancements */
    .table-responsive {
        border-radius: 8px;
    }
    
    .table thead th {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .card-header {
        padding: 0.875rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .page-header-breadcrumb {
        padding: 0.875rem;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    /* Actions row responsive */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .d-flex.justify-content-between > * {
        width: 100%;
    }
    
    .d-flex.justify-content-between .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Batch Confirm Page - Sticky Menu Styles
   ============================================ */
.batch-sticky-menu {
    position: sticky;
    top: var(--header-total-height);
    z-index: 1020;
    background: #ffffff;
    border-bottom: 1px solid #e9edf4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: -1rem -1rem 1rem -1rem;
    padding: 0.75rem 1rem;
}

.batch-sticky-menu .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.batch-sticky-menu .btn {
    flex: 1 1 auto;
    min-width: 120px;
}

@media (max-width: 767.98px) {
    .batch-sticky-menu {
        top: var(--header-total-height);
        padding: 0.5rem;
        margin: -0.875rem -0.875rem 0.875rem -0.875rem;
    }
    
    .batch-sticky-menu .btn {
        min-width: 90px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .batch-sticky-menu .btn-group {
        flex-direction: column;
    }
    
    .batch-sticky-menu .btn {
        width: 100%;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .top-header,
    .topnav-bar,
    .filter-sidebar,
    .scrollToTop,
    .batch-sticky-menu {
        display: none !important;
    }
    
    .top-layout-page {
        padding-top: 0 !important;
    }
    
    .top-layout-page .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}
