
        :root {
            --surface: #ffffff;
            --surface-hover: #f8fafc;
            --border: rgba(0, 0, 0, 0.08);
            --border-hover: rgba(0, 0, 0, 0.12);
            --text-primary: var(--throne-text-primary);
            --text-secondary: var(--throne-text-secondary);
            --text-muted: #94a3b8;
            --accent: var(--throne-sidebar-bg);
            --accent-gradient: linear-gradient(135deg, var(--throne-sidebar-bg) 0%, var(--throne-accent-blue) 100%);
            --radius: 16px;
            --radius-sm: 10px;
            --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
            --bg-card: #ffffff;
            --bg-input: #f8fafc;
            --bg-hover: #f1f5f9;
            --bg: var(--bg-input);
            --text: var(--text-primary);
            --border-focus: var(--throne-accent-blue);
            --green: #10b981;
            --red: #ef4444;
            --yellow: #f59e0b;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: var(--throne-font);
            background: var(--throne-body-gradient);
            color: var(--text-primary);
            min-height: 100vh;
        }
        /* Match and List editors reclaim the shell padding. The List Cards setup
           page keeps the standard page frame so its title lines up with other pages. */
        body.listing-page:not(.batch-create-mode) .throne-main {
            padding: 0.5rem clamp(0.625rem, 1vw, 1rem) 0 !important;
        }
        body.listing-view-list .throne-main {
            min-height: 100vh;
        }


        /* ─── Topbar ─────────────────────────────────── */
        .topbar {
            display: flex; align-items: center; justify-content: space-between;
            padding: 0.5rem 2rem; background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border);
            border-radius: 99px;
            margin: 0 24px 0 24px;
            position: sticky; top: 0; z-index: 100;
        }
        .topbar-left { display: flex; align-items: center; gap: 2rem; }
        .topbar-logo {
            font-size: 1.1rem; font-weight: 800; color: var(--accent);
            text-decoration: none; letter-spacing: -0.02em;
            display: flex; align-items: center; gap: 0.5rem;
        }
        .topbar-nav { display: flex; gap: 0.25rem; }
        .topbar-nav a {
            padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
            color: var(--text-secondary); text-decoration: none; transition: all 0.2s;
        }
        .topbar-nav a:hover { color: var(--accent); background: rgba(3, 83, 164, 0.05); }
        .topbar-nav a.active { color: #fff; background: var(--accent-gradient); box-shadow: 0 4px 12px rgba(3, 83, 164, 0.2); }
        .topbar .topbar-right {
            display: flex;
            align-items: center;
            align-content: center;
            gap: 0.42rem 0.82rem;
            flex: 0 1 1500px;
            width: 100%;
            max-width: 1500px;
            min-width: 0;
            flex-wrap: wrap;
            justify-content: center;
            margin: 0 auto;
        }
        .topbar.listing-topbar {
            justify-content: stretch;
            min-height: 48px;
            margin: 8px 8px 0;
            padding: 6px 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.92);
            border-color: rgba(148, 163, 184, 0.24);
            box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
        }

        /* Entering Card Lister is always a full page load, and until the batch chip and
           stats are populated the bar holds nothing -- so the fill, border and shadow
           painted an empty white slab for the whole boot. Keep the 48px reservation so
           the chip does not shift content in when it arrives; just drop the chrome
           until there is something in it. */
        .topbar.listing-topbar:has(#topbarBatchChip[hidden]):not(:has(#topbarStatsPill .topbar-stat:not([hidden]))) {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }
        .topbar.listing-topbar .topbar-right {
            justify-content: flex-start;
            align-items: flex-start;
            gap: 8px 6px;
            flex-wrap: wrap;
            max-width: none;
        }
        .topbar-stats-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.48rem;
            flex: 0 0 auto;
            flex-wrap: nowrap;
            min-width: 0;
            max-width: 100%;
            min-height: 32px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            line-height: 1;
            margin-left: auto;
            white-space: nowrap;
        }
        .topbar-stat { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
        .topbar-stat strong { color: #10b981; font-weight: 800; }

        /* The Paid stat is editable, so it reads as a value in the pill until
           it is focused. Matches the green the sibling stats use. */
        .topbar-cost-input {
            /* Wide enough for a five figure lot; the left padding is zero so the
               amount sits against its currency symbol instead of drifting. */
            width: 10ch;
            border: 1px solid transparent;
            border-radius: 7px;
            background: transparent;
            padding: 2px 5px 2px 0;
            font: inherit;
            font-size: 0.8rem;
            font-weight: 800;
            color: #10b981;
            font-variant-numeric: tabular-nums;
            text-align: left;
        }

        /* Sits tight against the amount so Paid reads as one figure, the way
           the List and Market stats beside it do. */
        .topbar-cost-prefix {
            font-size: 0.8rem;
            font-weight: 800;
            color: #10b981;
        }

        .topbar-cost-prefix.is-derived-cost { color: var(--text-secondary); font-weight: 700; }
        .topbar-cost-input::placeholder { color: var(--text-muted); font-weight: 600; }
        .topbar-cost-input:hover { border-color: var(--border); background: var(--bg-input); }
        .topbar-cost-input:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--bg-input);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        /* Derived from the per-card costs rather than typed, so it is muted the
           same way an allocated row cost is. */
        .topbar-cost-input.is-derived-cost { color: var(--text-secondary); font-weight: 700; }
        .topbar-stat-divider {
            color: var(--text-muted);
            font-size: 0.72rem;
            line-height: 1;
        }
        .topbar-stat[hidden],
        .topbar-stat-divider[hidden] { display: none !important; }
        .topbar-batch-chip {
            display: inline-flex;
            align-items: center;
            align-content: flex-start;
            gap: 7px;
            flex: 0 1 auto;
            flex-wrap: nowrap;
            min-width: 0;
            width: auto;
            max-width: 100%;
            min-height: 36px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1;
        }
        .topbar-batch-chip[hidden] { display: none !important; }
        .topbar-field-kicker {
            align-items: center;
            align-self: stretch;
            background: rgba(3, 83, 164, 0.08);
            border-right: 1px solid rgba(148, 163, 184, 0.18);
            color: var(--accent);
            display: inline-flex;
            font-size: 0.64rem;
            font-weight: 900;
            letter-spacing: 0.07em;
            padding: 0 12px;
            text-transform: uppercase;
            white-space: nowrap;
        }
        .topbar-batch-main {
            display: flex;
            align-items: center;
            gap: 7px;
            flex: 0 1 auto;
            min-width: 0;
            max-width: clamp(120px, 22vw, 280px);
            overflow: hidden;
        }
        .topbar-batch-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: var(--text-primary);
            font-size: 0.78rem;
            font-weight: 850;
        }
        .topbar-batch-field {
            display: inline-flex;
            align-items: center;
            gap: 0;
            flex: 0 1 auto;
            min-width: 0;
            height: 36px;
            padding: 0;
            border: 1px solid rgba(148, 163, 184, 0.24);
            border-radius: 8px;
            background: #ffffff;
            color: var(--text-muted);
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
            overflow: hidden;
        }
        .topbar-batch-field input[type="text"] {
            height: 34px;
            min-width: 0;
            padding: 0 10px;
            border: 0;
            outline: none;
            background: transparent;
            color: var(--text-primary);
            font: inherit;
            font-size: 0.72rem;
            font-weight: 850;
            letter-spacing: 0;
            text-transform: none;
        }
        .topbar-batch-field input[type="text"]:focus {
            outline: none;
        }
        .topbar-batch-title-field {
            flex: 0 1 clamp(200px, 15vw, 250px);
            min-width: 200px;
            max-width: min(20vw, 270px);
        }
        .topbar-batch-title-field input {
            flex: 1 1 auto;
        }
        .topbar-sku-group {
            display: inline-flex;
            align-items: stretch;
            flex: 0 0 auto;
            min-width: 0;
            max-width: 100%;
        }
        .topbar-batch-sku-field {
            flex: 0 0 150px;
            min-width: 150px;
            border-right: 0;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        .topbar-batch-sku-field input {
            width: 78px;
        }
        .topbar-batch-toggle {
            flex: 0 0 auto;
            gap: 6px;
            margin-left: 0;
            padding: 0 10px;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            cursor: pointer;
            user-select: none;
        }
        .topbar-batch-toggle input {
            width: 14px;
            height: 14px;
            margin: 0;
            accent-color: var(--accent);
            cursor: pointer;
        }
        .topbar-sku-group .topbar-batch-toggle {
            border-right: 0;
            border-radius: 0;
        }
        .topbar-batch-sku-start-field {
            flex: 0 0 auto;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
        .topbar-batch-sku-start-field input[type="number"] {
            width: 62px;
            height: 34px;
            min-width: 0;
            padding: 0 8px;
            border: 0;
            outline: none;
            background: transparent;
            color: var(--text-primary);
            font: inherit;
            font-size: 0.72rem;
            font-weight: 850;
            letter-spacing: 0;
            text-align: center;
            text-transform: none;
        }
        .topbar-batch-sku-start-field.is-disabled {
            opacity: 0.5;
        }
        .topbar-action-group {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            flex: 0 1 auto;
            flex-wrap: nowrap;
            min-width: 0;
            max-width: 100%;
        }
        .topbar-batch-meta {
            display: none;
            flex: 0 0 auto;
            color: var(--text-muted);
            font-size: 0.7rem;
            white-space: nowrap;
        }
        .topbar-batch-icon-button {
            flex: 0 0 34px;
            width: 34px;
            min-width: 34px;
            max-width: 34px;
            height: 34px;
            min-height: 34px;
            aspect-ratio: 1 / 1;
            box-sizing: border-box;
            padding: 0;
            border: 1px solid rgba(3, 83, 164, 0.22);
            border-radius: 8px;
            background: #ffffff;
            color: var(--accent);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        }
        .topbar-batch-icon-button:hover {
            transform: translateY(-1px);
            background: rgba(3, 83, 164, 0.08);
            border-color: rgba(3, 83, 164, 0.34);
        }
        .topbar-batch-icon-button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        .topbar-batch-icon-button svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            flex: 0 0 auto;
        }
        .topbar-batch-icon-button.delete {
            background: #ef4444;
            border-color: #ef4444;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(239, 68, 68, 0.16);
        }
        .topbar-batch-icon-button.delete:hover:not(:disabled) {
            background: #dc2626;
            border-color: #dc2626;
            color: #ffffff;
        }
        .topbar-batch-icon-button.delete.is-pending svg {
            visibility: hidden;
        }
        .topbar-batch-icon-button.delete.is-pending {
            position: relative;
        }
        .topbar-batch-icon-button.delete.is-pending::after,
        .batch-btn.delete.is-pending::after {
            width: 14px;
            height: 14px;
            box-sizing: border-box;
            border: 2px solid rgba(255, 255, 255, 0.45);
            border-top-color: #ffffff;
            border-radius: 999px;
            content: '';
            animation: batch-delete-spin 0.65s linear infinite;
        }
        .topbar-batch-icon-button.delete.is-pending::after {
            position: absolute;
            top: 50%;
            left: 50%;
            margin: -7px 0 0 -7px;
        }
        @keyframes batch-delete-spin {
            to { transform: rotate(360deg); }
        }
        .topbar-batch-icon-button.save {
            background: var(--accent);
            border-color: var(--accent);
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(3, 83, 164, 0.16);
        }
        .topbar-batch-icon-button.status.is-staged,
        .topbar-batch-icon-button.status.is-listed {
            background: #10b981;
            border-color: #10b981;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(16, 185, 129, 0.16);
        }
        .topbar-batch-icon-button.direct-ebay {
            background: #0f766e;
            border-color: #0f766e;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(15, 118, 110, 0.16);
        }
        .topbar-batch-icon-button.direct-ebay:hover {
            background: #0d9488;
            border-color: #0d9488;
            color: #ffffff;
        }
        .topbar-batch-icon-button.direct-ebay.direct-ebay-locked {
            background: #ffffff;
            border-color: rgba(148, 163, 184, 0.32);
            color: var(--text-muted);
            box-shadow: none;
        }
        .topbar-batch-icon-button.export {
            border-color: rgba(5, 150, 105, 0.22);
            background: #10b981;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(16, 185, 129, 0.16);
        }
        .topbar-batch-icon-button.export:hover {
            background: #059669;
            border-color: rgba(5, 150, 105, 0.34);
            box-shadow: 0 6px 14px rgba(16, 185, 129, 0.22);
        }


        /* ─── Buttons ────────────────────────────────── */
        .btn {
            padding: 0.6rem 1.25rem; border-radius: var(--radius-sm); font-size: 0.85rem;
            font-weight: 700; cursor: pointer; border: none; font-family: inherit;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: inline-flex; align-items: center; gap: 0.5rem;
        }
        .btn-primary { background: var(--accent-gradient); color: white; box-shadow: 0 4px 12px rgba(3, 83, 164, 0.2); }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(3, 83, 164, 0.3); }
        .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
        #listing-access-gate .gate-google-login {
            width: auto;
            min-width: 260px;
            margin: 20px auto 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0.75rem 1.25rem;
            font-size: 0.9rem;
        }
        .btn-green { background: #10b981; color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
        .btn-green:hover { background: #059669; transform: translateY(-1px); }
        .btn-danger { background: #ef4444; color: white; }
        .btn-secondary {
            background: var(--surface); color: var(--text-secondary);
            border: 1px solid var(--border); box-shadow: var(--shadow-sm);
        }
        .btn-secondary:hover { background: var(--surface-hover); transform: translateY(-1px); }

        .main { width: 100%; max-width: none; margin: 0 auto; padding: 0.35rem clamp(0.35rem, 0.7vw, 0.85rem) 0.75rem; box-sizing: border-box; }
        body.listing-view-list .throne-page-footer {
            flex: 0 0 auto;
            margin: auto auto 0;
            padding-top: 0.7rem;
            padding-bottom: 0.7rem;
        }
        body.listing-view-match {
            overflow-y: hidden;
        }
        body.listing-view-match .main {
            max-width: 2200px;
        }
        body.listing-view-match #matchView {
            --match-view-available-height: calc(100dvh - 150px);
            --match-card-width: min(clamp(340px, 23vw, 560px), max(260px, calc((var(--match-view-available-height) - 220px) * 5 / 7)));
            width: 100%;
            height: var(--match-view-available-height);
            max-width: 2200px;
            margin-left: auto;
            margin-right: auto;
            transform: none;
        }


        /* ─── Game Selector & Toolbar ────────────────── */
        .toolbar {
            display: flex; align-items: center; justify-content: space-between;
            margin: 10px 0 16px; gap: 12px; flex-wrap: wrap;
        }
        body.batch-info-topbar-collapsed .toolbar {
            position: sticky;
            top: var(--listing-topbar-height, 0px);
            z-index: 99;
            padding: 6px 7px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
        }
        .toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .match-toolbar-workflow {
            display: none;
            align-items: center;
            justify-content: flex-end;
            gap: 14px;
            flex: 1 1 680px;
            min-width: 0;
        }
        body.listing-view-match .match-toolbar-workflow {
            display: flex;
        }
        body.listing-view-match .toolbar {
            flex-wrap: nowrap;
            padding: 5px 7px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--surface);
            box-shadow: var(--shadow-sm);
        }
        body.listing-view-match .toolbar-left,
        body.listing-view-match .listing-toolbar-controls {
            flex-wrap: nowrap;
            flex: 0 0 auto;
        }
        .match-review-progress {
            display: grid;
            grid-template-columns: auto minmax(80px, 1fr) auto;
            align-items: center;
            gap: 10px;
            min-width: 180px;
            max-width: 560px;
            flex: 1 1 300px;
        }
        .match-review-progress-label,
        .match-review-progress-percent {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 800;
            white-space: nowrap;
        }
        .match-review-progress-track {
            position: relative;
            height: 7px;
            overflow: hidden;
            border-radius: 999px;
            background: var(--bg-hover);
        }
        .match-review-progress-track > span {
            display: block;
            width: 0;
            height: 100%;
            border-radius: inherit;
            background: var(--accent-gradient);
            transition: width 0.18s ease;
        }
        .match-toolbar-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 7px;
            flex: 0 0 auto;
            min-width: 0;
        }
        .match-toolbar-divider {
            width: 1px;
            height: 26px;
            margin: 0 2px;
            background: var(--border);
        }
        .match-toolbar-actions .loupe-selects {
            flex: 0 0 auto;
        }
        @media (max-width: 1420px) {
            .match-review-progress-label { display: none; }
            .match-review-progress { min-width: 90px; grid-template-columns: minmax(70px, 1fr) auto; }
        }
        @media (max-width: 1120px) {
            body.listing-view-match .toolbar { flex-wrap: wrap; }
            .match-toolbar-workflow { flex-basis: 100%; justify-content: space-between; }
            .match-toolbar-actions { flex-wrap: wrap; }
        }
        @media (max-width: 640px) {
            .match-toolbar-workflow { flex-wrap: wrap; row-gap: 8px; }
            .match-review-progress { flex: 1 1 100%; max-width: none; }
            .match-toolbar-actions { flex: 1 1 100%; row-gap: 8px; }
            .match-toolbar-divider { display: none; }
            .match-toolbar-actions .modal-card-action { flex: 1 1 0; }
        }
        .game-btns { display: flex; gap: 6px; }
        .game-btn {
            padding: 0.5rem 1.25rem; border-radius: 99px; font-size: 0.8rem; font-weight: 700;
            cursor: pointer; border: 1px solid var(--border); background: var(--bg-card);
            color: var(--text-secondary); transition: all 0.2s; font-family: inherit;
            box-shadow: var(--shadow-sm);
        }
        .game-btn:hover { color: var(--accent); background: var(--bg-hover); transform: translateY(-1px); }
        .game-btn.active { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 4px 12px rgba(3, 83, 164, 0.2); }


        /* ─── Scan Mode Toggle ────────────────────────── */
        .scan-mode {
            display: flex; border-radius: 99px; overflow: hidden;
            border: 1px solid var(--border); background: var(--bg-card);
            padding: 4px; box-shadow: var(--shadow-sm);
        }
        .scan-mode-btn {
            padding: 0.4rem 1rem; font-size: 0.75rem; font-weight: 700;
            cursor: pointer; border: none; background: transparent;
            color: var(--text-secondary); border-radius: 99px; transition: all 0.2s; font-family: inherit;
            white-space: nowrap;
        }
        .scan-mode-btn:hover { color: var(--accent); background: rgba(3, 83, 164, 0.05); }
        .scan-mode-btn.active {
            background: var(--accent-gradient); color: white;
            box-shadow: 0 2px 8px rgba(3, 83, 164, 0.15);
        }
        .listing-toolbar-controls {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }
        .listing-sort-menu {
            position: relative;
            display: none;
        }
        .listing-sort-menu.visible { display: block; }
        .bulk-edit-all-button { display: none; }
        .bulk-edit-all-button.visible { display: inline-flex; }
        body:not(.listing-view-list) #bulkEditAllBtn { display: none !important; }
        body.listing-view-list #bulkEditAllBtn.visible { display: inline-flex; }
        body:not(.listing-flow-lots) #btnViewLot { display: none !important; }
        body:not(.listing-view-lot) #lotView { display: none !important; }
        .bulk-edit-all-button.active {
            border-color: rgba(3, 83, 164, 0.24);
            background: rgba(3, 83, 164, 0.08);
            color: var(--accent);
        }
        .listing-sort-button {
            min-height: 44px;
            min-width: 112px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 1rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.82rem;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            box-shadow: var(--shadow-sm);
            transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
        }
        .listing-sort-button:hover,
        .listing-sort-menu.open .listing-sort-button {
            border-color: var(--border-hover);
            background: var(--bg-hover);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        }
        .listing-sort-button svg {
            width: 16px;
            height: 16px;
            flex: 0 0 auto;
        }
        .listing-sort-label {
            max-width: 128px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .listing-sort-chevron {
            transition: transform 0.16s ease;
        }
        .listing-sort-menu.open .listing-sort-chevron {
            transform: rotate(180deg);
        }
        .listing-sort-panel {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            z-index: 120;
            width: 228px;
            display: none;
            padding: 6px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
        }
        .listing-sort-menu.open .listing-sort-panel {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .listing-sort-option {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 10px 11px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.84rem;
            font-weight: 800;
            text-align: left;
            cursor: pointer;
        }
        .listing-sort-option:hover,
        .listing-sort-option.active {
            background: var(--bg-hover);
            color: var(--text-primary);
        }
        .listing-sort-option-icon {
            width: 18px;
            flex: 0 0 18px;
            color: var(--text-muted);
            text-align: center;
            font-size: 13px;
            font-weight: 900;
        }

        .scan-mode-label {
            font-size: 0.64rem; font-weight: 800; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.08em;
            align-self: center; margin-right: 2px;
        }
        #viewModeToggleGroup {
            height: 44px;
            margin-left: 0 !important;
            padding: 4px;
            border-radius: 8px;
            background: #ffffff;
            border-color: rgba(148, 163, 184, 0.24);
            box-shadow: var(--shadow-sm);
        }
        #viewModeToggleGroup .scan-mode-btn {
            min-width: 70px;
            border-radius: 7px;
            padding: 0 16px;
        }
        #bulkEditAllBtn {
            min-width: 128px;
        }
        @media (max-width: 720px) {
            .topbar.listing-topbar .topbar-right {
                align-items: stretch;
                justify-content: flex-start;
                flex-wrap: wrap;
            }
            .topbar-batch-chip {
                flex: 1 1 100%;
                flex-wrap: wrap;
            }
            .topbar-stats-pill {
                margin-left: 0;
            }
            .topbar-batch-title-field,
            .topbar-action-group {
                flex: 1 1 100%;
            }
            .topbar-batch-title-field {
                max-width: none;
            }
        }

        /* ─── Empty State / Drop Zone / Staging ──────── */
        .empty-state {
            border: 2px dashed var(--border); border-radius: 20px;
            padding: 80px 40px; text-align: center; cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: var(--surface);
            margin: 40px auto;
            max-width: 900px;
            box-shadow: var(--shadow-sm);
        }
        .empty-state:hover {
            background: var(--surface-hover);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .empty-state-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 24px;
            color: var(--accent);
            opacity: 0.8;
        }
        .empty-state-icon svg {
            width: 100%;
            height: 100%;
            display: block;
        }
        .empty-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
        .empty-state p { color: var(--text-secondary); font-size: 15px; font-weight: 500; }
        .upload-limit-hint {
            margin-top: 14px;
            font-size: 13px;
            font-weight: 700;
            color: var(--accent);
        }

        .file-input { display: none; }

        .staging-state {
            display: none; padding: 24px; background: var(--bg-secondary);
            border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px;
        }
        .staging-header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
            gap: 16px;
        }
        .staging-copy h2 {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            font-size: 20px;
            font-weight: 800;
            line-height: 1.2;
        }
        .staging-copy p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 600;
            line-height: 1.35;
        }
        .staging-copy {
            min-width: 0;
            display: grid;
            gap: 8px;
        }
        .upload-limit-line {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 10px;
            max-width: 720px;
            padding: 9px 11px;
            border: 1px solid rgba(3, 83, 164, 0.14);
            border-radius: 9px;
            background: rgba(3, 83, 164, 0.06);
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.35;
        }
        .upload-limit-line strong {
            color: var(--accent);
            font-size: 13px;
            font-weight: 900;
        }
        .upload-limit-line span {
            min-width: 0;
        }
        .staging-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
            width: 100%;
        }
        .staging-count-pill {
            min-width: 88px;
            min-height: 40px;
            padding: 0 6px;
            margin-right: auto;
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            color: var(--text-primary);
            font-size: 15px;
            font-weight: 900;
            line-height: 1.2;
            text-align: left;
        }
        .staging-control-btn,
        .staging-scan-btn {
            min-height: 48px;
            padding: 0.66rem 1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            white-space: nowrap;
        }
        .staging-scan-btn {
            min-height: 56px;
            min-width: 150px;
            padding: 0.72rem 1.3rem;
            line-height: 1.1;
            box-shadow: 0 8px 20px rgba(3, 83, 164, 0.22);
        }
        .staging-scan-btn.scan-ready {
            animation: scanPulse 1.4s ease-in-out infinite;
        }
        @keyframes scanPulse {
            0%, 100% {
                transform: translateY(0);
                box-shadow: 0 8px 20px rgba(3, 83, 164, 0.22);
            }
            50% {
                transform: translateY(-1px);
                box-shadow: 0 0 0 5px rgba(3, 83, 164, 0.12), 0 12px 28px rgba(3, 83, 164, 0.3);
            }
        }
        .upload-limit-line {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 10px;
            align-items: center;
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }
        .upload-limit-line strong {
            color: var(--accent);
            font-weight: 800;
        }
        .staging-grid {
            display: grid; gap: 16px; max-height: 60vh; overflow-y: auto; padding-right: 8px;
        }
        .staging-grid.single { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
        .staging-grid.dual { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

        .staging-item {
            position: relative; border-radius: 8px; overflow: visible; border: 1px solid var(--border);
            background: var(--bg-card); display: flex; flex-direction: column; align-items: center;
        }
        .staging-item .staging-img-wrap {
            width: 100%; aspect-ratio: 5/7; border-radius: 8px; overflow: hidden; position: relative;
        }
        .staging-item img {
            width: 100%; height: 100%; object-fit: cover;
        }
        .staging-item-pair {
            display: flex; gap: 4px; flex-direction: row; border: 1px solid var(--border); background: var(--bg-card); border-radius: 8px; overflow: visible; padding: 4px; position: relative;
        }
        .staging-item-pair .staging-img-col {
            flex: 1; display: flex; flex-direction: column; align-items: center;
        }
        .staging-item-pair .staging-img-wrap {
            width: 100%; aspect-ratio: 5/7; position: relative; border-radius: 4px; overflow: hidden;
        }
        .staging-item-pair img {
            width: 100%; height: 100%; object-fit: cover;
        }
        .staging-empty-back {
            background: var(--bg-input); display: flex; align-items: center; justify-content: center;
            color: var(--text-muted); font-size: 11px; text-align: center; width: 100%; height: 100%;
        }
        .staging-remove-btn {
            position: absolute; top: 4px; right: 4px; background: rgba(239, 68, 68, 0.9);
            color: white; border: none; width: 24px; height: 24px; border-radius: 50%;
            cursor: pointer; font-weight: bold; font-size: 14px; display: flex; align-items: center; justify-content: center;
            opacity: 0; transition: opacity 0.2s; z-index: 10;
        }
        .staging-item:hover .staging-remove-btn, .staging-item-pair:hover .staging-remove-btn { opacity: 1; }
        .staging-rotate-btn {
            margin-top: 4px; background: rgba(255,255,255,0.12); border: 1px solid var(--border);
            color: var(--text-secondary); width: 26px; height: 26px; border-radius: 50%;
            cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
            transition: background-color 0.2s, color 0.2s, border-color 0.2s; flex-shrink: 0;
        }
        .staging-rotate-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

        /* ─── Card Editor ────────────────────────────── */
        .editor { display: none; }
        .editor.active { display: block; }
        .match-view-container .editor {
            padding: 0 14px 16px;
        }
        .match-view-container .editor #thumbStrip,
        .match-view-container .editor #cardComparison {
            display: none !important;
        }
        .match-view-container .editor .title-row {
            margin-top: 2px;
        }
        .match-view-container .editor .title-row,
        .match-view-container .editor .fields-grid {
            display: none;
        }
        .match-view-container .editor .fields-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .match-view-container .editor .field-card {
            padding: 1rem;
            border-radius: 8px;
        }
        .match-view-container .editor .field-card h4 {
            margin-bottom: 0.45rem;
        }
        .match-view-container .editor .card-nav {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }

        .card-comparison { display: grid; grid-template-columns: max-content max-content; justify-content: center; gap: 24px; margin-bottom: 16px; }
        .back-panel { position: relative; }
        .back-placeholder {
            width: 100%; aspect-ratio: 5/7; max-width: 160px; border-radius: 8px;
            border: 2px dashed var(--border); margin: 0 auto;
            display: flex; align-items: center; justify-content: center;
            color: var(--text-muted); font-size: 12px; cursor: pointer;
            transition: all 0.2s;
        }
        .back-placeholder:hover { color: var(--text-primary); background: var(--bg-hover); }
        .card-panel {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 1.5rem; text-align: center;
            box-shadow: var(--shadow-md);
        }

        .card-panel-label {
            font-size: 11px; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.5px; margin-bottom: 8px;
        }
        .card-panel-label.uploaded { color: var(--accent); }
        .card-panel-label.matched { color: var(--green); }
        .card-image {
            width: 100%; max-width: 260px; height: auto; aspect-ratio: 5/7; border-radius: 8px; object-fit: cover;
            border: 1px solid var(--border); margin: 0 auto; display: block;
            cursor: zoom-in;
        }
        /* Photo pair: front + back side-by-side */
        .photo-pair {
            display: flex; gap: 12px; justify-content: center; align-items: flex-start;
        }
        .photo-half { text-align: center; flex: 1; max-width: 260px; }
        .photo-half .card-image { width: 100%; max-width: none; }
        .match-confidence {
            margin-top: 8px; font-size: 13px; font-weight: 600;
        }
        .conf-high { color: var(--green); }
        .conf-med { color: var(--yellow); }
        .conf-low { color: var(--red); }

        /* Global card zoom preview */
        #cardZoomPreview {
            display: none; position: fixed; z-index: 9999;
            pointer-events: none;
            width: min(480px, calc(100vw - 24px));
            height: min(672px, calc(100vh - 24px));
            border-radius: 12px; overflow: hidden;
            box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(99,102,241,0.3);
            border: 2px solid var(--border);
            background: var(--bg-primary);
        }
        #cardZoomPreview img {
            width: 100%; height: 100%; object-fit: contain;
            background: var(--bg-primary);
        }

        /* Title row */
        .title-row {
            display: flex; gap: 8px; align-items: center; margin-bottom: 16px;
        }
        .title-input {
            flex: 1; padding: 0.75rem 1rem; background: var(--bg-input);
            border: 1px solid var(--border); border-radius: var(--radius-sm);
            color: var(--text-primary); font-size: 0.95rem; font-family: inherit;
            box-shadow: var(--shadow-sm); font-weight: 600;
            min-width: 0;
        }

        .title-input:focus { outline: none; border-color: var(--border-focus); }
        .title-counter { font-size: 12px; white-space: nowrap; }

        .pill-group {
            display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
        }
        .match-view-container .pill-group {
            gap: 6px;
            margin-bottom: 0;
        }
        .pill {
            padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
            cursor: pointer; border: 1px solid var(--border); background: var(--bg-card);
            color: var(--text-secondary); transition: all 0.2s; font-family: inherit;
        }
        .match-view-container .pill {
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 11px;
            line-height: 1.15;
        }
        .match-variant-mount {
            width: 100%;
            max-width: 360px;
            margin: 10px auto 0;
            text-align: left;
        }
        .match-variant-mount #variantSection {
            margin: 0 !important;
            padding: 10px;
            border-radius: 8px;
            border-color: rgba(148, 163, 184, 0.24);
            box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
        }
        .match-variant-mount #variantSection h4 {
            margin-bottom: 8px;
            font-size: 0.64rem;
            letter-spacing: 0.12em;
        }
        .match-variant-mount .pill-group {
            display: flex;
            flex-direction: column;
            flex-wrap: nowrap;
            gap: 6px;
            margin: 0;
        }
        .match-variant-mount .pill {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 7px 9px;
            border-radius: 7px;
            font-size: 11px;
            line-height: 1.15;
            text-align: left;
        }
        .match-variant-mount .pill span {
            flex: 0 0 auto;
            margin-left: auto;
        }
        .pill span {
            opacity: 0.72;
            font-weight: 800;
        }
        .pill.active span {
            opacity: 0.9;
        }
        .pill:hover { background: var(--bg-hover); color: var(--text-primary); }
        .pill.active { background: var(--accent); color: white; border-color: transparent; }

        :is(#variantPills, #listEditVariantPills) .pill::after {
            content: '\2713';
            visibility: hidden;
            margin-left: auto;
            font-weight: 800;
        }
        #listEditVariantPills .pill::after {
            margin-left: 6px;
        }
        :is(#variantPills, #listEditVariantPills) .pill.active::after {
            visibility: visible;
        }
        html[data-throne-theme="dark"] :is(#variantSection, #listEditVariantSection) :is(#variantPills, #listEditVariantPills) .pill.active {
            background: var(--throne-accent-blue) !important;
            color: var(--throne-on-accent) !important;
            border-color: var(--throne-accent-blue) !important;
        }
        :is(#variantPills, #listEditVariantPills) .pill:focus-visible {
            outline: 2px solid var(--text-primary);
            outline-offset: 3px;
        }

        /* Fields grid */
        .fields-grid {
            display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
            margin-bottom: 16px;
        }
        .field-card {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 1.5rem;
            box-shadow: var(--shadow-sm);
        }
        .field-card h4 {
            font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
            color: var(--accent); letter-spacing: 0.1em; margin-bottom: 1.25rem;
        }

        .field-item { margin-bottom: 8px; }
        .field-item:last-child { margin-bottom: 0; }
        .field-item label {
            font-size: 11px; color: var(--text-secondary); display: block; margin-bottom: 3px;
        }
        .field-item input, .field-item select {
            width: 100%; padding: 0.6rem 0.75rem; background: var(--bg-input);
            border: 1px solid var(--border); border-radius: 8px;
            color: var(--text-primary); font-size: 0.9rem; font-family: inherit;
            font-weight: 600;
        }

        .field-item input:focus, .field-item select:focus {
            outline: none; border-color: var(--border-focus);
        }

        /* List View */
        .list-view-row {
            display: grid; grid-template-columns: 60px 1fr 100px 100px;
            gap: 12px; align-items: center; padding: 8px;
            border-bottom: 1px solid var(--border);
        }
        .list-view-row .text-sm { font-size: 12px; }
        .list-view-row .text-xs { font-size: 11px; color: var(--text-muted); }

        /* Navigation */
        .card-nav {
            display: flex; align-items: center; justify-content: space-between; gap: 12px;
            padding: 12px 16px; background: var(--bg-card);
            border: 1px solid var(--border); border-radius: var(--radius);
            margin-bottom: 12px;
        }
        .nav-btns { display: flex; justify-content: flex-end; gap: 8px; margin-left: auto; }
        .card-nav .btn { min-width: 106px; justify-content: center; }
        .card-nav-position { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }

        /* Thumbnail strip */
        .thumb-strip {
            display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin-bottom: 16px;
            scrollbar-width: thin; scrollbar-color: var(--border) transparent;
        }
        .thumb {
            width: 48px; border-radius: 6px; overflow: hidden;
            display: flex; flex-direction: column; gap: 2px;
            border: 2px solid var(--border); cursor: pointer; flex-shrink: 0;
            transition: all 0.2s; position: relative; background: var(--bg-hover);
        }
        .thumb:hover { background: var(--bg-hover); }
        .thumb.active { border-color: var(--accent); box-shadow: 0 0 12px rgba(99,102,241,0.5); }
        .thumb img { width: 100%; aspect-ratio: 2.5/3.5; object-fit: cover; }
        .thumb .idx {
            position: absolute; bottom: 2px; right: 2px; font-size: 9px;
            background: rgba(0,0,0,0.7); color: white; padding: 1px 4px;
            border-radius: 3px; font-weight: 700;
        }

        /* Loading overlay */
        .loading-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(15, 23, 42, 0.3);
            backdrop-filter: blur(12px);
            z-index: 9999; align-items: center; justify-content: center;
            transition: all 0.3s ease;
        }
        .loading-overlay.active { display: flex; }
        .loading-box {
            background: var(--surface); border-radius: 24px; padding: 40px;
            text-align: center; width: 100%; max-width: 420px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .spinner {
            width: 64px; height: 64px; border: 5px solid #f1f5f9;
            border-top-color: var(--accent); border-radius: 50%;
            animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
            margin: 0 auto 24px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        .progress-container {
            width: 100%; background: #f1f5f9; border-radius: 99px;
            height: 8px; margin: 24px 0 12px; overflow: hidden;
            display: none;
        }
        .progress-bar {
            height: 100%; background: var(--accent-gradient);
            width: 0%; transition: width 0.3s ease;
        }
        .progress-bar.is-indeterminate {
            animation: loading-progress-indeterminate 1.15s ease-in-out infinite;
            transition: none;
        }
        @keyframes loading-progress-indeterminate {
            from { transform: translateX(-140%); }
            to { transform: translateX(390%); }
        }
        #loadingText {
            font-size: 16px; font-weight: 700; color: var(--text-primary);
            margin: 0;
        }
        #loadingSubtext {
            font-size: 13px; color: var(--text-secondary);
            margin-top: 8px; font-weight: 500;
        }

        .direct-ebay-dock {
            position: fixed;
            right: 24px;
            bottom: 24px;
            z-index: 10001;
            width: min(392px, calc(100vw - 32px));
            background: #ffffff;
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 8px;
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
            padding: 14px;
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr);
            gap: 12px;
            align-items: start;
        }
        .direct-ebay-dock[hidden] { display: none; }
        .direct-ebay-dock-icon {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            background: #eaf4ff;
            color: var(--accent);
            flex-shrink: 0;
        }
        .direct-ebay-dock-icon .spinner {
            width: 22px;
            height: 22px;
            border-width: 3px;
            margin: 0;
        }
        .direct-ebay-dock.is-warning .direct-ebay-dock-icon {
            background: #fff7ed;
            color: #c2410c;
        }
        .direct-ebay-dock.is-complete .direct-ebay-dock-icon {
            background: #dcfce7;
            color: #047857;
        }
        .direct-ebay-dock-title {
            margin: 0;
            font-size: 14px;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1.25;
        }
        .direct-ebay-dock-subtitle {
            margin: 4px 0 0;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-secondary);
            line-height: 1.35;
        }
        .direct-ebay-dock-progress {
            height: 6px;
            margin-top: 10px;
            border-radius: 999px;
            background: #e2e8f0;
            overflow: hidden;
        }
        .direct-ebay-dock-progress-bar {
            height: 100%;
            width: 0%;
            border-radius: inherit;
            background: linear-gradient(90deg, #0058a8, #10b981);
            transition: width 0.25s ease;
        }
        .direct-ebay-dock-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 12px;
        }
        .direct-ebay-dock-actions button {
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: #f8fafc;
            color: var(--text-primary);
            border-radius: 8px;
            padding: 7px 10px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }
        .direct-ebay-dock-actions button:hover {
            border-color: rgba(0, 88, 168, 0.32);
            color: var(--accent);
        }

        /* ─── Batch Bar ─────────────────────────────── */
        .batch-bar {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas:
                "details"
                "actions";
            gap: 14px;
            align-items: stretch;
            padding: 1rem 1.2rem;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            margin-bottom: 12px;
            box-shadow: var(--shadow-sm);
        }
        .batch-group {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            min-width: 0;
            gap: 8px;
            padding-right: 14px;
            border-right: 1px solid rgba(148, 163, 184, 0.22);
        }
        .batch-group:last-child { border-right: 0; padding-right: 0; }
        .batch-group-picker { grid-area: picker; }
        .batch-group-details {
            grid-area: details;
            border-right: 0;
            padding-right: 0;
        }
        .batch-defaults-panel {
            display: grid;
            gap: 8px;
            border-top: 0;
            margin-top: 0;
            padding-top: 0;
        }
        .batch-group.batch-actions {
            grid-area: actions;
            border-right: 0;
            padding: 0;
        }
        .batch-group-title {
            font-size: 0.78rem;
            font-weight: 900;
            line-height: 1;
            color: var(--accent);
            text-transform: uppercase;
            letter-spacing: 0.09em;
        }
        .batch-picker-heading,
        .batch-details-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }
        .batch-toggle-btn {
            min-height: 28px;
            padding: 0.35rem 0.7rem;
            border: 1px solid rgba(3, 83, 164, 0.18);
            border-radius: 99px;
            background: rgba(3, 83, 164, 0.06);
            color: var(--accent);
            font-family: inherit;
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            transition: all 0.16s ease;
            white-space: nowrap;
        }
        .batch-toggle-btn:hover {
            border-color: rgba(3, 83, 164, 0.32);
            background: rgba(3, 83, 164, 0.1);
            color: var(--text-primary);
        }
        .batch-toggle-btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.14);
        }
        .batch-group-controls {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px 10px;
            min-width: 0;
        }
        .batch-picker-controls {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 40px;
            align-items: center;
            gap: 8px;
        }
        .batch-group-details .batch-group-controls {
            display: grid;
            grid-template-columns: minmax(200px, 1.6fr) minmax(148px, 0.7fr) minmax(96px, 0.35fr) minmax(148px, 0.55fr);
            align-items: start;
            gap: 8px;
        }
        .batch-active-line {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            min-height: 34px;
            padding: 0.42rem 0.65rem;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 0.78rem;
            font-weight: 700;
        }
        .batch-active-name {
            color: var(--text-primary);
            max-width: min(520px, 42vw);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .batch-active-dot {
            width: 7px;
            height: 7px;
            border-radius: 99px;
            background: #22c55e;
            box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
            flex: 0 0 auto;
        }
        .batch-active-meta {
            min-width: 0;
            overflow: visible;
            text-overflow: clip;
            white-space: normal;
            color: var(--text-secondary);
        }
        .batch-name-input {
            height: 40px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 0.5rem 0.7rem;
            font-size: 0.88rem;
            font-weight: 700;
            color: var(--text-primary);
            font-family: inherit;
            width: 100%;
            min-width: 0;
            transition: all 0.2s;
        }
        .batch-name-input:hover { background: var(--bg-hover); border-color: var(--border-hover); }
        .batch-name-input:focus {
            outline: none; border-color: var(--accent);
            background: var(--bg-input);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .batch-detail-field {
            display: inline-flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 6px;
            min-width: 0;
        }
        .batch-detail-label {
            color: var(--text-muted);
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .batch-name-field {
            width: 100%;
        }
        .batch-selector {
            height: 40px;
            padding: 0.45rem 0.82rem; background: var(--bg-input);
            border: 1px solid var(--border); border-radius: 10px;
            color: var(--text-primary); font-size: 0.82rem; font-family: inherit;
            color-scheme: light;
            cursor: pointer; min-width: 150px; font-weight: 700;
            line-height: 1.1;
        }
        #batchSelector { width: 100%; max-width: 100%; }
        .batch-create-btn {
            width: 40px;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 10px;
            background: var(--accent-gradient);
            color: #fff;
            font-family: inherit;
            font-size: 1.15rem;
            font-weight: 900;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(3, 83, 164, 0.2);
            transition: transform 0.16s ease, box-shadow 0.16s ease;
        }
        .batch-create-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 15px rgba(3, 83, 164, 0.28);
        }
        .batch-create-btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.16), 0 6px 15px rgba(3, 83, 164, 0.24);
        }

        .batch-selector:hover { border-color: var(--border-hover); background: var(--bg-hover); }
        .batch-selector:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .batch-selector option { background: var(--bg-card); }
        select.batch-selector.throne-smooth-select-native {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            min-width: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        .smooth-select-proxy {
            position: relative;
            width: 100%;
            min-width: 0;
        }
        .batch-picker-controls .smooth-select-proxy,
        .batch-field .smooth-select-proxy {
            width: 100%;
        }
        .smooth-select-trigger {
            width: 100%;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0.45rem 0.72rem 0.45rem 0.82rem;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.82rem;
            font-weight: 800;
            line-height: 1.1;
            cursor: pointer;
            box-shadow: none;
            transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
        }
        .smooth-select-trigger:hover {
            background: var(--bg-hover);
            border-color: var(--border-hover);
        }
        .smooth-select-trigger:focus-visible,
        .smooth-select-proxy.is-open .smooth-select-trigger {
            outline: none;
            background: var(--bg-card);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .smooth-select-trigger:active {
            transform: translateY(1px);
        }
        .smooth-select-proxy.compact .smooth-select-trigger {
            border-radius: 99px;
        }
        .smooth-select-trigger-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: left;
        }
        .smooth-select-chevron {
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
            color: #475569;
            transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .smooth-select-proxy.is-open .smooth-select-chevron {
            transform: rotate(180deg);
        }
        .smooth-select-proxy.is-open {
            z-index: 1000;
        }
        .smooth-select-panel {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            z-index: 1000;
            max-height: min(280px, 48vh);
            overflow: auto;
            padding: 5px;
            border: 1px solid rgba(148, 163, 184, 0.34);
            border-radius: 10px;
            background: #ffffff;
            box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(-4px) scale(0.98);
            transform-origin: top center;
            transition: opacity 0.14s cubic-bezier(0.16, 1, 0.3, 1), transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.14s linear;
        }
        .smooth-select-proxy.is-open .smooth-select-panel {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0) scale(1);
        }
        .smooth-select-option {
            width: 100%;
            min-height: 34px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0.46rem 0.58rem;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: #0f172a;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 750;
            text-align: left;
            cursor: pointer;
        }
        .smooth-select-option[hidden] {
            display: none !important;
        }
        .smooth-select-option:hover,
        .smooth-select-option:focus-visible {
            outline: none;
            background: #eff6ff;
            color: #0b3f7e;
        }
        .smooth-select-option.is-selected {
            background: rgba(3, 83, 164, 0.1);
            color: var(--accent);
        }
        .smooth-select-option.is-selected::after {
            content: "";
            width: 7px;
            height: 7px;
            flex: 0 0 auto;
            border-radius: 99px;
            background: var(--accent);
        }
        .smooth-select-option:disabled {
            cursor: default;
            color: #94a3b8;
            background: transparent;
        }
        .smooth-select-search {
            position: sticky;
            top: 0;
            z-index: 1;
            padding: 4px 4px 6px;
            background: #ffffff;
        }
        .smooth-select-search-input {
            width: 100%;
            min-height: 34px;
            padding: 0.45rem 0.62rem;
            border: 1px solid rgba(3, 83, 164, 0.18);
            border-radius: 8px;
            background: #f8fafc;
            color: var(--text-primary);
            font: inherit;
            font-size: 0.78rem;
            font-weight: 750;
            outline: none;
        }
        .smooth-select-search-input:focus {
            border-color: var(--accent);
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .smooth-select-no-results {
            padding: 0.55rem 0.62rem;
            color: var(--text-muted);
            font-size: 0.78rem;
            font-weight: 750;
        }
        .sku-prefix-field {
            width: 100%;
        }
        .sku-prefix-field small {
            display: inline;
            margin-left: 6px;
            color: var(--text-muted);
            font-size: 11px;
            line-height: 1.2;
            margin-top: 0;
            text-transform: none;
            letter-spacing: 0;
            font-weight: 700;
        }
        .sku-prefix-field input {
            width: 100%; min-width: 0; height: 40px;
            padding: 0.5rem 0.7rem; border-radius: 10px;
            border: 1px solid var(--border); background: var(--bg-input);
            color: var(--text-primary); font: inherit; font-size: 0.85rem;
            font-weight: 700;
        }
        .sku-prefix-field input:hover { border-color: var(--border-hover); background: var(--bg-hover); }
        .sku-prefix-field input:focus {
            outline: none; border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .sku-increment-field {
            width: 100%;
        }
        .sku-increment-control {
            width: 100%;
            min-width: 0;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0.5rem 0.7rem;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.82rem;
            font-weight: 800;
            cursor: pointer;
            user-select: none;
        }
        .sku-increment-control:hover {
            border-color: var(--border-hover);
            background: var(--bg-hover);
        }
        .sku-increment-control input {
            width: 16px;
            height: 16px;
            margin: 0;
            flex: 0 0 auto;
            accent-color: var(--accent);
        }
        .sku-field-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
            gap: 12px 14px;
            min-width: 0;
        }
        .sku-start-field {
            width: 100%;
        }
        .sku-start-field.is-disabled .batch-detail-label {
            opacity: 0.55;
        }
        .sku-start-number {
            width: 100%; min-width: 0; height: 40px;
            padding: 0.5rem 0.7rem; border-radius: 10px;
            border: 1px solid var(--border); background: var(--bg-input);
            color: var(--text-primary); font: inherit; font-size: 0.85rem;
            font-weight: 700; text-align: center;
        }
        .sku-start-number:hover { border-color: var(--border-hover); background: var(--bg-hover); }
        .sku-start-number:focus {
            outline: none; border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .sku-start-number:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--bg-hover);
        }
        .cost-basis-field[hidden] { display: none !important; }
        /* Box, height and radius come from .batch-selector so Paid and Cost
           Split resolve to one shape in the two-column setup grid. Only the
           money-specific bits live here. */
        .cost-basis-input {
            width: 100%;
            text-align: center;
            font-variant-numeric: tabular-nums;
            cursor: text;
        }
        .cost-basis-input:hover { border-color: var(--border-hover); background: var(--bg-hover); }
        .cost-basis-input:focus {
            outline: none; border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        /* The batch bar keeps its own compact chrome; it is not in that grid. */
        .batch-detail-field .cost-basis-input {
            height: 34px; padding: 0.35rem 0.6rem; border-radius: 9px;
            border: 1px solid var(--border); background: var(--bg-input);
            color: var(--text-primary); font: inherit; font-size: 0.82rem; font-weight: 700;
        }
        .create-cost-basis-preview {
            grid-column: 1 / -1;
            color: var(--text-muted);
            font-size: 0.78rem;
            font-weight: 600;
            line-height: 1.3;
        }
        .create-cost-basis-preview[hidden] { display: none !important; }
        .batch-inline-controls {
            display: flex; align-items: center; gap: 7px 8px; flex-wrap: wrap; min-width: 0;
        }
        .batch-compact-selector {
            min-width: 128px; border-radius: 99px; padding: 0.42rem 0.72rem;
        }
        .batch-compact-selector.variant { min-width: 138px; }
        .batch-field {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            min-width: 0;
        }
        .batch-field[hidden] {
            display: none !important;
        }
        .batch-field .scan-mode-label {
            align-self: flex-start;
            margin-right: 0;
        }
        .batch-field .batch-selector,
        .batch-field .scan-mode {
            width: 100%;
        }
        .batch-field-game { width: 142px; }
        .batch-field-entry-mode { width: 196px; }
        .batch-field-config { width: 158px; }
        .batch-field-condition { width: 118px; }
        .batch-field-variant { width: 140px; }
        .batch-field-category { width: 160px; }
        .batch-field-listing-type,
        .batch-field-variation-sort { width: 176px; }
        .batch-field-variation-title,
        .batch-field-variation-cover,
        .batch-field-variation-specifics {
            width: 100%;
        }
        .create-batch-grid .batch-field-variation-title,
        .create-batch-grid .batch-field-variation-specifics {
            grid-column: 1 / -1;
        }
        .variation-metadata-input {
            width: 100%;
            min-height: 36px;
            border: 1px solid var(--border);
            border-radius: 99px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 700;
            padding: 0.48rem 0.78rem;
            box-shadow: var(--shadow-sm);
            outline: none;
        }
        .variation-metadata-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.12);
        }
        .variation-metadata-input::placeholder {
            color: var(--text-muted);
            font-weight: 600;
        }
        .variation-title-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            min-width: 0;
        }
        .variation-title-counter {
            flex: 0 0 auto;
            color: var(--text-muted);
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 1;
            white-space: nowrap;
        }
        .variation-title-counter.near-limit {
            color: var(--yellow);
        }
        .loaded-variation-settings {
            margin: 12px 0 18px;
            overflow: hidden;
            border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
            border-radius: 14px;
            background: var(--bg-card);
            box-shadow: var(--shadow-md);
        }
        .loaded-variation-settings[hidden] {
            display: none !important;
        }
        .loaded-variation-settings-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 18px;
            border-bottom: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
            background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
        }
        .loaded-variation-settings-head h2 {
            margin: 0;
            color: var(--text-primary);
            font-size: 0.96rem;
            font-weight: 900;
        }
        .loaded-variation-settings-head p {
            margin: 3px 0 0;
            color: var(--text-muted);
            font-size: 0.72rem;
            font-weight: 650;
        }
        .loaded-variation-settings-badge {
            flex: 0 0 auto;
            border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
            border-radius: 999px;
            background: var(--bg-card);
            color: var(--accent);
            font-size: 0.68rem;
            font-weight: 900;
            padding: 0.38rem 0.68rem;
            white-space: nowrap;
        }
        .loaded-variation-settings-grid {
            display: grid;
            grid-template-columns: minmax(210px, 0.72fr) minmax(320px, 1.7fr) minmax(220px, 0.85fr);
            gap: 16px;
            align-items: end;
            padding: 18px;
        }
        .loaded-variation-field,
        .loaded-variation-cover-field {
            display: grid;
            gap: 7px;
            min-width: 0;
        }
        .loaded-variation-field-label {
            color: var(--text-muted);
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.07em;
            text-transform: uppercase;
        }
        .loaded-variation-field .batch-selector,
        .loaded-variation-field .variation-metadata-input {
            width: 100%;
            min-height: 42px;
            border-radius: 10px;
        }
        .loaded-variation-cover-control {
            display: grid;
            grid-template-columns: 62px minmax(0, 1fr);
            gap: 10px;
            align-items: center;
            min-width: 0;
        }
        .loaded-variation-cover-preview {
            position: relative;
            width: 62px;
            height: 62px;
            overflow: hidden;
            display: grid;
            place-items: center;
            border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--border));
            border-radius: 10px;
            background: var(--bg-input);
        }
        .loaded-variation-cover-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .loaded-variation-cover-preview img[hidden],
        .loaded-variation-cover-empty[hidden] {
            display: none !important;
        }
        .loaded-variation-cover-empty {
            max-width: 48px;
            color: var(--text-muted);
            font-size: 0.58rem;
            font-weight: 800;
            line-height: 1.15;
            text-align: center;
        }
        .loaded-variation-cover-actions {
            display: grid;
            gap: 7px;
            min-width: 0;
        }
        .loaded-variation-cover-button,
        .loaded-variation-settings-button {
            min-height: 36px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.72rem;
            font-weight: 850;
            padding: 0.48rem 0.74rem;
            cursor: pointer;
        }
        .loaded-variation-cover-button:hover,
        .loaded-variation-settings-button:hover:not(:disabled) {
            border-color: var(--accent);
        }
        .loaded-variation-cover-button.remove {
            color: var(--red);
        }
        .loaded-variation-settings-actions {
            display: flex;
            justify-content: flex-end;
            gap: 9px;
            padding: 0 18px 17px;
        }
        .loaded-variation-settings-button:disabled {
            cursor: not-allowed;
            opacity: 0.52;
        }
        .loaded-variation-settings-button.secondary {
            color: var(--text-secondary);
        }
        .loaded-variation-settings-button.primary {
            border-color: var(--accent);
            background: var(--accent);
            color: white;
        }
        @media (max-width: 980px) {
            .loaded-variation-settings-grid {
                grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.5fr);
            }
            .loaded-variation-field:last-child {
                grid-column: 1 / -1;
            }
        }
        @media (max-width: 720px) {
            .loaded-variation-settings-head {
                align-items: flex-start;
                flex-direction: column;
            }
            .loaded-variation-settings-grid {
                grid-template-columns: minmax(0, 1fr);
                padding: 15px;
            }
            .loaded-variation-field:last-child {
                grid-column: auto;
            }
            .loaded-variation-settings-actions {
                display: grid;
                grid-template-columns: minmax(0, 1fr);
                padding: 0 15px 15px;
            }
            .loaded-variation-settings-button {
                width: 100%;
            }
        }
        .variation-cover-upload-control {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: center;
            min-width: 0;
        }
        .variation-cover-upload-btn,
        .variation-cover-clear-btn {
            min-height: 42px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 800;
            padding: 0.5rem 0.75rem;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            white-space: nowrap;
        }
        .variation-cover-upload-btn {
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .variation-cover-upload-btn:hover,
        .variation-cover-clear-btn:hover {
            border-color: var(--accent);
        }
        .variation-cover-preview {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: 42px minmax(0, 1fr);
            gap: 8px;
            align-items: center;
            min-width: 0;
            color: var(--text-muted);
            font-size: 0.76rem;
            font-weight: 700;
        }
        .variation-cover-preview[hidden] {
            display: none !important;
        }
        .variation-cover-preview img {
            width: 42px;
            height: 42px;
            border-radius: 8px;
            border: 1px solid var(--border);
            object-fit: cover;
            background: var(--bg-input);
        }
        .variation-cover-preview span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .variation-specifics-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
        }
        .variation-specifics-clear {
            border: 0;
            background: transparent;
            color: var(--accent);
            font-family: inherit;
            font-size: 0.72rem;
            font-weight: 800;
            cursor: pointer;
            padding: 0;
        }
        .variation-specifics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
            gap: 8px;
            width: 100%;
        }
        .variation-specific-input-wrap {
            display: grid;
            gap: 4px;
            min-width: 0;
        }
        .variation-specific-input-wrap span {
            color: var(--text-muted);
            font-size: 0.66rem;
            font-weight: 800;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }
        .variation-disabled-note {
            color: var(--text-muted);
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1.25;
        }
        .batch-scan-mode-field { width: 178px; }
        .batch-scan-mode-field .scan-mode-btn {
            padding: 0.38rem 0.56rem;
            font-size: 0.72rem;
        }
        .batch-check-control {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            min-height: 36px;
            padding: 0.45rem 0.75rem;
            border: 1px solid var(--border);
            border-radius: 99px;
            background: var(--bg-card);
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 700;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            white-space: nowrap;
        }
        .batch-check-control input {
            width: 15px;
            height: 15px;
            margin: 0;
            accent-color: var(--accent);
        }
        .batch-save-indicator {
            font-size: 11px; color: var(--text-muted);
            display: none; align-items: center; gap: 4px;
        }
        .batch-save-indicator:not(:empty) { display: flex; }
        .batch-save-indicator.saving { color: var(--yellow); }
        .batch-save-indicator.saved { color: var(--green); }
        .batch-group.batch-actions {
            display: grid;
            grid-template-columns: 1fr;
            align-content: flex-start;
            align-items: start;
            gap: 8px;
            min-width: 0;
            grid-column: 1 / -1;
            padding-top: 12px;
            border-top: 1px solid rgba(148, 163, 184, 0.22);
        }
        .batch-group.batch-actions .batch-group-title {
            grid-column: 1 / -1;
        }
        .batch-action-column {
            display: grid;
            grid-template-columns: repeat(6, minmax(112px, 1fr));
            gap: 8px;
            min-width: 0;
            align-items: stretch;
        }
        .batch-action-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
            gap: 6px;
            align-items: stretch;
        }
        .batch-action-row.batch-workflow-row,
        .batch-action-row.slab-workflow-row {
            display: contents;
        }
        .batch-action-row.slab-workflow-row { display: none; }
        .batch-danger-zone {
            display: grid;
            gap: 6px;
            margin-top: 0;
            padding-top: 0;
            border-top: 0;
        }
        .batch-danger-label {
            display: none;
            color: var(--text-muted);
            font-size: 0.62rem;
            font-weight: 900;
            line-height: 1;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .batch-action-column.batch-danger-actions {
            display: contents;
        }
        .batch-btn {
            min-height: 36px;
            width: 100%;
            padding: 0.42rem 0.55rem; border-radius: 10px; font-size: 0.74rem;
            font-weight: 700; cursor: pointer; border: 1px solid var(--border);
            background: var(--bg-card); color: var(--text-secondary);
            font-family: inherit; transition: all 0.2s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .batch-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
        .batch-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
        .batch-btn:active:not(:disabled) { transform: translateY(1px); }
        .batch-btn svg {
            width: 15px;
            height: 15px;
            flex: 0 0 auto;
            display: block;
        }
        .batch-btn.delete {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
        }
        .batch-btn.save,
        .batch-btn.export-primary {
            min-height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
        }
        .batch-btn.save {
            background: var(--accent-gradient);
            border-color: transparent;
            color: #fff;
            box-shadow: 0 5px 14px rgba(3, 83, 164, 0.2);
        }
        .batch-btn.save:hover:not(:disabled) {
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 7px 16px rgba(3, 83, 164, 0.24);
        }
        .batch-btn.export-primary {
            background: #10b981;
            border-color: #10b981;
            color: #fff;
            box-shadow: 0 5px 14px rgba(16, 185, 129, 0.2);
        }
        .batch-btn.export-primary:hover:not(:disabled) {
            background: #0f9f73;
            border-color: #0f9f73;
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 7px 16px rgba(16, 185, 129, 0.24);
        }
        .batch-btn.export-primary:disabled {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-muted);
            opacity: 1;
            box-shadow: none;
        }
        .batch-btn.listed {
            background: var(--accent-gradient);
            border-color: transparent;
            color: #fff;
            box-shadow: 0 4px 12px rgba(3, 83, 164, 0.18);
        }
        .batch-btn.listed.is-listed {
            background: #10b981;
            border-color: #10b981;
            color: #fff;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
        }
        .batch-btn.listed:hover {
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 6px 15px rgba(3, 83, 164, 0.26);
        }
        .batch-btn.listed.is-listed:hover {
            background: #0f9f73;
            border-color: #0f9f73;
            box-shadow: 0 6px 15px rgba(16, 185, 129, 0.26);
        }
        .batch-btn.danger:hover { border-color: var(--red); color: var(--red); background: rgba(239, 68, 68, 0.06); }
        .batch-btn.delete {
            background: #ef4444;
            border-color: #ef4444;
            color: #ffffff;
            box-shadow: 0 5px 14px rgba(239, 68, 68, 0.18);
        }
        .batch-btn.delete:hover:not(:disabled) {
            border-color: #dc2626;
            color: #ffffff;
            background: #dc2626;
            transform: translateY(-1px);
            box-shadow: 0 7px 16px rgba(239, 68, 68, 0.24);
        }
        body.batch-info-topbar-collapsed #batchBar {
            display: none !important;
        }
        body.batch-info-topbar-collapsed .toolbar {
            margin-top: 2px;
        }
        body:not(.listing-ui-ready) #batchBar,
        body:not(.listing-ui-ready) #emptyState,
        body:not(.listing-ui-ready) #viewModeToggleGroup,
        body:not(.listing-ui-ready) #listingSortMenu,
        body:not(.listing-ui-ready) #bulkEditAllBtn,
        body.listing-batch-route-loading #batchBar,
        body.listing-batch-route-loading #createBatchFlow,
        body.listing-batch-route-loading #emptyState,
        body.listing-batch-route-loading #viewModeToggleGroup,
        body.listing-batch-route-loading #listingSortMenu,
        body.listing-batch-route-loading #bulkEditAllBtn {
            display: none !important;
        }
        /* While a batch route loads, hold the loaded geometry: the shell footer is not
           drawn (pinned to the bottom of the empty page, it would be thrown far down
           when the rows render, and pushing it below the fold would add a page
           scrollbar that later goes away), and the topbar keeps its batch row, hidden
           (listing-toolbar.css gives its controls row a fixed height). This outranks
           the [hidden] rule; queue-only mode still hides the batch row. */
        body.listing-page.listing-batch-route-loading .throne-page-footer { display: none; }
        body.listing-page.listing-batch-route-loading:not(.listing-queue-only) #topbarBatchChip { display: flex !important; visibility: hidden; }
        .listing-boot-slot {
            display: none;
            align-items: center;
            justify-content: center;
            min-height: 240px;
            padding: 16px;
        }
        body.listing-page:not(.listing-ui-ready):not(.batch-create-mode) .listing-boot-slot {
            display: flex;
        }
        body.listing-page.listing-ui-ready .listing-boot-slot,
        body.listing-page.batch-create-mode .listing-boot-slot {
            display: none;
        }
        body.listing-ui-ready #createBatchBootStatus,
        body.listing-batch-route-loading #createBatchBootStatus {
            display: none;
        }
        .create-batch-flow {
            display: none;
            gap: 18px;
            margin: -2px 0 18px;
        }
        body.batch-create-mode .create-batch-flow {
            display: grid;
            grid-template-columns: minmax(420px, 0.95fr) minmax(500px, 1.05fr);
            align-items: start;
        }
        .create-batch-overview {
            grid-column: 1 / -1;
            display: grid;
            gap: 14px;
            padding: 16px 20px 18px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            box-shadow: var(--shadow-sm);
        }
        .create-batch-overview h1 {
            margin: 0;
            font-size: clamp(28px, 3vw, 38px);
            line-height: 1.05;
            letter-spacing: 0;
            color: var(--text-primary);
        }
        body.batch-create-mode #batchBar {
            display: none !important;
        }
        body.batch-create-mode .toolbar {
            display: none !important;
        }
        .create-batch-steps {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
            gap: 10px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .create-batch-step {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
            min-height: 74px;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
        }
        .create-batch-step.is-active {
            border-color: rgba(3, 83, 164, 0.28);
            background: rgba(3, 83, 164, 0.06);
        }
        .create-step-number {
            width: 34px;
            height: 34px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            background: #e2e8f0;
            color: var(--text-secondary);
            font-weight: 900;
        }
        .create-batch-step.is-active .create-step-number {
            background: var(--accent);
            color: #ffffff;
        }
        .create-batch-step.is-complete .create-step-number {
            background: #10b981;
            color: #ffffff;
        }
        .create-batch-step > span:not(.create-step-number) {
            display: grid;
            gap: 2px;
            min-width: 0;
        }
        .create-step-separator {
            align-self: center;
            color: var(--text-muted);
            font-size: 24px;
            font-weight: 900;
            line-height: 1;
        }
        .create-step-title {
            display: block;
            font-size: 13px;
            font-weight: 900;
            color: var(--text-primary);
        }
        .create-step-copy {
            display: block;
            margin-top: 2px;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
        }
        .create-batch-card,
        .create-upload-card {
            display: grid;
            gap: 12px;
            align-self: start;
            padding: 18px 20px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            box-shadow: var(--shadow-sm);
        }
        .create-batch-card h2,
        .create-upload-card h2 {
            font-size: 18px;
            line-height: 1.2;
            margin: 0;
        }
        .config-manage-link {
            width: 22px;
            height: 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: 999px;
            color: var(--text-muted);
            background: var(--bg-input);
            vertical-align: middle;
            flex: 0 0 auto;
        }
        .config-manage-link svg {
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
        }
        .create-batch-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px 14px;
        }
        .create-batch-grid .batch-detail-field.batch-name-field,
        .create-batch-grid .sku-preview-field {
            grid-column: 1 / -1;
        }
        .create-section-heading {
            grid-column: 1 / -1;
            color: var(--accent);
            font-size: 0.76rem;
            font-weight: 900;
            line-height: 1;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .create-card-defaults-heading,
        .create-scan-speed-heading,
        .create-cost-basis-heading {
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }
        .create-batch-grid .batch-field {
            width: 100%;
            align-items: stretch;
            justify-content: flex-start;
            gap: 6px;
        }
        .create-batch-grid .batch-detail-field,
        .create-batch-grid .batch-field,
        .create-batch-grid .sku-preview-field {
            min-width: 0;
        }
        .create-batch-grid .batch-name-input,
        .create-batch-grid .variation-metadata-input,
        .create-batch-grid .sku-prefix-field input,
        .create-batch-grid .sku-start-number,
        .create-batch-grid .sku-increment-control,
        .create-batch-grid .batch-selector,
        .create-batch-grid .smooth-select-proxy {
            width: 100% !important;
            min-width: 0;
            height: 42px;
            border-radius: 10px;
        }
        .create-batch-grid .sku-field-row {
            grid-column: 1 / -1;
        }
        .create-batch-grid .batch-field select.batch-selector,
        .create-batch-grid .batch-field .smooth-select-proxy {
            border-radius: 10px !important;
        }
        .create-batch-grid .smooth-select-proxy.compact .smooth-select-trigger {
            border-radius: 10px !important;
        }
        .create-batch-grid .batch-compact-selector {
            min-width: 0;
            padding: 0.5rem 0.75rem;
        }
        .create-batch-grid .smooth-select-proxy {
            justify-content: space-between;
        }
        .create-batch-grid .scan-mode-label {
            min-height: 22px;
            margin: 0;
            display: flex;
            align-items: center;
            line-height: 1;
        }
        .create-batch-grid .batch-field-config .scan-mode-label {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .create-batch-grid .create-scan-mode-field {
            align-items: stretch;
            gap: 8px;
            max-width: 100%;
        }
        .create-batch-grid .create-scan-mode-field .scan-mode-label {
            color: var(--accent);
            font-size: 0.76rem;
        }
        .create-batch-grid .create-scan-mode-field .scan-mode {
            width: 100%;
            max-width: 100%;
            height: 44px;
            justify-self: stretch;
        }
        .create-batch-grid .create-scan-mode-field .scan-mode-btn {
            flex: 1 1 0;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .create-batch-grid .create-scan-mode-field .create-step-copy {
            margin: 0;
            text-align: left;
            font-size: 12px;
            color: var(--text-secondary);
        }
        .fast-scan-control {
            position: relative;
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            min-height: 42px;
            padding: 7px 10px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-input);
            cursor: pointer;
            user-select: none;
        }
        .batch-field-fast-scan {
            grid-column: 1 / -1;
            max-width: 360px;
        }
        .fast-scan-control input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }
        .fast-scan-control .toggle {
            pointer-events: none;
        }
        .fast-scan-control-text {
            display: grid;
            gap: 1px;
            min-width: 0;
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 900;
            line-height: 1.1;
        }
        .fast-scan-control-text small {
            color: var(--text-secondary);
            font-size: 10px;
            font-weight: 850;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .create-upload-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
        }
        .create-upload-mode-control {
            width: min(300px, 100%);
            display: grid;
            gap: 8px;
            flex: 0 0 auto;
        }
        .create-upload-mode-control .scan-mode-label {
            color: var(--accent);
            font-size: 0.76rem;
            line-height: 1;
        }
        .create-upload-mode-control .scan-mode {
            width: 100%;
            height: 44px;
        }
        .create-upload-mode-control .scan-mode-btn {
            flex: 1 1 0;
            min-width: 0;
        }
        .toggle {
            position: relative;
            width: 48px;
            height: 28px;
            border-radius: 999px;
            background: #e5e7eb;
            cursor: pointer;
            flex: 0 0 auto;
            transition: background-color 0.2s ease;
        }
        .toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
            transition: transform 0.2s ease;
        }
        .toggle.active {
            background: var(--accent);
        }
        .toggle.active::after {
            transform: translateX(20px);
        }
        .batch-match-tuning {
            grid-column: 1 / -1;
            display: grid;
            gap: 12px;
            padding-top: 14px;
            border-top: 1px solid var(--border);
        }
        .batch-match-tuning[hidden] {
            display: none !important;
        }
        .matching-settings-head {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: center;
        }
        .matching-settings-title,
        .matching-rule-title {
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 900;
        }
        .matching-settings-copy,
        .matching-help {
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 700;
            line-height: 1.42;
            max-width: 420px;
        }
        .matching-settings-actions {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }
        .matching-filter-status {
            margin-top: 5px;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 800;
        }
        .matching-clear-btn {
            padding: 8px 12px;
            border: 1px solid rgba(239, 68, 68, 0.24);
            border-radius: 8px;
            background: #ffffff;
            color: var(--danger);
            cursor: pointer;
            font: inherit;
            font-size: 12px;
            font-weight: 900;
            white-space: nowrap;
        }
        .matching-clear-btn:hover:not(:disabled) {
            border-color: rgba(239, 68, 68, 0.45);
            background: rgba(239, 68, 68, 0.06);
        }
        .matching-clear-btn:disabled {
            cursor: not-allowed;
            opacity: 0.55;
        }
        .matching-reprint-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
        }
        .matching-tuning-body {
            display: none;
            gap: 12px;
        }
        .batch-match-tuning.enabled .matching-tuning-body {
            display: grid;
        }
        .matching-rule-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 12px;
        }
        .matching-rule-group {
            display: grid;
            gap: 10px;
            min-width: 0;
            padding: 12px;
            border: 1px solid var(--border);
            border-left: 3px solid rgba(3, 83, 164, 0.55);
            border-radius: 8px;
            background: #ffffff;
        }
        .matching-rule-group.require {
            border-left-color: rgba(22, 163, 74, 0.75);
        }
        .matching-rule-group.avoid {
            border-left-color: rgba(239, 68, 68, 0.7);
        }
        .matching-set-picker {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: start;
            gap: 8px;
        }
        .matching-set-select {
            width: 100%;
            height: 112px;
            min-width: 0;
            padding: 8px 6px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #ffffff;
            color: var(--text-primary);
            font: inherit;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.25;
        }
        .matching-set-select option {
            padding: 5px 8px;
            border-radius: 6px;
        }
        .matching-set-add {
            justify-self: end;
            padding: 8px 12px;
            border: 1px solid rgba(3, 83, 164, 0.18);
            border-radius: 8px;
            background: #ffffff;
            color: var(--accent);
            cursor: pointer;
            font: inherit;
            font-size: 12px;
            font-weight: 900;
        }
        .matching-set-add:hover {
            border-color: rgba(3, 83, 164, 0.35);
            background: rgba(3, 83, 164, 0.06);
        }
        .matching-selected-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            grid-column: 1 / -1;
            min-height: 34px;
            padding-top: 2px;
        }
        .matching-selected-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            max-width: 100%;
            padding: 7px 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #ffffff;
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 900;
            line-height: 1.2;
        }
        .matching-selected-chip span {
            overflow-wrap: anywhere;
        }
        .matching-selected-chip button {
            width: 18px;
            height: 18px;
            border: 0;
            border-radius: 50%;
            background: rgba(15, 23, 42, 0.08);
            color: var(--text-secondary);
            cursor: pointer;
            font: inherit;
            font-size: 12px;
            font-weight: 900;
            line-height: 18px;
        }
        .matching-selected-chip button:hover {
            background: var(--danger);
            color: #ffffff;
        }
        .matching-empty {
            align-self: center;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 800;
        }
        .matching-rule-group textarea {
            min-height: 74px;
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font: inherit;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.4;
            background: #ffffff;
        }
        .sku-preview-field {
            display: grid;
            gap: 6px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }
        .sku-preview-value {
            min-height: 28px;
            padding: 7px 10px;
            border-radius: 7px;
            background: rgba(3, 83, 164, 0.08);
            color: var(--accent);
            font-size: 12px;
            font-weight: 900;
        }
        .create-upload-target {
            padding: 11px 12px;
            border: 1px solid rgba(3, 83, 164, 0.16);
            border-radius: 8px;
            background: rgba(3, 83, 164, 0.07);
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 800;
            text-align: center;
        }
        .create-upload-target strong {
            color: var(--accent);
        }
        .create-upload-card .empty-state {
            margin: 0;
            max-width: none;
            padding: 58px 32px;
            border-radius: 14px;
            background: var(--surface);
        }
        .create-upload-card .staging-state {
            margin: 0;
            padding: 18px;
            background: var(--bg-card);
            border-radius: 10px;
        }
        .create-upload-card .staging-header {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            align-items: stretch;
            gap: 18px;
            margin-bottom: 18px;
        }
        body.slab-create-mode .create-batch-flow {
            grid-template-columns: minmax(360px, 620px) minmax(0, 1fr);
        }
        body.slab-create-mode .create-upload-card,
        body.slab-create-mode .create-batch-steps,
        body.slab-create-mode #createDeckMatching,
        body.slab-create-mode .create-batch-grid .batch-field-condition,
        body.slab-create-mode .create-batch-grid .batch-field-variant,
        body.slab-create-mode .create-batch-grid .batch-field-fast-scan,
        body.slab-create-mode .create-batch-grid .create-scan-speed-heading,
        body.slab-create-mode .create-batch-grid .create-scan-mode-field {
            display: none !important;
        }
        body.slab-create-mode .create-batch-card {
            max-width: 620px;
        }
        body.slab-create-mode .create-batch-grid {
            grid-template-columns: minmax(0, 1fr) minmax(0, 0.84fr);
        }
        body.slab-create-mode .create-batch-grid .create-card-defaults-heading {
            padding-top: 10px;
        }
        body.slab-create-mode .create-batch-grid .batch-field-game,
        body.slab-create-mode .create-batch-grid .batch-field-config,
        body.slab-create-mode .create-batch-grid .batch-field-category {
            width: 100%;
        }
        body.slab-create-mode .create-batch-grid .batch-field-category {
            grid-column: 1 / -1;
            max-width: 360px;
        }
        .batch-bar.batch-collapsed {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0.65rem 0.9rem;
            margin-bottom: 10px;
        }
        .batch-bar.batch-collapsed .batch-group-details { display: none; }
        body.batch-info-collapsed #batchBar .batch-group-details { display: none; }
        .batch-bar.batch-collapsed .batch-group.batch-actions .batch-group-title { display: none; }
        body.batch-info-collapsed #batchBar .batch-group.batch-actions .batch-group-title { display: none; }
        .batch-bar.batch-collapsed .batch-workflow-row .batch-btn:not(.listed) { display: none; }
        body.batch-info-collapsed #batchBar .batch-workflow-row .batch-btn:not(.listed) { display: none; }
        .batch-bar.batch-collapsed .batch-group.batch-actions > .batch-action-column > .batch-btn:not(.export-primary) { display: none; }
        body.batch-info-collapsed #batchBar .batch-group.batch-actions > .batch-action-column > .batch-btn:not(.export-primary) { display: none; }
        .batch-bar.batch-collapsed .batch-group.batch-actions .batch-danger-zone { display: none; }
        body.batch-info-collapsed #batchBar .batch-group.batch-actions .batch-danger-zone { display: none; }
        .batch-bar.batch-collapsed .batch-group.batch-actions {
            display: grid;
            flex: 0 0 308px;
            min-width: 308px;
            margin-left: auto;
            padding: 0;
            border: 0;
        }
        body.batch-info-collapsed #batchBar .batch-group.batch-actions {
            display: grid;
            flex: 0 0 308px;
            min-width: 308px;
            margin-left: auto;
            padding: 0;
            border: 0;
        }
        .batch-bar.batch-collapsed .batch-group.batch-actions .batch-action-column {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 8px;
        }
        body.batch-info-collapsed #batchBar .batch-group.batch-actions .batch-action-column {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 8px;
        }
        .batch-bar.batch-collapsed .batch-workflow-row {
            display: block;
            grid-column: 1;
            grid-row: 1;
        }
        body.batch-info-collapsed #batchBar .batch-workflow-row {
            display: block;
            grid-column: 1;
            grid-row: 1;
        }
        .batch-bar.batch-collapsed .batch-btn.export-primary {
            grid-column: 2;
            grid-row: 1;
        }
        body.batch-info-collapsed #batchBar .batch-btn.export-primary {
            grid-column: 2;
            grid-row: 1;
        }
        .batch-bar.batch-collapsed .batch-btn {
            min-height: 38px;
        }
        .batch-bar.batch-collapsed .batch-group-picker {
            flex: 1 1 auto;
            display: grid;
            grid-template-columns: auto minmax(220px, 420px) minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            padding: 0;
            border: 0;
        }
        .batch-bar.batch-collapsed .batch-picker-heading {
            justify-content: flex-start;
        }
        .batch-bar.batch-collapsed .batch-group-controls {
            flex-wrap: nowrap;
        }
        .batch-bar.batch-collapsed .batch-picker-controls {
            grid-template-columns: minmax(0, 1fr) 38px;
        }
        .batch-bar.batch-collapsed #batchSelector {
            height: 38px;
        }
        .batch-bar.batch-collapsed .batch-create-btn {
            width: 38px;
            height: 38px;
        }
        .batch-bar.batch-collapsed .batch-active-line {
            min-height: 0;
            flex-wrap: nowrap;
            overflow: hidden;
        }
        .batch-bar.batch-collapsed .batch-active-name {
            max-width: 180px;
            flex: 0 1 auto;
        }
        .batch-bar.batch-collapsed .batch-active-meta {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* ─── Replace Card Modal ────────────────────── */
        .modal-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(0,0,0,0.85); z-index: 100;
            align-items: center; justify-content: center;
            overflow-y: auto;
        }
        .modal-overlay.active { display: flex; }
        .modal {
            width: 100%; max-width: 1100px; margin: 24px;
            background: var(--bg-secondary); border: 1px solid var(--border);
            border-radius: var(--radius); display: flex; flex-direction: column;
            max-height: calc(100vh - 48px); overflow: hidden;
        }
        .match-view-container .modal {
            width: 100%;
            max-width: none;
            margin: 0;
        }
        body.listing-view-match .match-view-container .modal {
            height: 100%;
            max-height: 100%;
            min-height: 0;
        }
        body.batch-info-collapsed .match-view-container {
            margin-top: 8px !important;
        }
        body.batch-info-collapsed .match-view-container .modal {
            max-height: calc(100dvh - 20px);
            margin-top: 12px;
            margin-bottom: 12px;
        }
        body.listing-view-match.batch-info-collapsed .match-view-container .modal {
            max-height: 100%;
            margin-top: 0;
            margin-bottom: 0;
        }
        .modal-header {
            display: flex; align-items: center; justify-content: space-between;
            gap: 16px;
            min-height: 56px;
            padding: 8px 14px 8px 18px; border-bottom: 1px solid var(--border);
        }
        .modal-title-block {
            min-width: 0;
            flex: 1 1 auto;
        }
        .modal-title-row {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
        }
        .modal-header h2 {
            display: flex;
            align-items: baseline;
            gap: 6px;
            min-width: 0;
            font-size: 15px;
            font-weight: 800;
            line-height: 1.15;
            margin: 0;
            white-space: nowrap;
        }
        .modal-title-separator {
            color: var(--text-muted);
            font-weight: 700;
        }
        .modal-header .card-info {
            min-width: 0;
            max-width: 280px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
        }
        .modal-title-help {
            position: relative;
            width: 24px;
            height: 24px;
            border-radius: 7px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 800;
            line-height: 1;
            cursor: help;
            display: flex; align-items: center; justify-content: center;
            box-shadow: var(--shadow-sm);
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
        }
        .modal-title-help:hover,
        .modal-title-help:focus-visible {
            background: var(--surface);
            border-color: var(--border-focus);
            color: var(--accent);
            transform: translateY(-1px);
        }
        .modal-title-help::after {
            content: attr(data-tooltip);
            position: absolute;
            top: 50%;
            left: calc(100% + 10px);
            transform: translateY(-50%);
            width: max-content;
            max-width: 260px;
            padding: 7px 9px;
            border-radius: 6px;
            background: #111827;
            color: #fff;
            font-size: 11px;
            font-weight: 600;
            line-height: 1.35;
            white-space: normal;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.15s ease;
            z-index: 40;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
        }
        .modal-title-help:hover::after,
        .modal-title-help:focus-visible::after {
            opacity: 1;
        }

        /* Top comparison: Your Photo + Current Match side by side */
        .modal-match-body {
            display: grid;
            grid-template-columns: minmax(680px, 1fr) minmax(360px, 760px);
            min-height: 0;
            flex: 1;
            border-bottom: 1px solid var(--border);
        }
        .modal-comparison-panel {
            min-width: 0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            border-right: 1px solid var(--border);
        }
        .modal-results-panel {
            min-width: 0;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .modal-top {
            display: grid;
            grid-template-columns: repeat(2, minmax(240px, var(--match-card-width, 420px)));
            justify-content: end;
            gap: clamp(18px, 1.2vw, 36px);
            padding: clamp(12px, 1.5vw, 22px) clamp(16px, 1.8vw, 28px) 10px;
            flex: 0 0 auto;
            align-items: start;
        }
        .modal-card-preview {
            text-align: center; position: relative; overflow: hidden; border-radius: 8px; min-width: 0;
            display: flex; flex-direction: column; align-items: center;
        }
        .modal-card-preview.uploaded-preview {
            align-items: center;
        }
        .modal-card-preview .preview-label {
            align-self: center;
            margin-bottom: 9px;
            padding: 0;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 850;
            line-height: 1.2;
            letter-spacing: 0;
            text-transform: uppercase;
        }
        .modal-card-preview .preview-label.uploaded,
        .modal-card-preview .preview-label.current {
            color: var(--text-secondary);
        }
        .preview-label-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 25px;
            margin-bottom: 9px;
        }
        .preview-label-row .preview-label {
            margin-bottom: 0;
        }
        .current-match-confidence {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 0 9px;
            border-radius: 999px;
            background: var(--throne-status-success-bg, #ecfdf5);
            color: var(--throne-status-success-text, #047857);
            font-size: 11px;
            font-weight: 900;
            line-height: 1;
            white-space: nowrap;
        }
        .current-match-confidence.confidence-medium {
            background: var(--throne-status-warning-bg, #fffbeb);
            color: var(--throne-status-warning-text, #92400e);
        }
        .current-match-confidence.confidence-low {
            background: var(--throne-status-danger-bg, #fff5f5);
            color: var(--throne-status-danger-text, #b91c1c);
        }
        .modal-card-img {
            width: min(100%, var(--match-card-width, 420px));
            max-width: 100%;
            height: auto;
            max-height: none;
            aspect-ratio: 5/7;
            border-radius: 8px;
            border: 1px solid var(--border);
            object-fit: contain;
            transition: transform 0.3s ease;
        }

        /* Magnification Tool */
        .selection-box { position: absolute; border: 2px solid var(--accent); background: rgba(99, 102, 241, 0.2); display: none; pointer-events: none; z-index: 100; }
        .magnify-mode img { cursor: crosshair !important; }
        .loupe-lens { position: absolute; border: 4px solid var(--border); box-shadow: 0 10px 25px rgba(0,0,0,0.8); border-radius: 50%; background-repeat: no-repeat; cursor: grab; z-index: 110; display: none; background-color: var(--bg-card); }
        .loupe-lens:active { cursor: grabbing; }

        .modal-card-name {
            margin-top: 12px; font-size: 20px; font-weight: 800;
            line-height: 1.15;
            color: var(--text-primary);
        }
        .modal-card-set {
            max-width: 360px;
            margin: 6px auto 0;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.35;
            color: var(--text-primary);
            overflow-wrap: anywhere;
        }
        .modal-card-debug {
            max-width: 360px;
            margin: 5px auto 0;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.35;
            color: var(--text-muted);
            overflow-wrap: anywhere;
        }
        /* Search + Results */
        .modal-search {
            padding: 12px 20px; border-bottom: 1px solid var(--border);
        }
        .modal-search input {
            width: 100%; padding: 10px 14px; background: var(--bg-input);
            border: 1px solid var(--border); border-radius: var(--radius-sm);
            color: var(--text-primary); font-size: 14px; font-family: inherit;
        }
        .modal-search input:focus {
            outline: none; border-color: var(--border-focus);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
        }
        .modal-search input::placeholder { color: var(--text-muted); }
        .modal-results { flex: 1; overflow-y: auto; padding: 12px 20px; max-height: none; min-height: 0; }
        .modal-results-header {
            display: flex; align-items: center; justify-content: space-between;
            gap: 12px; margin-bottom: 10px;
        }
        .modal-results-header .modal-section-label { margin: 0; min-width: 0; }
        .modal-results-header-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex: 0 0 auto;
        }
        .modal-results-header .result-count {
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
        }
        .match-results-view-toggle {
            display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px;
            padding: 2px; border: 1px solid var(--border); border-radius: 7px;
            background: var(--bg-input);
        }
        .match-results-view-toggle button {
            min-width: 44px; height: 26px; padding: 0 9px; border: 0; border-radius: 5px;
            background: transparent; color: var(--text-secondary); font: inherit;
            font-size: 11px; font-weight: 800; letter-spacing: 0; cursor: pointer;
        }
        .match-results-view-toggle button.active {
            background: var(--surface); color: var(--accent);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
        }
        .modal-results-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
            gap: 10px;
        }
        .modal-results-grid.list-view {
            display: flex; flex-direction: column; gap: 4px;
        }
        .modal-results-grid .no-results { grid-column: 1 / -1; }
        .match-card {
            display: flex; flex-direction: column; gap: 8px; padding: 10px;
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius-sm); cursor: pointer;
            transition: all 0.2s; position: relative;
        }
        .match-card:hover {
            background: var(--bg-card-hover);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .match-card.selected {
            border-color: var(--green);
            box-shadow: 0 0 0 1px var(--green);
        }
        .match-card-img-wrap {
            position: relative; flex-shrink: 0; text-align: center;
        }
        .match-card-img {
            width: 100%; max-width: 140px; aspect-ratio: 5/7;
            border-radius: 6px; object-fit: cover; display: block;
            margin: 0 auto; cursor: pointer;
            transition: box-shadow 0.2s;
        }
        .match-card:hover .match-card-img {
            box-shadow: 0 0 12px rgba(99,102,241,0.3);
        }
        .match-card-info { min-width: 0; }
        .match-card-name {
            font-size: 13px; font-weight: 700; line-height: 1.3;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
        }
        .match-card-set {
            font-size: 11px; color: var(--text-secondary); margin-top: 2px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .match-card-details {
            font-size: 13px; font-weight: 600; color: var(--text-primary); margin-top: 2px;
        }
        .match-card-conf {
            position: absolute; top: 6px; right: 6px;
            font-size: 10px; font-weight: 700; padding: 2px 6px;
            border-radius: 4px; line-height: 1.2; text-align: center;
            border: 1px solid rgba(255,255,255,0.85);
            box-shadow: 0 1px 4px rgba(15,23,42,0.28);
        }
        .match-card-conf.high { background: #059669; color: #ffffff; }
        .match-card-conf.med { background: #f59e0b; color: #111827; }
        .match-card-conf.low { background: #dc2626; color: #ffffff; }
        .match-card-price {
            font-size: 14px; font-weight: 700; color: var(--green); margin-top: 2px;
        }
        .match-card-variants {
            display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
        }
        .match-variant-btn {
            border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary);
            border-radius: 6px; padding: 3px 6px; font-size: 10px; font-weight: 700;
            line-height: 1.2; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; font-family: inherit;
        }
        .match-variant-btn:hover {
            border-color: var(--accent); color: var(--accent); background: rgba(59, 130, 246, 0.08);
        }
        .match-card-list-row {
            display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(118px, 150px);
            align-items: center; gap: 8px; padding: 6px 8px;
            min-height: 68px;
        }
        .match-card-list-row:hover { transform: none; }
        .match-card-list-row .match-card-img-wrap { text-align: left; }
        .match-card-list-row .match-card-img {
            width: 42px; max-width: 42px; height: 59px; aspect-ratio: auto; margin: 0;
        }
        .match-card-list-row .match-card-name {
            font-size: 13px; line-height: 1.25; -webkit-line-clamp: 1;
        }
        .match-card-list-row .match-card-set {
            font-size: 11px; margin-top: 2px;
        }
        .match-list-meta {
            display: flex; flex-wrap: wrap; gap: 3px 7px; align-items: baseline;
            margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--text-primary);
        }
        .match-list-meta .match-card-price {
            margin: 0; font-size: 12px; line-height: 1.2;
        }
        .match-list-actions {
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
        }
        .match-list-actions .match-card-conf {
            position: static;
            align-self: flex-end;
            margin-bottom: 0;
        }
        .match-card-list-row .match-card-variants {
            flex-direction: column; flex-wrap: nowrap; align-items: stretch;
            gap: 3px; margin: 0; min-width: 0;
        }
        .match-card-list-row.no-actions .match-card-info { grid-column: 2 / -1; }
        .match-card-list-row.has-confidence .match-card-variants { padding-top: 0; }
        .match-card-list-row .match-variant-btn {
            width: 100%; text-align: left; padding: 3px 7px; font-size: 10px;
        }
        @media (max-width: 640px) {
            .modal-results-header { align-items: stretch; flex-direction: column; }
            .modal-results-header-actions {
                align-self: flex-start;
                flex-wrap: wrap;
                justify-content: flex-start;
            }
            .match-results-view-toggle { align-self: flex-start; }
            .match-card-list-row {
                grid-template-columns: 48px minmax(0, 1fr);
                align-items: start;
            }
            .match-card-list-row .match-card-img { width: 42px; max-width: 42px; height: 59px; }
            .match-card-list-row .match-list-actions {
                grid-column: 2; padding-top: 0;
            }
            .match-card-list-row.has-confidence .match-card-variants { padding-top: 0; }
        }
        .export-dialog-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10050;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(15, 23, 42, 0.62);
            backdrop-filter: blur(6px);
        }
        .export-dialog-overlay.active { display: flex; }
        .export-dialog {
            width: min(560px, 100%);
            max-height: calc(100dvh - 40px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-card);
            box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
        }
        .export-dialog-header {
            display: grid;
            grid-template-columns: 40px 1fr;
            gap: 12px;
            padding: 18px 20px 14px;
            border-bottom: 1px solid var(--border);
        }
        .export-dialog-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: rgba(234, 179, 8, 0.14);
            color: #a16207;
        }
        .export-dialog-title {
            margin: 0 0 4px;
            color: var(--text-primary);
            font-size: 17px;
            font-weight: 800;
            line-height: 1.25;
        }
        .export-dialog-message {
            margin: 0;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            line-height: 1.45;
        }
        .export-dialog-body {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 16px 20px;
            overflow-y: auto;
        }
        .export-dialog-section[hidden] { display: none; }
        .export-dialog-section-title {
            margin: 0 0 8px;
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .export-dialog-warning-list,
        .export-dialog-example-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .export-dialog-warning-item {
            display: grid;
            grid-template-columns: 20px 1fr;
            gap: 8px;
            padding: 10px 12px;
            border: 1px solid rgba(234, 179, 8, 0.28);
            border-radius: 8px;
            background: rgba(234, 179, 8, 0.08);
        }
        .export-dialog-warning-mark {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: #f59e0b;
            color: #fff;
            font-size: 13px;
            font-weight: 900;
            line-height: 1;
        }
        .export-dialog-warning-label {
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 800;
            line-height: 1.3;
        }
        .export-dialog-warning-detail,
        .export-dialog-counts,
        .export-dialog-more {
            margin-top: 2px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
        }
        .export-dialog-counts {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 0;
        }
        .export-dialog-count {
            padding: 4px 7px;
            border: 1px solid var(--border);
            border-radius: 7px;
            background: var(--bg-input);
        }
        .export-dialog-count.blocker {
            border-color: rgba(239, 68, 68, 0.24);
            background: rgba(239, 68, 68, 0.08);
            color: #991b1b;
        }
        .export-dialog-count.warning {
            border-color: rgba(234, 179, 8, 0.3);
            background: rgba(234, 179, 8, 0.08);
            color: #854d0e;
        }
        .export-dialog-example-item {
            padding: 8px 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface-hover);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
        }
        .export-dialog-example-item.blocker {
            border-color: rgba(239, 68, 68, 0.24);
            background: rgba(239, 68, 68, 0.06);
        }
        .export-dialog-example-item.warning {
            border-color: rgba(234, 179, 8, 0.3);
            background: rgba(234, 179, 8, 0.06);
        }
        .export-dialog-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 14px 20px;
            border-top: 1px solid var(--border);
            background: var(--bg-input);
        }
        body.listing-dialog-open { overflow: hidden; }
        .listing-dialog-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10050;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(15, 23, 42, 0.62);
            backdrop-filter: blur(6px);
        }
        .listing-dialog-overlay.active { display: flex; }
        .listing-dialog {
            width: min(520px, 100%);
            max-height: calc(100dvh - 40px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-card);
            box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
        }
        .listing-dialog-header {
            display: grid;
            grid-template-columns: 40px minmax(0, 1fr);
            gap: 12px;
            padding: 18px 20px 16px;
            border-bottom: 1px solid var(--border);
        }
        .listing-dialog-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: rgba(3, 83, 164, 0.1);
            color: var(--accent);
        }
        .listing-dialog-icon.warning {
            background: rgba(234, 179, 8, 0.14);
            color: #a16207;
        }
        .listing-dialog-icon.danger {
            background: rgba(239, 68, 68, 0.1);
            color: #dc2626;
        }
        .listing-dialog-icon.success {
            background: rgba(16, 185, 129, 0.12);
            color: #047857;
        }
        .listing-dialog-title {
            margin: 0 0 5px;
            color: var(--text-primary);
            font-size: 17px;
            font-weight: 800;
            line-height: 1.25;
        }
        .listing-dialog-message {
            margin: 0;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            line-height: 1.45;
            white-space: pre-line;
        }
        .listing-dialog-details {
            margin-top: 12px;
            /* The dialog card already bounds itself to the viewport; let the
               options area use real screen space instead of forcing a scroll
               at 220px (owner request: less scrolling in Push to Inventory
               Options). Small viewports still scroll. */
            max-height: min(52dvh, 560px);
            overflow: auto;
        }
        .listing-dialog-detail-list {
            display: grid;
            gap: 8px;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .listing-dialog-detail-item {
            padding: 9px 10px;
            border: 1px solid rgba(234, 179, 8, 0.28);
            border-radius: 8px;
            background: rgba(234, 179, 8, 0.08);
        }
        .listing-dialog-detail-label {
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 850;
            line-height: 1.35;
        }
        .listing-dialog-detail-text {
            margin-top: 3px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
        }
        .listing-dialog-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 14px 20px;
            border-top: 1px solid var(--border);
            background: var(--bg-input);
        }
        /* Push to Inventory carries destination, pricing, and per-row review
           controls, so it uses a wider, calmer layout than a plain confirm. */
        .listing-dialog.listing-dialog-wide {
            width: min(760px, 100%);
            border-radius: 14px;
        }
        .listing-dialog-options-compact .listing-dialog-header {
            min-height: 0;
            padding: 20px 22px 18px;
            overflow: hidden;
        }
        .listing-dialog-options-compact .listing-dialog-header > div:last-child {
            min-height: 0;
            display: flex;
            flex-direction: column;
        }
        .listing-dialog-options-compact .listing-dialog-message {
            max-width: 62ch;
        }
        .listing-dialog-options-compact .listing-dialog-details {
            min-height: 0;
            flex: 1 1 auto;
            max-height: min(62dvh, 660px);
            margin-top: 16px;
            padding-right: 2px;
        }
        .listing-dialog-options-compact .listing-dialog-detail-list {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .listing-dialog-options-compact .listing-dialog-detail-item {
            min-width: 0;
            padding: 11px 12px;
            border-color: var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease;
        }
        .listing-dialog-options-compact .listing-dialog-option:hover {
            border-color: rgba(3, 83, 164, 0.34);
        }
        .listing-dialog-options-compact .listing-dialog-option:active {
            transform: translateY(1px);
        }
        .listing-dialog-options-compact .listing-dialog-option-checkbox:has(input:checked) {
            border-color: rgba(3, 83, 164, 0.42);
            background: rgba(3, 83, 164, 0.06);
            box-shadow: inset 3px 0 0 var(--accent);
        }
        .listing-dialog-options-compact .listing-dialog-detail-label {
            font-size: 13px;
            line-height: 1.35;
        }
        .listing-dialog-options-compact .listing-dialog-option-checkbox .listing-dialog-detail-label {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            cursor: pointer;
        }
        .listing-dialog-options-compact .listing-dialog-checkbox-control {
            width: 17px;
            height: 17px;
            flex: 0 0 auto;
            margin: 0;
            accent-color: var(--accent);
        }
        .listing-dialog-options-compact .listing-dialog-option-checkbox .listing-dialog-detail-text {
            padding-left: 26px;
        }
        .listing-dialog-options-compact .listing-dialog-option-select .listing-dialog-detail-label {
            display: grid;
            gap: 7px;
        }
        .listing-dialog-options-compact .listing-dialog-select-control {
            width: 100%;
            min-width: 0;
            min-height: 40px;
            margin: 0;
            padding: 8px 34px 8px 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            color: var(--text-primary);
            font: inherit;
            font-weight: 700;
        }
        .listing-dialog-options-compact .listing-dialog-checkbox-control:focus-visible,
        .listing-dialog-options-compact .listing-dialog-select-control:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }
        .listing-dialog-options-compact .listing-dialog-footer {
            flex: 0 0 auto;
            padding: 14px 22px;
            background: var(--bg-card);
        }
        .listing-live-host { margin-top: 12px; }
        .listing-push-preview {
            display: grid;
            gap: 0;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
        }
        .listing-push-preview-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 12px;
            border-bottom: 1px solid var(--border);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 850;
            line-height: 1.35;
        }
        .listing-push-preview-meta {
            padding: 3px 7px;
            border-radius: 999px;
            background: var(--surface-hover);
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 800;
            white-space: nowrap;
        }
        .listing-push-pricing-notice {
            display: grid;
            grid-template-columns: max-content minmax(0, 1fr);
            gap: 8px;
            padding: 9px 12px;
            border-bottom: 1px solid var(--border);
            background: var(--throne-status-warning-bg, #fffbeb);
            color: var(--throne-status-warning-text, #92400e);
            font-size: 11.5px;
            font-weight: 650;
            line-height: 1.4;
        }
        .listing-push-pricing-notice[hidden] { display: none; }
        .listing-push-pricing-notice strong {
            font-weight: 850;
            white-space: nowrap;
        }
        .listing-push-preview-scroll {
            max-height: 280px;
            overflow: auto;
        }
        .listing-push-preview-grid {
            width: 100%;
            border-collapse: collapse;
            font-size: 12.5px;
            font-weight: 600;
            line-height: 1.35;
        }
        .listing-push-preview-grid th,
        .listing-push-preview-grid td {
            padding: 7px 8px;
            border-bottom: 1px solid var(--border);
            color: var(--text-primary);
            text-align: left;
            vertical-align: middle;
        }
        .listing-push-preview-grid thead th {
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--bg-card);
            color: var(--text-secondary);
            font-weight: 800;
            white-space: nowrap;
        }
        .listing-push-preview-grid tbody tr:hover td {
            background: var(--surface-hover);
        }
        .listing-push-preview-grid tfoot th,
        .listing-push-preview-grid tfoot td {
            position: sticky;
            bottom: 0;
            z-index: 1;
            border-bottom: 0;
            border-top: 1px solid var(--border);
            background: var(--bg-card);
            box-shadow: 0 -1px 0 var(--border);
            font-weight: 850;
            white-space: nowrap;
        }
        .listing-push-preview-num {
            width: 1%;
            text-align: right;
            white-space: nowrap;
        }
        .listing-push-preview-label {
            max-width: 340px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        /* Specific enough to outrank the shared cell colour above and the dark
           theme's `html[data-throne-theme="dark"] :is(table td)` cell rule, so
           the repriced and ineligible states stay visible in both themes. */
        .listing-push-preview .listing-push-preview-grid td.listing-push-preview-changed {
            color: var(--accent);
            font-weight: 800;
        }
        .listing-push-preview .listing-push-preview-grid td.listing-push-preview-skip {
            color: var(--text-secondary);
            font-weight: 600;
        }
        .listing-push-preview .listing-push-preview-grid td.listing-push-preview-edited {
            color: var(--accent);
            font-weight: 800;
        }
        .listing-push-preview-grid td:has(> .listing-push-preview-price) { padding-block: 3px; }
        .listing-push-preview-currency { margin-right: 4px; color: var(--text-secondary); }
        .listing-push-preview-price {
            width: 9ch;
            padding: 3px 6px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-input);
            color: inherit;
            font: inherit;
            font-variant-numeric: tabular-nums;
            text-align: right;
        }
        /* A ring, not text colour: the dark theme forces input text colour and
           its accent matches body text. Avoid "-input" in this class name; the
           dark theme strips box-shadow from input[class*="-input"]. */
        .listing-push-preview-edited .listing-push-preview-price { box-shadow: inset 0 0 0 1px var(--accent); }
        .listing-push-preview-price:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
        .listing-push-preview-price[aria-invalid="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); color: var(--red); }
        .listing-push-preview-price[aria-invalid="true"]:focus { outline-color: var(--red); }
        .listing-push-preview-state {
            padding: 12px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
        }
        .direct-merge-dialog-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10060;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(15, 23, 42, 0.68);
            backdrop-filter: blur(5px);
        }
        .direct-merge-dialog-overlay.active { display: flex; }
        .direct-merge-dialog {
            width: min(1120px, 100%);
            max-height: calc(100dvh - 40px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--bg-card);
            box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
        }
        .direct-merge-dialog-header {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 16px;
            padding: 20px 22px 16px;
            border-bottom: 1px solid var(--border);
        }
        .direct-merge-dialog-header h2 {
            margin: 2px 0 7px;
            color: var(--text-primary);
            font-size: 21px;
            font-weight: 850;
            letter-spacing: -0.02em;
        }
        .direct-merge-eyebrow {
            color: var(--accent);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }
        .direct-merge-dialog-header p {
            margin: 0;
            max-width: 850px;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 650;
            line-height: 1.45;
        }
        .direct-merge-summary-pills {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            margin-top: 12px;
        }
        .direct-merge-summary-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            min-height: 26px;
            padding: 4px 9px;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 750;
        }
        .direct-merge-summary-pill strong {
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 900;
        }
        .direct-merge-summary-pill.merge {
            border-color: rgba(3, 83, 164, 0.22);
            background: rgba(3, 83, 164, 0.07);
        }
        .direct-merge-summary-pill.price {
            border-color: rgba(217, 119, 6, 0.22);
            background: rgba(217, 119, 6, 0.07);
        }
        .direct-merge-close {
            width: 36px;
            height: 36px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 22px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
        }
        .direct-merge-close:hover,
        .direct-merge-close:focus-visible {
            border-color: var(--border-hover);
            background: var(--bg-hover);
            color: var(--text-primary);
        }
        .direct-merge-dialog-tools {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, max-content));
            gap: 12px 20px;
            align-items: end;
            padding: 12px 22px 13px;
            border-bottom: 1px solid var(--border);
            background: var(--bg-input);
        }
        .direct-merge-bulk-group {
            min-width: 0;
            margin: 0;
            padding: 0;
            border: 0;
        }
        .direct-merge-bulk-group legend,
        .direct-merge-control-label {
            display: block;
            margin: 0 0 6px;
            color: var(--text-secondary);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.055em;
            text-transform: uppercase;
        }
        .direct-merge-segmented {
            display: inline-flex;
            align-items: stretch;
            max-width: 100%;
            padding: 3px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
        }
        .direct-merge-segmented button {
            min-height: 34px;
            padding: 6px 12px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.2;
            white-space: nowrap;
        }
        .direct-merge-segmented button:hover {
            color: var(--text-primary);
            background: var(--bg-hover);
        }
        .direct-merge-segmented button.selected,
        .direct-merge-segmented button[aria-pressed="true"] {
            background: var(--bg-card);
            color: var(--accent);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.13);
        }
        .direct-merge-segmented button:focus-visible,
        .direct-merge-target-control select:focus-visible {
            outline: 2px solid rgba(3, 83, 164, 0.35);
            outline-offset: 1px;
        }
        .direct-merge-list {
            display: grid;
            gap: 12px;
            padding: 16px 22px 20px;
            overflow-x: hidden;
            overflow-y: auto;
            background: var(--surface-hover);
            scrollbar-gutter: stable;
        }
        .direct-merge-row {
            min-width: 0;
            padding: 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        }
        .direct-merge-row.selected {
            border-color: rgba(3, 83, 164, 0.38);
            box-shadow: inset 3px 0 0 var(--accent), 0 1px 2px rgba(15, 23, 42, 0.04);
        }
        .direct-merge-row.create-new {
            border-color: rgba(71, 85, 105, 0.24);
        }
        .direct-merge-row-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 11px;
        }
        .direct-merge-row-kicker {
            margin-bottom: 3px;
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.065em;
            text-transform: uppercase;
        }
        .direct-merge-evidence {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 6px;
        }
        .direct-merge-evidence-badge {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 3px 8px;
            border: 1px solid rgba(3, 83, 164, 0.22);
            border-radius: 999px;
            background: rgba(3, 83, 164, 0.07);
            color: var(--accent);
            font-size: 10px;
            font-weight: 900;
            white-space: nowrap;
        }
        .direct-merge-evidence-badge.catalog {
            border-color: rgba(5, 150, 105, 0.25);
            background: rgba(5, 150, 105, 0.08);
            color: #047857;
        }
        .direct-merge-card-title {
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 850;
            line-height: 1.3;
        }
        .direct-merge-comparison {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .direct-merge-comparison-card {
            min-width: 0;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
        }
        .direct-merge-comparison-card.incoming {
            border-style: dashed;
        }
        .direct-merge-comparison-copy {
            min-width: 0;
        }
        .direct-merge-comparison-label {
            margin-bottom: 3px;
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
        .direct-merge-comparison-title {
            display: -webkit-box;
            overflow: hidden;
            margin-bottom: 5px;
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 800;
            line-height: 1.3;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }
        .direct-merge-card-meta {
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 700;
            line-height: 1.45;
        }
        .direct-merge-metrics {
            display: flex;
            flex-wrap: wrap;
            align-items: stretch;
            gap: 8px 14px;
            margin-top: 8px;
        }
        .direct-merge-metric {
            display: grid;
            gap: 1px;
            min-width: 52px;
        }
        .direct-merge-metric + .direct-merge-metric {
            padding-left: 14px;
            border-left: 1px solid var(--border);
        }
        .direct-merge-metric > span {
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.045em;
            line-height: 1.2;
            text-transform: uppercase;
        }
        .direct-merge-metric > strong {
            color: var(--text-primary);
            font-size: 15px;
            font-variant-numeric: tabular-nums;
            font-weight: 900;
            letter-spacing: -0.01em;
            line-height: 1.25;
        }
        .direct-merge-ebay-item-link {
            color: var(--accent);
            font-weight: 800;
            text-decoration: underline;
            text-underline-offset: 2px;
            white-space: nowrap;
        }
        .direct-merge-ebay-item-link:hover {
            color: #03437f;
        }
        .direct-merge-row-controls {
            display: grid;
            grid-template-columns: minmax(250px, auto) minmax(240px, 1fr) minmax(210px, auto);
            gap: 10px 12px;
            align-items: end;
            margin-top: 11px;
        }
        .direct-merge-control {
            min-width: 0;
        }
        .direct-merge-row-controls .direct-merge-segmented {
            display: flex;
            width: 100%;
        }
        .direct-merge-row-controls .direct-merge-segmented button {
            flex: 1 1 0;
        }
        .direct-merge-row-controls .direct-merge-segmented button strong {
            font-size: 13px;
            font-variant-numeric: tabular-nums;
            font-weight: 900;
        }
        .direct-merge-target-control select {
            width: 100%;
            min-height: 42px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 800;
            padding: 0 12px;
            text-overflow: ellipsis;
        }
        .direct-merge-target-control select:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }
        .direct-merge-result {
            display: flex;
            flex-wrap: wrap;
            align-items: baseline;
            gap: 5px 16px;
            margin-top: 10px;
            padding: 8px 10px;
            border: 1px solid rgba(3, 83, 164, 0.18);
            border-radius: 7px;
            background: rgba(3, 83, 164, 0.055);
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
        }
        .direct-merge-result-prefix {
            color: var(--text-secondary);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.045em;
            text-transform: uppercase;
        }
        .direct-merge-result-stat {
            display: inline-flex;
            align-items: baseline;
            gap: 5px;
        }
        .direct-merge-result-stat > span {
            color: var(--text-secondary);
            font-size: 10px;
            font-weight: 850;
        }
        .direct-merge-result-stat > strong {
            color: var(--text-primary);
            font-size: 14px;
            font-variant-numeric: tabular-nums;
            font-weight: 900;
            letter-spacing: -0.01em;
        }
        .direct-merge-result.create {
            border-color: rgba(71, 85, 105, 0.18);
            background: rgba(71, 85, 105, 0.055);
        }
        .direct-merge-dialog-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 13px 22px;
            border-top: 1px solid var(--border);
            background: var(--bg-input);
        }
        .direct-merge-footer-summary {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
        }
        .direct-merge-footer-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        .direct-merge-footer-actions .btn {
            min-width: 116px;
            justify-content: center;
        }
        .list-edit-dialog {
            width: min(960px, 100%);
        }
        .list-edit-dialog .listing-dialog-header {
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: start;
        }
        .list-edit-close {
            width: 32px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 20px;
            line-height: 1;
        }
        .list-edit-close:hover {
            color: var(--text-primary);
            border-color: var(--border-hover);
            background: var(--bg-hover);
        }
        .list-edit-body {
            overflow: auto;
            padding: 18px 20px;
            background: var(--surface-hover);
        }
        .list-edit-title-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
            margin-bottom: 14px;
        }
        .list-edit-title-row .title-input {
            margin: 0;
        }
        .list-edit-fields-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 0;
        }
        .list-edit-fields-grid .field-card {
            border-radius: 8px;
            padding: 1rem 1.1rem;
        }
        .list-edit-wide {
            grid-column: 1 / -1;
        }
        .list-edit-grading-section[hidden],
        .list-edit-raw-only[hidden] {
            display: none !important;
        }
        .list-edit-specifics-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px 18px;
        }
        .list-edit-images-card {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .list-edit-image-manager {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .list-edit-primary-photos {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }
        .list-edit-photo-tile,
        .list-edit-extra-card {
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            padding: 10px;
        }
        .list-edit-photo-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }
        .list-edit-photo-preview {
            width: 100%;
            aspect-ratio: 3 / 4.18;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--surface);
            object-fit: contain;
            display: block;
        }
        .list-edit-photo-actions,
        .list-edit-extra-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }
        .list-edit-image-btn {
            min-height: 34px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 800;
            padding: 0 12px;
        }
        .list-edit-image-btn:hover {
            border-color: var(--border-hover);
            background: var(--bg-hover);
        }
        .list-edit-image-btn.danger {
            color: var(--danger);
        }
        .list-edit-image-btn:disabled {
            cursor: not-allowed;
            opacity: 0.45;
        }
        .list-edit-extra-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        .list-edit-extra-title {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }
        .list-edit-extra-strip {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 12px;
        }
        .list-edit-extra-thumb {
            width: 100%;
            aspect-ratio: 1 / 1;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--surface);
            object-fit: contain;
            display: block;
        }
        .list-edit-empty-images {
            border: 1px dashed var(--border);
            border-radius: 8px;
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 700;
            padding: 14px;
            text-align: center;
        }
        .list-edit-variant-section[hidden] {
            display: none;
        }
        .list-edit-variant-section {
            margin-bottom: 14px;
            border-radius: 8px;
            padding: 1rem 1.1rem;
        }
        .list-edit-variant-section .pill-group {
            margin-bottom: 0;
        }
        .list-edit-dialog .listing-dialog-footer .btn {
            min-width: 112px;
            justify-content: center;
        }
        @media (max-width: 920px) {
            .direct-merge-row-controls {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .direct-merge-price-control {
                grid-column: 1 / -1;
            }
        }
        @media (max-width: 760px) {
            .direct-merge-comparison,
            .direct-merge-row-controls {
                grid-template-columns: 1fr;
            }
            .direct-merge-price-control {
                grid-column: auto;
            }
        }
        @media (max-width: 560px) {
            .export-dialog-overlay { padding: 12px; align-items: flex-end; }
            .export-dialog { max-height: calc(100dvh - 24px); }
            .export-dialog-header { grid-template-columns: 1fr; }
            .export-dialog-icon { display: none; }
            .export-dialog-footer { flex-direction: column-reverse; }
            .export-dialog-footer .btn { justify-content: center; width: 100%; }
            .listing-dialog-overlay { padding: 12px; align-items: flex-end; }
            .listing-dialog { max-height: calc(100dvh - 24px); }
            .listing-dialog-header { grid-template-columns: 1fr; }
            .listing-dialog-icon { display: none; }
            .listing-dialog-options-compact .listing-dialog-header { padding: 16px; }
            .listing-dialog-options-compact .listing-dialog-details {
                max-height: min(64dvh, 560px);
                margin-top: 12px;
            }
            .listing-dialog-options-compact .listing-dialog-detail-list {
                grid-template-columns: 1fr;
            }
            .listing-dialog-options-compact .listing-dialog-footer { padding: 12px 16px; }
            .listing-dialog-footer { flex-direction: column-reverse; }
            .listing-dialog-footer .btn { justify-content: center; width: 100%; }
            .listing-push-pricing-notice { grid-template-columns: minmax(0, 1fr); gap: 2px; }
            .listing-push-preview-grid { min-width: 470px; }
            .direct-merge-dialog-overlay { padding: 12px; align-items: flex-end; }
            .direct-merge-dialog { max-height: calc(100dvh - 24px); }
            .direct-merge-dialog-header { padding: 16px 16px 13px; }
            .direct-merge-dialog-header h2 { font-size: 18px; }
            .direct-merge-summary-pills { gap: 5px; }
            .direct-merge-summary-pill { padding-inline: 7px; }
            .direct-merge-dialog-tools {
                grid-template-columns: 1fr;
                gap: 10px;
                padding: 10px 16px;
            }
            .direct-merge-bulk-group .direct-merge-segmented {
                display: flex;
                width: 100%;
            }
            .direct-merge-bulk-group .direct-merge-segmented button {
                flex: 1 1 0;
            }
            .direct-merge-list { padding: 12px 12px 16px; }
            .direct-merge-row { padding: 12px; }
            .direct-merge-row-heading {
                align-items: flex-start;
                flex-direction: column;
                gap: 7px;
            }
            .direct-merge-evidence { justify-content: flex-start; }
            .direct-merge-row-controls .direct-merge-segmented button {
                padding-inline: 7px;
                white-space: normal;
            }
            .direct-merge-dialog-footer {
                align-items: stretch;
                flex-direction: column;
                gap: 9px;
                padding: 11px 16px;
            }
            .direct-merge-footer-actions {
                display: grid;
                grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
            }
            .direct-merge-footer-actions .btn {
                width: 100%;
                min-width: 0;
                justify-content: center;
            }
        }
        @media (max-width: 760px) {
            .list-edit-dialog {
                max-height: calc(100dvh - 24px);
            }
            .list-edit-fields-grid,
            .list-edit-specifics-grid,
            .list-edit-primary-photos {
                grid-template-columns: 1fr;
            }
            .list-edit-title-row {
                grid-template-columns: 1fr;
            }
        }
        .auto-advance {
            display: flex; align-items: center; gap: 6px; font-size: 12px;
            color: var(--text-secondary); cursor: pointer; user-select: none;
            white-space: nowrap;
            flex: 0 0 auto;
        }
        .auto-advance input {
            width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer;
        }
        .modal-nav-arrows {
            display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 5px;
            flex: 0 1 auto;
            min-width: 0;
        }
        .modal-tool-group {
            display: flex;
            align-items: center;
            gap: 5px;
            padding-right: 7px;
            margin-right: 1px;
            border-right: 1px solid var(--border);
        }
        .modal-tool-group:last-of-type {
            margin-right: 0;
        }
        .loupe-tool-group {
            gap: 8px;
        }
        .loupe-selects {
            display: none;
            align-items: center;
            gap: 6px;
        }
        .loupe-selects.is-visible {
            display: flex;
        }
        .loupe-control-select {
            height: 34px;
            min-height: 34px;
            padding: 0 2rem 0 0.78rem;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 12px;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
        }
        .loupe-shape-select {
            width: 92px;
        }
        .loupe-size-select {
            width: 136px;
        }
        .loupe-selects .smooth-select-proxy {
            flex: 0 0 auto;
            width: var(--throne-smooth-width, auto);
        }
        .loupe-selects .smooth-select-trigger {
            height: 34px;
            min-height: 34px;
            padding: 0 0.62rem 0 0.78rem;
            border-radius: 9px;
            font-size: 12px;
            font-weight: 850;
        }
        .loupe-selects .smooth-select-panel {
            min-width: 100%;
        }
        .modal-nav-group {
            padding-left: 2px;
        }
        .modal-card-nav-group {
            gap: 6px;
        }
        .modal-nav-btn {
            width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--border);
            background: var(--bg-card); color: var(--text-secondary);
            font-size: 16px; cursor: pointer; transition: all 0.2s;
            display: flex; align-items: center; justify-content: center;
            box-shadow: var(--shadow-sm);
        }
        .modal-nav-btn svg {
            width: 17px;
            height: 17px;
            display: block;
        }
        .modal-nav-btn:hover:not(:disabled),
        .modal-nav-btn:focus-visible:not(:disabled) {
            background: var(--surface);
            border-color: var(--border-focus);
            color: var(--accent);
            transform: translateY(-1px);
        }
        .modal-nav-btn.tool-warning {
            color: var(--yellow);
        }
        .modal-nav-btn.modal-delete-btn {
            color: var(--red);
        }
        .modal-nav-btn.modal-delete-btn:hover:not(:disabled) {
            background: var(--red);
            border-color: var(--red);
            color: #fff;
        }
        .modal-delete-confirm-label {
            display: none;
            font-size: 11px;
            font-weight: 800;
        }
        .modal-nav-btn.modal-delete-btn.confirming {
            width: auto;
            min-width: 52px;
            padding: 0 9px;
            background: rgba(239, 68, 68, 0.12);
            border-color: rgba(239, 68, 68, 0.42);
            color: var(--red);
        }
        .modal-nav-btn.modal-delete-btn.confirming .modal-delete-icon {
            display: none;
        }
        .modal-nav-btn.modal-delete-btn.confirming .modal-delete-confirm-label {
            display: block;
        }
        .modal-card-action {
            min-width: 78px;
            min-height: 34px;
            padding: 0 11px;
            border-radius: 8px;
            justify-content: center;
            white-space: nowrap;
        }
        .modal-card-action svg {
            width: 16px;
            height: 16px;
            display: block;
        }
        .modal-card-action:disabled,
        .modal-card-action:disabled:hover {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
            box-shadow: var(--shadow-sm);
        }
        .modal-delete-action {
            width: 34px;
            min-width: 34px;
            padding: 0;
            border-radius: 8px;
            align-items: center;
            justify-content: center;
        }
        .modal-card-position {
            min-width: 62px;
            padding: 0 9px;
            min-height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.56);
            text-align: center;
            font-size: 12px;
            font-weight: 800;
            color: var(--text-secondary);
            white-space: nowrap;
        }
        .modal-done-action {
            min-height: 34px;
            padding: 0 12px;
            border-radius: 8px;
            white-space: nowrap;
        }
        body.listing-view-match .match-view-container .modal-header {
            display: none;
        }

        .report-issue-overlay {
            position: fixed;
            inset: 0;
            z-index: 1300;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(15, 23, 42, 0.48);
            backdrop-filter: blur(4px);
        }
        .report-issue-overlay[hidden] {
            display: none;
        }
        .report-issue-dialog {
            width: min(620px, calc(100vw - 32px));
            max-height: min(820px, calc(100dvh - 32px));
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: var(--surface);
            color: var(--text-primary);
            box-shadow: var(--shadow-md);
        }
        .report-issue-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 20px 22px 16px;
            border-bottom: 1px solid var(--border);
        }
        .report-issue-header h2 {
            margin: 0;
            font-size: 21px;
            line-height: 1.2;
            font-weight: 900;
        }
        .report-issue-header p {
            margin: 6px 0 0;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 700;
        }
        .report-issue-close {
            width: 34px;
            height: 34px;
            flex: 0 0 auto;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--surface-hover);
            color: var(--text-secondary);
            font: inherit;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
        }
        .report-issue-close:hover,
        .report-issue-close:focus-visible {
            border-color: var(--border-focus);
            color: var(--accent);
        }
        .report-issue-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
            max-height: calc(100dvh - 150px);
            overflow-y: auto;
            padding: 18px 22px 22px;
        }
        .report-issue-types {
            display: grid;
            gap: 7px;
            min-width: 0;
            margin: 0;
            padding: 0;
            border: 0;
        }
        .report-issue-types legend,
        .report-issue-description > span {
            margin-bottom: 8px;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }
        .report-issue-types label {
            display: grid;
            grid-template-columns: 18px minmax(0, 1fr);
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--surface);
            cursor: pointer;
            transition: border-color 0.15s ease, background 0.15s ease;
        }
        .report-issue-types label:hover,
        .report-issue-types label:has(input:checked) {
            border-color: rgba(3, 83, 164, 0.34);
            background: var(--throne-status-info-bg, #eef6ff);
        }
        .report-issue-types input {
            width: 16px;
            height: 16px;
            margin: 2px 0 0;
            accent-color: var(--accent);
        }
        .report-issue-types span {
            display: grid;
            gap: 2px;
            min-width: 0;
        }
        .report-issue-types strong {
            font-size: 14px;
            font-weight: 850;
        }
        .report-issue-types small {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.35;
        }
        .report-issue-description {
            display: flex;
            flex-direction: column;
        }
        .report-issue-description textarea {
            width: 100%;
            min-height: 112px;
            resize: vertical;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-input);
            color: var(--text-primary);
            font: inherit;
            font-size: 14px;
            line-height: 1.5;
        }
        .report-issue-description textarea:focus {
            outline: 0;
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3px var(--throne-focus-ring, rgba(3, 83, 164, 0.2));
        }
        .report-issue-helper,
        .report-issue-error {
            margin: 0;
            font-size: 12px;
            font-weight: 650;
            line-height: 1.45;
        }
        .report-issue-helper { color: var(--text-secondary); }
        .report-issue-error {
            padding: 9px 11px;
            border-radius: 9px;
            background: var(--throne-status-danger-bg, #fff5f5);
            color: var(--throne-status-danger-text, #b91c1c);
        }
        .report-issue-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            padding-top: 2px;
        }
        .report-issue-actions .btn {
            min-height: 42px;
            padding-inline: 18px;
        }
        @media (max-width: 640px) {
            .report-issue-overlay { padding: 10px; }
            .report-issue-dialog { width: 100%; max-height: calc(100dvh - 20px); }
            .report-issue-header { padding: 17px 16px 14px; }
            .report-issue-form { padding: 15px 16px 18px; }
        }
        @media (max-width: 1200px) {
            .modal-match-body {
                grid-template-columns: 1fr;
            }
            .modal-comparison-panel {
                border-right: none;
                border-bottom: 1px solid var(--border);
            }
            .modal-top {
                grid-template-columns: repeat(2, minmax(240px, 340px));
            }
            .modal-results {
                max-height: 520px;
            }
        }
        @media (max-width: 720px) {
            .modal-top {
                grid-template-columns: 1fr;
            }
        }

        /* ─── List View Styles ─── */
        .list-view-container {
            display: none; /* hidden by default */
            flex-direction: column; gap: 4px; width: 100%;
            container-name: list-view;
            container-type: inline-size;
            --lv-control-height: 42px;
            --lv-control-radius: 8px;
            --lv-thumb-width: 68px;
            --lv-thumb-height: 94px;
            --lv-thumb-column-width: 146px;
        }
        .list-view-container.active { display: flex; }
        #listViewGrid {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 100%;
            overflow-anchor: none;
        }
        .lv-virtual-spacer {
            width: 100%;
            flex-shrink: 0;
            pointer-events: none;
        }
        .list-bottom-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
            padding: 10px;
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.94);
            box-shadow: var(--shadow-sm);
        }
        .list-bottom-action-group {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            min-width: 0;
        }
        .list-bottom-action-group.primary {
            flex: 0 1 auto;
        }
        .list-bottom-action-group.secondary {
            flex: 1 1 360px;
            justify-content: flex-end;
            margin-left: auto;
        }
        .list-bottom-actions .batch-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            flex: 0 0 auto;
            width: auto;
            min-width: 118px;
            min-height: 40px;
            padding: 0 13px;
        }
        .list-bottom-actions .batch-btn.direct-ebay {
            background: #0f766e;
            border-color: #0f766e;
            color: #fff;
            box-shadow: 0 5px 14px rgba(15, 118, 110, 0.18);
        }
        .list-bottom-actions .batch-btn.direct-ebay:hover:not(:disabled) {
            background: #0d6b64;
            border-color: #0d6b64;
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 7px 16px rgba(15, 118, 110, 0.24);
        }
        .list-bottom-actions .batch-btn.direct-ebay.direct-ebay-locked,
        .list-bottom-actions .batch-btn.direct-ebay:disabled {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-muted);
            box-shadow: none;
        }
        @media (max-width: 900px) {
            .list-bottom-action-group.secondary {
                flex-basis: 100%;
            }
        }

        .lot-view-container {
            display: none;
            width: 100%;
            gap: 16px;
            align-items: start;
            grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
        }
        .lot-view-container.active { display: grid; }
        .lot-preview-card,
        .lot-editor-card,
        .lot-manifest-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            box-shadow: var(--shadow-sm);
        }
        .lot-preview-card {
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .lot-cover-frame {
            width: 100%;
            aspect-ratio: 1 / 1;
            background: #050505;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 8px;
            overflow: hidden;
            display: grid;
            place-items: center;
            position: relative;
        }
        .lot-cover-frame.is-white-bg {
            background: #fff;
            border-color: rgba(15, 23, 42, 0.16);
        }
        .lot-cover-frame img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: none;
        }
        .lot-cover-frame.has-image img { display: block; }
        .lot-cover-placeholder {
            color: rgba(255,255,255,0.72);
            font-size: 0.84rem;
            font-weight: 800;
            text-align: center;
            padding: 20px;
        }
        .lot-cover-frame.is-white-bg .lot-cover-placeholder {
            color: rgba(15, 23, 42, 0.68);
        }
        .lot-cover-frame.has-image .lot-cover-placeholder { display: none; }
        .lot-cover-frame.is-failed .lot-cover-placeholder {
            color: #fecaca;
        }
        .lot-cover-frame.is-white-bg.is-failed .lot-cover-placeholder {
            color: #b91c1c;
        }
        .lot-cover-loading {
            position: absolute;
            inset: 0;
            z-index: 2;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 20px;
            background: #fff7ed;
            color: #7c2d12;
            text-align: center;
            font-size: 0.84rem;
            font-weight: 900;
            line-height: 1.15;
        }
        .lot-cover-loading small {
            display: block;
            max-width: 100%;
            color: #9a3412;
            font-size: 0.68rem;
            font-weight: 800;
            line-height: 1.2;
        }
        .lot-cover-frame.is-generating .lot-cover-loading { display: flex; }
        .lot-cover-frame.is-generating .lot-cover-placeholder { display: none; }
        .lot-cover-frame.is-generating.has-image img {
            display: block;
            opacity: 0.2;
        }
        .lot-cover-settings {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }
        .lot-cover-settings label {
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .lot-cover-background-select {
            min-width: 128px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
            color: var(--text-primary);
            font: inherit;
            font-size: 0.84rem;
            font-weight: 800;
            padding: 0.48rem 0.65rem;
        }
        .lot-cover-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .lot-pair-background-control {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 38px;
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .lot-cover-actions .btn {
            min-height: 38px;
            padding: 0.44rem 0.75rem;
            border-radius: 8px;
        }
        .lot-editor-card {
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .lot-editor-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(110px, 0.28fr);
            gap: 12px;
        }
        .lot-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
        }
        .lot-field label {
            font-size: 0.72rem;
            font-weight: 900;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .lot-field input,
        .lot-field select,
        .lot-field textarea {
            width: 100%;
            min-width: 0;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
            color: var(--text-primary);
            font: inherit;
            font-size: 0.9rem;
            padding: 0.66rem 0.74rem;
            box-sizing: border-box;
        }
        .lot-field textarea {
            min-height: 150px;
            resize: vertical;
            line-height: 1.35;
        }
        .lot-description-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .lot-description-heading .btn {
            min-height: 34px;
            padding: 0.36rem 0.64rem;
            border-radius: 8px;
            font-size: 0.78rem;
            white-space: nowrap;
        }
        .lot-final-description-preview {
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
            padding: 12px;
        }
        .lot-final-description-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }
        .lot-final-description-header span {
            font-size: 0.72rem;
            font-weight: 900;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .lot-final-description-header small {
            font-size: 0.68rem;
            font-weight: 800;
            color: var(--text-secondary);
        }
        .lot-final-description-frame {
            min-height: 92px;
            max-height: 260px;
            overflow: auto;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #ffffff;
            color: #0f172a;
            padding: 12px;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.86rem;
            line-height: 1.45;
        }
        .lot-final-description-frame img,
        .lot-final-description-frame table,
        .lot-final-description-frame iframe {
            max-width: 100%;
        }
        .lot-final-description-empty {
            color: var(--text-secondary);
            font-weight: 800;
        }
        .lot-title-count {
            align-self: flex-end;
            font-size: 0.76rem;
            font-weight: 800;
            color: var(--text-secondary);
        }
        .lot-title-count.over-limit { color: var(--red); }
        .lot-stat-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }
        .lot-stat {
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 10px;
            background: var(--surface);
        }
        .lot-stat span {
            display: block;
            font-size: 0.68rem;
            font-weight: 900;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .lot-stat strong {
            display: block;
            margin-top: 4px;
            font-size: 1rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .lot-manifest-card {
            grid-column: 1 / -1;
            padding: 14px;
        }
        .lot-manifest-header {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: center;
            margin-bottom: 10px;
        }
        .lot-manifest-header h3 {
            margin: 0;
            font-size: 0.98rem;
        }
        .lot-image-strip {
            display: grid;
            gap: 8px;
        }
        .lot-image-strip {
            grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
            margin-bottom: 12px;
        }
        .lot-image-tile {
            position: relative;
            min-width: 0;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--surface);
            overflow: hidden;
        }
        .lot-image-tile.is-excluded {
            opacity: 0.48;
        }
        .lot-image-tile.needs-pair {
            border-color: rgba(245, 158, 11, 0.5);
            background: #fffbeb;
        }
        .lot-pair-pending-preview {
            width: 100%;
            aspect-ratio: 1 / 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 12px 10px;
            background: #fff7ed;
            color: #7c2d12;
            text-align: center;
            font-size: 0.72rem;
            font-weight: 900;
            line-height: 1.15;
        }
        .lot-pair-pending-preview small {
            display: block;
            max-width: 100%;
            color: #9a3412;
            font-size: 0.62rem;
            font-weight: 800;
            line-height: 1.15;
        }
        .lot-image-tile.is-failed {
            border-color: rgba(220, 38, 38, 0.55);
        }
        .lot-pair-pending-preview.is-failed {
            background: #fef2f2;
            color: #991b1b;
        }
        .lot-pair-pending-preview.is-failed small {
            color: #b91c1c;
        }
        .lot-pair-pending-spinner {
            width: 24px;
            height: 24px;
            border-radius: 999px;
            border: 3px solid rgba(251, 146, 60, 0.32);
            border-top-color: #f97316;
            animation: lotPairPendingSpin 0.85s linear infinite;
        }
        @keyframes lotPairPendingSpin {
            to { transform: rotate(360deg); }
        }
        .lot-image-tile img {
            width: 100%;
            aspect-ratio: 1 / 1;
            height: auto;
            object-fit: contain;
            display: block;
            background: #050505;
        }
        .lot-image-tile.is-white-bg img {
            background: #ffffff;
        }
        .lot-image-tile.is-black-bg img {
            background: #050505;
        }
        .lot-image-toggle {
            position: absolute;
            top: 6px;
            left: 6px;
            z-index: 2;
            display: grid;
            place-items: center;
            width: 22px;
            height: 22px;
            padding: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.92);
            color: var(--text-primary);
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
        }
        .lot-image-toggle input {
            width: 14px;
            height: 14px;
            accent-color: var(--accent);
            margin: 0;
        }
        .lot-image-delete {
            position: absolute;
            top: 6px;
            right: 6px;
            z-index: 2;
            width: 24px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(220, 38, 38, 0.22);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.94);
            color: #b91c1c;
            font-size: 18px;
            font-weight: 900;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
        }
        .lot-image-delete:hover,
        .lot-image-delete:focus-visible {
            outline: none;
            background: #dc2626;
            border-color: #dc2626;
            color: #ffffff;
        }
        .lot-image-title {
            padding: 7px 8px;
            font-size: 0.72rem;
            font-weight: 850;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        @media (max-width: 980px) {
            .lot-view-container {
                grid-template-columns: 1fr;
            }
            .lot-editor-grid,
            .lot-stat-grid {
                grid-template-columns: 1fr;
            }
        }

        .list-view-row {
            display: grid;
            grid-template-columns: 24px var(--lv-thumb-column-width) minmax(0, 1fr) 122px;
            gap: 9px; align-items: center; padding: 0.34rem 0.42rem;
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 10px;
            transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
            margin-bottom: 0;
            box-shadow: var(--shadow-sm);
        }
        .list-view-row.selected {
            border-color: rgba(0, 86, 162, 0.44);
            background: linear-gradient(90deg, rgba(0, 86, 162, 0.07), var(--bg-card) 34%);
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
        }
        .list-view-row.graded-row {
            border-color: rgba(3, 83, 164, 0.22);
            background: linear-gradient(90deg, rgba(3, 83, 164, 0.045), var(--bg-card) 28%);
        }
        .list-view-row.graded-row.selected {
            border-color: rgba(0, 86, 162, 0.48);
            background: linear-gradient(90deg, rgba(0, 86, 162, 0.09), var(--bg-card) 34%);
        }
        .list-view-row.manual-row {
            border-color: rgba(0, 91, 172, 0.24);
            background: linear-gradient(90deg, rgba(0, 91, 172, 0.045), var(--bg-card) 30%);
        }
        .list-view-row.manual-row.selected {
            border-color: rgba(0, 91, 172, 0.5);
            background: linear-gradient(90deg, rgba(0, 91, 172, 0.1), var(--bg-card) 36%);
        }
        html[data-throne-theme="dark"] .list-view-row:is(.graded-row, .manual-row) {
            border-color: var(--throne-border);
            background: var(--throne-surface);
        }
        html[data-throne-theme="dark"] .list-view-row:not(.selected):hover {
            border-color: #626262;
            background: var(--throne-surface-muted);
        }
        html[data-throne-theme="dark"] .list-view-row.selected {
            border-color: #a3a3a3;
            background: var(--throne-surface-hover);
            box-shadow: inset 3px 0 0 var(--throne-text-primary);
        }
        html[data-throne-theme="dark"] .list-view-row.selected:hover {
            border-color: var(--throne-text-primary);
        }
        body.listing-entry-manual .create-batch-grid .batch-field-variant,
        body.listing-entry-manual .create-batch-grid .batch-field-fast-scan,
        body.listing-entry-manual .create-batch-grid .create-scan-speed-heading,
        body.listing-entry-manual #batchMatchingSettings,
        body.listing-entry-manual .batch-combine-btn {
            display: none !important;
        }
        body.listing-flow-slabs .batch-field-game,
        body.listing-flow-slabs .batch-field-condition,
        body.listing-flow-slabs .batch-field-variant,
        body.listing-flow-slabs .batch-scan-mode-field,
        body.listing-flow-slabs .batch-workflow-row,
        body.listing-flow-slabs .batch-combine-btn {
            display: none !important;
        }
        body.listing-flow-slabs #batchActionsGroup {
            display: none !important;
        }
        body.listing-flow-slabs .batch-inline-controls {
            display: grid;
            grid-template-columns: minmax(150px, 190px) minmax(150px, 190px);
            justify-content: start;
        }
        body.listing-flow-slabs .batch-action-column {
            gap: 8px;
        }
        body.listing-flow-slabs .batch-action-row.slab-workflow-row {
            display: contents;
        }
        body.listing-flow-slabs .toolbar {
            display: none;
        }
        .stock-list-card {
            display: none;
            flex-direction: column;
            gap: 14px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 18px;
            box-shadow: var(--shadow-sm);
        }
        body.listing-flow-stock.stock-list-open .stock-list-card {
            display: flex;
        }
        body.listing-flow-stock .create-upload-card,
        body.listing-flow-stock .create-scan-mode-field {
            display: none !important;
        }
        body.listing-flow-stock.batch-create-mode .create-batch-flow {
            max-width: 1560px !important;
            margin: 14px 0 32px !important;
            padding: 0 var(--throne-page-inline) !important;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)) !important;
            gap: 20px !important;
            background: transparent !important;
            box-shadow: none !important;
        }
        body.listing-flow-stock .create-batch-overview {
            grid-column: 1 / -1;
            gap: 12px;
            padding: 16px 22px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--surface);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
        }
        body.listing-flow-stock .create-batch-card {
            background: transparent !important;
            border: 0 !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            gap: 16px !important;
        }
        body.listing-flow-stock .create-batch-card .create-card-heading {
            display: none !important;
        }
        body.listing-flow-stock .create-batch-grid {
            display: flex !important;
            flex-direction: column !important;
            gap: 16px !important;
        }
        body.listing-flow-stock #createDeckMatching {
            display: none !important;
        }
        body.listing-flow-stock .stock-list-card {
            grid-column: 1 / -1;
            background: var(--surface) !important;
            border: 1px solid var(--border) !important;
            border-radius: 14px !important;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
            padding: 22px 26px !important;
            display: flex !important;
            flex-direction: column !important;
            gap: 16px !important;
            min-width: 0 !important;
        }
        body.listing-flow-stock .create-batch-grid .batch-field-fast-scan,
        body.listing-flow-stock .create-batch-grid .create-scan-speed-heading {
            display: none !important;
        }
        body.listing-flow-stock #batchActionsGroup .batch-btn.listed,
        body.listing-flow-stock #exportBtn {
            display: none !important;
        }
        .stock-list-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
        }
        .stock-list-header h2 {
            margin: 0 0 4px;
            font-size: 1.05rem;
            color: var(--text-primary);
        }
        .stock-list-header p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .stock-builder-tabs {
            display: flex;
            gap: 6px;
            border-bottom: 1px solid var(--border);
        }
        .stock-builder-tab {
            border: 0;
            border-bottom: 3px solid transparent;
            padding: 9px 12px 8px;
            background: transparent;
            color: var(--text-secondary);
            font: inherit;
            font-weight: 800;
            cursor: pointer;
        }
        .stock-builder-tab.active {
            border-bottom-color: var(--accent);
            color: var(--accent);
        }
        .stock-builder-panel {
            display: grid;
            gap: 12px;
        }
        .stock-builder-panel[hidden] {
            display: none !important;
        }
        .stock-search-bar {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            gap: 10px;
            align-items: center;
        }
        .stock-search-input {
            min-height: 44px;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0 12px;
            font-size: 0.95rem;
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.86);
        }
        .stock-search-results {
            display: grid;
            gap: 8px;
        }
        .stock-result-pager {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            flex-wrap: wrap;
        }
        .stock-result-page-info {
            color: var(--text-secondary);
            font-size: 0.84rem;
            font-weight: 700;
        }
        .stock-result-row {
            display: grid;
            grid-template-columns: 68px minmax(260px, 1fr) minmax(112px, 132px) minmax(154px, 200px) 82px 84px;
            gap: 12px;
            align-items: center;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.68);
        }
        .stock-result-image {
            width: 56px;
            height: 78px;
            border-radius: 6px;
            object-fit: contain;
            background: rgba(15, 23, 42, 0.06);
            border: 1px solid rgba(15, 23, 42, 0.08);
        }
        .stock-result-placeholder {
            width: 56px;
            height: 78px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.68rem;
            color: var(--text-secondary);
            background: rgba(15, 23, 42, 0.06);
            border: 1px dashed var(--border);
            text-align: center;
        }
        .stock-result-title {
            min-width: 0;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1.18;
            white-space: normal;
            overflow-wrap: anywhere;
        }
        .stock-result-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 4px 8px;
            margin-top: 4px;
            color: #1e293b;
            font-size: 0.92rem;
            font-weight: 850;
            line-height: 1.25;
        }
        .stock-result-meta-item {
            display: inline-flex;
            align-items: center;
            min-width: 0;
            overflow-wrap: anywhere;
        }
        .stock-result-meta-separator {
            color: var(--text-muted);
            font-weight: 800;
        }
        .stock-result-price {
            margin-top: 4px;
            color: var(--accent);
            font-size: 0.78rem;
            font-weight: 800;
        }
        .stock-result-select,
        .stock-result-qty {
            min-height: 38px;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0 10px;
            background: rgba(255, 255, 255, 0.92);
            color: var(--text-primary);
            min-width: 0;
        }
        .stock-result-qty {
            width: 100%;
        }
        .stock-result-add {
            white-space: nowrap;
        }
        .stock-set-filters {
            display: grid;
            grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(180px, 1fr);
            gap: 10px;
            align-items: end;
        }
        .stock-set-field {
            display: grid;
            gap: 5px;
            min-width: 0;
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 800;
        }
        .stock-set-field select {
            min-width: 0;
            min-height: 42px;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0 10px;
            color: var(--text-primary);
            background: var(--bg-card);
        }
        .stock-set-summary {
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            background: var(--bg-secondary);
            font-size: 0.84rem;
            line-height: 1.4;
        }
        .stock-set-summary.warning {
            border-color: #d97706;
            color: #92400e;
            background: rgba(245, 158, 11, 0.12);
        }
        .stock-set-actions,
        .stock-set-selection-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .stock-set-actions {
            justify-content: space-between;
        }
        .stock-set-result-row {
            grid-template-columns: 68px minmax(180px, 1fr) minmax(100px, 132px) minmax(130px, 200px) 82px;
        }
        .stock-set-hint {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.84rem;
        }
        .stock-set-result-row {
            background: var(--bg-card);
        }
        .stock-set-image-warning {
            margin-top: 4px;
            color: #b45309;
            font-size: 0.75rem;
            font-weight: 800;
        }
        .stock-empty-state {
            border: 1px dashed var(--border);
            border-radius: 8px;
            padding: 22px;
            color: var(--text-secondary);
            text-align: center;
            background: rgba(255, 255, 255, 0.5);
        }
        @media (max-width: 980px) {
            .stock-result-row {
                grid-template-columns: 58px minmax(0, 1fr) minmax(112px, 1fr);
            }
            .stock-result-row .stock-result-select,
            .stock-result-row .stock-result-qty,
            .stock-result-row .stock-result-add {
                grid-column: 2 / -1;
            }
            .stock-set-result-row {
                grid-template-columns: 58px minmax(0, 1fr);
            }
            .stock-set-result-row .stock-result-select,
            .stock-set-result-row .stock-result-qty {
                grid-column: 2 / -1;
            }
            .stock-set-filters {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            body.listing-flow-stock .create-batch-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            body.listing-flow-stock .create-batch-grid .batch-detail-field.batch-name-field,
            body.listing-flow-stock .create-batch-grid .sku-preview-field {
                grid-column: 1 / -1;
            }
        }
        @media (max-width: 700px) {
            .stock-list-header,
            .stock-search-bar {
                grid-template-columns: 1fr;
                display: grid;
            }
            .stock-set-filters {
                grid-template-columns: 1fr;
            }
            .stock-result-row {
                grid-template-columns: 54px minmax(0, 1fr);
            }
            .stock-result-row .stock-result-select,
            .stock-result-row .stock-result-qty,
            .stock-result-row .stock-result-add {
                grid-column: 1 / -1;
            }
            .stock-set-result-row {
                grid-template-columns: 54px minmax(0, 1fr);
            }
            .stock-set-result-row .stock-result-select,
            .stock-set-result-row .stock-result-qty {
                grid-column: 1 / -1;
            }
            body.listing-flow-stock .create-batch-grid {
                grid-template-columns: 1fr;
            }
        }
        .stock-list-card {
            container: stock-builder / inline-size;
            min-width: 0;
        }
        .stock-builder-panel,
        .stock-search-results,
        .stock-result-row > * {
            min-width: 0;
        }
        .stock-set-sort {
            width: 100%;
        }
        .stock-set-field select {
            width: 100%;
        }
        @container stock-builder (max-width: 900px) {
            .stock-result-row {
                grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 76px;
            }
            .stock-result-row .stock-result-info {
                grid-column: 2 / -1;
            }
            .stock-result-row .stock-result-select,
            .stock-result-row .stock-result-qty,
            .stock-result-row .stock-result-add {
                grid-column: auto;
                width: 100%;
            }
            .stock-result-row .stock-result-select:first-of-type {
                grid-column: 2;
            }
            .stock-result-row .stock-result-add {
                grid-column: 2 / -1;
            }
            .stock-set-result-row {
                grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 76px;
            }
            .stock-set-result-row .stock-result-info {
                grid-column: 2 / -1;
            }
            .stock-set-result-row .stock-result-select:first-of-type {
                grid-column: 2;
            }
            .stock-set-result-row > [data-stock-condition] + .smooth-select-proxy {
                grid-column: 2;
            }
            .stock-set-result-row > [data-stock-variant] + .smooth-select-proxy {
                grid-column: 3;
            }
            .stock-set-result-row .stock-result-qty {
                grid-column: 4;
            }
            .stock-set-filters {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            }
            .stock-set-filters > button {
                justify-self: start;
            }
        }
        @container stock-builder (max-width: 480px) {
            .stock-list-header,
            .stock-search-bar {
                display: grid;
                grid-template-columns: minmax(0, 1fr);
            }
            .stock-builder-tabs {
                flex-wrap: wrap;
            }
            .stock-set-filters {
                grid-template-columns: minmax(0, 1fr);
            }
            .stock-result-row {
                grid-template-columns: 56px minmax(0, 1fr);
            }
            .stock-set-result-row {
                grid-template-columns: 56px minmax(0, 1fr);
            }
            .stock-set-result-row > [data-stock-condition] + .smooth-select-proxy,
            .stock-set-result-row > [data-stock-variant] + .smooth-select-proxy,
            .stock-set-result-row .stock-result-qty {
                grid-column: 1 / -1;
            }
            .stock-result-row .stock-result-select,
            .stock-result-row .stock-result-select:first-of-type,
            .stock-result-row .stock-result-qty,
            .stock-result-row .stock-result-add {
                grid-column: 1 / -1;
            }
            .stock-set-actions > .btn,
            .stock-set-selection-actions,
            .stock-set-selection-actions > .btn {
                width: 100%;
            }
        }
        body.listing-flow-slabs .list-view-container {
            --lv-control-height: 42px;
            gap: 6px;
        }
        .list-view-row.graded-row,
        body.listing-flow-slabs .list-view-row.graded-row {
            display: grid;
            grid-template-columns: 24px 150px minmax(0, 1fr) 122px;
            gap: 12px;
            align-items: center;
            padding: 0.48rem 0.58rem 0.48rem 0.42rem;
            border-radius: 9px;
        }
        .list-view-row.graded-row .slab-contain-thumbs,
        .list-view-row.graded-row .lv-thumbs,
        body.listing-flow-slabs .graded-row .lv-thumbs {
            display: grid;
            grid-template-columns: repeat(2, 70px);
            grid-template-rows: 104px 26px;
            align-items: center;
            justify-items: center;
            justify-content: center;
            height: 136px;
            width: 150px;
            gap: 6px 8px;
        }
        .list-view-row.graded-row .slab-contain-thumbs img,
        .list-view-row.graded-row .lv-thumbs img,
        .list-view-row.graded-row .lv-thumb-placeholder,
        body.listing-flow-slabs .graded-row .lv-thumbs img,
        body.listing-flow-slabs .graded-row .lv-thumb-placeholder {
            width: 70px;
            height: 104px;
            flex-basis: 70px;
            max-width: 70px;
            max-height: 104px;
            aspect-ratio: auto;
            object-fit: contain;
            object-position: center;
            background: #fff;
            display: block;
        }
        .list-view-row.graded-row .lv-thumb-action,
        body.listing-flow-slabs .graded-row .lv-thumb-action {
            cursor: pointer;
        }
        .list-view-row.graded-row .lv-thumb-action:hover,
        body.listing-flow-slabs .graded-row .lv-thumb-action:hover {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(0, 86, 162, 0.12);
        }
        .list-view-row.graded-row .lv-info,
        body.listing-flow-slabs .graded-row .lv-info {
            justify-content: center;
            min-height: 132px;
            gap: 8px;
        }
        .list-view-row.graded-row .lv-title-row,
        body.listing-flow-slabs .graded-row .lv-title-row {
            display: grid;
            grid-template-columns: minmax(300px, 1fr) 46px;
            gap: 8px;
            align-items: center;
        }
        .list-view-row.graded-row .lv-title,
        body.listing-flow-slabs .graded-row .lv-title {
            min-height: 32px;
            padding: 5px 9px;
            font-size: 13px;
            line-height: 1.15;
        }
        .list-view-row.graded-row .lv-edit-row,
        body.listing-flow-slabs .graded-row .lv-edit-row {
            gap: 6px;
            align-items: center;
        }
        .list-view-row.graded-row .lv-controls-stack,
        body.listing-flow-slabs .graded-row .lv-controls-stack {
            gap: 3px;
        }
        .list-view-row.graded-row .lv-fields-row,
        body.listing-flow-slabs .graded-row .lv-fields-row {
            grid-template-columns: 48px 92px var(--lv-market-col) 104px 82px 72px minmax(132px, 210px) minmax(120px, 160px) minmax(120px, 1fr) 120px;
            column-gap: 10px;
            row-gap: 4px;
            justify-content: start;
        }
        .list-view-row.graded-row .lv-field-category,
        body.listing-flow-slabs .graded-row .lv-field-category {
            max-width: 220px;
        }
        .list-view-row.graded-row .lv-field-cert,
        body.listing-flow-slabs .graded-row .lv-field-cert {
            width: 100%;
            max-width: 120px;
        }
        .list-view-row.graded-row .lv-price.lv-market-display,
        .list-view-row.graded-row .lv-ebay-box,
        body.listing-flow-slabs .graded-row .lv-price.lv-market-display,
        body.listing-flow-slabs .graded-row .lv-ebay-box {
            min-width: 0;
        }
        .list-view-row.graded-row .lv-price .lv-market-value,
        body.listing-flow-slabs .graded-row .lv-price .lv-market-value {
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .list-view-row.graded-row .lv-label,
        body.listing-flow-slabs .graded-row .lv-label {
            min-height: 10px;
            font-size: 10px;
        }
        .list-view-row.graded-row .lv-affiliate-btn,
        body.listing-flow-slabs .graded-row .lv-affiliate-btn {
            min-height: 24px;
        }
        .list-view-row.graded-row .lv-slab-swap,
        body.listing-flow-slabs .graded-row .lv-slab-swap {
            grid-column: 1 / -1;
            justify-self: center;
            width: 32px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: 7px;
            background: var(--bg-input);
            color: var(--accent);
            padding: 0;
            cursor: pointer;
        }
        .list-view-row.graded-row .lv-slab-swap svg,
        body.listing-flow-slabs .graded-row .lv-slab-swap svg {
            width: 15px;
            height: 15px;
            display: block;
        }
        .list-view-row.graded-row .lv-slab-swap:hover:not(:disabled),
        body.listing-flow-slabs .graded-row .lv-slab-swap:hover:not(:disabled) {
            border-color: var(--accent);
            background: var(--bg-hover);
        }
        .list-view-row.graded-row .lv-slab-swap:disabled,
        body.listing-flow-slabs .graded-row .lv-slab-swap:disabled {
            color: var(--text-muted);
            cursor: not-allowed;
            opacity: 0.55;
        }
        body.listing-flow-slabs .graded-row .lv-row-actions {
            align-self: start;
            padding-top: 0;
            margin-left: 0;
        }


        .lv-thumbs {
            display: flex; flex: 0 0 auto; gap: 5px; height: var(--lv-thumb-height); width: var(--lv-thumb-column-width); align-items: center; justify-content: center;
        }
        .lv-thumbs img {
            height: var(--lv-thumb-height); width: var(--lv-thumb-width); border-radius: 4px; border: 1px solid var(--border);
            object-fit: cover;
        }
        .list-view-row:not(.graded-row) .lv-thumbs img:first-child { width: 100%; aspect-ratio: 2.5/3.5; object-fit: cover; }
        .list-view-row:not(.graded-row) .lv-thumbs img.lv-thumb:first-child { width: var(--lv-thumb-width); aspect-ratio: auto; }
        .lv-thumb-placeholder {
            height: var(--lv-thumb-height);
            width: var(--lv-thumb-width);
            flex: 0 0 var(--lv-thumb-width);
            border-radius: 4px;
            border: 1px solid var(--border);
            background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
        }
        .lv-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
        .lv-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; }
        .manual-row .lv-title-row { display: flex; }
        .manual-row .lv-title { flex: 1 1 auto; min-width: 0; }
        .manual-listing-badge {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 2px 8px;
            border: 1px solid rgba(0, 91, 172, 0.26);
            border-radius: 999px;
            background: rgba(0, 91, 172, 0.08);
            color: var(--accent);
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
        }
        .lv-title { font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--text); padding: 5px 10px; border: 1px solid var(--border); background: var(--bg-input); width: 100%; border-radius: 8px; transition: all 0.2s; }
        .lv-title:hover { background: var(--bg-hover); }
        .lv-title:focus { outline: none; border-color: var(--accent); background: var(--bg-hover); }
        .lv-title.over-limit { border-color: #ef4444 !important; background: rgba(239, 68, 68, 0.05); }
        .lv-title-counter { font-size: 11px; white-space: nowrap; font-weight: 500; transition: color 0.2s; }
        .lv-combined-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }
        .lv-combined-badge {
            display: inline-flex;
            align-items: center;
            min-height: 22px;
            padding: 2px 8px;
            border: 1px solid rgba(0, 86, 162, 0.22);
            border-radius: 999px;
            background: rgba(0, 86, 162, 0.08);
            color: var(--accent);
            font-size: 10px;
            font-weight: 850;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
        }
        .lv-combined-summary.has-error .lv-combined-badge {
            border-color: rgba(220, 38, 38, 0.34);
            background: rgba(220, 38, 38, 0.08);
            color: #dc2626;
        }
        .lv-combined-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            min-height: 26px;
            padding: 2px 7px;
            border: 0;
            border-radius: 7px;
            background: transparent;
            color: var(--accent);
            font: inherit;
            font-size: 11px;
            font-weight: 800;
            white-space: nowrap;
            cursor: pointer;
        }
        .lv-combined-toggle:hover,
        .lv-combined-toggle:focus-visible {
            background: rgba(0, 86, 162, 0.08);
            outline: none;
        }
        .lv-combined-toggle-chevron { font-size: 12px; line-height: 1; }
        .lv-combined-manifest {
            grid-column: 2 / -1;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 9px;
            min-width: 0;
            padding: 8px 0 2px;
            border-top: 1px solid var(--border);
        }
        .lv-combined-leaf {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr);
            gap: 9px;
            align-items: center;
            min-width: 0;
            padding: 8px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-input);
        }
        .lv-combined-leaf.has-error { border-color: rgba(220, 38, 38, 0.48); }
        .lv-combined-leaf-image {
            width: 58px;
            height: 81px;
            border: 1px solid var(--border);
            border-radius: 5px;
            background: var(--bg-card);
            object-fit: cover;
        }
        .lv-combined-leaf-fields {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            grid-template-areas:
                "qty qty"
                "label label"
                "sku sku";
            gap: 4px;
            min-width: 0;
        }
        .lv-combined-leaf-quantity {
            grid-area: qty;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 800;
        }
        .lv-combined-leaf-fields .lv-label { grid-area: label; }
        .lv-combined-leaf-sku { grid-area: sku; }
        .lv-combined-leaf-sku.invalid {
            border-color: #dc2626;
            box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
        }
        .lv-edit-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
        .lv-controls-stack { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
        .lv-fields-row {
            /* --lv-market-chars is set from the batch's longest market value. */
            --lv-market-col: clamp(56px, calc(var(--lv-market-chars, 10) * 8px), 112px);
            display: grid;
            grid-template-columns: 48px 88px var(--lv-market-col) 76px 72px minmax(128px, 210px) minmax(124px, 160px) minmax(120px, 160px) minmax(120px, 1fr);
            column-gap: 8px;
            row-gap: 4px;
            align-items: end;
            max-width: 100%;
        }
        .lv-field-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
        .lv-field-qty { width: 48px; }
        .lv-field-price { width: 88px; }
        .lv-field-market { width: 82px; }
        .lv-field-cost { width: 84px; }
        .lv-field-cond { width: 72px; }
        .lv-field-finish { width: 104px; }
        .lv-field-variant { width: 100%; min-width: 0; max-width: 210px; }
        .lv-field-category { width: 100%; max-width: 160px; }
        .lv-field-business-policy { width: 100%; max-width: 160px; }
        .lv-field-sku { width: 100%; max-width: none; }
        .lv-fields-row > .lv-field-group { width: 100%; }
        #bulkCostTools[hidden] { display: none !important; }
        /* !important because throne-theme.css forces every dark-mode input to
           the primary text colour; without it an allocated cost would read as
           a seller-entered one in dark mode. */
        .lv-cost-control.is-manual-cost { box-shadow: inset 3px 0 0 var(--accent); }
        .lv-label {
            display: flex; align-items: center; min-height: 10px;
            font-size: 10.5px; line-height: 1; font-weight: 800;
            color: var(--text-muted); text-transform: uppercase; padding-left: 2px;
            white-space: nowrap;
        }
        .lv-price {
            height: var(--lv-control-height); width: 100%;
            display: inline-flex; align-items: center; gap: 6px;
            background: var(--bg-input); border: 1px solid var(--border);
            border-radius: var(--lv-control-radius); padding: 0 12px;
            transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }
        .lv-price.lv-input-control { cursor: text; }
        .lv-price.lv-quantity-control { justify-content: center; padding: 0; }
        .lv-price.lv-market-display {
            background: transparent; border-color: transparent; padding: 0;
            justify-content: flex-start; cursor: default;
        }
        .lv-price:focus-within {
            background: var(--bg-card);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .lv-price span { color: var(--text-muted); font-size: 13px; line-height: 1; flex: 0 0 auto; }
        .lv-price .lv-price-prefix { pointer-events: none; }
        .lv-price .lv-market-value {
            color: var(--text-primary); font-size: 13px; font-weight: 800;
            font-variant-numeric: tabular-nums;
        }
        .lv-price input {
            height: 100%; min-width: 0; border: none; background: transparent;
            color: var(--text-primary); font-weight: 800; font-size: 14px;
            line-height: 1; width: 100%; padding: 0; font-family: inherit;
            font-variant-numeric: tabular-nums;
        }
        .lv-price input.lv-quantity-input { text-align: center; }
        .lv-price input:focus { outline: none; }
        .lv-text-input {
            height: var(--lv-control-height);
            min-height: var(--lv-control-height);
            width: 100%;
            min-width: 0;
            border: 1px solid var(--border);
            border-radius: var(--lv-control-radius);
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            line-height: 1;
            padding: 0 11px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }
        .lv-text-input:hover { border-color: var(--text-muted); }
        .lv-text-input:focus {
            outline: none;
            background: var(--bg-card);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }

        /* Remove up/down spinners on number inputs */
        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
        input[type=number] { -moz-appearance: textfield; }

        .lv-select {
            height: var(--lv-control-height); min-height: var(--lv-control-height);
            background: var(--bg-input); border: 1px solid var(--border);
            color: var(--text-primary); font-size: 14px; font-weight: 800;
            line-height: 1; padding: 0 14px; border-radius: var(--lv-control-radius);
            cursor: pointer; font-family: inherit; min-width: 0;
            width: 100%;
        }
        .lv-select option { background: var(--bg-card); color: var(--text-primary); font-size: 14px; }
        .lv-select:hover { border-color: var(--text-muted); }
        .lv-select:focus { outline: none; border-color: var(--accent); }

        select.batch-selector,
        select.lv-select,
        .field-item select,
        .modal-tool-group select {
            color-scheme: light;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-color: var(--bg-input);
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-position: right 0.75rem center;
            background-repeat: no-repeat;
            background-size: 14px 14px;
            color: var(--text-primary);
            transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }
        select.batch-selector,
        .field-item select {
            padding-right: 2.4rem;
        }
        select.lv-select,
        .modal-tool-group select {
            padding-right: 1.9rem;
        }
        select.batch-selector:hover,
        select.lv-select:hover,
        .field-item select:hover,
        .modal-tool-group select:hover {
            background-color: var(--bg-hover);
        }
        select.batch-selector:focus,
        select.lv-select:focus,
        .field-item select:focus,
        .modal-tool-group select:focus {
            outline: none;
            background-color: var(--bg-card);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        select.batch-selector option,
        select.lv-select option,
        .field-item select option,
        .modal-tool-group select option {
            color-scheme: light;
            background-color: #ffffff;
            color: #0f172a;
        }
        select.batch-selector option:checked,
        select.lv-select option:checked,
        .field-item select option:checked,
        .modal-tool-group select option:checked {
            background-color: #dbeafe;
            color: #0f172a;
        }
        select::-ms-expand {
            display: none;
        }

        .lv-btn { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); padding: 4px 8px; border-radius: 4px; cursor: pointer; transition: all 0.2s; font-size: 11px; font-weight: 600; text-transform: uppercase; }
        .lv-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; border-color: #ef4444; }
        .lv-btn-icon { width: 26px; height: 26px; background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: 2px; border-radius: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
        .lv-btn-icon svg { width: 15px; height: 15px; }
        .lv-btn-icon:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); }
        .lv-btn-icon.edit:hover { color: var(--accent); background: rgba(3,83,164,0.08); border-color: rgba(3,83,164,0.28); }
        .lv-btn-icon.confirming { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.42); color: #ef4444; font-weight: 800; min-width: 48px; }
        .lv-side-rail {
            display: grid;
            grid-template-columns: 88px 26px;
            align-self: stretch;
            align-items: start;
            column-gap: 8px;
            width: 122px;
        }
        .lv-row-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; align-self: start; gap: 4px; margin-left: 0; padding-top: 0; }
        .lv-affiliate-stack { display: flex; flex-direction: column; gap: 3px; width: 88px; flex: 0 0 88px; align-self: center; }
        .lv-affiliate-btn {
            display: flex; align-items: center; justify-content: center;
            min-height: 22px; padding: 3px 5px; border: 1px solid var(--border);
            border-radius: 7px; background: var(--bg-input); text-decoration: none;
            text-transform: uppercase; letter-spacing: 0.04em; font-size: 9.5px;
            font-weight: 800; line-height: 1; transition: all 0.15s;
        }
        .lv-btn-sold { color: #059669; }
        .lv-btn-sold:hover { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #047857; }
        .lv-btn-listed { color: #0b62b4; }
        .lv-btn-listed:hover { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.3); color: #0353a4; }
        .lv-btn-tcg { color: #8b5cf6; }
        .lv-btn-tcg:hover { background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.3); color: #7c3aed; }
        .lv-affiliate-btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
        .lv-ebay-field { width: 82px; }
        .lv-ebay-box {
            height: var(--lv-control-height); display: flex; align-items: stretch;
            background: var(--bg-input); border: 1px solid var(--border);
            border-radius: var(--lv-control-radius); padding: 3px 4px;
        }
        .lv-ebay-split {
            width: 100%; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr));
            gap: 3px; align-items: stretch;
        }
        .lv-ebay-split.lv-ebay-active-only {
            grid-template-rows: minmax(0, 1fr);
        }
        .lv-ebay-cell {
            min-width: 0; min-height: 0; display: flex; align-items: center;
            justify-content: center; overflow: hidden; border-radius: 5px;
            background: #fff;
        }
        .lv-ebay-check {
            width: 100%; height: 100%; border: 0; background: transparent;
            color: #0b62b4; font: inherit; font-size: 9px; font-weight: 800;
            line-height: 1; text-transform: uppercase; cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center;
            text-align: center; white-space: nowrap; padding: 0 2px;
        }
        .lv-ebay-check:hover { color: #0353a4; }
        .lv-ebay-check:disabled { color: var(--text-muted); cursor: wait; }
        .lv-ebay-check.error { color: #dc2626; }
        .lv-ebay-check.empty { color: var(--text-muted); }
        .lv-ebay-muted {
            color: var(--text-muted); font-size: 11px; font-weight: 800;
            text-transform: uppercase;
        }
        .lv-ebay-lowline { display: flex; align-items: center; gap: 6px; width: 100%; }
        .lv-ebay-price-chip {
            width: 100%; height: 100%; border: 0; background: transparent;
            display: flex; align-items: center; justify-content: center;
            gap: 2px; cursor: pointer; padding: 0 2px;
        }
        .lv-ebay-price-chip:hover { background: rgba(59,130,246,0.08); }
        .lv-ebay-chip-label {
            color: var(--text-muted); font-size: 7px; line-height: 1;
            font-weight: 900; text-transform: uppercase;
        }
        .lv-ebay-price {
            color: #0b62b4; font-size: 9px; line-height: 1;
            font-weight: 900; white-space: nowrap;
        }
        .lv-ebay-use {
            margin-left: auto; border: 1px solid rgba(59,130,246,0.25);
            background: rgba(59,130,246,0.08); color: #0b62b4;
            border-radius: 5px; padding: 2px 5px; font-size: 10px;
            font-weight: 800; cursor: pointer;
        }
        .lv-ebay-results {
            display: grid; grid-template-columns: 1fr; gap: 4px;
            margin-top: 2px; max-width: 760px;
        }
        .lv-ebay-results-head {
            color: var(--text-muted); font-size: 11px; font-weight: 700;
            display: flex; align-items: center; gap: 8px; justify-content: space-between;
        }
        .lv-ebay-results-head > span:first-child {
            min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .lv-ebay-result-actions {
            display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
        }
        .lv-ebay-refresh {
            border: 1px solid rgba(59,130,246,0.22); border-radius: 5px;
            background: rgba(59,130,246,0.06); color: #0b62b4;
            cursor: pointer; font-size: 10px; font-weight: 800;
            padding: 2px 6px; white-space: nowrap;
        }
        .lv-ebay-refresh:hover { border-color: rgba(59,130,246,0.35); background: rgba(59,130,246,0.11); }
        .lv-ebay-result {
            display: grid; grid-template-columns: 72px 1fr 190px; gap: 8px;
            align-items: center; padding: 5px 7px; border: 1px solid var(--border);
            border-radius: 8px; background: rgba(59,130,246,0.04);
            text-decoration: none; color: var(--text-primary);
        }
        .lv-ebay-result:hover { border-color: rgba(59,130,246,0.35); background: rgba(59,130,246,0.08); }
        .lv-ebay-result-price { color: #0b62b4; font-size: 12px; font-weight: 800; }
        .lv-ebay-result-title {
            min-width: 0; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; font-size: 12px; font-weight: 700;
        }
        .lv-ebay-result-meta {
            min-width: 0; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; color: var(--text-muted); font-size: 11px;
        }

        @container list-view (min-width: 1425px) {
            .lv-fields-row:not(:has(.lv-field-category)) {
                grid-template-columns: 48px 88px var(--lv-market-col) 76px 72px minmax(128px, 210px) minmax(120px, 160px) minmax(120px, 1fr);
            }
            .list-view-row.graded-row .lv-fields-row:not(:has(.lv-field-category)),
            body.listing-flow-slabs .graded-row .lv-fields-row:not(:has(.lv-field-category)) {
                grid-template-columns: 48px 92px var(--lv-market-col) 104px 82px 72px minmax(120px, 160px) minmax(120px, 1fr) 120px;
            }
            body.listing-cost-basis .lv-fields-row {
                grid-template-columns: 48px 88px var(--lv-market-col) 84px 76px 72px minmax(128px, 210px) minmax(124px, 160px) minmax(120px, 160px) minmax(120px, 1fr);
            }
            body.listing-cost-basis .list-view-row.graded-row .lv-fields-row,
            body.listing-cost-basis.listing-flow-slabs .graded-row .lv-fields-row {
                grid-template-columns: 48px 88px var(--lv-market-col) 84px 84px 72px 68px minmax(104px, 210px) minmax(104px, 160px) minmax(104px, 1fr) minmax(96px, 120px);
            }
            body.listing-cost-basis .lv-fields-row:not(:has(.lv-field-category)) {
                grid-template-columns: 48px 88px var(--lv-market-col) 84px 76px 72px minmax(128px, 210px) minmax(120px, 160px) minmax(120px, 1fr);
            }
            body.listing-cost-basis .list-view-row.graded-row .lv-fields-row:not(:has(.lv-field-category)),
            body.listing-cost-basis.listing-flow-slabs .graded-row .lv-fields-row:not(:has(.lv-field-category)) {
                grid-template-columns: 48px 88px var(--lv-market-col) 84px 84px 72px 68px minmax(104px, 160px) minmax(104px, 1fr) minmax(96px, 120px);
            }
        }

        @container list-view (max-width: 1080px) {
            .list-view-row {
                grid-template-columns: 24px var(--lv-thumb-column-width) minmax(0, 1fr);
                align-items: start;
            }
            .list-view-row.graded-row,
            body.listing-flow-slabs .list-view-row.graded-row {
                grid-template-columns: 24px 146px minmax(0, 1fr);
            }
            .lv-side-rail,
            .list-view-row.graded-row .lv-side-rail,
            body.listing-flow-slabs .graded-row .lv-side-rail {
                grid-column: 3;
                width: 100%;
                grid-template-columns: minmax(0, 1fr) 30px;
                align-self: start;
                align-items: start;
            }
            .lv-affiliate-stack,
            .list-view-row.graded-row .lv-affiliate-stack,
            body.listing-flow-slabs .graded-row .lv-affiliate-stack {
                width: 100%;
                flex: 1 1 auto;
                flex-direction: row;
                flex-wrap: wrap;
                align-self: start;
            }
            .lv-affiliate-btn,
            .list-view-row.graded-row .lv-affiliate-btn,
            body.listing-flow-slabs .graded-row .lv-affiliate-btn {
                flex: 1 1 86px;
                min-width: 86px;
            }
            .lv-row-actions {
                flex-direction: row;
                justify-content: flex-end;
                align-items: flex-start;
            }
            .lv-combined-manifest { grid-column: 2 / -1; }
        }

        @container list-view (max-width: 1424px) {
            .list-view-row,
            .list-view-row.graded-row,
            body.listing-flow-slabs .list-view-row.graded-row {
                --lv-thumb-width: 60px;
                --lv-thumb-height: 84px;
                --lv-thumb-column-width: 130px;
            }
            .lv-title-row,
            .list-view-row.graded-row .lv-title-row,
            body.listing-flow-slabs .graded-row .lv-title-row {
                grid-template-columns: minmax(0, 1fr) 44px;
            }
            .lv-fields-row,
            .list-view-row.graded-row .lv-fields-row,
            body.listing-flow-slabs .graded-row .lv-fields-row {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
            .lv-field-qty,
            .lv-field-price,
            .lv-field-market,
            .lv-field-cost,
            .lv-field-cond,
            .lv-field-finish,
            .lv-field-variant,
            .lv-field-category,
            .lv-field-business-policy,
            .lv-field-sku,
            .lv-field-cert,
            .lv-ebay-field {
                width: 100%;
                max-width: none;
            }
        }

        @container list-view (max-width: 720px) {
            .list-view-row,
            .list-view-row.graded-row,
            body.listing-flow-slabs .list-view-row.graded-row {
                grid-template-columns: 24px minmax(0, 1fr);
            }
            .lv-thumbs,
            .list-view-row.graded-row .lv-thumbs,
            body.listing-flow-slabs .graded-row .lv-thumbs {
                grid-column: 2;
            }
            .lv-info,
            .list-view-row.graded-row .lv-info,
            body.listing-flow-slabs .graded-row .lv-info {
                grid-column: 1 / -1;
                min-height: 0;
            }
            .lv-side-rail,
            .list-view-row.graded-row .lv-side-rail,
            body.listing-flow-slabs .graded-row .lv-side-rail {
                grid-column: 1 / -1;
                grid-template-columns: minmax(0, 1fr) 30px;
            }
            .lv-fields-row,
            .list-view-row.graded-row .lv-fields-row,
            body.listing-flow-slabs .graded-row .lv-fields-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .lv-combined-manifest {
                grid-column: 1 / -1;
                grid-template-columns: 1fr;
            }
        }

        .over-limit-text { color: #ef4444 !important; font-weight: 700; }

        .lv-title-ro { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 4px; margin-left: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
        .lv-set { font-size: 12px; color: var(--text-secondary); }

        /* ─── Bulk Edit Bar ─── */
        .bulk-edit-bar {
            position: sticky; top: 108px; z-index: 90;
            background: var(--surface); backdrop-filter: blur(12px);
            border: 1px solid rgba(0, 86, 162, 0.32); border-radius: 12px;
            padding: 16px 18px; margin: 4px 0 16px;
            display: none; align-items: start; gap: 12px 14px;
            grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.48fr) minmax(380px, 0.56fr);
            grid-template-areas:
                "summary summary danger"
                "fields title commands";
            width: 100%;
            box-sizing: border-box;
            overflow: visible;
            box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
            animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        @keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .bulk-edit-bar.active { display: grid; }
        body.batch-info-topbar-collapsed .bulk-edit-bar {
            top: calc(var(--listing-topbar-height, 0px) + var(--listing-toolbar-height, 0px) + 8px);
        }
        .bulk-edit-bar:focus-within { z-index: 160; }
        .bulk-selection-group {
            display: inline-flex; align-items: center; gap: 10px;
            grid-area: summary;
            min-width: 0; white-space: nowrap; flex-wrap: wrap;
            align-self: center;
        }
        .bulk-count { font-size: 14px; font-weight: 850; color: var(--accent); white-space: nowrap; }
        .bulk-actions-group {
            display: flex; align-items: center; gap: 8px;
            min-width: 0; flex-wrap: wrap;
        }
        .bulk-field-actions {
            grid-area: fields;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
            align-self: start;
            align-content: start;
            align-items: center;
            gap: 9px 10px;
            padding: 10px;
            background: rgba(248, 250, 252, 0.78);
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 12px;
        }
        .bulk-field-actions::before {
            content: "Apply Fields";
            grid-column: 1 / -1;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.04em;
            line-height: 1;
            text-transform: uppercase;
        }
        .bulk-command-actions {
            grid-area: commands;
            align-self: start;
            display: grid;
            grid-template-columns: 1fr;
            align-items: center;
            gap: 10px;
            justify-content: stretch;
            padding: 10px;
            background: rgba(248, 250, 252, 0.78);
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 12px;
        }
        .bulk-title-actions {
            grid-area: title;
            align-self: start;
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            justify-content: stretch;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: rgba(248, 250, 252, 0.78);
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 12px;
        }
        .bulk-select.title-template { flex: 1 1 220px; width: 100%; max-width: none; }
        html[data-throne-theme="dark"] .bulk-edit-bar {
            background: var(--throne-surface);
            border-color: #626262;
            box-shadow: var(--throne-shadow-raised);
        }
        html[data-throne-theme="dark"] .bulk-edit-bar :is(.bulk-field-actions, .bulk-command-actions, .bulk-title-actions) {
            background: var(--throne-surface-muted);
            border-color: var(--throne-border);
        }
        .bulk-title-actions .bulk-action-btn {
            grid-column: 1 / -1;
            width: 100%;
        }
        .bulk-danger-actions {
            grid-area: danger;
            align-self: center;
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: flex-end;
            justify-self: end;
        }
        .bulk-select { flex: 0 0 158px; width: 158px; max-width: 158px; }
        .bulk-select.condition { flex-basis: 184px; width: 184px; max-width: 184px; }
        .bulk-select.variant { flex-basis: 176px; width: 176px; max-width: 176px; }
        .bulk-select.category { flex-basis: 190px; width: 190px; max-width: 190px; }
        .bulk-select.configuration { flex-basis: 220px; width: 220px; max-width: 220px; }
        .bulk-select.business-policy { flex-basis: 220px; width: 220px; max-width: 220px; }
        .bulk-field-actions .bulk-select {
            width: 100%;
            max-width: none;
            min-width: 0;
            flex: unset;
        }
        .bulk-price-tools {
            display: inline-grid;
            grid-template-columns: auto minmax(120px, 1fr) auto;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
            min-width: 0;
            grid-column: 1 / -1;
        }
        .bulk-tool-label {
            color: var(--text-muted); font-size: 11px; font-weight: 900;
            letter-spacing: 0.04em; text-transform: uppercase;
        }
        .bulk-price-adjust {
            height: var(--lv-control-height); width: 100%; min-width: 0;
            display: inline-flex; align-items: center; gap: 6px;
            padding: 0 11px; border: 1px solid var(--border);
            border-radius: var(--lv-control-radius); background: var(--bg-input);
            transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }
        .bulk-price-adjust:focus-within {
            background: var(--bg-card);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 86, 162, 0.12);
        }
        .bulk-price-prefix {
            color: var(--text-muted); font-size: 13px; font-weight: 800;
            line-height: 1; pointer-events: none;
        }
        .bulk-price-adjust-input {
            height: 100%; width: 100%; min-width: 0; border: 0; padding: 0;
            background: transparent; color: var(--text-primary); font: inherit;
            font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
        }
        .bulk-price-adjust-input:focus { outline: none; }
        .bulk-price-adjust-input::placeholder { color: var(--text-muted); opacity: 0.78; }
        .bulk-action-btn {
            height: var(--lv-control-height); min-width: 94px;
            display: inline-flex; align-items: center; justify-content: center; gap: 6px;
            padding: 0 12px; border: 1px solid var(--border);
            border-radius: var(--lv-control-radius); background: var(--bg-input);
            color: var(--text-secondary); font-family: inherit; font-size: 12px;
            font-weight: 800; line-height: 1; cursor: pointer; white-space: nowrap;
            box-shadow: var(--shadow-sm);
            transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
        }
        .bulk-action-btn[hidden] { display: none !important; }
        .bulk-action-btn svg {
            width: 15px; height: 15px; flex: 0 0 auto; display: block;
        }
        .bulk-command-actions > .bulk-action-btn {
            width: 100%;
        }
        .bulk-action-btn:hover {
            background: var(--bg-hover); border-color: var(--text-muted);
            color: var(--text-primary); transform: translateY(-1px);
        }
        .bulk-action-btn:active { transform: translateY(0); }
        .bulk-action-btn.primary {
            min-width: 110px;
            border-color: rgba(0, 86, 162, 0.24);
            background: rgba(0, 86, 162, 0.08);
            color: var(--accent);
        }
        .bulk-action-btn.compact {
            min-width: 86px;
            padding: 0 10px;
        }
        .bulk-action-btn.done {
            min-width: 74px;
            border-color: rgba(0, 86, 162, 0.24);
            background: var(--accent);
            color: #ffffff;
        }
        .bulk-action-btn.done:hover {
            border-color: var(--accent);
            background: #034f9b;
            color: #ffffff;
        }
        .bulk-action-btn:disabled {
            opacity: 0.52;
            cursor: not-allowed;
            transform: none;
        }
        .bulk-action-btn:disabled:hover {
            background: var(--bg-input);
            border-color: var(--border);
            color: var(--text-secondary);
            transform: none;
        }
        .bulk-action-btn.done:disabled:hover {
            background: var(--accent);
            border-color: rgba(0, 86, 162, 0.24);
            color: #ffffff;
        }
        .bulk-action-btn.merge { min-width: 116px; }
        .bulk-action-btn.delete {
            min-width: 142px; color: #b91c1c;
            border-color: rgba(185, 28, 28, 0.18);
            background: rgba(239, 68, 68, 0.06);
        }
        .bulk-action-btn.delete:hover {
            border-color: rgba(220, 38, 38, 0.36);
            background: rgba(239, 68, 68, 0.1);
            color: #991b1b;
        }
        @media (max-width: 1280px) {
            .bulk-edit-bar {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "summary"
                    "fields"
                    "title"
                    "commands"
                    "danger";
            }
            .bulk-selection-group,
            .bulk-field-actions,
            .bulk-title-actions,
            .bulk-command-actions,
            .bulk-danger-actions {
                width: 100%;
                justify-self: stretch;
            }
            .bulk-field-actions { padding: 8px; }
            .bulk-title-actions { padding: 8px; justify-content: flex-start; }
            .bulk-command-actions { margin-left: 0; padding: 8px; }
            .bulk-danger-actions { margin-left: 0; padding-left: 0; border-left: 0; justify-self: stretch; }
        }
        @media (max-width: 980px) {
            .bulk-command-actions {
                grid-template-columns: 1fr;
                justify-content: stretch;
            }
            .bulk-command-actions > .bulk-action-btn,
            .bulk-price-tools {
                width: 100%;
            }
            .bulk-price-tools {
                grid-template-columns: auto minmax(0, 1fr) auto;
            }
            .bulk-price-adjust {
                width: 100%;
            }
        }
        @media (max-width: 720px) {
            .bulk-actions-group,
            .bulk-selection-group { flex-wrap: wrap; }
            .bulk-select,
            .bulk-select.condition,
            .bulk-select.variant,
            .bulk-select.category,
            .bulk-select.configuration,
            .bulk-select.business-policy,
            .bulk-select.title-template { flex: 1 1 150px; width: auto; max-width: none; }
            .bulk-price-tools { white-space: normal; }
            .bulk-command-actions,
            .bulk-danger-actions { justify-content: flex-start; }
        }

        .slab-view-container { display: grid; gap: 18px; }
        .slab-create-import-slot {
            display: none;
            min-width: 0;
        }
        .slab-standalone-import-slot {
            display: block;
        }
        body.slab-create-mode .slab-create-import-slot {
            display: block;
            grid-column: 2;
            min-width: 0;
        }
        body.slab-create-mode .slab-create-import-slot .slab-view-container {
            height: 100%;
        }
        body.slab-create-mode .slab-create-import-slot .slab-import-layout {
            grid-template-columns: minmax(0, 1fr);
            height: 100%;
            align-content: start;
        }
        body.slab-create-mode .slab-create-import-slot .slab-panel {
            min-width: 0;
        }
        .slab-import-layout {
            display: grid;
            grid-template-columns: repeat(3, minmax(240px, 1fr));
            gap: 18px;
            align-items: stretch;
        }
        .slab-import-layout.slab-import-layout-two {
            grid-template-columns: repeat(2, minmax(280px, 1fr));
        }
        .slab-import-layout.slab-import-layout-provider {
            grid-template-columns: minmax(0, 1fr);
        }
        .slab-provider-picker {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
            gap: 12px 18px;
            align-items: end;
            padding: 18px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--bg-card);
            box-shadow: var(--shadow-sm);
        }
        .slab-provider-picker p {
            margin: 0 0 11px;
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.4;
        }
        .slab-provider-select {
            width: 100%;
            min-height: 42px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-input);
            color: var(--text-primary);
            font: inherit;
            font-weight: 800;
            padding: 0 36px 0 12px;
        }
        .slab-provider-select:focus {
            outline: none;
            border-color: var(--border-focus);
            background: var(--bg-card);
            box-shadow: 0 0 0 3px rgba(3, 83, 164, 0.08);
        }
        .slab-provider-select:disabled {
            cursor: not-allowed;
            opacity: 0.7;
        }
        .slab-panel[hidden] { display: none !important; }
        .slab-panel,
        .slab-results {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
            padding: 18px;
        }
        .slab-panel-photo {
            border-color: rgba(3, 83, 164, 0.2);
            background:
                linear-gradient(145deg, rgba(3, 83, 164, 0.035), transparent 42%),
                var(--bg-card);
        }
        .slab-panel-photo.is-disabled .slab-photo-dropzone,
        .slab-panel-photo.is-disabled .slab-ocr-staging-grid {
            opacity: 0.72;
        }
        .slab-ocr-file-input {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .slab-photo-dropzone {
            min-height: clamp(280px, 32vw, 390px);
            display: grid;
            grid-template-rows: minmax(20px, 1fr) auto auto minmax(32px, 1fr);
            place-items: center;
            gap: 8px;
            padding: 26px;
            overflow: hidden;
            border: 2px dashed rgba(3, 83, 164, 0.32);
            border-radius: 12px;
            background: var(--bg-card);
            color: var(--text-secondary);
            text-align: center;
            cursor: pointer;
            transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
        }
        .slab-photo-dropzone[hidden] { display: none !important; }
        .slab-photo-dropzone:hover,
        .slab-photo-dropzone.is-dragover {
            border-color: var(--accent);
            background: rgba(3, 83, 164, 0.035);
        }
        .slab-photo-dropzone:focus-visible {
            outline: none;
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3px rgba(3, 83, 164, 0.1);
        }
        .slab-photo-dropzone-icon {
            align-self: end;
            width: 54px;
            height: 54px;
            margin-bottom: 8px;
            color: var(--accent);
        }
        .slab-photo-dropzone-icon svg {
            width: 100%;
            height: 100%;
            display: block;
        }
        .slab-photo-dropzone > strong {
            color: var(--text-primary);
            font-size: 22px;
            line-height: 1.15;
        }
        .slab-photo-dropzone > span:not(.slab-photo-dropzone-icon):not(.slab-photo-dropzone-meta) {
            font-size: 14px;
            font-weight: 600;
        }
        .slab-photo-dropzone-meta {
            align-self: end;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 800;
        }
        .slab-ocr-staging {
            display: grid;
            gap: 16px;
        }
        .slab-ocr-staging[hidden] { display: none !important; }
        .slab-ocr-staging-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }
        .slab-ocr-staging-summary {
            display: grid;
            gap: 2px;
        }
        .slab-ocr-staging-summary strong {
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 900;
        }
        .slab-ocr-staging-summary span {
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 700;
        }
        .slab-ocr-staging-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .slab-ocr-staging-actions .btn {
            min-height: 40px;
            white-space: nowrap;
        }
        .slab-ocr-staging-grid {
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            max-height: 58vh;
            padding: 2px 6px 2px 2px;
        }
        .slab-ocr-staging-pair {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            padding: 10px;
            border-radius: 10px;
            box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
        }
        .slab-ocr-staging-pair.has-error {
            border-color: rgba(185, 28, 28, 0.3);
            background: rgba(254, 242, 242, 0.7);
        }
        .slab-ocr-pair-number,
        .slab-ocr-pair-error {
            grid-column: 1 / -1;
        }
        .slab-ocr-pair-number {
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 900;
        }
        .slab-ocr-staging-pair .staging-side-label {
            align-self: flex-start;
            margin: 2px 0 6px;
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .slab-ocr-staging-pair .staging-img-wrap {
            background: #f8fafc;
        }
        .slab-ocr-staging-pair .staging-img-wrap img {
            object-fit: contain;
        }
        .slab-ocr-staging-pair .staging-remove-btn {
            opacity: 1;
        }
        .slab-ocr-staging-pair .staging-rotate-btn {
            width: auto;
            min-width: 30px;
            height: 30px;
            padding: 0 8px;
            border-radius: 7px;
            background: var(--bg-card);
        }
        .slab-ocr-add-back {
            width: 100%;
            height: 100%;
            border: 0;
            color: var(--accent);
            font: inherit;
            font-size: 11px;
            font-weight: 900;
            cursor: pointer;
        }
        .slab-ocr-pair-error {
            color: #b91c1c;
            font-size: 11px;
            font-weight: 750;
            line-height: 1.35;
        }
        .slab-ocr-status {
            min-height: 0;
            margin-top: 12px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 800;
        }
        .slab-ocr-status:empty { display: none; }
        .slab-ocr-status.error { color: #b91c1c; }
        .slab-ocr-status.success { color: #047857; }
        .slab-ocr-progress { margin-top: 12px; }
        .slab-panel-header,
        .slab-results-header {
            display: flex;
            justify-content: space-between;
            gap: 14px;
            align-items: flex-start;
            margin-bottom: 14px;
        }
        .slab-panel-header h2,
        .slab-results-header h2 {
            margin: 0 0 4px;
            font-size: 17px;
            line-height: 1.2;
            color: var(--text-primary);
        }
        .slab-panel-header p,
        .slab-results-header p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.4;
        }
        .slab-token-status,
        .slab-csv-status,
        .slab-count {
            white-space: nowrap;
            font-size: 12px;
            font-weight: 800;
            color: var(--accent);
            background: rgba(3, 83, 164, 0.08);
            border: 1px solid rgba(3, 83, 164, 0.12);
            border-radius: 99px;
            padding: 5px 10px;
        }
        .slab-token-status.error {
            color: #b91c1c;
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.16);
        }
        .slab-csv-status.error {
            color: #b91c1c;
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.16);
        }
        .slab-field {
            display: grid;
            gap: 7px;
            font-size: 12px;
            font-weight: 800;
            color: var(--text-secondary);
        }
        .slab-input,
        .slab-textarea {
            width: 100%;
            border: 1px solid var(--border);
            background: var(--bg-input);
            color: var(--text-primary);
            border-radius: 8px;
            padding: 10px 12px;
            font: inherit;
            color-scheme: light;
        }
        .slab-input:focus,
        .slab-textarea:focus {
            outline: none;
            border-color: var(--border-focus);
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(3, 83, 164, 0.08);
        }
        .slab-textarea {
            min-height: 158px;
            resize: vertical;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 13px;
            line-height: 1.45;
        }
        .slab-file-input { display: none; }
        .slab-csv-progress {
            display: grid;
            gap: 8px;
            margin-top: 14px;
            padding: 10px 12px;
            border: 1px solid rgba(3, 83, 164, 0.12);
            border-radius: 8px;
            background: rgba(3, 83, 164, 0.045);
        }
        .slab-csv-progress[hidden] { display: none !important; }
        .slab-csv-progress-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 12px;
            font-weight: 800;
            color: var(--text-primary);
        }
        .slab-csv-progress-count {
            flex: 0 0 auto;
            color: var(--accent);
            font-variant-numeric: tabular-nums;
        }
        .slab-csv-progress-track {
            height: 10px;
            border-radius: 999px;
            background: rgba(3, 83, 164, 0.12);
            overflow: hidden;
        }
        .slab-csv-progress-track span {
            display: block;
            width: 0;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #0353a4, #10b981);
            transition: width 0.25s ease;
        }
        .slab-csv-progress-detail {
            min-height: 16px;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 700;
        }
        .slab-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            margin-top: 14px;
        }
        .slab-actions-primary { justify-content: space-between; }
        .slab-field-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }
        .slab-token-link {
            color: var(--accent);
            font-size: 12px;
            font-weight: 800;
            text-decoration: none;
        }
        .slab-token-link:hover { text-decoration: underline; }
        .slab-save-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 700;
        }
        .slab-results-list { display: grid; gap: 10px; }
        .slab-empty {
            border: 1px dashed var(--border-hover);
            border-radius: 10px;
            padding: 28px;
            text-align: center;
            color: var(--text-secondary);
            background: var(--bg-input);
            font-weight: 700;
        }
        .slab-result-row {
            display: grid;
            grid-template-columns: minmax(94px, 0.25fr) minmax(0, 1fr) minmax(92px, 0.2fr) minmax(96px, 0.2fr) 34px;
            gap: 12px;
            align-items: center;
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 12px;
            background: #ffffff;
        }
        .slab-result-row.error {
            border-color: rgba(239, 68, 68, 0.22);
            background: rgba(254, 242, 242, 0.8);
        }
        .slab-result-row.needs-review {
            border-color: rgba(217, 119, 6, 0.32);
            background: rgba(255, 251, 235, 0.72);
        }
        .slab-ocr-review-editor {
            grid-column: 1 / -1;
            display: grid;
            gap: 12px;
            min-width: 0;
            padding: 14px;
            border: 1px solid rgba(217, 119, 6, 0.24);
            border-radius: 9px;
            background: #ffffff;
        }
        .slab-ocr-review-header,
        .slab-ocr-review-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        .slab-ocr-review-header > div {
            display: grid;
            gap: 3px;
        }
        .slab-ocr-review-header strong {
            color: var(--text-primary);
            font-size: 13px;
        }
        .slab-ocr-review-header span,
        .slab-ocr-review-actions span,
        .slab-ocr-review-unknown {
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 700;
            line-height: 1.4;
        }
        .slab-ocr-review-header > span {
            flex: 0 0 auto;
            color: #92400e;
            font-weight: 900;
        }
        .slab-ocr-review-fields {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .slab-ocr-review-field {
            display: grid;
            gap: 5px;
            min-width: 0;
        }
        .slab-ocr-review-field > span {
            color: #92400e;
            font-size: 11px;
            font-weight: 900;
        }
        .slab-ocr-review-field input {
            width: 100%;
            min-width: 0;
            min-height: 38px;
            border: 1px solid rgba(217, 119, 6, 0.36);
            border-radius: 7px;
            background: #fffbeb;
            color: var(--text-primary);
            font: inherit;
            padding: 8px 10px;
        }
        .slab-ocr-review-field input:focus {
            outline: none;
            border-color: #d97706;
            box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
        }
        .slab-ocr-review-field input:disabled {
            cursor: not-allowed;
            opacity: 0.68;
        }
        .slab-ocr-review-actions {
            padding-top: 2px;
        }
        .slab-result-cert {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 13px;
            font-weight: 800;
            color: var(--text-primary);
        }
        .slab-result-title {
            min-width: 0;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1.35;
            overflow-wrap: anywhere;
            white-space: normal;
        }
        .slab-result-meta,
        .slab-result-pop {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 700;
        }
        .slab-result-grade {
            justify-self: start;
            color: #ffffff;
            background: var(--accent);
            border-radius: 999px;
            padding: 5px 10px;
            font-size: 12px;
            font-weight: 900;
            white-space: nowrap;
        }
        .slab-result-status {
            justify-self: end;
            font-size: 12px;
            font-weight: 800;
            color: #047857;
        }
        .slab-result-row.error .slab-result-status { color: #b91c1c; }
        .slab-result-remove {
            justify-self: end;
            width: 30px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(148, 163, 184, 0.34);
            border-radius: 999px;
            background: #ffffff;
            color: #64748b;
            font-size: 20px;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .slab-result-remove:hover {
            border-color: rgba(220, 38, 38, 0.28);
            background: rgba(254, 242, 242, 0.95);
            color: #b91c1c;
        }
        .slab-result-remove:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .lv-checkbox-wrap { display: flex; flex: 0 0 24px; align-items: center; justify-content: center; padding: 0 2px 0 0; }
        .lv-checkbox {
            width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent);
            border-radius: 4px; border: 2px solid var(--border);
        }

        .modal-nav-btn:hover { border-color: var(--accent); color: var(--text-primary); }
        .modal-nav-btn:disabled { opacity: 0.3; cursor: default; }
        .modal-section-label {
            font-size: 11px; font-weight: 700; text-transform: uppercase;
            color: var(--text-muted); letter-spacing: 0.5px;
            margin-bottom: 8px; padding: 0 2px;
        }
        .no-results {
            text-align: center; padding: 40px 20px; color: var(--text-muted);
        }
        .no-results-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.5; }

        @media (max-width: 1500px) {
            .batch-bar {
                grid-template-columns: minmax(0, 1fr);
                grid-template-areas:
                    "details"
                    "actions";
            }
            .batch-group.batch-actions {
                border-top: 1px solid rgba(148, 163, 184, 0.22);
                padding: 14px 0 0;
                min-width: 0;
                align-items: flex-start;
                justify-content: flex-start;
            }
            .batch-action-column {
                width: 100%;
                grid-template-columns: repeat(6, minmax(108px, 1fr));
                align-items: stretch;
            }
            .batch-action-column > .batch-btn,
            .batch-action-column > .batch-action-row,
            .batch-action-column > .batch-danger-zone {
                min-width: 0;
            }
            .batch-bar.batch-collapsed .batch-group-picker {
                grid-template-columns: auto minmax(220px, 1fr) minmax(0, 1fr);
            }
        }

        @media (max-width: 1100px) {
            .batch-action-column {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            body.slab-create-mode .create-batch-flow {
                grid-template-columns: 1fr;
            }
            body.slab-create-mode .create-batch-card,
            body.slab-create-mode .slab-create-import-slot {
                grid-column: 1;
            }
            body.slab-create-mode .create-batch-card {
                max-width: none;
            }
        }

        @media (max-width: 1380px) {
            body.slab-create-mode .slab-create-import-slot .slab-import-layout {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 900px) {
            .modal-results-grid { grid-template-columns: repeat(2, 1fr); }
            .slab-import-layout {
                grid-template-columns: 1fr;
            }
            .slab-import-layout.slab-import-layout-two {
                grid-template-columns: 1fr;
            }
            .slab-provider-picker {
                grid-template-columns: 1fr;
            }
            .slab-ocr-staging-toolbar,
            .slab-ocr-staging-actions {
                align-items: stretch;
                flex-direction: column;
            }
            .slab-ocr-staging-actions .btn {
                width: 100%;
            }
            .slab-result-row {
                grid-template-columns: 1fr;
                gap: 7px;
            }
            .slab-result-title {
                white-space: normal;
            }
            .slab-result-status {
                justify-self: start;
            }
            .slab-ocr-review-fields {
                grid-template-columns: 1fr;
            }
            .slab-ocr-review-header,
            .slab-ocr-review-actions {
                align-items: flex-start;
                flex-direction: column;
            }
            .slab-result-remove {
                justify-self: start;
            }
            .list-view-row {
                grid-template-columns: 24px var(--lv-thumb-column-width) minmax(0, 1fr);
            }
            .lv-side-rail {
                grid-column: 3;
                width: 100%;
                grid-template-columns: minmax(0, 1fr) 26px;
                align-self: start;
                align-items: start;
            }
            .lv-affiliate-stack {
                width: 100%;
                flex: 1 1 auto;
                flex-direction: row;
                flex-wrap: wrap;
                align-self: start;
            }
            .lv-affiliate-btn {
                flex: 1 1 86px;
                min-width: 0;
            }
            .list-view-row.graded-row .lv-title-row,
            body.listing-flow-slabs .graded-row .lv-title-row {
                grid-template-columns: minmax(0, 1fr) 44px;
            }
            .list-view-row.graded-row .lv-affiliate-stack,
            body.listing-flow-slabs .graded-row .lv-affiliate-stack {
                flex-direction: row;
                width: 100%;
                flex-basis: auto;
            }
            .list-view-row.graded-row .lv-affiliate-btn,
            body.listing-flow-slabs .graded-row .lv-affiliate-btn {
                flex: 1 1 86px;
            }
            .list-view-row.graded-row,
            body.listing-flow-slabs .list-view-row.graded-row {
                grid-template-columns: 24px 146px minmax(0, 1fr);
            }
            .list-view-row.graded-row .lv-side-rail,
            body.listing-flow-slabs .graded-row .lv-side-rail {
                grid-column: 3;
            }
            .list-view-row.graded-row .lv-fields-row,
            body.listing-flow-slabs .graded-row .lv-fields-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .list-view-row.graded-row .lv-field-cert,
            body.listing-flow-slabs .graded-row .lv-field-cert {
                max-width: none;
            }
            .batch-bar {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "picker"
                    "details"
                    "actions";
            }
            .batch-group {
                border-right: 0;
                border-bottom: 1px solid rgba(148, 163, 184, 0.22);
                padding-right: 0;
                padding-bottom: 14px;
            }
            .batch-group.batch-actions {
                border-top: 0;
                padding-top: 0;
            }
            .batch-group-details .batch-group-controls {
                grid-template-columns: 1fr;
            }
            .batch-group:last-child {
                border-bottom: 0;
                padding-bottom: 0;
            }
            .batch-bar.batch-collapsed {
                display: block;
                padding: 0.75rem;
            }
            .batch-bar.batch-collapsed .batch-group-picker {
                display: grid;
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .batch-bar.batch-collapsed .batch-group.batch-actions {
                min-width: 0;
                flex: 0 1 auto;
                margin-top: 8px;
            }
            body.batch-info-collapsed #batchBar .batch-group.batch-actions {
                min-width: 0;
                flex: 0 1 auto;
                margin-top: 8px;
            }
            .batch-bar.batch-collapsed .batch-group.batch-actions .batch-action-column {
                grid-template-columns: 1fr;
            }
            body.batch-info-collapsed #batchBar .batch-group.batch-actions .batch-action-column {
                grid-template-columns: 1fr;
            }
            .batch-bar.batch-collapsed .batch-workflow-row,
            .batch-bar.batch-collapsed .batch-btn.export-primary {
                grid-column: auto;
                grid-row: auto;
            }
            body.batch-info-collapsed #batchBar .batch-workflow-row,
            body.batch-info-collapsed #batchBar .batch-btn.export-primary {
                grid-column: auto;
                grid-row: auto;
            }
            .batch-action-column.batch-danger-actions {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .batch-action-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .batch-bar.batch-collapsed .batch-picker-heading {
                justify-content: space-between;
            }
            .batch-bar.batch-collapsed .batch-active-line {
                flex-wrap: wrap;
            }
        }

        @media (max-width: 700px) {
            .list-view-row,
            .list-view-row.graded-row,
            body.listing-flow-slabs .list-view-row.graded-row {
                grid-template-columns: 24px minmax(0, 1fr);
            }
            .lv-thumbs,
            .list-view-row.graded-row .lv-thumbs,
            body.listing-flow-slabs .graded-row .lv-thumbs {
                grid-column: 2;
            }
            .lv-info,
            .list-view-row.graded-row .lv-info,
            body.listing-flow-slabs .graded-row .lv-info {
                grid-column: 1 / -1;
                min-height: 0;
            }
            .lv-side-rail,
            .list-view-row.graded-row .lv-side-rail,
            body.listing-flow-slabs .graded-row .lv-side-rail {
                grid-column: 1 / -1;
                grid-template-columns: minmax(0, 1fr) 26px;
            }
            .lv-fields-row,
            .list-view-row.graded-row .lv-fields-row,
            body.listing-flow-slabs .graded-row .lv-fields-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .lv-combined-manifest {
                grid-column: 1 / -1;
                grid-template-columns: 1fr;
            }
            .lv-field-variant,
            .lv-field-category,
            .lv-field-business-policy,
            .lv-field-sku {
                max-width: none;
            }
        }

        @media (max-width: 700px) { .card-comparison { grid-template-columns: 1fr; } .modal-top { grid-template-columns: 1fr; }
            body.batch-info-topbar-collapsed .bulk-edit-bar {
                position: static;
            }
            .topbar {
                position: static;
                align-items: stretch;
                border-radius: 14px;
                margin: 0 8px 10px;
                padding: 0.65rem;
                gap: 8px;
            }
            .topbar.listing-topbar {
                position: static;
                align-items: stretch;
                border-radius: 8px;
                margin: 0 0 10px;
                padding: 0.65rem;
                gap: 8px;
            }
            .topbar-left {
                align-items: stretch;
                flex-direction: column;
                gap: 8px;
                min-width: 0;
            }
            .topbar-nav {
                max-width: 100%;
                overflow-x: auto;
                padding-bottom: 2px;
            }
            .topbar-nav a {
                white-space: nowrap;
            }
            .topbar .topbar-right {
                justify-content: center;
                gap: 4px 8px;
            }
            .topbar.listing-topbar .topbar-right {
                justify-content: center;
                gap: 6px 8px;
                flex-wrap: wrap;
            }
            .topbar-batch-chip {
                width: auto;
                max-width: 100%;
                flex-wrap: wrap;
                border-radius: 0;
                padding: 0;
            }
            .topbar-batch-title-field {
                flex-basis: 100%;
                max-width: none;
            }
            .topbar-sku-group,
            .topbar-action-group {
                max-width: 100%;
            }
            .topbar-batch-sku-field {
                flex: 0 0 168px;
            }
            .fields-grid { grid-template-columns: 1fr; }
            .modal-results-grid { grid-template-columns: 1fr; }
            .staging-header { align-items: flex-start; flex-direction: column; }
            .create-upload-header {
                display: grid;
                grid-template-columns: minmax(0, 1fr);
            }
            .create-upload-mode-control {
                width: 100%;
            }
            .matching-settings-head,
            .matching-reprint-row {
                align-items: stretch;
                flex-direction: column;
            }
            .matching-settings-actions {
                justify-content: space-between;
                width: 100%;
            }
            .matching-rule-grid {
                grid-template-columns: minmax(0, 1fr);
            }
            .matching-set-picker {
                grid-template-columns: minmax(0, 1fr);
            }
            .matching-set-add {
                justify-self: stretch;
            }
            .create-upload-card .staging-header { grid-template-columns: 1fr; }
            .staging-actions { justify-content: flex-start; align-items: stretch; }
            .staging-count-pill { width: 100%; margin-right: 0; padding: 0; }
            .staging-control-btn,
            .staging-scan-btn { flex: 1 1 160px; }
            .scan-job-row { grid-template-columns: minmax(0, 1fr) 34px; }
            #batchSelector, .batch-name-input { width: 100%; max-width: none; }
            .batch-picker-controls { grid-template-columns: minmax(0, 1fr) 40px; width: 100%; }
            .batch-inline-controls { flex-basis: 100%; }
            .batch-detail-field, .sku-prefix-field { flex-basis: 100%; width: 100%; }
            .batch-field { width: 100%; justify-content: flex-end; }
            .batch-field .batch-selector { flex: 1; min-width: 0; }
            .batch-action-row { grid-template-columns: 1fr; }
            .batch-action-column.batch-danger-actions { grid-template-columns: 1fr; }
            .scan-mode { width: 100%; }
            .scan-mode-btn { flex: 1; }
            .listing-toolbar-controls,
            .listing-sort-menu,
            .listing-sort-button { width: 100%; }
            .listing-sort-panel { left: 0; right: 0; width: 100%; }
        }

        /* Create Listing Batch workspace refinement */
        body.batch-create-mode .main {
            max-width: 1760px;
            margin: 0;
            padding-inline: 0;
        }
        body.batch-create-mode .topbar.listing-topbar {
            display: none;
        }
        body.batch-create-mode .create-batch-flow {
            max-width: 1560px;
            margin: 14px 0 32px;
            padding: 0 var(--throne-page-inline);
            grid-template-columns: minmax(410px, 0.9fr) minmax(540px, 1.15fr);
            gap: 20px;
            background: transparent;
            box-shadow: none;
        }
        .create-batch-overview {
            grid-column: 1 / -1;
            gap: 12px;
            padding: 16px 22px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--surface);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
        }
        .create-batch-title-row,
        .create-card-heading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            min-width: 0;
        }
        .create-batch-title-row h1 {
            min-width: 0;
            font-size: clamp(28px, 2.1vw, 32px);
            letter-spacing: -0.025em;
        }
        .create-batch-title-row {
            min-height: auto;
            padding: 0 0 12px 0;
            border-bottom: 0 !important;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        body.slab-create-mode .create-batch-title-row {
            padding-bottom: 0 !important;
        }
        .create-batch-deck:empty {
            display: none !important;
        }

        .create-daily-stat {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 800;
        }
        .create-daily-stat strong {
            color: #0a9f66;
        }
        .create-daily-stat[hidden] {
            display: none;
        }
        .create-batch-steps {
            grid-template-columns: max-content minmax(72px, 1fr) max-content minmax(72px, 1fr) max-content;
            gap: 14px;
            align-items: center;
            min-height: 68px;
            padding: 0 22px;
        }
        .create-batch-step {
            min-height: 68px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }
        .create-batch-step.is-active {
            border-color: transparent;
            background: transparent;
        }
        .create-step-number {
            width: 28px;
            height: 28px;
            font-size: 12px;
        }
        .create-step-separator {
            height: 2px;
            overflow: hidden;
            color: transparent;
            background: var(--border);
            border-radius: 999px;
        }
        #createStepSetup + .create-step-separator {
            background: var(--border);
        }
        #createStepSetup.is-complete + .create-step-separator {
            background: var(--accent);
        }
        .create-step-title {
            font-size: 12px;
            font-weight: 700;
        }
        .create-batch-step .create-step-copy {
            display: none;
        }
        .create-batch-card {
            background: transparent !important;
            border: 0 !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .create-batch-card .create-card-heading {
            display: none;
        }
        .create-batch-grid {
            display: flex !important;
            flex-direction: column !important;
            gap: 16px !important;
        }
        .create-batch-deck {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
            padding: 18px 20px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px 14px;
        }
        .create-batch-deck .create-section-heading {
            grid-column: 1 / -1;
            display: block;
            font-size: 0.76rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            color: var(--accent);
            margin: 0 0 2px 0 !important;
            padding: 0 !important;
            border: 0 !important;
            text-transform: uppercase;
        }
        .create-batch-deck .create-section-heading::before,
        .create-batch-deck .create-section-heading::after {
            display: none !important;
            content: none !important;
        }
        .create-batch-deck .create-card-defaults-heading,
        .create-batch-deck .create-scan-speed-heading {
            margin-top: 0 !important;
            padding-top: 0 !important;
            border-top: 0 !important;
        }
        .create-batch-deck .create-cost-basis-heading {
            display: none !important;
        }
        .create-batch-deck .sku-preview-field {
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
        }
        .create-batch-grid .sku-field-row {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
            gap: 12px;
        }
        .create-batch-deck .batch-detail-field.batch-name-field,
        .create-batch-deck .sku-field-row,
        .create-batch-deck .sku-preview-field,
        .create-batch-deck .create-cost-basis-heading,
        .create-batch-deck .create-cost-basis-preview,
        .create-batch-deck .batch-field-variation-title,
        .create-batch-deck .batch-field-variation-specifics,
        .create-batch-deck .batch-field-fast-scan,
        .create-batch-deck .batch-match-tuning {
            grid-column: 1 / -1;
        }
        .create-upload-card {
            background: var(--surface) !important;
            border: 1px solid var(--border) !important;
            border-radius: 14px !important;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
            padding: 22px 26px !important;
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-self: start;
        }
        .create-card-heading > div,
        .create-upload-header > div:first-child {
            min-width: 0;
        }
        .create-batch-card h2,
        .create-upload-card h2 {
            font-size: 19px;
            letter-spacing: -0.015em;
        }
        .create-section-heading {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--accent);
            font-size: 0.7rem;
            letter-spacing: 0.075em;
        }
        .create-section-heading::after {
            display: none !important;
            content: none !important;
        }
        .create-card-defaults-heading,
        .create-scan-speed-heading {
            margin-top: 0 !important;
            padding-top: 0 !important;
            border-top: 0 !important;
        }
        .create-batch-grid .batch-name-input,
        .create-batch-grid .variation-metadata-input,
        .create-batch-grid .sku-prefix-field input,
        .create-batch-grid .sku-start-number,
        .create-batch-grid .sku-increment-control,
        .create-batch-grid .batch-selector,
        .create-batch-grid .smooth-select-proxy {
            height: 44px;
            border-radius: 8px;
        }
        .create-batch-grid .batch-field select.batch-selector,
        .create-batch-grid .batch-field .smooth-select-proxy,
        .create-batch-grid .smooth-select-proxy.compact .smooth-select-trigger {
            border-radius: 8px !important;
        }
        .create-batch-grid .smooth-select-trigger {
            height: 44px;
            padding: 0 12px;
            border-color: var(--border);
            background: var(--bg-input);
            box-shadow: none;
        }
        .create-batch-grid .smooth-select-trigger:hover,
        .create-batch-grid .smooth-select-proxy.is-open .smooth-select-trigger {
            border-color: rgba(3, 83, 164, 0.45);
            background: var(--bg-card);
        }
        .create-batch-grid .smooth-select-panel {
            padding: 6px;
            border-radius: 10px;
            border-color: rgba(148, 163, 184, 0.4);
            box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
        }
        .create-batch-grid .smooth-select-option {
            min-height: 38px;
            padding: 9px 11px;
            border-radius: 7px;
        }
        .create-batch-grid .smooth-select-option:hover,
        .create-batch-grid .smooth-select-option:focus-visible {
            background: rgba(3, 83, 164, 0.07);
        }
        .create-batch-grid .smooth-select-option.is-selected {
            background: rgba(3, 83, 164, 0.11);
            color: var(--accent);
        }
        .create-batch-grid .smooth-select-search {
            padding: 4px 4px 7px;
            background: var(--bg-card);
        }
        .create-batch-grid .smooth-select-search-input {
            border-radius: 7px;
            background: var(--bg-input);
        }
        .sku-preview-field {
            padding-bottom: 2px;
            border-bottom: 0;
        }
        .sku-preview-value {
            min-height: 36px;
            padding: 9px 11px;
            border: 1px solid rgba(3, 83, 164, 0.08);
            border-radius: 7px;
        }
        .batch-field-fast-scan {
            max-width: 100%;
        }
        .fast-scan-control {
            max-width: 260px;
            min-height: 44px;
            padding: 7px 10px;
            border: 0;
            background: transparent;
        }
        .fast-scan-control-text {
            grid-template-columns: auto;
        }
        .batch-match-tuning {
            gap: 12px;
            padding-top: 0;
            border-top: 0;
        }
        .matching-settings-overview {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            min-width: 0;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-input);
            color: inherit;
            font: inherit;
            text-align: left;
            cursor: pointer;
            list-style: none;
        }
        .matching-settings-overview::-webkit-details-marker {
            display: none;
        }
        .matching-settings-overview:hover {
            border-color: rgba(3, 83, 164, 0.32);
            background: rgba(3, 83, 164, 0.045);
        }
        .matching-settings-overview-icon {
            color: var(--accent);
            font-size: 22px;
        }
        .matching-settings-overview > div {
            min-width: 0;
        }
        .matching-settings-disclosure-icon {
            margin-left: auto;
            color: var(--text-muted);
            transition: transform 0.18s ease;
        }
        .batch-match-tuning[open] .matching-settings-disclosure-icon {
            transform: rotate(90deg);
        }
        .matching-settings-details {
            display: grid;
            gap: 12px;
        }
        .batch-match-tuning:not([open]) > .matching-settings-details {
            display: none;
        }
        .matching-settings-head,
        .matching-reprint-row {
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-card);
        }
        .matching-reprint-row {
            background: var(--bg-input);
        }
        .matching-tuning-body {
            padding: 2px 0 0;
        }
        .matching-rule-group {
            border-radius: 9px;
            background: var(--bg-card);
        }
        .create-upload-header {
            align-items: center;
        }
        .create-upload-mode-control {
            width: min(270px, 100%);
        }
        .create-upload-mode-control .scan-mode {
            height: 42px;
            padding: 3px;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: var(--bg-card);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
        }
        .create-upload-mode-control .scan-mode-btn {
            border-radius: 999px;
        }
        .create-upload-summary {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
            min-height: 54px;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: 9px;
            background: var(--bg-card);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 850;
            overflow-x: auto;
        }
        .create-upload-summary > span:not(.create-upload-summary-separator) {
            flex: 0 0 auto;
        }
        .create-upload-summary-icon {
            color: var(--accent);
            font-size: 20px;
        }
        .create-upload-summary-separator {
            color: var(--text-muted);
            opacity: 0.75;
        }
        .create-upload-card .empty-state {
            min-height: 390px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 38px 28px 24px;
            border: 2px dashed rgba(3, 83, 164, 0.3);
            border-radius: 12px;
            background: var(--bg-card);
            box-shadow: none;
        }
        .create-upload-card .empty-state:hover {
            border-color: rgba(3, 83, 164, 0.58);
            background: rgba(3, 83, 164, 0.025);
            transform: none;
            box-shadow: none;
        }
        .create-upload-card .empty-state-icon {
            width: 52px;
            height: 52px;
            margin-bottom: 16px;
            opacity: 1;
        }
        .create-upload-card .empty-state h3 {
            margin: 0 0 6px;
            font-size: 23px;
        }
        .create-upload-card .empty-state p {
            margin: 0;
            font-size: 14px;
        }
        .create-upload-card .upload-limit-hint {
            margin-top: 10px;
            font-size: 11px;
        }
        .create-upload-summary [hidden] {
            display: none;
        }
        .create-upload-format-row {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            margin-top: auto;
            padding-top: 24px;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 750;
        }
        .create-upload-card .staging-state {
            padding: 16px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-input);
        }
        .create-upload-card .staging-item-pair {
            gap: 8px;
            padding: 8px;
            border-radius: 10px;
            box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
        }
        .create-upload-card .staging-side-label {
            align-self: flex-start;
            margin: 2px 0 6px;
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .create-upload-card .staging-rotate-btn {
            width: auto;
            min-width: 30px;
            height: 30px;
            padding: 0 8px;
            border-radius: 7px;
            background: var(--bg-card);
        }
        .create-upload-card .staging-rotate-btn:hover {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }
        body.listing-flow-stock .create-upload-summary {
            display: none;
        }
        @media (max-width: 1180px) {
            body.batch-create-mode .create-batch-flow {
                grid-template-columns: minmax(0, 1fr);
            }
            .create-batch-overview,
            .create-batch-card,
            .create-upload-card,
            .slab-create-import-slot,
            .stock-list-card {
                grid-column: 1;
            }
            .create-batch-card {
                border-right: 0;
                border-bottom: 1px solid var(--border);
            }
        }
        @media (max-width: 720px) {
            .slab-provider-picker {
                grid-template-columns: 1fr;
                align-items: start;
            }
            .slab-provider-picker p {
                margin: 0;
            }
            .create-batch-card,
            .create-upload-card {
                padding: 16px;
            }
            .create-batch-overview {
                padding: 0;
            }
            .create-batch-title-row {
                min-height: 60px;
                padding: 12px 16px;
            }
            .create-batch-steps {
                grid-template-columns: minmax(0, 1fr);
                gap: 4px;
                min-height: 0;
                padding: 8px 16px 12px;
            }
            .create-step-separator {
                display: none;
            }
            .create-batch-step {
                min-height: 38px;
                padding: 4px 0;
            }
            .create-upload-summary {
                gap: 9px;
            }
            .create-upload-card .empty-state {
                min-height: 370px;
                padding: 34px 18px 20px;
            }
            .create-upload-format-row {
                flex-wrap: wrap;
                justify-content: center;
                text-align: center;
            }
        }
