/* ========================================
   CSS Custom Properties (Variables)
   Reusable values for consistent styling

   IMPORTANT: These override Bootstrap 5.3's default border-radius values
   to create a more modern, rounded design system
   ======================================== */
:root {
    /* ────────────────────────────────────────────────────
       Override Bootstrap 5.3 Border Radius Variables
       Makes ALL Bootstrap components use rounder corners
       ──────────────────────────────────────────────────── */
    --bs-border-radius-sm: 0.75rem;     /* Bootstrap default: 0.25rem (4px) → Now: 12px */
    --bs-border-radius: 1rem;           /* Bootstrap default: 0.375rem (6px) → Now: 16px */
    --bs-border-radius-lg: 1.25rem;     /* Bootstrap default: 0.5rem (8px) → Now: 20px */
    --bs-border-radius-xl: 1.5rem;      /* Bootstrap default: 1rem (16px) → Now: 24px */
    --bs-border-radius-xxl: 1.75rem;    /* Bootstrap default: 2rem (32px) → Now: 28px */
    --bs-border-radius-2xl: 1.75rem;    /* Alias for xxl */
    /* --bs-border-radius-pill stays at 50rem (unchanged for pill-shaped elements) */

    /* ────────────────────────────────────────────────────
       Custom Border Radius Scale
       Use these for consistency with Bootstrap overrides
       ──────────────────────────────────────────────────── */
    --border-radius-sm: 0.75rem;     /* 12px - Small elements (tags, badges, small buttons) */
    --border-radius-md: 1rem;        /* 16px - Medium elements (inputs, dropdowns, buttons) */
    --border-radius-lg: 1.25rem;     /* 20px - Large elements (cards, modals, containers) */
    --border-radius-xl: 1.5rem;      /* 24px - Extra large (major sections) */
    --border-radius-pill: 50%;       /* Circular elements (avatars, icon buttons) */
    --border-radius-scrollbar: 0.25rem;  /* 4px - Scrollbars stay small for precision */

    /* ────────────────────────────────────────────────────
       Text Size Preference System
       User-adjustable text scaling for accessibility
       ──────────────────────────────────────────────────── */
    --text-size-multiplier: 1.0;     /* Default: 1.0 (16px base font size) */
    /* Available multipliers set via user preference:
       - Small: 0.875 (14px base)
       - Medium: 1.0 (16px base) - DEFAULT
       - Large: 1.125 (18px base)
       - Extra Large: 1.25 (20px base)
    */

    /* ────────────────────────────────────────────────────
       Responsive Page Spacing
       Fluid gutter that scales between 1rem (1366px) and 3rem (1920px+)
       ──────────────────────────────────────────────────── */
    --page-gutter: clamp(1rem, 2vw, 3rem);
}

/* Also override for dark mode to ensure consistency across themes */
[data-bs-theme="dark"] {
    --bs-border-radius-sm: 0.75rem;
    --bs-border-radius: 1rem;
    --bs-border-radius-lg: 1.25rem;
    --bs-border-radius-xl: 1.5rem;
    --bs-border-radius-xxl: 1.75rem;
    --bs-border-radius-2xl: 1.75rem;
}

/* Ensure the HTML and body take up the full height */
html, body {
    margin: 0;
}

/* ────────────────────────────────────────────────────
   Text Size Scaling - Apply multiplier to key elements
   These elements use relative units and will scale properly
   ──────────────────────────────────────────────────── */

