
        :root {
            --accent: #534AB7;
            --accent-light: #EEEDFE;
            --accent-mid: #AFA9EC;
            --accent-dark: #3C3489;

            --teal: #0F6E56;
            --teal-light: #E1F5EE;
            --teal-mid: #5DCAA5;

            --coral: #993C1D;
            --coral-light: #FAECE7;

            --amber: #854F0B;
            --amber-light: #FAEEDA;
            --amber-mid: #EF9F27;

            --blue: #185FA5;
            --blue-light: #E6F1FB;

            --red: #A32D2D;
            --red-light: #FCEBEB;

            --surface: #F7F7FB;
            --card: #FFFFFF;
            --border: rgba(83, 74, 183, 0.12);
            --border-mid: rgba(83, 74, 183, 0.22);
            --text-primary: #1A1830;
            --text-muted: #6B6888;
            --text-hint: #A09DB8;

            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 14px;

            --shadow-card: 0 1px 3px rgba(83, 74, 183, 0.07), 0 4px 16px rgba(83, 74, 183, 0.06);
            --shadow-btn: 0 2px 8px rgba(83, 74, 183, 0.28);
        }

        /* ── Page shell ─────────────────────────────────────────── */
        .iv-page {
            padding: 22px 26px;
            background: var(--surface);
            min-height: 100vh;
            font-family: 'DM Sans', system-ui, sans-serif;
        }

        /* ── Header ─────────────────────────────────────────────── */
        .iv-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .iv-header-left h1 {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.3px;
            margin-bottom: 3px;
        }

        .iv-header-left p {
            font-size: 13px;
            color: var(--text-muted);
            margin: 0;
        }

        .iv-btn-add {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: var(--accent);
            color: #fff;
            border: none;
            border-radius: var(--radius-md);
            padding: 9px 18px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
            box-shadow: var(--shadow-btn);
            transition: background 0.15s, box-shadow 0.15s;
        }

        .iv-btn-add:hover {
            background: var(--accent-dark);
            color: #fff;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(83, 74, 183, 0.38);
        }

        .iv-btn-add i {
            font-size: 16px;
        }

        /* ── Alert ──────────────────────────────────────────────── */
        .iv-alert {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 14px;
            border-radius: var(--radius-md);
            background: var(--teal-light);
            border: 1px solid var(--teal-mid);
            color: var(--teal);
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 18px;
        }

        .iv-alert .btn-close {
            margin-left: auto;
            filter: none;
            opacity: 0.7;
        }

        /* ── Stat cards ─────────────────────────────────────────── */
        .iv-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .iv-stat {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 14px 16px;
            display: flex;
            align-items: center;
            gap: 13px;
            box-shadow: var(--shadow-card);
        }

        .iv-stat-icon {
            width: 40px;
            height: 40px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }

        .iv-stat-icon.purple {
            background: var(--accent-light);
            color: var(--accent);
        }

        .iv-stat-icon.teal {
            background: var(--teal-light);
            color: var(--teal);
        }

        .iv-stat-icon.blue {
            background: var(--blue-light);
            color: var(--blue);
        }

        .iv-stat-icon.amber {
            background: var(--amber-light);
            color: var(--amber);
        }

        .iv-stat-val {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.1;
            letter-spacing: -0.5px;
        }

        .iv-stat-lbl {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 2px;
            font-weight: 400;
        }

        /* ── Main card ──────────────────────────────────────────── */
        .iv-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
            overflow: hidden;
        }

        /* ── Filter bar ─────────────────────────────────────────── */
        .iv-filters {
            display: flex;
            gap: 10px;
            padding: 13px 16px;
            border-bottom: 1px solid var(--border);
            background: #FAFAFE;
            flex-wrap: wrap;
            align-items: center;
        }

        .iv-search-wrap {
            position: relative;
            flex: 1 1 200px;
        }

        .iv-search-wrap i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 15px;
            color: var(--text-hint);
            pointer-events: none;
        }

        .iv-search-wrap input {
            width: 100%;
            padding: 8px 12px 8px 32px;
            font-size: 13px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius-md);
            background: var(--card);
            color: var(--text-primary);
            font-family: inherit;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .iv-search-wrap input:focus {
            border-color: var(--accent-mid);
            box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.10);
        }

        .iv-search-wrap input::placeholder {
            color: var(--text-hint);
        }

        .iv-select {
            padding: 8px 12px;
            font-size: 13px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius-md);
            background: var(--card);
            color: var(--text-primary);
            font-family: inherit;
            outline: none;
            cursor: pointer;
            transition: border-color 0.15s;
        }

        .iv-select:focus {
            border-color: var(--accent-mid);
            box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.10);
        }

        /* ── Table ──────────────────────────────────────────────── */
        .iv-table-wrap {
            overflow-x: auto;
        }

        .iv-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .iv-table thead tr {
            background: var(--accent-light);
            border-bottom: 1.5px solid var(--accent-mid);
        }

        .iv-table thead th {
            padding: 10px 14px;
            font-size: 10.5px;
            font-weight: 600;
            color: var(--accent-dark);
            text-align: left;
            white-space: nowrap;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .iv-table tbody tr {
            border-bottom: 1px solid var(--border);
            transition: background 0.1s;
        }

        .iv-table tbody tr:last-child {
            border-bottom: none;
        }

        .iv-table tbody tr:hover {
            background: rgba(83, 74, 183, 0.035);
        }

        .iv-table td {
            padding: 9px 14px;
            vertical-align: middle;
            white-space: nowrap;
            color: var(--text-primary);
        }

        /* ID chip */
        .iv-id {
            font-size: 11px;
            font-weight: 600;
            color: var(--accent);
            background: var(--accent-light);
            padding: 3px 8px;
            border-radius: 20px;
            font-family: 'DM Mono', monospace;
            letter-spacing: 0.02em;
        }

        /* Variant cell */
        .iv-variant-cell {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .iv-thumb {
            width: 38px;
            height: 38px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-mid);
            object-fit: cover;
            flex-shrink: 0;
            background: var(--surface);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: var(--text-hint);
            overflow: hidden;
        }

        .iv-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .iv-vname {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
            max-width: 140px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .iv-vsku {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 1px;
        }

        .iv-vunit {
            font-size: 11px;
            color: var(--text-hint);
        }

        /* Barcode */
        .iv-barcode {
            font-family: 'DM Mono', monospace;
            font-size: 11.5px;
            color: var(--text-muted);
            letter-spacing: 0.03em;
        }

        /* Badges */
        .iv-badge {
            display: inline-flex;
            align-items: center;
            font-size: 11px;
            font-weight: 500;
            padding: 3px 9px;
            border-radius: 20px;
            white-space: nowrap;
        }

        .iv-badge.cat {
            background: var(--blue-light);
            color: var(--blue);
        }

        .iv-badge.in {
            background: var(--teal-light);
            color: var(--teal);
        }

        .iv-badge.out {
            background: var(--red-light);
            color: var(--red);
        }

        .iv-badge.active {
            background: var(--teal-light);
            color: var(--teal);
        }

        .iv-badge.inactive {
            background: var(--amber-light);
            color: var(--amber);
        }

        .iv-badge.disc {
            background: var(--coral-light);
            color: var(--coral);
            font-size: 10px;
            margin-left: 4px;
        }

        /* Price */
        .iv-price-old {
            font-size: 11px;
            color: var(--text-hint);
            text-decoration: line-through;
            display: block;
        }

        .iv-price-new {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            display: inline;
        }

        .iv-cost {
            font-size: 13px;
            font-weight: 500;
            color: var(--teal);
        }

        /* Stock number */
        .iv-stock-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            padding: 3px 8px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            background: var(--teal-light);
            color: var(--teal);
        }

        /* Action dropdown */
        .iv-dd {
            position: relative;
            display: inline-block;
        }

        .iv-dd-btn {
            background: var(--surface);
            border: 1px solid var(--border-mid);
            border-radius: var(--radius-sm);
            padding: 5px 9px;
            cursor: pointer;
            font-size: 15px;
            color: var(--text-muted);
            line-height: 1;
            transition: background 0.12s, color 0.12s;
        }

        .iv-dd-btn:hover {
            background: var(--accent-light);
            color: var(--accent);
            border-color: var(--accent-mid);
        }

        .iv-dd-menu {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 5px);
            background: var(--card);
            border: 1px solid var(--border-mid);
            border-radius: var(--radius-md);
            box-shadow: 0 8px 24px rgba(83, 74, 183, 0.14);
            min-width: 136px;
            z-index: 100;
            overflow: hidden;
        }

        .iv-dd-menu.open {
            display: block;
        }

        .iv-dd-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 13px;
            font-size: 12.5px;
            color: var(--text-primary);
            cursor: pointer;
            text-decoration: none;
            transition: background 0.1s;
        }

        .iv-dd-item:hover {
            background: var(--accent-light);
            color: var(--accent);
            text-decoration: none;
        }

        .iv-dd-item.danger {
            color: var(--red);
        }

        .iv-dd-item.danger:hover {
            background: var(--red-light);
            color: var(--red);
        }

        .iv-dd-item i {
            font-size: 14px;
        }

        .iv-dd-sep {
            height: 1px;
            background: var(--border);
            margin: 3px 0;
        }

        /* Empty state */
        .iv-empty {
            text-align: center;
            padding: 48px 20px;
            color: var(--text-muted);
        }

        .iv-empty i {
            font-size: 36px;
            display: block;
            margin-bottom: 12px;
            color: var(--text-hint);
        }

        .iv-empty h5 {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 6px;
        }

        .iv-empty p {
            font-size: 13px;
        }

        /* ── Footer / pagination ─────────────────────────────────── */
        .iv-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 11px 16px;
            border-top: 1px solid var(--border);
            background: #FAFAFE;
            flex-wrap: wrap;
            gap: 8px;
        }

        .iv-footer-txt {
            font-size: 12px;
            color: var(--text-muted);
        }

        .iv-pagination {
            display: flex;
            gap: 5px;
        }

        .iv-pagination .page-link {
            padding: 4px 10px;
            font-size: 12px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius-sm);
            color: var(--text-muted);
            background: var(--card);
            text-decoration: none;
            transition: all 0.12s;
        }

        .iv-pagination .page-link:hover,
        .iv-pagination .page-item.active .page-link {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

        .iv-pagination .page-item.disabled .page-link {
            opacity: 0.4;
            pointer-events: none;
        }

        /* ── Responsive tweaks ──────────────────────────────────── */
        @media (max-width: 992px) {
            .iv-stats {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 576px) {
            .iv-page {
                padding: 14px;
            }

            .iv-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            .iv-filters {
                flex-direction: column;
            }

            .iv-select,
            .iv-search-wrap {
                width: 100%;
            }
        }
