body.batch-create-mode #createBatchFlow {
    grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
    gap: 24px;
    max-width: 1560px;
    padding: 0 24px;
}

#createBatchFlow .create-batch-overview {
    padding: 12px 0 4px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#createBatchFlow .create-batch-title-row { padding: 0; }
#createBatchFlow .create-batch-steps { display: none; }
.list-cards-mode { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.list-cards-mode > span { color: var(--text-secondary); font-size: 13px; white-space: nowrap; }
.list-cards-mode select, .list-cards-mode .smooth-select-proxy { width: 210px; max-width: 100%; }

#createBatchFlow .create-batch-card {
    padding: 24px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
}

#createBatchFlow .create-batch-grid { gap: 24px !important; }
#createBatchFlow .create-batch-deck { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; gap: 20px; }
#createDeckIdentity, #createDeckDefaults { padding-bottom: 24px !important; border-bottom: 1px solid var(--border) !important; }
#createBatchFlow .create-section-heading { display: none; }
#createBatchFlow .sku-preview-field { border-bottom: 0; padding-bottom: 0; }
#createBatchFlow .batch-detail-label, #createBatchFlow .scan-mode-label { text-transform: none; letter-spacing: normal; color: var(--text-secondary); font-size: 12px; }
#createBatchFlow .create-upload-card { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; gap: 0; min-width: 0; align-self: start; }
.list-cards-upload-panel { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
#createBatchFlow .create-upload-header { justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
#createBatchFlow .create-upload-header h2, #createBatchFlow .create-upload-mode-control > .scan-mode-label { display: none; }
#createBatchFlow .create-upload-mode-control { width: 250px; max-width: 100%; flex-shrink: 0; margin-left: auto; }
#createBatchFlow .create-upload-mode-control .scan-mode { border-radius: 10px; background: var(--bg-input); box-shadow: none; }
#createBatchFlow .create-upload-mode-control .scan-mode-btn { border-radius: 7px; }
#createBatchFlow .create-upload-summary { border: 0; min-height: 0; padding: 0; flex-wrap: wrap; gap: 8px; font-weight: 500; overflow: visible; background: transparent; border-radius: 0; line-height: 1.4; }
#createBatchFlow #emptyState { min-height: 280px; padding: 48px 24px 56px; border-radius: 12px; }
#createBatchFlow .empty-state-icon { margin-bottom: 14px; }
#createBatchFlow .empty-state-icon svg { width: 44px; height: 44px; }
#createBatchFlow #emptyUploadTitle { font-size: 23px; }
#createBatchFlow .staging-state { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
#createBatchFlow .create-upload-header { margin: 0 0 18px; }
#createBatchFlow .create-upload-card:has(.scan-ready) .create-upload-header { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
#createBatchFlow .staging-header { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0 0 18px; }
#createBatchFlow .staging-copy h2, #createBatchFlow #stagingReviewCopy { display: none; }
#createBatchFlow .staging-copy:has(.upload-limit-line[hidden]) { display: none; }
#createBatchFlow .upload-limit-line { margin: 0; padding: 8px 12px; font-size: 12px; }
#createBatchFlow .staging-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-cards-photo-count { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
#createBatchFlow .staging-count-pill { padding: 0; background: none; font-size: 17px; }
#stagingPhotoCount { color: var(--text-muted); font-size: 12px; }
#createBatchFlow .staging-actions .btn { min-height: 38px; padding: 8px 10px; box-shadow: none; font-size: 12px; }
#createBatchFlow .staging-grid { gap: 18px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 1px 8px 2px 1px; align-content: start; }
#createBatchFlow .staging-grid.dual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#createBatchFlow .staging-grid.single { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
#createBatchFlow .staging-item-pair { display: block; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.staging-pair-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.staging-pair-sku { overflow-wrap: anywhere; color: var(--text-primary); font-size: 15px; }
.staging-pair-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.single .staging-pair-images { grid-template-columns: minmax(0, 1fr); }
#createBatchFlow .staging-img-col { min-width: 0; }
.staging-side-bar { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; margin-bottom: 6px; }
#createBatchFlow .staging-side-label { font-size: 12px; text-transform: none; color: var(--text-secondary); margin: 0; align-self: center; letter-spacing: normal; line-height: 1.4; font-weight: 600; }
#createBatchFlow .staging-img-wrap { display: block; min-height: 0; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); cursor: zoom-in; }
#createBatchFlow .staging-img-wrap:hover { border-color: var(--accent); }
#createBatchFlow .staging-img-wrap img { display: block; object-fit: contain; width: 100%; height: 100%; }
#createBatchFlow .staging-rotate-btn { display: inline-flex; align-items: center; width: 32px; min-width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 8px; margin: 0; justify-content: center; color: var(--accent); background: var(--surface); }
#createBatchFlow .staging-remove-btn { position: static; opacity: 1; flex-shrink: 0; width: 28px; height: 28px; color: var(--danger, #dc2626); background: transparent; border: 0; border-radius: 6px; box-shadow: none; font-size: 25px; font-weight: 400; line-height: 1; }
#createBatchFlow .staging-remove-btn:hover { background: rgba(220, 38, 38, 0.1); }
.list-cards-action-bar { display: flex; justify-content: flex-end; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--border); background: var(--surface); }
body.batch-create-mode .list-cards-action-bar { position: fixed; bottom: 0; left: var(--throne-sidebar-width, 248px); right: 0; z-index: 50; }
body.batch-create-mode:has(.scan-ready) #createBatchFlow { padding-bottom: 110px; }
body.throne-sidebar-collapsed .list-cards-action-bar { left: var(--throne-sidebar-collapsed-width, 64px); }
#createBatchFlow .list-cards-action-bar .staging-action-btn { min-width: 170px; min-height: 44px; margin: 0; }
#createBatchFlow .toggle { appearance: none; border: 0; padding: 0; min-height: 28px; box-shadow: none; }
#createBatchFlow .toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#createBatchFlow .smooth-select-trigger { min-height: 44px; height: auto; }
#createBatchFlow .smooth-select-trigger-text { line-height: 1.5; padding-block: 2px; }
#createBatchFlow .staging-scan-btn.scan-ready:not(:disabled):not([aria-busy="true"]) { animation: listCardsReadyGlow 1.4s ease-in-out infinite; }
#createBatchFlow .staging-scan-btn:disabled, #createBatchFlow .staging-scan-btn[aria-busy="true"] { animation: none; transform: none; box-shadow: none; }
@keyframes listCardsReadyGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(3, 83, 164, .22); }
    50% { box-shadow: 0 0 0 5px rgba(3, 83, 164, .14), 0 12px 28px rgba(3, 83, 164, .32); }
}
@keyframes listCardsReadyGlowReduced {
    0%, 100% { box-shadow: 0 8px 20px rgba(3, 83, 164, .18); }
    50% { box-shadow: 0 0 0 3px rgba(3, 83, 164, .1), 0 10px 24px rgba(3, 83, 164, .27); }
}
#createBatchFlow .matching-settings-head, #createBatchFlow .matching-reprint-row { padding: 12px; }
#createBatchFlow .matching-settings-actions { flex-wrap: wrap; }
#createBatchFlow .matching-settings-head .toggle, #createBatchFlow .matching-reprint-row .toggle { flex-shrink: 0; }
#createBatchFlow .matching-rule-grid { grid-template-columns: 1fr; }
#slabCreateImportSlot { min-width: 0; }
#slabCreateImportSlot .slab-import-layout { display: flex; flex-direction: column; gap: 18px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
#slabCreateImportSlot .slab-provider-picker { padding: 0; border: 0; background: transparent; display: block; }
#slabCreateImportSlot .slab-provider-picker .slab-field { width: 230px; max-width: 100%; }
#slabCreateImportSlot #slabProviderHelp { display: none; }
#slabCreateImportSlot .slab-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
#slabCreateImportSlot .slab-panel-photo > .slab-panel-header { display: none; }
#slabCreateImportSlot .slab-photo-dropzone { min-height: 280px; }
.list-cards-slab-tabs { display: inline-flex; width: fit-content; max-width: 100%; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); }
.list-cards-slab-tabs button { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 9px 16px; color: var(--text-secondary); background: transparent; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 650; line-height: 1.35; text-align: center; cursor: pointer; }
.list-cards-slab-tabs button:hover { color: var(--text-primary); background: var(--bg-card); }
.list-cards-slab-tabs button[aria-selected="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.list-cards-slab-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#slabImportLayout[data-source="photos"] > :is(#psaSlabImportPanel, #cgcSlabImportPanel),
#slabImportLayout[data-source="import"] > #slabOcrPanel { display: none; }

@media (max-width: 1100px) {
    body.batch-create-mode #createBatchFlow { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
    #createBatchFlow > * { grid-column: 1 !important; grid-row: auto !important; }
}

@media (max-width: 600px) {
    #createBatchFlow .create-batch-title-row { align-items: flex-start; flex-wrap: wrap; }
    .list-cards-mode { width: 100%; margin: 0; justify-content: space-between; }
    #createBatchFlow .create-batch-card, #slabCreateImportSlot .slab-import-layout { padding: 16px !important; }
    #createBatchFlow .create-batch-deck { grid-template-columns: minmax(0, 1fr); }
    #createBatchFlow .create-batch-deck > * { grid-column: 1; }
    #createBatchFlow .staging-action-btn { width: 100%; margin-left: 0; }
    #createBatchFlow .matching-settings-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    #createBatchFlow .staging-scan-btn.scan-ready:not(:disabled):not([aria-busy="true"]) { animation: listCardsReadyGlowReduced 2.8s ease-in-out infinite; }
}



#createBatchFlow [hidden] { display: none !important; }
#slabCreateImportSlot .slab-provider-picker { box-shadow: none; }

.list-cards-icon { width: 20px; height: 20px; flex: 0 0 auto; }
#createBatchFlow #flipStagedBtn, #createBatchFlow #slabOcrSwapBtn { color: var(--accent); }

.list-cards-photo-dialog { margin: auto; inset: 0; position: fixed; width: min(960px, calc(100vw - 32px)); max-width: 960px; max-height: 92dvh; padding: 22px; border: 1px solid var(--border); border-radius: 14px; color: var(--text-primary); background: var(--surface); box-shadow: 0 20px 70px #0004; }
.list-cards-photo-dialog::backdrop { background: #0f172a99; }
.list-cards-photo-dialog header, .list-cards-photo-dialog nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-cards-photo-dialog header { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; }
.list-cards-photo-dialog h2 { margin: 0; font-size: 20px; }
.list-cards-photo-dialog button { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--text-primary); background: var(--surface); cursor: pointer; }
.list-cards-photo-dialog button:disabled { opacity: .4; cursor: default; }
.list-cards-photo-dialog [data-close] { font-size: 25px; line-height: 1; }
.list-cards-large-pair { display: flex; justify-content: center; gap: 20px; }
.list-cards-large-pair figure { margin: 0; flex: 1; min-width: 0; max-width: 430px; }
.list-cards-large-pair figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--text-secondary); font-weight: 600; }
.list-cards-photo-dialog .list-cards-preview-rotate { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 36px; height: 36px; color: var(--accent); }
.list-cards-large-pair img, .list-cards-large-pair figure > p { display: block; width: 100%; height: min(58dvh, 550px); object-fit: contain; background: var(--bg-input); padding: 10px; border-radius: 8px; }
.list-cards-photo-dialog nav { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 1024px) {
    body.batch-create-mode .list-cards-action-bar { left: 0; padding: 14px 16px; }
}
@media (max-width: 540px) {
    #createBatchFlow .staging-grid.dual { grid-template-columns: minmax(0, 1fr); }
    .list-cards-photo-count { width: 100%; }
    .list-cards-photo-dialog { padding: 14px; }
    .list-cards-large-pair { gap: 10px; }
    .list-cards-large-pair img { height: 45dvh; padding: 5px; }
    .list-cards-photo-dialog nav { font-size: 12px; }
}