/* Navbar elements */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand,
.navbar-dark .dropdown-item {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* Headings - scale based on their relative sizes */
h1, .h1 { font-size: calc(2.5rem * var(--text-size-multiplier)); letter-spacing: -0.04em; }
h2, .h2 { font-size: calc(2rem * var(--text-size-multiplier)); letter-spacing: -0.02em; }
h3, .h3 { font-size: calc(1.75rem * var(--text-size-multiplier)); letter-spacing: -0.01em; }
h4, .h4 { font-size: calc(1.5rem * var(--text-size-multiplier)); }
h5, .h5 { font-size: calc(1.25rem * var(--text-size-multiplier)); }
h6, .h6 { font-size: calc(1rem * var(--text-size-multiplier)); }

/* Body text and paragraphs */
body, p, .text-body-secondary {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* Buttons */
.btn {
    font-size: calc(1rem * var(--text-size-multiplier));
}

.btn-sm {
    font-size: calc(0.875rem * var(--text-size-multiplier));
}

.btn-lg {
    font-size: calc(1.25rem * var(--text-size-multiplier));
}

/* Form controls */
.form-control, .form-select, .form-label {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* Small text */
small, .small {
    font-size: calc(0.875rem * var(--text-size-multiplier));
}

/* Card text */
.card-title {
    font-size: calc(1.25rem * var(--text-size-multiplier));
}

.card-text, .card-body {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* Table text */
.table {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* Badge text */
.badge {
    font-size: calc(0.875rem * var(--text-size-multiplier));
}

/* Alert text */
.alert {
    font-size: calc(1rem * var(--text-size-multiplier));
}

/* ────────────────────────────────────────────────────
   User Preferences Page Specific Styles
   ──────────────────────────────────────────────────── */

/* Text size preview letters - intentionally NOT scaled by multiplier */
.text-size-preview-small {
    font-size: 0.875rem;
}

.text-size-preview-medium {
    font-size: 1rem;
}

.text-size-preview-large {
    font-size: 1.125rem;
}

.text-size-preview-xlarge {
    font-size: 1.25rem;
}

.text-size-preview-label {
    font-size: 0.7rem;
}

/* Webkit Scrollbar Styling (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox Scrollbar Styling */
* {
    scrollbar-width: thin;
    /* scrollbar-color: rgba(255, 255, 255, 0.2) transparent; */
}

/* Allow scrolling for full-page layouts without sidebars */
.full-page-scroll {
    overflow-y: auto !important;
}

/* Main content container */
.main-content {
    margin-left: 25%; /* Leave space for the fixed sidebar */
    height: calc(100vh - 7rem); /* Full height minus the navbar */
    overflow-y: auto; /* Allow scrolling within the main content */
    padding-left: 2rem; /* Adds space between the sidebar and cards */
}

/* Navbar Search Group - Unified wrapper for input + button */
.navbar-search-group {
    display: flex;
    align-items: center;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

/* Unified glow effect when input is focused */
.navbar-search-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Navbar Search Input Placeholder Styling */
.navbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1; /* Firefox */
}

.navbar-search-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar-search-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.navbar-search-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar-search-input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important; /* Remove right border for seamless connection */
    flex: 1;
    width: 100%;
    margin: 0 !important; /* Remove default margin */
}

.navbar-search-input:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: none !important; /* Remove individual focus shadow - use group shadow instead */
    border-right: none !important; /* Keep border removed on focus */
    outline: none !important;
}

/* Navbar Search Button Styling - connects seamlessly with input */
.navbar-search-btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: none !important; /* Remove left border for seamless connection */
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 !important; /* Remove default margin */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Button changes when input is focused - unified appearance */
.navbar-search-group:focus-within .navbar-search-btn {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Ensure button border matches input on hover */
.navbar-search-btn:hover {
    border-left: none !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

/* Remove button's individual focus shadow - rely on group shadow */
.navbar-search-btn:focus {
    border-left: none !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Barcode scanner integration adjustments */
.navbar-search-input-wrapper {
    flex: 1 1 auto;
}

.navbar-scan-btn {
    color: rgba(255, 255, 255, 0.85) !important;
    background-color: transparent !important;
}

.navbar-scan-btn:hover,
.navbar-scan-btn:focus {
    color: #FFFFFF !important;
}

/* Navbar */
.navbar-dark {
    background: linear-gradient(90deg, #0A0A0A 0%, #0064D2 100%) !important;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.07), 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Border for separation */
}


.navbaimage.pngr .container-fluid {
    padding-left: 4rem;
    padding-right: 4rem;
}

    .navbar-dark .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.8);
        transition: color 0.3s ease; /* Smooth color change on hover */
    }

        .navbar-dark .navbar-nav .nav-link:hover,
        .navbar-dark .navbar-nav .nav-link:focus {
            color: #FFFFFF; /* Full white on hover or focus */
        }

    .navbar-dark .navbar-brand {
        color: #FFFFFF; /* Make sure the brand text is fully visible */
        font-weight: bold;
    }

        .navbar-dark .navbar-brand:hover {
            color: #CCCCCC; /* Slight hover effect for the brand */
        }

    .navbar-dark .navbar-toggler {
        background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent toggler background */
        border: none; 
    }

    .navbar-dark .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FFFFFF' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 0.7)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
        /* Custom white toggler icon */
    }

    .navbar-dark .dropdown-menu:not(.notification-dropdown) {
        background-color: rgba(0, 0, 0, 0.8);
        border: none;
        border-radius: 0.5rem; /* Smooth edges */
        backdrop-filter: blur(10px); /* Frosted glass effect */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);

    }

    .navbar-dark .dropdown-item {
        color: #FFFFFF;
    }

        .navbar-dark .dropdown-item:hover {
            color: #CCCCCC;
            background-color: rgba(255, 255, 255, 0.1); 
        }

/* Blue, Purple, Pink Gradient Background */
.quartz-background {
    background-image: linear-gradient(90deg, #33b7e2, #5e62b0, #dc307c);
}
/* Sidebar */
.glass-sidebar {
    position: fixed;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 1rem; 
    padding: 1.5rem;
    height: calc(100vh - 7rem); /* Full height minus header/footer */
    overflow-y: auto; /* Scroll if content overflows */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); 
}

    /* Sidebar dropdown glassmorphism effect */
    .glass-sidebar .form-select {
        border-radius: 0.75rem; 
        background: rgba(255, 255, 255, 0.2); /* Semi-transparent white background */
        backdrop-filter: blur(15px); /* Frosted glass effect */
        color: white; 
        padding: 0.5rem 1rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); 
        appearance: none; /* Remove default browser styles */
        position: relative;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* Custom arrow */
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 1rem;
        transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
    }

        /* Hover and focus effects */
        .glass-sidebar .form-select:hover,
        .glass-sidebar .form-select:focus {
            background: rgba(255, 255, 255, 0.3); /* Slightly brighter on hover */
            border-color: rgba(255, 255, 255, 0.5); /* Brighter border */
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.4); /* Glow effect */
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* Preserve the arrow */
            background-repeat: no-repeat;
            background-position: right 1rem center; /* Keep arrow position consistent */
            background-size: 1rem; /* Keep arrow size consistent */
            outline: none; /* Remove default outline */
        }

    /* Dropdown menu options */
    .glass-sidebar select option {
        background: rgba(255, 255, 255, 0.15); 
        color: black;
        padding: 0.5rem; 
        border-radius: 0.5rem; 
        transition: background-color 0.3s ease, color 0.3s ease; 
    }

        /* Option hover effects */
        .glass-sidebar select option:hover {
            background: rgba(255, 255, 255, 0.25); 
            color: #FFFFFF; 
        }

/* Base Glass Card Style (Shared for hover effect) */
.glass-card {
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Most of this can be removed - Bootstrap 5.3 handles dark theme automatically */

/* Long Card */
.glass-card-long {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    width: 100%; 
}

/* Small Card */
.glass-card-small {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px; /* Smaller padding for compact design */
    width: auto; /* Default width for smaller cards */
}

/* Hover Effect (Applies to all .glass-card types) */
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}



/* Purple Button */
.btn-purple {
    background-color: #5227CC; /* Use Bootstrap's indigo variable */
    color: white; 
    border: none; 
    border-radius: 1rem;
}

    .btn-purple:hover {
        background-color: #520dc2; /* Slightly darker shade for hover */
    }


/* ======= PartNum Search Modal Styling ======= */
/* Progress Bar and Icons Styling */

/* Chrome, Safari, Edge for the clear button */
input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
    filter: grayscale(1) brightness(0.7);
    opacity: 0.5;
}

/* Firefox (does not support coloring the clear button directly, but you can hide it and use your own if needed) */
input[type="search"]::-moz-search-clear {
    cursor: pointer;
    filter: grayscale(1) brightness(0.7);
    opacity: 0.5;
}

/* IE/Edge Legacy */
input[type="search"]::-ms-clear {
    cursor: pointer;
    filter: grayscale(1) brightness(0.7);
    opacity: 0.5;
}

