body { 
    padding-top: 80px;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Custom Multi-Select Dropdown Styles */
.multi-select-wrapper {
    position: relative;
    width: 100%;
}

.multi-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    min-height: calc(1.5em + 0.75rem + 2px);
}

.multi-select-display:hover {
    border-color: #86b7fe;
}

.multi-select-display.active {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.multi-select-placeholder {
    color: #6c757d;
}

.multi-select-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
    margin-right: 0.5rem;
}

.multi-select-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    max-width: 150px;
}

.multi-select-tag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-arrow {
    transition: transform 0.2s ease;
    color: #6c757d;
}

.multi-select-arrow.open {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.multi-select-dropdown.show {
    display: block;
}

.multi-select-search {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.multi-select-search input {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.multi-select-search input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.multi-select-options {
    padding: 0.25rem 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.multi-select-option:hover {
    background-color: #f8f9fa;
}

.multi-select-option.selected {
    background-color: #e7f1ff;
}

.multi-select-checkbox {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

.multi-select-option-text {
    flex: 1;
    font-size: 0.875rem;
    user-select: none;
}

.multi-select-actions {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.multi-select-actions button {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.multi-select-select-all {
    background-color: #0d6efd;
    color: white;
}

.multi-select-select-all:hover {
    background-color: #0b5ed7;
}

.multi-select-clear-all {
    background-color: #6c757d;
    color: white;
}

.multi-select-clear-all:hover {
    background-color: #5c636a;
}

.multi-select-count {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

/* Responsive adjustments for multi-select */
@media (max-width: 768px) {
    .multi-select-dropdown {
        max-height: 250px;
    }
    
    .multi-select-tag {
        max-width: 100px;
    }
}

/* Professional Header Design */
.professional-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    border-bottom: 3px solid #3498db;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    height: 80px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed from space-between to flex-start */
    height: 100%;
    max-width: none; /* Removed max-width constraint */
    margin: 0; /* Removed auto centering */
    padding: 0 1rem; /* Reduced padding */
    gap: 1rem; /* Reduced gap */
}


.header-left {
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.header-brand:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: transform 0.3s ease;
}

/* Easter egg animation */
@keyframes spinAndGrow {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.5) rotate(180deg);
    }
    50% {
        transform: scale(2) rotate(360deg);
    }
    75% {
        transform: scale(1.5) rotate(540deg);
    }
    100% {
        transform: scale(1) rotate(720deg);
    }
}

.brand-icon.easter-egg-active {
    animation: spinAndGrow 1.5s ease-in-out;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-top: -2px;
}

/* Desktop Navigation Layout */
@media (min-width: 768px) {
    .header-nav {
        display: flex;
        flex: none; /* Changed from flex: 1 to flex: none */
        justify-content: flex-start; /* Changed from center to flex-start */
        align-items: center;
        margin-right: auto; /* Push user controls to the right */
    }
    
    .nav-menu {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        gap: 1rem;
        align-items: center;
        background: rgba(255, 255, 255, 0.08);
        padding: 0.5rem;
        border-radius: 12px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item {
        position: relative;
    }
    
    .nav-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        padding: 0.75rem 1.25rem;
        border-radius: 8px;
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .nav-link i {
        font-size: 1rem;
    }
    
    .nav-link:hover {
        color: white;
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
    }
    
    .nav-item.active .nav-link {
        color: white;
        background: rgba(52, 152, 219, 0.8);
        font-weight: 600;
        box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-shrink: 0;
        margin-left: auto; /* Push user controls to the right */
    }
    
    .header-user {
        display: flex;
        align-items: center;
        gap: 1rem;
        color: white;
    }
    
    .user-info {
        font-size: 0.85rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        text-align: right;
        line-height: 1.3;
    }
    
    .user-info a#profileLink {
        color: #ffffff;
        text-decoration: underline;
        text-decoration-style: dotted;
        text-underline-offset: 2px;
    }
    
    .user-info a#profileLink:hover {
        color: #b3d9ff;
        text-decoration: underline;
        text-decoration-style: solid;
    }
    
    .logout-btn {
        background: rgba(229, 62, 62, 0.8);
        border: 1px solid rgba(229, 62, 62, 0.3);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.2s ease;
        text-decoration: none;
        cursor: pointer;
        white-space: nowrap;
    }
    
    .logout-btn:hover {
        background: rgba(229, 62, 62, 1);
        border-color: rgba(229, 62, 62, 0.8);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    }
    
    /* Taskbar toggle styling */
    .form-check {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
    }
    
    .form-check-input:checked {
        background-color: #3498db;
        border-color: #3498db;
    }
    
    .form-check-input:focus {
        border-color: rgba(255, 255, 255, 0.5);
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    }
    
    .form-check-label {
        cursor: pointer;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Override default centering for better small screen support */
@media (min-width: 768px) and (max-width: 1599px) {
    .header-container {
        justify-content: flex-start !important; /* Force left-align all header content */
    }
    
    .header-nav {
        justify-content: flex-start !important; /* Force left-align navigation */
        flex: none !important; /* Don't let nav take up all space */
    }
}

/* Tablet and Small Desktop Layout - Left-aligned header for better visibility */
@media (min-width: 768px) and (max-width: 1400px) {
    .header-container {
        justify-content: flex-start !important; /* Force left-align all header content */
        padding: 0 1rem; /* Reduce padding */
        gap: 1rem; /* Reduce gap between elements */
        max-width: none; /* Remove max-width constraint */
    }
    
    .header-nav {
        flex: none !important; /* Don't let nav take up all space */
        justify-content: flex-start !important; /* Force left-align navigation */
        margin-left: 0; /* Remove auto centering */
        margin-right: auto; /* Push user info to far right */
    }
    
    .nav-menu {
        gap: 0.5rem; /* Tighter navigation spacing */
    }
    
    .nav-link {
        padding: 0.75rem 0.875rem; /* Smaller nav link padding */
        font-size: 0.9rem; /* Slightly smaller font */
    }
    
    .brand-title {
        font-size: 1.25rem; /* Smaller brand title */
    }
    
    .brand-subtitle {
        font-size: 0.75rem; /* Smaller subtitle */
    }
    
    .header-user {
        font-size: 0.85rem; /* Smaller user info text */
    }
    
    .user-name {
        display: none; /* Hide username on smaller screens to save space */
    }
    
    .header-right {
        flex-shrink: 0 !important; /* Never allow user controls to shrink */
        display: flex !important; /* Force display */
        width: auto !important; /* Remove any width constraints */
    }
    
    .user-controls .btn {
        padding: 0.375rem 0.75rem; /* Smaller button padding */
        font-size: 0.8rem; /* Smaller button text */
        white-space: nowrap; /* Prevent text wrapping */
    }
}

/* Force left-alignment for common laptop/tablet sizes */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-container {
        justify-content: flex-start !important; /* Force left alignment */
        padding: 0 0.75rem !important; /* Even tighter padding */
        gap: 0.75rem !important; /* Smaller gaps */
    }
    
    .header-nav {
        justify-content: flex-start !important; /* Force nav left alignment */
        flex: none !important; /* Remove flex growth */
    }
    
    .nav-menu {
        margin: 0 !important; /* Remove any margins */
        justify-content: flex-start !important; /* Left align menu items */
    }
    
    .header-right {
        margin-left: auto !important; /* Push to far right */
        flex-shrink: 0 !important; /* Never shrink */
    }
}

/* Extra small tablets and large phones - more aggressive space saving */
@media (min-width: 768px) and (max-width: 991px) {
    .header-container {
        padding: 0 0.75rem; /* Even tighter padding */
        gap: 0.75rem; /* Even smaller gaps */
    }
    
    .brand-text {
        display: none; /* Hide brand text completely, keep only AR icon */
    }
    
    .nav-link span {
        display: none; /* Hide text labels, keep only icons */
    }
    
    .nav-link {
        padding: 0.75rem 0.6rem; /* Minimal padding for icon-only nav */
        min-width: auto; /* Remove minimum width */
    }
    
    .header-user {
        flex-direction: row; /* Ensure horizontal layout */
        gap: 0.5rem; /* Smaller gap */
    }
    
    .user-controls .btn {
        padding: 0.25rem 0.5rem; /* Minimal button padding */
    }
    
    /* Ensure logout button is always visible */
    .user-controls {
        flex-shrink: 0; /* Never allow user controls to shrink */
        display: flex !important; /* Force display */
    }
}

/* Mobile Navigation Layout */
@media (max-width: 767.98px) {
    body {
        padding-top: 80px;
    }
    
    .header-nav {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        border-top: 3px solid #3498db;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .header-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 0;
        background: none;
        border: none;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: flex-start;
        gap: 0.75rem;
        font-size: 1rem;
        transform: none;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.08);
        transform: none;
    }
    
    .nav-item.active .nav-link {
        background-color: rgba(52, 152, 219, 0.2);
        border-left: 4px solid #3498db;
        box-shadow: none;
    }
    
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .header-user {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 1rem 0;
        margin-top: 1rem;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
        gap: 1rem;
    }
    
    .user-info {
        padding: 0 2rem;
        font-size: 0.9rem;
        text-align: left;
    }
    
    /* Mobile taskbar toggle */
    .form-check {
        padding: 0 2rem;
        margin: 0;
    }
    
    .logout-btn {
        margin: 0 2rem;
        padding: 0.75rem 1rem;
        background-color: rgba(229, 62, 62, 0.8);
        border: 1px solid rgba(229, 62, 62, 0.3);
        border-radius: 8px;
        color: white;
        font-size: 0.9rem;
        display: block;
        text-align: center;
        transform: none;
        box-shadow: none;
    }
    
    .logout-btn:hover {
        background-color: rgba(229, 62, 62, 1);
        transform: none;
        box-shadow: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        gap: 4px;
        transition: all 0.3s ease;
    }
    
    .hamburger-line {
        width: 24px;
        height: 2px;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        transform-origin: center;
    }
    
    .header-nav.active ~ .header-right .mobile-menu-toggle .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .header-nav.active ~ .header-right .mobile-menu-toggle .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .header-nav.active ~ .header-right .mobile-menu-toggle .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Main Container Styling */
.container-fluid {
    background-color: white;
    border-radius: 8px;
    margin-top: 20px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Filter Section Design */
.filter-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}
.filter-section label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Table Improvements */
.table-responsive { 
    max-height: 70vh;
    border-radius: 6px;
    overflow: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    position: relative;
}

/* Enhanced styling for pivot table container */
#pivotTableContainer .table-responsive {
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Pivot Table Container - Enhanced Scrolling */
#pivotTableContainer {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 70vh;
    background: white;
}

/* Custom scrollbar for pivot table */
#pivotTableContainer::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

#pivotTableContainer::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
}

#pivotTableContainer::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-radius: 6px;
    border: 2px solid #f8f9fa;
    transition: background 0.3s ease;
}

#pivotTableContainer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

#pivotTableContainer::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

/* Scroll indicators for pivot table */
#pivotTableContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, rgba(0,123,255,0.3), transparent, rgba(0,123,255,0.3));
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pivotTableContainer:hover::before {
    opacity: 1;
}

/* Horizontal scroll hint */
#pivotTableContainer::after {
    content: '← Scroll horizontally for more aging columns →';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 12px 12px 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pivotTableContainer:hover::after {
    opacity: 1;
}

/* Smooth scrolling behavior for pivot table */
#pivotTableContainer .table-responsive {
    scroll-behavior: smooth;
}

/* Responsive adjustments for pivot table */
@media (max-width: 1200px) {
    #pivotTableContainer::after {
        content: '← Scroll to see all columns →';
    }
}

