:root{font-family:Segoe UI,Arial,sans-serif;color:#19212b;background:#f4f6f8;line-height:1.45}
*{box-sizing:border-box}
body{margin:0}
header{background:#132238;color:#fff;padding:14px 5vw;display:flex;align-items:center;gap:32px}
header a{color:#dbe8f6;text-decoration:none;margin-right:18px}
main{max-width:1600px;margin:30px auto;padding:0 22px}
h1,h2{margin-top:0}
h1{font-size:2rem}
.hero{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:22px}
.panel{margin:18px 0;overflow-x:auto}
.compact{padding:12px 16px}
.compact h2{font-size:1.05rem;margin-bottom:4px}
.compact p{margin:4px 0}
table{width:100%;border-collapse:collapse;font-size:.92rem}
th,td{text-align:left;padding:10px 8px;border-bottom:1px solid #e8edf1;vertical-align:top}
th{color:#526274;font-weight:600}
.sort-button{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.sort-button:hover,.sort-button:focus{color:#175b9a;text-decoration:underline}
.sort-indicator{color:#175b9a;font-size:.8em}
.actions{display:flex;gap:12px;align-items:center}
.actions form{margin:0}
.duplicate-tag{background:#fff0c7;color:#735500}
.muted{color:#687686}
.economics,.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.economics div{background:#f8fafc;padding:12px;border-radius:6px;color:#596777}
.economics strong{display:block;color:#172331;font-size:1.15rem}
label{display:block;font-weight:600;margin:12px 0;color:#3e4b58}
.detail-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}
@media(max-width:720px){.hero{display:block}
.hero .button{margin-top:10px}
.detail-grid{grid-template-columns:1fr}
header{padding-left:22px}}

/* CardGremlin brand mark */
header{flex-wrap:wrap;gap:12px 24px}
@media(max-width:720px){header{padding-left:22px}}

.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px 16px;align-items:end}
.filter-grid label{margin:0}
.filter-grid input,.filter-grid select{max-width:none}
.filter-grid .button{align-self:end}
.duplicate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin:14px 0}
.duplicate-card{border:1px solid #dce2e8;border-radius:8px;padding:14px;background:#f8fafc}
.duplicate-card h3{margin-top:0;overflow-wrap:anywhere}
table a{white-space:nowrap}

.notice.warning{background:#fff0c7;border-left-color:#b57a00}
.draft-table{min-width:1450px}
.draft-table input{margin:0;min-width:170px}
.draft-table .small-input{min-width:88px;max-width:105px}
.draft-table .inline-check{min-width:0;width:20px;height:20px}
.draft-table+button{margin-top:16px}

.market-facts,.market-confidence{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem}
.market-facts div,.market-confidence div{padding:.75rem;background:#f7f7f2;border-radius:.5rem}
.market-facts dt,.market-confidence dt{color:#666;font-size:.85rem}
.market-facts dd,.market-confidence dd{margin:.25rem 0 0;font-weight:700}
.market-evidence details{margin-top:1rem}
.catalog-table{width:100%;border-collapse:collapse;display:block;overflow-x:auto}
.catalog-table th,.catalog-table td{padding:9px;border-bottom:1px solid #e4e8ee;text-align:left;vertical-align:top;min-width:105px}
.catalog-table small{display:block;color:#657083;font-size:.75rem;margin-top:4px}
.catalog-thumb{display:block;width:48px;height:66px;object-fit:contain;background:#f4f6f8;border-radius:4px}
.catalog-set-heading{display:flex;align-items:center;gap:14px}
.set-symbol{max-width:38px;max-height:38px;object-fit:contain}
.inline-label{white-space:nowrap}
.catalog-table label{display:inline}
.wait-message{color:#245b8f;font-weight:600;margin:.65rem 0}
.card-preview-wrap{position:relative;display:inline-block}
.card-preview-trigger{cursor:zoom-in}
.card-preview-popover{display:none;position:fixed;z-index:20;width:240px;padding:8px;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 8px 24px #1e293b44}
.card-preview-popover img{display:block;width:224px;max-height:320px;object-fit:contain}
.card-preview-wrap:hover .card-preview-popover,.card-preview-wrap.is-open .card-preview-popover{display:block}
.card-preview-close{display:block;margin-left:auto;margin-bottom:4px;border:0;background:#edf2f7;padding:3px 8px;border-radius:4px;cursor:pointer}
.catalog-thumb-missing{display:inline-block;width:48px;min-height:66px;padding-top:22px;color:#657083;font-size:.75rem;text-align:center}

input[type=hidden]{display:none}
input[type=checkbox]{display:inline-block;width:auto;max-width:none;margin:0 8px 0 0;padding:0;vertical-align:middle}
.migration-edit{border-top:1px solid #e4e8ee;padding:10px 0}
.migration-edit summary{cursor:pointer;font-weight:600;color:#2563a9}
.migration-edit form{padding:8px 0 14px}

.migration-next{border:2px solid #2563a9;background:#f8fbff;z-index:5}
.migration-next h2{font-size:.9rem;letter-spacing:.08em;color:#285a8d;margin-bottom:4px}
.next-action-label{font-size:1.3rem;font-weight:700;margin:4px 0 12px}
.migration-next .inline-check{display:inline-block;width:auto;min-width:18px;height:18px;vertical-align:middle;margin:0 6px 0 0}
@media(min-width:900px){.migration-next{position:sticky;top:8px;box-shadow:0 4px 16px #1322381f}}
@media(max-width:720px){.migration-next{position:static}}header nav{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
}

header nav a{
    padding:6px 0;
}

header nav a:hover,
header nav a:focus-visible{
    color:#fff;
    text-decoration:underline;
    text-underline-offset:4px;
}

.edit-panel{max-width:760px;margin-inline:auto}
.edit-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
.edit-fields label{display:flex;flex-direction:column;gap:5px;font-weight:600;min-width:0}
.edit-fields input{width:100%;box-sizing:border-box;font:inherit;padding:10px}
.edit-fields label:nth-child(1),
.edit-fields label:nth-child(4){
    grid-column:1/-1;
}
@media(max-width:640px){
    .edit-fields{grid-template-columns:minmax(0,1fr)}
    .edit-fields label:nth-child(1),
    .edit-fields label:nth-child(4){
        grid-column:auto;
    }
}
.inventory-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px 0}
.inventory-pager .is-disabled{opacity:.5;cursor:default}
.inventory-more summary{cursor:pointer;color:#2563a9;font-weight:600;white-space:nowrap}
.inventory-details{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:5px 10px;margin:10px 0 0;min-width:240px}
.inventory-details dt{font-size:.78rem;font-weight:700;color:#617080}
.inventory-details dd{margin:0;overflow-wrap:anywhere}

@media(max-width:720px){
    .inventory-search-form{grid-template-columns:1fr 1fr}
    .inventory-search-form label{grid-column:1/-1}
    .inventory-pager{justify-content:space-between;gap:7px}
                                                    }


/* Inline routine inventory edits */
.inventory-inline-input{
    display:inline-block;
    width:auto;
    margin:0;
    padding:7px 8px;
    font:inherit;
}
.inventory-inline-qty{
    width:68px;
}
.inventory-inline-price{
    display:inline-flex;
    align-items:center;
    gap:3px;
    white-space:nowrap;
}
.inventory-inline-price-input{
    width:82px;
}
.inventory-inline-title{
    display:block;
    width:100%;
    max-width:620px;
    margin-top:4px;
}
.inventory-title-label{
    display:block;
    margin-top:5px;
    color:#8793a0;
    font-size:.72rem;
    font-weight:600;
}
.inventory-quick-form{
    display:inline;
    margin:0;
}
.inventory-inline-save{
    padding:7px 11px;
    font-size:.86rem;
}
@media(max-width:720px){
    .inventory-inline-input{
        max-width:110px;
    }
    .inventory-inline-title{
        width:100%;
        max-width:100%;
    }
}


/* On-demand eBay listing details */
.inventory-details-link{
    color:#2563a9;
    font-weight:600;
    text-decoration:none;
    white-space:nowrap;
}
.inventory-details-link:hover,
.inventory-details-link:focus-visible{
    text-decoration:underline;
}
.listing-detail-head{
    overflow:visible;
}
.listing-detail-title{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:18px;
}
.listing-detail-title h1{
    margin-bottom:4px;
}
.listing-detail-facts{
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}
.listing-photo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
    gap:14px;
}
.listing-photo-grid a{
    display:block;
    border:1px solid #dce2e8;
    border-radius:8px;
    padding:8px;
    background:#f8fafc;
}
.listing-photo-grid img{
    display:block;
    width:100%;
    height:190px;
    object-fit:contain;
}
.listing-photo-card{
    margin:0;
}
.listing-photo-card figcaption{
    padding:6px 4px 0;
    color:#526174;
    font-size:.9rem;
}
.variation-photo-associations{
    display:grid;
    gap:12px;
}
.variation-photo-association{
    padding:14px;
    border:1px solid #dce2e8;
    border-radius:8px;
    background:#fbfcfe;
}
.variation-photo-association h3{
    margin:0 0 4px;
}
.variation-photo-association p{
    margin:4px 0 12px;
}
.variation-photo-missing{
    margin-top:14px;
}
.variation-photo-missing summary{
    cursor:pointer;
    font-weight:600;
}
.listing-specifics{
    display:table;
    max-width:900px;
}
.listing-specifics th{
    width:230px;
}
.listing-description{
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    max-width:1000px;
    line-height:1.6;
}
.listing-advanced summary{
    cursor:pointer;
    color:#2563a9;
    font-weight:600;
}
.listing-advanced pre{
    overflow:auto;
    max-height:520px;
    padding:12px;
    background:#f7f9fb;
    border:1px solid #dce2e8;
    border-radius:6px;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
@media(max-width:720px){
    .listing-detail-title{
        display:block;
    }
    .listing-detail-title .actions{
        margin-top:12px;
        flex-wrap:wrap;
    }
    .listing-specifics{
        display:table;
        min-width:0;
    }
}


/* Friendly listing-detail cards */
.listing-detail-head .facts>div,
.listing-detail-facts>div{
    min-height:72px;
}

.listing-detail-head .facts>div span,
.listing-detail-facts>div span{
    display:block;
    margin-bottom:5px;
    color:#8793a0;
    font-size:.76rem;
    font-weight:600;
}

.listing-detail-head .facts>div strong,
.listing-detail-facts>div strong{
    display:block;
    color:#f2f5f8;
    font-size:.95rem;
    line-height:1.35;
}

.listing-technical-facts{
    margin:16px 0;
}

.listing-advanced h3{
    margin:22px 0 8px;
}

/* Seller-friendly listing description editor */
.edit-fields textarea{
    display:block;
    width:100%;
    min-height:190px;
    margin-top:6px;
    padding:10px;
    border:1px solid #bbc6d0;
    border-radius:5px;
    box-sizing:border-box;
    font:inherit;
    line-height:1.5;
    resize:vertical;
}
.edit-description{
    grid-column:1/-1;
}
.edit-help{
    display:block;
    margin-top:6px;
    color:#687686;
    font-size:.82rem;
    font-weight:400;
    line-height:1.4;
}

/* Seller-friendly main-photo editor */
.edit-photos{
    grid-column:1/-1;
    margin:4px 0 8px;
    padding:14px;
    border:1px solid #dce2e8;
    border-radius:8px;
}
.edit-photos legend{
    padding:0 6px;
    font-weight:700;
}
.edit-photo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(130px,1fr));
    gap:12px;
    margin-top:10px;
}
.edit-photo-card{
    display:block;
    padding:8px;
    border:1px solid #dce2e8;
    border-radius:8px;
    background:#f8fafc;
    cursor:pointer;
}
.edit-photo-card img{
    display:block;
    width:100%;
    height:165px;
    object-fit:contain;
    margin-bottom:8px;
}
.edit-photo-card span{
    display:block;
    font-size:.82rem;
    line-height:1.35;
}

/* Existing-photo full reorder controls */
.edit-photo-card{
    cursor:default;
}
.edit-photo-position{
    margin-bottom:7px;
    font-size:.8rem;
    font-weight:700;
    color:#526274;
}
.edit-photo-card:first-child{
    border-width:2px;
    border-color:#2563a9;
}
.edit-photo-card:first-child .edit-photo-position{
    color:#2563a9;
}
.edit-photo-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
}
.edit-photo-move{
    border:1px solid #bbc6d0;
    border-radius:5px;
    padding:7px 6px;
    background:#fff;
    color:#344454;
    font:inherit;
    font-size:.78rem;
    cursor:pointer;
}
.edit-photo-move:hover:not(:disabled),
.edit-photo-move:focus-visible:not(:disabled){
    border-color:#2563a9;
    color:#175b9a;
}
.edit-photo-move:disabled{
    opacity:.4;
    cursor:default;
}

/* Drag-and-drop listing photo ordering */
.edit-photo-card[draggable='true']{
    cursor:grab;
    user-select:none;
}
.edit-photo-card[draggable='true']:active{
    cursor:grabbing;
}
.edit-photo-card.is-dragging{
    opacity:.48;
    border-style:dashed;
}
.edit-photo-drag-handle{
    margin-bottom:5px;
    color:#687686;
    font-size:.75rem;
    font-weight:700;
    letter-spacing:.02em;
}
.edit-photo-card:hover .edit-photo-drag-handle{
    color:#2563a9;
}

/* Delete Photo action */
.edit-photo-delete{
    grid-column:1 / -1;
    border:1px solid #c9a2a2;
    border-radius:5px;
    padding:7px 6px;
    background:#fff;
    color:#8d2b2b;
    font:inherit;
    font-size:.78rem;
    cursor:pointer;
}
.edit-photo-replace{
    grid-column:1 / -1;
    border:1px solid #98b8d1;
    border-radius:5px;
    padding:7px 6px;
    background:#f5faff;
    color:#175b9a;
    font:inherit;
    font-size:.78rem;
    cursor:pointer;
}
.edit-photo-replace:hover,
.edit-photo-replace:focus-visible{
    border-color:#2563a9;
    background:#eaf4fc;
}
.edit-photo-delete:hover:not(:disabled),
.edit-photo-delete:focus-visible:not(:disabled){
    border-color:#a72222;
    color:#a72222;
}
.edit-photo-delete:disabled{
    opacity:.4;
    cursor:default;
}
/* Listing details lead with the main image and seller facts. */
.listing-section-nav{
    position:sticky;
    top:0;
    z-index:4;
    display:flex;
    gap:6px;
    margin:0 0 18px;
    padding:8px;
    overflow-x:auto;
    border:1px solid #dce2e8;
    border-radius:10px;
    background:#ffffffed;
    box-shadow:0 4px 14px #13223812;
    scrollbar-width:thin;
}
.listing-section-nav a{
    flex:0 0 auto;
    padding:8px 11px;
    border-radius:7px;
    color:#344454;
    text-decoration:none;
    font-weight:650;
}
.listing-section-nav a:hover,
.listing-section-nav a:focus-visible{background:#e8f1fb;color:#175b9a}
.listing-section,
.listing-overview{scroll-margin-top:82px}
.listing-overview{
    display:grid;
    grid-template-columns:minmax(220px,.8fr) minmax(0,1.5fr);
    align-items:center;
    gap:clamp(18px,3vw,34px);
    margin:0 0 22px;
    padding:clamp(18px,3vw,30px);
    border:1px solid #dce2e8;
    border-radius:14px;
    background:#fff;
    box-shadow:0 8px 24px #1322380b;
}
.listing-main-photo{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:270px;
    padding:12px;
    border:1px solid #e3e8ee;
    border-radius:10px;
    background:#f8fafc;
}
.listing-main-photo img{display:block;width:100%;height:300px;object-fit:contain}
.listing-no-photo{
    display:grid;
    place-items:center;
    width:100%;
    min-height:250px;
    color:#687686;
    font-weight:600;
}
.listing-overview-facts{min-width:0}
.listing-overview-facts .facts{
    grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
    align-content:center;
    gap:10px;
}
.listing-overview-facts .facts>div{
    min-width:0;
    min-height:78px;
    padding:13px;
    border:1px solid #e4e9ef;
    border-radius:9px;
    background:#f8fafc;
}
.listing-overview-facts .facts>div span{
    display:block;
    margin-bottom:5px;
    color:#687686;
    font-size:.78rem;
    font-weight:650;
}
.listing-overview-facts .facts>div strong{
    display:block;
    color:#172331;
    font-size:1.02rem;
    line-height:1.35;
    overflow-wrap:anywhere;
}
.listing-status{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:4px 10px;
    border-radius:999px;
    background:#e7edf4;
    color:#344454;
    font-size:.82rem;
    font-weight:750;
}
.listing-status-active{background:#ddf3e5;color:#21643a}
.listing-section{
    margin:20px 0;
    padding:clamp(16px,2.4vw,24px);
    border:1px solid #dce2e8;
    border-radius:12px;
    background:#fff;
    box-shadow:0 4px 16px #13223808;
}
.listing-section>h2{margin-bottom:14px}
.listing-section .listing-photo-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
.listing-section .listing-photo-grid img{height:210px}
.listing-section .variation-photo-associations{
    grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));
}
.listing-section .variation-photo-association{min-width:0}
.listing-specifics{width:100%}
.listing-specifics th{width:min(34%,230px)}
.listing-section#photos>p.muted{
    min-height:88px;
    display:flex;
    align-items:center;
    padding:14px;
    border:1px dashed #cbd5df;
    border-radius:8px;
    background:#f8fafc;
}
.listing-detail-facts>div strong{color:#172331}
.listing-advanced pre{
    max-width:100%;
    overflow:auto;
    white-space:pre;
    overflow-wrap:normal;
    overscroll-behavior-x:contain;
}

input[hidden]{display:none}

/* Listing edit groups and separately verified photo controls. */
.edit-panel{max-width:1040px}
.edit-section{
    margin:22px 0;
    padding:18px;
    border:1px solid #dce2e8;
    border-radius:10px;
    background:#fff;
}
.edit-section>h2{margin-bottom:4px}
.edit-field-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin:14px 0 0;
}
.edit-field-grid label,.edit-fields label{min-width:0}
.edit-field-grid input,
.edit-field-grid textarea,
.edit-fields input,
.edit-fields textarea{width:100%;max-width:none}
.edit-save-bar{
    position:sticky;
    bottom:10px;
    z-index:3;
    display:flex;
    align-items:center;
    gap:12px;
    margin:20px 0;
    padding:12px;
    border:1px solid #cbd9e6;
    border-radius:10px;
    background:#ffffffed;
    box-shadow:0 6px 20px #1322381c;
}
.edit-save-bar .button{min-height:46px;font-weight:700}
.edit-photo-grid{
    grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));
    align-items:stretch;
    gap:14px;
}
.edit-photo-card{min-width:0;padding:11px;border-radius:10px;background:#fff}
.edit-photo-card:first-child{
    border-color:#2563a9;
    background:#f4f9ff;
    box-shadow:0 0 0 2px #2563a91a;
}
.edit-photo-position{min-height:29px;margin-bottom:7px;color:#344454}
.edit-photo-card img{
    height:190px;
    margin:0 0 10px;
    border-radius:6px;
    background:#f8fafc;
}
.edit-photo-actions{grid-template-columns:1fr 1fr;gap:7px}
.edit-photo-move,
.edit-photo-replace,
.edit-photo-delete{min-height:44px;font-size:.86rem;font-weight:650}
.edit-photo-replace{grid-column:1/-1}
.edit-photo-delete{
    grid-column:1/-1;
    margin-top:5px;
    border-color:#dfc5c5;
    border-top-width:2px;
    background:#fffafa;
}
.edit-photo-add{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    min-height:100%;
    padding:18px;
    border:2px dashed #9aafc3;
    border-radius:10px;
    background:#f7fbff;
}
.edit-photo-add-icon{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    margin-bottom:8px;
    border:1px solid #c7d7e5;
    border-radius:50%;
    background:#fff;
    color:#175b9a;
    font-size:1.7rem;
    font-weight:500;
}
.edit-photo-add label{margin:0 0 8px;color:#344454}
.edit-photo-add input[type=file]{max-width:100%;padding:8px;background:#fff}
.edit-photo-add .button{min-height:44px;margin-top:8px}
.edit-photo-add .edit-help{margin-top:12px}

@media(max-width:900px){.listing-overview{grid-template-columns:minmax(180px,.75fr) minmax(0,1.25fr)}
}
@media(max-width:720px){.listing-section-nav{top:82px;margin-inline:-2px}
    .listing-section{scroll-margin-top:156px}
    .listing-overview{grid-template-columns:minmax(0,1fr);gap:16px;padding:16px}
    .listing-main-photo{min-height:220px}
    .listing-main-photo img{height:250px}
    .listing-overview-facts .facts{grid-template-columns:repeat(2,minmax(0,1fr))}
    .listing-section{padding:16px;margin-block:14px}
    .edit-section{padding:14px}
    .edit-field-grid,.edit-fields{grid-template-columns:minmax(0,1fr)}
    .edit-fields label:nth-child(1),
    .edit-fields label:nth-child(4){grid-column:auto}
    .edit-save-bar{bottom:6px}
}
@media(max-width:420px){
    .listing-overview-facts .facts{grid-template-columns:minmax(0,1fr)}
    .edit-photo-grid{grid-template-columns:minmax(0,1fr)}
}
.edit-top-actions{
    display:flex;
    justify-content:flex-end;
    margin:10px 0 14px;
}
.edit-top-actions .button{min-height:44px;font-weight:700}

/* =====================================================================
   CardGremlin design tokens: the single source for color, spacing, radius,
   type and motion. Components use these names; no one-off values.
   Dark is the default look (see the theme script in web.py). The light
   values below are the existing light theme, kept working until it gets
   its own design pass.
   Color roles:  primary = the one brand accent (links, active nav, focus ring);
                 cta = the single primary action button (dark text on it);
                 success / warning / danger / info = the four fixed status meanings
                 (green = good, amber = review, red-orange = act now, blue-gray = FYI).
   ===================================================================== */
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400;font-display:swap;src:url("/static/instrument-sans-400.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:500;font-display:swap;src:url("/static/instrument-sans-500.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:600;font-display:swap;src:url("/static/instrument-sans-600.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:700;font-display:swap;src:url("/static/instrument-sans-700.woff2") format("woff2")}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:700;font-display:swap;src:url("/static/bricolage-grotesque-700.woff2") format("woff2")}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:800;font-display:swap;src:url("/static/bricolage-grotesque-800.woff2") format("woff2")}
:root{
    /* surfaces and lines */
    --cg-bg:#f5f7fb;
    --cg-surface:#ffffff;
    --cg-surface-soft:#f8fafc;
    --cg-sidebar:#ffffff;
    --cg-input:#ffffff;
    --cg-row-hover:#f5f8fc;
    --cg-border:#e4eaf2;
    --cg-border-strong:#cbd5e4;
    /* text */
    --cg-text:#17233b;
    --cg-text-secondary:#52627a;
    --cg-muted:#5b6b80;
    /* accent and primary action */
    --cg-primary:#245dda;
    --cg-primary-hover:#1849b0;
    --cg-primary-soft:#eaf1ff;
    --cg-on-primary:#ffffff;
    --cg-cta:#fdd55c;
    --cg-cta-hover:#f6c740;
    --cg-on-cta:#0b141c;
    /* status */
    --cg-success:#157a49;
    --cg-success-soft:#e7f7ee;
    --cg-warning:#8a5600;
    --cg-warning-soft:#fff5da;
    --cg-danger:#bd3039;
    --cg-danger-soft:#fff0f1;
    --cg-danger-solid:#bd3039;
    --cg-info:#46566a;
    --cg-info-soft:#edf2f7;
    --cg-neutral-soft:#edf2f7;
    /* space (4 / 8 / 12 / 16 / 20 / 24 / 32 / 40) */
    --cg-space-1:4px;
    --cg-space-2:8px;
    --cg-space-3:12px;
    --cg-space-4:16px;
    --cg-space-5:20px;
    --cg-space-6:24px;
    --cg-space-8:32px;
    --cg-space-10:40px;
    /* radius */
    --cg-radius-sm:10px;
    --cg-radius:14px;
    --cg-radius-lg:20px;
    --cg-radius-xl:24px;
    --cg-radius-pill:999px;
    /* type */
    --cg-font-body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    --cg-font-display:"Bricolage Grotesque","Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
    --cg-text-xs:.75rem;
    --cg-text-sm:.875rem;
    --cg-text-md:1rem;
    --cg-text-lg:1.25rem;
    --cg-text-xl:1.75rem;
    --cg-text-display:clamp(1.75rem,3vw,2.375rem);
    --cg-text-stat:clamp(2rem,3.4vw,2.75rem);
    /* elevation, focus, motion, sizing */
    --cg-shadow:0 2px 9px rgba(22,42,75,.025);
    --cg-shadow-card:0 1px 2px rgba(22,42,75,.05),0 6px 18px rgba(22,42,75,.05);
    --cg-shadow-raised:0 16px 40px rgba(22,42,75,.10);
    --cg-focus:var(--cg-primary);
    --cg-ring:0 0 0 3px color-mix(in srgb,var(--cg-focus) 35%,transparent);
    --cg-ease:150ms ease;
    --cg-control-height:44px;
    --cg-control-height-sm:40px;
    font-family:var(--cg-font-body);
    color:var(--cg-text);
    background:var(--cg-bg);
    font-size:16px;
    line-height:1.5;
}
html{background:var(--cg-bg);scroll-behavior:smooth}
body{min-width:320px;background:var(--cg-bg);color:var(--cg-text)}
a{color:var(--cg-primary);text-underline-offset:3px}
a:hover{color:var(--cg-primary-hover)}
h1,h2,h3{color:var(--cg-text);line-height:1.2;letter-spacing:-.018em}
h1{font-size:clamp(1.75rem,2.8vw,2.45rem);margin:0 0 8px}
h2{font-size:clamp(1.2rem,1.8vw,1.5rem);margin:0 0 8px}
h3{font-size:1.05rem;margin:0 0 6px}
p{margin:0 0 14px}
.muted{color:var(--cg-text-secondary)}
/* Shared page composition */
.page-header,.hero{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:24px;
    margin:0 0 26px;
}
.page-header-main{max-width:860px}
.page-eyebrow{margin:0 0 6px;color:var(--cg-primary);font-size:.74rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.page-subtitle{max-width:760px;margin:0;color:var(--cg-text-secondary);font-size:1rem}
.section-heading,.panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.section-heading p,.panel-header p{margin-bottom:0}
.panel,.listing-section,.edit-section,.details-panel{
    margin:20px 0;
    padding:clamp(18px,2.2vw,26px);
    overflow:visible;
    border:1px solid var(--cg-border);
    border-radius:var(--cg-radius-lg);
    background:var(--cg-surface);
    box-shadow:var(--cg-shadow);
}
.panel.compact{padding:16px 20px}
.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:18px}
.empty-state{padding:48px 24px;text-align:center}
.empty-state p{max-width:520px;margin:0 auto 20px;color:var(--cg-text-secondary)}
.actions,.panel-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.panel-actions{justify-content:flex-end;margin-top:18px;padding-top:18px;border-top:1px solid var(--cg-border)}
label{margin:0;color:#344054;font-size:.9rem;font-weight:700}
input[type=checkbox],input[type=radio]{width:20px;height:20px;accent-color:var(--cg-primary)}
.filter-grid{gap:16px 18px}
.filter-panel>summary,.details-panel>summary,.edit-advanced>summary{
    min-height:44px;
    padding:4px 0;
    color:var(--cg-text);
    font-size:1rem;
    font-weight:750;
    cursor:pointer;
}
.filter-panel[open]>summary,.details-panel[open]>summary,.edit-advanced[open]>summary{margin-bottom:18px}
/* Tables and data cards */
.table-scroll{width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid var(--cg-border);border-radius:12px}
table,.catalog-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.9rem}
.catalog-table{display:table;overflow:visible}
th,td,.catalog-table th,.catalog-table td{min-width:0;padding:13px 14px;border-bottom:1px solid var(--cg-border);vertical-align:middle}
th,.catalog-table th{background:var(--cg-surface-soft);color:#58677a;font-size:.72rem;font-weight:800;letter-spacing:.055em;text-transform:uppercase;white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fafcff}
.table-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;color:var(--cg-text-secondary)}
.metrics{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin:0 0 24px}
.catalog-thumb{width:52px;height:72px;border-radius:7px;background:var(--cg-surface-soft)}
.quick-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:26px}
.quick-action-card{
    display:flex;
    min-height:112px;
    flex-direction:column;
    justify-content:space-between;
    padding:18px;
    border:1px solid var(--cg-border);
    border-radius:var(--cg-radius);
    background:#fff;
    color:var(--cg-text);
    text-decoration:none;
    box-shadow:var(--cg-shadow);
}
.quick-action-card:hover{border-color:#b6c9e5;color:var(--cg-primary);transform:translateY(-1px);box-shadow:var(--cg-shadow-raised)}
.ebay-status-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:20px;
    padding:24px;
    border:1px solid var(--cg-border);
    border-radius:var(--cg-radius-lg);
    background:#fff;
    box-shadow:var(--cg-shadow);
}
.status-dot{display:inline-block;width:10px;height:10px;margin-right:7px;border-radius:50%;background:var(--cg-success);box-shadow:0 0 0 4px var(--cg-success-soft)}
.diagnostic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.diagnostic-grid>div{padding:15px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.diagnostic-grid strong{display:block;margin-top:4px;font-size:1.2rem}
.import-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(250px,.6fr);gap:20px}
.import-panel{margin:0}
.import-dropzone{display:grid;place-items:center;min-height:230px;padding:30px;border:2px dashed #a9bdd2;border-radius:14px;background:#f8fbff;text-align:center}
.import-dropzone-icon{display:grid;place-items:center;width:52px;height:52px;margin-bottom:10px;border-radius:50%;background:var(--cg-primary-soft);color:var(--cg-primary);font-size:1.55rem}
.import-file-input{max-width:480px}
.import-options{display:grid;gap:12px}
.import-file-list,.import-samples{margin-top:20px}

/* Action Center */
.action-totals .metric{min-height:92px}
.duplicate-card{border-color:var(--cg-border);border-radius:12px;background:var(--cg-surface-soft)}

/* Batches */
.batch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:20px}
.batch-card{display:flex;min-height:310px;flex-direction:column;padding:24px;border:1px solid var(--cg-border);border-radius:var(--cg-radius-lg);background:#fff;box-shadow:var(--cg-shadow)}
.batch-card:hover{border-color:#bfd0e3;box-shadow:var(--cg-shadow-raised)}
.batch-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.batch-card-header h2{font-size:1.3rem}
.batch-variant{color:var(--cg-text-secondary)}
.batch-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
.batch-facts>div{padding:12px;border-radius:9px;background:var(--cg-surface-soft)}
.batch-facts dt{color:var(--cg-muted);font-size:.72rem;font-weight:750;text-transform:uppercase}
.batch-facts dd{margin:4px 0 0;color:var(--cg-text);font-size:1.02rem;font-weight:750;overflow-wrap:anywhere}
.batch-card-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:auto;padding-top:16px;border-top:1px solid var(--cg-border)}
.batch-card-footer small{display:block;color:var(--cg-muted)}
.batch-warning{display:block;margin-bottom:4px;color:var(--cg-danger);font-weight:750}

/* Pick Your Card */
.pyc-evidence>summary{font-weight:750;cursor:pointer}
.pyc-group-facts{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}
.pyc-group-facts span{padding:8px 11px;border-radius:999px;background:var(--cg-surface-soft);color:var(--cg-text-secondary);font-size:.84rem}
.pyc-group-facts strong{color:var(--cg-text)}
.consolidation-group .table-scroll{margin-top:18px}
.consolidation-group .catalog-table{min-width:1500px}
.draft-table{min-width:1380px}
.draft-table input{min-width:150px}
.draft-table .small-input{min-width:86px;max-width:108px}

/* Catalog and inventory */
.catalog-filter-panel,.inventory-search-shell{padding:20px}
.catalog-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;align-items:end}
.catalog-results-header,.inventory-header-stats{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:22px 0 12px}
.catalog-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.catalog-freshness{color:var(--cg-text-secondary);font-size:.84rem}
.catalog-detail-refresh{display:flex;align-items:end;gap:10px}
.catalog-result-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:18px}
.catalog-result-list{display:grid;gap:14px}
.catalog-result-card{display:flex;flex-direction:column;min-height:320px;padding:16px;border:1px solid var(--cg-border);border-radius:14px;background:#fff;box-shadow:var(--cg-shadow)}
.catalog-result-card .catalog-thumb{width:100%;height:210px}
.catalog-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:auto;padding-top:14px}
.inventory-card-main>strong,.inventory-listing-title{color:var(--cg-text);font-size:.94rem}
.inventory-card-meta{color:var(--cg-muted);font-size:.8rem}
.inventory-quick-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.inventory-quick-fields label:first-child{grid-column:1/-1}
.inventory-results{min-width:0}
.inventory-ebay-link{font-size:.84rem;font-weight:700;white-space:nowrap}
.inventory-quick-toggle>summary,.inventory-more>summary{display:inline-flex;align-items:center;min-height:40px;padding:8px 10px;border-radius:8px;color:var(--cg-primary);font-weight:750;cursor:pointer;list-style:none}
.inventory-quick-toggle>summary::-webkit-details-marker,.inventory-more>summary::-webkit-details-marker{display:none}
.inventory-quick-toggle[open]{min-width:280px}
.inventory-quick-editor{margin-top:10px;padding:14px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.inventory-quick-form{display:grid;gap:10px}
.inventory-inline-input{min-height:40px}
.inventory-pager{min-height:48px}

/* Listing details */
.listing-header,.edit-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}
.listing-header-main,.edit-header-main{min-width:0;max-width:880px}
.listing-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.listing-primary-actions,.edit-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.listing-section-nav{top:10px;padding:7px;border-color:var(--cg-border);border-radius:12px;background:rgba(255,255,255,.94);box-shadow:var(--cg-shadow)}
.listing-section-nav a{min-height:40px;padding:9px 13px;border-radius:8px;color:var(--cg-text-secondary)}
.listing-section-nav a:hover,.listing-section-nav a:focus-visible{background:var(--cg-primary-soft);color:var(--cg-primary)}
.listing-overview{grid-template-columns:minmax(260px,.72fr) minmax(0,1.28fr);padding:clamp(20px,2.8vw,34px);border-color:var(--cg-border);border-radius:var(--cg-radius-lg);box-shadow:var(--cg-shadow)}
.listing-main-photo{min-height:320px;border-color:var(--cg-border);border-radius:12px;background:var(--cg-surface-soft)}
.listing-main-photo img{height:330px}
.listing-summary-card{min-width:0}
.listing-facts,.listing-overview-facts .facts{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.listing-facts>div,.listing-overview-facts .facts>div{min-height:86px;padding:15px;border-color:var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.listing-detail-head .facts>div strong,.listing-detail-facts>div strong,.listing-overview-facts .facts>div strong{color:var(--cg-text)}
.listing-photo-grid,.listing-section .listing-photo-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.listing-photo-grid a{padding:10px;border-color:var(--cg-border);border-radius:11px;background:var(--cg-surface-soft)}
.listing-photo-grid img,.listing-section .listing-photo-grid img{height:230px}
.variation-photo-associations{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px}
.variation-photo-association{padding:18px;border-color:var(--cg-border);border-radius:12px;background:var(--cg-surface-soft)}

/* Listing editor and photo management */
.edit-panel{max-width:1180px;margin-inline:auto}
.edit-layout{display:grid;gap:22px}
.edit-section{padding:clamp(20px,2.5vw,30px)}
.edit-field-grid,.edit-fields{gap:18px}
.edit-compact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.edit-readonly-field{min-height:44px;padding:11px 12px;border:1px solid var(--cg-border);border-radius:9px;background:var(--cg-surface-soft);color:var(--cg-text-secondary)}
.edit-fields textarea,.edit-field-grid textarea{min-height:140px;padding:12px;border-color:var(--cg-border-strong);border-radius:9px}
.edit-save-note{color:var(--cg-text-secondary);font-size:.87rem}
.edit-photos{margin:0;padding:0;border:0}
.edit-photo-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,205px),1fr));gap:18px}
.edit-photo-card{position:relative;padding:12px;border-color:var(--cg-border);border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(15,31,54,.07)}
.edit-photo-card:first-child,.edit-photo-card.is-main{border:2px solid var(--cg-primary);background:#fbfdff;box-shadow:0 0 0 3px rgba(37,99,212,.09),var(--cg-shadow)}
.edit-photo-media{display:grid;place-items:center;height:230px;margin-bottom:12px;overflow:hidden;border-radius:10px;background:var(--cg-surface-soft)}
.edit-photo-media img,.edit-photo-card img{width:100%;height:230px;margin:0;object-fit:contain;border-radius:10px;background:var(--cg-surface-soft)}
.edit-photo-badge{position:absolute;z-index:1;top:20px;left:20px;padding:6px 10px;border-radius:999px;background:var(--cg-primary);color:#fff;font-size:.7rem;font-weight:850;letter-spacing:.06em}
.edit-photo-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}
.edit-photo-position{min-height:0;margin:0;color:var(--cg-text-secondary);font-size:.82rem}
.edit-photo-drag-handle{display:flex;align-items:center;min-height:34px;margin:0;color:var(--cg-muted)}
.edit-photo-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.edit-photo-actions details{position:relative}
.edit-photo-more{position:relative}
.edit-photo-actions details>summary{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--cg-border-strong);border-radius:9px;background:#fff;cursor:pointer;list-style:none}
.edit-photo-actions details>summary::-webkit-details-marker{display:none}
.edit-photo-actions details[open]>.edit-photo-order-actions{position:absolute;z-index:5;right:0;bottom:50px;width:170px;padding:8px;border:1px solid var(--cg-border);border-radius:10px;background:#fff;box-shadow:var(--cg-shadow-raised)}
.edit-photo-order-actions{display:grid;gap:6px}
.edit-photo-move,.edit-photo-replace,.edit-photo-delete{min-height:42px;border-radius:8px;font-size:.84rem;font-weight:700}
.edit-photo-replace{grid-column:auto;border-color:#b9cbe3;background:#fff;color:var(--cg-primary)}
.edit-photo-delete{grid-column:auto;margin-top:0;border-color:transparent;background:transparent;color:var(--cg-danger)}
.edit-photo-more .edit-photo-delete{width:100%;min-height:38px;padding:7px 10px;text-align:left}
.edit-photo-delete:hover:not(:disabled),.edit-photo-delete:focus-visible:not(:disabled){border-color:#f0b9bd;background:var(--cg-danger-soft)}
.edit-photo-add{min-height:100%;align-items:center;padding:24px;border:2px dashed #9fb8d3;border-radius:14px;background:#f8fbff;text-align:center;cursor:pointer}
.edit-photo-add:hover{border-color:var(--cg-primary);background:var(--cg-primary-soft)}
.edit-photo-add-label{display:flex;min-height:100%;flex-direction:column;align-items:center;justify-content:center;color:var(--cg-text);cursor:pointer}
.edit-photo-add-icon{width:52px;height:52px;background:#fff;color:var(--cg-primary);font-size:1.9rem}
.edit-photo-add input[type=file],.edit-photo-add .import-file-input,.edit-photo-file-input{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0!important}
.edit-photo-add-selected{margin-top:10px;color:var(--cg-text-secondary);font-size:.84rem}
.edit-save-bar{bottom:12px;justify-content:flex-end;padding:13px 16px;border-color:var(--cg-border-strong);border-radius:12px;background:rgba(255,255,255,.96);box-shadow:var(--cg-shadow-raised)}
.edit-save-bar .button{min-width:170px}
.edit-advanced{border-top:1px solid var(--cg-border);padding-top:18px}

@media(max-width:1100px){
    .import-layout{grid-template-columns:1fr}
    .listing-overview{grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr)}
}
@media(max-width:900px){.listing-overview{grid-template-columns:1fr}
    .listing-main-photo{min-height:280px}
}
@media(max-width:768px){
    :root{font-size:15px}
.page-header,.hero,.listing-header,.edit-header{display:block;margin-bottom:20px}
    .listing-primary-actions,.edit-header-actions{justify-content:flex-start;margin-top:16px}
    .panel,.listing-section,.edit-section,.details-panel{margin:14px 0;padding:18px 15px;border-radius:13px}
    .panel-header,.section-heading{display:block}
    .panel-header .button,.section-heading .button{margin-top:12px}
    .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .metric{min-height:90px;padding:14px}
    .metric strong{font-size:1.4rem}
    .ebay-status-card{grid-template-columns:1fr}
    .batch-grid{grid-template-columns:1fr}
    .batch-card{min-height:0;padding:19px}
    .table-scroll{border-radius:10px}
    .responsive-table:not(.catalog-table),.responsive-table:not(.catalog-table) tbody,.responsive-table:not(.catalog-table) tr,.responsive-table:not(.catalog-table) td{display:block;width:100%}
    .responsive-table:not(.catalog-table) thead{display:none}
    .responsive-table:not(.catalog-table) tbody{display:grid;gap:12px;padding:10px}
    .responsive-table:not(.catalog-table) tr{padding:10px;border:1px solid var(--cg-border);border-radius:10px;background:#fff}
    .responsive-table:not(.catalog-table) td{display:grid;grid-template-columns:minmax(88px,32%) 1fr;gap:12px;padding:9px 4px}
    .responsive-table:not(.catalog-table) td::before{content:attr(data-label);color:var(--cg-muted);font-size:.74rem;font-weight:800;text-transform:uppercase}
                                .inventory-quick-fields{grid-template-columns:1fr}
    .inventory-quick-fields label:first-child{grid-column:auto}
    .listing-section-nav{top:78px;margin-inline:-2px}
    .listing-overview{padding:16px}
    .listing-main-photo img{height:280px}
    .listing-facts,.listing-overview-facts .facts{grid-template-columns:repeat(2,minmax(0,1fr))}
    .edit-field-grid,.edit-fields,.edit-compact-fields{grid-template-columns:1fr}
    .edit-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .edit-photo-media,.edit-photo-media img,.edit-photo-card img{height:220px}
    .edit-save-bar{bottom:7px;justify-content:stretch}
    .edit-save-bar .button{width:100%}
}
@media(max-width:520px){
    .metrics,.listing-facts,.listing-overview-facts .facts,.edit-photo-grid{grid-template-columns:1fr}
    .quick-actions{grid-template-columns:1fr}
    .batch-card-header,.batch-card-footer{align-items:flex-start;flex-direction:column}
    .batch-card-footer .button{width:100%}
    .batch-facts{grid-template-columns:1fr 1fr}
    .listing-primary-actions .button,.edit-header-actions .button{flex:1 1 145px}
    .listing-main-photo{min-height:230px}
    .listing-main-photo img{height:240px}
    .listing-photo-grid,.listing-section .listing-photo-grid{grid-template-columns:1fr}
    .edit-photo-media,.edit-photo-media img,.edit-photo-card img{height:280px}
    .filter-grid{grid-template-columns:1fr}
}
/* Product UI integration fixes */
.app-main header.page-header{
    padding:0;
    background:transparent;
    color:var(--cg-text);
}
.app-main header.page-header a:not(.button){
    margin-right:0;
    color:var(--cg-primary);
}
.edit-field-grid>.edit-compact-fields,
.edit-field-grid>.edit-readonly-field,
.edit-field-grid>.edit-description{grid-column:1/-1}
.edit-compact-fields label:first-child{grid-column:auto}
.edit-readonly-field{display:grid;gap:3px}
.edit-readonly-field strong{color:var(--cg-text);font-size:1rem}
.edit-readonly-field small{color:var(--cg-muted);font-weight:500}
.edit-mobile-save{display:none}
.edit-photo-badge[hidden],.edit-photo-add-selected[hidden],.edit-photo-add button[hidden]{display:none!important}
.edit-photo-menu{
    position:absolute;
    z-index:8;
    right:0;
    top:50px;
    width:190px;
    padding:9px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    background:#fff;
    box-shadow:var(--cg-shadow-raised);
}
.edit-photo-more .edit-photo-order-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.edit-photo-more .edit-photo-move{padding:7px 5px;font-size:.78rem}
.edit-photo-more .edit-photo-delete{margin-top:7px;border-top:1px solid var(--cg-border);border-radius:0}
@media(max-width:768px){
    .edit-mobile-save{display:flex}
    .edit-header-actions>button[form="listing-save-form"]{display:none}
        }
.app-main header.page-header{flex-wrap:nowrap}
@media(max-width:768px){
    .app-main header.page-header{display:block}
}
/* Inventory scan and deliberate row actions */
.inventory-header-stats{
    margin:0;
    padding:10px 15px;
    border:1px solid var(--cg-border);
    border-radius:12px;
    background:var(--cg-surface);
    color:var(--cg-text-secondary);
    white-space:nowrap;
}
.inventory-header-stats strong{margin-right:6px;color:var(--cg-text);font-size:1.15rem}
.inventory-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:end;gap:10px}
.inventory-search-form label{margin:0}
.inventory-identity-review{display:grid;gap:7px;margin-top:8px;padding:9px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.inventory-identity-review p{margin:0;font-size:.78rem;line-height:1.4}
.inventory-identity-review .button{justify-self:start;min-height:34px;padding:5px 9px;font-size:.78rem}
.inventory-identity-review small{color:var(--cg-muted)}
.inventory-identity-compare{display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px;align-items:center;padding:7px;border-radius:8px;background:var(--cg-surface)}
.inventory-identity-compare img{display:block;width:54px;height:72px;object-fit:contain;border-radius:6px;background:#fff}
.inventory-identity-compare>span{display:grid;gap:2px;min-width:0;font-size:.74rem}
.inventory-identity-compare>span>small{display:block;font-size:.7rem;line-height:1.3}
.inventory-more{position:relative}
.inventory-more>summary{display:inline-flex;align-items:center;min-height:36px;padding:6px 9px;border:1px solid var(--cg-border);border-radius:8px;background:var(--cg-surface);color:var(--cg-primary);font-size:.82rem;font-weight:750;list-style:none;cursor:pointer}
.inventory-more>summary::-webkit-details-marker{display:none}
.inventory-more-menu{display:grid;gap:7px;min-width:160px;padding:10px 0 0}
.inventory-more-menu .button{width:100%}
.inventory-quick-editor{margin:0}
@media(max-width:768px){
    .inventory-search-form{grid-template-columns:1fr 1fr}
    .inventory-search-form label{grid-column:1/-1}
                    .inventory-more-menu{grid-template-columns:1fr;min-width:0}
}
.edit-photo-badge{top:58px}
.ebay-status-card{display:block}
.ebay-status-card .panel-header{display:flex;align-items:center;margin-bottom:20px}
.ebay-status-card .diagnostic-grid{margin:0 0 22px}
.ebay-status-card .actions{margin-bottom:18px}
.ebay-status-card .actions .button{min-width:130px}
.ebay-status-card>p.muted{max-width:900px;margin:0;color:var(--cg-text-secondary);font-size:.86rem}
.ebay-attempt-status{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 18px;color:var(--cg-text-secondary);font-size:.9rem}
.ebay-latest-issue{margin:-8px 0 18px;color:var(--cg-text-secondary)}
.ebay-sync-progress[hidden]{display:none}
.ebay-sync-progress{max-width:720px;margin:0 0 18px}
.order-view-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.order-view-tabs .button{min-height:42px}
@media(max-width:768px){
    .order-view-tabs .button{min-height:44px}
    .app-main .sales-day-table summary{min-height:44px;padding-block:9px}
}
.order-pick-card h2{margin-bottom:5px}
.order-pick-card>p{margin:0 0 12px;color:var(--cg-text-secondary)}
.order-pick-table td:first-child strong{display:block;overflow-wrap:anywhere}
.order-pick-table td:first-child .status-pill{margin-top:5px}
.catalog-result-card{display:grid;grid-template-columns:170px minmax(0,1fr) auto;align-items:start;gap:20px;min-height:0}
.catalog-result-image{width:170px}
.catalog-result-image .catalog-thumb{width:150px;height:210px}
.catalog-result-main{min-width:0}
.catalog-result-title{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.catalog-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:12px 0}
.catalog-result-grid>div{min-width:0}
.catalog-result-grid dt{color:var(--cg-muted);font-size:.73rem;font-weight:800;text-transform:uppercase}
.catalog-result-grid dd{margin:3px 0 0;overflow-wrap:anywhere}
.catalog-result-select{align-self:center}
.import-file-input{max-width:100%;padding:10px;border:1px solid var(--cg-border-strong);border-radius:9px;background:#fff;color:var(--cg-text-secondary);font-size:.9rem}
.import-file-input::file-selector-button{min-height:38px;margin-right:12px;padding:8px 13px;border:1px solid var(--cg-border-strong);border-radius:7px;background:var(--cg-primary-soft);color:var(--cg-primary);font:inherit;font-weight:750;cursor:pointer}
@media(max-width:768px){    .ebay-status-card .panel-header{display:flex;align-items:flex-start;flex-wrap:wrap}
    .catalog-result-card{grid-template-columns:1fr}
    .catalog-result-image{width:100%}
    .catalog-result-image .catalog-thumb{width:min(100%,180px);height:230px}
    .catalog-result-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
    .catalog-result-grid{grid-template-columns:1fr}
}
/* Inventory active/history views */
.inventory-view-tabs{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 14px;
}
.quick-actions{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
.quick-action-card strong{font-size:1rem}
.quick-action-card span{margin-top:8px;color:var(--cg-text-secondary);font-size:.86rem;line-height:1.45}

.inventory-header-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:10px;
}

.order-summary-bar{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin:0 0 18px;
}
.order-summary-bar>div{
    padding:15px 17px;
    border:1px solid var(--cg-border);
    border-radius:12px;
    background:#fff;
    box-shadow:var(--cg-shadow);
}
.order-summary-bar span{
    display:block;
    color:var(--cg-text-secondary);
    font-size:.78rem;
    font-weight:750;
}
.order-summary-bar strong{
    display:block;
    margin-top:5px;
    color:var(--cg-text);
    font-size:1.55rem;
    line-height:1;
}
.order-summary-bar small{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
}
.order-sync-note{margin:0 0 16px;color:var(--cg-text-secondary);font-size:.88rem}
.order-pick-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}
.order-pick-header h2{margin-bottom:4px}
.order-pick-header p:last-child{margin:0;color:var(--cg-text-secondary)}
.pick-sku{
    display:block;
    color:var(--cg-text);
    font-size:1.12rem;
    line-height:1.25;
    overflow-wrap:anywhere;
}
.pick-sku+.status-pill{margin-top:7px}
.pick-qty{font-size:1.05rem}
.pick-item-title{display:block;max-width:520px;overflow-wrap:anywhere}

.pyc-overview-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.pyc-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.pyc-row-actions .button{min-height:36px;padding:7px 10px;font-size:.82rem}
.pyc-sku{
    display:block;
    color:var(--cg-text);
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:.92rem;
    overflow-wrap:anywhere;
}
.pyc-sku-fact strong{
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:1.04rem!important;
}
.pyc-summary-facts{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.pyc-warning-line{margin:18px 0 0;color:var(--cg-text-secondary)}

@media(max-width:768px){.inventory-header-actions{
        justify-content:flex-start;
        margin-top:14px;
    }
    .inventory-header-actions .inventory-header-stats{
        flex:1 1 180px;
    }
    .order-summary-bar{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:8px;
    }
    .order-summary-bar>div{
        padding:12px 10px;
        text-align:center;
    }
    .order-summary-bar span{font-size:.68rem}
    .order-summary-bar strong{font-size:1.35rem}
    .order-pick-header{align-items:flex-start}
    .order-pick-table td[data-label='Custom SKU']{
        display:block!important;
        padding:14px 4px!important;
        background:var(--cg-primary-soft);
        border-radius:9px;
    }
    .order-pick-table td[data-label='Custom SKU']::before{
        display:block;
        margin-bottom:5px;
    }
    .pick-sku{
        font-size:1.35rem;
        font-weight:850;
        letter-spacing:.01em;
    }
    .pick-qty{font-size:1.25rem}
    .pyc-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
    .pyc-listings-table,
    .pyc-listings-table tbody,
    .pyc-listings-table tr,
    .pyc-listings-table td,
    .pyc-variation-table,
    .pyc-variation-table tbody,
    .pyc-variation-table tr,
    .pyc-variation-table td{
        display:block;
        width:100%;
        min-width:0;
    }
    .pyc-listings-table thead,
    .pyc-variation-table thead{display:none}
    .pyc-listings-table tbody,
    .pyc-variation-table tbody{
        display:grid;
        gap:12px;
        padding:10px;
    }
    .pyc-listings-table tr,
    .pyc-variation-table tr{
        padding:12px;
        border:1px solid var(--cg-border);
        border-radius:11px;
        background:#fff;
        box-shadow:var(--cg-shadow);
    }
    .pyc-listings-table td,
    .pyc-variation-table td{
        display:grid;
        grid-template-columns:minmax(96px,34%) 1fr;
        gap:10px;
        padding:9px 3px;
        border-bottom:1px solid var(--cg-border);
    }
    .pyc-listings-table td:last-child,
    .pyc-variation-table td:last-child{border-bottom:0}
    .pyc-listings-table td::before,
    .pyc-variation-table td::before{
        content:attr(data-label);
        color:var(--cg-muted);
        font-size:.7rem;
        font-weight:800;
        text-transform:uppercase;
    }
    .pyc-listings-table td[data-label='Custom SKU / location'],
    .pyc-variation-table td[data-label='Custom SKU']{
        display:block;
        padding:12px 3px;
    }
    .pyc-listings-table td[data-label='Custom SKU / location']::before,
    .pyc-variation-table td[data-label='Custom SKU']::before{
        display:block;
        margin-bottom:6px;
    }
    .pyc-sku{font-size:1.05rem}
}
@media(max-width:520px){
    .order-summary-bar{grid-template-columns:1fr 1fr 1fr}
    .order-pick-header{display:block}
    .order-pick-header .status-pill{margin-top:8px}
    .pyc-overview-metrics{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{scroll-behavior:auto!important;transition:none!important}
}

/* Existing PYC variation photo manager */
.pyc-variation-photo-section{overflow:visible}
.pyc-photo-sku{margin:4px 0 0;color:var(--cg-text-secondary,#526174)}
.pyc-photo-sku strong{
    color:var(--cg-text,#172033);
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    overflow-wrap:anywhere;
}
.pyc-photo-set{margin-top:16px;padding-top:16px;border-top:1px solid var(--cg-border,#dfe5ec)}
.pyc-photo-set:first-of-type{margin-top:0;padding-top:0;border-top:0}
.pyc-photo-set-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:12px;
}
.pyc-photo-set-heading small{
    display:block;
    margin-top:3px;
    color:var(--cg-text-secondary,#526174);
}
.pyc-variation-photo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:14px;
}
.pyc-variation-photo-card{
    margin:0;
    padding:10px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:var(--cg-surface-soft,#f8fafc);
}
.pyc-variation-photo-image{
    display:grid;
    place-items:center;
    height:220px;
    overflow:hidden;
    border-radius:9px;
    background:#fff;
}
.pyc-variation-photo-image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.pyc-variation-photo-card figcaption{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-top:9px;
    color:var(--cg-text-secondary,#526174);
    font-size:.84rem;
}
.pyc-variation-photo-card figcaption small{
    display:block;
    color:var(--cg-muted,#6b7789);
    line-height:1.3;
}
.pyc-photo-fallback{
    border-style:dashed;
}
.pyc-photo-set-unconfirmed,
.pyc-photo-set-unassigned{
    border-top-color:var(--cg-border-strong,#c8d2de);
}
.pyc-photo-replace{min-height:36px;padding:7px 11px;font-size:.82rem}
.pyc-photo-review-grid{
    display:grid;
    grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);
    gap:28px;
    align-items:start;
}
.pyc-photo-review-grid>div:first-child{
    padding:16px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:var(--cg-surface-soft,#f8fafc);
}
.pyc-photo-review-grid img{
    display:block;
    width:100%;
    max-height:430px;
    object-fit:contain;
    border-radius:9px;
    background:#fff;
}
.pyc-photo-review form{display:grid;gap:16px}
.inline-check-label{
    display:flex;
    align-items:flex-start;
    gap:9px;
    font-weight:600;
}
.inline-check-label input{flex:0 0 auto;margin-top:2px}
@media(max-width:768px){
    .pyc-photo-set-heading{display:block}
    .pyc-photo-set-heading .status-pill{margin-top:8px}
    .pyc-variation-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .pyc-photo-review-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
    .pyc-variation-photo-grid{grid-template-columns:1fr}
    .pyc-variation-photo-image{height:280px}
}


/* Existing PYC variation photo ordering */
.pyc-photo-card-actions{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}
.pyc-photo-card-actions .button{
    min-height:34px;
    padding:6px 9px;
    font-size:.78rem;
}
.pyc-photo-order{box-shadow:none}
.pyc-order-compare{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    margin:18px 0;
}
.pyc-order-preview{
    padding:15px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:var(--cg-surface-soft,#f8fafc);
}
.pyc-order-preview>div{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
    gap:10px;
}
.pyc-order-preview-card{
    margin:0;
    padding:8px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:9px;
    background:#fff;
}
.pyc-order-preview-card img{
    display:block;
    width:100%;
    height:150px;
    object-fit:contain;
}
.pyc-order-preview-card figcaption{
    margin-top:6px;
    color:var(--cg-text-secondary,#526174);
    font-size:.78rem;
    font-weight:700;
    text-align:center;
}
@media(max-width:768px){
    .pyc-order-compare{grid-template-columns:1fr}
}


/* Existing PYC variation photo add/delete */
.pyc-photo-set-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
}
.pyc-photo-delete{
    border-color:#d7a2a2;
    color:#8f2f2f;
}
@media(max-width:768px){
    .pyc-photo-set-actions{
        justify-content:flex-start;
        margin-top:8px;
    }
}


/* Seller listing-photo truth in inventory and picking */
.inventory-listing-thumb-wrap{
    display:block;
    width:64px;
    flex:0 0 64px;
    border-radius:8px;
    overflow:hidden;
    background:#fff;
}
.inventory-listing-thumb{
    display:block;
    width:64px;
    height:88px;
    object-fit:contain;
    background:#fff;
}
.inventory-listing-thumb-wrap+small{
    display:block;
    margin-top:3px;
    color:var(--cg-muted);
    font-size:.65rem;
}
.inventory-listing-thumb-missing{
    display:grid;
    place-items:center;
    width:64px;
    height:88px;
    border:1px dashed var(--cg-border-strong);
    border-radius:8px;
    color:var(--cg-muted);
    font-size:.68rem;
    text-align:center;
}
.inventory-identity-unconfirmed strong{
    color:var(--cg-text-secondary);
    font-weight:700;
}
.order-listing-photo{
    display:grid;
    place-items:center;
    width:72px;
    height:96px;
    overflow:hidden;
    border-radius:9px;
    background:#fff;
}
.order-listing-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.order-listing-photo-missing{
    display:grid;
    place-items:center;
    width:72px;
    height:96px;
    border:1px dashed var(--cg-border-strong);
    border-radius:9px;
    color:var(--cg-muted);
    font-size:.72rem;
    text-align:center;
}
.order-pick-table th:first-child{width:88px}
@media(max-width:768px){
    .order-pick-table td[data-label='Photo']{
        display:block!important;
    }
    .order-pick-table td[data-label='Photo']::before{
        display:block;
        margin-bottom:6px;
    }
    .order-listing-photo,
    .order-listing-photo-missing{
        width:96px;
        height:132px;
    }
    }


/* Action Center secondary evidence row */
.action-evidence-strip{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:14px;
    margin:12px 0 18px;
    padding:14px 16px;
    border:1px solid var(--cg-border);
    border-radius:12px;
    background:var(--cg-surface-soft);
    color:var(--cg-text);
    text-decoration:none;
}
.action-evidence-strip:hover,
.action-evidence-strip:focus-visible{
    border-color:var(--cg-primary);
    background:var(--cg-primary-soft);
    text-decoration:none;
}
.action-evidence-strip span{
    display:flex;
    align-items:baseline;
    gap:7px;
    font-weight:800;
}
.action-evidence-strip span strong{
    font-size:1.25rem;
}
.action-evidence-strip small{
    color:var(--cg-text-secondary);
}
.action-evidence-strip b{
    color:var(--cg-primary);
    white-space:nowrap;
}
@media(max-width:768px){
    .action-evidence-strip{
        grid-template-columns:1fr;
        gap:6px;
    }
}


/* HTML description editor */
.edit-description-html{
    display:grid;
    gap:12px;
}
.edit-description-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
}
.edit-description-heading>div:first-child{
    display:grid;
    gap:4px;
}
.edit-description-actions{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.edit-description-html textarea#description-html{
    width:100%;
    min-height:280px;
    padding:14px;
    border:1px solid var(--cg-border-strong);
    border-radius:10px;
    background:#0f1720;
    color:#e8eef5;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:.86rem;
    line-height:1.55;
    tab-size:2;
}
.description-preview{
    width:100%;
    min-height:340px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    background:#fff;
}
.description-template-tools{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
}
.description-template-tools details{
    flex:1 1 100%;
    padding:10px 12px;
    border:1px solid var(--cg-border);
    border-radius:9px;
    background:var(--cg-surface-soft);
}
.description-template-tools summary{
    cursor:pointer;
    font-weight:750;
}
.description-token-grid{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:10px 0;
}
.description-token-grid button{
    min-height:34px;
    padding:6px 9px;
    border:1px solid var(--cg-border-strong);
    border-radius:7px;
    background:#fff;
    color:var(--cg-primary);
    font:inherit;
    font-size:.78rem;
    font-weight:750;
    cursor:pointer;
}
@media(max-width:768px){
    .edit-description-heading{
        display:block;
    }
    .edit-description-actions{
        margin-top:10px;
    }
    .edit-description-html textarea#description-html{
        min-height:360px;
        font-size:.82rem;
    }
    .description-preview{
        min-height:420px;
    }
    .description-template-tools>.button{
        flex:1 1 170px;
    }
}


/* Automatic eBay sync setup/status */
.auto-sync-card{
    display:grid;
    gap:12px;
}
.auto-sync-setup{
    display:grid;
    gap:12px;
    max-width:780px;
}
.auto-sync-setup>label:not(.inline-check-label){
    display:grid;
    gap:6px;
    font-weight:750;
}
.auto-sync-setup input[type='email']{
    width:100%;
    min-height:44px;
    padding:9px 11px;
    border:1px solid var(--cg-border-strong);
    border-radius:9px;
    background:var(--cg-surface);
    color:var(--cg-text);
    font:inherit;
}
.auto-sync-setup .actions{
    margin-top:0;
}
@media(max-width:768px){
    .auto-sync-card .panel-header{
        align-items:flex-start;
    }
    .auto-sync-setup .actions{
        display:grid;
        grid-template-columns:1fr;
    }
    .auto-sync-setup .button{
        width:100%;
        justify-content:center;
    }
}


/* Phone-first order picking focus mode */
.order-focus-nav{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    margin:0 0 16px;
}
.order-focus-position{
    color:var(--cg-text-secondary);
    font-size:.88rem;
    font-weight:800;
    text-align:center;
}
.order-focus-back{
    grid-column:1/-1;
    justify-self:center;
    color:var(--cg-primary);
    font-size:.86rem;
    font-weight:750;
}
.order-pick-card.is-focused{
    border-color:#b8cbe5;
    box-shadow:var(--cg-shadow-raised);
}
.order-pick-statuses{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:7px;
}
.pick-check{
    display:inline-flex;
    align-items:center;
    min-height:42px;
    margin:0;
    padding:7px 10px;
    border:1px solid var(--cg-border-strong);
    border-radius:9px;
    background:var(--cg-surface-soft);
    color:var(--cg-text);
    font-size:.84rem;
    font-weight:800;
    cursor:pointer;
}
.pick-check input{
    width:20px;
    height:20px;
    margin:0 8px 0 0;
}
.order-local-pick-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:12px;
}
.order-local-pick-footer p{
    margin:0;
    color:var(--cg-text-secondary);
    font-size:.82rem;
}
.order-pick-card.is-picked-locally{
    border-color:#9fcdb2;
    background:#fbfffc;
}
.order-pick-card.is-picked-locally [data-pick-row]{
    opacity:.72;
}
.order-pick-card.is-picked-locally .pick-sku{
    text-decoration:line-through;
    text-decoration-thickness:1px;
}

@media(max-width:768px){
    .order-focus-nav{
        grid-template-columns:1fr 1fr;
        position:sticky;
        z-index:8;
        top:78px;
        padding:9px;
        border:1px solid var(--cg-border);
        border-radius:11px;
        background:rgba(255,255,255,.97);
        box-shadow:var(--cg-shadow);
        backdrop-filter:blur(10px);
    }
    .order-focus-nav .button{
        display:grid;
        place-items:center;
        min-height:48px;
        padding-inline:8px;
        text-align:center;
    }
    .order-focus-position{
        grid-column:1/-1;
        grid-row:1;
        order:-1;
    }
    .order-focus-back{
        grid-column:1/-1;
        min-height:42px;
        display:grid;
        place-items:center;
    }
    .order-pick-card.is-focused{
        margin-top:10px;
        padding-inline:12px;
    }
    .order-pick-statuses{
        justify-content:flex-start;
        margin-top:8px;
    }
    .order-pick-table td[data-label='Picked']{
        display:block!important;
        padding:12px 4px!important;
    }
    .order-pick-table td[data-label='Picked']::before{
        display:block;
        margin-bottom:6px;
    }
    .pick-check{
        width:100%;
        justify-content:center;
        min-height:50px;
        font-size:.95rem;
    }
    .pick-check input{
        width:23px;
        height:23px;
    }
    .order-local-pick-footer{
        align-items:stretch;
        flex-direction:column;
    }
    .order-local-pick-footer .button{
        min-height:46px;
        text-align:center;
    }
}


/* Inventory phone-first Quick Check */
.inventory-quick-check{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin:16px 0 0;
    padding:16px 18px;
    border:1px solid var(--cg-border);
    border-left:4px solid #738399;
    border-radius:12px;
    background:#fff;
}
.inventory-quick-check.state-success{
    border-left-color:var(--cg-success);
    background:#fbfffd;
}
.inventory-quick-check.state-warning{
    border-left-color:var(--cg-warning);
    background:#fffdfa;
}
.inventory-quick-check.state-neutral{
    border-left-color:#738399;
    background:#fcfdff;
}
.inventory-quick-check h2{
    margin:2px 0 4px;
    font-size:1.08rem;
}
.inventory-quick-check p{margin:0}
.inventory-quick-check-summary{
    color:var(--cg-text);
    font-weight:800;
}
.inventory-quick-check .muted{
    margin-top:5px;
    max-width:760px;
    font-size:.82rem;
}

@media(max-width:768px){
    .inventory-quick-check{
        align-items:stretch;
        flex-direction:column;
        gap:12px;
        padding:14px;
    }
    .inventory-quick-check .button{
        min-height:46px;
        text-align:center;
    }
}


/* Checkpoint 5 seller-flow cleanup */
.action-evidence-button{white-space:nowrap}
@media(max-width:768px){
  .panel-header{align-items:flex-start;flex-direction:column}
  .action-evidence-button{width:100%;text-align:center}
}


/* Existing PYC variation review */
.pyc-variation-search{display:block;max-width:560px;margin:12px 0 4px}
.pyc-variation-search input{max-width:none}
.pyc-variation-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.pyc-variation-order{display:block;margin:12px 0 4px}
.pyc-variation-order select{min-height:44px}
.pyc-variation-count{margin:6px 0 12px}
.pyc-variation-photo-link{display:inline-grid;place-items:center;width:58px;height:78px;border:1px solid var(--cg-border);border-radius:8px;background:var(--cg-surface-soft);overflow:hidden}
.pyc-variation-thumb{display:block;width:100%;height:100%;object-fit:contain}
.pyc-photo-missing{display:inline-grid;place-items:center;width:58px;min-height:78px;padding:6px;border:1px dashed var(--cg-border-strong);border-radius:8px;color:var(--cg-muted);font-size:.72rem;text-align:center}
@media(max-width:768px){
  .pyc-variation-search{max-width:none}
  .pyc-variation-tools{display:block}
  .pyc-variation-order,.pyc-variation-order select{display:block;width:100%}
  .pyc-variation-table td[data-label="Photo"]{justify-content:flex-start}
  .pyc-variation-table td[data-label="Photo"]::before{display:none}
  .pyc-variation-photo-link,.pyc-photo-missing{width:72px;height:96px}
}


/* Phone-first Existing PYC tables */
@media(max-width:768px){
  .pyc-listings-table,
  .pyc-listings-table tbody,
  .pyc-listings-table tr,
  .pyc-listings-table td,
  .pyc-variation-table,
  .pyc-variation-table tbody,
  .pyc-variation-table tr,
  .pyc-variation-table td{
    display:block;
    width:100%;
  }
  .pyc-listings-table thead,
  .pyc-variation-table thead{display:none}
  .pyc-listings-table tbody,
  .pyc-variation-table tbody{display:grid;gap:12px;padding:4px}
  .pyc-listings-table tr,
  .pyc-variation-table tr{
    padding:12px;
    border:1px solid var(--cg-border);
    border-radius:12px;
    background:var(--cg-surface);
    box-shadow:var(--cg-shadow);
  }
  .pyc-listings-table td,
  .pyc-variation-table td{
    display:grid;
    grid-template-columns:minmax(100px,34%) minmax(0,1fr);
    gap:12px;
    padding:8px 2px;
    overflow-wrap:anywhere;
  }
  .pyc-listings-table td::before,
  .pyc-variation-table td::before{
    content:attr(data-label);
    color:var(--cg-muted);
    font-size:.72rem;
    font-weight:800;
    text-transform:uppercase;
  }
  .pyc-listings-table td[data-label="Listing"],
  .pyc-listings-table td[data-label="Actions"],
  .pyc-variation-table td[data-label="Photo"],
  .pyc-variation-table td[data-label="Card / variation"]{
    display:block;
  }
  .pyc-listings-table td[data-label="Listing"]::before,
  .pyc-listings-table td[data-label="Actions"]::before,
  .pyc-variation-table td[data-label="Photo"]::before,
  .pyc-variation-table td[data-label="Card / variation"]::before{
    display:block;
    margin-bottom:7px;
  }
  .pyc-row-actions{justify-content:flex-start}
  .pyc-row-actions .button{flex:1 1 120px}
}


/* Existing PYC restock: photo-first, phone-friendly review */
.pyc-restock-controls{
    display:flex;
    align-items:end;
    gap:14px;
    flex-wrap:wrap;
    margin:0 0 14px;
}
.pyc-restock-controls>label:first-child{
    flex:1 1 320px;
    margin:0;
}
.pyc-restock-controls input[type="search"]{
    width:100%;
}
.pyc-restock-table td[data-label="Photo"]{
    width:76px;
}
.pyc-restock-thumb,
.pyc-restock-photo-missing{
    display:inline-grid;
    place-items:center;
    width:64px;
    height:84px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:9px;
    background:var(--cg-surface-soft,#f8fafc);
}
.pyc-restock-thumb{
    object-fit:contain;
}
.pyc-restock-photo-missing{
    padding:6px;
    color:var(--cg-muted,#6b7789);
    font-size:.72rem;
    text-align:center;
}
.pyc-restock-sku{
    display:block;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:1rem;
    overflow-wrap:anywhere;
}
.pyc-restock-submit{
    position:sticky;
    bottom:calc(var(--mobile-bottom-nav-height,0px) + 8px);
    display:flex;
    justify-content:flex-end;
    margin-top:14px;
    padding:10px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:color-mix(in srgb,var(--cg-surface,#fff) 94%,transparent);
    backdrop-filter:blur(8px);
    z-index:4;
}
@media(max-width:768px){
    .pyc-restock-controls{
        display:grid;
        grid-template-columns:1fr;
        align-items:stretch;
    }
    .pyc-restock-table,
    .pyc-restock-table tbody,
    .pyc-restock-table tr,
    .pyc-restock-table td,
    .pyc-restock-preview-table,
    .pyc-restock-preview-table tbody,
    .pyc-restock-preview-table tr,
    .pyc-restock-preview-table td{
        display:block;
        width:100%;
    }
    .pyc-restock-table thead,
    .pyc-restock-preview-table thead{display:none}
    .pyc-restock-table tbody,
    .pyc-restock-preview-table tbody{display:grid;gap:12px;padding:4px}
    .pyc-restock-table tr,
    .pyc-restock-preview-table tr{
        padding:12px;
        border:1px solid var(--cg-border,#dfe5ec);
        border-radius:12px;
        background:var(--cg-surface,#fff);
        box-shadow:var(--cg-shadow);
    }
    .pyc-restock-table td,
    .pyc-restock-preview-table td{
        display:grid;
        grid-template-columns:minmax(100px,34%) minmax(0,1fr);
        gap:12px;
        padding:8px 2px;
        overflow-wrap:anywhere;
    }
    .pyc-restock-table td::before,
    .pyc-restock-preview-table td::before{
        content:attr(data-label);
        color:var(--cg-muted,#6b7789);
        font-size:.72rem;
        font-weight:800;
        text-transform:uppercase;
    }
    .pyc-restock-table td[data-label="Photo"]{
        justify-content:flex-start;
    }
    .pyc-restock-table td[data-label="Photo"]::before{
        display:none;
    }
    .pyc-restock-thumb,
    .pyc-restock-photo-missing{
        width:78px;
        height:104px;
    }
    .pyc-restock-submit{
        justify-content:stretch;
    }
    .pyc-restock-submit .button{
        width:100%;
    }
}


/* Existing PYC final live review */
.pyc-live-target-grid{
    display:grid;
    grid-template-columns:minmax(180px,260px) minmax(0,1fr);
    gap:22px;
    align-items:start;
}
.pyc-live-target-photo{
    display:block;
    width:100%;
    max-height:340px;
    object-fit:contain;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:#fff;
}
.pyc-live-target-photo-missing{
    min-height:220px;
    place-items:center;
    color:var(--cg-muted,#6b7789);
}
.pyc-live-facts{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.pyc-live-add-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:14px;
}
.pyc-live-add-card{
    display:grid;
    grid-template-columns:100px minmax(0,1fr);
    gap:14px;
    padding:14px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:12px;
    background:var(--cg-surface-soft,#f8fafc);
}
.pyc-live-add-photo{
    display:grid;
    place-items:center;
    align-self:start;
    width:100px;
    min-height:132px;
    overflow:hidden;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:9px;
    background:#fff;
}
.pyc-live-add-photo img{
    display:block;
    width:100%;
    height:132px;
    object-fit:contain;
}
.pyc-live-add-copy h3{margin:3px 0 5px}
.pyc-live-add-copy p{margin:0 0 8px}
.pyc-live-add-copy dl{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:10px 0 0;
}
.pyc-live-add-copy dl>div{
    padding:8px;
    border-radius:8px;
    background:#fff;
}
.pyc-live-add-copy dt{
    color:var(--cg-muted,#6b7789);
    font-size:.7rem;
    font-weight:800;
    text-transform:uppercase;
}
.pyc-live-add-copy dd{
    margin:3px 0 0;
    overflow-wrap:anywhere;
}
.pyc-live-approval form{display:grid;gap:14px}
.pyc-live-approval code{overflow-wrap:anywhere}
@media(max-width:768px){
    .pyc-live-target-grid{grid-template-columns:1fr}
    .pyc-live-target-grid>div:first-child{max-width:230px}
    .pyc-live-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
    .pyc-live-add-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
    .pyc-live-facts{grid-template-columns:1fr}
    .pyc-live-add-card{grid-template-columns:82px minmax(0,1fr);padding:12px}
    .pyc-live-add-photo{width:82px;min-height:108px}
    .pyc-live-add-photo img{height:108px}
    .pyc-live-add-copy dl{grid-template-columns:1fr}
}


/* Photo-rich Action Center */
.action-row-main{
    display:grid;
    grid-template-columns:64px minmax(0,1fr);
    gap:12px;
    align-items:start;
}
.action-row-main small{
    display:block;
    margin-top:7px;
}
.action-row-photo{
    display:grid;
    place-items:center;
}
.action-listing-thumb,
.action-photo-missing{
    display:grid;
    place-items:center;
    width:60px;
    height:78px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:8px;
    background:var(--cg-surface-soft,#f8fafc);
}
.action-listing-thumb{
    object-fit:contain;
}
.action-photo-missing{
    padding:5px;
    color:var(--cg-muted,#6b7789);
    font-size:.68rem;
    text-align:center;
}
.action-detail-table td[data-label="Photo"]{
    width:72px;
}
@media(max-width:768px){
    .action-row-main{
        grid-template-columns:72px minmax(0,1fr);
    }
    .action-listing-thumb,
    .action-photo-missing{
        width:68px;
        height:90px;
    }
    .action-detail-table td[data-label="Photo"]{
        display:flex;
        justify-content:flex-start;
    }
    .action-detail-table td[data-label="Photo"]::before{
        display:none;
    }
}


/* Trading ordinary-listing photo upload / replace feedback */
.trading-photo-replace-pending{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:14px;
    padding:12px;
    border:1px solid var(--cg-border,#dfe5ec);
    border-radius:10px;
    background:var(--cg-surface-soft,#f8fafc);
}
.trading-photo-replace-pending[hidden]{display:none}
.trading-photo-replace-pending>span{
    flex:1 1 220px;
    overflow-wrap:anywhere;
    font-weight:700;
}
@media(max-width:520px){
    .trading-photo-replace-pending{
        align-items:stretch;
    }
    .trading-photo-replace-pending .button{
        width:100%;
    }
}


/* Listing-photo evidence in duplicate review */
.duplicate-card-photo{
    display:flex;
    justify-content:flex-start;
    margin-bottom:10px;
}
.duplicate-card-photo .action-listing-thumb,
.duplicate-card-photo .action-photo-missing{
    width:84px;
    height:112px;
}


/* Never expose description-template transport fields in the visible editor. */
.edit-description [hidden]{
    display:none !important;
}
:root[data-theme="dark"]{
    --cg-bg:#0b141c;
    --cg-surface:#12212e;
    --cg-surface-soft:#172a3a;
    --cg-sidebar:#0f1c27;
    --cg-input:#0f1c27;
    --cg-row-hover:#142636;
    --cg-border:#243a4d;
    --cg-border-strong:#3a566c;
    --cg-text:#f2f6f8;
    --cg-text-secondary:#b7c6d2;
    --cg-muted:#9fb3c2;
    --cg-primary:#61bba1;
    --cg-primary-hover:#86d2bb;
    --cg-primary-soft:#1c3b33;
    --cg-on-primary:#0b141c;
    --cg-success:#8fe0c4;
    --cg-success-soft:#1c3b33;
    --cg-warning:#fdd55c;
    --cg-warning-soft:#3e3216;
    --cg-danger:#f2a079;
    --cg-danger-soft:#3a2218;
    --cg-danger-solid:#c2412f;
    --cg-info:#b7c6d2;
    --cg-info-soft:#1f2e3b;
    --cg-neutral-soft:#1f2e3b;
    --cg-shadow:none;
    --cg-shadow-card:none;
    --cg-shadow-raised:0 12px 30px rgba(0,0,0,.4);
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-main{background:var(--cg-bg);color:var(--cg-text)}
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .listing-section,
:root[data-theme="dark"] .listing-overview,
:root[data-theme="dark"] .details-panel,
:root[data-theme="dark"] .action-summary-card,
:root[data-theme="dark"] .batch-card,
:root[data-theme="dark"] .edit-section{background:var(--cg-surface);border-color:var(--cg-border);color:var(--cg-text)}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea{background:#101c2a;color:var(--cg-text);border-color:var(--cg-border-strong)}
:root[data-theme="dark"] .listing-main-photo,
:root[data-theme="dark"] .listing-overview-facts .facts>div,
:root[data-theme="dark"] .listing-section#photos>p.muted,
:root[data-theme="dark"] .listing-photo-grid a,
:root[data-theme="dark"] .variation-photo-association,
:root[data-theme="dark"] .edit-photo-card{background:var(--cg-surface-soft);border-color:var(--cg-border)}
:root[data-theme="dark"] .listing-overview-facts .facts>div strong,
:root[data-theme="dark"] .listing-detail-facts>div strong{color:var(--cg-text)}
:root[data-theme="dark"] .listing-section-nav{background:rgba(20,33,49,.96);border-color:var(--cg-border)}
:root[data-theme="dark"] .listing-section-nav a{color:var(--cg-text-secondary)}
:root[data-theme="dark"] .listing-section-nav a:hover,
:root[data-theme="dark"] .listing-section-nav a:focus-visible{background:var(--cg-primary-soft);color:var(--cg-primary)}
:root[data-theme="dark"] .inventory-more>summary{background:var(--cg-surface);color:var(--cg-text);border-color:var(--cg-border-strong)}
:root[data-theme="dark"] tbody tr:hover{background:var(--cg-surface-soft)}



@media(max-width:768px){
                                                                    .inventory-identity-review{flex-basis:100%;width:100%}
    .inventory-identity-review .button{width:100%;justify-content:center}
        }


.inventory-quick-form{margin-top:10px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.inventory-quick-fields{display:grid;grid-template-columns:minmax(0,1fr) 120px 100px;gap:10px}
.inventory-quick-fields label{display:grid;gap:5px;font-size:.82rem;font-weight:700}
.inventory-quick-fields input{width:100%;min-width:0}
.inventory-inline-save{margin-top:10px}
@media(max-width:768px){
          .inventory-quick-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .inventory-quick-fields label:first-child{grid-column:1/-1}
  .inventory-inline-save{width:100%}
}


/* Photo-first new listing batches */
.photo-batch-start{display:grid;gap:14px}
.photo-batch-upload{display:grid;gap:12px}
.photo-batch-upload>label:not(.photo-batch-dropzone){display:grid;gap:6px;max-width:560px;font-weight:700}
.photo-batch-dropzone{display:grid;gap:5px;padding:20px;border:2px dashed var(--cg-border);border-radius:14px;background:var(--cg-surface-soft);cursor:pointer}
.photo-batch-dropzone strong{font-size:1rem}
.photo-batch-dropzone span{color:var(--cg-muted);font-size:.86rem}
.photo-batch-dropzone{position:relative}
.photo-batch-dropzone.is-dragover{border-color:var(--cg-accent);outline:2px solid var(--cg-accent);outline-offset:2px}
.photo-batch-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.photo-batch-picker-button{display:inline-flex;align-items:center;justify-content:center;width:max-content;min-height:38px;padding:7px 12px;margin-top:8px;border:1px solid var(--cg-border);border-radius:9px;background:var(--cg-surface);color:var(--cg-text);font-weight:800}
.photo-batch-dropzone:focus-within{outline:2px solid var(--cg-accent);outline-offset:2px}
.photo-batch-upload-status{min-height:1.2em;font-size:.82rem;color:var(--cg-muted);font-weight:700}
.photo-batch-pair-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));align-items:start;gap:10px}
.photo-batch-pair-preview[hidden]{display:none}
.photo-batch-pair-preview-intro{grid-column:1/-1;margin:0;color:var(--cg-text-secondary);font-size:.82rem;font-weight:700}
.photo-batch-pair{display:grid;gap:6px;padding:9px;border:1px solid var(--cg-border);border-radius:11px;background:var(--cg-surface-soft);min-width:0}
.photo-batch-pair-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.photo-batch-pair-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.photo-batch-pair-heading .button{min-height:32px;padding:5px 9px;font-size:.75rem}
.photo-batch-pair-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}
.photo-batch-pair-photo{display:grid;gap:6px;min-width:0}
.photo-batch-pair-photo>strong{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--cg-muted)}
.photo-batch-pair-photo>img{display:block;width:100%;height:145px;object-fit:contain;border:0;border-radius:7px;background:transparent}
.photo-batch-pair-photo.missing{place-items:center;align-content:center;min-height:145px;border:1px dashed var(--cg-border-strong);border-radius:9px;color:var(--cg-muted)}
.photo-batch-pair-photo-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.photo-batch-pair-photo-controls .button{min-height:31px;padding:5px 6px;font-size:.7rem}
.photo-batch-upload .button:disabled{opacity:.68;cursor:not-allowed}
.photo-batch-actions{display:flex;align-items:center;justify-content:space-between;gap:16px}
.photo-batch-action-buttons{display:flex;align-items:flex-end;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.photo-batch-action-buttons form{display:grid;gap:4px;margin:0}
.photo-batch-action-buttons small{max-width:230px;color:var(--cg-muted);font-size:.7rem;line-height:1.3}
.photo-batch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:16px;margin:16px 0}
.photo-batch-list{display:grid;grid-template-columns:1fr;gap:12px;margin:16px 0}
.photo-batch-card{display:grid;grid-template-columns:minmax(250px,300px) minmax(0,1fr);gap:18px;padding:16px;border:1px solid var(--cg-border);border-radius:14px;background:var(--cg-surface);box-shadow:var(--cg-shadow);min-width:0}
.photo-batch-seller{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-content:start}
.photo-batch-reference{display:grid;gap:8px}
.photo-batch-swap-form{display:grid;grid-column:1/-1;gap:5px;margin-top:2px}
.photo-batch-swap-form .button{width:100%;min-height:36px;padding:7px 10px}
.photo-batch-swap-form small{color:var(--cg-muted);font-size:.7rem;line-height:1.35}
.photo-batch-remove-form{display:grid;grid-column:1/-1;margin-top:-3px}
.photo-batch-remove-form .button{width:100%;min-height:34px;padding:6px 10px}
.photo-batch-side{display:grid;gap:5px}
.photo-batch-side>span,.photo-batch-reference>span{font-size:.72rem;font-weight:800;color:var(--cg-muted);text-transform:uppercase;letter-spacing:.04em}
.photo-batch-seller img{display:block;width:100%;max-height:180px;object-fit:contain;border-radius:10px;background:#fff}
.photo-batch-result{display:grid;align-content:start;gap:10px;min-width:0}
.photo-route-compact{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.photo-route-compact>div{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.photo-route-compact small{color:var(--cg-muted)}
.photo-route-compact .button{flex:0 0 auto;white-space:nowrap}
.photo-recognition-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 10px;margin:0}
.photo-recognition-facts dt{font-size:.76rem;font-weight:800;color:var(--cg-muted)}
.photo-recognition-facts dd{margin:0;font-size:.86rem;overflow-wrap:anywhere}
.photo-batch-reference{grid-template-columns:70px minmax(0,1fr);align-items:center;padding:8px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.photo-batch-reference>span{grid-column:1/-1}
.photo-batch-reference img{width:70px;height:96px;object-fit:contain;border-radius:7px;background:#fff}
.photo-batch-reference small{font-size:.72rem;color:var(--cg-muted)}
.photo-batch-review{border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.photo-batch-other-matches{display:inline-block;margin:8px 0;color:var(--cg-accent);font-size:.83rem;font-weight:750;text-decoration:underline;text-underline-offset:3px}
.photo-match-search{display:grid;gap:10px;min-width:0;padding:12px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.photo-match-search h3{margin:0;font-size:1rem}
.photo-match-search>form{display:flex;align-items:end;flex-wrap:wrap;gap:8px}
.photo-match-search>form>label{display:grid;flex:1 1 200px;gap:5px;font-size:.84rem;font-weight:700}
.photo-match-search input{width:100%;min-width:0;min-height:37px}
.photo-match-search>small{color:var(--cg-muted)}
.photo-match-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:10px}
.photo-match-option{display:grid;grid-template-columns:70px minmax(0,1fr);gap:10px;align-items:start;border:1px solid var(--cg-border);border-radius:10px;padding:8px;min-width:0;background:var(--cg-surface)}
.photo-match-option>img{width:70px;height:97px;object-fit:contain;border-radius:5px;background:white}
.photo-match-option>div{display:grid;gap:6px;min-width:0}
.photo-match-option>div>small{color:var(--cg-muted)}
.photo-match-option form{display:grid;gap:6px}
.photo-match-option form>label{display:grid;gap:3px;font-size:.74rem;font-weight:700}
.photo-match-option form select{max-width:100%;width:100%}
.photo-match-option .button{width:100%;min-height:34px}
.photo-batch-review>summary{padding:9px 10px;font-weight:800;cursor:pointer}
.photo-batch-review form{display:grid;gap:10px;padding:0 10px 10px}
.photo-batch-review-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.photo-batch-review-fields label{display:grid;gap:4px;font-size:.76rem;font-weight:800}
.photo-batch-review-fields input,.photo-batch-review-fields select{width:100%;min-width:0}
.photo-batch-review-fields label:first-child,.photo-batch-review-fields label:nth-child(2){grid-column:1/-1}
.photo-batch-review .button{width:100%}
.photo-batch-review small{font-size:.72rem;color:var(--cg-muted)}
.warning-text{color:var(--cg-danger,#9b2c2c)}
@media(max-width:768px){
  .photo-batch-pair-photo>img{height:140px}
  .photo-batch-pair-heading{align-items:flex-start}
  .photo-batch-pair-actions{display:grid;grid-template-columns:1fr;width:100%}
  .photo-batch-pair-heading{display:grid;grid-template-columns:1fr}
  .photo-batch-pair-actions .button{width:100%}
  .photo-batch-actions{display:grid;grid-template-columns:1fr}
  .photo-batch-action-buttons{display:grid;grid-template-columns:1fr;width:100%}
  .photo-batch-action-buttons form,.photo-batch-action-buttons .button{width:100%}
  .photo-batch-review-fields{grid-template-columns:1fr}
  .photo-batch-review-fields label:first-child,.photo-batch-review-fields label:nth-child(2){grid-column:auto}
  .photo-batch-actions form .button{width:100%}
  .photo-batch-grid,.photo-batch-list{grid-template-columns:1fr;gap:12px}
  .photo-batch-card{grid-template-columns:1fr;padding:11px;gap:12px}
  .photo-batch-seller{grid-template-columns:repeat(2,minmax(0,1fr))}
  .photo-batch-seller img{max-height:180px}
  .photo-batch-reference{grid-column:1/-1}
  .photo-route-compact{align-items:stretch;flex-direction:column}
  .photo-route-compact .button{width:100%;text-align:center}
}


/* Dark-mode contrast corrections for seller workflows */
:root[data-theme="dark"] .photo-batch-review-fields label,
:root[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea{
    background:var(--cg-input);
    color:var(--cg-text);
    border-color:var(--cg-border-strong);
    -webkit-text-fill-color:var(--cg-text);
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder{
    color:var(--cg-muted);
    opacity:1;
    -webkit-text-fill-color:var(--cg-muted);
}
:root[data-theme="dark"] .quick-action-card,
:root[data-theme="dark"] .ebay-status-card,
:root[data-theme="dark"] .order-summary-bar>div,
:root[data-theme="dark"] .catalog-result-card,
:root[data-theme="dark"] .batch-card{
    background:var(--cg-surface);
    color:var(--cg-text);
    border-color:var(--cg-border);
}
:root[data-theme="dark"] .quick-action-card strong,
:root[data-theme="dark"] .quick-action-card h2,
:root[data-theme="dark"] .quick-action-card h3{
    color:var(--cg-text);
}
:root[data-theme="dark"] .quick-action-card span,
:root[data-theme="dark"] .photo-batch-review small,
:root[data-theme="dark"] .photo-batch-result>small{
    color:var(--cg-text-secondary);
}
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .tag{
    color:var(--cg-text-secondary);
}
:root[data-theme="dark"] .warning-text{
    color:var(--cg-danger);
}

/* Seller/catalog photo zoom: explicit magnify only, never automatic hover. */
.photo-zoom{
    position:relative;
    display:block;
    width:100%;
}
.photo-zoom-thumb{
    display:block;
    width:100%;
}
.photo-zoom-trigger{
    position:absolute;
    top:8px;
    right:8px;
    z-index:2;
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    padding:0;
    border:1px solid rgba(255,255,255,.72);
    border-radius:999px;
    background:rgba(8,17,29,.84);
    color:#fff;
    font:inherit;
    font-size:16px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 3px 12px rgba(0,0,0,.28);
}
.photo-zoom-trigger:hover,
.photo-zoom-trigger:focus-visible{
    background:rgba(21,105,205,.96);
    outline:2px solid rgba(255,255,255,.85);
    outline-offset:2px;
}
.photo-zoom-preview{
    display:none;
    position:fixed;
    z-index:250;
    inset:0;
    align-items:center;
    justify-content:center;
    padding:5vh 5vw;
    background:rgba(3,9,18,.82);
    backdrop-filter:blur(2px);
    pointer-events:auto;
}
.photo-zoom-preview img,
.photo-batch-seller .photo-zoom-preview img,
.photo-batch-reference .photo-zoom-preview img{
    display:block;
    width:auto!important;
    height:auto!important;
    max-width:min(88vw,760px)!important;
    max-height:88vh!important;
    object-fit:contain;
    border-radius:12px;
    background:#fff;
    box-shadow:0 24px 70px rgba(0,0,0,.55);
}
.photo-zoom-close{
    position:fixed;
    top:max(16px,3vh);
    right:max(16px,3vw);
    z-index:251;
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    padding:0;
    border:1px solid rgba(255,255,255,.65);
    border-radius:999px;
    background:rgba(8,17,29,.9);
    color:#fff;
    font:inherit;
    font-size:28px;
    line-height:1;
    cursor:pointer;
}
.photo-zoom-close:hover,
.photo-zoom-close:focus-visible{
    background:rgba(21,105,205,.96);
    outline:2px solid #fff;
    outline-offset:2px;
}
.photo-zoom.is-open .photo-zoom-preview{display:flex}


/* Inventory uses the same seller-photo zoom interaction as photo batches. */
.inventory-listing-thumb-wrap.photo-zoom{
    width:64px;
    flex:0 0 64px;
    overflow:visible;
}
.inventory-listing-thumb-wrap.photo-zoom .photo-zoom-trigger{
    top:3px;
    right:3px;
    width:27px;
    height:27px;
    font-size:12px;
}
.inventory-listing-thumb-wrap.photo-zoom .photo-zoom-thumb{
    width:64px;
    height:88px;
    object-fit:contain;
    border-radius:8px;
    background:#fff;
}
.inventory-identity-compare .photo-zoom{
    width:64px;
    flex:0 0 64px;
}
.inventory-identity-compare .photo-zoom-thumb{
    width:64px;
    height:88px;
    object-fit:contain;
    border-radius:8px;
    background:#fff;
}

/* Photo batch -> listing preparation */
.batch-prep-facts{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
    gap:12px;
    margin:0;
}
.batch-prep-facts div{
    padding:12px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    background:var(--cg-surface-subtle);
}
.batch-prep-facts dt{
    color:var(--cg-muted);
    font-size:.78rem;
    font-weight:700;
}
.batch-prep-facts dd{
    margin:4px 0 0;
    font-weight:700;
}
.batch-prep-photos{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,220px));
    gap:16px;
    align-items:start;
}
.batch-prep-photos>div{
    display:grid;
    gap:7px;
}
.batch-prep-photos .batch-prep-photo{
    width:100%;
    min-height:180px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    padding:8px;
    background:var(--cg-surface-subtle);
}
.batch-prep-photos .photo-zoom-thumb{
    width:100%;
    height:250px;
    object-fit:contain;
}
.batch-prep-fields{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.batch-prep-field-full{
    grid-column:1/-1;
}
.batch-prep-description-heading{
    align-items:flex-start;
    gap:14px;
}
.batch-prep-form textarea{
    width:100%;
}
.batch-prep-save-bar{
    position:sticky;
    bottom:8px;
    z-index:12;
    display:flex;
    align-items:center;
    gap:12px;
    margin:16px 0 22px;
    padding:12px;
    border:1px solid var(--cg-border-strong);
    border-radius:12px;
    background:var(--cg-surface);
    box-shadow:0 6px 20px #1322381c;
}
.batch-prep-save-bar span{
    color:var(--cg-muted);
    font-size:.86rem;
}
.batch-prep-next{
    border-width:2px;
}
.photo-batch-continue{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:9px;
    margin-top:12px;
}
.photo-batch-continue small{
    flex-basis:100%;
}
@media(max-width:720px){
    .batch-prep-fields{
        grid-template-columns:minmax(0,1fr);
    }
    .batch-prep-field-full{
        grid-column:auto;
    }
    .batch-prep-photos{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }
    .batch-prep-photos .photo-zoom-thumb{
        height:210px;
    }
    .batch-prep-save-bar{
        justify-content:space-between;
    }
}


/* Account and listing settings */
.settings-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 18px;
    padding:6px;
    border:1px solid var(--cg-border);
    border-radius:12px;
    background:var(--cg-surface);
}
.settings-tabs a{
    min-height:38px;
    padding:8px 12px;
    border-radius:8px;
    color:var(--cg-text-secondary);
    font-weight:750;
    text-decoration:none;
}
.settings-tabs a:hover,.settings-tabs a:focus-visible{
    background:var(--cg-primary-soft);
    color:var(--cg-primary);
}
.settings-section{overflow:visible}
.settings-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px 18px;
}
.settings-grid label{margin:0}
.settings-grid input{max-width:none}
.settings-status-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.settings-status-grid>div{
    display:grid;
    gap:6px;
    padding:14px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    background:var(--cg-surface-soft);
}
.settings-status-grid span{
    color:var(--cg-text-secondary);
    font-size:.78rem;
    font-weight:750;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.settings-status-grid small{color:var(--cg-text-secondary)}
.settings-token-row{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:10px 0 14px;
}
.settings-token{
    min-height:34px;
    padding:6px 9px;
    border:1px solid var(--cg-border);
    border-radius:8px;
    background:var(--cg-surface-soft);
    color:var(--cg-text);
    font:inherit;
    font-size:.8rem;
    font-weight:700;
    cursor:pointer;
}
.settings-token:hover,.settings-token:focus-visible{
    border-color:var(--cg-primary);
    color:var(--cg-primary);
}
@media(max-width:768px){
    .settings-token{min-width:44px;min-height:44px}
}
.settings-description-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
}
.settings-description-heading label{margin:0}
#settings-description-template{
    width:100%;
    max-width:none;
    min-height:320px;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:.86rem;
}
.settings-description-preview{
    width:100%;
    min-height:420px;
    border:1px solid var(--cg-border);
    border-radius:10px;
    background:#fff;
}
.settings-save-bar{
    display:flex;
    align-items:center;
    gap:12px;
    margin:18px 0 24px;
    padding:12px;
    border:1px solid var(--cg-border-strong);
    border-radius:12px;
    background:var(--cg-surface);
}
.settings-save-bar span{
    color:var(--cg-text-secondary);
    font-size:.86rem;
}
:root[data-theme="dark"] .settings-tabs,
:root[data-theme="dark"] .settings-save-bar,
:root[data-theme="dark"] .settings-status-grid>div{
    background:var(--cg-surface);
    color:var(--cg-text);
}
@media(max-width:768px){
    .settings-grid,.settings-status-grid{grid-template-columns:1fr}
    .settings-description-heading{display:block}
    .settings-description-heading .actions{margin-top:10px}
    .settings-save-bar{justify-content:space-between}
}


/* Inventory per-field editing: compact pencil controls instead of a cramped Quick edit drawer. */
.inventory-card-name-line{
    display:grid;
    gap:2px;
    margin-bottom:4px;
}
.inventory-card-name-line>small,
.inventory-inline-identity>div>small{
    color:var(--cg-muted);
    font-size:.68rem;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.inventory-editable-value{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-width:0;
}
.inventory-editable-value>span{
    min-width:0;
    overflow-wrap:anywhere;
}
.inventory-inline-field-editor{
    position:relative;
    display:inline-block;
    flex:0 0 auto;
}
.inventory-inline-field-editor>summary{
    list-style:none;
}
.inventory-inline-field-editor>summary::-webkit-details-marker{display:none}
.inventory-pencil{
    display:grid;
    place-items:center;
    width:25px;
    height:25px;
    padding:0;
    border:1px solid transparent;
    border-radius:7px;
    background:transparent;
    color:var(--cg-primary);
    font-size:.88rem;
    font-weight:900;
    line-height:1;
    cursor:pointer;
}
.inventory-pencil:hover,.inventory-pencil:focus-visible{
    border-color:var(--cg-border-strong);
    background:var(--cg-primary-soft);
}
.inventory-inline-field-editor>form{
    position:absolute;
    z-index:30;
    top:30px;
    left:0;
    display:grid;
    gap:8px;
    width:min(340px,70vw);
    padding:12px;
    border:1px solid var(--cg-border-strong);
    border-radius:10px;
    background:var(--cg-surface);
    box-shadow:var(--cg-shadow-raised);
}
.inventory-inline-field-editor>form label{
    margin:0;
    font-size:.78rem;
}
.inventory-inline-field-editor>form input{
    width:100%;
    max-width:none;
}
.inventory-inline-field-editor>form .button{
    width:max-content;
    min-height:34px;
    padding:6px 10px;
}
.inventory-inline-field-editor>form small{
    color:var(--cg-muted);
    font-size:.7rem;
    line-height:1.35;
}
.inventory-marketplace-value .inventory-inline-field-editor>form{
    left:auto;
    right:0;
}
.inventory-inline-identity{
    gap:6px;
}
.inventory-inline-identity>div{
    display:grid;
    gap:1px;
}
:root[data-theme="dark"] .inventory-header-stats{
    background:var(--cg-surface);
    color:var(--cg-text-secondary);
    border-color:var(--cg-border);
}
:root[data-theme="dark"] .inventory-inline-field-editor>form{
    background:var(--cg-surface);
    color:var(--cg-text);
}
@media(max-width:768px){
    .inventory-inline-field-editor>form,
    .inventory-marketplace-value .inventory-inline-field-editor>form{
        position:fixed;
        z-index:80;
        left:14px;
        right:14px;
        top:auto;
        bottom:76px;
        width:auto;
        max-height:55vh;
        overflow:auto;
    }
}


/* Checkpoint 24: phone-first List Cards/history polish. */
.photo-batch-history-table{width:100%}
.photo-batch-history-table td:first-child a{font-weight:700}
@media(max-width:720px){
  .photo-batch-history-table thead{display:none}
  .photo-batch-history-table,
  .photo-batch-history-table tbody,
  .photo-batch-history-table tr,
  .photo-batch-history-table td{display:block;width:100%}
  .photo-batch-history-table tr{
    margin:0 0 10px;
    padding:12px;
    border:1px solid var(--border,#dce2e8);
    border-radius:10px;
  }
  .photo-batch-history-table td{
    padding:3px 0;
    border:0;
  }
  .photo-batch-history-table td:nth-child(2)::before{content:"Cards: ";font-weight:650}
  .photo-batch-history-table td:nth-child(3)::before{content:"Matched: ";font-weight:650}
  .photo-batch-history-table td:nth-child(4)::before{content:"Review: ";font-weight:650}
  .photo-batch-history-table td:nth-child(5)::before{content:"Status: ";font-weight:650}
  .photo-batch-confirm-actions form,
  .photo-batch-confirm-actions .button,
  .photo-batch-continue .button{width:100%}
}




/* Phone dark-mode contrast fixes from checkpoint-23 manual review. */
:root[data-theme="dark"] .notice.warning{
  background:var(--cg-warning-soft);
  border-color:#8b6b28;
  color:#ffe5a3;
}
:root[data-theme="dark"] .notice.warning strong,
:root[data-theme="dark"] .notice.warning li{color:#ffe5a3}
:root[data-theme="dark"] .photo-batch-history-table tr{
  background:var(--cg-surface-soft);
  border-color:var(--cg-border);
  color:var(--cg-text);
}
:root[data-theme="dark"] .photo-batch-history-table td{
  color:var(--cg-text);
}
:root[data-theme="dark"] .photo-batch-history-table td::before{
  color:var(--cg-muted);
}
:root[data-theme="dark"] .photo-batch-history-table a{
  color:var(--cg-primary);
}
:root[data-theme="dark"] .edit-photo-card,
:root[data-theme="dark"] .edit-photo-add{
  background:var(--cg-surface-soft);
  border-color:var(--cg-border);
  color:var(--cg-text);
}
:root[data-theme="dark"] .edit-photo-card:first-child{
  background:var(--cg-primary-soft);
  border-color:var(--cg-primary);
}
:root[data-theme="dark"] .edit-photo-position,
:root[data-theme="dark"] .edit-photo-add label{
  color:var(--cg-text-secondary);
}
:root[data-theme="dark"] .edit-photo-move,
:root[data-theme="dark"] .edit-photo-replace,
:root[data-theme="dark"] .edit-photo-delete,
:root[data-theme="dark"] .edit-photo-add-icon,
:root[data-theme="dark"] .edit-photo-add input[type=file]{
  background:var(--cg-surface);
  border-color:var(--cg-border-strong);
  color:var(--cg-text);
}
:root[data-theme="dark"] .edit-photo-replace{
  color:var(--cg-primary);
}
:root[data-theme="dark"] .edit-photo-delete{
  color:var(--cg-danger);
  background:var(--cg-danger-soft);
}

/* List Cards: seller-facing work queue instead of batch-history table. */
.photo-batch-label-option{
  margin:10px 0 0;
}
.photo-batch-label-option>summary{
  cursor:pointer;
  width:max-content;
  color:var(--cg-muted);
  font-size:.82rem;
  font-weight:700;
}
.photo-batch-label-option label{
  max-width:520px;
  margin:10px 0 0;
}
.photo-session-work,
.photo-session-history{
  overflow:hidden;
}
.photo-session-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.photo-session-card{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:12px;
  border:1px solid var(--cg-border);
  border-radius:12px;
  background:var(--cg-surface-soft);
  min-width:0;
}
.photo-session-card.is-older{
  opacity:.88;
}
.photo-session-image{
  display:grid;
  place-items:center;
  width:72px;
  min-width:72px;
}
.photo-session-thumb{
  display:block;
  width:58px;
  height:80px;
  object-fit:contain;
  border:1px solid var(--cg-border);
  border-radius:7px;
  background:var(--cg-surface);
}
.photo-session-thumb-missing{
  display:grid;
  place-items:center;
  color:var(--cg-muted);
  font-weight:900;
  letter-spacing:.08em;
}
.photo-session-main{
  min-width:0;
}
.photo-session-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.photo-session-heading>div{
  min-width:0;
}
.photo-session-heading h3{
  margin:0 0 2px;
  color:var(--cg-text);
  font-size:.96rem;
  line-height:1.3;
}
.photo-session-heading p{
  margin:0;
  font-size:.75rem;
}
.photo-session-heading .status-pill{
  flex:0 0 auto;
}
.photo-session-progress{
  margin:8px 0 0;
  color:var(--cg-text-secondary);
  font-size:.8rem;
}
.photo-session-card>.button,
.photo-session-actions>.button{
  min-width:96px;
  text-align:center;
}
.photo-session-actions{
  display:grid;
  gap:8px;
  align-content:center;
  min-width:96px;
}
.photo-session-shelf{
  margin:0;
}
.photo-session-shelf .button{
  width:100%;
  min-height:44px;
}
.photo-session-more{
  margin:12px 0 0;
}
.photo-session-more .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  max-width:100%;
  text-align:center;
}
.photo-session-actions>.button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.photo-session-history>summary{
  cursor:pointer;
  font-weight:800;
}
.photo-session-history .photo-session-list.compact{
  margin-top:12px;
}
.photo-session-history .photo-session-card{
  grid-template-columns:58px minmax(0,1fr) auto;
  padding:10px 11px;
}
.photo-session-history .photo-session-image{
  width:58px;
  min-width:58px;
}
.photo-session-history .photo-session-thumb{
  width:46px;
  height:64px;
}
:root[data-theme="dark"] .photo-session-card{
  background:var(--cg-surface-soft);
  border-color:var(--cg-border);
  color:var(--cg-text);
}
:root[data-theme="dark"] .photo-session-thumb{
  background:var(--cg-surface);
  border-color:var(--cg-border);
}
@media(max-width:720px){
  .photo-session-card,
  .photo-session-history .photo-session-card{
    grid-template-columns:62px minmax(0,1fr);
    gap:11px;
  }
  .photo-session-image,
  .photo-session-history .photo-session-image{
    grid-row:1 / span 2;
    width:62px;
    min-width:62px;
  }
  .photo-session-thumb,
  .photo-session-history .photo-session-thumb{
    width:54px;
    height:74px;
  }
  .photo-session-heading{
    display:block;
  }
  .photo-session-heading .status-pill{
    display:inline-flex;
    margin-top:6px;
  }
  .photo-session-card>.button,
  .photo-session-actions{
    grid-column:2;
    width:100%;
  }
  .photo-session-actions{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  .photo-batch-label-option>summary{
    width:auto;
  }
}


/* Smart Intake routing: CardGremlin chooses the next seller outcome. */
.photo-routing-summary{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);
  gap:18px;
  align-items:center;
  overflow:hidden;
}
.photo-routing-summary h2{
  margin-bottom:4px;
}
.photo-routing-counts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.photo-routing-counts>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  padding:9px 11px;
  border:1px solid var(--cg-border);
  border-radius:9px;
  background:var(--cg-surface-soft);
}
.photo-routing-counts span{
  color:var(--cg-text-secondary);
  font-size:.75rem;
  font-weight:700;
}
.photo-routing-counts strong{
  color:var(--cg-text);
  font-size:1.05rem;
}
.photo-route-card{
  display:grid;
  gap:8px;
  margin-top:12px;
  padding:12px;
  border:1px solid var(--cg-border);
  border-radius:10px;
  background:var(--cg-surface-soft);
}
.photo-route-card .page-eyebrow{
  margin:0;
}
.photo-route-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.photo-route-heading h3{
  margin:0;
  min-width:0;
  color:var(--cg-text);
  font-size:1rem;
  overflow-wrap:anywhere;
}
.photo-route-card>p{
  margin:0;
  color:var(--cg-text-secondary);
  font-size:.82rem;
  line-height:1.45;
}
.photo-route-target,
.photo-route-evidence{
  display:block;
  color:var(--cg-muted);
  line-height:1.4;
}
.photo-route-next{
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  align-items:center;
  gap:10px;
  margin-top:2px;
}
.photo-route-next>small{
  min-width:0;
  color:var(--cg-muted);
  overflow-wrap:anywhere;
}
.photo-route-new-single,
.photo-route-restock-existing-single,
.photo-route-restock-existing-pyc,
.photo-route-add-to-existing-pyc{
  border-color:color-mix(in srgb,var(--cg-primary) 40%,var(--cg-border));
}
.photo-route-new-pyc-candidate{
  border-color:color-mix(in srgb,#8b5cf6 45%,var(--cg-border));
}
.photo-route-existing-duplicates-review,
.photo-route-pyc-destination-review,
.photo-route-routing-review{
  border-color:color-mix(in srgb,#d97706 55%,var(--cg-border));
}
:root[data-theme="dark"] .photo-routing-counts>div,
:root[data-theme="dark"] .photo-route-card{
  background:var(--cg-surface-soft);
  border-color:var(--cg-border);
}
@media(max-width:820px){
  .photo-routing-summary{
    grid-template-columns:1fr;
  }
}
@media(max-width:600px){
  .photo-routing-counts{
    grid-template-columns:1fr 1fr;
  }
  .photo-route-heading{
    display:block;
  }
  .photo-route-heading .status-pill{
    display:inline-flex;
    margin-top:6px;
  }
  .photo-route-next{
    grid-template-columns:1fr;
    width:100%;
  }
  .photo-route-next>.button{
    width:100%;
    text-align:center;
  }
}


/* Unified Smart Intake plan: one mixed-session review instead of separate tools. */
.photo-plan-grid{
  display:grid;
  gap:12px;
  margin:18px 0;
}
.photo-plan-card{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:16px;
  align-items:start;
  padding:14px;
  border:1px solid var(--cg-border);
  border-radius:12px;
  background:var(--cg-surface);
}
.photo-plan-visual{
  display:grid;
  place-items:center;
  min-width:0;
}
.photo-plan-visual .photo-zoom-thumb{
  width:92px;
  max-height:128px;
  object-fit:contain;
}
.photo-plan-main{
  min-width:0;
}
.photo-plan-main>h3{
  margin:2px 0 8px;
  color:var(--cg-text);
  font-size:1rem;
  line-height:1.35;
}
.photo-plan-main>.photo-route-card{
  margin-top:0;
}
:root[data-theme="dark"] .photo-plan-card{
  background:var(--cg-surface);
  border-color:var(--cg-border);
}
@media(max-width:640px){
  .photo-plan-card{
    grid-template-columns:76px minmax(0,1fr);
    gap:11px;
    padding:11px;
  }
  .photo-plan-visual .photo-zoom-thumb{
    width:68px;
    max-height:96px;
  }
}

/* Prominent, centered recognition status without a backdrop; sellers can still use the page and save drafts. */
.cg-recognition-tray{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1300;display:grid;gap:10px;width:min(500px,calc(100vw - 28px));padding:19px;border:2px solid var(--cg-accent);border-radius:15px;background:var(--cg-surface);color:var(--cg-text);box-shadow:0 12px 38px rgba(0,0,0,.34)}
.cg-recognition-tray-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cg-recognition-tray-heading>strong{font-size:1.12rem}
.cg-recognition-tray-heading .button{min-height:26px;padding:2px 8px}
.cg-recognition-tray-message{color:var(--cg-text-secondary);font-size:.93rem}
.cg-recognition-tray progress{display:block;width:100%;height:13px;accent-color:var(--cg-accent)}
.cg-recognition-tray-open{justify-self:stretch;text-align:center;font-size:.9rem;min-height:42px}
.cg-recognition-tray.is-complete{border-color:var(--cg-accent)}
@media(max-width:600px){.cg-recognition-tray{width:calc(100vw - 28px);padding:16px}}

.photo-plan-correct{display:grid;gap:8px;margin-top:10px;min-width:0;border:1px solid var(--cg-border);border-radius:9px;padding:10px}
.photo-plan-correct>summary{cursor:pointer;font-weight:750;color:var(--cg-accent)}
.photo-plan-correct[open]>summary{margin-bottom:8px}
.photo-plan-correct .photo-batch-review{margin-top:8px}
.photo-plan-correct .photo-batch-confirm-actions{display:grid;gap:10px}
.photo-plan-correct .photo-batch-review-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){.photo-plan-correct .photo-batch-review-fields{grid-template-columns:1fr}}


/* One-card-at-a-time preparation keeps the saved seller defaults and review gate. */
.batch-guided-start,.batch-guided-progress,.batch-guided-final{display:grid;gap:10px}
.batch-guided-start h2,.batch-guided-final h2{margin:0}
.batch-guided-progress p,.batch-guided-start p,.batch-guided-final p{margin:0}
.batch-guided-progress progress{display:block;width:100%;height:11px;accent-color:var(--cg-accent)}
.batch-guided-progress .actions,.batch-guided-start .actions,.batch-guided-final .actions{display:flex;flex-wrap:wrap;gap:8px}
.batch-guided-summary-row .photo-plan-visual>img{display:block;width:100%;max-width:100px;height:135px;object-fit:contain}
.batch-guided-summary-row .photo-plan-main{min-width:0}
.batch-guided-summary-row .photo-plan-main p{margin:5px 0}
.batch-prep-save-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
@media(max-width:600px){
  .batch-guided-progress .actions>.button,.batch-guided-start .actions>.button,.batch-guided-final .actions>.button{width:100%}
  .batch-guided-summary-row .photo-plan-visual>img{height:110px}
}


/* Batch listing editor: dense desktop grid and genuinely usable phone rows. */
.batch-grid-form{min-width:0}
.batch-grid-scroll{width:100%;overflow-x:auto;border:1px solid var(--cg-border);border-radius:11px;background:var(--cg-surface)}
.batch-grid-table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:1210px;font-size:.82rem}
.batch-grid-table th{position:sticky;top:0;z-index:1;padding:8px 7px;background:var(--cg-surface-soft);color:var(--cg-text-secondary);text-align:left;font-size:.73rem}
.batch-grid-table td{vertical-align:middle;padding:6px 7px;border-top:1px solid var(--cg-border);min-width:0}
.batch-grid-table th:first-child{width:64px}
.batch-grid-table th:nth-child(2){width:148px}
.batch-grid-table th:nth-child(3){width:112px}
.batch-grid-table th:nth-child(4){width:225px}
.batch-grid-table th:nth-child(5){width:85px}
.batch-grid-table th:nth-child(6){width:63px}
.batch-grid-table th:nth-child(7){width:130px}
.batch-grid-table th:nth-child(8){width:145px}
.batch-grid-table th:nth-child(9){width:125px}
.batch-grid-table th:last-child{width:105px}
.batch-grid-table input,.batch-grid-table select,.batch-grid-table textarea{display:block;box-sizing:border-box;width:100%;min-width:0;padding:7px 8px;font-size:.8rem;line-height:1.3;color:var(--cg-text);background:var(--cg-surface);border:1px solid var(--cg-border);border-radius:6px}
.batch-grid-table input:focus,.batch-grid-table select:focus,.batch-grid-table textarea:focus{outline:2px solid var(--cg-accent);outline-offset:0}
.batch-grid-table tbody tr:nth-child(even){background:var(--cg-surface-soft)}
.batch-grid-photo{max-width:56px}
.batch-grid-photo .photo-zoom{display:block;width:56px;max-width:56px}
.batch-grid-photo .photo-zoom-thumb{display:block;width:56px;height:76px;object-fit:contain;border-radius:5px}
.batch-grid-photo .photo-zoom-trigger{width:22px;height:22px;font-size:.72rem}
.batch-grid-ordinal{font-size:.69rem;color:var(--cg-muted)}
.batch-grid-identity{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.batch-grid-change-match{display:flex;align-items:center;min-height:36px;max-width:100%;width:fit-content;white-space:normal;overflow-wrap:anywhere;line-height:1.25;color:var(--cg-accent);font-weight:750;text-decoration:underline;text-underline-offset:2px}
.batch-grid-store-category{display:grid;gap:4px;margin-top:7px;min-width:0;color:var(--cg-muted);font-size:.68rem;font-weight:750}
.batch-grid-store-category select{min-height:36px;padding:6px;font-size:.75rem}
.batch-grid-store-category small{font-size:.66rem;font-weight:500;line-height:1.25;white-space:normal}
.batch-grid-description-preview{display:block;width:100%;min-height:180px;margin-top:8px;border:1px solid var(--cg-border);border-radius:8px;background:#fff}
.batch-grid-description-preview[hidden]{display:none}
.batch-grid-identity strong{font-size:.78rem}
.batch-grid-identity small{color:var(--cg-muted)}
.batch-grid-identity-warning{padding:4px 6px;border-left:3px solid var(--cg-warning,#b45309);border-radius:3px;background:rgba(217,119,6,.1);color:var(--cg-warning,#92400e);font-size:.72rem;line-height:1.35}
:root[data-theme="dark"] .batch-grid-identity-warning{color:#fbbf24}
.batch-grid-status{font-size:.71rem;color:var(--cg-text-secondary);font-weight:700}
.batch-grid-status.ready{color:var(--cg-accent)}
.batch-grid-more{min-width:0}
.batch-grid-more>summary{cursor:pointer;font-weight:750}
.batch-grid-more[open]{min-width:220px;position:relative;z-index:2}
.batch-grid-more label{display:grid;gap:5px;margin-top:10px}
.batch-grid-more textarea{min-width:200px}
.batch-grid-more a{display:block;margin-top:7px}
.batch-grid-save{position:sticky;bottom:0;z-index:3;display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;padding:12px;background:var(--cg-surface);border:1px solid var(--cg-border);border-top:0;border-radius:0 0 11px 11px}
.batch-grid-save span{margin-right:auto;font-size:.81rem;color:var(--cg-muted)}
.batch-grid-inline-preflight{margin:16px 0;scroll-margin-top:84px;display:grid;gap:10px}
.batch-grid-inline-preflight form{margin:0}
.batch-grid-publish-confirm{display:grid;gap:10px;padding:12px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.batch-grid-publish-confirm label{display:flex;align-items:flex-start;gap:8px;margin:0;font-weight:700}
.batch-grid-publish-confirm input[type=checkbox]{margin-top:3px;flex:0 0 auto}
.batch-grid-publish-confirm .button{justify-self:start}
@media(max-width:760px){
 .batch-grid-scroll{overflow:visible;background:transparent;border:0}
 .batch-grid-table{min-width:0;width:100%;display:block}
 .batch-grid-table thead{display:none}
 .batch-grid-table tbody{display:grid;gap:10px}
 .batch-grid-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px;border:1px solid var(--cg-border);border-radius:11px;background:var(--cg-surface)}
 .batch-grid-table td{display:block;padding:0;border:0}
 .batch-grid-table td:before{content:attr(data-label);display:block;margin-bottom:4px;font-size:.69rem;font-weight:750;color:var(--cg-muted)}
 .batch-grid-table td:nth-child(2),.batch-grid-table td:nth-child(3),.batch-grid-table td:last-child{grid-column:1/-1}
 .batch-grid-table td:first-child{grid-column:1/-1}
 .batch-grid-photo,.batch-grid-photo .photo-zoom{max-width:56px}
 .batch-grid-table input,.batch-grid-table select{min-height:38px}
 .batch-grid-more[open]{min-width:0}
 .batch-grid-more textarea{min-width:0}
 .batch-grid-save{position:static;border:1px solid var(--cg-border);margin-top:12px;border-radius:11px}
 .batch-grid-save .button{width:100%}
}


/* A native dialog escapes the grid's horizontal scroll clipping. */
.batch-grid-details-button{width:100%;min-width:0;padding:7px 8px}
.batch-grid-dialog{box-sizing:border-box;position:fixed;width:min(740px,calc(100vw - 26px));max-height:min(88vh,900px);overflow:auto;margin:auto;padding:20px;border:1px solid var(--cg-border);border-radius:14px;background:var(--cg-surface);color:var(--cg-text);box-shadow:0 20px 65px rgba(0,0,0,.55)}
.batch-grid-dialog::backdrop{background:rgba(2,8,18,.76)}
.batch-grid-dialog-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.batch-grid-dialog-head h2{margin:3px 0 0;font-size:1.16rem}
.batch-grid-dialog>label{display:grid;gap:7px;font-weight:750}
.batch-grid-dialog textarea{min-height:150px;width:100%;resize:vertical}
.batch-grid-dialog h3{margin:15px 0 5px;font-size:.9rem}
.batch-grid-dialog .actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:15px}
.batch-grid-specifics{display:grid;grid-template-columns:minmax(90px,150px) 1fr;gap:6px 12px;font-size:.79rem}
.batch-grid-specifics dt{color:var(--cg-muted);font-weight:700}
.batch-grid-specifics dd{margin:0;overflow-wrap:anywhere}
.batch-grid-bulk{margin-bottom:10px;border:1px solid var(--cg-border);border-radius:9px;padding:9px 12px;background:var(--cg-surface-soft)}
.batch-grid-bulk>summary{cursor:pointer;font-size:.83rem;font-weight:750}
.batch-grid-bulk[open]>summary{margin-bottom:10px}
.batch-grid-bulk-fields{display:flex;align-items:flex-end;flex-wrap:wrap;gap:9px}
.batch-grid-bulk-fields>label{display:grid;gap:5px;flex:1 1 155px;min-width:135px;font-size:.76rem;font-weight:700}
.batch-grid-bulk-fields select,.batch-grid-bulk-fields input{box-sizing:border-box;width:100%;min-height:37px;padding:7px;border:1px solid var(--cg-border);border-radius:7px;background:var(--cg-surface);color:var(--cg-text)}
.batch-grid-bulk>small{display:block;margin-top:8px;color:var(--cg-muted)}
.batch-grid-bulk [data-batch-grid-bulk-message]{margin:5px 0}
.photo-batch-defaults{border:1px solid var(--cg-border);border-radius:9px;padding:9px 12px}
.photo-batch-defaults legend{padding:0 7px;font-size:.85rem;font-weight:750;color:var(--cg-text)}
.photo-batch-default-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}
.photo-batch-default-fields label{display:grid;gap:5px;font-size:.82rem;font-weight:700}
.photo-batch-default-fields input,.photo-batch-default-fields select{box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:7px;border:1px solid var(--cg-border);border-radius:8px;background:var(--cg-surface);color:var(--cg-text)}
.photo-batch-defaults>small{color:var(--cg-muted)}
@media(max-width:640px){.photo-batch-default-fields{grid-template-columns:1fr}
.batch-grid-dialog{padding:12px}
.batch-grid-dialog .actions>.button{width:100%}}


/* Card photos themselves are keyboard-clickable; no magnifying-glass overlays. */
.photo-zoom-clickable .photo-zoom-trigger,
.batch-grid-photo .photo-zoom-clickable .photo-zoom-trigger,
.inventory-listing-thumb-wrap.photo-zoom-clickable .photo-zoom-trigger{
    position:static;display:block;width:100%;height:auto;padding:0;margin:0;
    border:0;border-radius:8px;background:transparent;box-shadow:none;
    font:inherit;cursor:zoom-in;line-height:normal;color:inherit;text-align:inherit;
}
.photo-zoom-clickable .photo-zoom-trigger:hover,
.photo-zoom-clickable .photo-zoom-trigger:focus-visible{
    background:transparent;outline:2px solid var(--cg-accent);
    outline-offset:2px;
}
.photo-zoom-clickable .photo-zoom-trigger>.photo-zoom-thumb{width:100%;display:block}
.photo-batch-seller .photo-zoom-clickable .photo-zoom-trigger{height:auto;min-height:0}
.photo-batch-reference-compact{
    display:flex;align-items:center;gap:7px;grid-column:1/-1;
    padding:5px 7px;border:1px solid var(--cg-border);
    border-radius:8px;background:var(--cg-surface-soft);width:max-content;max-width:100%;
}
.photo-batch-reference-compact>span{font-size:.71rem;font-weight:700;color:var(--cg-muted)}
.photo-batch-reference-compact>.photo-zoom{
    width:38px;flex:0 0 38px;min-width:38px;
}
.photo-batch-reference-compact .photo-zoom-thumb,
.photo-batch-seller .photo-batch-reference-compact img.photo-zoom-thumb{
    width:38px!important;height:50px!important;max-height:50px!important;
    object-fit:contain;border-radius:5px;background:transparent;
}
.photo-batch-reference-compact>small{font-size:.69rem;color:var(--cg-muted)}
.photo-batch-review-correction{margin-top:5px}
.photo-batch-correction-locked{display:block;color:var(--cg-muted);font-size:.72rem}


/* Single-screen photo intake: recognized rows and fixable exceptions together. */
.batch-grid-recognition{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:11px 14px;margin-bottom:12px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft)}
.batch-grid-recognition small{color:var(--cg-muted)}
.batch-grid-status-notice{margin-bottom:10px}
.batch-grid-empty{margin:12px 0}
.batch-grid-empty h2{margin:0 0 4px;font-size:1rem}
.batch-grid-empty p{margin:0;color:var(--cg-muted)}
.batch-grid-change-match{display:inline-block;margin-top:6px;padding:1px 0;border:0;background:transparent;color:var(--cg-accent);font:inherit;font-size:.74rem;text-align:left;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.batch-grid-change-match:hover{text-decoration-thickness:2px}
.batch-grid-review-cards,.batch-grid-optional-corrections{display:grid;gap:12px;margin-top:14px;min-width:0}
.batch-grid-review-cards h2,.batch-grid-optional-corrections h2{font-size:1rem;margin:0}
.batch-grid-review-cards>p{margin:0;color:var(--cg-muted);font-size:.81rem}
.batch-grid-exception,.batch-grid-identity-card{padding:12px;border:1px solid var(--cg-border);border-radius:10px;background:var(--cg-surface-soft);min-width:0}
.batch-grid-exception-main{display:flex;gap:12px;align-items:start;margin-bottom:9px}
.batch-grid-exception-main>img{display:block;width:54px;height:74px;object-fit:contain;border-radius:6px}
.batch-grid-exception-main>div{display:grid;gap:5px;min-width:0}
.batch-grid-exception-main small{color:var(--cg-muted);overflow-wrap:anywhere}
.batch-grid-exception .photo-batch-review,.batch-grid-identity-card .photo-batch-review{margin:8px 0}
.batch-grid-exception .photo-batch-review-fields,.batch-grid-identity-card .photo-batch-review-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.batch-grid-identity-card>summary{cursor:pointer;font-weight:750}
.batch-grid-identity-card[open]>summary{margin-bottom:8px}
.batch-grid-optional-corrections{scroll-margin-top:20px}
.batch-grid-optional-corrections .photo-match-options{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr))}
@media(max-width:640px){.batch-grid-exception .photo-batch-review-fields,.batch-grid-identity-card .photo-batch-review-fields{grid-template-columns:1fr}}


/* Single-screen draft validation: highlight exactly what's missing. */
.batch-grid-validation-summary:not([hidden]){margin:10px 0;padding:12px 14px;border:1px solid #e36b63;border-radius:9px;background:rgba(196,55,47,.13);color:var(--cg-text);font-weight:750}
.batch-grid-row.batch-grid-needs-details{outline:1px solid rgba(230,91,82,.75);outline-offset:-1px}
.batch-grid-table .batch-grid-field-error{border:2px solid #e36560!important;box-shadow:0 0 0 1px rgba(227,101,96,.22)}
.batch-grid-table .batch-grid-field-needed{border:2px solid var(--cg-warning)!important;background:var(--cg-warning-soft)}
.batch-grid-table .batch-grid-field-error.batch-grid-field-needed{border-color:#e36560!important}
.batch-grid-field-hint{display:block;margin-top:4px;color:var(--cg-warning);font-size:.76rem;font-weight:750;line-height:1.3;overflow-wrap:anywhere}
.batch-grid-progress-copy small.batch-grid-missing{color:var(--cg-warning);font-weight:750}
.batch-grid-optional{font-weight:500;text-transform:none;letter-spacing:0}
.batch-grid-finish-label{display:grid;gap:4px;margin-top:6px;font-size:.73rem;font-weight:700}
.batch-grid-finish-label select{max-width:100%;min-height:30px}
.batch-grid-identity-inline{margin-top:6px;padding:4px 0;font-size:.73rem}
.batch-grid-identity-inline>summary{cursor:pointer;color:var(--cg-accent);font-weight:750}
.batch-grid-identity-inline label{display:grid;gap:4px;margin-top:5px}
.batch-grid-identity-inline input{max-width:100%}
.batch-grid-candidate-more{font-size:.77rem}
.batch-grid-candidate-more>summary{cursor:pointer;font-weight:750}
.batch-grid-candidate-more[open]{position:relative;z-index:2}
.batch-grid-candidate-more textarea{width:100%;min-height:80px}
.batch-grid-row.batch-grid-candidate{border-left:2px solid var(--cg-accent)}


/* Editable Pokémon item specifics without a long single-column editor. */
.batch-specifics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.batch-specific-field,.batch-specific-extra label{display:grid;gap:5px;min-width:0;font-size:.8rem;font-weight:700}
.batch-specific-field input,.batch-specific-extra input{box-sizing:border-box;min-width:0;width:100%;padding:9px;border:1px solid var(--cg-border);border-radius:7px;background:var(--cg-surface);color:var(--cg-text);font:inherit;font-weight:400}
.batch-specific-field input[readonly]{background:var(--cg-surface-soft);opacity:.85}
.batch-specifics-advanced{border:1px solid var(--cg-border);border-radius:10px;margin:12px 0;padding:10px 13px}
.batch-specifics-advanced>summary{cursor:pointer;font-size:.9rem;font-weight:750}
.batch-specifics-advanced h3{font-size:.9rem;margin:14px 0 8px}
.batch-specifics-extra-list{display:grid;gap:9px}
.batch-specific-extra{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:900px){.batch-specifics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.batch-specifics-grid,.batch-specific-extra{grid-template-columns:minmax(0,1fr)}}


/* Phone-first compact card editing: keep photo, identity, and Finish together. */
@media(max-width:760px){
  .batch-grid-table tr{
    grid-template-columns:64px minmax(0,1fr) minmax(0,1fr);
    gap:7px 9px;align-items:start;
  }
  .batch-grid-table td:first-child{grid-column:1;grid-row:1/span 2}
  .batch-grid-table td:nth-child(2){grid-column:2/-1;grid-row:1}
  .batch-grid-table td:nth-child(3){grid-column:2/-1;grid-row:2}
  .batch-grid-table td:nth-child(4){grid-column:1/-1}
  .batch-grid-table td:nth-child(5){grid-column:1/3}
  .batch-grid-table td:nth-child(6){grid-column:3/-1}
  .batch-grid-table td:nth-child(7),
  .batch-grid-table td:nth-child(8),
  .batch-grid-table td:nth-child(9),
  .batch-grid-table td:last-child{grid-column:1/-1}
  .batch-grid-table td:nth-child(2)::before{display:none}
  .batch-grid-photo{width:56px}
}

/* Seller-first batch editing: one useful progress line, not another review page. */
.batch-grid-progress{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:10px;margin:12px 0;padding:11px 14px;border:1px solid var(--cg-border);
  border-radius:10px;background:var(--cg-surface-soft);
}
.batch-grid-progress-copy{display:grid;gap:3px;min-width:0}
.batch-grid-progress-copy strong{font-size:.91rem;color:var(--cg-text)}
.batch-grid-progress-copy small{font-size:.77rem;color:var(--cg-muted)}
.batch-grid-progress-copy small.is-dirty{color:var(--cg-accent);font-weight:750}
.batch-grid-progress [data-batch-grid-next-issue]:not([hidden]){
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;
}
/* .button sets display, which would otherwise override the hidden attribute and leave this showing with nothing to fix. */
.batch-grid-progress [data-batch-grid-next-issue][hidden]{display:none!important}
.batch-grid-helper{font-size:.79rem;color:var(--cg-muted);margin:8px 0 12px}
.batch-grid-table tr.batch-grid-needs-details{scroll-margin:120px}
.batch-grid-table tr:focus{outline:2px solid var(--cg-accent);outline-offset:-2px}
.batch-grid-save{gap:9px}
.batch-grid-save .button{white-space:normal}
@media(max-width:760px){
  .batch-grid-progress{align-items:stretch;gap:9px}
  .batch-grid-progress-copy{flex:1 1 100%}
  .batch-grid-progress [data-batch-grid-next-issue]:not([hidden]){width:100%}
  .batch-grid-save{gap:8px}
  .batch-grid-save span{flex:1 1 100%;margin:0}
}

/* Spreadsheet editing: keep photo and card identity in view while scrolling. */
@media(min-width:761px){
  .batch-grid-table thead th:first-child,
  .batch-grid-table tbody td:first-child{
    position:sticky;left:0;z-index:2;background:var(--cg-surface);
  }
  .batch-grid-table thead th:nth-child(2),
  .batch-grid-table tbody td:nth-child(2){
    position:sticky;left:64px;z-index:2;background:var(--cg-surface);
    box-shadow:2px 0 0 var(--cg-border);
  }
  .batch-grid-table thead th:first-child,
  .batch-grid-table thead th:nth-child(2){
    z-index:4;background:var(--cg-surface-soft);
  }
  .batch-grid-table tbody tr:nth-child(even)>td:first-child,
  .batch-grid-table tbody tr:nth-child(even)>td:nth-child(2){
    background:var(--cg-surface-soft);
  }
  .batch-grid-table tbody td.batch-grid-zoom-active{z-index:300}
}
.batch-grid-keyboard-hint{margin:7px 4px 10px;font-size:.72rem;color:var(--cg-muted)}
.batch-grid-identity .batch-grid-status.ready{color:var(--cg-accent)}
@media(max-width:760px){
  .batch-grid-keyboard-hint{display:none}
}
.app-main .page-header{
  padding-bottom:20px;
  border-bottom:1px solid var(--cg-border);
  margin-bottom:20px;
}
.app-main .page-eyebrow{letter-spacing:.075em}
.app-main .panel{
  border-radius:14px;
  box-shadow:0 2px 16px rgba(6,20,37,.045);
}
.app-main .button,
.app-main button.button{
  border-radius:9px;
  box-shadow:none;
  font-weight:700;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease;
}
.app-main .button:focus-visible,
.app-main a:focus-visible{
  outline:2px solid var(--cg-primary);
  outline-offset:2px;
}

/* Inventory Listings is a calm, card-centric work table. */
.inventory-results.inventory-listings-redesign{
  padding:0;
  overflow:visible;
  border:1px solid var(--cg-border);
  border-radius:14px;
}
.inventory-results-header{
  align-items:center;
  gap:16px;
  padding:19px 22px;
  margin:0;
  border-bottom:1px solid var(--cg-border);
}
.inventory-results-header h2{
  font-size:1.17rem;
  letter-spacing:-.025em;
  margin:0 0 5px;
}
.inventory-results-header .muted{font-size:.82rem;line-height:1.35}
.inventory-results-header .inventory-pager{
  flex:0 0 auto;
  justify-content:flex-end;
  margin:0;
  min-height:0;
  gap:8px;
  color:var(--cg-text-secondary);
  font-size:.77rem;
  font-weight:650;
}
.inventory-results-header .inventory-pager .button{
  min-height:35px;
  padding:7px 11px;
  font-size:.78rem;
}
.inventory-results .table-scroll{
  border:0;
  border-radius:0 0 14px 14px;
}
.inventory-results .inventory-listing-thumb-wrap,
.inventory-results .inventory-listing-thumb{
  width:56px;
}
.inventory-results .inventory-listing-thumb-wrap{flex:0 0 56px}
.inventory-results .inventory-listing-thumb{height:76px}
.inventory-results .inventory-listing-thumb-missing{
  width:56px;
  height:76px;
}
.inventory-results .inventory-editable-value{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:0;
  max-width:100%;
}
.inventory-results .inventory-pencil{
  width:23px;
  height:23px;
  color:var(--cg-primary);
  opacity:.65;
  font-size:.8rem;
}
.inventory-results .inventory-pencil:hover,
.inventory-results .inventory-pencil:focus-visible,
.inventory-results .inventory-inline-field-editor[open]>.inventory-pencil{
  opacity:1;
}
.inventory-inline-field-editor[open],
.inventory-secondary-actions[open]{
  position:relative;
  z-index:40;
}
.inventory-inline-field-editor>form{
  gap:11px;
  width:min(320px,85vw);
  padding:16px;
  border-radius:13px;
  box-shadow:0 18px 55px rgba(5,17,29,.22);
}
.inventory-inline-field-editor>form label{margin:0}
.inventory-inline-field-editor>form input{min-height:40px;margin-top:6px}
.inventory-editor-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.inventory-editor-actions .button{
  min-height:36px;
  flex:1 1 0;
  padding:8px 12px;
}
.inventory-inline-field-editor>form small{
  display:block;
  border-top:1px solid var(--cg-border);
  padding-top:9px;
  font-size:.71rem;
  line-height:1.45;
}

/* Dark mode should be layered, not a large undifferentiated navy block. */
:root[data-theme="dark"] .inventory-results.inventory-listings-redesign,
:root[data-theme="dark"] .inventory-results-header{
  background:var(--cg-surface);
  border-color:var(--cg-border);
}

@media(max-width:768px){
  .inventory-results-header{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    padding:16px;
  }
  .inventory-results-header .inventory-pager{
    flex:1 1 100%;
    justify-content:space-between;
  }
              .inventory-results .inventory-listing-thumb-wrap{width:66px;flex-basis:66px}
  .inventory-results .inventory-listing-thumb{width:66px;height:90px}
                    .inventory-inline-field-editor>form,
  .inventory-marketplace-value .inventory-inline-field-editor>form{
    z-index:150;
    left:12px;
    right:12px;
    bottom:calc(82px + env(safe-area-inset-bottom));
    width:auto;
    max-height:65vh;
    padding:17px;
    border-radius:14px;
  }
}
@media(prefers-reduced-motion:reduce){
  .app-main .button{transition:none}
}


/* Native, browser-managed Inventory edit overlays. The top layer prevents
   sticky-table clipping; popover=auto supplies click-away and Escape without JS. */
.inventory-field-popover{
  position:fixed;
  inset:auto;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(350px,calc(100vw - 28px));
  max-width:calc(100vw - 28px);
  max-height:calc(100dvh - 32px);
  overflow:auto;
  margin:0;
  padding:16px;
  border:1px solid var(--cg-border-strong);
  border-radius:13px;
  background:var(--cg-surface);
  color:var(--cg-text);
  box-shadow:0 24px 64px rgba(3,12,24,.4);
  z-index:2147483647;
}
.inventory-field-popover::backdrop{background:transparent}
.inventory-field-popover form{display:grid;gap:11px;margin:0}
.inventory-field-popover form label{
  display:grid;
  gap:5px;
  margin:0;
  color:var(--cg-text-secondary);
  font-size:.78rem;
  font-weight:750;
}
.inventory-field-popover form input{
  width:100%;
  max-width:none;
  min-height:43px;
  margin:0;
  background:var(--cg-surface-soft);
  color:var(--cg-text);
}
.inventory-field-popover .inventory-editor-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.inventory-field-popover .inventory-editor-actions .button{width:100%;min-height:38px}
.inventory-field-popover form small{
  border-top:1px solid var(--cg-border);
  padding-top:9px;
  color:var(--cg-muted);
  font-size:.71rem;
  line-height:1.42;
}
.inventory-inline-field-editor>button.inventory-pencil{
  border:1px solid transparent;
  background:transparent;
  color:var(--cg-primary);
  cursor:pointer;
}
.inventory-inline-field-editor>button.inventory-pencil:hover,
.inventory-inline-field-editor>button.inventory-pencil:focus-visible{
  background:var(--cg-primary-soft);
  border-color:var(--cg-border);
}
@media(max-width:768px){
  .inventory-field-popover,
  .inventory-field-popover:popover-open{
    inset:auto;
    bottom:calc(80px + env(safe-area-inset-bottom));
    left:12px!important;
    right:12px!important;
    top:auto!important;
    width:auto;
    max-width:none;
    max-height:55dvh;
    transform:none!important;
    border-radius:15px;
    padding:19px;
  }
}
/* List Cards: leaving a page with unsaved edits asks first; a failed card is filled in by hand in its row. */
.cg-leave-guard{box-sizing:border-box;position:fixed;width:min(460px,calc(100vw - 26px));margin:auto;padding:20px;border:1px solid var(--cg-border);border-radius:14px;background:var(--cg-surface);color:var(--cg-text);box-shadow:0 20px 65px rgba(0,0,0,.55)}
.cg-leave-guard::backdrop{background:rgba(2,8,18,.76)}
.cg-leave-guard h2{margin:0 0 8px;font-size:1.1rem}
.cg-leave-guard .actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.cg-leave-guard .actions .button{min-height:48px;justify-content:center}
.batch-grid-error-note{display:block;margin-top:4px;color:var(--cg-muted)}
.batch-guided-position{margin:0 0 10px}
