:root {
  color-scheme: light;
  --ink: #171914;
  --muted: #686b63;
  --canvas: #f2f3ef;
  --surface: #ffffff;
  --line: #dfe1da;
  --lime: #b5f536;
  --amber: #8a5a12;
  --amber-bg: #fff4dc;
  --red: #9d382e;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #617d19; outline-offset: 2px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: #fafbf8; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 28px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; background: var(--lime); color: var(--ink); font-size: 18px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; line-height: 1.2; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.nav-label { padding: 0 12px 8px; color: #888b83; font-size: 11px; font-weight: 650; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { background: #eff0eb; }
.nav-item.active { background: #e9f3d9; font-weight: 650; }
.nav-icon { width: 18px; color: #4f534a; font-size: 16px; text-align: center; }
.nav-count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.alert-count { color: var(--amber); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #819d33; }
.workspace { min-width: 0; padding: 0 28px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.crumb strong { color: var(--ink); font-weight: 650; }
.crumb-sep { color: #a2a49d; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.mode-label { display: inline-flex; align-items: center; gap: 7px; color: #50544b; font-size: 11px; white-space: nowrap; }
.mode-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); background: #ebece7; }
.mode-button { min-height: 27px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.mode-button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #17191414; font-weight: 650; }
.operator { display: inline-flex; align-items: center; gap: 8px; color: #454941; font-size: 12px; }
.operator-avatar { display: grid; width: 28px; height: 28px; place-items: center; background: #e5e7df; font-size: 12px; font-weight: 650; }
.mode-notice { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 24px; padding: 10px 12px; border-left: 3px solid #93c22c; background: #edf4e1; color: #42493a; font-size: 11px; line-height: 1.55; }
.mode-notice strong { color: var(--ink); }
.notice-mark { flex: 0 0 auto; color: #546f16; font-size: 10px; font-weight: 750; }
.mode-notice.unavailable { border-color: #d59b32; background: var(--amber-bg); color: #694b1f; }
.mode-notice.unavailable .notice-mark { color: var(--amber); }
.live-connection { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: -10px 0 20px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.live-connection label { display: grid; flex: 1 1 250px; gap: 5px; color: var(--muted); font-size: 10px; }
.live-connection input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); font: inherit; }
.live-connection button { min-height: 34px; }
.view { min-width: 0; }
.hidden { display: none !important; }
.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.eyebrow { color: var(--muted); font-size: 11px; }
h1 { margin: 3px 0 0; font-size: 23px; line-height: 1.25; font-weight: 700; }
.heading-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.updated-at { color: #92958d; }
.metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 57px; padding: 8px 14px 8px 0; }
.metric + .metric { padding-left: 18px; border-left: 1px solid var(--line); }
.metric-label { color: var(--muted); font-size: 11px; }
.metric-value { color: var(--ink); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.search-field { display: flex; align-items: center; gap: 8px; width: min(100%, 350px); height: 36px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: #787c73; }
.search-field > span { font-size: 18px; line-height: 1; }
.search-field input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: #999c94; }
kbd { border: 1px solid #e0e1db; padding: 1px 4px; color: #777b72; font-size: 9px; white-space: nowrap; }
.filter-label { margin-left: auto; color: var(--muted); font-size: 11px; }
select { min-width: 108px; height: 36px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: #3f433b; font-size: 11px; }
.quiet-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: #454941; font-size: 11px; font-weight: 600; }
.quiet-button:hover { background: #f5f6f2; }
.primary-button { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.primary-button:hover { background: #a8e72f; }
.primary-button:disabled, .quiet-button:disabled { cursor: not-allowed; opacity: .56; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); border-top: 1px solid var(--line); align-items: start; }
.list-panel { min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 690px; border-collapse: collapse; table-layout: auto; background: var(--surface); }
thead { background: #f8f9f6; }
th { height: 37px; padding: 0 10px; border-bottom: 1px solid var(--line); color: #777b72; font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #e9eae5; vertical-align: top; font-size: 11px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f7f9f3; }
tbody tr.selected { background: #f0f6e6; box-shadow: inset 2px 0 #93c22c; }
.order-cell { min-width: 142px; }
.order-link { display: block; padding: 0; border: 0; background: transparent; color: #252920; font-size: 11px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.order-time, .cell-sub { display: block; margin-top: 4px; color: #858980; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.shop-name { display: block; max-width: 180px; color: #30342c; font-weight: 600; overflow-wrap: anywhere; }
.item-summary { display: block; max-width: 195px; margin-top: 4px; color: #73776e; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.state { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 6px; background: #eceee9; color: #53574f; font-size: 10px; line-height: 1.2; white-space: nowrap; }
.state.good { background: #eaf3dd; color: #456414; }
.state.wait { background: #fff3dc; color: #80550e; }
.state.bad { background: #f8e8e5; color: #87382e; }
.state.neutral { background: #eceee9; color: #53574f; }
.amount-col { text-align: right; }
.amount { color: #20231d; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.loading-cell, .empty-cell, .error-cell { padding: 28px 14px; color: var(--muted); text-align: center; }
.error-cell { color: var(--red); }
.inline-action { margin-left: 6px; padding: 0; border: 0; background: transparent; color: #426413; font-size: 11px; text-decoration: underline; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pagination { display: flex; align-items: center; gap: 10px; }
.pagination button { display: grid; width: 29px; height: 28px; place-items: center; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.pagination button:disabled { color: #a8aba3; cursor: default; }
.detail-panel { min-width: 0; min-height: 330px; margin-left: 18px; padding: 0 0 18px 18px; border-left: 1px solid var(--line); background: transparent; }
.detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; padding: 24px 12px; color: var(--muted); text-align: center; }
.detail-empty-icon { display: grid; width: 32px; height: 32px; margin-bottom: 13px; place-items: center; border: 1px solid #d9dbd4; color: #686b63; font-size: 16px; }
.detail-empty strong { color: #3c4038; font-size: 12px; }
.detail-empty > span:last-child { max-width: 210px; margin-top: 6px; font-size: 10px; line-height: 1.5; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 0 12px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 3px 0 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.detail-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 9px; color: #74786f; font-size: 10px; font-weight: 650; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 10px; }
.detail-row span:first-child { flex: 0 0 auto; color: #7a7e75; }
.detail-row span:last-child { min-width: 0; color: #30342c; text-align: right; overflow-wrap: anywhere; }
.detail-row.total { margin-top: 4px; padding-top: 9px; border-top: 1px solid #e9eae5; font-size: 12px; font-weight: 700; }
.detail-row.total span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.delivery-progress { display: grid; gap: 0; margin: 8px 0 2px; border-left: 2px solid #dfe8c8; }
.delivery-progress > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; font-size: 10px; }
.delivery-progress > div > span { color: #74786f; }
.delivery-progress time { color: #30342c; font-variant-numeric: tabular-nums; text-align: right; }
.detail-note { padding: 9px 10px; background: #f4f5f1; color: #55594f; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.detail-issue-link { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; color: #454941; font-size: 10px; text-decoration: none; }
.detail-issue-link:hover { color: #39580e; }
.issue-list { border-top: 1px solid var(--line); }
.issue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.issue-primary { min-width: 0; }
.issue-id { color: #30342c; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.issue-title { margin-top: 4px; color: #272b24; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.issue-reason, .issue-order { margin-top: 4px; color: #72766e; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.issue-record { padding-left: 12px; border-left: 2px solid #e0e2dc; color: #65695f; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.issue-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.issue-actions .primary-button, .issue-actions .quiet-button { min-height: 32px; }
.issue-pagination { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 10px; color: var(--muted); font-size: 10px; }
.issue-detail { margin-top: 18px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.issue-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.issue-detail-head h2 { margin: 3px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.issue-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 14px 0; }
.issue-detail-grid section { min-width: 0; }
.issue-detail h3 { margin: 0 0 9px; font-size: 12px; }
.issue-detail .detail-row { min-height: 30px; }
.issue-detail .detail-row > span:last-child { text-align: right; }
.issue-detail .wrap-value { max-width: 70%; overflow-wrap: anywhere; }
.issue-detail .detail-note { margin-top: 8px; white-space: pre-wrap; }
.issue-records { padding-top: 12px; border-top: 1px solid var(--line); }
.issue-records h3 { display: flex; justify-content: space-between; color: #30342c; }
.issue-records h3 span { color: var(--muted); font-size: 10px; font-weight: 400; }
.issue-records ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.issue-records li { padding: 9px 10px; background: #f5f6f2; overflow-wrap: anywhere; }
.issue-records time { color: var(--muted); font-size: 10px; }
.issue-records p { margin: 4px 0 0; white-space: pre-wrap; font-size: 11px; line-height: 1.55; }
.issue-records .no-record { color: var(--muted); font-size: 11px; }
.issue-detail-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; }
.followup-error { margin: 8px 0; color: var(--red); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.followup-help { margin: 6px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.global-error { position: sticky; bottom: 12px; margin-top: 16px; padding: 12px; border-left: 3px solid #d59b32; background: var(--amber-bg); color: #694b1f; font-size: 11px; line-height: 1.5; }
.global-error button { margin-left: 10px; padding: 2px 6px; border: 1px solid #d9c28f; background: #fffaf0; color: #634715; font-size: 10px; }
.followup-dialog { width: min(480px, calc(100vw - 28px)); max-width: 480px; padding: 0; border: 1px solid #d8dad3; background: #fff; color: var(--ink); box-shadow: 0 18px 60px #17191430; }
.followup-dialog::backdrop { background: #17191470; }
.followup-dialog form { padding: 20px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 3px 0 0; font-size: 18px; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; }
.dialog-context { margin: 16px 0; padding: 10px; background: #f3f4f0; color: #454941; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.field-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #34382f; font-size: 11px; font-weight: 650; }
.field-label span { color: var(--muted); font-size: 10px; font-weight: 400; }
textarea { display: block; width: 100%; min-width: 0; min-height: 100px; padding: 10px; border: 1px solid #d9dbd4; border-radius: 0; resize: vertical; color: var(--ink); font-size: 12px; line-height: 1.5; }
textarea::placeholder { color: #999c94; }
.dialog-warning { margin-top: 9px; color: #76521c; font-size: 10px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; z-index: 5; right: 20px; bottom: 18px; max-width: min(360px, calc(100vw - 32px)); padding: 10px 14px; background: #22251e; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

.catalog-layout { display: grid; grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.6fr); gap: 22px; align-items: start; }
.catalog-shops, .catalog-products { min-width: 0; }
.catalog-shops h2, .catalog-product-head h2 { margin: 0; font-size: 14px; }
.catalog-shops h2 span { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.catalog-shops .table-wrap, .catalog-products .table-wrap { margin-top: 10px; border-top: 1px solid var(--line); }
.catalog-shops table, .catalog-products table { min-width: 560px; }
.catalog-shops table { min-width: 0; table-layout: fixed; }
.catalog-shops tbody tr.selected-row { background: #f4f8e9; }
.catalog-shops tbody tr.selected-row td:first-child { box-shadow: inset 3px 0 #779c20; }
.catalog-shops tbody td small { display: block; margin-top: 3px; }
.table-link { padding: 0; border: 0; background: transparent; color: #33480f; font-size: 11px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.catalog-product-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.catalog-product-head h2 { overflow-wrap: anywhere; }
.catalog-product-head .muted, .muted { color: var(--muted); font-size: 10px; }
.product-name-cell { max-width: 210px; overflow-wrap: anywhere; }
.selected-row { background: #f7f9f2; }
.catalog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 14px; }
.catalog-fields .field-label { margin: 0; align-items: baseline; }
.catalog-fields input, #product-name { width: 100%; min-width: 0; height: 36px; padding: 7px 9px; border: 1px solid #d9dbd4; border-radius: 0; background: #fff; color: var(--ink); font-size: 12px; }
#product-name { margin-top: 6px; }
.catalog-active { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 12px; }
.catalog-active input { width: 16px; height: 16px; accent-color: #6c8f1d; }
button:disabled { cursor: not-allowed; opacity: .48; }

@media (max-width: 1080px) {
  .workspace { padding-right: 20px; padding-left: 20px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-panel { margin: 14px 0 0; padding: 0; border-left: 0; border-top: 1px solid var(--line); }
  .detail-empty { min-height: 160px; }
  .issue-row { grid-template-columns: minmax(0, 1fr) 150px 130px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .sidebar { position: relative; height: auto; padding: 10px 14px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 2px 10px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-shops table, .catalog-products table { min-width: 0; table-layout: fixed; }
  .catalog-shops thead, .catalog-products thead { display: none; }
  .catalog-shops tbody, .catalog-products tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  .catalog-shops tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 8px; }
  .catalog-shops tbody td { display: flex; min-width: 0; align-items: center; padding: 5px 2px; border: 0; font-size: 10px; }
  .catalog-shops tbody td:first-child { grid-column: 1 / -1; }
  .catalog-shops tbody td:nth-child(2) { grid-column: 1; }
  .catalog-shops tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .catalog-shops tbody td:nth-child(3) .quiet-button { min-height: 30px; white-space: nowrap; }
  .catalog-products tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; padding: 7px 8px; }
  .catalog-products tbody td { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 5px 2px; border: 0; font-size: 10px; overflow-wrap: anywhere; }
  .catalog-products tbody td::before { color: #898c85; font-size: 9px; }
  .catalog-products tbody td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .catalog-products tbody td:nth-child(2)::before { content: '价格'; }
  .catalog-products tbody td:nth-child(3)::before { content: '库存'; }
  .catalog-products tbody td:nth-child(4)::before { content: '状态'; }
  .catalog-products tbody td:nth-child(5) { grid-column: 2; grid-row: 4; justify-content: flex-end; }
  .catalog-products tbody td:nth-child(5) .quiet-button { min-height: 30px; }
  .delivery-zone-table { min-width: 0; table-layout: fixed; }
  .delivery-zone-table thead { display: none; }
  .delivery-zone-table tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  .delivery-zone-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; padding: 7px 8px; }
  .delivery-zone-table tbody td { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 5px 2px; border: 0; font-size: 10px; overflow-wrap: anywhere; }
  .delivery-zone-table tbody td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .delivery-zone-table tbody td:nth-child(2)::before { content: '配送费'; }
  .delivery-zone-table tbody td:nth-child(3)::before { content: '状态'; }
  .delivery-zone-table tbody td:nth-child(4)::before { content: '版本'; }
  .delivery-zone-table tbody td:nth-child(5) { grid-column: 2; grid-row: 3; justify-content: flex-end; }
  .delivery-zone-table tbody td:nth-child(5) .quiet-button { min-height: 30px; }
  .nav-item { min-height: 36px; padding: 0 9px; }
  .workspace { padding: 0 14px 28px; }
  .topbar { min-height: 52px; }
  .top-actions { gap: 8px; }
  .mode-label { display: none; }
  .operator > span:last-child { display: none; }
  .operator-avatar { width: 26px; height: 26px; }
  .mode-notice { margin: 12px 0 18px; font-size: 10px; }
  .mode-notice > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .page-heading-row { align-items: center; margin-bottom: 13px; }
  h1 { font-size: 20px; }
  .heading-meta { display: block; text-align: right; }
  .updated-at { display: none; }
  .metric-strip { margin-bottom: 14px; }
  .metric { display: block; min-height: 53px; padding: 8px 6px 8px 0; }
  .metric + .metric { padding-left: 9px; }
  .metric-label { display: block; font-size: 9px; }
  .metric-value { display: block; margin-top: 2px; font-size: 15px; }
  .toolbar { gap: 7px; }
  .search-field { flex: 1 1 100%; width: 100%; }
  .filter-label { margin-left: 0; }
  select { flex: 1 1 130px; }
  .quiet-button { padding-right: 9px; padding-left: 9px; }
  table { min-width: 0; }
  thead { display: none; }
  tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 8px 9px; border-bottom: 1px solid var(--line); }
  tbody td { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 4px 2px; border: 0; font-size: 10px; }
  tbody td::before { content: attr(data-label); flex: 0 0 auto; color: #898c85; font-size: 9px; }
  tbody td.order-cell { grid-column: 1 / -1; }
  tbody td:nth-child(2) { grid-column: 1 / -1; }
  tbody td:nth-child(3), tbody td:nth-child(4), tbody td:nth-child(5) { grid-column: auto; }
  tbody td.amount { justify-content: flex-end; grid-column: 2; grid-row: 5; align-items: center; }
  tbody td.amount::before { content: attr(data-label); }
  tbody .empty-cell, tbody .loading-cell, tbody .error-cell { display: block; grid-column: 1 / -1; }
  tbody .empty-cell::before, tbody .loading-cell::before, tbody .error-cell::before { content: none; }
  .order-cell { min-width: 0; }
  .order-link { font-size: 11px; }
  .shop-name, .item-summary { max-width: none; }
  .state { min-height: 19px; font-size: 9px; }
  .list-footer { min-height: 44px; padding: 0 4px; }
  .issue-row { grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 8px; }
  .issue-record { grid-column: 1 / -1; padding: 7px 0 0; border-left: 0; border-top: 1px solid #e6e7e1; }
  .issue-actions { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: flex-start; align-items: center; }
  .issue-actions .primary-button, .issue-actions .quiet-button { max-width: 125px; white-space: normal; }
  .issue-detail { margin-top: 12px; padding: 12px 10px; }
  .issue-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .issue-detail-head { align-items: flex-start; }
  .issue-detail-actions { justify-content: stretch; }
  .issue-detail-actions button { flex: 1; min-height: 36px; }
  .issue-pagination { padding: 0 4px; }
  .followup-dialog form { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
.catalog-shops h2 { display: flex; align-items: center; gap: 9px; min-height: 36px; }
.catalog-create-button { flex: 0 0 auto; }
.catalog-product-head { flex-wrap: wrap; }
.catalog-review { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; color: #684a17; font-size: 11px; line-height: 1.5; }
.catalog-review input { flex: 0 0 auto; margin: 2px 0 0; accent-color: #8caf24; }
.catalog-create-error { min-height: 0; margin: 7px 0; color: #8b3d32; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.catalog-create-error:empty { display: none; }
#shop-dialog select { width: 100%; margin-bottom: 12px; }
#shop-dialog input, #product-dialog input:not([type="checkbox"]) { min-width: 0; }
#shop-dialog .field-label, #product-dialog .field-label { display: flex; justify-content: space-between; gap: 8px; margin: 11px 0 5px; color: #666a61; font-size: 11px; }
#shop-dialog .field-label span, #product-dialog .field-label span { color: #858980; font-size: 10px; }
#shop-dialog input:not([type="checkbox"]), #product-dialog input:not([type="checkbox"]) { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font: inherit; }
#shop-dialog .catalog-fields, #product-dialog .catalog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
#shop-dialog .catalog-fields input, #product-dialog .catalog-fields input { grid-row: 2; }
#shop-dialog .dialog-warning, #product-dialog .dialog-warning { padding: 9px 10px; border-left: 2px solid var(--lime-dark); background: #f1f5e9; color: #51564b; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .catalog-shops h2 { flex-wrap: wrap; }
  .catalog-shops .catalog-create-button { min-height: 32px; }
  .catalog-product-head { align-items: flex-start; }
  .catalog-product-head > .catalog-create-button { width: 100%; }
  #shop-dialog, #product-dialog { width: min(calc(100vw - 20px), 460px); max-height: calc(100dvh - 24px); margin: auto; overflow: auto; }
  #shop-dialog form, #product-dialog form { padding: 16px; }
  #shop-dialog .catalog-fields, #product-dialog .catalog-fields { gap: 4px 8px; }
}
.delivery-zones { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.delivery-zones-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.delivery-zones-head h2 { margin: 0; font-size: 14px; }
.delivery-zones-head p { margin: 5px 0 0; line-height: 1.5; }
.delivery-zone-source { display: inline-block; margin-top: 5px; color: #687453; font-size: 10px; }
.delivery-zones-head button { flex: 0 0 auto; }
.delivery-zone-table { min-width: 490px; }
.delivery-zone-table td:first-child { max-width: 160px; overflow-wrap: anywhere; }
.delivery-zone-status { color: var(--muted); font-size: 10px; }
#delivery-zone-dialog { width: min(460px, calc(100vw - 28px)); max-width: 460px; max-height: calc(100dvh - 28px); overflow: auto; }
#delivery-zone-dialog form { padding: 20px; }
#delivery-zone-dialog .field-label { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 5px; color: #666a61; font-size: 11px; }
#delivery-zone-dialog .field-label span { color: #858980; font-size: 10px; }
#delivery-zone-dialog input:not([type="checkbox"]) { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font: inherit; }
#delivery-zone-dialog input:disabled { background: #f4f5f1; color: #62665e; }
#delivery-zone-dialog .dialog-warning { padding: 9px 10px; border-left: 2px solid var(--lime-dark); background: #f1f5e9; color: #51564b; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
#delivery-zone-dialog #delivery-zone-enable-confirm label { display: flex; align-items: flex-start; gap: 8px; }
#delivery-zone-dialog #delivery-zone-enable-confirm input { flex: 0 0 auto; margin-top: 2px; accent-color: #6c8f1d; }
@media (max-width: 640px) {
  .delivery-zones { margin-top: 20px; padding-top: 14px; }
  .delivery-zones-head { align-items: flex-start; }
  .delivery-zones-head button { min-height: 34px; }
  #delivery-zone-dialog { width: min(calc(100vw - 20px), 460px); margin: auto; }
  #delivery-zone-dialog form { padding: 16px; }
}
.access-source { margin: -7px 0 18px; color: #666b60; font-size: 11px; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.access-panel { min-width: 0; border-top: 1px solid var(--line); }
.access-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 10px; }
.access-section-head h2 { margin: 0; font-size: 15px; }
.access-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.access-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.access-toolbar select { min-width: 116px; height: 32px; }
.access-table { min-width: 570px; }
.access-member-table { min-width: 580px; }
.access-table tbody tr { cursor: default; }
.access-table .selected-row { background: #f0f6e6; box-shadow: inset 2px 0 #93c22c; }
.table-link { max-width: 170px; padding: 0; border: 0; background: transparent; color: #30342c; font-size: 11px; font-weight: 650; text-align: left; overflow-wrap: anywhere; }
.table-link:hover { text-decoration: underline; }
.access-detail { margin-top: 14px; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.access-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.access-detail-head h3 { max-width: 100%; margin: 3px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.access-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 12px 0; }
.access-facts > div { min-width: 0; padding: 8px 0; border-bottom: 1px solid #e9eae5; }
.access-facts dt { color: var(--muted); font-size: 10px; }
.access-facts dd { margin: 3px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.access-decision-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 10px; border: 1px solid #e0c3bf; background: #fff; color: #87382e; font-size: 10px; font-weight: 600; }
.danger-button:hover { background: #fbefed; }
.danger-button:disabled { cursor: not-allowed; opacity: .5; }
.access-dialog { width: min(460px, calc(100vw - 32px)); max-width: 460px; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.access-dialog::backdrop { background: #17191466; }
.access-dialog form { padding: 20px; }
.access-dialog .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.access-dialog h2 { margin: 2px 0 0; font-size: 17px; }
.access-dialog .dialog-context { margin: 14px 0 8px; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.access-dialog .dialog-warning { padding: 9px 10px; border-left: 2px solid var(--lime-dark); background: #f1f5e9; color: #51564b; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.access-error { min-height: 0; margin: 8px 0; color: var(--red); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.access-error:empty { display: none; }
.access-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.access-dialog .catalog-review { margin: 12px 0; }
@media (max-width: 1080px) { .access-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 640px) {
  .access-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-toolbar label { display: grid; align-content: start; gap: 4px; }
  .access-toolbar select { width: 100%; min-width: 0; }
  .access-table, .access-member-table { min-width: 0; table-layout: fixed; }
  .access-table thead { display: none; }
  .access-table tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  .access-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; padding: 7px 8px; border-bottom: 1px solid #e9eae5; }
  .access-table tbody td { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 5px 2px; border: 0; font-size: 10px; overflow-wrap: anywhere; }
  .access-table tbody td::before { flex: 0 0 auto; color: #898c85; font-size: 9px; }
  .access-table tbody td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .access-applications-panel .access-table tbody td:nth-child(2)::before { content: '角色'; }
  .access-applications-panel .access-table tbody td:nth-child(3)::before { content: '申请对象'; }
  .access-applications-panel .access-table tbody td:nth-child(4)::before { content: '状态'; }
  .access-applications-panel .access-table tbody td:nth-child(5)::before { content: '提交'; }
  .access-member-table tbody td:nth-child(2)::before { content: '角色'; }
  .access-member-table tbody td:nth-child(3)::before { content: '授权对象'; }
  .access-member-table tbody td:nth-child(4)::before { content: '状态'; }
  .access-member-table tbody td:nth-child(5)::before { content: '版本'; }
  .access-member-table tbody td:nth-child(6) { grid-column: 2; grid-row: 4; justify-content: flex-end; }
  .access-table .empty-cell, .access-table .loading-cell, .access-table .error-cell { grid-column: 1 / -1; justify-content: center; }
  .access-facts { grid-template-columns: minmax(0, 1fr); }
  .access-dialog { width: min(calc(100vw - 20px), 460px); margin: auto; overflow: auto; }
  .access-dialog form { padding: 16px; }
}

/* ACCEL-C2 dense operations shell */
.nav-group-label { padding: 13px 12px 4px; color: #858980; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.nav-item { min-height: 36px; padding: 0 9px; gap: 8px; font-size: 12px; }
.nav-item .nav-icon { font-size: 15px; }
.site-selector { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.site-selector select { min-width: 115px; height: 30px; padding-top: 0; padding-bottom: 0; }
.workflow-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; }
.workflow-filters label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.workflow-filters input { min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
.source-note { margin-left: auto; color: #74786f; font-size: 10px; }
.panel-note { margin: 12px 0; padding: 9px 11px; border-left: 2px solid #9abc37; background: #f4f6ef; color: #53574e; font-size: 11px; line-height: 1.5; }
.warning-note { border-color: #c08a25; background: #fff7e7; color: #6f531c; }
.overview-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.workflow-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,330px); gap: 18px; align-items: start; }
.workflow-table { min-width: 600px; }
.finance-table { min-width: 870px; }
.workflow-detail { margin: 0; padding: 0 0 18px 16px; }
.workflow-detail h3 { margin: 16px 0 8px; font-size: 12px; }
.workflow-row.selected { background: #f0f6e6; box-shadow: inset 2px 0 #93c22c; }
.case-notes { display: grid; gap: 7px; }
.case-note { padding: 8px 0; border-bottom: 1px solid var(--line); }
.case-note span { color: var(--muted); font-size: 10px; }
.case-note p { margin: 4px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.workflow-state { padding: 28px 14px; color: var(--muted); text-align: center; }
.error-state { color: var(--red); }
#support-detail textarea { display: block; width: 100%; min-height: 72px; margin: 4px 0 8px; padding: 8px; border: 1px solid var(--line); resize: vertical; }
#support-detail select { width: 100%; margin: 4px 0 8px; }
#support-detail #case-submit { width: 100%; }
@media (max-width:1080px) { .workflow-layout { grid-template-columns: minmax(0,1fr); } .workflow-detail { margin: 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width:760px) {
 .sidebar { padding: 8px 0 0; }
 .brand { margin: 0 12px; }
 .nav-group-label { display:none; }
 .nav-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px; overflow:visible; padding:0 10px 7px; }
 .nav-item { min-width:0; width:100%; min-height:36px; padding:0 9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .nav-count { margin-left:0; }
 .workspace { padding:0 12px 28px; }
 .topbar { min-height:52px; gap:6px; }
 .top-actions { gap:7px; }
 .crumb { min-width:0; gap:5px; font-size:10px; }
 .site-selector { gap:4px; font-size:9px; }
 .site-selector select { min-width:68px; max-width:92px; padding-left:5px; padding-right:18px; font-size:10px; }
 .mode-label { display:none; }
 .mode-switch { padding:2px; }
 .mode-button { min-height:25px; padding:0 7px; }
 .mode-notice { margin:10px 0 16px; padding:8px 9px; font-size:10px; }
 h1 { font-size:20px; }
 .page-heading-row { margin-bottom:12px; }
 .workflow-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px; }
 .workflow-filters label, .workflow-filters input { min-width:0; width:100%; }
 .workflow-filters .source-note { grid-column:1/-1; margin:0; }
 .overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .overview-metrics .metric { min-width:0; padding:7px 8px; }
 .overview-metrics .metric + .metric { padding-left:8px; }
 .overview-metrics .metric-value { font-size:14px; }
 .workflow-table, .finance-table { min-width:0; table-layout:fixed; }
 .workflow-table thead { display:none; }
 .workflow-table tbody { display:grid; grid-template-columns:minmax(0,1fr); }
 .workflow-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 8px; padding:7px 8px; border-bottom:1px solid var(--line); }
 .workflow-table tbody td { display:flex; min-width:0; align-items:center; gap:5px; padding:5px 2px; border:0; font-size:11px; overflow-wrap:anywhere; }
 .workflow-table tbody td::before { content:attr(data-label); flex:0 0 auto; color:#777b72; font-size:10px; }
 .workflow-table tbody td:first-child { grid-column:1/-1; }
 .workflow-table tbody td .cell-sub { overflow-wrap:anywhere; }
 .workflow-table .empty-cell,.workflow-table .loading-cell,.workflow-table .error-cell { display:block; grid-column:1/-1; }
 .workflow-table .empty-cell::before,.workflow-table .loading-cell::before,.workflow-table .error-cell::before { content:none; }
 .finance-table tbody tr { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .finance-table tbody td:first-child { grid-column:1/-1; }
 .detail-panel { min-height:0; }
 .source-note { margin:0; }
}

.todo-panel { margin: 14px 0; padding: 12px; border: 1px solid var(--line); background: #fff; }
.todo-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.todo-head h2 { margin:0; font-size:13px; }
.todo-head > div { display:flex; align-items:center; gap:10px; }
.todo-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.todo-item { display:grid; gap:3px; padding:10px; background:#f4f6ef; border-left:3px solid var(--lime); }
.todo-item strong { font-size:20px; line-height:1; }
.todo-item span { color:var(--muted); font-size:11px; }
.todo-warning { grid-column:1/-1; color:var(--amber); font-size:11px; }
.source-note.stale { color:var(--amber); }
@media (max-width:760px) { .todo-head { align-items:flex-start; } .todo-head > div { display:grid; gap:5px; justify-items:end; } .todo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* R36 polish: keep support filters readable as grouped controls on desktop and 390px screens. */
.support-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(112px, .85fr) minmax(128px, .95fr) minmax(0, 1.35fr) minmax(128px, .9fr) minmax(128px, .9fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.support-filters > label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.support-filters input,
.support-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
}
.support-filters input[type="date"] { padding-right: 5px; }
.support-filter-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.support-filter-actions button { font-size: 13px; }
.support-filter-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#support-filter-error:empty { display: none; }
#support-filter-error { grid-column: 1 / -1; margin: 0; font-size: 12px; }
@media (max-width: 1080px) {
  .support-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .support-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px;
  }
  .support-filters > label { min-width: 0; }
  .support-filters > .support-query { grid-column: 1 / -1; }
  .support-filters input,
  .support-filters select { min-width: 0; width: 100%; height: 44px; }
  .support-filter-actions { padding-top: 9px; }
  .support-filter-actions .primary-button,
  .support-filter-actions .quiet-button { flex: 1 1 145px; min-width: 0; min-height: 44px; }
}
@media (max-width: 380px) {
  .support-filters { grid-template-columns: minmax(0, 1fr); }
}

.daily-trend-panel,.support-summary-panel { margin:14px 0; padding:12px; border:1px solid var(--line); background:#fff; }
.daily-trend { overflow:auto; }
.trend-bars { display:flex; align-items:end; gap:8px; min-height:150px; padding:12px 4px 4px; border-bottom:1px solid var(--line); }
.trend-day { display:grid; justify-items:center; gap:3px; min-width:36px; flex:1; font-size:11px; color:var(--muted); }
.trend-day strong { color:var(--ink); font-size:12px; }
.trend-bar-wrap { width:100%; height:92px; display:flex; align-items:end; justify-content:center; background:linear-gradient(to top, #f3f5f7 1px, transparent 1px); background-size:100% 23px; }
.trend-bar { display:block; width:18px; min-height:4px; background:var(--accent); border-radius:3px 3px 0 0; }
.trend-table { margin-top:12px; }
.support-summary-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.summary-card { padding:10px; border:1px solid var(--line); background:#fafbfc; display:grid; gap:4px; min-width:0; }
.summary-card span,.summary-kinds span { color:var(--muted); font-size:11px; }
.summary-card strong { font-size:17px; overflow-wrap:anywhere; }
.summary-kinds { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:12px; padding-top:4px; }
@media (max-width:760px) { .support-summary-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .summary-kinds { gap:8px; } .trend-day { min-width:31px; } .trend-bar { width:14px; } }
