
    /* =========================================
       BARCODE SCANNER — PREMIUM UI
       ========================================= */
    .da-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
        padding: clamp(0px, 5vw, 0px) 20px;
    }

    .da-panel {
        position: relative;                
        width: 100%;
        max-width: 1200px;
        border-radius: 28px;
        padding: clamp(28px, 5vw, 56px);
    }

    



    /* ---------- OPTIONS BAR ---------- */
    .options-bar { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 12px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); flex-wrap: wrap; }
    
    .ob-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .f-btn { background: transparent; border: none; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted); outline: none; cursor: pointer; padding: 6px 12px; border-radius: 8px; transition: all 0.2s; }
    .f-btn:hover { background: var(--bg-body); color: var(--text-main); }
    .f-btn.on { background: rgba(16, 185, 129, 0.1); color: #10b981; }
    
    .ob-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
    
    .dir-toggle { display: flex; align-items: center; gap: 8px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 12px; font-size: 11px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
    .dir-toggle:hover { border-color: #10b981; }
    .d-ltr, .d-rtl { transition: color 0.2s; }
    .dir-toggle.rtl .d-rtl { color: #10b981; }
    .dir-toggle:not(.rtl) .d-ltr { color: #10b981; }
    
    .usage-meter { margin-left: auto; display: flex; align-items: center; gap: 12px; }
    .usage-pips { display: flex; gap: 4px; }
    .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--border-color); }
    .pip.used { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
    .usage-lbl { font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; color: #10b981; }

    /* ---------- INVENTORY WORKSPACE ---------- */
    .inventory-workspace { display: grid; grid-template-columns: 350px 1fr; gap: 24px; margin-bottom: 40px; }
    @media (max-width: 900px) { .inventory-workspace { grid-template-columns: 1fr; } }
    
    /* Console */
    .scanner-console { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,0.02); height: 100%; min-height: 400px; }
    
    .sc-header { padding: 20px; background: var(--bg-body); border-bottom: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 16px; }
    .sc-title { font-size: 15px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .sc-title i { color: #ef4444; width: 16px; height: 16px; }
    
    .sc-tabs { display: flex; gap: 8px; background: var(--card-bg); border: 1px solid var(--border-color); padding: 4px; border-radius: 12px; }
    .sct-btn { flex: 1; padding: 10px; background: transparent; border: none; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: all 0.2s; }
    .sct-btn:hover { color: var(--text-main); }
    .sct-btn.active { background: var(--bg-body); color: var(--text-main); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

    .viewport-container { position: relative; flex: 1; background: #000; overflow: hidden; display: flex; align-items: center; justify-content: center; }
    
    .laser-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; display: none; }
    .viewport-container.active .laser-overlay { display: block; }
    .laser-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #ef4444; box-shadow: 0 0 12px #ef4444, 0 0 20px #ef4444; animation: scanLaser 3s ease-in-out infinite alternate; }
    @keyframes scanLaser { 0% { top: 10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
    
    .reader-loader { position: absolute; inset: 0; background: rgba(0,0,0,0.8); z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
    .reader-loader.active { opacity: 1; pointer-events: auto; }
    .rl-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.1); border-top-color: #ef4444; border-radius: 50%; animation: spin 1s linear infinite; }
    .rl-text { font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 800; color: #fff; letter-spacing: 2px; }
    
    .upload-zone { position: absolute; inset: 0; background: var(--bg-body); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; transition: all 0.3s; opacity: 0; pointer-events: none; }
    .upload-zone.active { opacity: 1; pointer-events: auto; }
    .upload-zone:hover, .upload-zone.dragover { background: var(--card-bg); border: 2px dashed var(--primary-color); }
    .uz-icon { color: var(--text-muted); transition: color 0.3s; margin-bottom: 8px; }
    .upload-zone:hover .uz-icon { color: var(--primary-color); }
    .uz-text { color: var(--text-main); font-size: 14px; font-weight: 800; text-align: center; line-height: 1.4; }
    .uz-sub { font-size: 11px; font-weight: 700; color: var(--text-muted); }

    #reader { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
    #reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; }
    #reader__dashboard_section_csr, #reader__dashboard_section_swaplink { display: none !important; }
    
    /* Ledger */
    .ledger-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.02); height: 100%; min-height: 400px; }
    
    .lp-header { padding: 20px 24px; background: var(--bg-body); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
    .lp-title { font-size: 15px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .lp-title i { color: #10b981; width: 16px; height: 16px; }
    
    .lp-actions { display: flex; gap: 12px; }
    .lp-btn { padding: 8px 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 6px; cursor: pointer; transition: all 0.2s; }
    .lp-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .lp-btn.danger:hover { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.05); }
    
    .ledger-table-wrap { flex: 1; overflow-y: auto; position: relative; background: var(--card-bg); max-height: 500px; }
    
    .empty-ledger { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 32px; color: var(--text-muted); font-size: 13px; font-weight: 700; line-height: 1.6; }
    
    .ledger-table { width: 100%; border-collapse: collapse; text-align: left; }
    .ledger-table th { position: sticky; top: 0; background: var(--bg-body); padding: 12px 16px; font-size: 11px; font-weight: 900; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); z-index: 10; }
    .ledger-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 13px; vertical-align: middle; }
    .ledger-table tr:hover td { background: var(--bg-body); }
    
    .td-data { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--text-main); word-break: break-all; }
    .td-format { display: inline-block; padding: 4px 8px; background: rgba(16, 185, 129, 0.1); color: #10b981; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: 0.5px; }
    .td-time { color: var(--text-muted); font-size: 12px; font-weight: 700; }
    
    .td-actions { display: flex; gap: 8px; }
    .row-btn { width: 28px; height: 28px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; color: var(--text-muted); }
    .row-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .row-btn.copy:hover { color: #3b82f6; border-color: #3b82f6; }

    /* ---------- STATS STRIP ---------- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
    .sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; }
    .sc:hover { transform: translateY(-2px); }
    .sc-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
    
    .sc-ico.r { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .sc-ico.b { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .sc-ico.g { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .sc-ico.p { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
    
    .sc-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
    .sc-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .sc-val.popped { transform: scale(1.3); color: #10b981; }

    /* ── Comparison Panel & Analytics ── */
    .comparison-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
        padding: 28px; margin-top: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); margin-bottom: 40px;
    }
    .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .cp-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
    .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
    .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }

    .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
    .cpc-header { display: flex; justify-content: space-between; align-items: center; }
    .cpc-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
    .cpc-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
    .cpc-tag.success { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); }

    .cpc-body { display: flex; flex-direction: column; gap: 10px; }
    .cpc-stat-row { font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; }
    .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
    .cpc-progress-bar { width: 100%; height: 8px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-top: 4px; }
    .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
    .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }

    /* Toast */
    .toast { position: fixed; bottom: 24px; right: 24px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 20px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--text-main); box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 100000; opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s var(--ease-spring); }
    .toast.show { opacity: 1; transform: translateY(0); }
    .toast.success { border-left: 4px solid #10b981; }
    .toast.error { border-left: 4px solid #ef4444; }
    .toast.warn { border-left: 4px solid #f59e0b; }
    .toast.info { border-left: 4px solid #3b82f6; }

    /* =========================================
       ZERO INLINE STYLES EXTENSIONS
       ========================================= */
    #bgCv {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
    }

    .icon-hero-badge {
        width: 14px;
        height: 14px;
    }

    .icon-type-muted {
        width: 12px;
        height: 12px;
        color: var(--text-muted);
    }

    .dir-divider {
        opacity: 0.3;
    }

    .icon-tab-sm {
        width: 14px;
        height: 14px;
    }

    .uz-icon {
        width: 48px;
        height: 48px;
    }

    #fileInput {
        display: none;
    }

    .icon-action-xs {
        width: 12px;
        height: 12px;
    }

    .th-right,
    .td-right {
        text-align: right;
    }

    .td-muted {
        color: var(--text-muted);
    }

    .td-actions.td-actions-right {
        justify-content: flex-end;
    }

    .icon-row-btn {
        width: 14px;
        height: 14px;
    }

    .empty-ledger-icon {
        width: 48px;
        height: 48px;
        opacity: 0.3;
    }

    .sc-ico i {
        width: 18px;
        height: 18px;
    }

    .info-div-t {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 800;
        color: var(--text-main);
        margin-bottom: 20px;
        margin-top: 40px;
    }

    .icon-star-primary {
        width: 16px;
        height: 16px;
        color: var(--primary-color);
    }

    .toast-icon-primary {
        color: var(--primary-color);
    }



    
    