.progress-icon-container {
    width: 35px;  
    height: 35px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-icon-complete {
    background-color: #198754;
}

.progress-icon-incomplete {
    background-color: #e9ecef; /* light gray */
}

/* Adjust icon size within the circles */
.progress-icon-container i {
    font-size: calc(1rem * var(--text-size-multiplier)); /* Adjust icon size to look proportional in the larger circle */
}

.progress-bar-custom {
    height: 10px;
    border-radius: 5px;
}

/* Item image container and image */
.item-image-container {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Placeholder content styling */
.placeholder-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Search dropdown positioning and spacing */
.search-dropdown {
    z-index: 1050;
    width: 400px;
    margin-top: 2px;
}

/* Progress icon column width */
.progress-icon-column {
    width: 25%;
}

/* Dropdown positioning */
.dropdown-positioned {
    position: absolute;
}

/* Mobile-specific styles for the  partnum search dropdown */
@media (max-width: 767px) {
    /* Make the dropdown take up more width on small screens */
    .placeholder-content i {
        margin-bottom: 2px;
    }
    
    .placeholder-content p {
        font-size: calc(0.6875rem * var(--text-size-multiplier));
        margin: 0;
        line-height: 1;
    }
    
    .search-dropdown,
    #searchResultsDropdown {
        width: 80vw !important;
        max-width: 80vw !important;
        left: 10vw !important; /* Center it horizontally */
        top: 60px !important;
        max-height: 85vh !important;   /* Limit height */
        overflow-y: auto !important;   /* Scroll if needed */
    }
    
    /* Remove any existing flex layouts */
    #searchResultsDropdown .d-flex.mb-2,
    #searchResultsDropdown .item-header-container,
    #searchResultsDropdown .item-details-container {
        display: block !important;
        text-align: center !important;
    }

    /* Image on its own line */
    #searchResultsDropdown .item-image-container {
        width: 90px !important;
        height: 90px !important;
        margin: 5px auto 10px auto !important;
        display: block !important;
    }

    /* Placeholder content styling for mobile */
    #searchResultsDropdown .placeholder-content {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #searchResultsDropdown .placeholder-content i {
        margin-bottom: 2px !important;
        font-size: calc(1.25rem * var(--text-size-multiplier)) !important;
    }

    #searchResultsDropdown .placeholder-content p {
        font-size: calc(0.6875rem * var(--text-size-multiplier)) !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    /* Part number and icon on one line */
    #searchResultsDropdown .d-flex.align-items-start.justify-content-between {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 15px 0 !important;
    }

    /* Title on its own line */
    #searchResultsDropdown #itemTitle {
        display: block !important;
        text-align: center !important;
        margin: 15px 0 !important;
        font-size: calc(1rem * var(--text-size-multiplier)) !important;
        line-height: 1.4 !important;
    }

    /* Stack info sections vertically */
    #searchResultsDropdown .info-row {
        flex-direction: column !important;
        margin-bottom: 0 !important;
    }

    #searchResultsDropdown .info-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 10px !important;
        text-align: center !important;
    }

    /* Stack label and value vertically */
    #searchResultsDropdown .text-muted.small {
        display: block !important;
        margin-bottom: 6px !important;
        font-size: calc(0.875rem * var(--text-size-multiplier)) !important;
    }

    #searchResultsDropdown .badge,
    #searchResultsDropdown #saleID a {
        font-size: calc(0.875rem * var(--text-size-multiplier)) !important;
        padding: 5px 8px !important;
        display: inline-block !important;
        margin-top: 3px !important;
    }
    
    /* Improve progress section spacing */
    #searchResultsDropdown .progress-section {
        margin-top: 20px !important;
        margin-bottom: 15px !important;
    }
    
    /* Make progress percentage larger */
    #searchResultsDropdown #progressPercentage {
        font-size: calc(1rem * var(--text-size-multiplier)) !important;
        font-weight: bold !important;
    }
    
    /* Make progress bar taller */
    #searchResultsDropdown .progress-bar-custom {
        height: 15px !important;
        margin-bottom: 15px !important;
    }
    
    /* Make progress icons larger and more tappable */
    #searchResultsDropdown .progress-icon-container {
        width: 40px !important;
        height: 40px !important;
    }
    
    #searchResultsDropdown .progress-icon-container i {
        font-size: calc(1.25rem * var(--text-size-multiplier)) !important;
    }
    
    /* Add more padding to the item details */
    #searchResultsDropdown #itemDetails {
        padding: 20px !important;
    }
    
    /* Make the close button more tappable */
    #searchResultsDropdown #closeSearchBtn {
        font-size: calc(1rem * var(--text-size-multiplier)) !important;
        padding: 0.25rem !important;
    }
}

/* ======= End of PartNum Search Modal Styling ======= */

/* Mobile Sidebar Styling - Matches inventory-prototype design */
.mobile-sidebar {
    background-color: #2a2a2a !important;
    border-left: 1px solid #404040;
    color: white;
}

.mobile-sidebar-header {
    border-bottom: 1px solid #404040;
    background-color: #2a2a2a;
}

.mobile-sidebar-title {
    color: white;
    font-weight: 600;
}

.mobile-sidebar-close {
    filter: invert(1);
}

.mobile-sidebar-body {
    background-color: #2a2a2a;
    color: white;
}

.mobile-sidebar-label {
    color: white;
    font-weight: 600;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    margin-bottom: 0.5rem;
    display: block;
}

.mobile-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-input {
    background-color: #333333 !important;
    border: 1px solid #606060 !important;
    color: white !important;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
}

.mobile-search-input::placeholder {
    color: #9ca3af;
}

.mobile-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
}

