@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');
*{box-sizing:border-box}body{margin:0;background:#f5f6fb;color:#16203a;font-family:'DM Sans',sans-serif}aside{position:fixed;width:235px;height:100vh;background:#fff;border-right:1px solid #dfe3ee;padding:38px 24px}.brand{text-decoration:none;color:#d6335a;font:800 24px Manrope,sans-serif;letter-spacing:2px}aside p{font-size:12px;color:#6b7491;margin:20px 0 45px}nav{padding:15px;background:#fde8ed;color:#b8264a;border-radius:9px;font-weight:600}.sidefoot{position:absolute;bottom:30px;font-size:11px;color:#78898d;line-height:1.8}main{margin-left:235px;padding:32px 48px;max-width:1600px}header{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:1.5px;color:#73838c}button,input,select,textarea{font:inherit}button{background:white;border:1px solid #d5dae8;border-radius:8px;padding:11px 16px;color:#27314f;cursor:pointer}button:hover{border-color:#c92f55;background:#f1f3fb}.primary{background:#d6335a;color:white;border-color:#d6335a}.primary:hover{background:#b8264a;color:white}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e9ac60;outline-offset:2px}.hero{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:45px 0 32px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#5d6690}h1{font:800 42px/1.16 Manrope,sans-serif;letter-spacing:-1.6px;margin:16px 0}p{color:#6c7e85;font-size:14px;line-height:1.6}.stats{display:flex;border:1px solid #dfe3ee;background:#fff;border-radius:12px;padding:22px 28px;gap:60px}.stats div{display:flex;align-items:center;gap:15px}.stats b{font:700 27px Manrope,sans-serif}.stats span{font-size:12px;color:#728087}.toolbar{display:flex;gap:12px;margin-top:30px}input,select,textarea{padding:12px;border:1px solid #dfe3ee;border-radius:8px;background:#fff;color:#27314f;max-width:100%}#search{flex:1;min-width:120px}#notice{font-size:12px}#grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:20px;margin-top:20px}.card{background:#fff;border:1px solid #dfe3ee;border-radius:14px;overflow:hidden}.visual{height:180px;background:#eceff8;display:flex;align-items:center;justify-content:center;color:#a9b1cb;font-size:50px}.visual img{width:100%;height:100%;object-fit:contain;padding:18px}.cardbody{padding:19px}.tag{font-size:10px;color:#5d6690;text-transform:uppercase;letter-spacing:1px}.card h3{font-size:16px;margin:10px 0;line-height:1.4}.meta{font-size:11px;color:#70828a;line-height:1.8;overflow-wrap:anywhere}.badge{display:block;background:#fff5df;color:#896521;padding:6px 9px;border-radius:5px;font-size:10px;margin:12px 0}.card button{width:100%;margin-top:10px}.empty{grid-column:1/-1;text-align:center;padding:65px 20px;border:1px dashed #dfe3ee;border-radius:16px;background:#f1f3fb}.empty h2{font:700 22px Manrope,sans-serif}.empty p{max-width:480px;margin:12px auto}.bottom{font-size:11px;color:#89979c;padding:35px 0}dialog{border:0;border-radius:16px;padding:28px;max-width:650px;width:92%;max-height:90vh;color:#27314f;box-shadow:0 20px 100px #1234}dialog::backdrop{background:#183b4766}dialog label{display:flex;flex-direction:column;gap:6px;font-size:12px;margin:10px 0}#fields,#editfields{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px}dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}h2{margin-top:0}@media(max-width:900px){aside{width:180px;padding:25px 15px}main{margin-left:180px;padding:25px}.stats{gap:25px}.hero{display:block}.hero button{margin-top:12px}h1{font-size:35px}}@media(max-width:600px){aside{position:static;width:100%;height:auto;padding:18px 20px;border-bottom:1px solid #ddd}aside p,nav,.sidefoot{display:none}main{margin:0;padding:20px}.hero{padding-top:28px}.stats{padding:15px;gap:15px}.stats div{display:block}.stats span{display:block;font-size:10px}.toolbar{flex-wrap:wrap}.toolbar input{width:100%;flex:auto}header{font-size:9px}#grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}#fields,#editfields{grid-template-columns:1fr}}

.cloud{padding:20px;margin:0 0 22px;border:1px solid #dfe3ee;border-radius:12px;background:#f1f3fb}.cloud p{font-size:12px}.cloud button{margin-bottom:8px}

#syncReview{max-width:900px}.sync-conflict{padding:16px 0;border-bottom:1px solid #dfe3ee}.sync-conflict h3{margin:0}.sync-table{overflow:auto}.sync-table table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}.sync-table th,.sync-table td{padding:10px;border:1px solid #dfe3ee;vertical-align:top;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}.sync-table th:first-child{width:20%}.sync-table thead{background:#f1f3fb}button:disabled{opacity:.5;cursor:not-allowed}

.quick{padding:20px;margin:0 0 22px;border:1px solid #dfe3ee;border-radius:12px;background:white}.quick p{font-size:12px}.quick input{display:block;width:100%;margin:8px 0 12px}.quick label{font-size:12px}.quick a{color:#d6335a}

.session-panel{margin-left:235px;padding:20px 48px 0;max-width:1600px}.session-panel p{font-size:12px;margin-bottom:0}body[data-checking] dialog{visibility:hidden}[hidden]{display:none!important}@media(max-width:900px){.session-panel{margin-left:180px;padding:20px 25px 0}}@media(max-width:600px){.session-panel{margin-left:0;padding:20px 20px 0}}

#mapping{max-width:950px}#importPreview{max-height:300px;overflow:auto}

.period-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-top:15px}.period-filters label{display:flex;flex-direction:column;gap:5px;font-size:12px}.period-filters select{min-width:150px}#filterCount{font-size:12px}

#captureStatus{padding:12px;border-left:3px solid #d6335a;background:#f1f3fb;line-height:1.6;overflow-wrap:anywhere}#quickStatus{line-height:1.6}

.language-picker{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 24px;font-size:13px}.language-picker select{width:auto;min-width:110px}

/* Long catalog values must wrap without widening cards or dialogs. */
.card,.cardbody,#editfields>* ,#fields>*{min-width:0}
.card h3,.tag,dialog h2,dialog h3,.additional-fields{overflow-wrap:anywhere}
.card h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.tag{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#editfields .full-field,#editfields .additional-fields{grid-column:1/-1}
.additional-fields p{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;background:#f1f3fb;border-radius:8px}
textarea{width:100%;resize:vertical;min-height:120px;line-height:1.5}
textarea:focus-visible{outline:3px solid #e9ac60;outline-offset:2px}
dialog{overflow:auto;max-height:90dvh}dialog footer{flex-wrap:wrap}
@media(max-width:600px){
 #grid{grid-template-columns:minmax(0,1fr)}
 dialog{padding:18px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
 input,select,textarea{font-size:16px;min-width:0}
 button{min-height:44px;white-space:normal;overflow-wrap:anywhere}
 header{gap:12px}.stats{flex-wrap:wrap}
 .period-filters label{flex:1 1 130px;min-width:0}.period-filters select{min-width:0;width:100%}
 .toolbar>*{min-width:0;max-width:100%}
 dialog footer button{flex:1 1 100px}
}

.editor-image{min-width:0}.editor-image img{display:block;width:100%;height:180px;object-fit:contain;background:#f1f3fb;border-radius:12px}.editor-image p{font-size:13px;color:#5f6884;overflow-wrap:anywhere}

.catalog-group-heading{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:baseline;gap:12px;margin:16px 0 0;padding:12px 0;border-bottom:1px solid #dfe3ee;font-size:20px;overflow-wrap:anywhere;min-width:0}.catalog-group-heading small{font-size:13px;font-weight:400;color:#5f6884}

/* Keep import review readable without allowing long source values to widen the dialog. */
#importPreview{max-width:100%;overscroll-behavior:contain;border:1px solid #dfe3ee;border-radius:8px;padding:10px}
#importPreview:empty{border:0;padding:0}
#importPreview:focus-visible{outline:3px solid #e9ac60;outline-offset:2px}
#importPreview table{width:100%;min-width:520px;table-layout:fixed;border-collapse:collapse;font-size:12px;margin:10px 0}
#importPreview th,#importPreview td{padding:10px;border:1px solid #dfe3ee;text-align:left;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}
#importPreview thead{background:#f1f3fb}
#importPreview details{margin:10px 0}
#importPreview summary{cursor:pointer;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
#importPreview p{overflow-wrap:anywhere}

/* Import navigation stays inside the dialog, including narrow screens. */
#mapping .mapping-jumps{display:flex;flex-wrap:wrap;gap:12px;background:#f1f3fb;padding:10px;margin:14px 0}
#mapping .mapping-jumps a,#mapping .mapping-return{display:inline-flex;align-items:center;min-height:44px;padding:8px;color:#d6335a;overflow-wrap:anywhere}
#mapping .mapping-help{margin:14px 0;font-size:13px;line-height:1.5}
#mapping .mapping-help summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:600}
#mapping p,#mapping small,#mapping summary{overflow-wrap:anywhere}
#mapping select{width:100%;min-width:0}
#mapping #fields,#mapping #importPreview,#mapping #columnSearch{scroll-margin-block:12px}
#mapping a:focus-visible,#mapping summary:focus-visible,#mapping #fields:focus-visible{outline:3px solid #e9ac60;outline-offset:2px}

/* The theme control is always directly available on the main screen. */
.appearance-bar{position:sticky;top:0;z-index:10;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;padding:8px 20px;background:#fff;border-bottom:1px solid #dfe3ee}
.appearance-bar .language-picker{padding:0;flex-wrap:wrap}
#themeToggle{min-height:44px}#themeToggle[aria-pressed=true]{border-color:#ff8fa3}
#themeStatus{font-size:12px;max-width:400px}
:root[data-theme=dark]{color-scheme:dark}
[data-theme=dark] body{background:#0f1526;color:#e8ebf6}
[data-theme=dark] aside,[data-theme=dark] .appearance-bar,[data-theme=dark] .card,[data-theme=dark] .stats,[data-theme=dark] .quick,[data-theme=dark] dialog{background:#19213a;color:#e8ebf6;border-color:#313c5e}
[data-theme=dark] p,[data-theme=dark] .meta,[data-theme=dark] .stats span,[data-theme=dark] .bottom,[data-theme=dark] .sidefoot,[data-theme=dark] .catalog-group-heading small,[data-theme=dark] .editor-image p{color:#bdcdd5}
[data-theme=dark] a,[data-theme=dark] .brand,[data-theme=dark] .tag,[data-theme=dark] .eyebrow,[data-theme=dark] #mapping a{color:#ff8fa3}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea,[data-theme=dark] button{background:#141b30;color:#e8ebf6;border-color:#47537a}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#afc2cc;opacity:1}
[data-theme=dark] button.primary{background:#c92f55;color:#fff;border-color:#ff8fa3}
[data-theme=dark] nav,[data-theme=dark] .cloud,[data-theme=dark] .empty,[data-theme=dark] #captureStatus,[data-theme=dark] .additional-fields p,[data-theme=dark] .editor-image img,[data-theme=dark] .sync-table thead,[data-theme=dark] #importPreview thead,[data-theme=dark] #mapping .mapping-jumps{background:#1f2945;color:#e8ebf6;border-color:#313c5e}
[data-theme=dark] .visual{background:#1f2945;color:#a4adc7}
[data-theme=dark] .badge{background:#453719;color:#ffe0a0}
[data-theme=dark] .sync-table th,[data-theme=dark] .sync-table td,[data-theme=dark] #importPreview th,[data-theme=dark] #importPreview td,[data-theme=dark] #importPreview,[data-theme=dark] .sync-conflict,[data-theme=dark] .catalog-group-heading{border-color:#313c5e}
[data-theme=dark] dialog::backdrop{background:#02080cbb}
[data-theme=dark] :focus-visible{outline:3px solid #ffd18a;outline-offset:2px}
@media(max-width:600px){.appearance-bar{padding:8px 12px;justify-content:space-between}.appearance-bar .language-picker{font-size:12px;gap:5px}.appearance-bar .language-picker select{min-width:90px;padding:8px}#themeStatus:empty{display:none}}

@media(max-width:600px){.period-filters .availability-filter{flex-basis:100%}}

#editfields .capture-field-choice{display:flex;align-items:center;gap:10px;min-height:44px}
#editfields .capture-field-choice input{width:20px;height:20px;margin:0;flex:none}

/* Personal selling declaration, separate from imagery and Amazon eligibility. */
.selling-state{padding:12px 16px;background:#edf2fa;color:#243d61;border-bottom:1px solid #71839b;font-weight:700;overflow-wrap:anywhere}
.selling-state small{display:block;margin-top:5px;font-size:12px;font-weight:400;color:inherit}
.selling-state[data-state="not_selling"]{background:#fff3df;color:#684418}
[data-theme="dark"] .selling-state{background:#23344e;color:#e2edff;border-color:#8195b5}
[data-theme="dark"] .selling-state[data-state="not_selling"]{background:#46351e;color:#ffe2ad}

.sale-price{margin:14px 0;padding:12px;border:1px solid #71839b;border-radius:8px;background:#edf2fa;color:#243d61;overflow-wrap:anywhere}
.sale-price>*{display:block}.sale-price strong{font-size:18px;margin:6px 0}.sale-price small{font-size:12px;line-height:1.6}.price-label{font-weight:700;font-size:13px}
.price-editor{border:1px solid #71839b;border-radius:10px;padding:16px;min-width:0;overflow-wrap:anywhere}.price-editor p{color:inherit}.price-editor button{margin:6px 8px 6px 0}.price-snapshot{padding:12px;margin:10px 0;background:#edf2fa;color:#243d61;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}.price-snapshot p{margin:4px 0;font-size:13px}.price-snapshot a{color:inherit}.price-editor input{width:100%}
[data-theme=dark] .sale-price,[data-theme=dark] .price-snapshot{background:#23344e;color:#e2edff;border-color:#8195b5}

.price-conflict{margin:16px 0;padding:12px;border:1px solid #71839b;border-radius:10px;overflow-wrap:anywhere}
.price-conflict-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.price-conflict-columns>section{min-width:0}.price-conflict h5,.price-conflict h6{font-size:14px;margin:12px 0}.price-conflict p{color:inherit}.price-conflict summary{cursor:pointer;padding:12px 0;font-weight:600}.price-conflict summary:focus-visible{outline:3px solid #e9ac60;outline-offset:2px}
@media(max-width:600px){.price-conflict-columns{grid-template-columns:minmax(0,1fr)}}

/* Product specifications: literal values, responsive rows, no truncation. */
.specification-group{min-width:0;margin-block:20px}
.specification-group h4{font-size:15px;line-height:1.5;overflow-wrap:anywhere;margin-bottom:8px}
.specification-group dl{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);margin:0;border-top:1px solid #6b7491}
.specification-group dt,.specification-group dd{min-width:0;margin:0;padding:12px 8px;border-bottom:1px solid #6b7491;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.6;font-size:14px}
.specification-group dt{font-weight:700}.specification-group dd{font-weight:400}
.specification-group [hidden],.specification-group[hidden]{display:none}
@media(max-width:480px){.specification-group dl{grid-template-columns:minmax(0,1fr)}.specification-group dt{border-bottom:0;padding-bottom:0}.specification-group dd{padding-top:4px}}

/* Category shelves: bounded horizontal overflow belongs only to each row. */
.category-section{grid-column:1/-1;min-width:0;max-width:100%}
.category-heading{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:18px 0 10px}
.category-heading h2{font-size:24px;font-weight:800;margin:0;overflow-wrap:anywhere;min-width:0;flex:1 1 220px}
.category-heading p{flex-basis:100%;margin:0}
.category-heading button{min-width:44px;min-height:44px}
.category-row{display:flex;gap:20px;overflow-x:auto;padding:6px 4px 16px;overscroll-behavior-x:contain}
.category-row>.card{flex:0 0 min(280px,88vw);min-width:0}
.category-full-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:20px}
.category-row:focus-visible,.category-heading button:focus-visible,.category-heading h2:focus-visible{outline:3px solid #996000;outline-offset:2px}
[data-theme=dark] .category-row:focus-visible,[data-theme=dark] .category-heading button:focus-visible,[data-theme=dark] .category-heading h2:focus-visible{outline-color:#ffce82}

/* Two declared selling states, with undeclared records kept separate. */
#grid.selling-board{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.selling-column{min-width:0;padding:16px;border:1px solid #6b7491;border-radius:14px}
.selling-products{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:20px;min-width:0}
.selling-undeclared{grid-column:1/-1}
.selling-column p{overflow-wrap:anywhere}
@media(max-width:900px){#grid.selling-board{grid-template-columns:minmax(0,1fr)}}

#categoryRename{width:min(560px,calc(100% - 24px));overflow-wrap:anywhere}
#categoryRename label{display:grid;gap:8px;margin:16px 0}
#categoryRename input{min-width:0;width:100%}

.category-destination{border:1px solid currentColor;border-radius:12px;padding:16px;min-width:0}
.category-destination label{display:grid;gap:6px;margin-bottom:12px}
.category-destination select,.category-destination input{width:100%;min-width:0}
.category-destination button{margin:4px;min-height:44px;white-space:normal}

.price-edit-trigger{font-size:1.15rem;font-weight:750;text-align:left;padding:8px 10px;min-height:44px;width:fit-content;max-width:100%;white-space:normal;overflow-wrap:anywhere;border:1px solid currentColor;border-radius:8px}
.price-edit-trigger:focus-visible{outline:3px solid #996000;outline-offset:3px}
[data-theme=dark] .price-edit-trigger:focus-visible{outline-color:#ffce82}
#quickPriceDialog{width:min(500px,calc(100% - 24px));max-height:90vh;overflow:auto;overflow-wrap:anywhere}
#quickPriceDialog label{display:grid;gap:8px;margin:14px 0}
#quickPriceDialog input,#quickPriceDialog select{width:100%;min-width:0;font-size:1.1rem}
#quickPriceDialog footer{display:flex;gap:12px;justify-content:flex-end;margin-top:20px}
#quickPriceDialog button{min-height:44px}

.editor-section{border:1px solid #71828a;border-radius:12px;min-width:0;padding:12px}
.editor-section>summary{cursor:pointer;font-weight:700;min-height:44px;padding:10px;overflow-wrap:anywhere}
.editor-section>summary:focus-visible{outline:3px solid #996000;outline-offset:2px}
[data-theme=dark] .editor-section>summary:focus-visible{outline-color:#ffce82}
.editor-section-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding-top:12px;min-width:0}
.editor-section-body>section{grid-column:1/-1;min-width:0}
@media(max-width:600px){.editor-section-body{grid-template-columns:minmax(0,1fr)}}

/* Separate card action area: never overlays photo, price, dates or sale state. */
.card-heading{display:flex;align-items:flex-start;border-bottom:1px solid #71839b;background:#edf2fa}
.card-heading .selling-state{flex:1;min-width:0;border-bottom:0;background:transparent}
.card-delete{flex:none;min-width:44px;min-height:44px;margin:8px 8px 8px 0;padding:6px;font-size:26px;line-height:1;color:#a51d29;border-color:#a51d29;background:#fff5f5}
.card-delete:hover,.card-delete-confirm:hover{background:#ffe2e4}
.card-delete-confirm{color:#a51d29;border-color:#a51d29;background:#fff5f5}
.card-delete:focus-visible,.card-delete-confirm:focus-visible,.card-delete-dialog button:focus-visible{outline:3px solid #d6335a;outline-offset:3px}
.card-delete-dialog{max-width:460px;overflow-wrap:anywhere}
.card-delete-dialog footer{flex-wrap:wrap;justify-content:space-between;margin-top:32px}
[data-theme=dark] .card-heading{background:#23344e;border-color:#8195b5}
[data-theme=dark] .card-delete,[data-theme=dark] .card-delete-confirm{color:#ffc4cb;border-color:#ffc4cb;background:#42242b}
[data-theme=dark] .card-delete:hover,[data-theme=dark] .card-delete-confirm:hover{background:#583039}
[data-theme=dark] .card-delete:focus-visible,[data-theme=dark] .card-delete-dialog button:focus-visible{outline-color:#ff8fa3}

.card:focus-visible{outline:3px solid #d6335a;outline-offset:3px;box-shadow:0 0 0 6px #fde8ed}
[data-theme=dark] .card:focus-visible{outline-color:#ff8fa3;box-shadow:0 0 0 6px #16203a}
.category-row{scroll-padding:8px;padding:8px}
.editor-navigation{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px;border:1px solid #71839b;border-radius:10px}
.editor-navigation p{flex-basis:100%;margin:0;overflow-wrap:anywhere;font-weight:700}
.editor-navigation p:focus{outline:3px solid #d6335a;outline-offset:3px}
[data-theme=dark] .editor-navigation p:focus{outline-color:#ff8fa3}

/* Card separation and restrained feedback in every catalog view.
   Only a fine primary pointer gets movement: touch needs no hover to act. */
.card{border-color:#b3bad0;box-shadow:0 1px 3px #172c3514}
[data-theme=dark] .card{border-color:#5b6790;box-shadow:0 1px 3px #0005}
.card:focus-within{border-color:#d6335a;box-shadow:0 0 0 2px #d6335a}
[data-theme=dark] .card:focus-within{border-color:#ff8fa3;box-shadow:0 0 0 2px #ff8fa3}
/* Keep the outer keyboard outline distinct from a focused control inside. */
.card:focus-visible{outline:3px solid #d6335a;outline-offset:3px;box-shadow:0 0 0 6px #fde8ed}
[data-theme=dark] .card:focus-visible{outline-color:#ff8fa3;box-shadow:0 0 0 6px #16203a}
@media(hover:hover) and (pointer:fine){
 .card{transition:box-shadow 160ms ease-out,border-color 160ms ease-out}
 .card:hover{border-color:#d6335a;box-shadow:0 2px 4px #172c3533}
 [data-theme=dark] .card:hover{border-color:#ff8fa3;box-shadow:0 2px 4px #0008}
 .card:hover:focus-within{box-shadow:0 0 0 2px #d6335a}
 [data-theme=dark] .card:hover:focus-within{box-shadow:0 0 0 2px #ff8fa3}
}
@media(prefers-reduced-motion:reduce){
 .card{transition:none}
 .card:hover{transform:none}
}
@media(forced-colors:active){
 .card,[data-theme=dark] .card{border-color:CanvasText;box-shadow:none}
 .card:focus-within,.card:hover,[data-theme=dark] .card:focus-within,[data-theme=dark] .card:hover{border-color:Highlight;box-shadow:none}
 .card:focus-visible,[data-theme=dark] .card:focus-visible{outline-color:Highlight}
}
/* Evidence is text, readable in full without widening a dialog. */
.catalog-evidence-original{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-width:100%;font:inherit}
.catalog-evidence-change{border-bottom:1px solid currentColor;padding-block:.5rem;overflow-wrap:anywhere}

.supplier-summary{margin:6px 0;padding:8px 10px;border-radius:10px;border:1px solid rgba(0,0,0,.12);font-size:.92rem}
.supplier-summary[data-purchase=ready]{border-color:#d6335a;background:rgba(23,106,91,.08)}
.supplier-summary[data-purchase=needs_supplier]{border-color:#996000;background:rgba(153,96,0,.08)}
.supplier-summary .purchase-state{display:block;margin-bottom:2px}
.supplier-row,.supplier-fees{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:10px 0;padding:10px;border:1px solid rgba(0,0,0,.15);border-radius:10px}
.supplier-row legend,.supplier-fees legend{font-weight:700}
.supplier-row textarea{grid-column:1/-1}
.supplier-margin{font-weight:600}

/* Corrección: la X de eliminar no debe ocupar todo el ancho de la tarjeta (aplastaba el estado). */
.card .card-heading{display:flex;align-items:flex-start;gap:6px}
.card .card-heading .selling-state{flex:1 1 auto;min-width:0;margin:0}
.card .card-heading .card-delete{width:44px;flex:0 0 44px;margin:8px 8px 8px 0;padding:6px}
.card .supplier-summary,.card .sale-price{margin-top:8px}

/* Tarjetas compactas estilo "fila": menos alto, misma anchura; datos secundarios viven en la ficha. */
.card .meta-secondary{display:none}
.card .visual{height:150px}
.card .visual img{max-height:100%;max-width:100%;object-fit:contain}
.card .cardbody{padding:12px 14px 14px}
.card h3{font-size:15px;line-height:1.25;margin:4px 0 2px;-webkit-line-clamp:2}
.card .meta{font-size:12px;margin:2px 0}
.card .tag{font-size:11px}
.card .sale-price{margin-top:6px;padding:0}
.card .sale-price small{display:none}
.card .price-edit-trigger{font-size:1rem;min-height:36px;padding:4px 8px}
.card .supplier-summary{margin:6px 0 0;padding:6px 8px;font-size:.85rem}
.card .supplier-summary small{display:none}
.card .card-heading{font-size:12px}
.card .card-heading .selling-state{padding:6px 10px}
.card .card-heading .selling-state small{display:none}
.card .card-heading .card-delete{min-height:32px;width:32px;flex-basis:32px;font-size:20px;margin:4px 6px 4px 0;padding:0}
.card button:not(.card-delete):not(.price-edit-trigger){margin-top:8px;min-height:36px;padding:7px 12px;font-size:13px}
.category-row>.card{flex:0 0 min(240px,80vw)}
.category-row{padding:12px 8px 20px;gap:16px}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 .card{transition:box-shadow 180ms ease-out,border-color 180ms ease-out}
 .card{transition:transform 160ms ease-out,box-shadow 160ms ease-out,border-color 160ms ease-out}
 .category-row>.card:hover{transform:scale(1.035);border-color:#d6335a;box-shadow:0 14px 30px #172c3545;position:relative;z-index:2}
 [data-theme=dark] .category-row>.card:hover,[data-theme=dark] .category-row>.card:focus-within{box-shadow:0 12px 28px #000a}
}

/* Pantallas anchas y ultrawide: contenido centrado con un ancho máximo cómodo. */
/* Un solo contenedor centrado para todo el contenido; se adapta a cualquier ancho. */
main{max-width:none}
main>.page{max-width:1400px;margin:0 auto;min-width:0}
@media(min-width:2400px){main>.page{max-width:1700px}}
.page>*{min-width:0}
.hint{font-size:12px;color:#6b7491;margin:6px 0}
[data-theme=dark] .hint{color:#a4adc7}
#exportFiltered{margin:8px 0}
#filterCount{font-weight:600;margin:10px 0 4px}
.toolbar,.period-filters{max-width:100%}
.tools-panel{margin:12px 0;border:1px solid #d5dae8;border-radius:12px;background:#fff}
.tools-panel>summary{cursor:pointer;padding:12px 16px;font-weight:700;list-style:none}
.tools-panel>summary::before{content:"▸ ";color:#d6335a}
.tools-panel[open]>summary::before{content:"▾ "}
.tools-panel .tools-body{padding:0 16px 8px}
.tools-panel .tools-body>section{margin:10px 0}
[data-theme=dark] .tools-panel{background:#19213a;border-color:#313c5e}
.hero{padding:28px 0 18px}
.hero h1{font-size:34px;margin:6px 0}

/* Limpieza visual: ficha y tarjetas con lo esencial. */
#editfields .hint,#editform .hint,dialog .hint{display:none}
#editfields label small,#priceEditor small{display:none}
.editor-section>summary{font-weight:700;padding:10px 0}
.card .card-heading .selling-state{text-transform:uppercase;letter-spacing:.06em;font-size:11px;font-weight:800;padding:7px 10px}
.card .card-heading{background:#e6e9f3}
.card .selling-state[data-state="selling"],.card .card-heading:has(.selling-state[data-state="selling"]){background:#12905f;color:#fff;border-color:#12905f}
.card .selling-state[data-state="not_selling"],.card .card-heading:has(.selling-state[data-state="not_selling"]){background:#5d6690;color:#fff;border-color:#5d6690}
.card .selling-state[data-state=""]{background:transparent;color:#4a5b63}
.card .card-heading:has(.selling-state[data-state="selling"]) .card-delete,.card .card-heading:has(.selling-state[data-state="not_selling"]) .card-delete{color:#fff;border-color:#ffffff99;background:#ffffff22}
[data-theme=dark] .card .selling-state[data-state="selling"],[data-theme=dark] .card .card-heading:has(.selling-state[data-state="selling"]){background:#12905f;color:#fff}
[data-theme=dark] .card .selling-state[data-state="not_selling"],[data-theme=dark] .card .card-heading:has(.selling-state[data-state="not_selling"]){background:#6f79a8;color:#fff}
.card .purchase-ready{color:#12905f;font-weight:700}
[data-theme=dark] .card .purchase-ready{color:#ff8fa3}
/* La tarjeta elevada no debe recortarse: espacio arriba en la fila y sin recorte vertical. */
.category-row{padding-top:22px;padding-bottom:26px;overflow-y:visible}
.category-section,.category-row{overflow-y:visible}
#grid{overflow:visible;padding-top:10px}

.editor-image{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.editor-image img{max-width:180px;max-height:180px;object-fit:contain;border-radius:10px}
.editor-head{flex:1 1 260px;min-width:0}
.editor-head .editor-name{margin:0 0 4px;font-size:18px;line-height:1.3}
.editor-head .editor-meta{margin:0 0 8px;color:#5f6884;font-size:13px}
[data-theme=dark] .editor-head .editor-meta{color:#a4adc7}
.editor-head a{display:inline-block;padding:8px 12px;border:1px solid #d6335a;border-radius:8px;color:#d6335a;text-decoration:none;font-weight:600}
[data-theme=dark] .editor-head a{color:#ff8fa3;border-color:#ff8fa3}
.editor-section[data-empty="1"]{display:none}

/* Resaltado estable: la tarjeta bajo el cursor se marca con borde y sombra, sin cambiar de tamaño ni de sitio. */
[data-theme=dark] .category-row>.card:hover{border-color:#ff8fa3;box-shadow:0 14px 30px #000b}
.category-row{overflow-y:hidden}

/* ===== Teléfono: lo primero que se ve son los productos ===== */
.filters-panel>summary{display:none}
.filters-panel,.filters-panel[open]{border:0;background:transparent;margin:0}
.filters-panel .tools-body{padding:0}
@media(max-width:600px){
 body{padding:0;-webkit-text-size-adjust:100%}
 .appearance-bar{padding:6px 12px;padding-top:max(6px,env(safe-area-inset-top))}
 .appearance-bar button,.appearance-bar select{min-height:36px;padding:6px 10px;font-size:13px}
 aside{padding:10px 16px}aside p,aside nav,aside .sidefoot{display:none}
 .brand{font-size:18px}
 .session-panel{margin:0;padding:8px 16px 0}.session-panel b{display:none}.session-panel p{margin:0}
 main{padding:10px 14px calc(24px + env(safe-area-inset-bottom))}
 main header,.hero,.bottom{display:none}
 #accountPanel{padding:10px 12px;margin:8px 0}#accountPanel>b{display:none}#accountPanel p{margin:4px 0;font-size:13px}
 #accountPanel details{display:none}
 .tools-panel{margin:8px 0}.tools-panel>summary{padding:10px 12px;font-size:14px}
 .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:10px 8px;margin:8px 0}
 .stats div{display:block;text-align:center;padding:0}.stats b{display:block;font-size:20px}.stats span{font-size:10.5px;line-height:1.2}
 .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:8px 0}
 .toolbar #search{grid-column:1/-1}.toolbar input,.toolbar button{min-height:44px;margin:0}
 .filters-panel>summary{display:block}
 .filters-panel,.filters-panel[open]{border:1px solid #d5dae8;background:#fff;margin:8px 0;border-radius:12px}
 [data-theme=dark] .filters-panel,[data-theme=dark] .filters-panel[open]{background:#19213a;border-color:#313c5e}
 .filters-panel .tools-body{padding:0 12px 10px}
 .period-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .period-filters label{min-width:0}.period-filters select{width:100%;min-width:0}
 .period-filters .availability-filter,.period-filters #clearFilters{grid-column:1/-1}
 .hint,#exportFiltered,#exportFiltered+p,#notice{display:none}
 #filterCount{font-size:12px;margin:6px 0}
 #deletedCatalog{padding:8px 12px;margin:8px 0;font-size:13px}
 .category-heading{gap:8px;margin:14px 0 4px;flex-wrap:nowrap}
 .category-heading h2{font-size:18px;flex:1 1 auto}
 .category-heading button{min-height:36px;min-width:0;padding:6px 10px;font-size:12px;margin:0;white-space:nowrap}
 .category-heading button[aria-label]{display:none}
 .category-row{gap:12px;padding:10px 2px 14px;margin:0 -14px;padding-left:14px;padding-right:14px;scroll-padding:14px;-webkit-overflow-scrolling:touch}
 .category-row>.card{flex:0 0 62vw;max-width:260px}
 .card .visual{height:130px}
 dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:14px 14px calc(14px + env(safe-area-inset-bottom))}
 dialog h2{font-size:20px;margin:4px 0 10px}
 dialog footer{position:sticky;bottom:calc(-14px - env(safe-area-inset-bottom));background:#fff;padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin-top:12px;border-top:1px solid #d5dae8;z-index:3}
 dialog footer #saveDraft{display:none}
 .editor-image img{max-width:110px;max-height:110px}
 .supplier-row,.supplier-fees{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){[data-theme=dark] dialog footer{background:#19213a;border-color:#313c5e}}
@media(hover:none){.category-row>.card:hover{transform:none}}

/* ===== Identidad de Estante: tinta azul noche, coral para las acciones y el precio como etiqueta amarilla ===== */
aside{background:#16203a;border-right-color:#16203a;color:#c9d0e6}
aside p,aside .sidefoot{color:#9aa4c4}
.brand{color:#fff;letter-spacing:3px}
aside nav{background:#ffffff14;color:#fff}
.appearance-bar{border-bottom-color:#dfe3ee}
.primary{box-shadow:0 2px 0 #a81f43}
.primary:hover{background:#c92f55}
button:hover{border-color:#aab2cc}
.stats b{color:#d6335a}
.tools-panel>summary::before{color:#d6335a}
a{color:#b8264a}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #f6b7c4;outline-offset:1px;border-color:#d6335a}
/* El precio es la etiqueta del estante: lo único que grita. */
.card .sale-price{background:transparent;border:0}
.card .sale-price .price-label{display:none}
.card .price-edit-trigger{background:#ffd84a;color:#16203a;border:1.5px solid #16203a;border-radius:4px 14px 14px 4px;font-weight:800;padding:5px 12px 5px 16px;position:relative;box-shadow:2px 2px 0 #16203a;margin-top:8px!important;width:auto!important}
.card .price-edit-trigger::before{content:"";position:absolute;left:6px;top:50%;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;background:#16203a}
.card .price-edit-trigger:hover{background:#ffe070}
.card h3{color:#16203a}
.card .tag{color:#5d6690;font-weight:700}
.supplier-summary{border-color:#dfe3ee;background:#f8f9fd}
.supplier-summary[data-purchase=ready]{border-color:#12905f;background:#e8f6ef}
.supplier-summary[data-purchase=needs_supplier]{border-color:#c98a00;background:#fff6dd}
.card .selling-state[data-state="selling"],.card .card-heading:has(.selling-state[data-state="selling"]){background:#12905f;border-color:#12905f}
.card .selling-state[data-state="not_selling"],.card .card-heading:has(.selling-state[data-state="not_selling"]){background:#5d6690;border-color:#5d6690;color:#fff}
.category-heading h2{color:#16203a}
.category-heading>span{background:#16203a;color:#fff;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700}
.editor-head a{border-color:#d6335a;color:#b8264a}
.editor-section>summary{color:#16203a}
[data-theme=dark] aside{background:#0a0f1e;border-right-color:#232c48}
[data-theme=dark] .brand{color:#fff}
[data-theme=dark] .primary{background:#d6335a;border-color:#ff8fa3;color:#fff;box-shadow:0 2px 0 #7d1731}
[data-theme=dark] .stats b{color:#ff8fa3}
[data-theme=dark] a{color:#ff8fa3}
[data-theme=dark] .card h3,[data-theme=dark] .category-heading h2,[data-theme=dark] .editor-section>summary{color:#f1f3fb}
[data-theme=dark] .card .tag{color:#a4adc7}
[data-theme=dark] .card .price-edit-trigger{background:#ffd84a;color:#16203a;border-color:#0a0f1e;box-shadow:2px 2px 0 #0a0f1e}
[data-theme=dark] .supplier-summary{border-color:#313c5e;background:#141b30}
[data-theme=dark] .supplier-summary[data-purchase=ready]{border-color:#2fbf85;background:#12332a}
[data-theme=dark] .supplier-summary[data-purchase=needs_supplier]{border-color:#e0a82e;background:#3a2f12}
[data-theme=dark] .card .card-heading{background:#232c48}
[data-theme=dark] .card .selling-state[data-state=""]{color:#a4adc7}
[data-theme=dark] .card .selling-state[data-state="selling"],[data-theme=dark] .card .card-heading:has(.selling-state[data-state="selling"]){background:#178f62}
[data-theme=dark] .card .selling-state[data-state="not_selling"],[data-theme=dark] .card .card-heading:has(.selling-state[data-state="not_selling"]){background:#59628c;color:#fff}
[data-theme=dark] .category-heading>span{background:#ff8fa3;color:#16203a}
[data-theme=dark] .editor-head a{border-color:#ff8fa3;color:#ff8fa3}
[data-theme=dark] .tools-panel>summary::before{color:#ff8fa3}
@media(max-width:600px){aside{border-bottom-color:#16203a}[data-theme=dark] aside{border-bottom-color:#232c48}.filters-panel,.filters-panel[open]{border-color:#d5dae8}}
