:root {
 --tblr-primary: #086443; --tblr-primary-rgb: 8,100,67; --tblr-body-bg: #f5f7fa;
 --tblr-body-color: #182433; --tblr-border-color: #dce3ea;
 --tblr-font-sans-serif: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
 --admin-muted: #627184; --admin-danger: #b42318; --admin-warning: #a66b00;
}
[hidden] { display: none !important; }
body { background: #f5f7fa; font-size: 15px; }
a { color: #086443; }
button,input,select { font: inherit; }
.btn,.form-control,.form-select { min-height: 44px; }
.btn-primary { --tblr-btn-bg: #086443; --tblr-btn-border-color: #086443; --tblr-btn-hover-bg: #075337; --tblr-btn-hover-border-color: #075337; --tblr-btn-active-bg: #06462f; }
:focus-visible { outline: 3px solid #a66b00; outline-offset: 3px; }
.admin-shell { display: grid; grid-template-columns: 224px minmax(0,1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 30px 18px; background: #fff; border-right: 1px solid #dce3ea; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; color: #182433; font-size: 20px; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 44px; background: #086443; color: #fff; border-radius: 8px; font-size: 23px; }
.brand small { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--admin-muted); }
.nav-caption { margin: 44px 14px 12px; font-size: 12px; color: var(--admin-muted); }
.nav-entry { display: flex; gap: 14px; align-items: center; padding: 13px 16px; margin: 6px 0; border-radius: 7px; color: #526174; font-weight: 600; text-decoration: none; }
.nav-entry span { font-size: 22px; width: 24px; text-align: center; line-height: 1; }
.nav-entry[aria-current=page] { color: #086443; background: #e9f3ee; box-shadow: inset 3px 0 #086443; }
.nav-entry:hover { background: #f0f4f2; text-decoration: none; }
.sidebar-note { position: absolute; bottom: 30px; padding: 18px 12px 0; border-top: 1px solid #dce3ea; font-size: 12px; color: var(--admin-muted); line-height: 1.8; }
.workspace { min-width: 0; }
.workspace-header { min-height: 76px; padding: 16px 36px; background: #fff; border-bottom: 1px solid #dce3ea; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.session-tools { display: flex; align-items: center; gap: 16px; color: var(--admin-muted); font-size: 13px; min-width: 0; }
#admin-identity { overflow-wrap: anywhere; }
#main-content { max-width: 1440px; margin: auto; padding: 34px 36px max(32px,env(safe-area-inset-bottom)); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 12px; color: var(--admin-muted); margin-bottom: 6px; }
.page-heading h1 { font-size: 28px; letter-spacing: -.04em; margin: 0 0 8px; }
.page-heading p,.page-footnote { margin: 0; color: var(--admin-muted); line-height: 1.75; font-size: 14px; }
.page-footnote { margin-top: 18px; }
.scope-label { color: var(--admin-muted); font-size: 12px; text-align: right; }
.card { border-color: #dce3ea; box-shadow: 0 2px 5px #18243303; min-width: 0; }
.card-header { display: flex; justify-content: space-between; gap: 12px; min-height: 68px; padding: 20px 24px; }
.card-title { font-size: 17px; font-weight: 650; }
.card-body { padding: 24px; }
.import-steps { list-style: none; counter-reset: steps; display: flex; padding: 0; margin: 0 0 24px; gap: 12px; }
.import-steps li { counter-increment: steps; flex: 1; display: flex; align-items: center; gap: 10px; color: var(--admin-muted); font-size: 13px; }
.import-steps li::before { content: counter(steps); flex: 0 0 28px; height: 28px; border-radius: 50%; background: #e8edf2; display: grid; place-items: center; font-family: ui-monospace,monospace; }
.import-steps [aria-current=step] { color: #086443; font-weight: 700; }
.import-steps [aria-current=step]::before { color: #fff; background: #086443; }
.date-range { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; max-width: 660px; margin-bottom: 18px; }
.date-range label { min-width: 0; }
.form-label .form-control { margin-top: 8px; }
.upload-area { display: grid; gap: 10px; padding: 28px; border: 1px dashed #93b2a2; border-radius: 8px; background: #f8fbf9; cursor: pointer; }
.upload-area strong { font-size: 17px; }
.upload-area span { color: var(--admin-muted); font-size: 13px; }
.upload-area .form-control { max-width: 600px; background: #fff; }
.form-hint { line-height: 1.6; margin-top: 10px; }
.import-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.import-actions .form-hint { margin: 0; }
.operation-progress { display: flex; align-items: center; gap: 12px; padding: 16px; margin-top: 20px; background: #edf5f0; color: #086443; border-radius: 6px; }
.import-result { overflow-wrap: anywhere; }
.result-summary { margin: 24px 0 12px; padding: 18px; background: #edf5f0; border-left: 4px solid #086443; border-radius: 4px; }
.result-summary.warning { background: #fff8e8; border-color: #a66b00; }
.result-summary.error { background: #fff0ee; border-color: #b42318; }
.result-summary strong { display: block; font-size: 17px; margin-bottom: 6px; }
.result-summary p { margin: 0; }
.import-details { margin-top: 16px; border: 1px solid #dce3ea; border-radius: 6px; padding: 12px 16px; }
summary { cursor: pointer; min-height: 44px; align-content: center; }
.result-table { width: 100%; margin-top: 10px; }
.result-table th,.result-table td { padding: 12px 8px; border-bottom: 1px solid #dce3ea; text-align: left; vertical-align: top; }
.result-table th { color: var(--admin-muted); font-weight: 500; }
.catalog-fix { margin-top: 20px; padding: 20px; border: 1px solid #e8d19b; border-radius: 8px; background: #fffdf8; }
.catalog-fix-heading { display: flex; gap: 16px; align-items: start; justify-content: space-between; }
.catalog-fix-heading h3 { margin: 0 0 6px; font-size: 18px; }
.catalog-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,320px); gap: 24px; padding: 20px 0; border-top: 1px solid #e8d19b; }
.catalog-row-actions { display: grid; gap: 8px; min-width: 0; }
.catalog-row-actions .btn { justify-self: start; }
.resolution-summary { margin: 18px 0 8px; color: var(--admin-muted); }
.resolution-list { display: grid; gap: 12px; }
.resolution-card { padding: 16px 0; border-top: 1px solid #e8d19b; }
.resolution-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.resolution-heading strong { font-size: 15px; }
.resolution-identity, .resolution-detail { margin: 5px 0 0; color: var(--admin-muted); overflow-wrap: anywhere; }
.resolution-detail { color: #805400; }
.resolution-stats { flex: 0 0 auto; font-size: 13px; color: var(--admin-muted); text-align: right; }
.resolution-controls { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(240px,1.3fr); gap: 12px 16px; margin-top: 14px; }
.resolution-controls .form-label { margin: 0; }
.recipe-suggestions { display: grid; gap: 8px; margin-top: 8px; color: #805400; }
.recipe-suggestions:empty { display: none; }
.recipe-suggestion-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.recipe-suggestion { background: #fff8e6; border-color: #d9b45b; color: #654500; }
.parameter-resolution, .new-items-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e8d19b; }
.parameter-resolution h4, .new-items-section h4 { margin: 0 0 6px; font-size: 15px; }
.parameter-resolution p, .new-items-section p { margin: 0 0 12px; color: var(--admin-muted); }
.parameter-confirmation { margin: 8px 0; }
.new-items-section > div:first-child { display: inline-block; margin-right: 16px; }
.new-item-list { display: grid; gap: 8px; margin-top: 12px; }
.new-item-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; border: 1px solid var(--tblr-border-color); border-radius: 6px; background: #fff; }
.new-item-row div { display: grid; gap: 2px; }
.new-item-row span { color: var(--admin-muted); font-size: 13px; }
.resolution-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.catalog-blocker { margin-top: 12px; padding: 12px; border: 1px solid #dc3545; border-radius: 6px; background: #fff5f5; color: #8f1d2c; }
.catalog-blocker p { margin: 6px 0 0; }
.new-item-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
.new-item-wide { grid-column: 1 / -1; }
.gap-preview,.file-name { overflow-wrap: anywhere; font-size: 13px; color: #835408; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 24px; }
.filter-bar label { margin: 0; }
.search-field { flex: 1; min-width: 180px; max-width: 460px; }
.management-table { width: 100%; table-layout: fixed; margin-bottom: 0; }
.management-table th { background: #f8fafc; font-size: 12px; color: var(--admin-muted); }
.management-table td,.management-table th { padding: 18px 24px; overflow-wrap: anywhere; white-space: normal; }
.management-table th:nth-child(1) { width: 25%; }
.management-table th:nth-child(2) { width: 33%; }
.management-table th:nth-child(3) { width: 18%; }
.management-table th:nth-child(4) { width: 24%; }
.management-table td small { display: block; margin-top: 6px; color: var(--admin-muted); }
.identifier { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 14px; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; color: #086443; background: #e9f3ee; }
.status-pill.inactive { color: #665529; background: #f4f0e5; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-actions .btn { padding: 8px 12px; }
.account-actions .dropdown-menu { min-width: 140px; }
.dropdown-item { min-height: 44px; }
.empty-state { text-align: center; padding: 36px 20px; color: var(--admin-muted); }
.usage-filters .search-field { max-width: 240px; }
.usage-table th:nth-child(1) { width: 18%; }.usage-table th:nth-child(2) { width: 18%; }.usage-table th:nth-child(3) { width: 10%; }.usage-table th:nth-child(4) { width: 20%; }.usage-table th:nth-child(5) { width: 24%; }.usage-table th:nth-child(6) { width: 10%; }
.usage-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 24px; border-top: 1px solid #dce3ea; }
.account-editor { --tblr-offcanvas-width: 520px; }
.offcanvas-header,.offcanvas-body { padding: 24px; }
.offcanvas-header { border-bottom: 1px solid #dce3ea; }
.offcanvas-title { font-size: 20px; overflow-wrap: anywhere; }
#account-form > .form-label { margin-bottom: 22px; }
#account-form fieldset { padding: 20px 0; margin-top: 20px; border-top: 1px solid #dce3ea; }
#account-form legend { float: none; font-size: 16px; font-weight: 650; margin-bottom: 12px; }
#account-form fieldset > label { display: block; }
#bindings { max-height: 340px; overflow: auto; margin-top: 12px; }
#bindings label { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dce3ea; margin-bottom: 8px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
#bindings input { flex: 0 0 20px; width: 20px; height: 20px; }
#bindings small { display: block; color: var(--admin-muted); }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: -24px; background: #fff; padding: 16px 0; border-top: 1px solid #dce3ea; }
.btn-close { min-width: 44px; min-height: 44px; padding: 0; }
#action-description { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.8; }
#admin-message { background: #edf5f0; padding: 14px 18px; border-left: 3px solid #086443; border-radius: 4px; margin-bottom: 20px; overflow-wrap: anywhere; }
#admin-message.error { background: #fff0ee; border-color: #b42318; }
.admin-toast { position: fixed; z-index: 1100; bottom: max(20px,env(safe-area-inset-bottom)); right: 20px; max-width: min(440px,calc(100vw - 40px)); padding: 16px 20px; color: #fff; background: #182433; box-shadow: 0 10px 32px #18243326; border-radius: 8px; overflow-wrap: anywhere; }
.admin-toast.success { background: #086443; }.admin-toast.warning { background: #835408; }.admin-toast.error { background: #b42318; }
.mobile-menu { display: none; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 1200; padding: 10px; background: white; }.skip-link:focus { top: 12px; }
.quality-component { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,180px) auto; gap: 10px; margin-bottom: 10px; align-items: center; }
.quality-item-picker { min-width: 0; }
.quality-item-picker .form-control { width: 100%; }
.quality-component-actions,.quality-item-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quality-item-create { margin-top: 16px; padding: 18px; border: 1px solid #b9d4c6; border-radius: 7px; background: #f7fbf9; }
.quality-item-create-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 14px; }
.quality-item-create-heading h3 { margin: 0 0 4px; font-size: 17px; }
.quality-item-create-heading p { margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.6; }
.quality-item-suggestions { margin: 14px 0 0; color: #805400; font-size: 13px; line-height: 1.7; }
.quality-distinct-confirm { margin-top: 10px; }
.quality-item-actions { justify-content: flex-end; margin-top: 14px; }
@media (max-width: 1100px) {
 .admin-shell { grid-template-columns: 190px minmax(0,1fr); }
 .sidebar { padding-inline: 12px; }
 #main-content,.workspace-header { padding-inline: 24px; }
 .management-table td,.management-table th { padding-inline: 14px; }
 .scope-label { display: none; }
}
@media (max-width: 767px) {
 .admin-shell { display: block; }
 .sidebar { position: relative; width: 100%; height: auto; padding: max(14px,env(safe-area-inset-top)) 16px 14px; border-right: 0; border-bottom: 1px solid #dce3ea; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
 .brand { font-size: 17px; padding: 0; }.brand-mark { width: 34px; height: 38px; font-size: 20px; }.brand small { font-size: 10px; }
 .mobile-menu { display: inline-flex; }
 #admin-nav { width: 100%; display: none; padding-top: 12px; }#admin-nav.open { display: block; }
 .nav-caption,.sidebar-note { display: none; }
 .workspace-header { min-height: 62px; padding: 10px 16px; gap: 8px; font-size: 12px; }
 .session-tools { gap: 8px; font-size: 11px; }.session-tools .btn { padding: 8px; font-size: 12px; }
 #main-content { padding: 24px 16px max(28px,env(safe-area-inset-bottom)); }
 .page-heading { align-items: start; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }.page-heading h1 { font-size: 25px; }.page-heading p { font-size: 13px; }
 .card-header,.card-body,.filter-bar { padding: 16px; }.card-title { font-size: 16px; }
 .import-steps { gap: 8px; }.import-steps li { display: grid; gap: 6px; font-size: 11px; }.import-steps li::before { width: 26px; height: 26px; }
 .date-range { gap: 12px; }.date-range input { font-size: 14px; min-width: 0; width: 100%; }
 .upload-area { padding: 18px 14px; }.upload-area strong { font-size: 15px; }.upload-area .form-control { font-size: 13px; }
 .import-actions { gap: 10px; }.import-actions .form-hint { flex: 0 0 100%; font-size: 12px; }
 .catalog-fix { padding: 14px; }.catalog-row { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .resolution-heading, .resolution-actions { align-items: stretch; flex-direction: column; }.resolution-stats { text-align: left; }.resolution-controls, .new-item-grid { grid-template-columns: minmax(0,1fr); }.new-item-wide { grid-column: auto; }
 .filter-bar .search-field { flex-basis: 100%; max-width: none; min-width: 0; }
 .management-table,.management-table tbody,.management-table tr,.management-table td { display: block; width: 100%; }
 .management-table thead { display: none; }
 .management-table tr { border-top: 1px solid #dce3ea; padding: 16px; }
 .management-table td { padding: 6px 0; border: 0; }
 .management-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--admin-muted); margin-bottom: 4px; }
 .management-table td:first-child::before,.management-table td:last-child::before { display: none; }
 .account-actions { margin-top: 6px; }
 .account-editor { --tblr-offcanvas-width: 100vw; }.offcanvas-header,.offcanvas-body { padding: 20px; }
 .form-control,.form-select { font-size: 16px; }
 .result-table th,.result-table td { padding: 10px 4px; font-size: 12px; }
 .quality-component { grid-template-columns: minmax(0,1fr); }.quality-component .btn { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; } }
@media (max-width: 400px) { .date-range { grid-template-columns: minmax(0,1fr); gap: 6px; } }
.revenue-plan-row{display:grid;grid-template-columns:minmax(12rem,1fr) minmax(12rem,1fr);gap:1rem;align-items:center;margin-bottom:.75rem}.revenue-plan-row>span{font-variant-numeric:tabular-nums;color:var(--tblr-secondary)}.revenue-plan-row small{display:block;margin-top:.25rem;white-space:normal}
/* SKU configuration is a high-density operating ledger, not a dashboard. */
#section-sku-config .page-heading{margin-bottom:14px}
#section-sku-config .page-heading h1{font-size:24px;margin-bottom:4px}
#section-sku-config .page-heading p{line-height:1.5}
.config-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:0 0 12px;overflow:hidden;border:1px solid #dce3ea;border-radius:7px;background:#dce3ea}
.config-summary article{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0;padding:9px 13px;background:#fff}
.config-summary small{overflow:hidden;color:#627184;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.config-summary strong{color:#17304f;font-size:18px;font-variant-numeric:tabular-nums;line-height:1}
.config-workbench{overflow:hidden;border-radius:8px}
.config-tabs{display:flex;gap:0;padding:0 10px;overflow-x:auto;border-bottom:1px solid #dce3ea;background:#f8fafc;scrollbar-width:thin}
.config-tabs .btn{position:relative;flex:0 0 auto;min-height:42px;padding:0 13px;border:0;border-radius:0;background:transparent;color:#526174;box-shadow:none;font-size:13px;font-weight:650;white-space:nowrap}
.config-tabs .btn::after{position:absolute;right:13px;bottom:-1px;left:13px;height:2px;background:transparent;content:""}
.config-tabs .btn:hover{background:#eef3f7;color:#17304f}
.config-tabs .btn[aria-selected="true"]{background:transparent;color:#17304f}
.config-tabs .btn[aria-selected="true"]::after{background:#17304f}
.config-workbench .filter-bar{display:grid;grid-template-columns:minmax(260px,1fr) 150px auto auto;gap:8px;padding:10px 12px;border-bottom:1px solid #dce3ea;background:#fff}
.config-workbench .search-field{width:auto;max-width:none}
.config-workbench .form-control,.config-workbench .form-select{min-height:36px;padding-block:6px;font-size:13px}
.config-workbench .form-check{align-self:center;white-space:nowrap}
#sku-config-count{align-self:center;justify-self:end;white-space:nowrap;font-variant-numeric:tabular-nums}
.config-table-scroll{min-height:0;max-height:calc(100dvh - 330px);overflow:auto;overscroll-behavior:contain}
.config-table{width:max-content;min-width:100%;table-layout:auto;font-size:13px}
.config-table thead{position:sticky;z-index:2;top:0}
.config-table th{height:34px;padding:7px 10px;border-bottom:1px solid #cfd8e2;background:#f5f7fa;color:#526174;font-size:11px;font-weight:650;letter-spacing:.02em;white-space:nowrap}
.config-table td{height:auto!important;min-height:0;padding:8px 10px;border-bottom:1px solid #e6ebf0;line-height:1.35;vertical-align:middle;white-space:nowrap}
.config-table tbody tr{height:auto!important}
.config-table tbody tr:hover td{background:#f8fbfd}
.config-table td small{margin-top:2px;font-size:11px;line-height:1.3;white-space:nowrap}
.config-table .identifier{font-size:12px}
.config-col-item_name,.config-col-name,.config-col-prep_item_name,.config-col-store_name{min-width:150px;max-width:260px;white-space:normal!important}
.config-col-pos_item_id,.config-col-pos_sku_id,.config-col-source_identity{min-width:150px}
.config-col-specification,.config-col-spec{min-width:88px}
.config-col-status{min-width:78px}
.config-col-actions{position:sticky;right:0;min-width:104px;background:#fff;box-shadow:-1px 0 #e6ebf0}
.config-table th.config-col-actions{z-index:3;background:#f5f7fa}
.config-col-actions .btn{min-height:32px;padding:5px 10px;font-size:12px;white-space:nowrap}
.config-workbench .usage-pagination{min-height:44px;padding:6px 12px;background:#fafbfd}
.config-workbench .usage-pagination .btn{min-height:32px;padding:4px 12px;font-size:12px}
.config-workbench .empty-state{padding:24px 16px}
.sku-identity-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:12px;background:#eef4f8;border-left:4px solid #d28b27;margin-bottom:16px}
.sku-identity-strip small{display:block;color:#607080}
.config-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.config-diff{margin-top:16px;padding:14px;border:1px solid #d28b27;background:#fff9ee}
.config-diff table{width:100%}
#sku-config-modal{z-index:1080}
@media(max-width:760px){
 .config-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .config-summary article{padding:9px 10px}
 .config-workbench .filter-bar{grid-template-columns:120px minmax(0,1fr) auto;padding:10px}
 .config-workbench .search-field{grid-column:1/-1}
 .config-workbench .form-check{width:auto}
 #sku-config-count{justify-self:end}
 .config-table-scroll{max-height:none;overflow:visible}
 .config-table{display:block;width:100%;min-width:0}
 .config-table tbody{display:grid;gap:8px;padding:8px;background:#f5f7fa}
 .config-table tr{padding:12px;border:1px solid #dce3ea!important;border-radius:7px;background:#fff}
 .config-table td{padding:4px 0;white-space:normal}
 .config-table .config-col-actions{position:static;margin-top:6px;padding-top:8px;border-top:1px solid #e6ebf0;background:transparent;box-shadow:none}
 .sku-identity-strip,.config-editor-grid{grid-template-columns:1fr}
 #sku-config-modal .modal-dialog{width:100%;max-width:none;min-height:100%;margin:0}
 #sku-config-modal .modal-content{min-height:100dvh;max-height:100dvh;border:0;border-radius:0}
 #sku-config-modal .modal-body{overflow-y:auto}
 #sku-config-modal .modal-footer{flex:0 0 auto}
}