.mobile-sidebar-select {
    background-color: #333333 !important;
    border: 1px solid #606060 !important;
    color: white !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.mobile-sidebar-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-sidebar-checkbox input[type="checkbox"] {
    background-color: #333333;
    border: 1px solid #606060;
    border-radius: 0.25rem;
    width: 1rem;
    height: 1rem;
}

.mobile-sidebar-checkbox label {
    color: white;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    margin: 0;
}

.mobile-sidebar-separator {
    height: 1px;
    background-color: #404040;
    margin: 1rem 0;
}

.mobile-theme-toggle {
    background-color: transparent;
    border: 1px solid #606060;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-theme-toggle:hover {
    background-color: #333333;
}

.mobile-sidebar-actions {
    display: flex;
    gap: 0.5rem;
}

.mobile-reset-btn {
    background-color: transparent;
    border: 1px solid #606060;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    flex: 1;
    cursor: pointer;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    transition: background-color 0.2s;
}

.mobile-reset-btn:hover {
    background-color: #333333;
}

.mobile-apply-btn {
    background-color: #004080;
    border: 1px solid #004080;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    flex: 1;
    cursor: pointer;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    transition: background-color 0.2s;
}

.mobile-apply-btn:hover {
    background-color: #0056b3;
}

/* Light mode overrides for mobile sidebar */
[data-bs-theme="light"] .mobile-sidebar {
    background-color: white !important;
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-sidebar-header {
    background-color: white;
    border-bottom-color: #e5e7eb;
}

[data-bs-theme="light"] .mobile-sidebar-title {
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-sidebar-close {
    filter: none;
}

[data-bs-theme="light"] .mobile-sidebar-body {
    background-color: white;
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-sidebar-label {
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-search-input {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}

[data-bs-theme="light"] .mobile-sidebar-select {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}

[data-bs-theme="light"] .mobile-sidebar-checkbox input[type="checkbox"] {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

[data-bs-theme="light"] .mobile-sidebar-checkbox label {
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-sidebar-separator {
    background-color: #e5e7eb;
}

[data-bs-theme="light"] .mobile-theme-toggle {
    border-color: #d1d5db;
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-theme-toggle:hover {
    background-color: #f3f4f6;
}

[data-bs-theme="light"] .mobile-reset-btn {
    border-color: #d1d5db;
    color: #1f2937;
}

[data-bs-theme="light"] .mobile-reset-btn:hover {
    background-color: #f3f4f6;
}

/* ================================================
   Barcode Scanner Styles
   ================================================ */

/* Barcode scanner video element */
#barcodeScannerVideo {
    max-width: 100%;
    max-height: 100%;
}

/* Ensure modal takes full screen on mobile */
#barcodeScannerModal .modal-fullscreen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    max-width: 100%;
}

#barcodeScannerModal .modal-fullscreen .modal-content {
    height: 100vh;
    border: 0;
    border-radius: 0;
}

#barcodeScannerModal .modal-body {
    position: relative;
    overflow: hidden;
}

/* Scanner status message styling */
#scannerStatus {
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Barcode scan button - only show on mobile */
#barcodeScanBtn {
    transition: all 0.2s ease;
}

#barcodeScanBtn:active {
    transform: scale(0.95);
}

/* Scanning guide overlay animation */
@keyframes pulse-border {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

#barcodeScannerModal .position-absolute .border {
    animation: pulse-border 2s ease-in-out infinite;
}

/* ========================================
   Glassmorphism Design System
   Reusable glass effect components for dark theme pages

   Usage: Add a wrapper class (e.g., .glass-page) to your page container
   and customize the --accent color for your page's color scheme.

   Example:
   .my-page {
       --accent: #00d4aa;  // Customize accent color
       --accent-soft: rgba(0, 212, 170, 0.08);
       --accent-glow: rgba(0, 212, 170, 0.15);
   }
   ======================================== */

/* ─────────────────────────────────────────────────────────────
   Glass Page Base - Apply to page container
   Provides CSS custom properties for glass effects
   ───────────────────────────────────────────────────────────── */
.glass-page {
    /* Default accent (teal) - override in page-specific CSS */
    --accent: #00d4aa;
    --accent-soft: rgba(0, 212, 170, 0.08);
    --accent-glow: rgba(0, 212, 170, 0.15);

    /* Glass effect properties */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.04);
    --glass-dropdown-bg: #1e1e20;

    /* Text hierarchy */
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;

    /* Status colors */
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;

    /* Chart/data visualization colors */
    --chart-1: var(--accent);
    --chart-2: #0a84ff;
    --chart-3: #bf5af2;
    --chart-4: #ff9f0a;
    --chart-5: #ff453a;

    /* Typography */
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light theme overrides for glass pages */
[data-bs-theme="light"] .glass-page {
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-hover: rgba(0, 0, 0, 0.04);
    --glass-dropdown-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
}

/* ─────────────────────────────────────────────────────────────
   Ambient Glow Orbs — Atmospheric depth for glass pages
   ─────────────────────────────────────────────────────────────
   Opt-in: add `.glass-ambient` to a `.glass-page` container. Two
   slowly-drifting orbs render as fixed-position pseudo-elements
   behind the content (z-index 0). The color tokens
   (`--glow-primary` etc.) follow the page's accent — pages can
   override these by setting them inside their own page-scope
   selector. Pages that need a third orb can add an element
   with `.glass-ambient-orb-3` inside. */
.glass-ambient {
    --glow-primary:   rgba(10, 132, 255, 0.10);
    --glow-secondary: rgba(191, 90, 242, 0.07);
    --glow-tertiary:  rgba(48, 209, 88, 0.06);
    position: relative;
    overflow-x: hidden;
}

[data-bs-theme="light"] .glass-ambient {
    --glow-primary:   rgba(10, 132, 255, 0.05);
    --glow-secondary: rgba(191, 90, 242, 0.04);
    --glow-tertiary:  rgba(48, 209, 88, 0.03);
}

.glass-ambient::before,
.glass-ambient::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}

.glass-ambient::before {
    top: 15%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, var(--glow-primary) 0%, transparent 60%);
    opacity: 0.7;
    animation: glassAmbientFloat 26s ease-in-out infinite;
}

.glass-ambient::after {
    bottom: 10%;
    left: -15%;
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse, var(--glow-secondary) 0%, transparent 55%);
    opacity: 0.6;
    animation: glassAmbientPulse 19s ease-in-out infinite;
    animation-delay: -7s;
}

.glass-ambient-orb-3 {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    top: 45%;
    left: 35%;
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse, var(--glow-tertiary) 0%, transparent 65%);
    opacity: 0.5;
    animation: glassAmbientFloat 22s ease-in-out infinite reverse;
    animation-delay: -11s;
}

@keyframes glassAmbientFloat {
    0%, 100% { transform: translate(0, 0) scale(1);        opacity: 0.5; }
    50%      { transform: translate(20px, -30px) scale(1.05); opacity: 0.75; }
}

@keyframes glassAmbientPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 0.75; transform: scale(1.08); }
}