@media (max-width: 768px) {
    #pivotTableContainer::after {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}
#pivotTable {
    margin-bottom: 0;
    min-width: 1200px;
    width: 100%;
    scroll-behavior: smooth;
}
th, td { 
    white-space: nowrap;
    padding: 0.75rem !important;
}
th.sticky-header {
    position: sticky;
    top: 0;
    background-color: #495057 !important;
    color: white !important;
    z-index: 1001;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid #6c757d;
    border-top: 1px solid #6c757d;
    isolation: isolate;
}

/* Fixed header solution for pivot table in scrollable container */

#pivotTableContainer .table-responsive {
    max-height: 70vh;
    overflow: auto;
    position: relative;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Make the table header sticky within the scrollable container */
#pivotTable {
    position: relative;
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Important: Ensure the table has a defined height context */
#pivotTableContainer .table-responsive {
    contain: layout style;
    isolation: isolate;
}

#pivotTable thead th {
    position: sticky;
    top: 0;
    z-index: 1001;
    background-color: #495057 !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 2px solid #6c757d;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    isolation: isolate;
}

/* Ensure headers have proper background to cover content when scrolling */
#pivotTable th.sticky-header {
    background-color: #495057 !important;
    color: white !important;
}

/* Fix for webkit browsers */
#pivotTable thead {
    position: sticky;
    top: 0;
    z-index: 1001;
}
td.primary-bill-to {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 5;
    font-weight: 600;
    color: #2c3e50;
}
 th.primary-bill-to-header {
    position: sticky;
    left: 0;
    background-color: #495057 !important;
    color: white !important;
    z-index: 15;
}

