        ::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: #8cdabf;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #b2f7e1;
        }

        body {
            background: var(--bg-gradient);
            background-attachment: fixed;
            color: var(--text-primary);
            font-family: 'Segoe UI', Tahoma, sans-serif;
            overflow-x: hidden;
            transition: background 0.3s, color 0.3s;
        }

        .glass-panel {
            background: var(--panel-bg);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border: 1px solid var(--panel-border);
            border-radius: 15px;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
            transition: background 0.3s, border-color 0.3s;
        }

        #login-section {
            height: 100vh;
            display: flex;
            flex-direction: row;
            padding: 0;
            margin: 0;
            overflow: hidden;
            width: 100vw;
        }

        .login-left {
            flex: 4;
            background: url('https://lh3.googleusercontent.com/d/11h9YSk3QIGR0buhJSI0EuJC1cKsWP28O') no-repeat center center;
            background-size: cover;
            position: relative;
        }

        .login-left-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.1);
        }

        .login-right {
            flex: 1;
            min-width: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            background: linear-gradient(135deg, #708caa 0%, #293845 100%);
            position: relative;
        }

        .login-card {
            width: 100%;
            max-width: 360px;
            padding: 2rem 1.5rem;
            border: none !important;
            box-shadow: none !important;
            background: transparent !important;
        }

        .login-title {
            font-size: 2.2rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            color: #ffffff;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            margin-bottom: 0.5rem;
        }

        .text-light-50 {
            color: rgba(255, 255, 255, 0.65);
            font-size: 0.95rem;
            letter-spacing: 0.5px;
        }

        /* Glass Input style customization inside Login */
        .login-right .input-group-text {
            border-color: rgba(255, 255, 255, 0.25) !important;
            background: rgba(255, 255, 255, 0.05) !important;
            color: rgba(255, 255, 255, 0.9) !important;
            transition: all 0.3s;
        }

        .login-right .glass-input {
            border-color: rgba(255, 255, 255, 0.25) !important;
            background: rgba(255, 255, 255, 0.05) !important;
            color: #ffffff !important;
            transition: all 0.3s;
        }

        .login-right .glass-input::placeholder {
            color: rgba(255, 255, 255, 0.45) !important;
        }

        .login-right .input-group:focus-within .input-group-text,
        .login-right .input-group:focus-within .glass-input {
            border-color: #ffffff !important;
            background: rgba(255, 255, 255, 0.1) !important;
            box-shadow: none;
        }

        .login-right #loginBtn {
            background: #ffffff !important;
            color: #293845 !important;
            border: none !important;
            transition: all 0.3s;
        }

        .login-right #loginBtn:hover {
            background: rgba(255, 255, 255, 0.9) !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        }

        .btn-outline-custom-theme {
            color: #b2f7e1 !important;
            border-color: #b2f7e1 !important;
            background: transparent !important;
            transition: all 0.3s;
        }

        .btn-outline-custom-theme:hover {
            color: #293845 !important;
            background: #b2f7e1 !important;
            border-color: #b2f7e1 !important;
            box-shadow: 0 4px 12px rgba(178, 247, 225, 0.4);
            transform: translateY(-2px);
        }

        .btn-custom-water {
            color: #ffffff !important;
            background: linear-gradient(135deg, #00b4db, #0083b0) !important;
            border: none !important;
            transition: all 0.3s ease;
            position: relative;
            overflow: visible;
            box-shadow: 0 4px 15px rgba(0, 180, 219, 0.4) !important;
        }

        .btn-custom-water::before,
        .btn-custom-water::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: inherit;
            border: 2px solid #00b4db;
            pointer-events: none;
            opacity: 0;
        }

        .btn-custom-water::before {
            animation: water-ripple-wave 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
        }

        .btn-custom-water::after {
            animation: water-ripple-wave 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
            animation-delay: 1.1s;
        }

        .btn-custom-water:hover {
            color: #ffffff !important;
            background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 180, 219, 0.6) !important;
        }

        .btn-custom-water:hover::before,
        .btn-custom-water:hover::after {
            animation: none;
        }

        @keyframes water-ripple-wave {
            0% {
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                opacity: 0.8;
            }

            100% {
                top: -15px;
                left: -15px;
                right: -15px;
                bottom: -15px;
                opacity: 0;
                border-color: rgba(0, 180, 219, 0);
            }
        }

        /* Bubble container & styling */
        .bubble-container {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            overflow: hidden;
            border-radius: inherit;
            pointer-events: none;
            z-index: 1;
        }

        .bubble {
            position: absolute;
            bottom: -15px;
            background: rgba(255, 255, 255, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 50%;
            pointer-events: none;
            animation: float-up-bubble 3s infinite ease-in;
        }

        @keyframes float-up-bubble {
            0% {
                transform: translateY(0) scale(0.6);
                opacity: 0;
            }

            15% {
                opacity: 0.7;
            }

            90% {
                opacity: 0.7;
            }

            100% {
                transform: translateY(-70px) scale(1.2);
                opacity: 0;
            }
        }

        /* Position and timing for multiple bubbles */
        .bubble:nth-child(1) {
            left: 10%;
            width: 8px;
            height: 8px;
            animation-delay: 0.2s;
            animation-duration: 2.5s;
        }

        .bubble:nth-child(2) {
            left: 30%;
            width: 12px;
            height: 12px;
            animation-delay: 0.8s;
            animation-duration: 3.2s;
        }

        .bubble:nth-child(3) {
            left: 50%;
            width: 6px;
            height: 6px;
            animation-delay: 1.4s;
            animation-duration: 2.1s;
        }

        .bubble:nth-child(4) {
            left: 70%;
            width: 10px;
            height: 10px;
            animation-delay: 0.4s;
            animation-duration: 2.8s;
        }

        .bubble:nth-child(5) {
            left: 85%;
            width: 13px;
            height: 13px;
            animation-delay: 1.8s;
            animation-duration: 3.5s;
        }

        .bubble:nth-child(6) {
            left: 22%;
            width: 7px;
            height: 7px;
            animation-delay: 2.2s;
            animation-duration: 2.6s;
        }

        .bubble:nth-child(7) {
            left: 62%;
            width: 11px;
            height: 11px;
            animation-delay: 2.6s;
            animation-duration: 3s;
        }

        body.light-mode .btn-outline-custom-theme {
            color: #007bff !important;
            border-color: #007bff !important;
            background: transparent !important;
        }

        body.light-mode .btn-outline-custom-theme:hover {
            color: #fff !important;
            background: #007bff !important;
            border-color: #007bff !important;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
            transform: translateY(-2px);
        }

        /* Cart Table Styling to prevent column squeezing & vertical wrapping */
        .text-xs {
            font-size: 0.78rem !important;
        }

        .btn-xs {
            padding: 2px !important;
            font-size: 0.72rem !important;
            line-height: 1.2 !important;
            border-radius: 4px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            height: 24px !important;
            width: 24px !important;
        }

        .cart-table {
            font-size: 0.78rem !important;
        }

        .cart-table th {
            padding: 8px 4px !important;
            white-space: nowrap !important;
            vertical-align: middle !important;
            text-align: center !important;
            font-size: 0.8rem !important;
            font-weight: 600 !important;
        }

        .cart-table td {
            padding: 6px 8px !important;
            vertical-align: middle !important;
        }

        .cart-table th:nth-child(2),
        .cart-table td:nth-child(2) {
            white-space: normal !important;
            text-align: left !important;
        }

        .cart-table th:not(:nth-child(2)),
        .cart-table td:not(:nth-child(2)) {
            white-space: nowrap !important;
        }

        /* Cart Table cell color adjustments for high readability and matching the design */
        body.light-mode .cart-table td.text-info,
        body.light-mode .cart-table td.text-warning {
            color: #212529 !important;
        }

        .cart-table td.text-info {
            color: #b2f7e1 !important;
        }

        .cart-table td.text-warning {
            color: #ffffff !important;
        }

        /* Premium remove button styles for both modes */
        .cart-table .btn-outline-danger {
            background-color: rgba(220, 53, 69, 0.15) !important;
            border-color: rgba(220, 53, 69, 0.5) !important;
            color: #ff5c5c !important;
            transition: all 0.2s ease;
        }

        .cart-table .btn-outline-danger:hover {
            background-color: #dc3545 !important;
            color: #fff !important;
        }

        body.light-mode .cart-table .btn-outline-danger {
            background-color: rgba(220, 53, 69, 0.08) !important;
            border-color: rgba(220, 53, 69, 0.35) !important;
            color: #dc3545 !important;
        }

        body.light-mode .cart-table .btn-outline-danger:hover {
            background-color: #dc3545 !important;
            color: #fff !important;
        }


        /* Mobile specific adjustments to maximize available width and scale elements */
        @media (max-width: 576px) {
            #public-issue-section {
                padding: 10px !important;
            }

            #public-issue-section .login-card {
                padding: 15px 10px !important;
            }

            .cart-table th,
            .cart-table td {
                padding: 6px 4px !important;
                font-size: 0.72rem !important;
            }

            .cart-table th {
                font-size: 0.75rem !important;
            }

            .btn-xs {
                height: 20px !important;
                width: 20px !important;
                font-size: 0.65rem !important;
            }
        }

        /* Responsive styling */
        @media (max-width: 991px) {
            .login-left {
                display: none;
            }

            .login-right {
                flex: 1;
                width: 100%;
            }
        }

        #app-section {
            display: none;
        }

        #sidebar {
            position: fixed;
            top: 0;
            left: -300px;
            width: 280px;
            height: 100vh;
            z-index: 1040;
            transition: left 0.3s ease-in-out;
            padding-top: 60px;
            border-radius: 0 15px 15px 0;
            overflow-y: auto;
        }

        #sidebar.open {
            left: 0;
        }

        .sidebar-menu-item {
            padding: 12px 25px;
            color: var(--text-secondary);
            text-decoration: none;
            display: block;
            font-size: 1.05rem;
            transition: all 0.2s;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            cursor: pointer;
        }

        /* 🔥 Sidebar Hover Color */
        .sidebar-menu-item:hover,
        .sidebar-menu-item.active {
            background: var(--sidebar-menu-hover);
            color: var(--text-primary);
            border-left: 4px solid #b2f7e1 !important;
        }

        #sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1030;
            display: none;
        }

        .main-content {
            padding: 20px;
        }

        .top-navbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 20px;
            margin-bottom: 20px;
        }

        .hamburger-btn {
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.3s;
        }

        .stat-card {
            padding: 20px;
            text-align: center;
            margin-bottom: 20px;
            transition: transform 0.3s;
        }

        #center-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            width: 90%;
            max-width: 650px;
            max-height: 90vh;
            z-index: 1060;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease-in-out;
            border-radius: 15px;
            display: flex;
            flex-direction: column;
            background: var(--modal-bg);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
        }

        #center-modal.open {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            visibility: visible;
        }

        #challan-print-modal.open,
        #requisition-print-modal.open {
            transform: translate(-50%, -50%) scale(1) !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        .modal-header-custom {
            padding: 15px 25px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-body-custom {
            padding: 25px;
            overflow-y: auto;
            flex-grow: 1;
        }

        .close-modal-btn {
            background: transparent;
            border: none;
            color: #ff4d4d;
            font-size: 1.5rem;
            cursor: pointer;
            transition: 0.2s;
        }

        .form-control.glass-input,
        .form-select.glass-input {
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            color: var(--text-primary);
            transition: background 0.3s, color 0.3s;
        }

        /* 🔥 Input Focus Color */
        .form-control.glass-input:focus,
        .form-select.glass-input:focus {
            background: var(--input-focus-bg);
            box-shadow: 0 0 8px rgba(178, 247, 225, 0.5) !important;
            color: var(--text-primary);
            border-color: #b2f7e1 !important;
        }

        .form-select.glass-input option {
            background: #fff;
            color: #333;
        }

        /* Full Screen UI CSS */
        .full-screen-mode {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            z-index: 1060 !important;
            background: var(--bg-gradient) !important;
            padding: 20px !important;
            margin: 0 !important;
            border-radius: 0 !important;
            box-sizing: border-box !important;
            overflow-y: auto !important;
        }

        .full-screen-mode .table-responsive {
            max-height: calc(100vh - 140px) !important;
        }

        .table-responsive {
            max-height: 72vh;
            overflow-y: auto;
        }

        .inv-tab-content {
            display: none;
        }

        .inv-tab-content.active {
            display: block;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .page-view {
            display: none;
        }

        .page-view.active {
            display: block;
        }

        .hide-history-actions .hist-action-col {
            display: none !important;
        }

        /* Column filter row — hidden, using ONLY Excel-style dropdown filters on header row */
        .filter-row {
            display: none !important;
        }

        .input-group .glass-input {
            border-right: none;
        }

        .input-group .btn-primary {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }

        .readonly-input {
            background: rgba(0, 0, 0, 0.3) !important;
            color: #b2f7e1 !important;
            font-weight: bold;
            cursor: not-allowed;
        }

        .table-dark th {
            position: sticky !important;
            top: 0 !important;
            z-index: 100 !important;
            padding-right: 28px !important;
            color: #b2f7e1;
            background: rgba(30, 30, 48, 0.85) !important;
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
            white-space: nowrap;
            text-align: center;
            border-color: rgba(255, 255, 255, 0.1);
        }

        .table-dark td {
            color: #ddd;
            vertical-align: middle;
            white-space: nowrap;
            border-color: rgba(255, 255, 255, 0.1);
        }

        /* 🔥 Global Table Hover Color - LIGHTER FOR BOTH MODES 🔥 */
        .table-hover>tbody>tr:hover>* {
            background-color: rgba(178, 247, 225, 0.15) !important;
            color: var(--text-primary) !important;
        }

        /* 🔥 Dashboard Widgets Styles 🔥 */
        #calendarContainer table {
            width: 100%;
            border-collapse: collapse;
            color: var(--text-primary);
        }

        #calendarContainer th {
            color: #b2f7e1;
            text-align: center;
            padding: 5px;
            font-size: 0.8rem;
        }

        #calendarContainer td {
            text-align: center;
            padding: 8px;
            cursor: default;
            border-radius: 8px;
            transition: 0.3s;
            font-size: 0.9rem;
        }

        #calendarContainer .today {
            background: #b2f7e1 !important;
            color: #000 !important;
            font-weight: bold;
            box-shadow: 0 0 10px #b2f7e1;
        }

        #calendarContainer td:hover:not(.today) {
            background: rgba(255, 255, 255, 0.1);
        }

        #digitalClock {
            letter-spacing: 2px;
            text-shadow: 0 0 15px rgba(178, 247, 225, 0.4);
        }

        /* ========================================================================= */
        /* 🔥 LIGHT MODE OVERRIDES (UPDATED FOR PERFECT VISIBILITY) 🔥 */
        /* ========================================================================= */

        body.light-mode {
            --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #d7e1ec 100%);
            --text-primary: #1a1a2e;
            --text-secondary: #495057;
            --panel-bg: rgba(255, 255, 255, 0.88);
            --panel-border: rgba(0, 0, 0, 0.1);
            --modal-bg: rgba(255, 255, 255, 0.98);
            --input-bg: rgba(255, 255, 255, 0.9);
            --input-border: rgba(0, 0, 0, 0.2);
            --input-focus-bg: #ffffff;
            --sidebar-menu-hover: rgba(0, 123, 255, 0.08);
            background: var(--bg-gradient);
            color: #333;
        }

        body.light-mode .glass-panel {
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
            border-color: rgba(0, 0, 0, 0.1);
        }

        /* Sidebar in Light Mode */
        body.light-mode .sidebar-menu-item {
            color: #495057;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        body.light-mode .sidebar-menu-item:hover,
        body.light-mode .sidebar-menu-item.active {
            background: #fff;
            color: #000;
            border-left: 4px solid #007bff !important;
        }

        body.light-mode .hamburger-btn,
        body.light-mode #page-title {
            color: #333 !important;
        }

        body.light-mode #center-modal {
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
        }

        body.light-mode .modal-header-custom {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        /* Form Inputs in Light Mode */
        body.light-mode .form-control.glass-input,
        body.light-mode .form-select.glass-input {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(0, 0, 0, 0.2);
            color: #333;
        }

        body.light-mode .form-control.glass-input:focus,
        body.light-mode .form-select.glass-input:focus {
            background: #fff;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.3) !important;
            border-color: #007bff !important;
            color: #333;
        }

        body.light-mode .readonly-input {
            background: rgba(0, 0, 0, 0.05) !important;
            color: #0056b3 !important;
            font-weight: bold;
            cursor: not-allowed;
        }

        /* Text Color Adjustments for better contrast in Light Mode */
        body.light-mode .text-light,
        body.light-mode .text-white {
            color: #333 !important;
        }

        body.light-mode .text-secondary {
            color: #6c757d !important;
        }

        body.light-mode .text-info {
            color: #007bff !important;
        }

        body.light-mode .text-warning {
            color: #d39e00 !important;
        }

        body.light-mode .text-success {
            color: #198754 !important;
        }

        body.light-mode .text-danger {
            color: #dc3545 !important;
        }

        /* Badges & Buttons */
        body.light-mode .badge.bg-opacity-25 {
            background-color: rgba(0, 0, 0, 0.05) !important;
        }

        body.light-mode .btn-outline-info {
            color: #007bff;
            border-color: #007bff;
        }

        body.light-mode .btn-outline-info:hover {
            background-color: #007bff;
            color: #fff !important;
        }

        body.light-mode .btn-info.text-white {
            background-color: #007bff;
            border-color: #007bff;
            color: #fff !important;
        }

        /* Table Fixes for Light Mode */
        body.light-mode .table-dark {
            --bs-table-bg: transparent;
            --bs-table-color: #333;
            --bs-table-border-color: rgba(0, 0, 0, 0.1);
        }

        body.light-mode .table-dark th {
            background: rgba(240, 244, 248, 0.9) !important;
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
            color: #0056b3 !important;
            border-color: rgba(0, 0, 0, 0.1) !important;
            font-weight: bold;
        }

        body.light-mode .table-dark td {
            background-color: transparent !important;
            color: #333 !important;
            border-color: rgba(0, 0, 0, 0.1) !important;
        }

        /* 🔥 Changed Hover Color to #b2f7e1 in Light Mode without black shadow 🔥 */
        body.light-mode .table-hover>tbody>tr:hover>*,
        body.light-mode .table-hover>tbody>tr:hover>td,
        body.light-mode .table-hover>tbody>tr:hover>th {
            background-color: #b2f7e1 !important;
            color: #000 !important;
            box-shadow: inset 0 0 0 9999px #b2f7e1 !important;
        }

        /* Filter/Search Row in Light Mode */
        body.light-mode .filter-row th {
            background: rgba(0, 0, 0, 0.06) !important;
        }
        body.light-mode .filter-row input {
            background: #fff !important;
            border: 1px solid rgba(0, 0, 0, 0.2) !important;
            color: #333 !important;
        }

        body.light-mode .filter-row input:focus {
            border-color: #007bff !important;
            color: #333;
            box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
        }

        body.light-mode .filter-row input::placeholder {
            color: #888;
        }

        body.light-mode .input-group-text.bg-dark {
            background: #e9ecef !important;
            color: #333 !important;
            border-color: rgba(0, 0, 0, 0.2) !important;
        }

        body.light-mode .bg-black.bg-opacity-10 {
            background-color: rgba(0, 0, 0, 0.03) !important;
            border-color: rgba(0, 0, 0, 0.1) !important;
        }

        /* Widgets (Calendar & Clock) in Light Mode */
        body.light-mode #calendarContainer th {
            color: #007bff;
            font-weight: bold;
        }

        body.light-mode #calendarContainer td {
            color: #333;
        }

        body.light-mode #calendarContainer td:hover:not(.today) {
            background: rgba(0, 0, 0, 0.05);
        }

        body.light-mode #calendarContainer .today {
            background: #007bff !important;
            color: #fff !important;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
        }

        body.light-mode #digitalClock {
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
            color: #222 !important;
        }

        @media (max-width: 768px) {
            .main-content {
                padding: 10px;
            }

            .glass-panel {
                padding: 15px !important;
            }

            .top-navbar {
                padding: 10px;
                margin-bottom: 15px;
            }

            #page-title {
                font-size: 1.1rem;
            }

            .setup-left-panel {
                border-right: none !important;
                border-bottom: 1px solid rgba(0, 0, 0, 0.1);
                padding-bottom: 20px;
                margin-bottom: 20px;
            }

            #center-modal {
                width: 95%;
                max-height: 95vh;
                padding: 0;
            }

            .modal-body-custom {
                padding: 15px;
            }

            .stat-card {
                padding: 15px 10px;
            }

            .stat-card h3 {
                font-size: 1.3rem;
            }

            .stat-card h6 {
                font-size: 0.8rem;
            }

            .d-flex.gap-2 {
                flex-wrap: wrap;
            }

            .d-flex.gap-2>* {
                flex: 1 1 auto;
                min-width: 100px;
            }
        }

        @media (min-width: 769px) {
            .setup-left-panel {
                border-right: 1px solid #ccc;
                padding-right: 20px;
            }
        }

        /* Chevron rotation for collapsible sidebar items */
        #nav-store-inv-trigger[aria-expanded="true"] #store-inv-arrow,
        #nav-master-inv-trigger[aria-expanded="true"] #master-inv-arrow,
        #nav-forms-inv-trigger[aria-expanded="true"] #forms-inv-arrow,
        #nav-scrap-repair-trigger[aria-expanded="true"] #scrap-repair-arrow,
        #nav-scrap-inv-trigger[aria-expanded="true"] #scrap-inv-arrow,
        #nav-repair-inv-trigger[aria-expanded="true"] #repair-inv-arrow,
        #nav-reuse-product-trigger[aria-expanded="true"] #reuse-product-arrow,
        #nav-physical-inv-trigger[aria-expanded="true"] #physical-inv-arrow {
            transform: rotate(180deg);
        }

        /* Global auto-fit columns with max-width limit of 500px on all cells */
        table th,
        table td {
            max-width: 500px !important;
            white-space: normal !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
        }


        /* ===================== EXCEL-STYLE FILTER DROPDOWN ===================== */
        /* th must be relative so the absolute-positioned caret sits inside it */
        thead th {
            position: relative;
        }

        .excel-filter-trigger {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            cursor: pointer;
            font-size: 11px;
            background: none !important;
            border: none !important;
            transition: color 0.2s, text-shadow 0.2s;
            vertical-align: middle;
            flex-shrink: 0;
            z-index: 5;
        }

        .table-dark th .excel-filter-trigger {
            color: #38bdf8 !important;
            opacity: 0.85;
        }

        body.light-mode table th .excel-filter-trigger,
        body.light-mode .table-dark th .excel-filter-trigger {
            color: #0284c7 !important;
            opacity: 0.9;
        }

        .excel-filter-trigger:hover,
        .excel-filter-trigger.active,
        .table-dark th:hover .excel-filter-trigger {
            color: #00dcff !important;
            opacity: 1 !important;
            text-shadow: 0 0 8px rgba(0, 220, 255, 0.8);
        }

        body.light-mode table th:hover .excel-filter-trigger,
        body.light-mode .table-dark th:hover .excel-filter-trigger {
            color: #0369a1 !important;
            opacity: 1 !important;
            text-shadow: 0 0 6px rgba(2, 132, 199, 0.5);
        }

        .excel-filter-trigger.filtered {
            color: #00dcff !important;
            text-shadow: 0 0 6px rgba(0, 220, 255, 0.8);
        }

        body.light-mode .excel-filter-trigger.filtered {
            color: #0056b3 !important;
            text-shadow: 0 0 4px rgba(0, 86, 179, 0.4);
        }

        /* Resizable columns styling */
        .table-resize-handle {
            position: absolute;
            top: 0;
            right: 0;
            width: 4px;
            height: 100%;
            cursor: col-resize;
            user-select: none;
            z-index: 10;
            transition: background-color 0.2s;
        }

        .table-resize-handle:hover,
        .table-resize-handle.resizing {
            background-color: rgba(0, 220, 255, 0.45) !important;
            box-shadow: 0 0 4px rgba(0, 220, 255, 0.6);
        }

        body.light-mode .table-resize-handle:hover,
        body.light-mode .table-resize-handle.resizing {
            background-color: rgba(0, 86, 179, 0.4) !important;
            box-shadow: 0 0 4px rgba(0, 86, 179, 0.6);
        }

        /* ===== LIGHT MODE: Excel Filter Dropdown ===== */
        body.light-mode #excelFilterDropdown {
            background: #ffffff;
            border: 1px solid rgba(0, 123, 255, 0.25);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 123, 255, 0.08);
            color: #333;
        }

        body.light-mode .efd-sort-btn {
            color: #444;
        }

        body.light-mode .efd-sort-btn:hover {
            background: rgba(0, 123, 255, 0.1);
            color: #0056b3;
        }

        body.light-mode .efd-divider {
            border-top: 1px solid rgba(0, 0, 0, 0.1);
        }

        body.light-mode .efd-clear-btn {
            color: #dc3545;
        }

        body.light-mode .efd-clear-btn:hover {
            background: rgba(220, 53, 69, 0.08);
        }

        body.light-mode .efd-clear-all-btn {
            color: #fd7e14;
        }

        body.light-mode .efd-clear-all-btn:hover {
            background: rgba(253, 126, 20, 0.08);
        }

        body.light-mode #excelFilterSearch {
            background: rgba(0, 0, 0, 0.04);
            border: 1px solid rgba(0, 123, 255, 0.2);
            color: #333;
        }

        body.light-mode #excelFilterSearch::placeholder {
            color: rgba(0, 0, 0, 0.35);
        }

        body.light-mode #excelFilterSearch:focus {
            border-color: rgba(0, 123, 255, 0.5);
        }

        body.light-mode #excelFilterList::-webkit-scrollbar-thumb {
            background: rgba(0, 123, 255, 0.3);
        }

        body.light-mode .efd-check-item:hover {
            background: rgba(0, 123, 255, 0.08);
        }

        body.light-mode .efd-check-item input[type="checkbox"] {
            accent-color: #007bff;
        }

        body.light-mode .efd-check-item label {
            color: #333;
        }

        body.light-mode .efd-mode-btn {
            border-color: rgba(0, 123, 255, 0.4);
            color: #0056b3;
            background: rgba(0, 123, 255, 0.08);
        }

        body.light-mode .efd-mode-btn:hover {
            background: rgba(0, 123, 255, 0.15);
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
        }

        body.light-mode .efd-mode-menu {
            background: #f8f9fa;
            border: 1px solid rgba(0, 123, 255, 0.25);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        body.light-mode .efd-mode-menu-item {
            color: rgba(50, 60, 80, 0.8);
        }

        body.light-mode .efd-mode-menu-item:hover {
            background: rgba(0, 123, 255, 0.1);
            color: #0056b3;
        }

        body.light-mode .efd-mode-menu-item.active {
            color: #0056b3;
        }

        body.light-mode .efd-mode-menu-item.active::before {
            color: #0056b3;
        }

        body.light-mode .efd-cancel-btn {
            background: rgba(0, 0, 0, 0.05);
            color: #555;
            border: 1px solid rgba(0, 0, 0, 0.15);
        }

        body.light-mode .efd-cancel-btn:hover {
            background: rgba(0, 0, 0, 0.1);
        }

        .th-text-wrap {
            display: block;
            width: 100%;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding-right: 16px; /* space for the caret button */
        }

        #excelFilterDropdown {
            position: fixed;
            z-index: 999999 !important;
            min-width: 230px;
            max-width: 290px;
            background: #1a1a2e;
            border: 1px solid rgba(0, 220, 255, 0.25);
            border-radius: 10px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 220, 255, 0.08);
            padding: 6px 0 8px 0;
            display: none;
            font-size: 13px;
            color: #cdd6f4;
            user-select: none;
        }

        #excelFilterDropdown.show {
            display: block !important;
        }

        .efd-section {
            padding: 4px 10px;
        }

        .efd-sort-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 12px;
            cursor: pointer;
            border-radius: 5px;
            transition: background 0.15s;
            font-size: 13px;
            color: #cdd6f4;
        }

        .efd-sort-btn:hover {
            background: rgba(0, 220, 255, 0.12);
            color: #00dcff;
        }

        .efd-sort-btn i {
            width: 16px;
            text-align: center;
        }

        .efd-divider {
            border: none;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            margin: 5px 0;
        }

        .efd-clear-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            cursor: pointer;
            border-radius: 5px;
            color: #f38ba8;
            font-size: 12px;
            transition: background 0.15s;
        }

        .efd-clear-btn:hover {
            background: rgba(243, 139, 168, 0.12);
        }

        .efd-clear-all-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            cursor: pointer;
            border-radius: 5px;
            color: #fab387;
            font-size: 12px;
            transition: background 0.15s;
        }

        .efd-clear-all-btn:hover {
            background: rgba(250, 179, 135, 0.12);
        }

        .efd-search-wrap {
            padding: 5px 10px 4px 10px;
        }

        #excelFilterSearch {
            width: 100%;
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(0, 220, 255, 0.2);
            border-radius: 6px;
            color: #cdd6f4;
            padding: 5px 10px;
            font-size: 12px;
            outline: none;
            box-sizing: border-box;
        }

        #excelFilterSearch::placeholder {
            color: rgba(205, 214, 244, 0.4);
        }

        #excelFilterSearch:focus {
            border-color: rgba(0, 220, 255, 0.5);
        }

        #excelFilterList {
            max-height: 200px;
            overflow-y: auto;
            padding: 4px 6px;
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 220, 255, 0.3) transparent;
        }

        #excelFilterList::-webkit-scrollbar {
            width: 5px;
        }

        #excelFilterList::-webkit-scrollbar-thumb {
            background: rgba(0, 220, 255, 0.3);
            border-radius: 3px;
        }

        .efd-check-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 7px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.12s;
        }

        .efd-check-item:hover {
            background: rgba(0, 220, 255, 0.08);
        }

        .efd-check-item input[type="checkbox"] {
            width: 14px;
            height: 14px;
            accent-color: #00dcff;
            cursor: pointer;
            flex-shrink: 0;
        }

        .efd-check-item label {
            cursor: pointer;
            font-size: 12.5px;
            color: #cdd6f4;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 190px;
        }

        /* ---- Search Mode Single Pill Dropdown ---- */
        .efd-mode-wrap {
            padding: 4px 10px 6px 10px;
            position: relative;
        }

        .efd-mode-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px 4px 10px;
            font-size: 11.5px;
            font-weight: 600;
            border-radius: 20px;
            border: 1px solid rgba(0, 220, 255, 0.4);
            color: #00dcff;
            background: rgba(0, 180, 216, 0.12);
            cursor: pointer;
            transition: all 0.15s;
            user-select: none;
            white-space: nowrap;
        }

        .efd-mode-btn:hover {
            background: rgba(0, 180, 216, 0.22);
            box-shadow: 0 2px 8px rgba(0, 180, 216, 0.25);
        }

        .efd-mode-btn .efd-chevron {
            font-size: 9px;
            opacity: 0.7;
            transition: transform 0.15s;
        }

        .efd-mode-btn.open .efd-chevron {
            transform: rotate(180deg);
        }

        .efd-mode-menu {
            display: none;
            position: absolute;
            left: 10px;
            top: calc(100% + 2px);
            background: #11111f;
            border: 1px solid rgba(0, 220, 255, 0.25);
            border-radius: 8px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
            z-index: 99;
            min-width: 140px;
            overflow: hidden;
        }

        .efd-mode-menu.open {
            display: block;
        }

        .efd-mode-menu-item {
            padding: 8px 14px;
            font-size: 12px;
            color: rgba(205, 214, 244, 0.75);
            cursor: pointer;
            transition: background 0.12s, color 0.12s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .efd-mode-menu-item:hover {
            background: rgba(0, 220, 255, 0.1);
            color: #00dcff;
        }

        .efd-mode-menu-item.active {
            color: #00dcff;
            font-weight: 700;
        }

        .efd-mode-menu-item.active::before {
            content: '✓';
            font-size: 11px;
            color: #00dcff;
        }

        .efd-mode-menu-item:not(.active)::before {
            content: '';
            display: inline-block;
            width: 11px;
        }

        .efd-footer {
            display: flex;
            gap: 6px;
            padding: 6px 10px 2px 10px;
        }

        .efd-apply-btn {
            flex: 1;
            background: linear-gradient(135deg, #00b4d8, #0077b6);
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 6px 0;
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.15s;
        }

        .efd-apply-btn:hover {
            opacity: 0.85;
        }

        .efd-cancel-btn {
            background: rgba(255, 255, 255, 0.07);
            color: #cdd6f4;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 12.5px;
            cursor: pointer;
            transition: background 0.15s;
        }

        .efd-cancel-btn:hover {
            background: rgba(255, 255, 255, 0.13);
        }

        /* ===================== PHYSICAL INVENTORY EMPLOYEE SEARCH-SELECT ===================== */
        .physical-emp-search-box {
            position: relative;
            width: 180px;
            display: inline-block;
        }

        .physical-emp-search-box .emp-search-input {
            width: 100%;
            box-sizing: border-box;
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 6px;
            color: #e0e0e0;
            padding: 3px 26px 3px 8px;
            font-size: 0.8rem;
            transition: border-color 0.2s, box-shadow 0.2s;
            cursor: pointer;
        }

        .physical-emp-search-box .emp-search-input:focus {
            outline: none;
            border-color: rgba(0, 220, 255, 0.55);
            box-shadow: 0 0 8px rgba(0, 220, 255, 0.25);
        }

        .physical-emp-search-box .emp-search-input:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .physical-emp-search-box .emp-search-chevron {
            position: absolute;
            right: 7px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.7rem;
            pointer-events: none;
            transition: transform 0.2s;
        }

        .physical-emp-search-box.open .emp-search-chevron {
            transform: translateY(-50%) rotate(180deg);
        }

        .physical-emp-search-box .emp-dropdown-list {
            display: none;
            position: fixed;
            z-index: 99999;
            background: #1a2235;
            border: 1px solid rgba(0, 220, 255, 0.3);
            border-radius: 8px;
            max-height: 220px;
            overflow-y: auto;
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
            min-width: 200px;
        }

        .physical-emp-search-box.open .emp-dropdown-list {
            display: block;
        }

        .physical-emp-search-box .emp-dropdown-list .emp-item {
            padding: 7px 12px;
            cursor: pointer;
            font-size: 0.82rem;
            color: #ddd;
            transition: background 0.15s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .physical-emp-search-box .emp-dropdown-list .emp-item:hover,
        .physical-emp-search-box .emp-dropdown-list .emp-item.selected {
            background: rgba(0, 220, 255, 0.15);
            color: #00dcff;
        }

        .physical-emp-search-box .emp-dropdown-list .emp-item.no-match {
            color: rgba(255, 255, 255, 0.35);
            cursor: default;
            font-style: italic;
        }

        body.light-mode .physical-emp-search-box .emp-search-input {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(0, 0, 0, 0.2);
            color: #333;
        }

        body.light-mode .physical-emp-search-box .emp-search-chevron {
            color: #555;
        }

        body.light-mode .physical-emp-search-box .emp-dropdown-list {
            background: #fff;
            border-color: rgba(0, 123, 255, 0.35);
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
        }

        body.light-mode .physical-emp-search-box .emp-dropdown-list .emp-item {
            color: #333;
        }

        body.light-mode .physical-emp-search-box .emp-dropdown-list .emp-item:hover,
        body.light-mode .physical-emp-search-box .emp-dropdown-list .emp-item.selected {
            background: rgba(0, 123, 255, 0.1);
            color: #0056b3;
        }

        /* Full-screen Syncing Loader Overlay */
        body.syncing::after {
            content: "Syncing Database... Please wait";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 50 50'%3E%3Cpath fill='%23b2f7e1' d='M25,5A20,20,0,0,0,5,25A20,20,0,0,0,25,45A2,2,0,0,0,27,43A2,2,0,0,0,25,41A16,16,0,0,1,9,25A16,16,0,0,1,25,9A16,16,0,0,1,41,25A2,2,0,0,0,43,27A2,2,0,0,0,45,25A20,20,0,0,0,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center 42%;
            z-index: 100000;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #b2f7e1;
            font-family: sans-serif;
            font-weight: bold;
            font-size: 1.25rem;
            padding-top: 110px;
            box-sizing: border-box;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        /* Full-screen Page Transition Loader Overlay */
        #page-page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent; /* no overlay background */
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            z-index: 999999;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.2s ease, visibility 0.2s ease;
            opacity: 0;
            visibility: hidden;
        }
        #page-page-loader.active {
            opacity: 1;
            visibility: visible;
        }
        #page-page-loader .loader-card {
            background: transparent;
            border: none;
            box-shadow: none;
            padding: 30px 40px;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: #ffffff;
            font-family: 'Outfit', 'Inter', sans-serif;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
        #page-page-loader .spinner-box {
            width: 60px;
            height: 60px;
            margin-bottom: 15px;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 50 50'%3E%3Cpath fill='%2300d2fc' d='M25,5A20,20,0,0,0,5,25A20,20,0,0,0,25,45A2,2,0,0,0,27,43A2,2,0,0,0,25,41A16,16,0,0,1,9,25A16,16,0,0,1,25,9A16,16,0,0,1,41,25A2,2,0,0,0,43,27A2,2,0,0,0,45,25A20,20,0,0,0,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center;
        }
        #page-page-loader .loader-text {
            font-weight: 600;
            font-size: 1.1rem;
            letter-spacing: 0.05em;
            color: #00d2fc;
            text-shadow: 0 0 10px rgba(0, 210, 252, 0.4);
        }

        /* Public Portal Product Name Search Custom Styles */
        .public-search-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.2s;
            text-align: left;
            font-size: 13px;
            color: #e2e8f0;
        }

        .public-search-item:hover {
            background: rgba(0, 180, 219, 0.2);
            color: #ffffff;
        }

        .public-search-item:last-child {
            border-bottom: none;
        }

        .public-search-item-code {
            color: #00d2fc;
            font-weight: bold;
            margin-right: 8px;
            font-family: monospace;
        }

        /* ===== LIGHT MODE: Public Portal Search ===== */
        body.light-mode .public-search-item {
            color: #333;
            border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        }

        body.light-mode .public-search-item:hover {
            background: rgba(0, 123, 255, 0.1);
            color: #0056b3;
        }

        body.light-mode .public-search-item-code {
            color: #0056b3;
        }

        body.light-mode #public-product-search-results {
            background: #fff;
            border: 1px solid rgba(0, 123, 255, 0.25);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        }

        /* ===== LIGHT MODE: Syncing Overlay ===== */
        body.light-mode.syncing::after {
            background: rgba(255, 255, 255, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 50 50'%3E%3Cpath fill='%230056b3' d='M25,5A20,20,0,0,0,5,25A20,20,0,0,0,25,45A2,2,0,0,0,27,43A2,2,0,0,0,25,41A16,16,0,0,1,9,25A16,16,0,0,1,25,9A16,16,0,0,1,41,25A2,2,0,0,0,43,27A2,2,0,0,0,45,25A20,20,0,0,0,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center 42%;
            color: #0056b3;
        }

        /* ===== LIGHT MODE: Scrollbar ===== */
        body.light-mode ::-webkit-scrollbar-thumb {
            background: #94bfdf;
        }

        body.light-mode ::-webkit-scrollbar-thumb:hover {
            background: #007bff;
        }

        /* ===== LIGHT MODE: Sidebar ===== */
        body.light-mode #sidebar {
            background: linear-gradient(180deg, #ffffff 0%, #f0f4f8 100%);
            border-right: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        }

        /* ===== LIGHT MODE: Top Navbar ===== */
        body.light-mode .top-navbar {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 12px;
        }

        /* ===== LIGHT MODE: stat-card ===== */
        body.light-mode .stat-card {
            color: #333;
        }

        /* ===== LIGHT MODE: badge bg-dark ===== */
        body.light-mode .badge.bg-dark,
        body.light-mode .bg-dark:not(#sidebar):not(table):not(thead):not(th) {
            background-color: #e9ecef !important;
            color: #333 !important;
        }

        body.light-mode .text-light-50 {
            color: #666 !important;
        }

        /* ===== LIGHT MODE: btn-outline-secondary ===== */
        body.light-mode .btn-outline-secondary {
            color: #555;
            border-color: #aaa;
        }

        body.light-mode .btn-outline-secondary:hover {
            background-color: #e9ecef;
            color: #333;
            border-color: #888;
        }

        /* ===== LIGHT MODE: alerts inside panels ===== */
        body.light-mode .alert-danger {
            background: rgba(220, 53, 69, 0.1);
            color: #842029;
            border-color: rgba(220, 53, 69, 0.3);
        }

        body.light-mode .alert-warning {
            background: rgba(255, 193, 7, 0.12);
            color: #664d03;
            border-color: rgba(255, 193, 7, 0.35);
        }

        body.light-mode .alert-info {
            background: rgba(0, 123, 255, 0.1);
            color: #084298;
            border-color: rgba(0, 123, 255, 0.25);
        }

        body.light-mode .alert-success {
            background: rgba(25, 135, 84, 0.1);
            color: #0a3622;
            border-color: rgba(25, 135, 84, 0.25);
        }


/* ===================== MATERIALS RETURN FORM (MRF) PDF STYLES ===================== */
.mrf-paper-wrapper {
            font-family: sans-serif;
            font-weight: bold;
            font-size: 1.25rem;
            padding-top: 110px;
            box-sizing: border-box;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        /* Full-screen Page Transition Loader Overlay */
        #page-page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent; /* no overlay background */
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            z-index: 999999;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.2s ease, visibility 0.2s ease;
            opacity: 0;
            visibility: hidden;
        }
        #page-page-loader.active {
            opacity: 1;
            visibility: visible;
        }
        #page-page-loader .loader-card {
            background: transparent;
            border: none;
            box-shadow: none;
            padding: 30px 40px;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: #ffffff;
            font-family: 'Outfit', 'Inter', sans-serif;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
        #page-page-loader .spinner-box {
            width: 60px;
            height: 60px;
            margin-bottom: 15px;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 50 50'%3E%3Cpath fill='%2300d2fc' d='M25,5A20,20,0,0,0,5,25A20,20,0,0,0,25,45A2,2,0,0,0,27,43A2,2,0,0,0,25,41A16,16,0,0,1,9,25A16,16,0,0,1,25,9A16,16,0,0,1,41,25A2,2,0,0,0,43,27A2,2,0,0,0,45,25A20,20,0,0,0,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center;
        }
        #page-page-loader .loader-text {
            font-weight: 600;
            font-size: 1.1rem;
            letter-spacing: 0.05em;
            color: #00d2fc;
            text-shadow: 0 0 10px rgba(0, 210, 252, 0.4);
        }

        /* Public Portal Product Name Search Custom Styles */
        .public-search-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.2s;
            text-align: left;
            font-size: 13px;
            color: #e2e8f0;
        }

        .public-search-item:hover {
            background: rgba(0, 180, 219, 0.2);
            color: #ffffff;
        }

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

        .public-search-item-code {
            color: #00d2fc;
            font-weight: bold;
            margin-right: 8px;
            font-family: monospace;
        }

        /* ===== LIGHT MODE: Public Portal Search ===== */
        body.light-mode .public-search-item {
            color: #333;
            border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        }

        body.light-mode .public-search-item:hover {
            background: rgba(0, 123, 255, 0.1);
            color: #0056b3;
        }

        body.light-mode .public-search-item-code {
            color: #0056b3;
        }

        body.light-mode #public-product-search-results {
            background: #fff;
            border: 1px solid rgba(0, 123, 255, 0.25);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        }

        /* ===== LIGHT MODE: Syncing Overlay ===== */
        body.light-mode.syncing::after {
            background: rgba(255, 255, 255, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 50 50'%3E%3Cpath fill='%230056b3' d='M25,5A20,20,0,0,0,5,25A20,20,0,0,0,25,45A2,2,0,0,0,27,43A2,2,0,0,0,25,41A16,16,0,0,1,9,25A16,16,0,0,1,25,9A16,16,0,0,1,41,25A2,2,0,0,0,43,27A2,2,0,0,0,45,25A20,20,0,0,0,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center 42%;
            color: #0056b3;
        }

        /* ===== LIGHT MODE: Scrollbar ===== */
        body.light-mode ::-webkit-scrollbar-thumb {
            background: #94bfdf;
        }

        body.light-mode ::-webkit-scrollbar-thumb:hover {
            background: #007bff;
        }

        /* ===== LIGHT MODE: Sidebar ===== */
        body.light-mode #sidebar {
            background: linear-gradient(180deg, #ffffff 0%, #f0f4f8 100%);
            border-right: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        }

        /* ===== LIGHT MODE: Top Navbar ===== */
        body.light-mode .top-navbar {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 12px;
        }

        /* ===== LIGHT MODE: stat-card ===== */
        body.light-mode .stat-card {
            color: #333;
        }

        /* ===== LIGHT MODE: badge bg-dark ===== */
        body.light-mode .badge.bg-dark,
        body.light-mode .bg-dark:not(#sidebar):not(table):not(thead):not(th) {
            background-color: #e9ecef !important;
            color: #333 !important;
        }

        body.light-mode .text-light-50 {
            color: #666 !important;
        }

        /* ===== LIGHT MODE: btn-outline-secondary ===== */
        body.light-mode .btn-outline-secondary {
            color: #555;
            border-color: #aaa;
        }

        body.light-mode .btn-outline-secondary:hover {
            background-color: #e9ecef;
            color: #333;
            border-color: #888;
        }

        /* ===== LIGHT MODE: alerts inside panels ===== */
        body.light-mode .alert-danger {
            background: rgba(220, 53, 69, 0.1);
            color: #842029;
            border-color: rgba(220, 53, 69, 0.3);
        }

        body.light-mode .alert-warning {
            background: rgba(255, 193, 7, 0.12);
            color: #664d03;
            border-color: rgba(255, 193, 7, 0.35);
        }

        body.light-mode .alert-info {
            background: rgba(0, 123, 255, 0.1);
            color: #084298;
            border-color: rgba(0, 123, 255, 0.25);
        }

        body.light-mode .alert-success {
            background: rgba(25, 135, 84, 0.1);
            color: #0a3622;
            border-color: rgba(25, 135, 84, 0.25);
        }


/* ===================== MATERIALS RETURN FORM (MRF) PDF STYLES ===================== */
.mrf-paper-wrapper {
    background: #2b3035;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

.mrf-pdf-sheet {
    width: 210mm;
    min-height: 285mm;
    max-height: 297mm;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 12mm 15mm;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    font-family: Arial, Helvetica, sans-serif !important;
    border: 2px solid #000000 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    page-break-inside: avoid;
    page-break-after: avoid;
}

.mrf-header-box {
    text-align: center;
    position: relative;
    margin-bottom: 12px;
}

.mrf-logo-badge {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
}

.mrf-logo-img {
    height: 54px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    border-radius: 6px;
}

.mrf-company-name {
    font-size: 1.35rem;
    font-weight: bold;
    color: #000;
    margin: 0;
    letter-spacing: 0.3px;
}

.mrf-company-sub {
    font-size: 0.85rem;
    color: #000;
    margin: 2px 0 10px 0;
    font-weight: 600;
}

.mrf-title-underlined {
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 4px;
    display: inline-block;
    color: #000;
}

.mrf-meta-table {
    width: 100%;
    border-collapse: collapse !important;
    margin-bottom: 0;
    border: 1.5px solid #000000 !important;
}

.mrf-meta-table td, .mrf-meta-table th {
    border: 1.5px solid #000000 !important;
    padding: 5px 8px;
    font-size: 0.88rem;
    color: #000;
    font-weight: 600;
    box-sizing: border-box;
}

.mrf-meta-table input, .mrf-meta-table select {
    border: none;
    outline: none;
    background: transparent;
    font-weight: bold;
    color: #000;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.mrf-items-table {
    width: 100%;
    border-collapse: collapse !important;
    margin-top: 5px;
    border: 1.5px solid #000000 !important;
}

.mrf-items-table th, .mrf-items-table td {
    border: 1.5px solid #000000 !important;
    padding: 5px 5px !important;
    font-size: 0.83rem !important;
    font-weight: bold !important;
    color: #000000 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

.mrf-items-table th {
    text-align: center !important;
}

.mrf-items-table input, .mrf-items-table select {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    width: 100%;
    height: 100%;
    font-size: 0.83rem;
    color: #000 !important;
    font-family: inherit;
}

.mrf-signature-row {
    margin-top: auto;
    padding-top: 25px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    font-size: 0.8rem;
    font-weight: bold;
    color: #000;
    page-break-inside: avoid;
    box-sizing: border-box;
}

.mrf-sig-box {
    text-align: center;
    border-top: 2px solid #000;
    padding-top: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }
    body * {
        visibility: hidden !important;
    }
    .mrf-pdf-sheet, .mrf-pdf-sheet * {
        visibility: visible !important;
    }
    .mrf-pdf-sheet {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        box-shadow: none !important;
        border: 2px solid #000 !important;
        padding: 6mm 8mm !important;
        box-sizing: border-box !important;
    }
    thead {
        display: table-header-group !important;
    }
    tfoot {
        display: table-footer-group !important;
    }
    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .no-print, .no-print * {
        display: none !important;
    }
}

/* MRF History Table Contrast Fix */
#mrfHistoryTable {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

#mrfHistoryTable thead,
#mrfHistoryTable thead tr,
#mrfHistoryTable thead th {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #38bdf8 !important;
}

#mrfHistoryTable thead th .excel-filter-trigger {
    color: #38bdf8 !important;
}

#mrfHistoryTable tbody tr {
    background-color: #ffffff !important;
    color: #000000 !important;
}

#mrfHistoryTable tbody tr:nth-of-type(odd) {
    background-color: #f1f5f9 !important;
}

#mrfHistoryTable tbody tr:hover {
    background-color: #e2e8f0 !important;
}

#mrfHistoryTable td {
    color: #000000 !important;
    font-weight: 500 !important;
    vertical-align: middle !important;
    border-color: #cbd5e1 !important;
}

#mrfHistoryTable td.mrf-slip-cell,
#mrfHistoryTable td .text-info {
    color: #0284c7 !important;
    font-weight: 700 !important;
}