/* Content above the orbs — children of a glass-ambient container should
   get position:relative + z-index:1 so they sit on top of the gradients. */
.glass-ambient > .container,
.glass-ambient > .container-fluid {
    position: relative;
    z-index: 1;
}

/* Honor reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .glass-ambient::before,
    .glass-ambient::after,
    .glass-ambient-orb-3 {
        animation: none;
    }
}

/* ─────────────────────────────────────────────────────────────
   Outcome chips + Source pills — shared in-table status badges
   for any glass-page. One visual language: green=success,
   red=danger, yellow=warning, blue=info, gray=neutral.
   ───────────────────────────────────────────────────────────── */
.glass-page .outcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: calc(0.7rem * var(--text-size-multiplier));
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid;
    line-height: 1.3;
    white-space: nowrap;
}
.glass-page .outcome-chip .chip-count {
    font-weight: 600;
    font-feature-settings: 'tnum';
}
.glass-page .outcome-chip.success { color: var(--success); background: rgba(48, 209, 88, 0.10);  border-color: rgba(48, 209, 88, 0.25); }
.glass-page .outcome-chip.warning { color: var(--warning); background: rgba(255, 159, 10, 0.10); border-color: rgba(255, 159, 10, 0.25); }
.glass-page .outcome-chip.danger  { color: var(--danger);  background: rgba(255, 69, 58, 0.10);  border-color: rgba(255, 69, 58, 0.25); }
.glass-page .outcome-chip.info    { color: var(--chart-2); background: rgba(10, 132, 255, 0.10); border-color: rgba(10, 132, 255, 0.25); }
.glass-page .outcome-chip.neutral { color: var(--text-secondary); background: var(--glass-bg);   border-color: var(--glass-border); }

/* Source/type label — quieter than outcome-chip. Used for "save-flow" vs "batch"
   or for agent-type labels in cross-agent tables. */
.glass-page .source-pill {
    display: inline-block;
    font-size: calc(0.65rem * var(--text-size-multiplier));
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    text-transform: lowercase;
    white-space: nowrap;
}
.glass-page .source-pill.source-save-flow { color: var(--chart-2); border-color: rgba(10, 132, 255, 0.3); }
.glass-page .source-pill.source-batch     { color: var(--accent);  border-color: rgba(0, 212, 170, 0.3); }

/* ─────────────────────────────────────────────────────────────
   Glass Panel - Base glass morphism container
   ───────────────────────────────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-panel:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .glass-panel::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

[data-bs-theme="light"] .glass-panel:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   Glass Stat Card - For KPI/metric displays
   ───────────────────────────────────────────────────────────── */
.glass-stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: glassCardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.glass-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-stat-card:hover {
    background: var(--glass-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Staggered animation delays for stat cards */
.glass-stat-card:nth-child(1) { animation-delay: 0.1s; }
.glass-stat-card:nth-child(2) { animation-delay: 0.15s; }
.glass-stat-card:nth-child(3) { animation-delay: 0.2s; }
.glass-stat-card:nth-child(4) { animation-delay: 0.25s; }
.glass-stat-card:nth-child(5) { animation-delay: 0.3s; }
.glass-stat-card:nth-child(6) { animation-delay: 0.35s; }

.glass-stat-label {
    font-size: calc(0.8rem * var(--text-size-multiplier));
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.glass-stat-value {
    font-size: calc(2.5rem * var(--text-size-multiplier));
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.glass-stat-value.accent {
    color: var(--accent);
}

.glass-stat-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: calc(0.85rem * var(--text-size-multiplier));
    color: var(--text-secondary);
}

.glass-stat-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: calc(1.1rem * var(--text-size-multiplier));
}

/* ─────────────────────────────────────────────────────────────
   Glass Card Reveal Animation
   ───────────────────────────────────────────────────────────── */
@keyframes glassCardReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────
   Glass Trend Badge - For showing up/down trends
   ───────────────────────────────────────────────────────────── */
.glass-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-size: calc(0.75rem * var(--text-size-multiplier));
    font-weight: 600;
}

.glass-trend.up {
    background: rgba(48, 209, 88, 0.15);
    color: var(--success);
}

.glass-trend.down {
    background: rgba(255, 69, 58, 0.15);
    color: var(--danger);
}

/* ─────────────────────────────────────────────────────────────
   Glass Badge - For labels and tags
   ───────────────────────────────────────────────────────────── */
.glass-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: calc(0.7rem * var(--text-size-multiplier));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.glass-badge.accent {
    background: var(--accent-soft);
    color: var(--accent);
}

.glass-badge.blue {
    background: rgba(10, 132, 255, 0.15);
    color: #0a84ff;
}

.glass-badge.purple {
    background: rgba(191, 90, 242, 0.15);
    color: #bf5af2;
}

.glass-badge.orange {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
}

.glass-badge.red {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
}

/* ─────────────────────────────────────────────────────────────
   Glass Date Badge - For timestamps
   ───────────────────────────────────────────────────────────── */
.glass-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    color: var(--text-secondary);
    backdrop-filter: blur(20px);
}

.glass-date-badge i {
    color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   Glass Input - Form inputs with glass effect
   ───────────────────────────────────────────────────────────── */
.glass-input {
    padding: 0.4rem 0.75rem;
    font-size: calc(0.85rem * var(--text-size-multiplier));
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
}

.glass-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.glass-input::placeholder {
    color: var(--text-tertiary);
}

/* Date input specific styling */
.glass-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

[data-bs-theme="light"] .glass-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.3);
}

/* Select option styling for glass inputs */
select.glass-input option {
    background: #1a1a1c;
    color: var(--text-primary);
    padding: 0.5rem;
}

[data-bs-theme="light"] select.glass-input option {
    background: #ffffff;
    color: #1d1d1f;
}

/* ─────────────────────────────────────────────────────────────
   Glass Dropdown Button - For dropdown trigger buttons
   ───────────────────────────────────────────────────────────── */
.glass-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.4rem 0.75rem;
    font-size: calc(0.85rem * var(--text-size-multiplier));
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-dropdown-btn:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.glass-dropdown-btn:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.glass-dropdown-btn::after {
    /* Bootstrap dropdown arrow */
    margin-left: 0.5rem;
}

[data-bs-theme="light"] .glass-dropdown-btn:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

