/* Product library categories; no print or business behavior changes. */
#lcCategoryPanel{margin:12px 0;padding:16px;border:1px solid #e1e7ef;border-radius:12px;background:#fff;box-sizing:border-box}
#lcCategoryPanel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:none!important;padding:0!important;margin:0 0 12px!important;color:#233b55}
#lcCategoryPanel header strong{display:block;font-size:16px}#lcCategoryPanel header small{display:block;font-size:12px;color:#6a7e92;margin-top:3px}
.lc-admin-tools{display:flex;gap:8px;flex-wrap:wrap}
#lcCategoryStrip{display:flex;gap:8px;flex-wrap:wrap;padding:0;margin:0 0 8px}
#lcCategoryStrip button{border:1px solid #e0e7ef!important;border-radius:20px!important;background:#f7f9fc!important;color:#526b83!important;white-space:nowrap;min-height:40px}
#lcCategoryStrip button[aria-pressed=true]{background:#edf2ff!important;border-color:#afc0fa!important;color:#2855ff!important;font-weight:600!important}
#lcClassifyHint{font-size:12px;color:#6a7e92}
#fvFilters{grid-template-columns:repeat(3,minmax(0,1fr))}
#lcDateFilter{grid-column:1/-1;display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #e4eaf1}
#lcDateFilter label{flex:1;min-width:135px}#lcDateFilter>small{flex-basis:100%;font-size:11px;color:#75869a}
#lcDates{display:flex;flex:2;gap:10px;min-width:0}#lcDates[hidden]{display:none!important}
#lcSelected{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}#lcSelected:empty{display:none}
#lcSelected .lc-chip{border:1px solid #cbdaf0!important;background:#edf5ff!important;color:#355d87!important;font-size:12px!important;border-radius:18px!important}
#lcSavedViews{display:flex;align-items:center;gap:8px;margin:10px 0;flex-wrap:wrap}#lcSavedViews select{min-width:150px;max-width:100%;flex:1}#lcStatus{font-size:12px!important;color:#5d758b;margin:6px 0!important}#lcStatus:empty{display:none}
.lc-product-categories{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:9px}
.lc-product-categories>span{background:#eef4f8;border:1px solid #dce7ee;border-radius:5px;padding:3px 7px;color:#49667e;font-size:12px}
.lc-product-categories>button{font-size:12px!important;padding:5px 8px!important}
.lc-dialog{box-sizing:border-box;width:min(620px,95vw);max-height:90vh;overflow:auto;padding:20px;border:1px solid #d9e3ec;border-radius:14px;background:#fff;color:#243d54}
.lc-dialog::backdrop{background:#172f4760}.lc-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px;background:none!important;padding:0!important;margin:0 0 14px!important}
.lc-dialog header h2{font-size:20px!important;margin:0!important}.lc-dialog input:not([type=checkbox]),.lc-dialog select{box-sizing:border-box;width:100%;padding:10px;border:1px solid #d2deea;border-radius:8px}
.lc-dialog form{display:grid;gap:12px}.lc-dialog p{font-size:13px;line-height:1.65}.lc-manage-row{display:flex;gap:8px;align-items:center;margin-top:12px}.lc-manage-row input{flex:1;min-width:0}.lc-manage-row button{white-space:nowrap}
.lc-checkboxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.lc-checkboxes label{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px;border:1px solid #dce5ee;border-radius:8px}
@media(max-width:760px){
 #lcCategoryPanel{padding:12px;margin:8px 0 10px}
 #lcCategoryPanel>header{flex-wrap:wrap;gap:8px;margin-bottom:8px!important}
 #lcCategoryPanel header small{font-size:11px}#lcCategoryStrip{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:5px;overscroll-behavior-x:contain}
 #lcCategoryStrip button{flex:none;min-height:44px!important}
 .lc-admin-tools button{min-height:44px!important;font-size:12px!important}
 #lcDateFilter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:8px;min-width:0}
 #lcDateFilter label{min-width:0}#lcDates{grid-column:1/-1;min-width:0;width:100%;gap:8px}#lcDates>label{min-width:0;flex:1}#lcDateFilter>small{grid-column:1/-1}
 #lcSavedViews{display:grid;grid-template-columns:1fr 1fr;gap:8px}#lcSavedViews>select{grid-column:1/-1;min-width:0;width:100%}
 #lcSelected button{min-height:44px!important}
 .lc-dialog{padding:14px}.lc-dialog input,.lc-dialog select{font-size:16px!important;min-height:44px}.lc-dialog button{min-height:44px}.lc-checkboxes{grid-template-columns:minmax(0,1fr)}
 .lc-manage-row{display:grid;grid-template-columns:1fr 1fr}.lc-manage-row input{grid-column:1/-1}
}
@media print{#lcCategoryPanel,#lcSelected,#lcSavedViews,#lcStatus,.lc-product-categories>button{display:none!important}}

.lc-views-fold{margin:10px 0;border:1px solid #e1e7ef;background:#fff;border-radius:10px;padding:0 12px}.lc-views-fold>summary{cursor:pointer;font-size:13px;color:#4d6881;min-height:44px;display:flex;align-items:center}.lc-views-fold #lcSavedViews{margin:0 0 12px}@media print{.lc-views-fold{display:none!important}}

/* Stable category colors; status color never replaces its written meaning. */
#lcCategoryPanel [data-lc-tone="0"],.lc-product-categories [data-lc-tone="0"],[data-lc-status-tone=blue]{--lc-ink:#1e40af;--lc-soft:#eff6ff;--lc-line:#93b4e9}
#lcCategoryPanel [data-lc-tone="1"],.lc-product-categories [data-lc-tone="1"],[data-lc-status-tone=green]{--lc-ink:#16634b;--lc-soft:#ecfdf5;--lc-line:#80c8ae}
#lcCategoryPanel [data-lc-tone="2"],.lc-product-categories [data-lc-tone="2"],[data-lc-status-tone=purple]{--lc-ink:#6b21a8;--lc-soft:#faf5ff;--lc-line:#c5a1e6}
#lcCategoryPanel [data-lc-tone="3"],.lc-product-categories [data-lc-tone="3"]{--lc-ink:#9f2851;--lc-soft:#fff1f5;--lc-line:#e7a1b8}
#lcCategoryPanel [data-lc-tone="4"],.lc-product-categories [data-lc-tone="4"],[data-lc-status-tone=amber]{--lc-ink:#854707;--lc-soft:#fffbeb;--lc-line:#d9b46c}
#lcCategoryPanel [data-lc-tone="5"],.lc-product-categories [data-lc-tone="5"]{--lc-ink:#155e75;--lc-soft:#ecfeff;--lc-line:#8ec4d1}
#lcCategoryPanel [data-lc-tone=neutral],[data-lc-status-tone=neutral]{--lc-ink:#475569;--lc-soft:#f1f5f9;--lc-line:#a8b5c7}
#lcStatusStrip{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 14px;margin:0 0 14px;border-bottom:1px solid #e2e8f0}
#lcStatusStrip button,#lcCategoryStrip button[data-lc-tone]{display:inline-flex;align-items:center;gap:10px;background:var(--lc-soft)!important;color:var(--lc-ink)!important;border:1px solid var(--lc-line)!important;min-height:42px;padding:8px 13px;border-radius:8px!important;cursor:pointer}
#lcStatusStrip strong{font:inherit;font-weight:600;font-variant-numeric:tabular-nums}
#lcStatusStrip button[aria-pressed=true],#lcCategoryStrip button[aria-pressed=true]{background:var(--lc-ink)!important;border-color:var(--lc-ink)!important;color:#fff!important}
#lcStatusStrip button[aria-pressed=true]::before,#lcCategoryStrip button[aria-pressed=true]::before{content:"";width:5px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-right:2px}
#lcStatusStrip button:focus-visible,#lcCategoryStrip button:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
#lcStatusStrip button:hover,#lcCategoryStrip button:hover{filter:brightness(.97)}
.lc-product-categories span[data-lc-tone],.lc-machine-pending{display:inline-flex;align-items:center;padding:4px 8px!important;background:var(--lc-soft)!important;color:var(--lc-ink)!important;border:1px solid var(--lc-line)!important;border-radius:6px;font-size:12px;line-height:1.5}
#productGrid .fl-state{background:#eff6ff!important;color:#1e40af!important;border:1px solid #b6cff2}
#productGrid .fl-state.fl-state-ready{background:#ecfdf5!important;color:#16634b!important;border-color:#80c8ae}
#productGrid .fl-meta{flex-wrap:wrap;gap:6px}
@media(max-width:760px){#lcStatusStrip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#lcStatusStrip button{justify-content:space-between;white-space:normal;min-width:0;min-height:44px;font-size:13px!important}#lcStatusStrip button[aria-pressed=true]::before{position:absolute;opacity:0}#lcStatusStrip button[aria-pressed=true]{text-decoration:underline;text-underline-offset:4px}#lcCategoryStrip button{min-height:44px;font-size:13px!important}}

#lcCategoryPanel .lc-count-hint{display:block!important;margin:-4px 0 14px;color:#526177;font-size:12px;line-height:1.6}

/* Product browsing: original sort control, same cards and original actions. */
#flBrowse{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px;min-width:0}
#flBrowse label{display:flex;align-items:center;gap:8px;min-width:0;font-size:14px;color:#526177;white-space:nowrap}
#flBrowse select{min-height:44px;font-size:16px;width:auto;max-width:230px}
#flBrowse [role=group]{display:flex;gap:4px;flex-shrink:0}
#flBrowse button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 12px;border:1px solid #dce3ec;border-radius:8px;background:#fff;color:#526177;font-size:14px}
#flBrowse button svg{width:18px;height:18px}
#flBrowse button[aria-pressed=true]{background:#eff6ff;border-color:#2563eb;color:#1e40af;font-weight:600}
#flBrowse button:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view=list]:not(.fv-list-view){grid-template-columns:minmax(0,1fr)!important}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view=list] .productCard.fl-card{display:grid!important;grid-template-columns:200px minmax(0,1fr)!important;align-items:start!important}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view=list] .product-media5{height:200px!important;min-height:0!important;aspect-ratio:1!important;overflow:hidden}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view=list] .productInfo{min-width:0}
@media(max-width:760px){
 #flBrowse{gap:8px;flex-wrap:wrap}#flBrowse label{flex:1;gap:6px}#flBrowse select{width:0;flex:1;max-width:220px;min-width:0}#flBrowse button{padding:8px}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .productCard.fl-card{display:block!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .product-media5{height:auto!important;aspect-ratio:1!important;padding:4px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .productInfo{padding:10px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .productInfo :is(b,h3){font-size:15px!important;line-height:1.45!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .product-heading-machine5{display:block!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .machine-identity5{margin-top:8px}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .fl-primary{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=grid] .fl-primary button{width:100%!important;white-space:normal!important;min-height:44px!important;padding:7px!important;font-size:13px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .productCard.fl-card{grid-template-columns:104px minmax(0,1fr)!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .product-media5{width:104px!important;height:104px!important;padding:4px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .productInfo{padding:12px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .productInfo :is(b,h3){font-size:16px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .product-heading-machine5{display:block!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .fl-primary{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #library #productGrid[data-fl-view=list] .product-media5 :is(img,canvas){max-width:100%!important;max-height:100%!important;object-fit:contain!important}
}
@media print{#flBrowse{display:none!important}}

#library:has(#flBrowse) .fv-view-switch{display:none!important}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view] .productCard.fl-card{min-width:0!important;min-height:0!important;height:auto!important}
body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #library #productGrid[data-fl-view] .productInfo{min-width:0!important;width:auto!important;overflow-wrap:anywhere}
