/* Import Open Iconic icons */
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Text Wrapping Styles */
.text-wrap {
    white-space: normal !important;
    word-wrap: break-word;
    max-width: 300px;
}

.table td {
    white-space: normal !important;
    word-wrap: break-word;
}

.table th {
    white-space: normal !important;
    word-wrap: break-word;
}

/* IE Compatibility Fixes for Open Iconic font */
@font-face {
    font-family: 'Open Iconic';
    src: url('/open-iconic/font/fonts/open-iconic.eot');
    src: url('/open-iconic/font/fonts/open-iconic.eot?#iefix') format('embedded-opentype'), url('/open-iconic/font/fonts/open-iconic.woff') format('woff'), url('/open-iconic/font/fonts/open-iconic.ttf') format('truetype'), url('/open-iconic/font/fonts/open-iconic.otf') format('opentype'), url('/open-iconic/font/fonts/open-iconic.svg#open-iconic') format('svg');
}

/* Global styles */
* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* iOS safe-area support */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Apply safe-area padding to body on iOS devices */
@supports (padding: max(0px)) {
    body {
        padding-top: max(0px, var(--safe-top));
        padding-bottom: max(0px, var(--safe-bottom));
    }
}

/* Navbar z-index - Bootstrap default for fixed navbar */
.navbar {
    z-index: 1030; /* Bootstrap default for fixed navbar */
}

/* Offcanvas z-index values */
.offcanvas {
    z-index: 1045;
}

.offcanvas-backdrop {
    z-index: 1040;
}