/* ─────────────────────────────────────────────────────────────
   Glass Dropdown Menu - Dropdown menu styling
   ───────────────────────────────────────────────────────────── */
.glass-dropdown-menu {
    background: var(--glass-dropdown-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    z-index: 1050;
}

.glass-dropdown-menu .dropdown-item {
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.glass-dropdown-menu .dropdown-item:hover,
.glass-dropdown-menu .dropdown-item.active {
    background: var(--accent-soft);
    color: var(--text-primary);
}

/* ─────────────────────────────────────────────────────────────
   Glass Period Selector - Pill-shaped toggle buttons
   ───────────────────────────────────────────────────────────── */
.glass-period-selector {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
}

.glass-period-btn {
    padding: 0.4rem 1rem;
    font-size: calc(0.8rem * var(--text-size-multiplier));
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-period-btn:hover {
    color: var(--text-primary);
}

.glass-period-btn.active {
    background: var(--accent);
    color: #000;
}

/* ─────────────────────────────────────────────────────────────
   Glass Icon Button - Small icon-only buttons
   ───────────────────────────────────────────────────────────── */
.glass-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-icon-btn:hover {
    background: var(--glass-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.glass-icon-btn.spinning i {
    animation: glassSpin 1s linear infinite;
}

@keyframes glassSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   Glass Table - Tables with glass effect
   ───────────────────────────────────────────────────────────── */
.glass-table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    animation: glassCardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

.glass-table-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.glass-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
}

@media (max-width: 768px) {
    .glass-table {
        min-width: 100%;
    }
}

.glass-table thead th {
    font-size: calc(0.7rem * var(--text-size-multiplier));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 10;
    background: #141414;
}

[data-bs-theme="light"] .glass-table thead th {
    background: #f5f5f7;
}

.glass-table tbody tr {
    transition: background 0.2s ease;
}

.glass-table tbody tr:hover {
    background: var(--glass-hover);
}

.glass-table tbody td {
    padding: 1rem;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    font-variant-numeric: tabular-nums;
}

.glass-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────
   Glass Legend - For charts and data visualization
   ───────────────────────────────────────────────────────────── */
.glass-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.glass-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: calc(0.8rem * var(--text-size-multiplier));
    color: var(--text-secondary);
}

.glass-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ─────────────────────────────────────────────────────────────
   Glass Live Indicator - Pulsing status indicator
   ───────────────────────────────────────────────────────────── */
.glass-live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: calc(0.75rem * var(--text-size-multiplier));
    color: var(--text-tertiary);
}

.glass-live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: glassPulse 2s ease-in-out infinite;
}

@keyframes glassPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ─────────────────────────────────────────────────────────────
   Glass Empty State - For no data/error displays
   ───────────────────────────────────────────────────────────── */
.glass-empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    animation: glassFadeIn 0.4s ease;
}

.glass-empty-state.visible {
    display: flex;
}

@keyframes glassFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-empty-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(3rem * var(--text-size-multiplier));
    color: var(--text-tertiary);
}