/* Enhanced clickable elements */
.clickable-contract {
    cursor: pointer;
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}
.clickable-contract:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Clickable aging cells */
.clickable-aging-cell {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.clickable-aging-cell:hover {
    background-color: #e7f3ff;
    color: #0056b3;
    font-weight: 600;
}

/* Professional Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading States */
.spinner-border {
    width: 2rem;
    height: 2rem;
    color: #007bff;
}
#loadingIndicator, #reportingLoadingIndicator, #textToSqlLoadingIndicator {
    background: white;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#loadingIndicator p, #reportingLoadingIndicator p, #textToSqlLoadingIndicator p {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

/* Error States */
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Text-to-SQL Section Styling */
#textToSqlQuerySection {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#textToSqlQuerySection h2 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Invoice ID Links in Text-to-SQL Results */
.table a[href*="/invoice/"] {
    color: #0066cc !important;
    text-decoration: none !important;
    font-weight: 500;
    border-bottom: 1px dotted #0066cc;
    transition: all 0.2s ease;
}

.table a[href*="/invoice/"]:hover {
    color: #004499 !important;
    background-color: rgba(0, 102, 204, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    border-bottom: 1px solid #004499;
}
#naturalLanguageQuery {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
#naturalLanguageQuery:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    font-weight: 500;
    padding: 0.75rem 2rem;
    transition: all 0.2s ease;
}
.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Generated SQL Display */
#generatedSqlDisplay {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}
#generatedSqlDisplay h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}
/* Legacy style - kept for backward compatibility */
#generatedSqlQueryCode {
    display: block;
}

#generatedSqlDisplay pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#generatedSqlDisplay pre code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #d4d4d4;
    background: transparent;
    padding: 0;
    white-space: pre;
    display: block;
}

/* SQL Syntax Highlighting (manual if Prism.js not available) */
#generatedSqlDisplay .sql-keyword {
    color: #569cd6;
    font-weight: bold;
}

#generatedSqlDisplay .sql-function {
    color: #dcdcaa;
}

#generatedSqlDisplay .sql-string {
    color: #ce9178;
}

#generatedSqlDisplay .sql-number {
    color: #b5cea8;
}

#generatedSqlDisplay .sql-comment {
    color: #6a9955;
    font-style: italic;
}

#generatedSqlDisplay .sql-operator {
    color: #d4d4d4;
}

#generatedSqlDisplay .sql-table {
    color: #4ec9b0;
}

#generatedSqlDisplay .sql-column {
    color: #9cdcfe;
}

/* Copy button for SQL code */
#generatedSqlDisplay .copy-sql-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#generatedSqlDisplay .copy-sql-btn:hover {
    opacity: 1;
}

#generatedSqlDisplay .sql-container {
    position: relative;
}

/* Dynamic Results Table - Sticky headers handled in JavaScript */
#dynamicResultsContainer .table {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#dynamicResultsContainer .table tbody tr:hover {
    background-color: #f8f9fa;
}
#dynamicResultsContainer .table tbody td {
    padding: 10px !important;
    font-weight: 400;
}

/* Existing detail row styles */
tr.contract-detail-row td {
    background-color: #f8f9fa;
    padding-left: 25px;
}
tr.contract-detail-row.invoice-sub-header td {
    font-weight: bold;
    background-color: #e9ecef;
    padding-left: 15px;
}
tr.visit-detail-row td:first-child {
    padding-left: 30px;
}
tr.contract-detail-row td.detail-cell-content {
    white-space: normal;
    padding-left: 5px;
}
.clickable-contract.expanded {
    font-weight: bold;
}
tr.visit-detail-header-row th {
    background-color: #e9ecef;
    font-weight: normal;
    font-size: 0.9em;
    padding-left: 5px;
    text-align: left;
}
tr.visit-detail-header-row th:first-child {
    padding-left: 30px;
}
tr.visit-detail-row td {
    font-size: 0.9em;
    background-color: #f8f9fa;
}
.clickable-visit-id {
    cursor: pointer;
    color: #007bff;
    text-decoration: none;
}
.clickable-visit-id:hover {
    text-decoration: underline;
}
.modal-dialog.modal-xl {
    max-width: 90%;
}
.modal-body .table-responsive {
    max-height: 60vh;
}
.visit-details-section {
    margin-bottom: 20px;
}
.visit-details-section h5 {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Modal styles */
.contract-details-modal .modal-dialog {
    max-width: 95%;
}

/* Contract details modal table scrolling */
.contract-details-modal .table-responsive {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    white-space: nowrap;
}

/* Ensure the table doesn't shrink too much */
.contract-details-modal .visits-table {
    min-width: 1400px;
    width: 100%;
}

/* Make sure table cells don't wrap content */
.contract-details-modal .visits-table td,
.contract-details-modal .visits-table th {
    white-space: nowrap;
    vertical-align: middle;
}

/* Sticky table headers for contract details */
.contract-details-modal .visits-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #495057;
    color: white;
}

/* Add subtle shadow to indicate scrollable content */
.contract-details-modal .table-responsive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
    z-index: 5;
}

/* Add horizontal scroll indicators */
.contract-details-modal .table-responsive::after {
    content: '← Scroll horizontally to see all columns →';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.1);
    color: #0056b3;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contract-details-modal .table-responsive:hover::after {
    opacity: 1;
}

/* Enhanced scrollbars for contract table */
.contract-details-modal .table-responsive::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.contract-details-modal .table-responsive::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
}

.contract-details-modal .table-responsive::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 6px;
    border: 2px solid #f8f9fa;
}

.contract-details-modal .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.contract-details-modal .table-responsive::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

/* Smooth scrolling behavior */
.contract-details-modal .table-responsive {
    scroll-behavior: smooth;
}

/* Prediction columns get a bit more spacing in wide view */
@media (min-width: 1400px) {
    .prediction-column {
        min-width: 140px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

.contract-summary-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}
.contract-summary-card h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}
.contract-summary-card .stat-box {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}
.contract-summary-card .stat-box h6 {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #6c757d;
    font-weight: 600;
}
.contract-summary-card .stat-box .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}
.filter-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}
.visits-table {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.visits-table thead {
    background: #495057;
    color: white;
}
.visits-table tbody tr:hover {
    background-color: #f8f9fa;
}
.page-info {
    color: #6c757d;
    font-size: 0.9rem;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
    margin-bottom: 20px;
}

/* Main table design */
#pivotTable {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}
#pivotTable thead {
    background: #495057;
    color: white;
}
#pivotTable tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}
.filter-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #6c757d;
}