/* Apply extra top padding to fixed/sticky navbars so clickable area is below status bar */
@supports (padding: max(0px)) {
    .top-row {
        padding-top: max(0px, var(--safe-top));
    }
    
    .sidebar {
        padding-top: max(0px, var(--safe-top));
    }
    
    .toggle-btn {
        top: max(10px, calc(10px + var(--safe-top)));
    }
    
    .navbar,
    .navbar-toggler,
    .navbar-collapse {
        padding-top: max(0px, var(--safe-top));
    }
    
    /* For any element with position fixed or sticky at the top */
    [class*="navbar"],
    .offcanvas-header,
    .offcanvas.show {
        padding-top: max(0px, var(--safe-top));
    }
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #000;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

thead th {
    background-color: #f9f9f9;
    font-weight: bold;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
    margin-top: 10px;
}

.content {
    padding-top: 1.1rem;
}

/* Validation styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid, .validation-message {
    color: red;
}

.validation-message {
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Modal styling */
.modal {
    background-color: rgba(0, 0, 0, 0.8); /* Slightly darker overlay */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white !important; /* Solid white background */
    color: #333; /* Ensure text visibility */
    border-radius: 10px; /* Rounded corners */
    padding: 20px; /* Add padding */
    max-width: 90%; /* Adjust maximum width */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Add shadow */
    margin: auto; /* Center content */
    opacity: 1 !important; /* Remove transparency */
}

.modal-lg {
    max-width: 70% !important; /* Ensure large modal width */
}

.custom-modal .modal-content {
    width: 100%;
    background-color: white !important; /* Solid background */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* Shadow effect */
}

/* Adjust modal for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }
}

/* Table responsiveness */
.table-responsive {
    width: 100%;
    overflow: visible !important;
}

/* Status styling */
.status-original {
    color: black;
    font-weight: bold;
}

.status-confirmed {
    color: blue;
    font-weight: bold;
}

.status-waiting-for-buyer,
.status-waiting-for-seller {
    color: orange;
}

.status-completed {
    color: green;
    font-weight: bold;
}

.status-cancelled {
    color: lightblue;
}

.status-default {
    color: gray;
    font-weight: bold;
}

/* Pending action message styling */
.pending-action-warning {
    color: #d9534f;
    font-weight: bold;
}

.pending-action-info {
    color: #5bc0de;
    font-weight: bold;
}

.pending-action-complete {
    color: #5cb85c;
    font-weight: bold;
}

.pending-action-cancelled {
    color: #777;
    font-weight: bold;
}

/* Button styles */
button, .add-button, .submit-button, .remove-button {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

    button:hover, .add-button:hover, .submit-button:hover, .remove-button:hover {
        background-color: #e0e0e0;
    }

/* Form container and section styles */
.form-container {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.input-box {
    height: 36px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

    .input-box[readonly], .input-box:disabled {
        border: none;
        background-color: transparent;
        box-shadow: none;
        color: #000;
    }

/* Sidebar Styling */

/* Sidebar Navigation Link Styling */
.nav-link-onlyforNavBar {
    color: #fff; /* White text, matching Chrome */
    text-decoration: none;
    display: flex; /* Use flexbox for modern alignment, matching Chrome */
    align-items: center; /* Vertically center icons and text, matching Chrome */
    padding: 10px 15px; /* Consistent padding, matching Chrome */
    font-size: 14px; /* Consistent font size, matching Chrome */
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transitions, matching Chrome */
    /* IE Fallbacks */
    display: block !important; /* Fallback for IE if flexbox fails */
    table-layout: fixed; /* IE layout fallback */
    zoom: 1; /* Trigger hasLayout for IE */
    background: #1A073D; /* IE gradient fallback */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1A073D', endColorstr='#1A073D');
}

    .nav-link-onlyforNavBar:hover {
        background-color: #0056b3; /* Darker blue on hover, matching Chrome */
        color: #fff; /* Keep white text on hover, matching Chrome */
        text-decoration: none;
        /* IE Fallback */
        background: #0056b3 !important; /* Ensure IE applies the same hover color */
        filter: alpha(opacity=90); /* IE opacity fallback */
    }

    .nav-link-onlyforNavBar.active {
        background-color: #004080; /* Darker blue for active, matching Chrome */
        font-weight: bold; /* Bold text for active, matching Chrome */
    }

/* Shared styling for nav icons */
.nav-link {
    display: flex; /* Flexbox for modern alignment, matching Chrome */
    align-items: center; /* Vertically center icons and text, matching Chrome */
    font-size: 14px; /* Consistent font size, matching Chrome */
    padding: 8px 12px; /* Consistent padding, matching Chrome */
    text-decoration: none; /* Remove underline, matching Chrome */
    color: #fff; /* White text, matching Chrome */
    transition: background-color 0.2s ease; /* Smooth transitions, matching Chrome */
}

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1); /* Light highlight on hover, matching Chrome */
    }

/* Icon styling for consistency across browsers */
.nav-icon {
    /* Modern styling */
    position: relative;
    top: 1px; /* Fine-tune position, matching Chrome */
    font-size: 1.5rem; /* Consistent icon size, matching Chrome */
    margin-right: 10px; /* Equal spacing between icon and text, matching Chrome */
    margin-left: 10px; /* Leading equal spacing, matching Chrome */
    width: 24px; /* Fixed width for consistent alignment, matching Chrome */
    text-align: center; /* Center align content, matching Chrome */
    display: inline-block; /* Ensure consistent behavior, matching Chrome */
    vertical-align: middle; /* Align with text middle, matching Chrome */
}

    .nav-icon.oi {
        font-size: 1.5rem; /* Open Iconic size, matching Chrome */
    }

    .nav-icon.bi {
        font-size: 1.2rem; /* Bootstrap Icons size, matching Chrome */
    }

/* Menu container fixes */
.side-menu nav {
    display: block !important; /* Override flex */
    -ms-flex-direction: column;
}

/* Sidebar Styling */
/* Sidebar Styling */
.side-menu {
    background-color: #1A073D; /* Match the dark purple background from Chrome */
    height: calc(100vh - 56px); /* Full height minus top navbar height, matching Chrome */
    overflow-y: auto; /* Enable vertical scrolling, matching Chrome */
    position: sticky; /* Stick below top navbar, matching Chrome */
    top: 56px; /* Position below the navbar, matching Chrome */
    width: 240px; /* Fixed width to match Chrome layout */
    /* IE Compatibility Fixes */
    position: fixed; /* Fallback for IE sticky positioning */
    -ms-overflow-style: -ms-autohiding-scrollbar; /* IE scrollbar styling */
    scrollbar-base-color: #1A073D;
    scrollbar-face-color: #1A073D;
    scrollbar-3dlight-color: #1A073D;
    scrollbar-highlight-color: #1A073D;
    scrollbar-track-color: #f1f1f1;
}

    /* Optional: Add scrollbar styling for modern browsers, ensuring IE compatibility */
    .side-menu::-webkit-scrollbar {
        width: 8px;
    }

    .side-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .side-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

        .side-menu::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

/* Sidebar Navigation Link Styling */
.nav-link-onlyforNavBar {
    color: #fff; /* White text, matching Chrome */
    text-decoration: none;
    display: flex; /* Use flexbox for modern alignment, matching Chrome */
    align-items: center; /* Vertically center icons and text, matching Chrome */
    padding: 10px 15px; /* Consistent padding, matching Chrome */
    font-size: 14px; /* Consistent font size, matching Chrome */
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transitions, matching Chrome */
    /* IE Fallbacks */
    display: block !important; /* Fallback for IE if flexbox fails */
    table-layout: fixed; /* IE layout fallback */
    zoom: 1; /* Trigger hasLayout for IE */
    background: #1A073D; /* IE solid color fallback (no gradient needed) */
    /* Removed invalid filter property; using solid background instead */
}

    /* Hover effect for IE compatibility */
    .nav-link-onlyforNavBar:hover {
        background-color: #0056b3; /* Darker blue on hover, matching Chrome */
        color: #fff; /* Keep white text on hover, matching Chrome */
        text-decoration: none;
        /* IE Fallback */
        background: #0056b3 !important; /* Ensure IE applies the same hover color */
        filter: alpha(opacity=90); /* IE opacity fallback for hover */
    }

    /* Active state for IE compatibility */
    .nav-link-onlyforNavBar.active {
        background-color: #004080; /* Darker blue for active, matching Chrome */
        font-weight: bold; /* Bold text for active, matching Chrome */
        /* IE Fallback */
        background: #004080 !important; /* Ensure IE applies the same active color */
    }

/* Shared styling for nav icons (unchanged, but included for context) */
.nav-icon {
    /* Modern styling */
    position: relative;
    top: 0; /* Reset vertical positioning to align with text */
    font-size: 1rem; /* Reduce icon size to match text height, matching screenshot */
    margin-right: 8px; /* Reduce spacing between icon and text for balance */
    margin-left: 0; /* Remove leading margin to align with sidebar edge */
    width: 20px; /* Slightly smaller width for cleaner appearance */
    text-align: center; /* Center align content, matching Chrome */
    display: inline-block; /* Ensure consistent behavior, matching Chrome */
    vertical-align: middle; /* Align with text middle, matching Chrome */
}

    .nav-icon.oi {
        font-size: 1rem; /* Open Iconic size, matching text height */
    }

    .nav-icon.bi {
        font-size: 1rem; /* Bootstrap Icons size, matching text height */
    }

.nav-brand-wrapper {
    width: 240px; /* match your .side-menu width */
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

/* IE Fallbacks for Icons */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .nav-icon {
        float: left; /* Fallback for IE if flexbox fails */
        margin-top: 0; /* Adjust positioning for IE to align with text */
        margin-right: 8px; /* Match modern spacing */
        margin-left: 0; /* Align with sidebar edge in IE */
        display: inline-block !important; /* Ensure IE renders icons */
        vertical-align: middle; /* Align with text in IE */
        font-size: 1rem; /* Reduce size for IE to match text */
        width: 20px; /* Match modern width */
    }

    .nav-link {
        display: inline-block !important; /* Fallback for IE */
        vertical-align: middle;
    }

    .side-menu {
        -ms-flex: 0 0 240px; /* IE flex fallback */
        overflow-y: scroll; /* Ensure scrolling in IE */
    }

    .nav-link-onlyforNavBar {
        display: block !important; /* Ensure IE renders as block */
        table-layout: fixed; /* IE layout */
        zoom: 1; /* Trigger hasLayout for IE */
        background: #1A073D; /* IE solid color fallback (no gradient needed) */
    }
}

/* Mobile menu button fix for IE */
.navbar-toggler {
    background-color: transparent;
    border: 1px solid #fff;
    position: relative;
    z-index: 1031; /* Ensure hamburger button is above navbar but below offcanvas */
}

/* Custom Nav Tabs */
.custom-nav-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: hidden; /* Prevent horizontal scrolling on desktop */
    overflow-y: visible; /* Allow vertical overflow if needed */
    width: 100%; /* Ensure full width */
    flex-wrap: nowrap; /* Keep tabs on one line */
    max-width: 100%; /* Prevent exceeding container width */
    box-sizing: border-box; /* Include padding and border in width calculation */
}

/* Allow tab scrolling on mobile devices */
@media (max-width: 768px) {
    .custom-nav-tabs {
        overflow-x: auto; /* Allow horizontal scrolling on mobile */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: thin; /* Thin scrollbar on Firefox mobile */
    }
    
    .custom-nav-tabs::-webkit-scrollbar {
        height: 4px; /* Thin scrollbar on mobile */
        display: block; /* Show scrollbar on mobile */
    }
    
    .custom-nav-tabs::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
}

.custom-nav-tabs .nav-item {
    flex-shrink: 0; /* Prevent tabs from shrinking */
    max-width: 100%; /* Ensure tab doesn't exceed container */
}

.custom-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #aaa; /* Light gray text for inactive tabs */
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.25rem 0.25rem 0 0;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    flex-shrink: 0; /* Prevent tabs from shrinking */
    box-sizing: border-box; /* Include padding and border in width */
}

    .custom-nav-link:hover {
        color: #777; /* Slightly darker gray on hover */
        /* Ensure hover doesn't cause overflow */
        transform: none; /* Prevent any transform that might cause overflow */
        padding: 0.5rem 1rem; /* Keep padding consistent on hover */
    }

    .custom-nav-link.active {
        color: #000; /* Black text for active tab */
        font-weight: bold;
        border-bottom: 2px solid #007bff; /* Optional: Active underline color */
    }