.glass-empty-state h2 {
    font-size: calc(1.5rem * var(--text-size-multiplier));
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.glass-empty-state p {
    font-size: calc(1rem * var(--text-size-multiplier));
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
}

.glass-empty-state.error .glass-empty-icon {
    border-color: var(--danger);
    color: var(--danger);
}

/* ─────────────────────────────────────────────────────────────
   Glass Footer Stats - Bottom summary statistics
   ───────────────────────────────────────────────────────────── */
.glass-footer-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.glass-footer-stat {
    text-align: center;
}

.glass-footer-stat-value {
    font-size: calc(1.25rem * var(--text-size-multiplier));
    font-weight: 600;
    color: var(--text-primary);
}

.glass-footer-stat-label {
    font-size: calc(0.75rem * var(--text-size-multiplier));
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────
   Glass Hero - Page header with ambient glow
   ───────────────────────────────────────────────────────────── */
.glass-hero {
    padding: 2rem 0 1rem;
    position: relative;
}

.glass-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.glass-hero h1 {
    font-size: calc(2.75rem * var(--text-size-multiplier));
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    position: relative;
}

.glass-hero p {
    font-size: calc(1.1rem * var(--text-size-multiplier));
    color: var(--text-secondary);
    font-weight: 400;
}

/* ─────────────────────────────────────────────────────────────
   Glass Chart Tooltip - External tooltip for Chart.js
   ───────────────────────────────────────────────────────────── */
.glass-chart-tooltip {
    position: absolute;
    background: var(--tooltip-bg, #1a1a1a);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    font-size: calc(0.75rem * var(--text-size-multiplier));
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    max-width: 220px;
}

.glass-chart-tooltip.active {
    opacity: 1;
}

.glass-chart-tooltip-title {
    font-weight: 600;
    font-size: calc(0.8125rem * var(--text-size-multiplier));
    margin-bottom: 6px;
    color: var(--text-primary);
}

.glass-chart-tooltip-body {
    color: var(--text-secondary);
    line-height: 1.5;
}

.glass-chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-chart-tooltip-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

[data-bs-theme="light"] .glass-chart-tooltip {
    --tooltip-bg: #ffffff;
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* ─────────────────────────────────────────────────────────────
   Glass Responsive - 1400px breakpoint (1366x768 warehouse screens)
   Bootstrap 5 xxl boundary - intermediate step between full desktop and tablet
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
    .glass-hero {
        padding: 1.5rem 0 0.75rem;
    }

    .glass-hero h1 {
        font-size: 2.25rem;
    }

    .glass-hero::before {
        width: 450px;
        height: 300px;
    }

    .glass-stat-card {
        padding: 1.25rem;
    }

    .glass-stat-value {
        font-size: 2rem;
    }

    .glass-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        top: 1rem;
        right: 1rem;
    }

    .glass-period-selector {
        flex-wrap: wrap;
    }

    .glass-table-container {
        padding: 1.25rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   Glass Responsive - Mobile adjustments
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .glass-hero h1 {
        font-size: calc(1.75rem * var(--text-size-multiplier));
    }

    .glass-hero p {
        font-size: calc(0.9rem * var(--text-size-multiplier));
    }

    .glass-stat-card {
        padding: 1rem;
    }

    .glass-stat-value {
        font-size: calc(1.5rem * var(--text-size-multiplier));
    }

    .glass-stat-label {
        font-size: calc(0.7rem * var(--text-size-multiplier));
    }

    .glass-stat-icon {
        width: 32px;
        height: 32px;
        font-size: calc(0.9rem * var(--text-size-multiplier));
        top: 0.75rem;
        right: 0.75rem;
    }

    .glass-footer-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .glass-footer-stat-value {
        font-size: calc(1rem * var(--text-size-multiplier));
    }

    .glass-footer-stat-label {
        font-size: calc(0.65rem * var(--text-size-multiplier));
    }

    .glass-table-container {
        padding: 1rem;
    }

    .glass-table-scroll {
        max-height: 300px;
    }

    .glass-table tbody td,
    .glass-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: calc(0.75rem * var(--text-size-multiplier));
    }

    .glass-period-selector {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .glass-period-btn {
        padding: 0.3rem 0.6rem;
        font-size: calc(0.7rem * var(--text-size-multiplier));
    }
}

@media (max-width: 480px) {
    .glass-hero h1 {
        font-size: calc(1.5rem * var(--text-size-multiplier));
    }

    .glass-stat-value {
        font-size: calc(1.75rem * var(--text-size-multiplier));
    }
}

/* ─────────────────────────────────────────────────────────────
   User Preferences Page Styles
   ───────────────────────────────────────────────────────────── */
.user-prefs-container {
    max-width: 900px;
}

.user-prefs-theme-btn {
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-prefs-theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
}

.user-prefs-theme-btn.active {
    background: rgba(13, 110, 253, 0.25);
    border-color: rgba(13, 110, 253, 0.5);
    color: #ffffff;
}

[data-bs-theme="light"] .user-prefs-theme-btn {
    background: rgba(13, 110, 253, 0.04);
    border-color: #0d6efd;
    color: #0d6efd;
}

[data-bs-theme="light"] .user-prefs-theme-btn:hover {
    background: rgba(13, 110, 253, 0.08);
    border-color: #0d6efd;
    color: #0d6efd;
}

[data-bs-theme="light"] .user-prefs-theme-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.user-prefs-bulk-btn {
    border-radius: 10px;
    font-size: 0.9rem;
}

.user-prefs-section-label {
    font-size: 0.7rem;
    letter-spacing: 0.8px;
}

.user-prefs-card {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .user-prefs-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.user-prefs-toggle-group {
    border-radius: 8px;
    overflow: hidden;
}

.user-prefs-page-title {
    font-size: 1rem;
}

.user-prefs-page-desc {
    font-size: 0.85rem;
}

.user-prefs-last-updated {
    font-size: 0.8rem;
}

/* ============================================================
   Shared Image Preview / Lightbox
   ============================================================ */

.clickable-thumbnail {
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}

.clickable-thumbnail:hover {
    opacity: 0.85;
}

#imagePreviewModal #previewImage {
    max-height: 80vh;
    width: auto;
    padding-bottom: 1rem;
        font-size: 1.75rem;
    }
}

/* ===== Notification Dropdown ===== */

.notification-dropdown {
    background: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.notification-dropdown[data-bs-theme="dark"] {
    background: rgba(0, 0, 0, 0.8) !important;
    border: none;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.notification-dropdown[data-bs-theme="dark"] .notification-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-header-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bs-body-color);
}

.notification-dropdown[data-bs-theme="dark"] .notification-header-title {
    font-weight: 500;
    color: #FFFFFF;
}

.notification-mark-all-read {
    font-size: 0.75rem;
    color: var(--bs-info);
    text-decoration: none;
    cursor: pointer;
}

.notification-mark-all-read:hover {
    text-decoration: underline;
}

.notification-filters {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.notification-dropdown[data-bs-theme="dark"] .notification-filters {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-filter-btn {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    padding: 3px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-filter-btn:hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.notification-dropdown[data-bs-theme="dark"] .notification-filter-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

.notification-dropdown[data-bs-theme="dark"] .notification-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.notification-filter-btn.active {
    background: rgba(91, 192, 222, 0.15);
    border-color: var(--bs-info);
    color: var(--bs-info);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown[data-bs-theme="light"] .notification-list {
    color-scheme: light;
}

.notification-dropdown[data-bs-theme="dark"] .notification-list {
    color-scheme: dark;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.notification-item:hover {
    background: var(--bs-tertiary-bg);
}

.notification-item.unread {
    background: rgba(91, 192, 222, 0.06);
}

.notification-item.unread:hover {
    background: rgba(91, 192, 222, 0.1);
}

.notification-dropdown[data-bs-theme="dark"] .notification-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-dropdown[data-bs-theme="dark"] .notification-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-dropdown[data-bs-theme="dark"] .notification-item.unread {
    background: rgba(91, 192, 222, 0.08);
}

.notification-dropdown[data-bs-theme="dark"] .notification-item.unread:hover {
    background: rgba(91, 192, 222, 0.14);
}

.notification-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-size: 0.85rem;
    margin-top: 2px;
}

.notification-dropdown[data-bs-theme="dark"] .notification-item-icon {
    background: rgba(255, 255, 255, 0.08);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--bs-body-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dropdown[data-bs-theme="dark"] .notification-item-title {
    font-weight: 400;
    color: #FFFFFF;
}

.notification-item-body {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dropdown[data-bs-theme="dark"] .notification-item-body {
    color: rgba(255, 255, 255, 0.5);
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--bs-tertiary-color);
    margin-top: 3px;
}

.notification-dropdown[data-bs-theme="dark"] .notification-item-time {
    color: rgba(255, 255, 255, 0.4);
}

.notification-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-info);
    margin-top: 6px;
    margin-right: 18px;
}

.notification-item-dismiss {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--bs-tertiary-color);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 2px 6px;
    line-height: 1;
}

.notification-item:hover .notification-item-dismiss {
    opacity: 1;
}

.notification-item-dismiss:hover {
    color: var(--bs-danger);
}

.notification-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.notification-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--bs-border-color);
}

.notification-dropdown[data-bs-theme="dark"] .notification-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-footer a {
    font-size: 0.8rem;
    color: var(--bs-info);
    text-decoration: none;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* ===== Notification Toasts ===== */

#notification-toast-container {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    width: 360px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: toast-slide-in 0.3s ease-out forwards;
}

.notification-toast.toast-dismissing {
    animation: toast-slide-out 0.3s ease-in forwards;
}

[data-bs-theme="dark"] .notification-toast {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.notification-toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-size: calc(0.85rem * var(--text-size-multiplier));
    margin-top: 2px;
}

[data-bs-theme="dark"] .notification-toast-icon {
    background: rgba(255, 255, 255, 0.08);
}

.notification-toast-content {
    flex: 1;
    min-width: 0;
}

.notification-toast-title {
    font-size: calc(0.82rem * var(--text-size-multiplier));
    font-weight: 500;
    color: var(--bs-body-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .notification-toast-title {
    font-weight: 400;
    color: #FFFFFF;
}

.notification-toast-body {
    font-size: calc(0.75rem * var(--text-size-multiplier));
    color: var(--bs-secondary-color);
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .notification-toast-body {
    color: rgba(255, 255, 255, 0.5);
}

.notification-toast-time {
    font-size: calc(0.7rem * var(--text-size-multiplier));
    color: var(--bs-tertiary-color);
    margin-top: 3px;
}

[data-bs-theme="dark"] .notification-toast-time {
    color: rgba(255, 255, 255, 0.4);
}

.notification-toast-dismiss {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--bs-secondary-color);
    font-size: calc(1rem * var(--text-size-multiplier));
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 2px 6px;
    line-height: 1;
}

.notification-toast:hover .notification-toast-dismiss {
    opacity: 1;
}

.notification-toast-dismiss:hover {
    color: var(--bs-danger);
}

.notification-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--bs-info);
    border-radius: 0 0 0 10px;
    animation: toast-progress 20s linear forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(calc(100% + 16px));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(calc(100% + 16px));
        opacity: 0;
    }
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ===== Notifications Page ===== */

.notifications-page {
    --accent: #5bc0de;
}

/* Filter Pills */

.notif-filter-pill {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-filter-pill:hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.notif-filter-pill.active {
    background: rgba(91, 192, 222, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

/* Notification Cards */

.notif-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
}

.notif-card:hover {
    background: var(--bs-secondary-bg);
}

.notif-card.unread {
    background: rgba(91, 192, 222, 0.06);
    border-left: 3px solid var(--accent);
}

.notif-card.unread:hover {
    background: rgba(91, 192, 222, 0.1);
}

.notif-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-size: 1rem;
    margin-top: 2px;
}

.notif-card-content {
    flex: 1;
    min-width: 0;
}

.notif-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bs-body-color);
    line-height: 1.4;
}

.notif-card-body {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
    margin-top: 3px;
    line-height: 1.4;
}

.notif-card-time {
    font-size: 0.75rem;
    color: var(--bs-tertiary-color);
    margin-top: 4px;
}

.notif-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.notif-card-dismiss {
    background: none;
    border: none;
    color: var(--bs-tertiary-color);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 2px 6px;
    line-height: 1;
}

.notif-card:hover .notif-card-dismiss {
    opacity: 1;
}

.notif-card-dismiss:hover {
    color: var(--bs-danger);
}

/* Empty State */

.notif-empty-state {
    padding: 60px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

/* Pagination */

.notifications-page .pagination {
    gap: 0.375rem;
}

.notifications-page .pagination .page-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: calc(0.875rem * var(--text-size-multiplier));
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.notifications-page .pagination .page-link:hover {
    background: var(--glass-hover);
    border-color: #0d6efd;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.notifications-page .pagination .page-item.active .page-link {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.notifications-page .pagination .page-item.disabled .page-link {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* ===== Notification Preferences Page ===== */

.notif-pref-card {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 12px;
    overflow: hidden;
}

.notif-pref-card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.notif-pref-card-body {
    padding: 0;
}

.notif-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    transition: background 0.3s;
}

.notif-pref-row.border-0 {
    border-bottom: none;
}

.notif-pref-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.notif-pref-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-size: 0.85rem;
}

.notif-pref-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--bs-body-color);
}