/* Table row enhancements */
#pivotTable tbody tr {
    transition: background-color 0.2s ease;
}
#pivotTable tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.02);
}
#pivotTable tfoot tr {
    background-color: #495057;
    color: white;
    font-weight: 600;
}

/* Modal enhancements */
.modal-header {
    background-color: #495057;
    color: white;
    border-bottom: none;
}
.modal-header .btn-close {
    filter: brightness(0) invert(1);
}
.modal-title {
    font-weight: 600;
}

/* Subtle animations - Modified to not break sticky positioning */
.container-fluid {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Professional scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Visit Notes Styles */
.note-card {
    border-left: 4px solid #007bff;
    margin-bottom: 15px;
    transition: box-shadow 0.2s ease;
}
.note-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.note-card.priority-high {
    border-left-color: #dc3545;
}
.note-card.priority-medium {
    border-left-color: #ffc107;
}
.note-card.priority-low {
    border-left-color: #28a745;
}
.note-metadata {
    font-size: 0.85rem;
    color: #6c757d;
}
.note-category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background-color: #e9ecef;
    color: #495057;
    display: inline-block;
    margin-right: 0.5rem;
}
.note-text {
    color: #495057;
    margin-bottom: 0.5rem;
}

.note-follow-up-date {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #0056b3;
}

.note-follow-up-date i {
    font-size: 1rem;
}

.note-follow-up-date.overdue {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.note-follow-up-date.upcoming {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

#visitNotesContent {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Enhanced Modal Styles for Desktop Experience */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important; /* Darker backdrop */
    backdrop-filter: blur(2px); /* Subtle blur effect */
}

/* Modal minimized state */
.modal-dialog.minimized {
    display: none !important;
}

/* Adjust body padding to account for taskbar */
body.taskbar-visible {
    padding-bottom: 48px;
}

/* Taskbar System Styles */
.modal-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1055;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

.taskbar-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 12px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    max-width: 200px;
    overflow: hidden;
}

.taskbar-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.taskbar-tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-tab-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.taskbar-tab-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Draggable Modal Styles */
.modal-dialog.draggable {
    margin: 0;
    position: absolute;
    cursor: move;
}

.modal-dialog.draggable.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
}

.modal-dialog.draggable.maximized .modal-content {
    height: 100vh;
    border-radius: 0;
}

.modal-dialog.minimized {
    display: none !important;
}

.draggable-handle {
    cursor: move;
    user-select: none;
}

.modal.dragging {
    user-select: none;
}

/* Window Controls */
.window-controls {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.window-control-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.window-control-btn:hover {
    transform: scale(1.1);
}

.window-control-minimize {
    background-color: #ffc107;
    color: #000;
}

.window-control-maximize {
    background-color: #28a745;
    color: #fff;
}

.window-control-close {
    background-color: #dc3545;
    color: #fff;
}

/* Enhanced contract details modal styles */
.filter-controls {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.advanced-filters {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

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

.advanced-filters .form-label {
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.advanced-filters .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

#toggleAdvancedFilters {
    transition: all 0.2s ease;
}

#toggleAdvancedFilters:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

#toggleAdvancedFilters.active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.filter-controls .form-select-sm,
.filter-controls .form-control-sm {
    font-size: 0.875rem;
}

/* Active filter indicator */
.filter-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #0d6efd;
    color: white;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.note-metadata .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
}

.note-metadata .badge.bg-secondary {
    background-color: #6c757d !important;
}

.note-metadata .badge i {
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

/* Clickable invoice badge styles */
.invoice-filter-link {
    cursor: pointer;
    transition: all 0.2s ease;
}

.invoice-filter-link:hover {
    background-color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.invoice-filter-link:active {
    transform: translateY(0);
}

/* Search highlighting */
.search-highlight {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Search results styling */
.search-container {
    position: relative;
}

.search-results-info {
    margin-top: 0.5rem;
}

.search-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-pagination-controls .page-info {
    font-size: 0.875rem;
    color: #64748b;
}

/* Field Match Bubbles */
.field-match-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.field-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.field-bubble.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.field-bubble.inactive {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
    opacity: 0.6;
}

.field-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.field-bubble.active:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.field-bubble.inactive:hover {
    background-color: #5c636a;
    border-color: #5c636a;
    opacity: 0.8;
}

.field-bubble-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.field-bubble-remove {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.field-bubble-remove:hover {
    color: white;
}

/* Sortable Table Headers */
.sortable-header {
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}

.sortable-header:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    color: #0056b3;
}

.sort-indicator {
    margin-left: 8px;
    font-size: 0.8em;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.sortable-header:hover .sort-indicator {
    opacity: 1;
}

.sort-indicator.sort-asc,
.sort-indicator.sort-desc {
    opacity: 1;
    color: #0d6efd;
    font-weight: bold;
}

/* Multi-column sort order indicator */
.sort-order {
    font-size: 0.7em;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    font-weight: bold;
    vertical-align: top;
}

/* Search results table specific styles */
#searchResultsTable .sortable-header {
    background: #495057;
    color: white;
}

#searchResultsTable .sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Sticky header for search results table - stronger specificity */
#searchResultsTable thead th.sortable-header,
#searchResultsTable thead th {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    background-color: #495057 !important;
    background: #495057 !important;
    color: white !important;
    border-bottom: 2px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    /* Ensure no transforms are breaking sticky */
    transform: none !important;
}

/* Ensure search results table container allows scrolling */
#searchResultsTable {
    margin-bottom: 0;
}

/* Override default table-responsive for search results to enable sticky headers */
#searchResultsTable.table {
    margin-bottom: 0;
}

/* Make search results container scrollable with sticky headers */
#searchResultsTable.table-bordered {
    /* Ensure the table itself doesn't have margin issues */
    margin-bottom: 0;
}

/* Target the specific table-responsive div that contains searchResultsTable */
/* Since there are multiple .table-responsive divs, we'll add a specific class via JS or use nth-child */
.table-responsive {
    /* Apply to all table-responsive containers for consistency */
    max-height: 70vh;
    overflow-y: auto;
    /* Ensure sticky positioning works within this container */
    position: relative !important;
    /* Remove any transforms that might break sticky */
    transform: none !important;
}

/* Specific container for search results with sticky headers */
#searchResultsTable.table {
    /* Ensure the table doesn't have conflicting positioning */
    position: relative !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Override for pivot table to keep its existing behavior */
#pivotTableContainer .table-responsive {
    max-height: none;
    overflow-y: visible;
}

/* Export button styling */
#exportPivotTableBtn {
    transition: all 0.2s ease;
}

#exportPivotTableBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* AI Prediction Columns Styling */
.prediction-column {
    background-color: rgba(108, 117, 125, 0.05);
    border-left: 2px solid rgba(108, 117, 125, 0.2);
    text-align: center;
    min-width: 120px;
    max-width: 160px;
    width: 140px;
    padding: 8px 6px;
}

.prediction-column::before {
    content: "🤖";
    margin-right: 5px;
    opacity: 0.6;
}

.prediction-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    cursor: help;
    max-width: 100%;
    justify-content: center;
}

.prediction-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.prediction-badge i {
    font-size: 0.8rem;
}

/* Issue Type Prediction Colors */
.prediction-badge.auth-issue {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    color: #212529;
}

.prediction-badge.rate-issue {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
}

.prediction-badge.claim-issue {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.prediction-badge.location-issue {
    background: linear-gradient(135deg, #6c757d 0%, #95a5a6 100%);
    color: white;
}

.prediction-badge.payment-issue {
    background: linear-gradient(135deg, #007bff 0%, #3498db 100%);
    color: white;
}

.prediction-badge.eligibility-issue {
    background: linear-gradient(135deg, #343a40 0%, #2c3e50 100%);
    color: white;
}

/* Priority Level Prediction Colors */
.prediction-badge.priority-high {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    animation: subtle-pulse 2s infinite;
}

.prediction-badge.priority-medium {
    background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
    color: #212529;
}

.prediction-badge.priority-low {
    background: linear-gradient(135deg, #28a745 0%, #27ae60 100%);
    color: white;
}

/* Status Prediction Colors */
.prediction-badge.status-resolved {
    background: linear-gradient(135deg, #28a745 0%, #2ecc71 100%);
    color: white;
}

.prediction-badge.status-in-progress {
    background: linear-gradient(135deg, #007bff 0%, #3498db 100%);
    color: white;
}

.prediction-badge.status-pending {
    background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
    color: #212529;
}

.prediction-badge.status-stuck {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.prediction-badge.no-prediction {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border: 1px dashed #dee2e6;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Responsive adjustments for prediction columns */
@media (max-width: 1200px) {
    .prediction-column {
        min-width: 100px;
        font-size: 0.85rem;
    }
    
    .prediction-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Prediction confidence indicator */
.prediction-confidence-high {
    border-left: 3px solid #28a745;
}

.prediction-confidence-medium {
    border-left: 3px solid #ffc107;
}

.prediction-confidence-low {
    border-left: 3px solid #dc3545;
}

/* User Management Contract Display */
.contract-list {
    position: relative;
    transition: all 0.3s ease;
}

.contract-list:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contract-list .badge {
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.contract-list .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.contract-list::-webkit-scrollbar {
    width: 4px;
}

.contract-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.contract-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.contract-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* User Management Table Enhancements */
#usersTable .table {
    border-collapse: separate;
    border-spacing: 0;
}

#usersTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

#usersTable td {
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

#usersTable tr:hover {
    background-color: #f8f9fa;
}

.user-contracts-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-contracts-header i {
    font-size: 1rem;
}

.user-contracts-count {
    font-weight: 600;
    color: #495057;
}

/* Multi-Select Filter Styling */
select[multiple] {
    min-height: 100px;
    max-height: 120px;
    overflow-y: auto;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

select[multiple]:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Compact multi-select for small screens */
@media (max-width: 768px) {
    select[multiple] {
        min-height: 80px;
        max-height: 100px;
    }
}

/* Multi-select options styling */
select[multiple] option {
    padding: 4px 8px;
    border-radius: 2px;
    margin: 1px;
    transition: background-color 0.2s ease;
}

select[multiple] option:checked {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    font-weight: 500;
}

select[multiple] option:hover {
    background-color: #e9ecef;
}

select[multiple] option:checked:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Multi-select scrollbar */
select[multiple]::-webkit-scrollbar {
    width: 6px;
}

select[multiple]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

select[multiple]::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

select[multiple]::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Contract Modal Multi-Select Enhancements */
.contract-details-modal select[multiple] {
    min-height: 80px;
    max-height: 100px;
    position: relative;
}

.contract-details-modal select[multiple]::after {
    content: '⌃⌄ Multi-select';
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.6rem;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
}

/* Unassigned Contracts Section */
#unassignedContractsTable .table-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
}

#unassignedContractsTable .table-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
}

#unassignedContractsTable .table-danger td,
#unassignedContractsTable .table-warning td {
    border-left: none;
}

#unassignedContractsTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ERemittance Tab Styling Fix */
#eremittanceViewTabs .nav-link {
    color: #495057 !important;
    background: transparent !important;
    border: 1px solid #dee2e6 !important;
    border-bottom: none !important;
    padding: 0.75rem 1rem !important;
    margin-right: 2px;
    border-radius: 0.375rem 0.375rem 0 0 !important;
    transform: none !important;
    position: relative;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

#eremittanceViewTabs .nav-link:hover {
    color: #0056b3 !important;
    background: #f8f9fa !important;
    transform: none !important;
    border-color: #dee2e6 #dee2e6 #f8f9fa !important;
}

#eremittanceViewTabs .nav-link.active {
    color: #495057 !important;
    background: #fff !important;
    border-color: #dee2e6 #dee2e6 #fff !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

#eremittanceViewTabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
}

/* Ensure ERemittance tabs are always visible */
#eremittanceViewTabs .nav-item {
    position: static !important;
}

#eremittanceViewTabs .nav-link i {
    font-size: 1rem !important;
    margin-right: 0.5rem !important;
}

/* Reporting Tab Styling Fix - Same approach as ERemittance tabs */
#reportingTabs .nav-link {
    color: #495057 !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-bottom: none !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.25rem 0.25rem 0 0 !important;
    margin-right: 0.25rem !important;
    font-weight: 400 !important;
    position: relative;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

#reportingTabs .nav-link:hover {
    color: #0056b3 !important;
    background: #e9ecef !important;
    transform: none !important;
    border-color: #dee2e6 #dee2e6 #e9ecef !important;
}

#reportingTabs .nav-link.active {
    color: #0056b3 !important;
    background: #fff !important;
    border-color: #dee2e6 #dee2e6 #fff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

#reportingTabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
}

/* Ensure Reporting tabs are always visible */
#reportingTabs .nav-item {
    position: static !important;
}

#reportingTabs .nav-link i {
    font-size: 1rem !important;
    margin-right: 0.5rem !important;
}

#unassignedContractsContainer {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#unassignedContractsContainer::-webkit-scrollbar {
    width: 8px;
}

#unassignedContractsContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#unassignedContractsContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#unassignedContractsContainer::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.contract-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.contract-summary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Assignment modal enhancements */
#assignContractModal .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

#assignContractModal .modal-header .btn-close {
    filter: invert(1);
}