/* Overlay adjustments */
#blazor-error-ui, #reconnect-modal, .blazor-reconnect-modal {
    display: none !important; /* Ensure these elements are hidden */
}

.under-construction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.7); /* Gray with transparency */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    transition: opacity 3s ease-in-out; /* Gradual fade-out over 3 seconds */
    opacity: 1; /* Fully visible by default */
}

    .under-construction-overlay.fade-out {
        opacity: 0; /* Fully transparent */
    }

.overlay-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.overlay-content p {
    font-size: 1.5rem;
}

/* Additional Features */
/* Search Box Styling */
.search-box {
    margin-bottom: 20px;
}

    .search-box input {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }

/* Matching Person Table Styling */
h4 {
    margin-top: 20px;
    font-size: 1.5rem;
    color: #333;
}

.inactive {
    opacity: 0.4;
    pointer-events: none; /* Optional: Disable interaction with inactive elements */
}

    .inactive button {
        pointer-events: auto; /* Allow buttons to remain clickable */
    }

/* Image and File Icons */
.image-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.icon-size {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.image-list li {
    margin-bottom: 1rem; /* Adjust the value as needed (e.g., 2rem for more space) */
}

.file-list .file-icon {
    font-size: 1rem;
    font-weight: bold;
    color: #007bff; /* Use a color to indicate links */
    cursor: pointer;
}

.small-text {
    font-size: 0.85rem; /* Smaller font */
    line-height: 1.2; /* Reduce space between lines */
}

.bordered-section {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.page-title {
    text-align: center;
    color: #0d6efd;
    font-size: 1.25rem;
    font-weight: bold;
}

.form-title {
    color: #0d6efd;
    font-size: 0.8rem;
}

.table-head-title th {
    color: #0d6efd;
    font-size: 0.8rem;
}

.product-search-container {
    position: relative;
    margin: 0.5rem 0;
}

.product-dropdown {
    position: absolute;
    z-index: 1050; /* Ensure it's above other elements */
    background-color: white;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

    .product-dropdown .list-group-item {
        border: none;
        border-bottom: 1px solid #dee2e6;
        cursor: pointer;
        transition: background-color 0.2s;
    }

        .product-dropdown .list-group-item:hover {
            background-color: #f8f9fa;
        }

        .product-dropdown .list-group-item:last-child {
            border-bottom: none;
        }

/* Ensure consistent input field heights */
.list-group-item .form-control {
    height: 38px; /* Match button height */
}

/* Maintain vertical alignment */
.list-group-item {
    align-items: center;
    padding: 0.75rem 1.25rem;
}

/* Button hover effects */
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Dimmed (Inactive) Styling */
.dimmed {
    opacity: 0.7 !important; /* Slight dim effect */
    filter: grayscale(60%) !important; /* Keep text visible */
    background-color: rgba(200, 200, 200, 0.3) !important; /* Soft gray */
    transition: all 0.3s ease-in-out !important;
}

/* General Syncfusion Tab Container Styling */
.custom-tab.e-tab {
    font-family: Arial, sans-serif !important;
}

/* Tab Header Styling */
.custom-tab .e-tab-header {
    background: #f5f5f5 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

    /* Individual Tab Items (Inactive State) */
    .custom-tab .e-tab-header .e-toolbar-item {
        background: transparent !important;
        color: #999999 !important; /* Dimmed gray for inactive tabs */
        font-size: 14px !important;
        font-weight: normal !important; /* Regular font weight for inactive tabs */
        padding: 8px 16px !important;
        margin-right: 8px !important;
        border: none !important;
        transition: color 0.3s ease !important;
    }

        /* Hover Effect for Tab Items */
        .custom-tab .e-tab-header .e-toolbar-item:hover {
            color: #666666 !important; /* Slightly darker gray on hover */
        }

        /* Active Tab Styling */
        .custom-tab .e-tab-header .e-toolbar-item.e-active {
            background: transparent !important;
            color: #000000 !important; /* Black text for active tab */
            font-weight: bold !important; /* Bold font weight for active tab */
            border: none !important;
            border-bottom: 2px solid #0078d4 !important; /* Blue underline for active tab */
        }

/* Tab Content Styling */
.custom-tab .e-content {
    padding: 20px !important;
    background: #ffffff !important;
    min-height: 200px !important;
}

/* Dimmed Effect for Non-Active Tab Content */
.custom-tab .dimmed {
    opacity: 0.7 !important;
    filter: grayscale(60%) !important;
    background-color: rgba(200, 200, 200, 0.3) !important;
    transition: all 0.3s ease-in-out !important;
    pointer-events: auto !important; /* Keep interactivity */
}

    /* Table Text Visibility in Dimmed Tabs */
    .custom-tab .dimmed table {
        color: #444 !important;
    }

    /* Links and Buttons in Dimmed Tabs */
    .custom-tab .dimmed .file-link {
        color: #0078d4 !important;
        border-bottom: 1px solid #0078d4 !important;
        pointer-events: auto !important; /* Allow clicking */
    }

/*@media print {*/
    /* Hide everything */
    /*body * {
        visibility: hidden;
    }*/
    /* Show only the content inside .printable-content */
    /*.printable-content,
    .printable-content * {
        visibility: visible;
    }

    .printable-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        text-align: center;*/ /* center-align content */
    /*}*/
    /* Hide elements marked as no-print */
    /*.no-print {
        display: none !important;
    }
}*/

/* Fullscreen Modal Override */
.custom-fullscreen-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-height: 100dvh !important; /* Use dynamic viewport height for iPhone compatibility */
    max-width: none !important;
    margin: 0 !important;
    z-index: 1050 !important;
    background-color: white;
}

    .custom-fullscreen-modal .modal-content {
        height: 100% !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .custom-fullscreen-modal .modal-body {
        flex-grow: 1 !important;
        padding: 20px !important;
        overflow: auto !important;
    }

    /* Add these to your existing fullscreen modal styles */
    .custom-fullscreen-modal iframe {
        width: 100% !important;
        height: 100% !important;
        min-height: 100dvh !important; /* Use dynamic viewport height for iPhone compatibility */
        border: none !important;
    }

    /* Ensure modal body doesn't add padding/margin */
    .custom-fullscreen-modal .modal-body {
        padding: 0 !important;
        margin: 0 !important;
    }

/* Force PDF container to full size */
.pdf-preview-container {
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
}

.btn-action {
    min-width: 80px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

/* Notification Styles */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.notification-header {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.notification-item.unread {
    background-color: #f8f9fa;
}

.notification-content {
    flex: 1;
    margin-right: 10px;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
}

.notification-content small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Fallback styles for nav-tabs to ensure inactive tabs are visible */
.nav-tabs .nav-link {
    color: #0d6efd;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-bottom: none;
    cursor: pointer;
}
.nav-tabs .nav-link.active {
    background-color: #e9f2ff !important; /* very light blue */
    color: #0d6efd !important;            /* Bootstrap primary blue for text */
    border-color: #dee2e6 #dee2e6 #fff;
}

ul.nav-tabs .nav-link.tab-link-dark:not(.active) {
    color: #212529 !important;
}

.group-title-inbound {
    color: #b23c2a;
    font-weight: bold;
    font-size: 2rem;
}

.group-title-outbound {
    color: #1976d2;
    font-weight: bold;
    font-size: 2rem;
}

.group-title-query {
    color: #1dbbb4;
    font-weight: bold;
    font-size: 2rem;
}

.btn-gradient-orange {
    background: linear-gradient(90deg, #ffa726 0%, #fb8c00 100%) !important;
    color: #fff !important;
    border: none;
}

.btn-gradient-blue {
    background: linear-gradient(90deg, #4f8cff 0%, #1e6ed8 100%) !important;
    color: #fff !important;
    border: none;
}

.btn-gradient-teal {
    background: linear-gradient(90deg, #3ed6c5 0%, #1ca6b5 100%) !important;
    color: #fff !important;
    border: none;
}

.btn-large {
    font-size: 1.1rem;
    padding: 0.75rem 0;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin-bottom: 1rem;
}

    .btn-large i {
        font-size: 1.5rem;
        margin-right: 1rem;
    }

/* Remove margin-bottom for the last button in each group */
.row.mb-4 .col-12.col-md:last-child .btn-large {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .btn-large {
        margin-bottom: 1rem;
    }

    .row.mb-4:last-child .btn-large {
        margin-bottom: 0;
    }
}

.row.mb-4 .col-12.col-md {
    margin-bottom: 1rem;
}
.row.mb-4 .col-12.col-md:last-child {
    margin-bottom: 0;
}

/* Sales Order Fulfillment Dashboard Styles */
.fulfillment-dashboard {
    padding: 1rem;
}

.fulfillment-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.fulfillment-card-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.fulfillment-card-body {
    padding: 1rem;
}

.fulfillment-progress {
    height: 25px;
    margin-bottom: 1rem;
}

.fulfillment-progress-bar {
    transition: width 0.3s ease;
}

.fulfillment-progress-success {
    background-color: #28a745;
}

.fulfillment-progress-primary {
    background-color: #007bff;
}

.fulfillment-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
}

.fulfillment-filter {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.fulfillment-table {
    margin-top: 1rem;
}

.fulfillment-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.fulfillment-pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.fulfillment-pagination .page-link {
    color: #007bff;
}

.fulfillment-pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
}

.fulfillment-status {
    display: inline-block;
    min-width: 70px;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.fulfillment-status-original {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

.fulfillment-status-confirmed {
    background-color: #007bff !important;
    color: #fff !important;
}

.fulfillment-status-completed {
    background-color: #28a745 !important;
    color: #fff !important;
}

.fulfillment-status-cancelled {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.fulfillment-status-pending {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.fulfillment-status-partial {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

/* --- Responsive, Compact Table for Purchase Order Dashboard --- */
.table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
    white-space: nowrap;
}
.table td, .table th {
    vertical-align: middle;
    padding: 0.4rem 0.5rem;
    font-size: 0.95rem;
}
.table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.table .btn-group .btn {
    min-width: 80px;
    margin-bottom: 2px;
    font-size: 0.95em;
}
.table .badge {
    font-size: 0.9em;
    padding: 0.4em 0.7em;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f6f8fa;
}
.table-responsive {
    overflow-x: auto;
}
@media (max-width: 1200px) {
    .table td, .table th {
        font-size: 0.9rem;
        padding: 0.3rem 0.3rem;
    }
    .table td {
        max-width: 100px;
    }
    .table .btn-group .btn {
        min-width: 60px;
        font-size: 0.85em;
    }
}
/* --- End Responsive, Compact Table --- */

/* Hide top and side menus for dashboard full screen mode */
body.hide-menus .side-menu,
body.hide-menus .navbar {
    display: none !important;
}
body.hide-menus {
    padding-left: 0 !important;
}

@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s;
        z-index: 2000;
        position: fixed;
        left: 0;
        top: 0;
        min-height: 100vh;
        width: 220px;
        display: block !important;
    }
    .sidebar.sidebar-visible {
        transform: translateX(0) !important;
    }
    .toggle-btn {
        display: block !important;
    }
}

.toggle-btn {
    display: block;
    /* ...other styles... */
}

/* For scrollable modals (added for batch modal overflow fix) */
.modal-scrollable {
    max-width: 90vw;
    max-height: 80vh;
    overflow-x: auto;
    overflow-y: auto;
    padding: 1rem;
}

.tab-link-dark {
    color: #212529 !important;
}

/* Spinning animation for refresh icons */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* PriceListModal title size fix */
.blazored-modal-container .blazored-modal-header h5.modal-title,
.blazored-modal .blazored-modal-header h5.modal-title,
div.blazored-modal-header h5.modal-title {
    font-size: 0.85rem !important;
    font-weight: normal !important;
}

/* FINAL PERMANENT FIX - Disable Bootstrap's native .btn-close handler inside Blazored modals */
.blazored-modal .btn-close,
.blazored-modal [data-bs-dismiss="modal"] {
    pointer-events: none !important;
}

/* Re-enable pointer events so Blazor @onclick works perfectly */
.blazored-modal .btn-close * {
    pointer-events: auto !important;
}

/* ============================================
   Mobile CSS Improvements
   ============================================ */

/* Prevent horizontal overflow on mobile */
@media (max-width: 767.98px) {
    /* Ensure body and html don't overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }

    /* Prevent container overflow */
    .container,
    .container-fluid {
        max-width: 100% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        overflow-x: hidden;
    }

    /* Prevent row overflow */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100%;
    }

    /* Prevent column overflow */
    [class*="col-"] {
        max-width: 100%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Prevent table overflow */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* Prevent image overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Prevent fixed width elements from causing overflow */
    * {
        max-width: 100%;
    }

    /* Allow specific elements to overflow if needed (like code blocks) */
    pre, code {
        word-wrap: break-word;
        white-space: pre-wrap;
        overflow-x: auto;
    }

    /* Prevent modal overflow */
    .modal,
    .modal-dialog,
    .modal-content {
        max-width: 100vw !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    /* Prevent sidebar from causing overflow */
    .sidebar,
    .side-menu {
        max-width: 100vw !important;
    }
}

/* Increase nav-link tap area for mobile (minimum 44x44px for accessibility) */
@media (max-width: 767.98px) {
    /* Navigation links in sidebar/offcanvas */
    .nav-link,
    .menu-item,
    .nav-link-onlyforNavBar,
    a[class*="nav"],
    .offcanvas-body .menu-item,
    .sidebar-menu .menu-item {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Ensure icons and text are properly spaced */
    .nav-link i,
    .menu-item i,
    .nav-link-onlyforNavBar i {
        min-width: 24px;
        margin-right: 12px;
    }

    /* Increase tap area for buttons */
    button,
    .btn,
    .navbar-toggler {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 10px 16px !important;
    }

    /* Increase tap area for close buttons */
    .btn-close {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px !important;
    }

    /* Increase tap area for list items that act as links */
    .list-group-item,
    .list-group-item-action {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }

    /* Increase tap area for dropdown items */
    .dropdown-item {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }

    /* Increase tap area for tab links */
    .nav-tabs .nav-link,
    .custom-nav-link {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }
}