:root {
  color-scheme: light;
  --canvas: #f3f6fb;
  --paper: #fff;
  --border: #e0e7f2;
  --ink: #192946;
  --muted: #5e7192;
  --quiet: #6980a0;
  --primary: #4561d7;
  --primary-strong: #364fbf;
  --table-head: #edf2fd;
  --line: #ebeff6;
  --side-width: 212px;
  --shadow: 0 1px 3px #1b28510a;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button:not(:disabled), select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #5471e9; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; inset: 12px auto auto 12px; z-index: 10; padding: 8px 12px; background: var(--paper); border-radius: 6px; }
.muted { color: var(--muted); }
.number { font-variant-numeric: tabular-nums; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; width: var(--side-width); background: var(--paper); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 13px 18px; overflow-y: auto; }
.brand { display: block; width: 100%; max-width: 183px; margin: 0 0 24px; border-radius: 10px; }
.brand-image { display: block; aspect-ratio: 183 / 115; border-radius: inherit; background: #e9dcef url("/brand.jpg") no-repeat center -6px / 180% auto; }
.navigation { display: grid; gap: 5px; }
.nav-label { color: var(--muted); padding: 4px 10px; font-size: .8125rem; }
.navigation a { display: flex; align-items: center; gap: 9px; padding: 10px 11px; min-height: 41px; border-radius: 8px; font-size: .925rem; color: #435879; }
.navigation a:hover { background: #f5f7fb; }
.navigation a[aria-current] { color: #3954c1; background: #eaf0ff; font-weight: 680; }
.nav-icon { position: relative; height: 15px; width: 15px; flex: 0 0 15px; border: 1px solid currentColor; border-radius: 3px; }
.icon-shop::before, .icon-list::before { content: ""; position: absolute; inset: 3px 1px auto; border-top: 1px solid currentColor; }
.icon-list::before { inset: 4px 3px auto; box-shadow: 0 3px currentColor; }
.icon-grid::before { content: ""; position: absolute; inset: 6px 0 auto; border-top: 1px solid currentColor; }
.icon-grid::after { content: ""; position: absolute; inset: 0 auto 0 6px; border-left: 1px solid currentColor; }
.icon-sync { border-radius: 50%; border-right-color: transparent; }
.icon-sync::after { content: ""; position: absolute; right: -1px; top: 2px; border: 3px solid transparent; border-top-color: currentColor; transform: rotate(-32deg); }
.icon-finance { border-radius: 50%; }
.icon-finance::before { position: absolute; inset: 0; text-align: center; content: "¥"; font: 700 10px/13px "Segoe UI", sans-serif; }
.icon-brands { width: 13px; height: 13px; margin-inline: 1px; flex-basis: 13px; transform: rotate(-35deg); border-radius: 2px 5px 5px 2px; }
.icon-brands::before { content: ""; position: absolute; right: 2px; top: 4px; border: 1px solid currentColor; width: 3px; height: 3px; border-radius: 50%; }
.sidebar-footer { margin-top: auto; display: flex; align-items: flex-start; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--border); font-size: .8125rem; color: #435879; }
.sidebar-footer small { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.app-version { align-self: flex-end; margin-left: auto; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 6px; background: #8798b4; border-radius: 50%; }
.status-dot.online { background: #27a780; }

.workspace { margin-left: var(--side-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 0 clamp(16px, 2.3vw, 32px); border-bottom: 1px solid var(--border); background: var(--paper); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .875rem; }
.breadcrumb strong { color: #30466d; }
.schedule-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 31px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; color: #526884; background: #f0f4fa; font-size: .8125rem; white-space: nowrap; }
.schedule-pill[data-auto="true"] { color: #16664f; background: #e9f7f1; border-color: #d8eee4; }
.schedule-pill:hover:not(:disabled), body:has(#schedule-settings:popover-open) .schedule-pill { border-color: #adc0ee; color: var(--primary-strong); }
.schedule-pill i { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-1px) rotate(45deg); }
.schedule-panel { position: fixed; inset: 50px clamp(10px, 2.3vw, 32px) auto auto; width: min(345px, calc(100vw - 20px)); max-height: calc(100vh - 58px); margin: 0; padding: 16px; border: 1px solid #d5e1f2; border-radius: 11px; color: var(--ink); background: var(--paper); box-shadow: 0 10px 32px #1f37652e; }
.schedule-panel h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; color: #344768; font-size: .875rem; }
.schedule-switch { appearance: none; margin: 0; padding: 2px; width: 34px; height: 20px; border: 0; border-radius: 12px; background: #a6b5cb; cursor: pointer; }
.schedule-switch::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.schedule-switch:checked { background: var(--primary); }
.schedule-switch:checked::before { transform: translateX(14px); }
.schedule-interval { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.schedule-interval input[type="number"] { width: 63px; min-height: 32px; padding: 4px 7px; }
.schedule-help { color: var(--muted); font-size: .75rem; margin-top: 1px; text-align: right; }
.schedule-actions { justify-content: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.main { max-width: 1850px; padding: 24px clamp(16px, 2.3vw, 32px) 42px; margin-inline: auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { font-size: clamp(1.65rem, 2.5vw, 2.1rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.06rem; line-height: 1.35; }
.subheading { color: var(--muted); font-size: .875rem; margin-top: 6px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-height: 38px; border: 1px solid #d9e2f1; border-radius: 7px; background: var(--paper); color: #405577; padding: 7px 12px; line-height: 1.3; font-size: .875rem; font-weight: 620; white-space: nowrap; }
.button:hover:not(:disabled) { color: var(--primary); border-color: #aebdf0; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 4px #3858bf20; }
.button.primary:hover:not(:disabled) { background: var(--primary-strong); color: #fff; }
.button.small { min-height: 30px; font-size: .8125rem; padding: 5px 8px; }
.button:disabled, select:disabled { opacity: .55; }
.link-button { border: 0; background: transparent; padding: 7px; }
.text-link, .link-button { color: var(--primary); font-size: .875rem; font-weight: 650; }
.text-link:hover, .link-button:hover { text-decoration: underline; text-underline-offset: 3px; }
input:is([type="search"], [type="number"]), textarea, .select-box select { box-sizing: border-box; min-width: 0; border: 1px solid #d9e2f1; border-radius: 7px; background: var(--paper); padding: 7px 10px; font-size: .875rem; }
input:is([type="search"], [type="number"]), .select-box select { min-height: 38px; }
input::placeholder, textarea::placeholder { color: var(--quiet); }
.select-box { display: block; position: relative; min-width: 0; }
.select-box::after { content: ""; position: absolute; top: calc(50% - 5px); right: 10px; width: 7px; height: 7px; transform: rotate(45deg); border-bottom: 1px solid #687b9d; border-right: 1px solid #687b9d; pointer-events: none; }
.select-box select { width: 100%; appearance: none; padding-right: 26px; color: #405577; text-overflow: ellipsis; }
.banner { margin-bottom: 15px; padding: 9px 12px; border: 1px solid #dae4f5; border-radius: 8px; color: #405981; background: #edf3ff; font-size: .875rem; line-height: 1.45; }

.panel { min-width: 0; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.table-panel { overflow: hidden; }
.table-panel + .table-panel { margin-top: 17px; }
.panel-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 15px; }
.panel-head p { color: var(--muted); margin-top: 4px; font-size: .8125rem; }
.heading-with-update { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 15px; }
.updated { border-left: 1px solid var(--border); padding-left: 12px; color: var(--quiet); font-size: .8125rem; white-space: nowrap; }
.updated time { color: #425b81; margin-left: 4px; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -2px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 9px 12px; vertical-align: middle; line-height: 1.4; }
th { font-size: .8125rem; font-weight: 680; color: #415779; background: var(--table-head); }
td { font-size: .875rem; color: #344768; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
th small, td > small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; font-weight: 450; }
td.empty, .empty { padding: 23px 15px; text-align: center; color: var(--muted); font-size: .875rem; }
.identity { display: inline-flex; gap: 8px; align-items: center; max-width: 100%; color: #243958; vertical-align: middle; }
.identity strong { font-size: .875rem; font-weight: 680; overflow-wrap: anywhere; }
.store-mark { display: grid; place-items: center; flex: 0 0 27px; height: 27px; width: 27px; border-radius: 6px; color: #4363cf; background: #e9efff; font-size: .6825rem; font-weight: 740; }
.tone-1 { background: #e2f4f2; color: #26776e; }
.tone-2 { background: #fff2da; color: #885816; }
.tone-3 { background: #f0eaff; color: #6949b0; }
.tone-4 { background: #eaf2dc; color: #55713b; }
.tag { display: inline-flex; gap: 5px; align-items: center; padding: 3px 7px; border-radius: 6px; color: #4c627e; background: #edf1f6; font-size: .8125rem; line-height: 1.3; font-weight: 620; }
.tag.orange, .tag.active { background: #fff1e0; color: #8a5018; }
.tag.green { background: #e4f5ed; color: #1d6b53; }
.tag.blue, .tag.review, .tag.pending { background: #eaf0ff; color: #405cbe; }
.tag.red, .tag.rejected, .tag.tier-c { background: #fcecee; color: #974853; }
.tag.tier-b { background: #eeeef6; color: #4f5286; --tier-start: #535689; --tier-end: #696ca0; }
.tag.tier-a { background: #ebf6ff; color: #0e5da3; --tier-start: #0a83ff; --tier-end: #11a6ff; }
.tag.tier-s { background: #e5f7f1; color: #156955; --tier-start: #28cc9f; --tier-end: #31cba4; }
.tier-letter { min-width: 19px; padding: 1px 4px; border-radius: 4px; text-align: center; color: #fff; font-size: .75rem; font-style: italic; text-shadow: 0 1px 2px #1c335884; background: linear-gradient(115deg, var(--tier-start), var(--tier-end)); }

.store-search { width: 218px; max-width: 100%; }
.operations-table, .todo-table { table-layout: fixed; min-width: 1080px; }
.operations-table { min-width: 1250px; }
.store-col { width: 18%; }
.operations-table .store-col { width: 14.5%; }
.tier-col { width: 8%; }
.account-col { width: 12%; }
.company-col { width: 18.5%; }
.expiring-col { width: 8.5%; }
.turnover-col { width: 12%; }
.operation-turnover { color: #314f89; font-weight: 650; white-space: nowrap; }
.operation-turnover > small { font-weight: 450; }
.rate-col { width: 9.5%; }
.operating-group { text-align: center; border-left: 1px solid #dfe7f6; }
.operating-labels th { background: #f6f8fe; }
.operating-labels th, .operations-table td:nth-child(n+5), .todo-table :is(th, td):not(:first-child) { text-align: center; }
.operating-labels th:first-child, .operations-table td:nth-child(6) { border-left: 1px solid var(--line); }
.operations-table .operating-labels th { padding-inline: 6px; text-wrap: balance; }
.brand-count { text-align: center; }
td.brand-count { background: #f9fbfe; }
.brand-count-link { min-width: 27px; justify-content: center; font-variant-numeric: tabular-nums; }
.brand-count-link i { width: 5px; height: 5px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.brand-count-link:hover { color: #793e06; background: #ffe3b9; }
.brand-count-zero { background: transparent; font-weight: 500; color: var(--muted); }
.brand-count-zero:hover { color: var(--primary); background: #edf2ff; text-decoration: underline; }
.company-heading { display: flex; align-items: center; gap: 7px; }
.company-heading > span { white-space: nowrap; }
.company-heading .select-box { flex: 0 1 132px; }
.company-heading select { padding-block: 4px; min-height: 30px; font-size: .8125rem; }
.account { font-family: Consolas, "Cascadia Mono", monospace; color: #4e6484; font-size: .8125rem; overflow-wrap: anywhere; }
.company { overflow-wrap: anywhere; }
.rate { color: #314f89; font-weight: 680; }
.todo-value { display: inline-block; min-width: 28px; text-align: center; border-radius: 5px; padding: 4px 7px; background: #fff1dc; color: #915218; font-weight: 720; }

.score-table { min-width: 856px; table-layout: fixed; }
.score-table th:first-child { width: 17%; }
.score-updated { display: block; margin-left: 35px; color: var(--muted); font-size: .73rem; }
.score-updated time { display: inline-block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-reading { display: grid; grid-template-columns: minmax(40px, max-content) minmax(42px, 1fr); align-items: center; gap: 8px; }
.score-amount { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.score-amount strong { font-size: 1rem; font-variant-numeric: tabular-nums; color: #304977; }
.score-amount small { color: var(--quiet); font-size: .75rem; }
.score-meter { display: flex; gap: 2px; height: 6px; }
.score-meter .segment { overflow: hidden; flex: 1; background: #eaf0f8; border-radius: 2px; }
.segment i { display: block; background: #8298eb; height: 100%; }
.severe .segment i { background: #efaf50; }
.restricted .segment i { background: #54bd9b; }
.score-cell:has(.manual-score) { cursor: help; }
.manual-score { display: block; margin-top: 5px; font-size: .76rem; color: #925516; }
.score-tooltip, .toast { position: fixed; z-index: 5; box-shadow: 0 5px 18px #1e37672c; border-radius: 7px; font-size: .875rem; }
.score-tooltip { background: var(--paper); color: #2b4468; border: 1px solid var(--border); padding: 9px 11px; pointer-events: none; max-width: calc(100vw - 20px); }
.toast { bottom: 20px; right: 20px; max-width: min(350px, calc(100vw - 40px)); color: #fff; background: #294177; padding: 10px 13px; }
.toast.error { background: #84434b; }

.detail-filters { margin-block: 15px; padding: 13px 15px; }
.status-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 11px; color: #42597d; font-size: .875rem; }
.status-filters button { background: #f0f3f9; color: #435b7d; border: 1px solid transparent; border-radius: 7px; padding: 6px 9px; font-size: .875rem; }
.status-filters button[aria-pressed="true"] { color: #3c57c4; font-weight: 690; background: #eaf0ff; border-color: #dbe5fc; }
.filter-select { display: flex; align-items: center; padding-left: 9px; min-height: 38px; border: 1px solid #d9e2f1; border-radius: 7px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.filter-select select { border: 0; background: transparent; min-height: 36px; font-weight: 600; max-width: 182px; }
.detail-selects input { width: 286px; max-width: 100%; }
.violation-table { table-layout: fixed; min-width: 1230px; }
.violation-id-col { width: 10.5%; }
.violation-shop-col { width: 10%; }
.violation-product-col { width: 19%; }
.violation-time-col { width: 8%; }
.violation-status-col { width: 8.5%; }
.violation-reason-col { width: 13%; }
.violation-notice-col { width: 18%; }
.violation-penalty-col { width: 13%; }
.violation-table th { padding-block: 10px; }
.violation-table td { overflow-wrap: anywhere; padding-block: 14px; }
.record-id strong { color: #253e63; font-weight: 670; }
.record-id small { display: block; color: #485fa8; margin-top: 4px; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.occurred { white-space: pre-line; font-variant-numeric: tabular-nums; }
.notice-cell { white-space: pre-line; background: #f9fbfe; }
.platform-notice-trigger, .manual-note-action { border: 0; padding: 0; background: transparent; text-align: left; }
.platform-notice-trigger { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.platform-notice-trigger:not(:disabled) { cursor: help; }
.platform-notice-trigger:hover, .platform-notice-trigger[aria-expanded="true"] { color: var(--primary-strong); }
.platform-notice-popup { position: fixed; z-index: 6; width: min(545px, calc(100vw - 20px)); max-height: min(55vh, 420px); overflow: auto; overscroll-behavior: contain; padding: 0 16px 13px; border: 1px solid #cfdaf0; border-radius: 9px; background: var(--paper); box-shadow: 0 8px 24px #1e37672c; color: #2b4468; font-size: .875rem; line-height: 1.55; }
.platform-notice-popup strong { position: sticky; top: 0; display: block; padding: 10px 0 6px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink); }
#platform-notice-content { padding-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.manual-note { display: grid; gap: 5px; margin-top: 6px; }
.manual-note-label { color: #526689; font-size: .75rem; }
.manual-note-text { white-space: pre-wrap; }
.manual-note-action { justify-self: start; color: var(--primary-strong); font-size: .8125rem; }
.manual-note-action:hover { text-decoration: underline; }
.manual-note-editor { display: grid; gap: 6px; }
.manual-note-editor textarea { width: 100%; min-height: 60px; resize: vertical; padding: 6px 7px; border: 1px solid #d9e2f1; border-radius: 7px; background: var(--paper); font-size: .8125rem; }
.manual-note-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.product-list { display: grid; gap: 6px; }
.product-card { display: flex; gap: 8px; align-items: center; min-width: 0; }
.product-picture { position: relative; overflow: hidden; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 6px; border: 1px solid #e0e8f4; background: #edf2fa; }
.product-picture::before { content: ""; position: absolute; inset: 11px; border: 1px solid #9bacc8; border-radius: 3px; }
.product-picture img { position: relative; width: 100%; height: 100%; display: block; object-fit: cover; background: var(--paper); }
.product-caption { min-width: 0; }
.product-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .8125rem; line-height: 1.35; }
.product-id { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.product-id-with-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.picture-click { padding: 0; cursor: zoom-in; }
.picture-click:hover { border-color: #91a9ed; }
.product-copy { display: inline-grid; place-items: center; width: 23px; height: 22px; padding: 0; border: 1px solid #dce5f3; border-radius: 5px; color: #4e6c99; background: var(--paper); }
.product-copy:hover { color: var(--primary-strong); background: #f1f5ff; }
.copy-icon { position: relative; display: inline-block; width: 13px; height: 13px; }
.copy-icon::before, .copy-icon::after { position: absolute; width: 7px; height: 8px; border: 1px solid currentColor; border-radius: 2px; background: var(--paper); content: ""; }
.copy-icon::before { top: 0; left: 0; }
.copy-icon::after { top: 3px; left: 3px; }
.penalty-editor { display: grid; gap: 5px; }
.penalty-editor select, .penalty-custom input { min-height: 33px; font-size: .8125rem; }
.penalty-editor > small { font-size: .73rem; color: #548071; }
.penalty-editor > small:empty { display: none; }
.penalty-custom { display: grid; grid-template-columns: minmax(42px, 1fr) auto; gap: 4px; }
.penalty-custom input { width: 100%; padding-inline: 5px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 45px; padding: 7px 14px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 8px; }

.setup-panels { display: grid; grid-template-columns: minmax(270px, 1.3fr) minmax(250px, 1fr); gap: 14px; margin-bottom: 15px; }
.setup-card { padding: 15px 16px; }
.setup-card h2 { margin-bottom: 10px; }
.field { display: grid; gap: 6px; margin-bottom: 6px; color: var(--muted); font-size: .875rem; }
.field input { width: 145px; }
.setup-card textarea { width: 100%; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-size: .875rem; }
.checkbox input { accent-color: var(--primary); }
.form-footer { margin-block: 9px; }
.feedback { margin-top: 8px; white-space: pre-line; color: #42629b; font-size: .875rem; }
.sync-table { min-width: 870px; }
.sync-table th:nth-child(4) { width: 25%; }
.sync-table td:last-child .actions { flex-wrap: nowrap; }

.icon-stock::before { content: ""; position: absolute; inset: 3px 1px auto; border-top: 1px solid currentColor; }
.icon-stock::after { content: ""; position: absolute; inset: 6px 4px auto; border-top: 1px solid currentColor; }
.icon-clock { border-radius: 50%; }
.icon-clock::before { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 5px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.navigation a[data-section="jit"] { gap: 6px; padding-inline: 10px 6px; font-size: .795rem; line-height: 1.45; }
.navigation a[data-section="jit"] span { text-wrap: balance; }
.stock-import { margin-bottom: 16px; }
.stock-file-summary { margin: 0 15px 13px; padding: 9px 11px; border: 1px solid #e6edf7; border-radius: 7px; background: #f7f9fe; color: #536988; font-size: .875rem; overflow-wrap: anywhere; }
.operation-filters { padding: 0 15px 13px; }
.operation-filters input[type="search"] { width: 218px; max-width: 100%; }
.operation-filters .select-box select { max-width: 280px; }
.field-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8125rem; }
.field-label input { min-height: 38px; border: 1px solid #d9e2f1; border-radius: 7px; background: var(--paper); padding: 5px 8px; color: #405577; }
.operation-message { margin: 0 15px 12px; border-radius: 6px; padding: 8px 10px; background: #fff4e5; color: #805522; font-size: .8125rem; line-height: 1.5; }
.finance-total-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.finance-total { min-width: 0; padding: 13px 16px 14px; }
.finance-total + .finance-total { border-left: 1px solid var(--line); }
.finance-total h3 { margin: 0 0 9px; color: #354d72; font-size: .875rem; }
.finance-primary { display: grid; gap: 3px; background: #f4f7fd; padding: 8px 10px; border-radius: 7px; }
.finance-primary span { color: #506987; font-size: .75rem; }
.finance-primary strong { font-size: 1.42rem; font-weight: 720; color: #243f6c; font-variant-numeric: tabular-nums; }
.finance-total dl { display: grid; gap: 6px; margin: 10px 0 0; }
.finance-total dl div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: .79rem; }
.finance-total dt { color: var(--muted); }
.finance-total dd { margin: 0; color: #344768; font-variant-numeric: tabular-nums; }
.finance-total p { color: var(--muted); font-size: .79rem; margin-top: 7px; }
.finance-table { table-layout: fixed; min-width: 980px; }
.finance-store { width: 23%; }
.finance-cash { width: 17%; }
.finance-table :is(th, td) { padding-inline: 18px; }
.finance-table td { height: 52px; }
.finance-table .money, .finance-table .finance-window { text-align: right; padding-right: 24px; }
.finance-table td.money { font-size: 1.02rem; color: #293f62; }
.finance-table td.money:nth-child(2), .finance-table td.money:last-child { font-weight: 670; }
.finance-window { border-left: 1px solid #dfe7f6; }
.finance-window span { display: block; font-size: .75rem; color: #526b8e; }
.finance-window strong { display: block; margin-top: 4px; color: #2e4a77; font-weight: 680; font-variant-numeric: tabular-nums; }
.finance-labels th { background: #f6f8fe; }
.finance-labels th, .finance-table td:nth-child(n+3) { border-left: 1px solid var(--line); }

.brands-table { table-layout: fixed; min-width: 1000px; }
.brands-table col:nth-child(1) { width: 20%; }
.brands-table col:nth-child(2) { width: 21%; }
.brands-table col:nth-child(3) { width: 20%; }
.brands-table col:nth-child(4) { width: 12%; }
.brands-table col:nth-child(5) { width: 17%; }
.brands-table col:nth-child(6) { width: 10%; }
.brands-table th, .brands-table td { padding-inline: 15px; }
.brands-table th { vertical-align: top; }
.brands-table th small, .brands-table td small { margin-top: 2px; }
.brands-table td { height: 59px; overflow-wrap: anywhere; }
.brands-table :is(th, td):last-child { text-align: center; }
.brand-filter-field { display: grid; gap: 6px; }
.brand-filter-field :is(input[type="search"], select) { width: 100%; min-height: 33px; padding-block: 5px; font-size: .8125rem; font-weight: 450; }
.brand-name, .brand-expiry { font-weight: 650; color: #293f62; font-variant-numeric: tabular-nums; }
.brand-live::before { width: 6px; height: 6px; background: #269575; border-radius: 50%; content: ""; }
.soon-filter[aria-pressed="true"] { color: #8a5018; background: #fff1e0; border-color: #efd7ae; }
.button[aria-disabled="true"] { opacity: .55; }
.danger-button { color: #98545c; }
.stock-table, .jit-table { table-layout: fixed; min-width: 1080px; }
.stock-check { width: 4%; }
.stock-shops { width: 22%; }
.stock-code { width: 13%; }
.stock-name { width: 19%; }
.stock-table th button { border: 0; background: transparent; padding: 0; color: inherit; font-weight: inherit; text-align: inherit; }
.stock-table th[aria-sort="ascending"] button::after { content: " ↑"; color: var(--primary); }
.stock-table th[aria-sort="descending"] button::after { content: " ↓"; color: var(--primary); }
.stock-table :is(th,td):first-child, .stock-table :is(th,td):nth-child(n+5) { text-align: center; }
.stock-table input[type="checkbox"] { accent-color: var(--primary); width: 14px; height: 14px; vertical-align: middle; }
.stock-table tr:has(.stock-select-one:checked) { background: #f4f7ff; }
.stock-breakdown { display: flex; flex-wrap: wrap; gap: 4px; }
.stock-breakdown .tag { font-weight: 580; overflow-wrap: anywhere; }
.stock-quantity .tag { min-width: 35px; justify-content: center; }
.copy-code { border: 0; padding: 1px 0; color: #4462af; background: transparent; text-align: left; font-size: .8125rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copy-code:hover { text-decoration: underline; text-underline-offset: 3px; }
.jit-table { min-width: 1150px; }
.jit-shop { width: 11%; }
.jit-order { width: 14%; }
.jit-product { width: 26%; }
.jit-amount { width: 8%; }
.jit-created { width: 12%; }
.jit-reason { width: 8%; }
.jit-status { width: 10%; }
.jit-deadline { width: 11%; }
.jit-table td { padding-block: 12px; overflow-wrap: anywhere; }
.jit-table .product-picture { width: 47px; height: 47px; flex-basis: 47px; }
.jit-table .product-title { -webkit-line-clamp: 2; }
.todo-jit-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.sync-dialog { width: min(630px, calc(100% - 28px)); max-height: min(85vh, 720px); padding: 0; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 18px 55px #27395340; }
.sync-dialog::backdrop { background: #2335554d; }
.sync-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.sync-dialog-head h2 { font-size: 1.16rem; }
.image-preview { width: min(670px, calc(100% - 28px)); }
.image-preview h2 { overflow-wrap: anywhere; }
.image-preview header p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.image-preview .dialog-close { flex: 0 0 29px; }
.image-preview-stage { padding: 14px; background: #f5f8fd; }
.image-preview-stage img { display: block; width: 100%; height: min(62vh, 590px); object-fit: contain; }
.dialog-close { width: 29px; height: 29px; border: 0; border-radius: 6px; background: #f0f4fa; color: var(--muted); font: 1.24rem/1 "Segoe UI", sans-serif; }
.sync-dialog-main { display: grid; gap: 15px; padding: 17px 20px; }
.sync-dialog fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sync-dialog legend { margin-bottom: 8px; font-size: .875rem; font-weight: 700; }
.sync-dialog input:is([type="checkbox"],[type="radio"]) { flex: 0 0 auto; margin: 0; accent-color: var(--primary); }
.sync-modules label { display: flex; align-items: center; gap: 8px; border: 1px solid #dce4f2; border-radius: 7px; padding: 7px 10px; color: #42597a; font-size: .875rem; cursor: pointer; }
.sync-modules label:has(input:checked) { border-color: #a9bbf0; background: #f0f4ff; color: #3c56bd; }
.sync-shop-picker { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f8faff; }
.sync-picker-head { display: flex; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; font-size: .84rem; }
.sync-select-all { margin-top: 7px; font-size: .85rem; }
.sync-shop-picker input[type="search"] { width: 100%; min-height: 34px; }
.sync-shops { display: grid; gap: 4px; max-height: 132px; margin-top: 3px; overflow-y: auto; }
.sync-shops p { padding: 8px 4px; font-size: .8125rem; }
.sync-shop-option { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.sync-shop-option:hover { background: #edf2fd; }
.sync-shop-option .store-mark { width: 23px; height: 23px; flex-basis: 23px; }
.sync-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.sync-modules label { min-height: 59px; }
.sync-modules strong, .sync-modules small { display: block; }
.sync-modules small { margin-top: 3px; color: var(--muted); font-size: .746rem; }
.sync-estimate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; border-radius: 7px; padding: 9px 10px; background: #edf2ff; color: #3c58ba; font-size: .875rem; }
.sync-estimate span { color: #4d6288; font-size: .8125rem; }
.sync-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }

@media (max-width: 1110px) {
  :root { --side-width: 176px; }
  .sidebar { padding-inline: 10px; }
}
@media (max-width: 950px) {
  .finance-total-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-total:nth-child(3) { border-left: 0; }
  .finance-total:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 840px) {
  .setup-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .schedule-panel { inset: 40px 10px auto auto; }
  .finance-total { padding: 10px; }
  .finance-primary strong { font-size: 1.1rem; overflow-wrap: anywhere; }
  .sidebar { position: static; width: 100%; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { margin: 0 0 8px; }
  .navigation { display: flex; flex-wrap: wrap; gap: 4px; }
  .navigation a { min-height: 34px; padding: 6px 7px; gap: 5px; font-size: .8125rem; }
  .nav-label { display: none; }
  .sidebar-footer { margin-top: 8px; padding-top: 6px; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 40px; padding: 0 12px; }
  .topbar-actions { flex-wrap: wrap; gap: 5px; }
  .main { padding: 16px 12px 25px; }
  .updated { border: 0; padding-left: 0; }
  .violation-table, .violation-table tbody { display: block; min-width: 0; }
  .violation-table colgroup, .violation-table thead { display: none; }
  .violation-table .record { display: grid; border-bottom: 1px solid var(--border); padding: 8px 12px; }
  .violation-table .record td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 7px; border-bottom: 0; padding: 6px 0; background: transparent; }
  .violation-table .record td::before { content: attr(data-label); color: var(--muted); font-size: .8125rem; }
  .violation-table .record .tag { justify-self: start; }
  .sync-modules { grid-template-columns: 1fr; }
  .sync-modules label { min-height: 0; }
}