/* Urgency indicators */
.urgency-high {
    animation: subtle-pulse 2s infinite;
}

@keyframes subtle-pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.8; 
    }
}

/* AR Visit Details Modal Styles */
.ar-visit-details .field-group {
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
}

.ar-visit-details .field-group:hover {
    background-color: #e9ecef;
    border-left-color: #007bff;
}

.field-with-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-with-copy span {
    flex-grow: 1;
    margin-right: 8px;
    word-break: break-word;
}

.copy-btn {
    min-width: 32px;
    height: 28px;
    padding: 2px 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notes-content {
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.ar-visit-details label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
    font-size: 13px;
}

.ar-visit-details h5 {
    color: #007bff;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.ar-visit-details h6 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .field-with-copy {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .field-with-copy span {
        margin-bottom: 4px;
        margin-right: 0;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
}

/* ================================
   Autocomplete Dropdown Styles
   ================================ */

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
}

.autocomplete-header {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.875rem;
}

.autocomplete-header i {
    color: #6c757d;
    margin-right: 0.25rem;
}

.autocomplete-results {
    max-height: 250px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 0;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s ease;
    word-wrap: break-word;
    position: relative;
    display: flex;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #f8f9fa;
}

.autocomplete-item.selected {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.autocomplete-item-content {
    flex: 1;
    padding: 0.75rem;
    cursor: pointer;
}

.autocomplete-item-text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #495057;
    margin-bottom: 0.25rem;
}

.autocomplete-item-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-delete-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autocomplete-delete-btn:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.autocomplete-delete-btn i {
    font-size: 1rem;
}

.autocomplete-usage-count {
    background: #e9ecef;
    color: #495057;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.autocomplete-last-used {
    font-style: italic;
}

.autocomplete-keyboard-hint {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
}

.autocomplete-keyboard-hint kbd {
    background: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    color: #495057;
}

/* Smooth scrollbar for autocomplete */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 200px;
    }
    
    .autocomplete-results {
        max-height: 150px;
    }
    
    .autocomplete-item-content {
        padding: 0.5rem;
    }
    
    .autocomplete-item-text {
        font-size: 0.8rem;
    }
    
    .autocomplete-item-meta {
        font-size: 0.7rem;
    }
    
    .autocomplete-delete-btn {
        padding: 0.5rem;
    }
}

/* Visit Details Container with Sidebar Layout */
.visit-details-container {
    height: 70vh;
    max-height: 70vh;
}

.ar-visit-details {
    overflow-y: auto;
    padding-right: 15px;
}

/* Visit Notes Sidebar - Microsoft Teams Style */
.visit-notes-sidebar {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notes-sidebar-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.notes-sidebar-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.notes-sidebar-header i {
    color: #6c757d;
    margin-right: 8px;
}

.visit-notes-sidebar form {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    background-color: white;
    margin: 0;
}

.visit-notes-sidebar textarea {
    resize: vertical;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.visit-notes-sidebar textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.visit-notes-sidebar label {
    color: #495057 !important;
    font-weight: 500;
    font-size: 0.9rem;
}

.visit-notes-sidebar .form-check-label {
    color: #495057 !important;
    font-size: 0.85rem;
    line-height: 1.4;
}

.visit-notes-sidebar .form-control,
.visit-notes-sidebar .form-select {
    font-size: 0.9rem;
    color: #495057 !important;
}

.visit-notes-sidebar .form-check-input {
    margin-top: 0.125rem;
}

/* Invoice-level note styling */
.visit-notes-sidebar .note-card.invoice-level-note {
    border-left: 4px solid #0dcaf0;
    background-color: #f8fdff;
}

.visit-notes-sidebar .badge.bg-info {
    background-color: #0dcaf0 !important;
    color: white;
    font-size: 0.7rem;
}

.notes-list {
    flex: 1;
    padding: 16px;
    background-color: white;
    border-radius: 0 0 8px 8px;
}

.notes-list .note-card {
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
}

.notes-list .note-card:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .visit-notes-sidebar {
        width: 30% !important;
        min-width: 280px;
    }
}

@media (max-width: 992px) {
    .visit-details-container {
        flex-direction: column;
        height: auto;
        max-height: none;
    }
    
    .visit-notes-sidebar {
        width: 100% !important;
        max-width: none;
        margin-top: 20px;
    }
    
    .ar-visit-details {
        padding-right: 0;
    }
}

/* User Profile Prompt Styles */
.prompt-text {
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 600px;
    display: block;
    line-height: 1.5;
}

/* Ensure the prompts table has proper layout */
#profilePromptsTable {
    table-layout: fixed;
    width: 100%;
}

#profilePromptsTable th:first-child,
#profilePromptsTable td:first-child {
    width: 50px;
}

#profilePromptsTable th:nth-child(2),
#profilePromptsTable td:nth-child(2) {
    width: 60%;
    overflow-wrap: break-word;
}

#profilePromptsTable th:nth-child(3),
#profilePromptsTable td:nth-child(3) {
    width: 15%;
    text-align: center;
}

#profilePromptsTable th:last-child,
#profilePromptsTable td:last-child {
    width: 25%;
    text-align: right;
}

/* ============================================
   PRINT STYLES - Contract Performance Analysis
   ============================================ */