.notif-pref-desc {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-top: 1px;
}

/* Send Notification modal dropdowns - hide duplicate caret, subtle selection */
.notif-dropdown-toggle.dropdown-toggle::after {
    display: none;
}

.notif-dropdown-toggle + .dropdown-menu .dropdown-item.active,
.notif-dropdown-toggle + .dropdown-menu .dropdown-item.active:hover {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.notif-dropdown-toggle + .dropdown-menu .dropdown-item:hover {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

/* ========================================
   Glass Number Input — modern stepper for <input type="number">
   Add the `glass-number-input` class to any number input and
   Scripts/Shared/glassNumberInput.js auto-wraps it with chevron buttons
   that fade in on hover/focus. Hides the dated native spinners.
   ======================================== */
.glass-number-wrap {
    position: relative;
    display: inline-flex;
    width: 100%;
}
.glass-number-wrap > input.glass-number-input {
    -moz-appearance: textfield;
    padding-right: 1.25rem;
    width: 100%;
}
.glass-number-input::-webkit-inner-spin-button,
.glass-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.glass-number-spin {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 1.1rem;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
    border-radius: 0 var(--border-radius-md, 1rem) var(--border-radius-md, 1rem) 0;
    overflow: hidden;
}
.glass-number-wrap:hover .glass-number-spin,
.glass-number-wrap:focus-within .glass-number-spin {
    opacity: 1;
    pointer-events: auto;
}
.glass-number-wrap > input:disabled ~ .glass-number-spin,
.glass-number-wrap > input[readonly] ~ .glass-number-spin {
    display: none;
}

.glass-number-spin-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease, color 0.1s ease;
    min-width: 0;
    min-height: 0;
}
.glass-number-spin-btn.glass-number-up {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-number-spin-btn:hover {
    background: rgba(139, 92, 246, 0.14);
    color: var(--accent, #8b5cf6);
}
.glass-number-spin-btn:active {
    background: var(--accent, #8b5cf6);
    color: #fff;
}
.glass-number-spin-btn svg {
    pointer-events: none;
    display: block;
}

[data-bs-theme="light"] .glass-number-spin-btn {
    border-left-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.45);
}
[data-bs-theme="light"] .glass-number-spin-btn.glass-number-up {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-bs-theme="light"] .glass-number-spin-btn:hover {
    background: rgba(139, 92, 246, 0.08);
}