@media print {
    /* Set up portrait orientation for data tables */
    @page {
        size: portrait;
        margin: 0.75in;
    }
    
    /* Reset margins and remove backgrounds */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        padding-top: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    /* Ensure main content starts at top */
    .container,
    .container-fluid,
    main,
    .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Hide navigation and non-essential elements */
    .navbar,
    .navbar-brand,
    .nav-tabs,
    .btn,
    button,
    .pagination,
    .search-controls,
    .alert,
    #toggleContractSqlButton,
    .card-header .btn,
    .export-btn,
    #contractSqlQuerySection,
    header,
    .header,
    .page-header,
    .main-header,
    #header,
    body > nav,
    body > header {
        display: none !important;
    }
    
    /* Contract Analysis - start at top of page */
    #contractAnalysisSection {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        top: 0 !important;
    }
    
    /* Hide title and description to prevent overlap */
    #contractAnalysisSection h2,
    #contractAnalysisSection .text-muted {
        display: none !important;
    }
    
    /* Hide chart container completely from print */
    #contractChartContainer,
    .card:has(#contractPerformanceChart),
    .card:has(canvas#contractPerformanceChart) {
        display: none !important;
    }
    
    /* Summary cards - start on page 1 with clean top spacing */
    #contractSummaryCards {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15pt !important;
        margin-top: 0 !important;
        margin-bottom: 30pt !important;
        padding-top: 0 !important;
        page-break-after: avoid !important;
    }
    
    #contractSummaryCards .card {
        flex: 1 1 45% !important;
        min-width: 200pt !important;
        border: 1pt solid #ccc !important;
        border-radius: 4pt !important;
        padding: 12pt !important;
        margin: 0 !important;
        background: white !important;
        page-break-inside: avoid;
    }
    
    #contractSummaryCards .card-body {
        padding: 8pt !important;
    }
    
    #contractSummaryCards .card-title {
        display: block !important;
        font-size: 11pt !important;
        font-weight: bold !important;
        margin-bottom: 8pt !important;
        color: #333 !important;
    }
    
    #contractSummaryCards .display-6 {
        display: block !important;
        font-size: 16pt !important;
        font-weight: bold !important;
        color: #333 !important;
    }
    
    /* Ensure summary card content is visible */
    #contractSummaryCards .card-body h5,
    #contractSummaryCards .card-body .card-title,
    #contractSummaryCards .card-body .display-6,
    #contractSummaryCards h5,
    #contractSummaryCards .h5 {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Tables - optimize for print */
    .card {
        border: 1pt solid #ccc !important;
        border-radius: 4pt !important;
        margin-bottom: 20pt !important;
        page-break-inside: avoid;
        background: white !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        border-bottom: 1pt solid #ccc !important;
        padding: 10pt !important;
        font-weight: bold !important;
        font-size: 12pt !important;
    }
    
    .card-body {
        padding: 10pt !important;
    }
    
    /* Table styles */
    .table {
        font-size: 9pt !important;
        border-collapse: collapse !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .table th,
    .table td {
        border: 1pt solid #ccc !important;
        padding: 5pt 7pt !important;
        text-align: left;
        vertical-align: top;
    }
    
    .table th {
        background: #f8f9fa !important;
        font-weight: bold !important;
        font-size: 9pt !important;
    }
    
    .table-striped tbody tr:nth-of-type(odd) {
        background: #f9f9f9 !important;
    }
    
    /* Role badges */
    .badge {
        border: 1pt solid #666 !important;
        padding: 2pt 4pt !important;
        font-size: 8pt !important;
        border-radius: 2pt !important;
        background: white !important;
        color: #333 !important;
    }
    
    /* Currency and percentage formatting */
    .text-success,
    .text-warning,
    .text-danger {
        color: #333 !important;
        font-weight: bold !important;
    }
    
    /* Contract details table */
    #contractDetailsTable {
        font-size: 8.5pt !important;
    }
    
    #contractDetailsTable th,
    #contractDetailsTable td {
        padding: 4pt 6pt !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Contract rep assignments table */
    #contractRepTable {
        font-size: 8.5pt !important;
    }
    
    #contractRepTable th:first-child,
    #contractRepTable td:first-child {
        max-width: 150pt;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* ============================================
       PRINT STYLES - Reporting Rep View  
       ============================================ */
    
    /* Apply same print styles to reporting section */
    #reportingSection {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        top: 0 !important;
    }
    
    /* Hide chart container from print in reporting view */
    #repPerformanceChartContainer,
    .card:has(#repPerformanceChart),
    .card:has(canvas#repPerformanceChart) {
        display: none !important;
    }
    
    /* Hide SQL query section in reporting */
    #sqlQuerySection {
        display: none !important;
    }
    
    /* Rep summary cards - same styling as contract analysis */
    #repSummaryCardsContainer {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15pt !important;
        margin-bottom: 30pt !important;
        page-break-after: avoid !important;
    }
    
    #repSummaryCardsContainer .card {
        flex: 1 1 45% !important;
        min-width: 200pt !important;
        border: 1pt solid #ccc !important;
        border-radius: 4pt !important;
        padding: 12pt !important;
        margin: 0 !important;
        background: white !important;
        page-break-inside: avoid;
    }
    
    #repSummaryCardsContainer .card-body {
        padding: 8pt !important;
    }
    
    #repSummaryCardsContainer .card-title {
        display: block !important;
        font-size: 11pt !important;
        font-weight: bold !important;
        margin-bottom: 8pt !important;
        color: #333 !important;
    }
    
    #repSummaryCardsContainer .display-6 {
        display: block !important;
        font-size: 16pt !important;
        font-weight: bold !important;
        color: #333 !important;
    }
    
    /* Ensure rep summary card content is visible */
    #repSummaryCardsContainer .card-body h5,
    #repSummaryCardsContainer .card-body .card-title,
    #repSummaryCardsContainer .card-body .display-6,
    #repSummaryCardsContainer h5,
    #repSummaryCardsContainer .h5 {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Hide rep selection controls from print */
    .row.mb-3.align-items-end {
        display: none !important;
    }
}

/* ================================
   Invoice Explorer Styles
   ================================ */

/* Invoice Timeline Styling */
.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #007bff, #28a745, #ffc107, #dc3545);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 3px solid #007bff;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.3);
}

.timeline-item.system::before {
    background: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.3);
}

.timeline-item.visit_system::before {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40,167,69,0.3);
}

.timeline-item.user_input::before {
    background: #ffc107;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.3);
}

.timeline-item.remittance_system::before {
    background: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.3);
}

.timeline-event-type {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.timeline-event-date {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.timeline-event-details {
    color: #212529;
    line-height: 1.5;
    margin-top: 8px;
}

/* Invoice Metrics Cards */
.invoice-metric-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.invoice-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.invoice-metric-card .card-body {
    padding: 1.5rem;
}

.invoice-metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.invoice-metric-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-metric-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 8px;
    display: inline-block;
}

.trend-positive {
    background: rgba(40,167,69,0.1);
    color: #28a745;
}

.trend-negative {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
}

.trend-neutral {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-paid {
    background: rgba(40,167,69,0.1);
    color: #28a745;
    border: 1px solid rgba(40,167,69,0.3);
}

.status-pending {
    background: rgba(255,193,7,0.1);
    color: #ffc107;
    border: 1px solid rgba(255,193,7,0.3);
}

.status-overdue {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
    border: 1px solid rgba(220,53,69,0.3);
}

.status-rejected {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
    border: 1px solid rgba(108,117,125,0.3);
}

/* Data Tables in Invoice Explorer */
.invoice-data-table {
    margin-bottom: 0;
}

.invoice-data-table th {
    background: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    padding: 12px 15px;
}

.invoice-data-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.invoice-data-table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* Invoice Info Cards */
.invoice-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.invoice-info-item:last-child {
    border-bottom: none;
}

.invoice-info-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.875rem;
}

.invoice-info-value {
    font-weight: 600;
    color: #212529;
    text-align: right;
}

/* Notes Display */
.note-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.note-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-author {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.note-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.note-text {
    color: #212529;
    line-height: 1.5;
    margin-bottom: 0;
}

.note-priority-high {
    border-left-color: #dc3545;
}

.note-priority-medium {
    border-left-color: #ffc107;
}

.note-priority-low {
    border-left-color: #28a745;
}

/* Predictions Display */
.prediction-item {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(156,39,176,0.2);
    position: relative;
    overflow: hidden;
}

.prediction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9c27b0 0%, #2196f3 100%);
}

.prediction-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.prediction-type {
    font-weight: 700;
    color: #7b1fa2;
    font-size: 1rem;
}

.prediction-confidence {
    background: rgba(156,39,176,0.1);
    color: #7b1fa2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.prediction-details {
    color: #424242;
    line-height: 1.5;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container {
        padding-left: 20px;
    }
    
    .timeline-container::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: -13px;
    }
    
    .invoice-metric-card .card-body {
        padding: 1rem;
    }
    
    .invoice-metric-value {
        font-size: 1.5rem;
    }
}

/* ============================================================================ */
/* INVOICE EXPLORER STYLES */
/* ============================================================================ */

/* Invoice Explorer Main Container */
.invoice-explorer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.invoice-explorer-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Section */
.invoice-explorer-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.invoice-explorer-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerShimmer 8s infinite linear;
}

@keyframes headerShimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.invoice-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.invoice-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Action Buttons */
.invoice-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-invoice-action {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-invoice-action:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Invoice Explorer Button Group - Simple and Always Visible */
#invoiceExplorerTabs {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#invoiceExplorerTabs button {
    font-weight: 600;
    padding: 10px 20px;
    margin: 0 5px;
    transition: all 0.2s ease;
}

#invoiceExplorerTabs button i {
    margin-right: 5px;
}

/* Responsive button group for mobile */
@media (max-width: 768px) {
    #invoiceExplorerTabs {
        padding: 10px 5px;
    }
    
    #invoiceExplorerTabs button {
        padding: 8px 10px;
        margin: 2px;
        font-size: 0.85rem;
    }
    
    #invoiceExplorerTabs button i {
        display: none; /* Hide icons on mobile to save space */
    }
}

/* Tab Content */
.tab-content {
    padding: 30px;
}

/* Overview Cards */
.overview-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.overview-card h5 {
    color: #495057;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.overview-card h5 i {
    margin-right: 10px;
    color: #007bff;
}

/* Financial Metrics */
.financial-metric {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.financial-metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.financial-metric h6 {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.financial-metric .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 5px;
}

.financial-metric.positive .value {
    color: #28a745;
}

.financial-metric.negative .value {
    color: #dc3545;
}

.financial-metric.warning .value {
    color: #ffc107;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 20px 0;
    margin: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #007bff, #28a745, #ffc107, #dc3545);
    border-radius: 2px;
}

.timeline-event {
    position: relative;
    margin-left: 70px;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.timeline-event:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.timeline-marker {
    position: absolute;
    left: -45px;
    top: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0,123,255,0.3);
    z-index: 10;
}

.timeline-date {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-title {
    color: #495057;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-description {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Payment Cards */
.payment-stat-card {
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.payment-stat-card:hover {
    transform: translateY(-5px);
}

.payment-stat-card h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.payment-stat-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Notes Section */
.notes-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.note-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Insights Section */
.insights-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(0,0,0,0.05);
}

.insight-metric {
    text-align: center;
    padding: 15px;
}

.insight-metric h6 {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(0,0,0,0.05);
    display: inline-block;
    min-width: 120px;
}

/* Loading and Error States */
.invoice-explorer-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Invoice Explorer */
@media (max-width: 768px) {
    .invoice-explorer-header {
        text-align: center;
        padding: 20px 15px;
    }
    
    .invoice-title {
        font-size: 2rem;
    }
    
    .invoice-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-invoice-action {
        margin-bottom: 10px;
    }
    
    .timeline-event {
        margin-left: 40px;
        padding: 15px;
    }
    
    .timeline-container::before {
        left: 15px;
    }
    
    .timeline-marker {
        left: -5px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .nav-tabs.invoice-tabs {
        margin: 10px;
        padding: 3px;
    }
    
    .nav-tabs.invoice-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Print Styles for Invoice Explorer */
@media print {
    /* Hide non-essential elements when printing */
    .navbar, 
    .nav-tabs,
    .invoice-actions,
    .tab-pane:not(.active),
    #invoice-explorer-loading,
    #invoice-explorer-error {
        display: none !important;
    }
    
    /* Ensure content displays properly */
    .invoice-explorer {
        display: block !important;
        background: white !important;
        padding: 0 !important;
        min-height: auto !important;
    }
    
    .tab-content,
    .tab-pane.active {
        display: block !important;
    }
    
    /* Optimize layout for print */
    .container-fluid {
        padding: 0;
        margin: 0;
    }
    
    .invoice-explorer-content {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
    }
    
    .invoice-explorer-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #000;
        padding: 20px 0;
    }
    
    .invoice-explorer-header::before {
        display: none;
    }
    
    /* Print-friendly colors */
    .bg-primary, .bg-success, .bg-danger, .bg-warning, .bg-info {
        background-color: #f8f9fa !important;
        color: #212529 !important;
        border: 1px solid #dee2e6 !important;
    }
    
    /* Timeline adjustments for print */
    .timeline-container::before {
        background: #000 !important;
    }
    
    .timeline-marker {
        background-color: #fff !important;
        border: 2px solid #000 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
    .timeline-event {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 15px;
    }
    
    /* Cards and sections */
    .overview-card,
    .payment-stat-card,
    .financial-metric,
    .note-item {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }
    
    /* Ensure readability */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Page break control */
    .overview-section,
    .timeline-section,
    .visits-section,
    .payments-section,
    .notes-section,
    .insights-section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    /* Print header */
    .invoice-explorer::before {
        content: "Invoice Intelligence Report - Generated on " attr(data-print-date);
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #666;
        margin-bottom: 20px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }
}

/* Activity Feed Styling */
.feed-item {
    transition: box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

.feed-item:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    border-color: #dee2e6;
}

.feed-item .card-body {
    padding: 1rem;
}

.feed-item .badge {
    font-size: 0.7rem;
}

.feed-item a[href*="/invoice/"] {
    color: #0066cc !important;
    font-weight: 500;
    text-decoration: none !important;
    border-bottom: 1px dotted #0066cc;
    transition: all 0.2s ease;
}

.feed-item a[href*="/invoice/"]:hover {
    color: #004499 !important;
    border-bottom-color: #004499;
    background-color: rgba(0, 102, 204, 0.05);
    padding: 1px 2px;
    border-radius: 2px;
}

