:root {
  color-scheme: light;
  --bg: #f4f6f4;
  --card: #ffffff;
  --ink: #17211a;
  --muted: #758078;
  --line: #e4e9e5;
  --green: #16834a;
  --green-dark: #0d6537;
  --green-soft: #e9f7ef;
  --amber: #a86805;
  --amber-soft: #fff4dc;
  --red: #ba3030;
  --red-soft: #fdeeee;
  --blue: #3169a8;
  --blue-soft: #edf4fc;
  --store-task-card-height: 72px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-style: normal;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }
.route-ui-hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

main { width: min(940px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar h1 { margin: 2px 0 0; font-size: 25px; letter-spacing: -.5px; }
.topbar small { color: var(--green); font-size: 13px; }
.title-switch-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.channel-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #e9eeea; }
.channel-switch a { min-width: 74px; padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
.channel-switch a:hover { color: var(--ink); }
.channel-switch a.active { color: white; background: var(--green); box-shadow: 0 2px 7px rgba(13, 101, 55, .2); }
.channel-switch a.active.domestic { background: var(--blue); box-shadow: 0 2px 7px rgba(49, 105, 168, .22); }
.eyebrow { color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 8px; }
.topbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; justify-content: end; gap: 5px; }
.account-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.topbar-actions > #erp-login-status { grid-column: 2; justify-self: end; }
.topbar-actions > #sync-yikan-data { grid-column: 3; justify-self: end; }
.account-identity { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 11px; border: 1px solid #b9ddc8; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.erp-login-status { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.erp-login-status:hover { border-color: #a8d7bb; }
.erp-login-status i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #9aa39d; animation: erp-login-breathe 1.55s ease-in-out infinite; }
.erp-login-status.valid { color: var(--green-dark); background: var(--green-soft); border-color: #b9ddc8; }
.erp-login-status.valid i { background: var(--green); box-shadow: 0 0 0 0 rgba(22, 131, 74, .42); }
.erp-login-status.invalid, .erp-login-status.missing { color: var(--red); background: var(--red-soft); border-color: #efcaca; }
.erp-login-status.invalid i, .erp-login-status.missing i { background: var(--red); box-shadow: 0 0 0 0 rgba(186, 48, 48, .42); }
.erp-login-status.checking { color: var(--blue); background: var(--blue-soft); border-color: #c5d9ef; }
.erp-login-status.checking i { background: var(--blue); box-shadow: 0 0 0 0 rgba(49, 105, 168, .42); }
.erp-login-status.unknown { color: var(--amber); background: var(--amber-soft); border-color: #ecd8ab; }
.erp-login-status.unknown i { background: #d8890b; box-shadow: 0 0 0 0 rgba(216, 137, 11, .42); }
.mobile-erp-login-status { display: none; }
.erp-login-alert-banner[hidden] { display: none; }
.erp-login-alert-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid #efcaca; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 14px; flex-wrap: wrap; }
.erp-login-alert-banner button { flex-shrink: 0; }
.erp-login-alert { width: min(520px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #efcaca; border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 24px 80px #17211a40; }
.erp-login-alert::backdrop { background: #0e171180; }
.erp-login-alert-shell { padding: 24px; }
.erp-login-alert-badge { display: inline-block; padding: 5px 9px; border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 12px; font-weight: 700; }
.erp-login-alert h2 { margin: 16px 0 12px; font-size: 21px; line-height: 1.4; }
.erp-login-alert p { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
#erp-login-alert-reason { color: var(--red); }
#erp-login-alert-since { color: var(--muted); font-size: 12px; }
.erp-login-alert-safety { padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.erp-login-alert-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.erp-login-alert-actions button { min-height: 42px; }
.erp-login-alert-actions button:disabled { opacity: .55; }
@keyframes erp-login-breathe {
  0%, 100% { opacity: .55; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.18); box-shadow: 0 0 0 5px transparent; }
}
.reset-button { color: white; background: var(--green); border-radius: 9px; padding: 8px 11px; }
.reset-button:hover { background: var(--green-dark); }
.text-button:disabled { opacity: .42; }

.admin-page-nav {
  position: sticky;
  z-index: 8;
  top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid #d9e2db;
  border-radius: 14px;
  background: #f4f6f4;
  box-shadow: 0 5px 20px rgba(23, 33, 26, .06);
  /* Navigation overlaps the live staging banner; avoid re-blurring its updates. */
  backdrop-filter: none;
}
.admin-page-nav button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .01em;
}
.admin-page-nav button:hover { color: var(--ink); background: white; }
.admin-page-nav button.active { color: white; background: var(--green); box-shadow: 0 3px 10px rgba(13, 101, 55, .22); }
body.admin-mode main { width: min(940px, calc(100% - 32px)); }
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #customer-stores-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #backend-occupancy,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #numbers,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #governance-numbers,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #pipeline-drawer,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #completed-drawer,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #exception-drawer,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #rules-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #materials-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #admin-customer-directory-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #action-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #action-controls,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #space-card,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) .results-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) details.drawer { display: none !important; }
body.admin-mode[data-admin-page="home"] #pipeline-drawer,
body.admin-mode[data-admin-page="home"] #completed-drawer,
body.admin-mode[data-admin-page="home"] #exception-drawer,
body.admin-mode[data-admin-page="home"] #governance-numbers,
body.admin-mode[data-admin-page="home"] #pipeline-control,
body.admin-mode[data-admin-page="home"] #pipeline-performance,
body.admin-mode[data-admin-page="home"] #space-card,
body.admin-mode[data-admin-page="home"] .results-panel,
body.admin-mode[data-admin-page="home"] details.drawer { display: none !important; }
body.admin-mode[data-admin-page="home"] #action-panel > :not(.panel-title):not(#home-line-status):not(#home-efficiency),
body.admin-mode[data-admin-page="home"] #action-panel #run-state,
body.admin-mode[data-admin-page="home"] #action-panel #task-mode-note,
body.admin-mode[data-admin-page="home"] #action-controls { display: none !important; }
body.admin-mode #sync-yikan-data { display: none !important; }
body:not(.admin-mode) #home-efficiency { display: none !important; }
body:not(.admin-mode) #admin-customer-directory-panel,
body.admin-mode[data-admin-page]:not([data-admin-page="home"]) #admin-customer-directory-panel { display: none !important; }
.admin-customer-directory-panel { display: grid; gap: 10px; }
.admin-customer-directory-panel > .panel-title { margin-bottom: 0; }
.admin-directory-material-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding-top: 8px; }
.admin-directory-material { min-width: 0; display: grid; gap: 2px; padding: 7px 8px; border: 1px solid #dce7de; border-radius: 8px; background: #fbfdfb; }
.admin-directory-material-label { overflow: hidden; color: var(--green-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-directory-material small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.admin-route-page { display: grid; gap: 14px; }
.admin-page-heading { order: -30; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 2px; }
.admin-page-heading h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.4px; }
.admin-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-sync-state { color: #536057; font-size: 14px; font-weight: 700; line-height: 1.35; }
.admin-sync-state.stale { color: var(--red); font-weight: 750; }
.admin-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.admin-summary-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.create-stats-details > summary { padding: 4px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.create-stats-details > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.create-stats-details .admin-summary-grid { margin-top: 12px; }
.create-stats-details .admin-summary-card span { white-space: normal; }
.publish-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.publish-efficiency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.publish-efficiency-grid .admin-summary-card strong { overflow-wrap: anywhere; }
.publish-advanced-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.publish-stats-details > summary { padding: 4px 0; color: var(--ink); font-size: 15px; font-weight: 750; cursor: pointer; }
.publish-stats-details > summary > span { margin-left: 12px; color: var(--muted); font-size: 14px; font-weight: 400; }
.publish-stats-details > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.publish-stats-note { margin: 14px 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.publish-stats-details .admin-summary-card span { white-space: normal; }
.admin-summary-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.admin-summary-card strong, .admin-summary-card span { display: block; }
.admin-summary-card strong { margin-bottom: 6px; font-size: 24px; font-variant-numeric: tabular-nums; }
.admin-summary-card span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-summary-card.warning { border-color: #ebd1a0; background: var(--amber-soft); }
.admin-summary-card.success { border-color: #b9dcc6; background: var(--green-soft); }
.admin-summary-card.success strong { color: var(--green-dark); }
.admin-summary-card.error { border-color: #efcaca; background: var(--red-soft); }
.admin-summary-card.error strong { color: var(--red); }
.admin-section { margin: 0; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.admin-section-head h3 { margin: 0; font-size: 16px; }
.admin-section-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-worker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin-worker-grid.single { grid-template-columns: minmax(0, 1fr); }
.admin-worker-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; background: #fbfdfb; }
.admin-worker-card.paused { border-left-color: var(--amber); background: #fffaf0; }
.admin-worker-card.image_capacity_blocked { border-left-color: var(--red); background: #fff7f2; }
.admin-worker-card.stale { border-left-color: var(--red); background: #fff7f7; }
.admin-worker-head, .admin-worker-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.admin-worker-head span { color: var(--muted); font-size: 11px; }
.admin-worker-current { min-height: 38px; margin: 9px 0; }
.admin-worker-wait-reason { display: block; margin: 7px 0; color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.admin-worker-current strong, .admin-worker-current small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-worker-current small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.admin-worker-footer small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-worker-error { display: block; margin: 7px 0; overflow: hidden; color: var(--red); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-filter-row { display: grid; grid-template-columns: 150px 220px 170px minmax(220px, 1fr); gap: 7px; margin-bottom: 11px; }
.publish-filters { grid-template-columns: repeat(5, minmax(120px, 1fr)) minmax(190px, 1.4fr); }
.maintenance-filters { grid-template-columns: 180px 150px 230px minmax(220px, 1fr); }
.admin-log-filters { grid-template-columns: 150px 150px minmax(220px, 1fr); }
.admin-log-filters > input:last-child { grid-column: auto; }
.admin-filter-row select, .admin-filter-row input { min-width: 0; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.admin-task-list { display: grid; gap: 7px; }
.admin-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#create-task-list, #publish-completed-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.create-store-waits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.create-store-wait-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 10px; padding: 11px 12px; border: 1px solid #ead5ad; border-left: 4px solid var(--amber); border-radius: 11px; background: #fffaf0; }
.create-store-wait-identity { min-width: 0; }
.create-store-wait-identity strong, .create-store-wait-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-store-wait-identity strong { font-size: 15px; }
.create-store-wait-identity small, .create-store-wait-reason { color: var(--muted); font-size: 11px; }
.create-store-wait-tags { display: flex; align-items: center; gap: 5px; }
.create-store-wait-tags span { padding: 4px 8px; border-radius: 99px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.create-store-wait-tags .quota { color: #805600; background: #f7e8c5; }
.create-store-wait-tags .waiting { color: #805600; background: var(--amber-soft); }
.create-store-wait-reason { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-store-card { min-width: 0; display: grid; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.admin-store-card-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-store-card-head > div { min-width: 0; }
.admin-store-card-head strong, .admin-store-card-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-store-card-head strong { font-size: 15px; }
.admin-store-card-head small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.admin-store-total { flex: 0 0 auto; padding: 4px 9px; border-radius: 99px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 850; }
.admin-store-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.admin-store-metrics > div { min-width: 0; padding: 8px; border-radius: 9px; background: #f4f7f5; text-align: center; }
.admin-store-metrics > div.active { background: var(--green-soft); }
.admin-store-metrics > div.warning { background: var(--amber-soft); }
.admin-store-metrics strong, .admin-store-metrics span { display: block; }
.admin-store-metrics strong { font-size: 18px; }
.admin-store-metrics span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.admin-store-latest { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; padding-top: 1px; font-size: 11px; }
.admin-store-latest > span, .admin-store-latest > small { color: var(--muted); }
.admin-store-latest > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-store-sku-preview { display: flex; min-height: 23px; gap: 5px; overflow: hidden; }
.admin-store-sku-preview span { flex: 0 1 auto; min-width: 0; padding: 4px 7px; overflow: hidden; border: 1px solid #e0e7e2; border-radius: 7px; color: #4f5a53; background: #fafcfb; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-store-sku-preview span.more { flex: 0 0 auto; color: var(--green-dark); background: var(--green-soft); }
.admin-customer-head-badges { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.admin-customer-order { padding: 4px 8px; border-radius: 99px; color: #8a5a12; background: var(--amber-soft); font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-customer-queue-preview { display: grid; gap: 4px; }
.admin-customer-queue-item { min-width: 0; display: grid; grid-template-columns: minmax(88px, auto) minmax(78px, .75fr) minmax(100px, 1.25fr); align-items: center; gap: 7px; padding: 5px 7px; border: 1px solid #e3e8e4; border-radius: 7px; background: #fafcfb; }
.admin-customer-queue-item.active { border-color: #b6dec5; background: var(--green-soft); }
.admin-customer-queue-item.receipt { border-color: #ead5ad; background: var(--amber-soft); }
.admin-customer-queue-position { overflow: hidden; color: var(--green-dark); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-customer-queue-item strong, .admin-customer-queue-item small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-customer-queue-item strong { font-size: 11px; }
.admin-customer-queue-item small { color: var(--muted); font-size: 9px; }
.admin-customer-queue-more { padding: 4px 7px; color: var(--muted); font-size: 9px; text-align: right; }
.admin-task-row { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(160px, .75fr) minmax(230px, 1.3fr); gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.admin-task-row.error { border-left: 4px solid var(--red); }
.admin-task-row.warning { border-left: 4px solid var(--amber); }
.admin-task-row strong, .admin-task-row small, .admin-task-row span { display: block; overflow-wrap: anywhere; }
.admin-task-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-task-row .red-text { color: var(--red); font-size: 12px; font-weight: 750; }
.admin-task-status { display: inline-flex !important; width: fit-content; margin-bottom: 4px; padding: 3px 7px; border-radius: 99px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 800; }
.admin-task-row.error .admin-task-status { color: var(--red); background: var(--red-soft); }
.admin-pagination { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 35px; margin-top: 9px; }
.admin-empty { padding: 24px; border: 1px dashed #d4ddd6; border-radius: 11px; color: var(--muted); background: #fafcfb; text-align: center; }
.admin-compact-tasks { display: grid; gap: 5px; margin-top: 9px; }
.admin-compact-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #f6f9f6; font-size: 11px; }
.admin-compact-task span { color: var(--muted); }
.admin-log-panel { order: -20; }
#admin-publish-page > #publish-summary { order: -25; }
#admin-publish-page > #publish-efficiency { order: -24; }
#admin-maintenance-page > #maintenance-summary {
  order: -25;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}
#maintenance-overview-note { order: -24; margin: 0 2px 8px; line-height: 1.6; }
#admin-maintenance-page details > summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.admin-log-panel .admin-section-head > button { min-width: 78px; }
.admin-work-overview { display: grid; gap: 8px; margin-bottom: 10px; }
.admin-work-overview.three-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#maintenance-work-status { grid-template-columns: 1fr; }
.maintenance-line-progress { display: grid; grid-template-columns: minmax(178px, .42fr) minmax(300px, 1fr) minmax(300px, .88fr); align-items: center; gap: 16px; min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-left: 5px solid #8da096; border-radius: 12px; background: #fbfdfb; }
.maintenance-line-progress.running { border-left-color: var(--green); background: #f7fcf8; }
.maintenance-line-progress.warning { border-left-color: var(--amber); background: #fffaf0; }
.maintenance-line-progress.error { border-left-color: var(--red); background: #fff7f7; }
.maintenance-line-identity { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; }
.maintenance-line-number { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: white; background: #223229; font-size: 21px; font-weight: 900; }
.maintenance-line-identity > strong { min-width: 0; font-size: 15px; line-height: 1.25; }
.maintenance-line-progress .admin-work-state { font-size: 12px; }
.maintenance-line-progress.idle .admin-work-state { color: #52645a; background: #edf2ef; }
.maintenance-line-progress.warning .admin-work-state { color: #805600; background: var(--amber-soft); }
.maintenance-line-progress.error .admin-work-state { color: var(--red); background: var(--red-soft); }
.maintenance-line-task { display: grid; gap: 3px; min-width: 0; }
.maintenance-line-task > strong { min-width: 0; overflow: hidden; font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-line-task > small { min-width: 0; overflow: hidden; color: #536259; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-line-task > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-line-progress-block { display: grid; gap: 8px; min-width: 0; }
.maintenance-line-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.maintenance-line-progress-head > strong { font-size: 13px; }
.maintenance-line-progress-head > span { color: #536259; font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.maintenance-line-progress-head > span.failed { color: var(--red); }
.maintenance-line-progress-track { position: relative; height: 12px; overflow: hidden; border-radius: 999px; background: #dfe8e2; }
.maintenance-line-progress-track > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #23955a, #58b97d); transition: width .25s ease; }
.maintenance-line-progress-track.indeterminate > i { animation: maintenance-progress-slide 1.25s ease-in-out infinite alternate; }
@keyframes maintenance-progress-slide { from { transform: translateX(-55%); } to { transform: translateX(210%); } }
.admin-work-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; background: #fbfdfb; }
.admin-work-card.warning { border-left-color: var(--amber); background: #fffaf0; }
.admin-work-card.error { border-left-color: var(--red); background: #fff7f7; }
.admin-work-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-work-card-head > strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-state { flex: 0 0 auto; padding: 3px 8px; border-radius: 99px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 850; }
.admin-work-card.warning .admin-work-state { color: #805600; background: var(--amber-soft); }
.admin-work-card.error .admin-work-state { color: var(--red); background: var(--red-soft); }
.admin-work-facts { display: grid; gap: 7px; margin-top: 9px; }
.admin-work-fact { min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 7px; row-gap: 2px; padding: 7px 8px; border-radius: 8px; background: white; }
.admin-work-fact > span { grid-row: 1 / span 2; color: var(--muted); font-size: 10px; font-weight: 750; }
.admin-work-fact > strong, .admin-work-fact > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-fact > strong { font-size: 11px; }
.admin-work-fact > small { color: var(--muted); font-size: 9px; }
.admin-work-fact.current { box-shadow: inset 2px 0 var(--green); }
.admin-work-fact.next { box-shadow: inset 2px 0 #84a8de; }
.admin-work-meta { display: block; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-work-history-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 3px 1px 6px; }
.admin-work-history-title strong { font-size: 11px; }
.admin-work-history-title span { color: var(--muted); font-size: 9px; }
#admin-maintenance-page .image-space-live { order: -10; }
.admin-activity-list { display: grid; max-height: 198px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
.admin-activity-row { display: grid; grid-template-columns: 132px minmax(170px, .8fr) minmax(240px, 1.4fr); gap: 10px; padding: 9px 11px; border-top: 1px solid #edf1ee; font-size: 11px; }
.admin-activity-row:first-child { border-top: 0; }
.admin-activity-row.error { border-left: 3px solid var(--red); background: #fffafa; }
.admin-activity-row.warning { border-left: 3px solid var(--amber); }
.admin-activity-row.success { border-left: 3px solid var(--green); }
.admin-activity-row time, .admin-activity-row small { color: var(--muted); }
.admin-activity-row strong, .admin-activity-row span, .admin-activity-row small { display: block; overflow-wrap: anywhere; }
.admin-activity-row small { margin-top: 3px; }
.admin-activity-outcome { width: fit-content; margin-bottom: 3px; padding: 2px 5px; border-radius: 4px; color: var(--green-dark); background: var(--green-soft); font-size: 8px; line-height: 1.2; }
.admin-activity-outcome.warning { color: #805600; background: var(--amber-soft); }
.admin-activity-outcome.error { color: var(--red); background: var(--red-soft); }
.admin-cleanup-runs { display: grid; gap: 6px; margin-top: 11px; }
.admin-cleanup-run { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(4, auto); align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; background: #fffaf0; font-size: 11px; }
.admin-cleanup-run strong, .admin-cleanup-run small { display: block; }
.admin-cleanup-run small { margin-top: 2px; color: var(--muted); }
.maintenance-cleanup-status {
  margin: -2px 0 11px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f4f7f5;
  font-size: 12px;
  line-height: 1.5;
}
.maintenance-cleanup-status.pending { color: #805600; background: var(--amber-soft); font-weight: 700; }
.maintenance-cleanup-status.error { color: var(--red); background: var(--red-soft); font-weight: 700; }
.maintenance-cleanup-status.success { color: var(--green-dark); background: var(--green-soft); }

/* 管理总台使用更轻、更紧凑的操作密度；客户页面继续沿用原布局。 */
body.admin-mode { --bg: #f7f8f7; --line: #e8ece9; }
body.admin-mode main { padding-top: 18px; padding-bottom: 44px; }
body.admin-mode .topbar { margin-bottom: 10px; }
body.admin-mode .topbar h1 { font-size: 22px; letter-spacing: -.3px; }
body.admin-mode .title-switch-row { gap: 10px; }
body.admin-mode .account-identity,
body.admin-mode .erp-login-status { min-height: 30px; padding: 5px 8px; border-radius: 8px; font-size: 11px; }
body.admin-mode .admin-page-nav { top: 5px; gap: 3px; margin-bottom: 10px; padding: 3px; border-color: #e5e9e6; border-radius: 9px; background: #fafbfa; box-shadow: 0 2px 8px rgba(23,33,26,.035); }
body.admin-mode .admin-page-nav button { min-height: 42px; border-radius: 8px; color: #46564c; font-size: 16px; font-weight: 900; }
body.admin-mode .admin-page-nav button.active { color: white; background: var(--green); box-shadow: 0 3px 10px rgba(13, 101, 55, .22); }
body.admin-mode .admin-route-page { gap: 9px; }
body.admin-mode .admin-page-heading { min-height: 44px; gap: 9px; padding: 0 1px; }
body.admin-mode .admin-page-heading h2 { margin-top: 1px; font-size: 20px; letter-spacing: -.2px; }
body.admin-mode .admin-page-heading .eyebrow { font-size: 10px; }
body.admin-mode .admin-sync-state { font-size: 14px; }
body.admin-mode .panel { margin-top: 8px; padding: 12px; border-color: var(--line); border-radius: 10px; box-shadow: none; }
body.admin-mode .admin-route-page > .panel { margin-top: 0; }
body.admin-mode .panel-title { margin-bottom: 9px; }
body.admin-mode .admin-section-head { margin-bottom: 8px; }
body.admin-mode .admin-section-head h3 { font-size: 14px; }
body.admin-mode .admin-section-head span { margin-top: 2px; font-size: 10px; }
body.admin-mode .admin-summary-grid { gap: 5px; }
body.admin-mode .admin-summary-card { padding: 9px 10px; border-radius: 8px; }
body.admin-mode .admin-summary-card strong { margin-bottom: 4px; font-size: 24px; }
body.admin-mode .admin-summary-card span {
  color: #4f5c53;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}
body.admin-mode .publish-summary-grid .admin-summary-card span { color: #4f5c53; font-size: 14px; font-weight: 750; line-height: 1.35; }
body.admin-mode .admin-worker-grid { gap: 6px; }
body.admin-mode .admin-worker-card { padding: 9px; border-left-width: 2px; border-radius: 8px; }
body.admin-mode .admin-worker-current { min-height: 30px; margin: 6px 0; }
body.admin-mode .admin-worker-footer { margin-top: 6px; }
.admin-worker-health { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 5px 0 2px; padding: 5px 7px; border-radius: 6px; color: #536057; background: #f4f6f4; font-size: 10px; }
.admin-worker-health-state { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.admin-worker-health-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.admin-worker-health.warning { color: #805600; background: #fff7e8; }
.admin-worker-health.warning i { background: var(--amber); }
.admin-worker-health.danger { color: var(--red); background: #fff3f3; }
.admin-worker-health.danger i { background: var(--red); }
.admin-worker-health.paused i { background: #929b95; }
.admin-worker-health.capacity { color: #9a4d16; background: #fff0e5; }
.admin-worker-health.capacity i { background: var(--red); }
.create-total-progress { display: grid; gap: 8px; margin-top: 9px; padding: 10px 11px; border: 1px solid #dfe8e1; border-radius: 9px; background: #f8fbf8; }
.create-total-progress-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.create-total-progress-head > div { min-width: 0; }
.create-total-progress-head span, .create-total-progress-head strong, .create-total-progress-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-total-progress-head span { color: var(--muted); font-size: 10px; font-weight: 750; }
.create-total-progress-head strong { margin-top: 2px; color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.create-total-progress-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.create-total-progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #e5ebe6; }
.create-total-progress-track > i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.worker-task-progress { display: grid; gap: 5px; margin: 7px 0; }
.worker-task-progress-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-variant-numeric: tabular-nums; }
.worker-task-progress-summary strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.worker-task-progress-summary span { flex: 0 0 auto; color: var(--muted); font-weight: 800; }
.worker-task-progress-summary span.failed { color: var(--red); }
.worker-task-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #e5ebe6; }
.worker-task-progress-track > i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
body.admin-mode .admin-filter-row { gap: 5px; margin-bottom: 8px; }
body.admin-mode .admin-filter-row select,
body.admin-mode .admin-filter-row input,
body.admin-mode .publish-filter-chips input { height: 34px; padding: 0 9px; border-color: var(--line); border-radius: 7px; font-size: 11px; }
body.admin-mode .primary,
body.admin-mode .secondary,
body.admin-mode .danger { border-radius: 7px; padding: 8px 11px; }
body.admin-mode .compact-button { padding: 6px 9px; font-size: 11px; }
body.admin-mode .safe-cleanup-button {
  min-width: 158px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
}
body.admin-mode .numbers { gap: 5px; margin-bottom: 9px; }
body.admin-mode .number { padding: 9px 10px; border-color: var(--line); border-radius: 8px; }
body.admin-mode .number strong { margin-bottom: 4px; font-size: 20px; }
body.admin-mode .number > .number-label {
  color: #4f5c53;
  font-size: 14px;
  font-weight: 750;
}
button.number-static:disabled { cursor: default; }
body.admin-mode .rule-cards { gap: 4px; }
body.admin-mode .rule-card { min-height: 42px; padding: 6px 8px; border-radius: 8px; }
body.admin-mode .rule-card span { font-size: 11px; }
body.admin-mode .rule-card strong { font-size: 17px; }
body.admin-mode .admin-store-grid { gap: 7px; }
body.admin-mode .admin-store-card { gap: 7px; padding: 10px; border-radius: 9px; }
body.admin-mode .admin-store-card-head strong { font-size: 13px; }
body.admin-mode .admin-store-card-head small { margin-top: 2px; font-size: 9px; }
body.admin-mode .admin-store-total { padding: 3px 7px; font-size: 10px; }
body.admin-mode .admin-store-metrics { gap: 4px; }
body.admin-mode .admin-store-metrics > div { padding: 5px; border-radius: 6px; }
body.admin-mode .admin-store-metrics strong { font-size: 15px; }
body.admin-mode .admin-store-sku-preview { min-height: 20px; gap: 3px; }
body.admin-mode .admin-store-sku-preview span { padding: 3px 5px; border-radius: 5px; font-size: 9px; }
body.admin-mode .admin-customer-order { padding: 3px 7px; font-size: 10px; }
body.admin-mode .admin-customer-queue-item { gap: 5px; padding: 4px 6px; }
body.admin-mode .admin-task-list { gap: 5px; }
body.admin-mode .admin-task-row { gap: 8px; padding: 8px 9px; border-radius: 7px; }
body.admin-mode .admin-empty { padding: 16px; border-radius: 7px; }
body.admin-mode .admin-activity-row { gap: 7px; padding: 6px 8px; font-size: 10px; }
body.admin-mode .admin-activity-row small { margin-top: 1px; }
body.admin-mode .admin-work-card { padding: 9px; border-left-width: 2px; border-radius: 8px; }
body.admin-mode .admin-work-facts { gap: 5px; margin-top: 6px; }
body.admin-mode .admin-work-fact { padding: 6px 7px; border-radius: 6px; }
body.admin-mode .admin-pagination { min-height: 30px; margin-top: 6px; }

.publish-filter-chips { display: grid; gap: 5px; margin-bottom: 8px; }
.publish-filter-chip-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 6px; }
.publish-filter-chip-row > span { color: var(--muted); font-size: 10px; }
.publish-filter-chip-options { min-width: 0; display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; }
.publish-filter-chip { flex: 0 0 auto; min-height: 27px; padding: 4px 8px; border: 0; border-radius: 6px; color: #657068; background: #f0f3f1; font-size: 10px; white-space: nowrap; }
.publish-filter-chip:hover { color: var(--ink); background: #e8ece9; }
.publish-filter-chip.active { color: var(--green-dark); background: #dff0e5; font-weight: 750; }
.publish-filter-chips > input { margin-top: 1px; }
.publish-store-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.publish-store-card.error { border-left: 2px solid var(--red); }
.publish-store-exemplar { min-width: 0; display: grid; grid-template-columns: auto minmax(80px,.7fr) minmax(120px,1.3fr); align-items: center; gap: 6px; padding: 6px 7px; border-radius: 6px; background: #f6f8f6; font-size: 10px; }
.publish-store-exemplar > span, .publish-store-exemplar > small { color: var(--muted); }
.publish-store-exemplar > strong, .publish-store-exemplar > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-store-exemplar.error { background: #fff4f4; }
.publish-customer-queue-card { grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; border-left: 3px solid var(--green); }
.publish-queue-order { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 12px; font-weight: 850; }
.publish-customer-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.publish-customer-need { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.publish-customer-need > small { color: var(--muted); font-size: 12px; }
.publish-customer-need > strong { color: var(--green-dark); font-size: 20px; line-height: 1; }
.publish-work-queue-card { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
.publish-work-queue-card.warning { border-left-color: var(--amber); background: #fffdf7; }
.publish-work-queue-card.error { border-left-color: var(--red); background: #fffafa; }
.publish-work-queue-card.warning .publish-queue-order { background: var(--amber); }
.publish-work-queue-card.error .publish-queue-order { background: var(--red); }
.publish-work-queue-body { min-width: 0; display: grid; gap: 5px; }
.publish-work-queue-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.publish-work-queue-head > strong { font-size: 13px; }
.publish-work-queue-facts { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.publish-work-queue-fact { grid-template-columns: 66px minmax(0, .9fr) minmax(0, 1.1fr); }
.publish-work-queue-fact.current,
.publish-work-queue-fact.next {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  row-gap: 4px;
}
.publish-work-queue-fact.current {
  border-color: #b6dec5;
  background: var(--green-soft);
}
.publish-work-queue-fact.current > .admin-customer-queue-position,
.publish-work-queue-fact.next > .admin-customer-queue-position { grid-row: 1 / span 2; }
.publish-work-queue-fact.current > strong,
.publish-work-queue-fact.current > small,
.publish-work-queue-fact.next > strong,
.publish-work-queue-fact.next > small {
  grid-column: 2;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.publish-work-queue-fact.current > strong,
.publish-work-queue-fact.next > strong { font-size: 13px; line-height: 1.4; }
.publish-work-queue-fact.current > small,
.publish-work-queue-fact.next > small { font-size: 11px; line-height: 1.45; }
.publish-work-queue-fact.next { border-color: #dbe3ef; background: #f5f8fc; }
.publish-work-queue-meta { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-store-sku-preview span.bad { color: var(--red); border-color: #efd6d6; background: #fff5f5; }

.maintenance-issue-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.maintenance-issue-card { min-width: 0; display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-left: 2px solid var(--amber); border-radius: 9px; background: white; }
.maintenance-issue-card.automatic { border-left-color: var(--green); }
.maintenance-issue-card.manual { border-left-color: var(--red); }
.maintenance-issue-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.maintenance-issue-head > div { min-width: 0; }
.maintenance-issue-head strong, .maintenance-issue-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-issue-head strong { font-size: 13px; }
.maintenance-issue-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.maintenance-issue-kinds { display: flex; gap: 4px; overflow: hidden; }
.maintenance-issue-kinds span { padding: 3px 6px; border-radius: 5px; color: #69736d; background: #f1f3f2; font-size: 9px; white-space: nowrap; }
.maintenance-issue-kinds .automatic { color: var(--green-dark); background: var(--green-soft); }
.maintenance-issue-kinds .manual { color: var(--red); background: var(--red-soft); }
.maintenance-issue-kinds .quota_deferred,
.maintenance-issue-kinds .waiting_retry { color: var(--amber); background: var(--amber-soft); }
.maintenance-exemplar { min-width: 0; display: grid; grid-template-columns: minmax(110px,.8fr) minmax(0,1.2fr); gap: 8px; padding: 7px; border-radius: 6px; background: #f7f8f7; }
.maintenance-exemplar strong, .maintenance-exemplar small, .maintenance-exemplar span { display: block; overflow-wrap: anywhere; }
.maintenance-exemplar > div:first-child > span { color: var(--muted); font-size: 9px; }
.maintenance-exemplar > div:first-child > strong { margin: 2px 0; font-size: 11px; }
.maintenance-exemplar small { color: var(--muted); font-size: 9px; }
.maintenance-exemplar .red-text { color: var(--red); font-size: 10px; }
.maintenance-card-actions { display: flex; justify-content: flex-end; min-height: 28px; }
.maintenance-queue-card { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-left-width: 3px; }
.maintenance-queue-card .publish-queue-order { width: 32px; height: 32px; font-size: 14px; }
.maintenance-queue-card.automatic .publish-queue-order { background: var(--green); }
.maintenance-queue-card.waiting_retry .publish-queue-order,
.maintenance-queue-card.quota_deferred .publish-queue-order { background: var(--amber); }
.maintenance-queue-card.manual .publish-queue-order { background: var(--red); }
.maintenance-queue-body { min-width: 0; display: grid; gap: 4px; }
.maintenance-queue-head { min-width: 0; display: flex; align-items: center; gap: 5px; }
.maintenance-queue-head > strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-queue-state { flex: 0 0 auto; padding: 3px 7px; border-radius: 6px; color: var(--muted); background: #eef1ef; font-size: 10px; font-weight: 800; white-space: nowrap; }
.maintenance-queue-state.automatic { color: var(--green-dark); background: var(--green-soft); }
.maintenance-queue-state.waiting_retry, .maintenance-queue-state.quota_deferred { color: #805600; background: var(--amber-soft); }
.maintenance-queue-state.manual { color: var(--red); background: var(--red-soft); }
.maintenance-queue-meta, .maintenance-queue-message { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-queue-sample { min-width: 0; display: flex; align-items: center; gap: 5px; }
.maintenance-queue-sample strong, .maintenance-queue-sample span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-queue-sample strong { flex: 0 1 auto; font-size: 13px; }
.maintenance-queue-sample span { flex: 1 1 auto; color: var(--muted); font-size: 10px; }
.maintenance-queue-message { color: var(--red); font-size: 11px; }
.maintenance-queue-tail { display: grid; justify-items: end; gap: 4px; }
.maintenance-queue-need > strong { font-size: 22px; }
.maintenance-queue-card .maintenance-card-actions { min-height: 0; }
.maintenance-queue-card .maintenance-card-actions:empty { display: none; }
.maintenance-queue-card .maintenance-card-actions button { min-height: 31px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) {
  .admin-store-grid, .maintenance-issue-grid { grid-template-columns: 1fr; }
  #create-task-list, #publish-completed-list { grid-template-columns: 1fr; }
  .create-store-waits { grid-template-columns: 1fr; }
  .admin-store-latest { grid-template-columns: auto minmax(0, 1fr); }
  .admin-store-latest > small { grid-column: 2; }
  .admin-customer-queue-item { grid-template-columns: minmax(86px, auto) minmax(80px, 1fr); }
  .admin-customer-queue-item > small { grid-column: 2; }
  .maintenance-exemplar { grid-template-columns: 1fr; }
  .create-total-progress-head { grid-template-columns: 1fr; }
}

.number-static { cursor: default; }
.number-static::after { display: none; }
.number-static:hover { border-color: var(--line); background: var(--card); }

.numbers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.backend-occupancy-home { position: static; width: 100%; margin: 0 0 10px; }
.governance-numbers { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: -4px 0 14px; }
.customer-mode #governance-numbers { display: none; }
.governance-number-card { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); }
.governance-number-card strong, .governance-number-card span { display: block; }
.governance-number-card strong { color: var(--ink); font-size: 19px; line-height: 1.15; }
.governance-number-card span { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.governance-number-card.active { border-color: #e1bd88; background: #fff8eb; }
.governance-number-card.active strong { color: #9a5418; }
.number { min-width: 0; text-align: left; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.number strong { display: block; font-size: 24px; line-height: 1; margin-bottom: 7px; }
.number-value { display: flex !important; align-items: center; min-height: 24px; font-variant-numeric: tabular-nums; perspective: 180px; }
.number-digit { position: relative; display: inline-grid; place-items: center; flex: 0 0 .72em; width: .72em; height: 1em; overflow: hidden; transform-style: preserve-3d; }
.number-digit > span { grid-area: 1 / 1; display: grid; place-items: center; width: 100%; height: 100%; backface-visibility: hidden; }
.number-digit.flipping::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(23, 33, 26, .09); pointer-events: none; }
.number-digit.flip-increase .digit-old { transform-origin: center top; animation: number-old-up var(--number-step-duration, 180ms) cubic-bezier(.2,.72,.25,1) both; }
.number-digit.flip-increase .digit-new { color: var(--green); transform-origin: center bottom; animation: number-new-up var(--number-step-duration, 180ms) cubic-bezier(.2,.72,.25,1) both; }
.number-digit.flip-decrease .digit-old { transform-origin: center bottom; animation: number-old-down var(--number-step-duration, 180ms) cubic-bezier(.2,.72,.25,1) both; }
.number-digit.flip-decrease .digit-new { color: var(--amber); transform-origin: center top; animation: number-new-down var(--number-step-duration, 180ms) cubic-bezier(.2,.72,.25,1) both; }
@keyframes number-old-up {
  from { opacity: 1; transform: translateY(0) rotateX(0); }
  to { opacity: 0; transform: translateY(-105%) rotateX(-68deg); }
}
@keyframes number-new-up {
  from { opacity: 0; transform: translateY(105%) rotateX(68deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes number-old-down {
  from { opacity: 1; transform: translateY(0) rotateX(0); }
  to { opacity: 0; transform: translateY(105%) rotateX(68deg); }
}
@keyframes number-new-down {
  from { opacity: 0; transform: translateY(-105%) rotateX(-68deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
.number > .number-label { color: var(--muted); font-size: 12px; }
.number-source-state { display: block; margin-top: 3px; color: var(--amber); font-size: 10px; line-height: 1.2; }
/* 首页暂时保留“统计异常”文字，但不使用红色卡片强调。 */
.number.stats-anomaly { border-color: var(--line); background: var(--card); }
.number.stats-anomaly .number-source-state { color: var(--muted); }
.number.stats-updating { border-color: #ead7a4; }
.number.stats-updating .number-value { color: var(--amber); }
@media (min-width: 681px) {
  .number > .number-label {
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .04em;
  }
}
.number-button { width: 100%; position: relative; }
.number-button::after { content: "⌄"; position: absolute; right: 11px; bottom: 10px; color: var(--red); font-size: 14px; }
.number-button:hover, .number-button[aria-expanded="true"] { border-color: #e8b8b8; background: var(--red-soft); }
.completed-number-button::after { color: var(--green); }
.completed-number-button:hover, .completed-number-button[aria-expanded="true"] { border-color: #a8d7bb; background: var(--green-soft); }
.uploading-number-button::after { color: var(--blue); }
.uploading-number-button:hover, .uploading-number-button[aria-expanded="true"] { border-color: #b8d4ee; background: var(--blue-soft); }
.customer-mode .number-button:disabled { cursor: default; opacity: 1; }
.customer-mode .number-button:disabled::after { display: none; }
.customer-mode .number-button:disabled:hover { border-color: var(--line); background: var(--card); }

.pipeline-number-button::after { color: var(--green); }
.pipeline-number-button.pipeline-uploading::after { color: var(--blue); }
.pipeline-number-button.pipeline-scheduled::after { color: var(--amber); }
.pipeline-number-button.pipeline-upload_failed::after { color: var(--red); }
.pipeline-number-button[aria-expanded="true"] { border-color: #9fcfb2; background: var(--green-soft); }
.pipeline-drawer { margin-top: 0; border-color: #b9dfc8; background: #fbfffc; }
.pipeline-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pipeline-drawer-head > div { display: flex; align-items: baseline; gap: 10px; }
.pipeline-drawer-head h2 { margin: 0; }
.pipeline-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 10px; margin: 12px 0; }
.pipeline-toolbar input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.pipeline-issues { display: grid; gap: 8px; margin-bottom: 10px; }
.pipeline-issue-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 12px; border: 1px solid #e5bcbc; border-radius: 11px; background: #fffafa; }
.pipeline-issue-description strong, .pipeline-issue-description small, .pipeline-issue-description span { display: block; }
.pipeline-issue-description small { margin-top: 4px; color: var(--red); }
.pipeline-issue-description span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.pipeline-issue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.pipeline-strategy-status { flex-basis: 100%; color: var(--muted); text-align: right; }
.pipeline-strategy-status.verified { color: var(--green-dark); }
.pipeline-strategy-status.failed { color: var(--red); }
.pipeline-groups { display: grid; gap: 8px; }
.pipeline-empty { padding: 18px; border-radius: 11px; color: var(--muted); background: white; text-align: center; }
.pipeline-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.pipeline-group > summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr); align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer; list-style: none; }
.pipeline-group > summary::-webkit-details-marker { display: none; }
.pipeline-group > summary::after { content: "⌄"; position: absolute; right: 12px; color: var(--green); }
.pipeline-group[open] > summary { background: var(--green-soft); }
.pipeline-group[open] > summary::after { content: "⌃"; }
.pipeline-group-identity, .pipeline-group-action { min-width: 0; padding-right: 18px; }
.pipeline-group-identity strong, .pipeline-group-identity small,
.pipeline-group-action strong, .pipeline-group-action small { display: block; }
.pipeline-group-identity small, .pipeline-group-action small { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.pipeline-group-action { text-align: right; }
.pipeline-group-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 9px; color: var(--muted); font-size: 11px; }
.pipeline-group-meta span { padding: 3px 7px; border-radius: 999px; background: #f4f7f4; }
.pipeline-group-meta .pipeline-issue-badge { color: var(--red); background: var(--red-soft); }
.pipeline-item-list { display: grid; max-height: 460px; overflow: auto; border-top: 1px solid var(--line); }
.pipeline-item { display: grid; grid-template-columns: minmax(110px, .55fr) minmax(180px, 1fr) minmax(200px, 1.2fr); gap: 12px; padding: 10px 12px; border-top: 1px solid #eef2ee; }
.pipeline-item:first-child { border-top: 0; }
.pipeline-item.has-issue { border-left: 3px solid var(--red); }
.pipeline-item strong, .pipeline-item small { display: block; }
.pipeline-item small { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.pipeline-pages { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 11px; }

.completed-drawer { margin-top: 0; border-color: #b9dfc8; background: #fbfffc; }
.completed-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.completed-drawer-head > div { display: flex; align-items: baseline; gap: 10px; }
.completed-drawer-head h2 { margin: 0; }
.completed-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.completed-metric { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.completed-metric strong, .completed-metric span { display: block; }
.completed-metric strong { color: var(--green-dark); font-size: 22px; }
.completed-metric span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.completed-metric.warn { border-color: #e5bcbc; background: var(--red-soft); }
.completed-metric.warn strong { color: var(--red); }
.completed-note, .completed-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.completed-empty { padding: 14px; border-radius: 11px; background: white; }

.completed-filters { margin-top: 12px; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) minmax(180px, 1.4fr); gap: 7px; }
.completed-filters select, .completed-filters input { min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; background: white; }
.completed-detail-meta { margin: 9px 1px 6px; font-size: 12px; }
.completed-detail-list { display: grid; gap: 7px; max-height: 560px; overflow: auto; }
.completed-detail-item { display: grid; grid-template-columns: minmax(165px, .9fr) minmax(210px, 1.2fr) minmax(240px, 1.4fr); gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.completed-detail-item.stale { border-color: #e5bcbc; }
.completed-detail-item.blocked { border-left: 4px solid var(--amber); }
.completed-detail-item strong, .completed-detail-item small, .completed-detail-item span { display: block; }
.completed-detail-item small { margin-top: 3px; color: var(--muted); }
.completed-detail-status { display: inline-block !important; width: fit-content; margin-bottom: 4px; padding: 2px 7px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 750; }
.completed-detail-item.stale .completed-detail-status { color: var(--red); background: var(--red-soft); }
.completed-red-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--red); font-size: 12px; font-weight: 700; cursor: help; }
.completed-action { color: var(--ink); font-size: 12px; line-height: 1.45; }
.completed-blocked-reason { margin-top: 4px; color: #9a5b00; font-size: 11px; }
.completed-detail-pages { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 9px; }
.store-quota-badge { display: inline-flex !important; width: fit-content; margin-left: 6px; padding: 2px 7px; border-radius: 999px; color: white; background: var(--red); font-size: 10px; font-weight: 800; white-space: nowrap; }
.customer-store-overview-card.quota-blocked, .my-store-card.quota-blocked { border-color: #e5bcbc; background: var(--red-soft); }
.my-store-card:disabled { cursor: not-allowed; opacity: .72; }
@media (max-width: 900px) {
  #publish-completed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completed-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completed-detail-item { grid-template-columns: 1fr; gap: 7px; }
}

.completed-abnormal { margin-top: 12px; }
.completed-abnormal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.completed-abnormal-head > span { text-align: right; }
.completed-abnormal-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.completed-abnormal-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid #efcaca; border-radius: 10px; background: white; }
.completed-abnormal-item strong, .completed-abnormal-item span { display: block; }
.completed-abnormal-item span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.completed-abnormal-item time { color: var(--red); font-size: 12px; font-weight: 750; }
.completed-ok { padding: 10px 12px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; }

.exception-drawer { margin-top: 0; border-color: #efcaca; background: #fffafa; }
.exception-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.exception-head > div { display: flex; align-items: baseline; gap: 10px; }
.exception-head h2 { margin: 0; }
.exception-repair-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 12px; padding: 12px; border: 1px solid #a8d7bb; border-radius: 12px; background: var(--green-soft); }
.exception-repair-actions strong, .exception-repair-actions span { display: block; }
.exception-repair-actions strong { color: var(--green-dark); font-size: 14px; }
.exception-repair-actions span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.exception-repair-actions .primary { min-width: 220px; min-height: 46px; font-size: 14px; }
.exception-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exception-group { min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: white; }
.exception-group.completion { border-top: 3px solid var(--amber); }
.exception-group.publish { border-top: 3px solid var(--red); }
.exception-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.exception-group-head h3 { margin: 0; font-size: 14px; }
.exception-group-head strong { font-size: 20px; }
.exception-reasons { display: grid; gap: 5px; }
.exception-reason { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 9px; background: #f8faf8; font-size: 12px; }
.exception-reason span { min-width: 0; overflow-wrap: anywhere; }
.exception-reason b, .exception-reason small { display: block; }
.exception-reason small { margin-top: 2px; color: var(--muted); font-weight: 500; }
.exception-reason.not-repairable { background: #f5f3ef; }
.exception-category-select { display: flex; min-width: 0; align-items: center; gap: 8px; cursor: pointer; }
.exception-category-select input, .exception-item-select input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.exception-reason strong { flex: 0 0 auto; font-size: 12px; }
.exception-items { margin-top: 9px; }
.exception-items-toggle {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  color: var(--green-dark);
  background: #f8faf8;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  touch-action: manipulation;
}
.exception-items-toggle::after { content: "⌄"; float: right; color: var(--green); font-size: 15px; }
.exception-items-toggle[aria-expanded="true"] { border-color: #a8d7bb; background: var(--green-soft); }
.exception-items-toggle[aria-expanded="true"]::after { content: "⌃"; }
.exception-list { display: grid; gap: 5px; margin-top: 7px; max-height: 240px; overflow: auto; }
.exception-item { display: grid; grid-template-columns: 78px minmax(110px, .7fr) minmax(180px, 1.3fr) auto; align-items: center; gap: 9px; padding: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.exception-item strong, .exception-item small { display: block; }
.exception-item small { margin-top: 2px; color: var(--muted); }
.exception-item > span { color: var(--red); overflow-wrap: anywhere; }
.exception-item-select { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.exception-item-select span { font-size: 11px; font-weight: 750; }
.exception-item-select .repairable { color: var(--green-dark); }
.exception-item-select .not-repairable { color: var(--muted); }
.exception-ignore { min-width: 112px; padding: 8px 10px; color: #6b5425; background: #f4efe3; white-space: nowrap; }
.exception-empty { padding: 12px 0; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 14px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title > div { display: flex; align-items: center; gap: 9px; }
.panel-title .material-head-actions { justify-content: flex-end; flex-wrap: wrap; }
.mapped-index-sync-control { display: grid; justify-items: end; gap: 2px; }
.mapped-index-sync-control small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.mapped-index-sync-control.syncing small { color: var(--green-dark); }
.mapped-index-sync-control.error small { color: var(--red); }
.material-auto-option { min-height: 38px; padding: 6px 10px; }
.material-auto-option > input { width: 1px; height: 1px; margin: 0; }
.material-auto-option .timed-copy small {
  display: block;
  max-width: 260px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}
.panel h2 { margin: 0; font-size: 17px; }
.step { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--ink); color: white; font-weight: 700; font-size: 12px; }
.material-flow-status { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.material-flow-status::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; animation: material-status-breathe 1.5s ease-in-out infinite; }
.material-flow-status.waiting { color: var(--amber); background: var(--amber-soft); }
.material-flow-status.waiting::before { background: #d8890b; box-shadow: 0 0 0 0 rgba(216, 137, 11, .4); }
.material-flow-status.uploading { color: var(--blue); background: var(--blue-soft); }
.material-flow-status.uploading::before { background: var(--blue); box-shadow: 0 0 0 0 rgba(49, 105, 168, .4); }
.material-flow-status.complete { color: var(--green); background: var(--green-soft); }
.material-flow-status.complete::before { background: var(--green); box-shadow: 0 0 0 0 rgba(22, 131, 74, .4); }
@keyframes material-status-breathe {
  0%, 100% { opacity: .5; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.18); box-shadow: 0 0 0 5px transparent; }
}
/* 常驻主页状态用颜色和文字表达，不持续明暗闪烁。实际操作进度保留。 */
body.admin-mode[data-admin-page="home"] .material-flow-status::before,
body.admin-mode[data-admin-page="home"] .erp-login-status:not(.checking) i { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .material-flow-status::before, .erp-login-status i,
  .number-digit > span { animation: none !important; }
  .number-digit.flipping .digit-old { display: none; }
  .number-digit.flipping .digit-new { color: inherit; }
}

.materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.empty { grid-column: 1 / -1; padding: 22px 10px; text-align: center; color: var(--muted); background: #fafbfa; border-radius: 12px; }
.empty.storage-missing { color: var(--red); background: var(--red-soft); }
.store-card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.store-card.material-state-waiting-start,
.store-card.material-state-queued { border-left: 4px solid #d8890b; }
.store-card.material-state-processing { border-left: 4px solid var(--blue); }
.store-card.material-state-needs-input { border-left: 4px solid var(--red); }
.store-card.material-state-completed { border-left: 4px solid var(--green); }
.store-card[open] { grid-column: 1 / -1; border-color: #b9ddc8; box-shadow: 0 6px 16px rgba(23, 33, 26, .06); }
.store-card summary { min-height: var(--store-task-card-height); list-style: none; cursor: pointer; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.store-card summary::-webkit-details-marker { display: none; }
.store-title { min-width: 0; }
.store-title-line { min-width: 0; display: flex; align-items: center; gap: 6px; }
.store-title-line > strong { min-width: 0; flex: 1 1 auto; }
.store-title strong { display: block; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-title small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.store-material-summary { min-width: 0; display: flex !important; align-items: center; gap: 6px; }
.store-material-summary .customer-selected-time {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid #9fc8ee;
  border-radius: 6px;
  color: #12609f;
  background: #eef7ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.material-summary-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.store-material-month { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #9fcfb3; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; }
.store-material-state { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #e0b66c; border-radius: 999px; color: #9a5a00; background: var(--amber-soft); font-size: 11px; font-weight: 850; line-height: 1; white-space: nowrap; }
.store-material-state.processing { border-color: #9fc8ee; color: var(--blue); background: var(--blue-soft); }
.store-material-state.needs-input { border-color: #e5bcbc; color: var(--red); background: var(--red-soft); }
.store-material-state.completed { border-color: #9fcfb3; color: var(--green); background: var(--green-soft); }
.store-count { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 6px; color: var(--green); }
.store-quantity { display: flex; align-items: baseline; gap: 3px; }
.store-count strong { font-size: 21px; line-height: 1; }
.store-count span { font-size: 11px; }
.store-count .store-chevron { grid-column: 2; grid-row: 1 / span 2; }
.store-chevron { width: 7px; height: 7px; border-right: 1.5px solid #97a29a; border-bottom: 1.5px solid #97a29a; transform: rotate(45deg); transition: transform .2s; margin: 0 2px 3px 4px; }
.store-card[open] .store-chevron { transform: rotate(225deg); margin-bottom: -3px; }
.store-drawer { border-top: 1px solid var(--line); padding: 8px; background: #fbfcfb; display: grid; gap: 7px; }
.material { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 9px; display: grid; gap: 7px; }
.material-selected { background: white; }
.material-selected-head { min-width: 0; display: flex; align-items: center; gap: 8px; }
.material-selected-copy { min-width: 0; }
.material-selected-name { min-width: 0; display: flex; align-items: center; gap: 10px; }
.material-selected-copy strong { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.material-selected-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.material-selected-copy .material-next-queue { color: var(--blue); font-weight: 700; }
.customer-selected-badge { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #9fc8ee; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.repair-handling-badge { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #e0b66c; border-radius: 999px; color: #9a5a00; background: var(--amber-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.material-selected-copy .material-selected-period { color: var(--green); font-weight: 700; }
.material-selected-copy .material-square-inspection { color: var(--green); font-weight: 650; }
.material-selected-copy .material-square-inspection.repair { color: var(--amber); }
.material-selected-copy .customer-selected-time {
  width: fit-content;
  margin-top: 5px;
  padding: 5px 9px;
  border: 1px solid #9fc8ee;
  border-radius: 6px;
  color: #12609f;
  background: #eef7ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.material-reselect { flex: 0 0 auto; border: 1px solid #9fcfb3; border-radius: 8px; padding: 5px 10px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; line-height: 1.2; }
.material-reselect:hover:not(:disabled) { border-color: var(--green); background: var(--green); color: white; }
.material-reselect:disabled { opacity: .38; cursor: not-allowed; }
.material-error { border-color: #efc7c7; background: #fff8f8; }
.material-error > strong { color: var(--bad); font-size: 14px; }
.material-error-list { display: grid; gap: 4px; color: #8b3131; font-size: 13px; }
.material-error-list span { overflow-wrap: anywhere; }
.tag { padding: 3px 7px; border-radius: 999px; background: #f1f3f1; }
.tag.warn { color: var(--amber); background: var(--amber-soft); }
.tag.ok { color: var(--green); background: var(--green-soft); }
.supplement { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
select, input { width: 100%; border: 1px solid #ccd5cf; background: white; border-radius: 10px; padding: 10px 11px; outline: none; }
select:focus, input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,131,74,.1); }

.action-panel { text-align: center; }
.home-line-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 116px));
  justify-content: center;
  gap: 10px;
  padding: 3px 0;
}
.home-line-status-card {
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px solid #d6ddd8;
  border-radius: 13px;
  color: #657069;
  background: #f5f7f5;
  text-align: center;
}
.home-line-status-card strong { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.home-line-status-card span { font-size: 16px; line-height: 1.2; font-weight: 900; }
.home-line-status-card .home-line-detail {
  max-width: 92px;
  overflow: hidden;
  color: currentColor;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-line-status-card.active { border-color: #8fcbaa; color: var(--green-dark); background: var(--green-soft); }
.home-line-status-card.idle { border-color: #c8d8cc; color: #52655a; background: #f1f6f2; }
.home-line-start { min-height: 30px; padding: 5px 11px; border-radius: 8px; font-size: 11px; font-weight: 850; }
.home-line-start:disabled { color: #7b837e; border-color: #d6ddd8; background: #e9eeea; cursor: not-allowed; }
.action-controls.active-top {
  position: static;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #b9ddc8;
  border-radius: 13px;
  background: white;
  box-shadow: 0 5px 14px rgba(23, 33, 26, .08);
}
.action-controls.active-top .timed-option { display: none; }
.action-controls.active-top .danger { margin-left: 0; }
.status-pill { padding: 5px 9px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill:disabled { opacity: 1; }
.status-pill.actionable { cursor: pointer; box-shadow: 0 0 0 1px rgba(168,104,5,.16); }
.status-pill.actionable:hover, .status-pill.actionable[aria-expanded="true"] { color: #7d4c00; background: #ffe9b9; box-shadow: 0 0 0 3px rgba(168,104,5,.12); }
.status-pill.running { color: var(--blue); background: var(--blue-soft); }
.status-pill.good { color: var(--green); background: var(--green-soft); }
.status-pill.warn { color: var(--amber); background: var(--amber-soft); }
.status-pill.bad { color: var(--red); background: var(--red-soft); }
.status-pill.neutral { color: var(--muted); background: #f1f3f1; }
.supplement-guide { margin-bottom: 12px; padding: 13px; border: 1px solid #e6c678; border-radius: 13px; background: #fffbf1; text-align: left; }
.supplement-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.supplement-guide-head strong, .supplement-guide-head span { display: block; }
.supplement-guide-head strong { color: #7d4c00; font-size: 15px; }
.supplement-guide-head span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.supplement-guide-items { display: grid; gap: 9px; }
.supplement-guide-item { min-width: 0; padding: 11px; border: 1px solid #ead7a7; border-radius: 11px; background: white; }
.supplement-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.supplement-item-head > div { min-width: 0; }
.supplement-item-head strong, .supplement-item-head span { display: block; }
.supplement-item-head strong { font-size: 14px; }
.supplement-item-head span { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.supplement-path { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-top: 9px; padding: 7px 8px; border-radius: 8px; background: #f6f8f6; }
.supplement-path span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.supplement-path code { min-width: 0; color: #49524c; font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.supplement-issues { display: grid; gap: 7px; margin-top: 9px; }
.supplement-issue { padding: 9px 10px; border-left: 3px solid #d9981d; border-radius: 8px; background: var(--amber-soft); }
.supplement-issue-title { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.supplement-issue-title strong { color: #704500; font-size: 13px; }
.supplement-issue-title span { flex: 0 0 auto; padding: 2px 6px; border-radius: 99px; color: var(--amber); background: white; font-size: 10px; font-weight: 700; }
.supplement-issue p { margin: 5px 0 0; color: #4d4231; font-size: 12px; line-height: 1.55; }
.supplement-skus { margin-top: 5px; color: #7d5b25; font-size: 10px; overflow-wrap: anywhere; }
.supplement-raw { margin-top: 6px; }
.supplement-raw summary { cursor: pointer; color: var(--amber); font-size: 10px; }
.supplement-raw-list { display: grid; gap: 3px; margin-top: 5px; color: #8b3131; font-size: 10px; }
.supplement-raw-list span { overflow-wrap: anywhere; }
.supplement-guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #ead7a7; }
.supplement-guide-footer > span { color: var(--muted); font-size: 11px; }
.material-attention { animation: material-attention 1.8s ease-out; }
@keyframes material-attention {
  0%, 45% { border-color: #d8890b; box-shadow: 0 0 0 4px rgba(216,137,11,.18); }
  100% { border-color: var(--line); box-shadow: none; }
}
.task-materials {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(0, auto));
  grid-auto-columns: minmax(145px, 1fr);
  gap: 5px;
  margin-bottom: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.repair-task-status { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 11px 12px; border: 1px solid #8ebde8; border-radius: 12px; background: var(--blue-soft); text-align: left; }
.repair-task-status-copy { min-width: 0; }
.repair-task-status-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue); font-size: 13px; }
.repair-task-status-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.repair-task-status-numbers { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.repair-task-status-numbers span { min-width: 38px; text-align: center; }
.repair-task-status-numbers small { display: block; color: var(--muted); font-size: 9px; }
.repair-task-status-numbers strong { display: block; margin-top: 2px; color: var(--blue); font-size: 14px; }
.task-material-card { min-width: 0; min-height: var(--store-task-card-height); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfb; text-align: left; }
.task-material-card.running, .task-material-card.uploading { border-color: #a9c9eb; background: var(--blue-soft); }
.task-material-card.complete { border-color: #a9d8bc; background: var(--green-soft); }
.task-material-card.warn { border-color: #ecd08b; background: var(--amber-soft); }
.task-material-copy { min-width: 0; }
.task-material-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.25; }
.task-material-copy small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; line-height: 1.2; }
.task-material-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: white; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.task-material-card.running .task-material-badge, .task-material-card.uploading .task-material-badge { color: var(--blue); }
.task-material-card.complete .task-material-badge { color: var(--green); }
.task-material-card.warn .task-material-badge { color: var(--amber); }
.current-card { min-height: 68px; display: grid; place-items: center; background: #f8faf8; border-radius: 13px; padding: 12px; text-align: left; }
.backend-occupancy-state { width: 100%; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #e6c678; border-radius: 11px; background: #fff8e8; color: #704600; }
.backend-occupancy-state strong { font-size: 15px; }
.backend-occupancy-state small { color: #805d20; font-size: 12px; line-height: 1.5; }
.backend-occupancy-state span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.current-line { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.current-line div { min-width: 0; }
.current-line small { display: block; color: var(--muted); margin-bottom: 3px; }
.current-line strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.pipeline-control { margin-top: 10px; padding: 11px; border: 1px solid #dbe8df; border-radius: 13px; background: #fbfdfb; }
.pipeline-control-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pipeline-control-head strong { font-size: 13px; }
.pipeline-control-head span { font-size: 10px; text-align: right; }
.pipeline-queue-monitor { margin-top: 9px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.pipeline-queue-chip { min-width: 0; padding: 7px 6px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: center; }
.pipeline-queue-chip small, .pipeline-queue-chip strong { display: block; }
.pipeline-queue-chip small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-queue-chip strong { margin-top: 2px; color: var(--green-dark); font-size: 16px; }
.pipeline-queue-chip.attention strong { color: var(--red); }
.worker-monitor { margin-top: 9px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pipeline-performance { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.performance-chip { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; }
.performance-chip small { display: block; color: var(--muted); font-size: 9px; }
.performance-chip strong { display: block; margin-top: 2px; overflow: hidden; color: var(--green-dark); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.performance-reason { grid-column: 1 / -1; padding: 6px 9px; border-radius: 9px; background: #fff7e8; color: #8b5d13; font-size: 11px; }
.worker-card { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; text-align: left; }
.worker-card.running { border-color: #9ec5ef; background: var(--blue-soft); }
.worker-card.verifying { border-color: #9ec5ef; background: #f2f8ff; }
.worker-card.recovering, .worker-card.stopping { border-color: #ecd08b; background: var(--amber-soft); }
.worker-card.error, .worker-card.stale, .worker-card.blocked { border-color: #efb2b2; background: var(--red-soft); }
.worker-card.paused, .worker-card.draining { border-color: #ecd08b; background: var(--amber-soft); }
.worker-card.receipt_only { border-color: #9ec5ef; background: #f2f8ff; }
.worker-card.standby { border-style: dashed; color: #657069; background: #f4f6f4; }
.worker-head { display: flex; justify-content: space-between; gap: 5px; align-items: center; }
.worker-head strong { font-size: 12px; }
.worker-head span, .worker-card small { color: var(--muted); font-size: 10px; }
.worker-sku { margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 650; }
.worker-verify { display: block; margin-top: 3px; overflow: hidden; color: var(--blue); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.worker-error { display: block; margin-top: 4px; overflow: hidden; color: var(--red) !important; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.worker-card-footer { min-width: 0; margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.worker-heartbeat { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-control { flex: 0 0 auto; min-height: 27px; padding: 4px 8px; border: 1px solid #bfcac2; border-radius: 7px; color: var(--ink); background: white; font-size: 10px; font-weight: 700; }
.worker-control.resume { border-color: #82bf99; color: var(--green-dark); }
.worker-control:disabled { cursor: not-allowed; opacity: .5; }
.progress-track { height: 5px; margin: 14px 0; border-radius: 99px; background: #e9eeea; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width .3s; }
.primary, .secondary, .danger { border: 0; border-radius: 11px; padding: 11px 16px; font-weight: 650; }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.secondary { background: #eef2ef; color: var(--ink); }
.danger { background: var(--red-soft); color: var(--red); margin-left: 8px; }
.main-action { min-width: 210px; }
.compact-button { padding: 8px 11px; font-size: 12px; white-space: nowrap; }
.safe-cleanup-button {
  min-width: 158px;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 11px;
  box-shadow: 0 5px 14px rgba(22, 131, 74, .2);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.safe-cleanup-button:disabled { opacity: .72; box-shadow: none; }
.action-controls { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.concurrency-option { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; font-size: 12px; }
.concurrency-option select { width: auto; padding: 6px 25px 6px 8px; }
.concurrency-option input { width: auto; }
.diagnostic-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf8; font-size: 11px; }
.diagnostic-toggle input { width: auto; }
.timed-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8faf8;
  text-align: left;
  cursor: pointer;
}
.timed-option:has(input:checked) { border-color: #9fd1b4; background: var(--green-soft); }
.timed-option:has(input:disabled) { cursor: not-allowed; opacity: .62; }
.timed-option input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  padding: 2px;
  border-radius: 99px;
  background: #bdc7c0;
  transition: background .2s;
}
.switch-track i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(23, 33, 26, .2);
  transition: transform .2s;
}
.timed-option input:checked + .switch-track { background: var(--green); }
.timed-option input:checked + .switch-track i { transform: translateX(16px); }
.timed-option input:focus-visible + .switch-track { outline: 3px solid rgba(22,131,74,.18); }
.timed-copy strong { display: block; font-size: 13px; }
.main-action.busy::before,
.safe-cleanup-button.busy::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: white;
  border-radius: 50%;
  animation: button-spin .7s linear infinite;
}
@keyframes button-spin { to { transform: rotate(360deg); } }

.cleanup-card { border-color: #edcf95; background: #fffaf0; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.cleanup-copy h2 { margin: 0 0 9px; }
.space-numbers { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.space-numbers strong { color: var(--ink); }
.cleanup-progress { display: grid; gap: 6px; margin-top: 11px; max-width: 680px; }
.cleanup-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.cleanup-progress-head strong { color: #7d4d00; }
.cleanup-progress-head span { color: var(--muted); text-align: right; }
.cleanup-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #f1dfbd; }
.cleanup-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: #d58a13; transition: width .3s ease; }
.cleanup-progress small { color: var(--muted); line-height: 1.45; }
.cleanup-status { margin-top: 8px; max-width: 680px; line-height: 1.5; }
.cleanup-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.result-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.result-refresh { justify-content: flex-end; flex-wrap: wrap; }
.result-group { width: 100%; text-align: left; color: inherit; border: 1px solid var(--line); background: #f8faf8; border-radius: 12px; padding: 11px; min-height: 84px; }
.result-group:hover { border-color: #a8d7bb; background: var(--green-soft); }
.result-upload_failed:hover { border-color: #e8b8b8; background: var(--red-soft); }
.result-group h3 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.result-group strong { font-size: 22px; }
.sku-list { margin-top: 6px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; max-height: 48px; overflow: auto; }

.rule-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rules-panel.rules-unavailable { display: none; }
.rule-card {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf8;
  color: var(--ink);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.rule-card span { color: var(--muted); font-size: 13px; font-weight: 600; }
.rule-card strong {
  min-width: 2ch;
  color: var(--green-dark);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rule-card:hover, .rule-card.active { border-color: #9fd1b4; background: var(--green-soft); }
.rule-card:disabled { cursor: default; opacity: .55; }
.rules-drawer { margin-top: 10px; padding: 13px; border: 1px solid #cfe5d8; border-radius: 13px; background: #fbfdfb; }
.rules-drawer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.rule-list { display: grid; gap: 7px; }
.rule-list-row { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px; }
.price-rule-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.rule-kind { align-self: center; justify-self: start; padding: 4px 7px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: 11px; }
.rule-kind.special { background: var(--amber-soft); color: var(--amber); }
.rule-fields { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.rule-kind.special + .rule-fields { grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr); }
.rule-field { min-width: 0; }
.rule-field span { display: block; margin: 0 0 3px 2px; color: var(--muted); font-size: 10px; }
.rule-field input { min-width: 0; padding: 8px 9px; border-radius: 8px; }
.rule-remove { border: 0; background: transparent; color: var(--red); padding: 8px; }
.rule-row-edit { border: 0; border-radius: 8px; background: var(--green-soft); color: var(--green-dark); padding: 8px 11px; font-weight: 650; }
.rule-row-edit:hover { background: #d9f0e3; }
.rule-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.rule-lock-state { align-self: center; margin-right: auto; color: var(--muted); font-size: 12px; }
.rule-edit { color: var(--green-dark); border: 1px solid #a8d7bb; background: var(--green-soft); }
.rule-readonly .rule-list-row { background: #f8faf8; }
.rule-readonly input:disabled, .rule-readonly select:disabled {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  opacity: 1;
  cursor: default;
  background: #f2f5f3;
  border-color: #e0e6e2;
}
.rule-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.rule-pagination button { padding: 7px 11px; }
.title-rule-tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.title-rule-token { display: flex; align-items: center; max-width: 150px; border: 1px solid #d9e2dc; border-radius: 99px; background: white; overflow: hidden; }
.title-rule-token input { width: 108px; min-width: 48px; border: 0; border-radius: 0; padding: 5px 1px 5px 9px; box-shadow: none; font-size: 11px; }
.title-rule-token button { border: 0; background: transparent; color: var(--red); padding: 4px 8px 4px 4px; }
.sku-prefix-note { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.sku-prefix-discovery { margin-bottom: 10px; padding: 11px; border: 1px solid #9fd1b4; border-radius: 11px; background: var(--green-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sku-prefix-discovery-copy { min-width: 0; }
.sku-prefix-discovery-copy strong, .sku-prefix-discovery-copy span { display: block; }
.sku-prefix-discovery-copy strong { color: var(--green-dark); font-size: 14px; }
.sku-prefix-discovery-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.sku-prefix-add-active { flex: 0 0 auto; white-space: nowrap; }
.sku-prefix-groups { display: grid; gap: 9px; }
.sku-prefix-group { overflow: hidden; border: 1px solid #cfe5d8; border-radius: 11px; background: #f8faf8; }
.sku-prefix-group[open] { background: white; }
.sku-prefix-group-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; cursor: pointer; color: var(--green-dark); }
.sku-prefix-group-summary::marker { color: var(--green); }
.sku-prefix-group-count { color: var(--muted); font-size: 11px; font-weight: 500; }
.sku-prefix-group-list { padding: 0 9px 9px; }
.sku-prefix-row { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(130px, .7fr) auto; align-items: end; gap: 8px; }
.sku-prefix-row select, .sku-prefix-row input { min-width: 0; padding: 8px 9px; border-radius: 8px; }
.sku-prefix-value {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfe5d8;
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  white-space: nowrap;
}
.sku-prefix-save-state {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #9fd1b4;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 650;
}
.rule-inline-form, .rule-search, .rule-add-stop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 10px; }
.rule-search { margin-top: 0; }
.rule-search input, .rule-inline-form input, .rule-add-stop input { padding: 9px 10px; }
.rule-correction { margin-top: 8px; color: var(--amber); font-size: 12px; }
.rule-exact { margin: 9px 0; padding: 10px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rule-exact.found { background: var(--amber-soft); }
.rule-exact.missing { display: block; background: var(--green-soft); }
.rule-exact strong, .rule-exact span { display: block; }
.rule-exact span { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.rule-exact .danger { margin-left: 0; }
.discontinued-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.discontinued-copy { min-width: 0; }
.discontinued-copy strong, .discontinued-copy span { display: block; }
.discontinued-copy strong { font-size: 13px; }
.discontinued-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.discontinued-recent-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.discontinued-recent-pane { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; }
.discontinued-recent-pane.removed { border-color: #ead8ae; background: #fffaf0; }
.discontinued-recent-pane .rule-list-caption { margin-top: 0; font-weight: 700; }
.discontinued-removed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.discontinued-removed-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.discontinued-removed-row span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.rule-list-caption { margin: 10px 0 6px; color: var(--muted); font-size: 12px; }
.rule-empty, .rule-loading { padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }

/* 价格规则属于高频维护项，明细采用更易读的字号。 */
.rules-drawer[data-rule-drawer="prices"] .rules-drawer-head strong { font-size: 19px; }
.rules-drawer[data-rule-drawer="prices"] .rule-list { gap: 10px; }
.rules-drawer[data-rule-drawer="prices"] .rule-list-row { padding: 12px; }
.rules-drawer[data-rule-drawer="prices"] .rule-kind {
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 700;
}
.rules-drawer[data-rule-drawer="prices"] .rule-field span {
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
}
.rules-drawer[data-rule-drawer="prices"] .rule-field input {
  min-height: 43px;
  padding: 9px 11px;
  font-size: 16px;
  font-weight: 600;
}
.rules-drawer[data-rule-drawer="prices"] .rule-remove,
.rules-drawer[data-rule-drawer="prices"] .rule-actions button,
.rules-drawer[data-rule-drawer="prices"] .rule-pagination { font-size: 14px; }

.mapped-dialog {
  width: min(900px, calc(100% - 28px));
  max-height: min(860px, calc(100dvh - 28px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: white;
  box-shadow: 0 28px 90px rgba(23, 33, 26, .25);
}
.mapped-dialog::backdrop { background: rgba(14, 23, 17, .5); backdrop-filter: none; }
.mapped-shell { padding: 20px; display: grid; gap: 14px; overflow: auto; max-height: min(860px, calc(100dvh - 28px)); }
.mapped-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.mapped-head h2 { margin: 4px 0 0; font-size: 22px; }
.mapped-close { font-size: 28px; line-height: 1; padding: 2px 7px; }
.mapped-mode-switch { position: sticky; z-index: 25; top: -20px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 7px 18px rgba(23, 33, 26, .06); backdrop-filter: none; }
.mapped-mode-button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
.mapped-mode-button.active { background: var(--green); color: white; box-shadow: 0 5px 13px rgba(22, 131, 74, .2); }
.mapped-manual-mode { display: grid; gap: 14px; }
.mapped-auto-mode { display: grid; gap: 11px; padding: 14px; border: 1px solid #a8d7bb; border-radius: 14px; background: linear-gradient(145deg, #f4fbf6, #fff); }
.mapped-auto-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mapped-auto-head strong, .mapped-auto-head span { display: block; }
.mapped-auto-head strong { font-size: 15px; }
.mapped-auto-head div > span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mapped-auto-safe { flex: 0 0 auto; color: var(--green-dark); font-size: 11px; font-weight: 750; }
.mapped-auto-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; gap: 10px; }
.mapped-auto-customers { display: grid; gap: 8px; padding: 10px; border: 1px solid #d7e8dd; border-radius: 11px; background: rgba(255, 255, 255, .76); }
.mapped-auto-result { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid #d7e8dd; border-radius: 11px; background: rgba(255, 255, 255, .76); }
.mapped-recommendation-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 2px 0; }
.mapped-recommendation-head strong { font-size: 13px; }
.mapped-recommendation-head span { color: var(--muted); font-size: 11px; }
.mapped-recommendation-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mapped-recommendation { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; }
.mapped-recommendation:hover { border-color: #78bd96; background: var(--green-soft); }
.mapped-recommendation strong, .mapped-recommendation span, .mapped-recommendation small { display: block; min-width: 0; }
.mapped-recommendation strong { font-size: 14px; }
.mapped-recommendation span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mapped-recommendation small { color: var(--green-dark); font-size: 11px; font-weight: 750; }
.mapped-recommendation:disabled { cursor: wait; opacity: .62; }
.mapped-recommendation-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.mapped-recommendation-actions button { white-space: nowrap; }
.mapped-connection-row { display: flex; align-items: stretch; gap: 8px; }
.mapped-connection { flex: 1 1 auto; padding: 10px 12px; border-radius: 10px; font-size: 12px; overflow-wrap: anywhere; }
.mapped-connection-row button { flex: 0 0 auto; }
.mapped-connection.good { color: var(--green-dark); background: var(--green-soft); }
.mapped-connection.warn { color: var(--amber); background: var(--amber-soft); }
.mapped-connection.bad { color: var(--red); background: var(--red-soft); }
.mapped-scan-status { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 8px 11px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-size: 13px; font-weight: 650; }
.mapped-scan-status i { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22, 131, 74, .45); animation: mapped-breathe 1.35s ease-in-out infinite; }
@keyframes mapped-breathe {
  0%, 100% { opacity: .55; box-shadow: 0 0 0 0 rgba(22, 131, 74, .35); }
  50% { opacity: 1; box-shadow: 0 0 0 7px rgba(22, 131, 74, 0); }
}
.mapped-stage-progress { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid #a8d7bb; border-radius: 11px; background: var(--green-soft); }
.mapped-stage-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--green-dark); font-size: 13px; }
.mapped-stage-progress small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.mapped-stage-progress.error { border-color: #efb3b3; background: var(--red-soft); }
.mapped-stage-progress.connection-uncertain {
  border-color: #dfb85f;
  background: var(--amber-soft);
}
.mapped-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #cee6d7; }
.mapped-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.mapped-stage-progress.pending .mapped-progress-track i,
.mapped-global-progress.pending .mapped-progress-track i {
  width: 34% !important;
  animation: mapped-preflight-pulse 1.4s ease-in-out infinite;
}
@keyframes mapped-preflight-pulse {
  0% { transform: translateX(-115%); opacity: .55; }
  50% { opacity: 1; }
  100% { transform: translateX(300%); opacity: .55; }
}
.mapped-global-progress {
  position: fixed;
  z-index: 1000;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(680px, calc(100% - 24px));
  display: grid;
  gap: 7px;
  padding: 13px 15px;
  transform: translateX(-50%);
  border: 1px solid #8dccaa;
  border-radius: 14px;
  background: #effaf3;
  box-shadow: 0 14px 42px rgba(17, 52, 31, .2);
  /* Keep this fixed surface independent of live content painted underneath. */
  backdrop-filter: none;
}
.mapped-global-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--green-dark); }
.mapped-global-progress-head > div { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.mapped-global-progress small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.mapped-global-progress.error { border-color: #ef9e9e; background: #fff0f0; }
.mapped-global-progress.connection-uncertain {
  border-color: #dfb85f;
  background: #fff8e5;
}
.mapped-global-progress.complete { border-color: #7fc89c; background: #edfaf2; }
.mapped-global-progress-close { min-width: 28px; min-height: 28px; padding: 0 7px; border: 0; border-radius: 50%; background: rgba(23, 33, 26, .08); color: inherit; font-size: 20px; line-height: 1; }
.mapped-frequent-customers { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.mapped-frequent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mapped-frequent-head strong { font-size: 13px; }
.mapped-frequent-head span { color: var(--muted); font-size: 11px; }
.mapped-frequent-customer-list { display: flex; flex-wrap: wrap; gap: 7px; }
.mapped-frequent-customer { min-height: 34px; padding: 7px 12px; border: 1px solid #a8d7bb; border-radius: 999px; background: white; color: var(--green-dark); font-size: 13px; font-weight: 750; }
.mapped-frequent-customer:hover { border-color: var(--green); background: var(--green-soft); }
.mapped-frequent-customer.active { border-color: var(--green); background: var(--green); color: white; }
.mapped-frequent-customer:disabled { cursor: wait; opacity: .55; }
.mapped-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mapped-selectors label > span { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 12px; }
.mapped-role-selectors { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.mapped-role-picker { display: grid; gap: 8px; padding: 12px; border: 1px solid #b9ddc8; border-radius: 14px; background: linear-gradient(145deg, #f2faf5, #fff); }
.mapped-role-picker .mapped-frequent-head { grid-column: 1 / -1; }
.mapped-role-native { display: none; }
.mapped-role-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.mapped-role-buttons button { min-width: 0; min-height: 48px; display: grid; place-content: center; gap: 2px; padding: 7px 10px; border: 1px solid #a8d7bb; border-radius: 10px; color: var(--green-dark); background: white; text-align: center; }
.mapped-role-buttons button:hover:not(:disabled), .mapped-role-buttons button.active { border-color: var(--green); background: var(--green); color: white; }
.mapped-role-buttons button:disabled { cursor: not-allowed; border-color: var(--line); color: #9aa29d; background: #f5f6f5; }
.mapped-role-buttons button strong { font-size: 14px; }
.mapped-role-buttons button small { font-size: 10px; font-weight: 600; }
.mapped-source-selectors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mapped-source-selectors .mapped-color-group-buttons { grid-column: 1 / -1; }
.mapped-color-group-buttons { display: none; }
.mapped-target-inline { display: none; min-width: 0; }
.mapped-target-inline-title { color: var(--muted); font-size: 12px; }
.mapped-target-tags { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mapped-target-tag { min-width: 0; padding: 6px 8px; border: 1px solid #b9ddc8; border-radius: 9px; background: var(--green-soft); }
.mapped-target-tag small, .mapped-target-tag strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapped-target-tag small { color: var(--green-dark); font-size: 10px; font-weight: 700; }
.mapped-target-tag strong { margin-top: 2px; color: var(--ink); font-size: 13px; line-height: 1.25; }
.mapped-target-tag.pending { border-color: var(--line); background: #f4f6f4; }
.mapped-target-tag.pending strong { color: var(--muted); font-weight: 650; }
.mapped-dates-section, .mapped-target-section, .mapped-ledger-section { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.mapped-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mapped-dates-section .mapped-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.mapped-section-head > strong { font-size: 14px; }
.mapped-date-summary strong, .mapped-date-summary span { display: block; }
.mapped-date-summary strong { font-size: 14px; }
.mapped-date-summary span { margin-top: 3px; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.mapped-assign-button { min-width: 190px; min-height: 38px; justify-self: center; white-space: nowrap; }
.mapped-assign-button.guidance {
  border: 1px solid #dfb85f;
  background: var(--amber-soft);
  color: #7d4c00;
  cursor: pointer;
}
.mapped-assign-button.guidance:hover { background: #ffe9b9; }
.mapped-date-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.mapped-date-actions .muted { font-size: 12px; font-weight: 650; white-space: nowrap; }
.mapped-date-actions .compact-button { min-height: 34px; white-space: nowrap; }
.mapped-dates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-height: 290px; overflow: auto; }
.mapped-empty { grid-column: 1 / -1; padding: 18px 8px; text-align: center; color: var(--muted); font-size: 12px; }
.mapped-date { position: relative; min-width: 0; min-height: 66px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; padding: 10px 31px 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.mapped-date:has(input:checked) { border-color: #78bd96; background: var(--green-soft); }
.mapped-date.assigned, .mapped-date.invalid { cursor: not-allowed; background: #f2f4f2; opacity: .72; }
.mapped-date input { width: 19px; height: 19px; margin: 0; accent-color: var(--green); }
.mapped-date-copy { min-width: 0; }
.mapped-date-copy strong, .mapped-date-copy small { display: block; }
.mapped-date-copy strong { font-size: 17px; line-height: 1.2; }
.mapped-date-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapped-date-details-trigger { position: absolute; top: 7px; right: 5px; width: 25px; height: 29px; padding: 0; border: 1px solid #b9ddc8; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 22px; line-height: 1; }
.mapped-date-details-trigger:hover { border-color: var(--green); background: #daf1e4; }
.mapped-date-details-trigger:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.mapped-date em { grid-column: 2; color: var(--green); font-size: 12px; line-height: 1.3; font-style: normal; font-weight: 700; }
.mapped-date.assigned em, .mapped-date.invalid em { color: var(--amber); }
.mapped-date.assigned[class*="progress-"] { opacity: 1; }
.mapped-date.assigned.progress-published { background: var(--green-soft); border-color: #a8d5bd; }
.mapped-date.assigned.progress-published em { color: var(--green-dark); }
.mapped-date[class*="progress-"] em { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.mapped-date-progress-detail { grid-column: 2; color: var(--amber); font-size: 13px; line-height: 1.4; font-weight: 650; }
.mapped-material-phase-note { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
body.customer-mode .mapped-date.assigned.progress-processing em { color: var(--green-dark); }
body.customer-mode .mapped-date.assigned.progress-processing .mapped-date-progress-detail { color: var(--muted); font-weight: 500; }
.mapped-date-skus-panel { position: fixed; z-index: 30; top: 50%; right: 18px; width: min(360px, calc(100vw - 36px)); max-height: min(76dvh, 680px); transform: translateY(-50%); border: 1px solid #b9ddc8; border-radius: 16px; background: white; box-shadow: 0 18px 56px rgba(14, 23, 17, .22); }
.mapped-date-skus-shell { display: grid; gap: 12px; margin: 0; padding: 18px; }
.mapped-date-skus-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mapped-date-skus-head h3 { margin: 0; font-size: 20px; }
.mapped-date-skus-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.mapped-date-skus-close { min-width: 38px; min-height: 38px; font-size: 25px; line-height: 1; }
.mapped-date-sku-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.mapped-date-skus-panel .mapped-date-sku-list { max-height: min(62dvh, 540px); overflow: auto; padding-right: 2px; }
.mapped-date-sku-list code { min-width: 0; padding: 6px 8px; border-radius: 7px; background: #eef5f0; color: #244332; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; user-select: text; }
.mapped-target-section .mapped-selectors { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2px; }
.mapped-suggestion { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark); }
.mapped-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mapped-submit-row .primary { min-width: 210px; }
.mapped-customer-submit-bar { display: none; }
.mapped-ledger { display: grid; gap: 6px; max-height: 210px; overflow: auto; }
.mapped-ledger-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(150px, .8fr); gap: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.mapped-ledger-row > div { min-width: 0; }
.mapped-ledger-row strong, .mapped-ledger-row small { display: block; overflow-wrap: anywhere; }
.mapped-ledger-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.mapped-ledger-status { text-align: right; }
.mapped-ledger-status > strong { color: var(--green); font-size: 12px; }
.mapped-ledger-row.failed .mapped-ledger-status > strong,
.mapped-ledger-row.source_changed .mapped-ledger-status > strong { color: var(--red); }
.mapped-ledger-row.archive_pending .mapped-ledger-status > strong,
.mapped-ledger-row.scheduled .mapped-ledger-status > strong { color: var(--amber); }

.drawer { margin: 14px 0; color: var(--muted); }
.drawer summary { cursor: pointer; padding: 12px 2px; font-size: 13px; }
.drawer-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; flex-wrap: wrap; }
.events { max-height: 280px; overflow: auto; background: #17211a; color: #d7e1d9; border-radius: 12px; padding: 10px; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.event { display: grid; grid-template-columns: 145px 1fr; gap: 8px; }
.event.error { color: #ffb7b7; }
.event.warn { color: #ffdda0; }

.login-shell { position: fixed; inset: 0; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 20%, #edf8f1, var(--bg) 55%); }
.login-card { width: min(360px, 100%); background: white; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 24px 70px rgba(23,33,26,.08); }
.login-card h1 { margin: 10px 0 4px; font-size: 24px; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-card label { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }
.login-card input { margin-top: 5px; color: var(--ink); }
.login-card .primary { width: 100%; margin-top: 18px; }
.brand-mark { width: 48px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green); color: white; font-size: 13px; font-weight: 800; }
.form-error { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 8px; }
.erp-login-dialog { width: min(430px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: white; box-shadow: 0 28px 90px rgba(23, 33, 26, .28); }
.erp-login-dialog::backdrop { background: rgba(14, 23, 17, .5); backdrop-filter: blur(2px); }
.erp-login-form { display: grid; gap: 13px; padding: 22px; }
.erp-login-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.erp-login-head h2 { margin: 4px 0 0; font-size: 21px; }
.erp-login-close { font-size: 28px; line-height: 1; padding: 1px 7px; }
.erp-login-note { margin: 0; padding: 10px 11px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; line-height: 1.55; }
.erp-login-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.erp-login-form input { width: 100%; color: var(--ink); }
.erp-login-form > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.erp-login-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.erp-login-actions button { min-height: 43px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #17211a; color: white; padding: 10px 14px; border-radius: 10px; font-size: 13px; z-index: 10; }

.my-store-picker { display: grid; gap: 8px; padding: 12px; border: 1px solid #b9ddc8; border-radius: 14px; background: linear-gradient(145deg, #f2faf5, #fff); }
.my-store-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.my-store-card { min-width: 0; display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; }
.my-store-card:hover { border-color: #78bd96; background: var(--green-soft); }
.my-store-card.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(22, 131, 74, .1); }
.my-store-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.3; }
.my-store-card small { color: var(--muted); font-size: 10px; }
.mapped-store-first-picker, .mapped-store-material-picker { display: grid; gap: 9px; padding: 12px; border: 1px solid #b9ddc8; border-radius: 14px; background: linear-gradient(145deg, #f2faf5, #fff); }
.mapped-store-first-picker .mapped-frequent-head > div { min-width: 0; }
.mapped-store-first-picker .mapped-frequent-head strong,
.mapped-store-first-picker .mapped-frequent-head span { display: block; }
.mapped-store-first-list, .mapped-store-material-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
.mapped-store-first-card, .mapped-store-material-card { min-width: 0; display: grid; gap: 4px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; text-align: left; }
.mapped-store-first-card:hover:not(:disabled), .mapped-store-material-card:hover:not(:disabled), .mapped-store-material-card.active { border-color: var(--green); background: var(--green-soft); }
.mapped-store-first-card strong, .mapped-store-material-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mapped-store-first-card span, .mapped-store-material-card span { color: var(--green-dark); font-size: 11px; font-weight: 700; }
.mapped-store-first-card small, .mapped-store-material-card small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mapped-store-first-card:disabled { cursor: not-allowed; opacity: .58; }
.mapped-store-first-status { padding: 10px 11px; border-radius: 9px; color: var(--muted); background: #f4f6f4; font-size: 12px; }
.customer-stores-overview { display: grid; gap: 8px; padding: 12px; }
.customer-stores-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-stores-head > div { display: flex; align-items: center; gap: 9px; }
.customer-stores-head h2 { margin: 0; font-size: 18px; }
.customer-store-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.customer-stores-toggle { display: none; width: min(320px, 100%); min-height: 52px; margin: 4px auto; justify-content: center; gap: 12px; border: 1px solid var(--green-dark); border-radius: 12px; padding: 12px 20px; color: white; background: var(--green); box-shadow: 0 3px 10px rgba(13, 101, 55, .18); font-size: 17px; line-height: 1.4; font-weight: 800; white-space: nowrap; }
.customer-stores-toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.customer-stores-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.customer-stores-toggle:hover { background: var(--green-dark); }
.customer-stores-toggle:focus-visible { outline: 3px solid #83c49d; outline-offset: 3px; }
.customer-yesterday-sales { min-height: 28px; display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border: 1px solid #acd9bd; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); white-space: nowrap; }
.customer-yesterday-sales span { font-size: 11px; }
.customer-yesterday-sales strong { font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.customer-yesterday-sales.unavailable { border-color: var(--line); color: var(--muted); background: #f5f6f5; }
.customer-store-overview-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.customer-store-overview-card { min-width: 0; min-height: 148px; display: grid; grid-template-rows: auto minmax(50px, auto) auto; align-content: start; gap: 9px; padding: 12px 13px; border: 1px solid #b9ddc8; border-radius: 12px; background: linear-gradient(145deg, #f2faf5, #fff); }
.customer-store-overview-card strong { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 1.3; }
.customer-store-name-row { min-width: 0; display: flex; align-items: center; gap: 6px; }
.customer-store-name-row > .customer-store-name { width: auto; min-width: 0; min-height: 32px; flex: 1 1 auto; display: flex; align-items: center; margin: -12px 0 0 -13px; padding: 6px 20px 6px 13px; clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%); color: white; background: var(--green); font-size: 17px; line-height: 1.15; letter-spacing: .1px; }
.customer-store-overview-card.quota-blocked .customer-store-name { background: #a9473f; }
.customer-store-sku-number { width: 29px; height: 29px; flex: 0 0 29px; display: inline-grid; place-items: center; border: 2px solid var(--green); border-radius: 50%; color: var(--green-dark); background: white; font-size: 12px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: 0 1px 4px rgba(13, 101, 55, .16); }
.customer-store-overview-card.quota-blocked .customer-store-sku-number { border-color: #a9473f; color: #8f332d; }
.customer-store-meta { min-width: 0; overflow: hidden; }
.customer-store-material-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); align-content: center; gap: 6px; }
.customer-store-material-labels .store-artist-code { width: 100%; min-width: 0; height: auto; min-height: 34px; padding: 7px 9px; font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.customer-store-material-labels .store-artist-code:only-child { min-height: 56px; padding: 10px; font-size: 17px; border-radius: 10px; }
.customer-store-material-action { width: 100%; min-height: 28px; padding: 5px 8px; border: 1px solid #83c49d; border-radius: 7px; color: var(--green-dark); background: white; font-size: 11px; font-weight: 800; }
.customer-store-material-action:hover:not(:disabled) { border-color: var(--green); color: white; background: var(--green); }
.customer-store-material-action:disabled { cursor: not-allowed; border-color: var(--line); color: #8c948f; background: #f2f4f2; }
.quota-unlock-action { padding: 6px 10px; border: 1px solid #c57335; border-radius: 7px; color: #8b481b; background: #fff6e8; font-size: 12px; cursor: pointer; }
.quota-unlock-action:disabled { opacity: .65; cursor: wait; }
#customer-store-list .quota-unlock-action { grid-column: 1 / -1; min-height: 36px; }
#customer-store-list { align-items: start; }
#customer-store-list > .customer-store-overview-card { min-height: 0; grid-template-columns: minmax(0, 1fr) 92px; grid-template-rows: auto auto; gap: 12px 10px; }
#customer-store-list .customer-store-name-row { grid-column: 1 / -1; }
#customer-store-list .customer-store-material-labels { grid-column: 1; grid-row: 2; align-self: center; }
#customer-store-list .customer-store-material-action { grid-column: 2; grid-row: 2; align-self: center; min-height: 56px; padding: 10px 8px; border-radius: 10px; color: white; background: var(--green); font-size: 16px; line-height: 1.4; touch-action: manipulation; }
#customer-store-list .customer-store-material-action:hover:not(:disabled) { background: var(--green-dark); }
#customer-store-list .customer-store-material-action:focus-visible { outline: 3px solid #83c49d; outline-offset: 2px; }
#customer-store-list .customer-store-material-action:disabled { color: #737d76; background: #f2f4f2; }
#customer-store-list .quota-blocked .customer-store-material-action:disabled { border-color: #e5bcbc; color: #8f332d; background: var(--red-soft); }
.customer-material-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.customer-material-category { min-width: 0; border: 1px solid #c8dccc; border-radius: 14px; overflow: hidden; background: #fafcfb; }
.customer-category-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 12px; align-items: center; gap: 12px; min-height: 66px; padding: 14px 16px; cursor: pointer; list-style: none; background: #edf6ef; }
.customer-category-summary::-webkit-details-marker { display: none; }
.customer-category-summary:hover { background: var(--green-soft); }
.customer-category-summary:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.customer-category-name { color: var(--green-dark); font-size: 18px; }
.customer-category-count { color: var(--muted); font-size: 13px; }
.customer-category-action { color: var(--green-dark); font-size: 12px; }
.customer-material-category[open] > summary .store-chevron { transform: rotate(225deg); }
.customer-category-customers { display: grid; gap: 9px; padding: 12px; border-top: 1px solid #c8dccc; }
.customer-material-category:not([open]) > .customer-category-customers { display: none; }
.customer-material-group { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: white; overflow: hidden; }
.customer-material-summary { display: grid; grid-template-columns: minmax(90px, 1fr) auto minmax(120px, 1.2fr) auto 12px; align-items: center; gap: 12px; min-height: 66px; padding: 14px 16px; cursor: pointer; list-style: none; background: #f6faf7; }
.customer-material-summary::-webkit-details-marker { display: none; }
.customer-material-summary:hover { background: var(--green-soft); }
.customer-material-summary:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.directory-customer-name { min-width: 0; font-size: 17px; overflow-wrap: anywhere; }
.customer-material-count { color: var(--muted); font-size: 13px; }
.customer-material-progress { color: var(--green-dark); font-size: 13px; text-align: right; }
.customer-material-group[open] > summary .store-chevron { transform: rotate(225deg); }
.customer-material-group > .customer-store-overview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; padding: 14px; border-top: 1px solid var(--line); }
.customer-material-group:not([open]) > .customer-store-overview-list { display: none; }
.admin-customer-store-card { grid-template-rows: auto auto auto auto; gap: 10px; min-height: 188px; }
.admin-customer-store-card .customer-store-name-row { flex-wrap: wrap; }
.admin-customer-store-card .customer-store-name { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 16px; line-height: 1.4; }
.customer-store-progress { display: grid; justify-items: start; gap: 6px; font-size: 13px; }
.customer-store-progress small { font-size: 12px; line-height: 1.5; }
.customer-store-progress .store-material-state.empty { border-color: var(--line); color: var(--muted); background: #f2f4f2; }
.admin-customer-store-card .customer-store-material-action { min-height: 36px; font-size: 13px; }
.customer-store-task-details { min-width: 0; border-top: 1px solid var(--line); }
.customer-store-task-details > summary { padding: 10px 0 2px; color: var(--green-dark); font-size: 13px; cursor: pointer; }
.customer-store-task-list { display: grid; gap: 8px; padding-top: 10px; }
.customer-store-task-list .material { min-width: 0; }
@media (max-width: 680px) {
  body.admin-mode #materials-panel > .panel-title { flex-direction: column; align-items: stretch; gap: 12px; }
  body.admin-mode #materials-panel > .panel-title > div { min-width: 0; flex-wrap: wrap; }
  body.admin-mode #materials-panel > .panel-title h2 { white-space: nowrap; }
  body.admin-mode #materials-panel > .panel-title .step { flex-shrink: 0; }
  body.admin-mode #materials-panel .material-head-actions { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  body.admin-mode #materials-panel .material-auto-option { flex-basis: 100%; order: -1; }
  .customer-category-summary { gap: 8px; padding: 12px; }
  .customer-category-count { font-size: 12px; }
  .customer-category-customers { padding: 7px; }
  .customer-material-summary { grid-template-columns: minmax(0, 1fr) auto 12px; grid-template-rows: auto auto auto; gap: 6px 8px; padding: 12px; }
  .customer-material-count { grid-row: 2; grid-column: 1 / 3; }
  .customer-material-progress { grid-row: 3; grid-column: 1 / 3; text-align: left; }
  .customer-material-summary > .store-material-state { grid-row: 1; grid-column: 2; }
  .customer-material-summary .store-chevron { grid-row: 1 / 4; grid-column: 3; }
  .customer-material-group > .customer-store-overview-list { grid-template-columns: minmax(0, 1fr); padding: 10px; }
}
.store-artist-code { flex: 0 0 auto; min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; border: 1px solid #83c49d; border-radius: 6px; color: #0d6c3b; background: #dff4e7; font-size: 11px; line-height: 1; font-weight: 850; white-space: nowrap; }
.store-artist-code.compact { width: 22px; padding: 0; border-radius: 7px; font-size: 12px; }
.store-artist-code[data-artist-code="U"] { border-color: #8cb9e8; color: #175f9f; background: #e8f3ff; }
.store-artist-code[data-artist-code="M"] { border-color: #c8a1dc; color: #783a91; background: #f5eafa; }
.store-artist-code[data-artist-code="H"] { border-color: #e7b36e; color: #965500; background: #fff1dc; }
.store-artist-code[data-artist-code="Y"] { border-color: #80cbbc; color: #0d6f60; background: #e4f7f2; }
.user-management-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: white; box-shadow: 0 28px 90px rgba(23, 33, 26, .28); }
.user-management-dialog::backdrop { background: rgba(14, 23, 17, .5); backdrop-filter: blur(2px); }
.user-management-shell { display: grid; gap: 14px; padding: 22px; max-height: calc(100dvh - 28px); overflow: auto; }
.user-management-shell h2 { margin: 4px 0 0; }
.user-management-list { display: grid; gap: 8px; }
.user-management-row { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(150px, 1.4fr) minmax(130px, 1fr) auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.user-management-row strong, .user-management-row small { display: block; }
.user-management-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-management-row input { min-width: 0; }
.user-management-row button { white-space: nowrap; }
.user-create-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

body.customer-mode main { width: min(1180px, calc(100% - 32px)); }
body.customer-mode #dashboard-port-label,
body.customer-mode .channel-switch,
body.customer-mode #manage-users,
body.customer-mode #erp-login-status,
body.customer-mode #mobile-erp-login-status,
body.customer-mode #sync-yikan-data,
body.customer-mode #action-controls,
body.customer-mode #pipeline-performance,
body.customer-mode #pipeline-control,
body.customer-mode #worker-monitor,
body.customer-mode #space-card,
body.customer-mode:not(.rules-viewer) #rules-panel,
body.customer-mode .drawer,
body.customer-mode #last-task-pdf,
body.customer-mode #refresh-results,
body.customer-mode .mapped-mode-switch,
body.customer-mode #mapped-auto-mode,
body.customer-mode #mapped-daily-auto-control,
body.customer-mode .mapped-index-sync-control,
body.customer-mode #mapped-frequent-customers,
body.customer-mode #mapped-role-picker,
body.customer-mode #my-store-picker,
body.customer-mode .mapped-source-selectors > label:nth-child(-n+2),
body.customer-mode .mapped-color-group-buttons,
body.customer-mode .mapped-target-section,
body.customer-mode .mapped-submit-row,
body.customer-mode .mapped-ledger-section,
body.customer-mode #retry-mapped-archives { display: none !important; }
body.customer-mode #mapped-manual-mode { display: grid !important; }
body.customer-mode .mapped-source-selectors { grid-template-columns: minmax(104px, 150px) minmax(0, 1fr); align-items: end; padding: 0; border: 0; }
body.customer-mode .mapped-target-inline { display: grid; gap: 5px; }
body.customer-mode .mapped-dates-section > .mapped-section-head > #assign-mapped-materials { display: none; }
body.customer-mode .mapped-shell { padding-bottom: 86px; }
body.customer-mode .mapped-dialog[open] .mapped-customer-submit-bar {
  position: fixed;
  z-index: 1100;
  right: max(14px, calc((100vw - 960px) / 2 + 14px));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(14px, calc((100vw - 960px) / 2 + 14px));
  display: flex;
  padding: 10px;
  border: 1px solid #b9ddc8;
  border-radius: 14px;
  background: white;
  box-shadow: 0 10px 34px rgba(23, 69, 41, .2);
  backdrop-filter: none;
}
body.customer-mode .mapped-customer-submit-bar .mapped-assign-button {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

/* 国内上架台：与跨境台共用基础视觉，仅补充平台独有结构。 */
.domestic-material { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfb; }
.domestic-material.enabled { border-color: #b9ddc8; background: var(--green-soft); }
.domestic-material.disabled { opacity: .62; }
.domestic-material-copy { min-width: 0; }
.domestic-material-copy strong, .domestic-material-copy small { display: block; }
.domestic-material-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.domestic-material-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.domestic-material-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.domestic-network-dialog .mapped-head p { max-width: 620px; margin: 6px 0 0; line-height: 1.55; }
.domestic-network-dialog .mapped-shell { min-height: 540px; }
.domestic-network-selectors select { width: 100%; min-width: 0; }
.mapped-dates-section .domestic-network-date-head { grid-template-columns: minmax(0, 1fr) auto; }
.domestic-network-date-head .domestic-select-all { justify-self: end; }
.domestic-material-picker { margin-bottom: 14px; padding: 12px; border: 1px solid #bfd8c8; border-radius: 14px; background: #f5faf7; }
.domestic-picker-head { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 280px) auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.domestic-picker-head strong, .domestic-picker-head small { display: block; }
.domestic-picker-head strong { font-size: 13px; }
.domestic-picker-head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.domestic-picker-head input[type="search"] { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.domestic-picker-list { margin-top: 0; }
.domestic-selected-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 9px; }
.domestic-selected-head strong { font-size: 13px; }
.domestic-select-all { display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.domestic-select-all input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.domestic-select-all:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.domestic-target-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.domestic-target-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.domestic-target-toggle:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.domestic-current-copy { width: 100%; }
.domestic-lane-status { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.domestic-account-mode { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #c9d9ce; border-radius: 12px; background: #f7fbf8; }
.domestic-account-copy strong, .domestic-account-copy small { display: block; }
.domestic-account-copy strong { font-size: 13px; }
.domestic-account-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.domestic-task-store-section { padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; text-align: left; }
.domestic-task-store-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.domestic-task-store-head strong { font-size: 12px; }
.domestic-task-store-grid, .domestic-store-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 6px; }
.domestic-store-mini { min-width: 0; min-height: 46px; padding: 7px 8px; border: 1px solid #d9e2dc; border-radius: 9px; background: white; }
.domestic-store-mini strong, .domestic-store-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domestic-store-mini strong { font-size: 11px; line-height: 1.25; }
.domestic-store-mini small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.domestic-store-mini.ready { border-color: #c7dace; background: #f7fbf8; }
.domestic-store-mini.running { border-color: #b8cde7; background: var(--blue-soft); }
.domestic-store-mini.complete { border-color: #a9d2b9; background: var(--green-soft); }
.domestic-store-mini.candidate { border-color: #b8cde7; background: white; }
.domestic-store-mini.candidate small { color: var(--blue); }
.domestic-store-empty { grid-column: 1 / -1; padding: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.domestic-current-copy strong, .domestic-current-copy small { display: block; }
.domestic-current-copy strong { font-size: 14px; }
.domestic-current-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.domestic-store-confirm { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #a9c9eb; background: var(--blue-soft); }
.domestic-store-confirm h2 { margin: 0; }
.domestic-store-confirm p { margin: 6px 0 10px; color: var(--muted); font-size: 12px; }
.domestic-results { display: grid; gap: 8px; }
.domestic-result-batch { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fbfcfb; }
.domestic-result-batch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; }
.domestic-result-batch > summary::-webkit-details-marker { display: none; }
.domestic-result-batch > summary span { min-width: 0; }
.domestic-result-batch > summary strong, .domestic-result-batch > summary small { display: block; }
.domestic-result-batch > summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.domestic-result-batch > summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.domestic-result-batch > summary b { flex: 0 0 auto; color: var(--green); font-size: 12px; }
.domestic-sku-rows { display: grid; border-top: 1px solid var(--line); background: white; }
.domestic-sku-row { min-width: 0; display: grid; grid-template-columns: minmax(130px, .7fr) 76px minmax(0, 1.3fr); align-items: center; gap: 7px 9px; padding: 9px 12px; border-top: 1px solid #edf0ed; }
.domestic-sku-row:first-child { border-top: 0; }
.domestic-sku-row > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.domestic-sku-row > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.domestic-sku-row > small { grid-column: 3; min-width: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.domestic-sku-stages { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.domestic-stage-chip { min-width: 0; padding: 5px 6px; border-radius: 7px; background: #f1f3f1; text-align: center; }
.domestic-stage-chip i, .domestic-stage-chip b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.domestic-stage-chip i { color: var(--muted); font-size: 9px; }
.domestic-stage-chip b { margin-top: 2px; font-size: 10px; }
.domestic-stage-chip.good { color: var(--green); background: var(--green-soft); }
.domestic-stage-chip.running { color: var(--blue); background: var(--blue-soft); }
.domestic-stage-chip.bad { color: var(--red); background: var(--red-soft); }
.domestic-diagnostics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 10px; }
.domestic-diagnostics > section { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.domestic-diagnostics > section > strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; }
.domestic-diagnostic-list { display: grid; gap: 5px; max-height: 140px; overflow: auto; }
.domestic-diagnostic-item strong, .domestic-diagnostic-item small { display: block; overflow-wrap: anywhere; }
.domestic-diagnostic-item strong { color: var(--red); font-size: 11px; }
.domestic-diagnostic-item small { margin-top: 2px; font-size: 9px; }
.domestic-evidence-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue); font-size: 11px; }
.domestic-sku-row.completed > span { color: var(--green); }
.domestic-sku-row.publishing > span, .domestic-sku-row.verifying > span { color: var(--blue); }
.domestic-sku-row.success { background: #f7fcf8; }
.domestic-sku-row.success > span { color: var(--green); }
.domestic-sku-row.failed { background: #fff8f8; }
.domestic-sku-row.failed > span, .domestic-sku-row.failed > small { color: var(--red); }
.domestic-rule-cards .rule-card { cursor: default; }
.domestic-rule-cards .rule-card:hover { border-color: var(--line); background: #f8faf8; }
.domestic-pagination { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 0 2px; flex-wrap: wrap; }
.domestic-pagination button { min-width: 34px; }
.domestic-pagination button.active { color: white; background: var(--green); }
.domestic-page-gap, .domestic-page-total { color: var(--muted); font-size: 11px; }
.domestic-page-total { margin-left: 5px; }

@media (min-width: 681px) and (max-width: 980px) {
  .customer-store-overview-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  #publish-completed-list { grid-template-columns: 1fr; }
  /* flex 数字需要单独水平居中，text-align 不会移动它的子项。 */
  .number-value { justify-content: center; }
  .repair-task-status { align-items: stretch; flex-direction: column; gap: 9px; }
  .repair-task-status-numbers { width: 100%; justify-content: space-between; gap: 5px; }
  .repair-task-status-numbers span { min-width: 0; }
  .mapped-connection-row { align-items: stretch; }
  .mapped-connection-row button { min-width: 88px; }
  main { width: min(100% - 20px, 940px); padding: 16px 0 94px; }
  .topbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .topbar-heading { width: 100%; }
  .topbar h1 { font-size: 21px; }
  .title-switch-row { gap: 8px; }
  .channel-switch a { min-width: 62px; padding-inline: 8px; }
  .topbar-actions { width: 100%; display: flex; justify-content: flex-end; gap: 6px; }
  .account-actions { flex: 1 1 auto; justify-content: flex-start; }
  .account-actions #logout { margin-left: auto; }
  #erp-login-status { display: none; }
  .mobile-erp-login-status { display: inline-flex; order: 2; margin-left: auto; }
  #sync-yikan-data { flex: 0 0 auto; }
  .account-identity { min-height: 32px; padding: 6px 9px; }
  .my-store-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-store-overview-list { grid-template-columns: 1fr; }
  .customer-store-overview-list:not(.expanded) .customer-store-overview-card { display: none; }
  .customer-stores-toggle:not(.hidden) { display: inline-flex; align-items: center; touch-action: manipulation; }
  .customer-stores-head { align-items: flex-start; }
  .customer-stores-head > div { flex-wrap: wrap; }
  .customer-store-controls { flex-direction: column; align-items: flex-end; gap: 3px; }
  .user-management-row { grid-template-columns: 1fr auto; }
  .user-management-row > div:nth-child(2), .user-management-row input { grid-column: 1 / -1; }
  .user-create-row { grid-template-columns: 1fr; }
  .erp-login-status { min-height: 32px; padding: 6px 9px; }
  .numbers { gap: 6px; }
  .numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .governance-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .number { border-radius: 11px; padding: 10px 6px; text-align: center; }
  .number strong { font-size: 22px; }
  .number > .number-label { font-size: 11px; }
  body.admin-mode .number > .number-label { font-size: 13px; }
  .home-line-status { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px 0; }
  .home-line-status-card { min-width: 0; min-height: 104px; aspect-ratio: auto; gap: 5px; padding: 10px 4px; border-radius: 11px; }
  .home-line-status-card strong { font-size: 28px; }
  .home-line-status-card span {
    display: grid;
    min-height: 30px;
    place-items: center;
    overflow: visible;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
  }
  .home-line-status-card .home-line-detail { max-width: 100%; font-size: 10px; white-space: nowrap; }
  .home-line-start { min-height: 30px; padding: 4px 8px; font-size: 11px; }
  .admin-page-nav {
    top: 5px;
    grid-template-columns: minmax(38px, .62fr) minmax(58px, 1fr) minmax(58px, 1fr) minmax(98px, 1.52fr);
    gap: 3px;
    padding: 3px;
  }
  body.admin-mode .admin-page-nav button {
    min-width: 0;
    min-height: 40px;
    padding: 0 4px;
    font-size: 15px;
    white-space: nowrap;
  }
  .admin-page-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading-actions { width: 100%; justify-content: flex-start; }
  .admin-summary-grid, .admin-summary-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-worker-grid { grid-template-columns: 1fr; }
  .admin-work-overview.three-lines { grid-template-columns: 1fr; }
  #maintenance-work-status { grid-template-columns: 1fr; }
  .maintenance-line-progress { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .maintenance-line-identity { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .maintenance-line-task > strong, .maintenance-line-task > small, .maintenance-line-task > span { overflow: visible; white-space: normal; }
  .publish-work-queue-fact { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .publish-work-queue-fact > small { grid-column: auto; }
  .publish-work-queue-fact.current,
  .publish-work-queue-fact.next { grid-template-columns: minmax(0, 1fr); }
  .publish-work-queue-fact.current > .admin-customer-queue-position,
  .publish-work-queue-fact.next > .admin-customer-queue-position { grid-row: auto; }
  .publish-work-queue-fact.current > strong,
  .publish-work-queue-fact.current > small,
  .publish-work-queue-fact.next > strong,
  .publish-work-queue-fact.next > small { grid-column: 1; }
  .admin-filter-row, .publish-filters, .maintenance-filters, .admin-log-filters { grid-template-columns: 1fr 1fr; }
  .admin-filter-row input, .admin-log-filters > input:last-child { grid-column: 1 / -1; }
  .admin-task-row, .admin-activity-row { grid-template-columns: 1fr; gap: 6px; }
  .admin-cleanup-run { grid-template-columns: 1fr 1fr; }
  .admin-cleanup-run > div:first-child { grid-column: 1 / -1; }
  .number-button::after { right: 5px; bottom: 7px; }
  .completed-drawer-head { align-items: flex-start; }
  .pipeline-drawer-head { align-items: flex-start; }
  .pipeline-drawer-head > div { display: block; }
  .pipeline-toolbar { grid-template-columns: 1fr; }
  .pipeline-issue-card { grid-template-columns: 1fr; gap: 9px; }
  .pipeline-issue-actions { justify-content: flex-start; }
  .pipeline-strategy-status { text-align: left; }
  .pipeline-issue-actions button { min-height: 38px; }
  .pipeline-group > summary { grid-template-columns: 1fr; gap: 6px; }
  .pipeline-group-action { text-align: left; }
  .pipeline-item { grid-template-columns: 1fr; gap: 7px; }
  .completed-drawer-head > div { display: block; }
  .completed-drawer-head .muted { display: block; margin-top: 3px; }
  .completed-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completed-abnormal-head { display: block; }
  .completed-abnormal-head > span { display: block; margin-top: 3px; text-align: left; }
  .completed-abnormal-item { grid-template-columns: 1fr; gap: 4px; }
  .exception-groups { grid-template-columns: 1fr; }
  .exception-head > div { display: block; }
  .exception-head .muted { display: block; margin-top: 3px; }
  .exception-item { grid-template-columns: 1fr; gap: 6px; }
  .exception-item-select { min-height: 34px; }
  .exception-items-toggle { min-height: 44px; font-size: 14px; }
  .exception-ignore { width: 100%; margin-top: 4px; }
  .discontinued-recent-grid { grid-template-columns: 1fr; }
  .exception-repair-actions { grid-template-columns: 1fr; }
  .exception-repair-actions .primary { width: 100%; min-width: 0; }
  .panel { border-radius: 15px; padding: 14px; }
  .materials { grid-template-columns: 1fr; }
  .materials-panel .panel-title { align-items: flex-start; }
  .panel-title .material-head-actions { align-items: flex-end; flex-direction: column; gap: 4px; }
  .mapped-dialog { width: 100%; max-width: none; max-height: 96dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .erp-login-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .erp-login-form { padding: 18px 16px max(18px, env(safe-area-inset-bottom)); }
  .mapped-global-progress { top: max(8px, env(safe-area-inset-top)); width: calc(100% - 16px); padding: 11px 12px; border-radius: 12px; }
  .mapped-global-progress-head { align-items: flex-start; }
  .mapped-global-progress-head strong { font-size: 13px; }
  .mapped-global-progress small { font-size: 11px; }
  .mapped-shell { max-height: 96dvh; padding: 15px; }
  .mapped-head h2 { font-size: 19px; }
  .mapped-frequent-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .mapped-mode-switch { top: -14px; }
  .mapped-auto-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .mapped-auto-layout { grid-template-columns: 1fr; }
  .mapped-recommendation-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .mapped-recommendation-list { grid-template-columns: 1fr; }
  .mapped-recommendation { grid-template-columns: 1fr; }
  .mapped-recommendation-actions { display: grid; grid-template-columns: 1fr; }
  .mapped-frequent-customer { min-height: 38px; padding-inline: 13px; }
  .mapped-selectors { grid-template-columns: 1fr; }
  .mapped-source-selectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.customer-mode .mapped-source-selectors { grid-template-columns: minmax(90px, 112px) minmax(0, 1fr); gap: 8px; }
  body.customer-mode .mapped-target-tags { gap: 4px; }
  body.customer-mode .mapped-target-tag { padding: 6px 5px; }
  body.customer-mode .mapped-target-tag strong { font-size: 12px; }
  .mapped-color-group-select { display: block; }
  .mapped-color-group-buttons {
    display: none;
  }
  .mapped-color-group-button {
    min-width: 0;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid #a8d7bb;
    border-radius: 11px;
    background: white;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 750;
    touch-action: manipulation;
  }
  .mapped-color-group-button.active {
    border-color: var(--green);
    background: var(--green);
    color: white;
    box-shadow: 0 0 0 3px rgba(22, 131, 74, .12);
  }
  .mapped-color-group-button:disabled { opacity: .52; cursor: wait; }
  .mapped-target-section .mapped-selectors { grid-template-columns: 1fr; }
  .mapped-dates-section .mapped-section-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .mapped-assign-button { min-width: 0; min-height: 40px; padding-inline: 13px; }
  .mapped-date-actions { grid-column: 1 / -1; width: 100%; justify-content: space-between; }
  .mapped-date-actions .compact-button { min-height: 38px; }
  .mapped-dates { grid-template-columns: 1fr 1fr; max-height: 34dvh; }
  .mapped-date-skus-panel { top: auto; right: 10px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 92px); left: 10px; width: auto; max-height: min(62dvh, calc(100dvh - 126px)); transform: none; border-radius: 15px; box-shadow: 0 12px 42px rgba(14, 23, 17, .28); }
  .mapped-date-skus-shell { grid-template-rows: auto minmax(0, 1fr); max-height: min(62dvh, calc(100dvh - 126px)); padding: 15px; }
  .mapped-date-skus-panel .mapped-date-sku-list { max-height: none; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .mapped-submit-row { align-items: stretch; flex-direction: column; }
  .mapped-submit-row .primary { width: 100%; min-width: 0; min-height: 46px; }
  .mapped-ledger-row { grid-template-columns: 1fr; gap: 5px; }
  .mapped-ledger-status { text-align: left; }
  .supplement { grid-template-columns: 1fr; }
  .supplement-guide { padding: 10px; }
  .supplement-item-head { align-items: stretch; flex-direction: column; }
  .supplement-item-head .secondary { width: 100%; min-height: 40px; }
  .supplement-path { grid-template-columns: 1fr; gap: 3px; }
  .supplement-guide-footer { align-items: stretch; flex-direction: column; }
  .supplement-guide-footer .secondary { width: 100%; min-height: 42px; }
  .current-line { grid-template-columns: 1fr 1fr; }
  .pipeline-control-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .pipeline-control-head span { text-align: left; }
  .pipeline-queue-monitor { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .worker-monitor { grid-template-columns: 1fr 1fr; }
  .pipeline-performance { grid-template-columns: 1fr 1fr; }
  .result-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .result-group { min-height: 76px; padding: 9px; text-align: left; }
  .result-group h3 { margin-bottom: 5px; font-size: 12px; white-space: nowrap; }
  .result-group strong { font-size: 20px; }
  .result-group .sku-list { display: none; }
  .results-panel .panel-title { align-items: flex-start; }
  .result-refresh { align-items: flex-end !important; flex-direction: column; gap: 4px !important; }
  .result-refresh .compact-button { min-height: 38px; }
  .rule-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .rule-card {
    min-height: 52px;
    padding: 6px 3px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .rule-card span { font-size: 11px; white-space: nowrap; }
  .rule-card strong { font-size: 18px; }
  .rules-drawer { padding: 10px; }
  .rules-drawer-head { display: block; }
  .rules-drawer-head .muted { display: block; margin-top: 3px; }
  .price-rule-row { grid-template-columns: 52px minmax(0, 1fr) auto; align-items: start; }
  .rule-fields, .rule-kind.special + .rule-fields { grid-template-columns: 1fr; }
  .rule-actions { align-items: stretch; flex-direction: column; }
  .rule-actions button { width: 100%; }
  .rule-search, .rule-inline-form, .rule-add-stop { grid-template-columns: 1fr; }
  .rule-search button, .rule-inline-form button, .rule-add-stop button { min-height: 42px; }
  .rule-exact { align-items: stretch; flex-direction: column; }
  .rule-exact .danger { width: 100%; }
  .title-rule-token { max-width: 100%; }
  .sku-prefix-row { grid-template-columns: 1fr; }
  .sku-prefix-discovery { align-items: stretch; flex-direction: column; }
  .sku-prefix-add-active { width: 100%; }
  .cleanup-card { align-items: stretch; flex-direction: column; }
  .cleanup-progress-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .cleanup-progress-head span { text-align: left; }
  .cleanup-actions { display: grid; grid-template-columns: 1fr; }
  .action-controls { align-items: stretch; flex-direction: column; }
  .action-controls.active-top { align-items: center; flex-direction: row; padding: 7px 8px; }
  .action-controls.active-top .main-action { flex: 1 1 auto; width: auto; min-width: 0; padding: 13px 10px; }
  .action-controls.active-top .danger { flex: 0 0 auto; padding: 13px 12px; }
  .timed-option { justify-content: center; order: -1; }
  .concurrency-option { justify-content: center; }
  .action-controls .danger { margin-left: 0; }
  .action-controls:not(.active-top) .main-action { position: fixed; z-index: 5; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); min-width: 0; padding: 15px; box-shadow: 0 8px 24px rgba(13,101,55,.25); }
  .action-controls:not(.active-top) .main-action:disabled { position: static; width: 100%; box-shadow: none; }
  .event { grid-template-columns: 1fr; gap: 0; margin-bottom: 7px; }
  .domestic-material { align-items: flex-start; flex-direction: column; }
  .materials-panel .panel-title { align-items: flex-start; }
  .domestic-material-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .domestic-picker-head { grid-template-columns: 1fr; align-items: flex-start; }
  .domestic-lane-status { align-items: flex-end; flex-direction: column; gap: 5px; }
  .domestic-account-mode { grid-template-columns: 1fr; align-items: flex-start; }
  .domestic-store-confirm { align-items: stretch; flex-direction: column; }
  .domestic-store-confirm .primary { width: 100%; }
  .domestic-sku-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .domestic-sku-stages, .domestic-sku-row > small { grid-column: 1 / -1; }
  .domestic-diagnostics { grid-template-columns: 1fr; }
  .domestic-pagination { gap: 4px; }
  .domestic-pagination button { min-width: 31px; padding-inline: 8px; }
  .domestic-page-total { width: 100%; margin: 3px 0 0; text-align: center; }
}
.home-efficiency {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 2px;
}

.home-efficiency-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line, #e6e9e7);
  border-radius: 10px;
  background: rgba(248, 250, 249, .82);
}

.home-efficiency-card strong { color: var(--ink); font-size: 24px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-efficiency-card span { color: #4f5c53; font-size: 15px; font-weight: 750; }
.home-efficiency-card small {
  color: var(--muted, #68716c);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.maintenance-capacity-warning {
  margin: 8px 0;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.maintenance-capacity-warning.warning {
  border: 1px solid #edc85c;
  background: #fff9df;
  color: #735c0f;
}

.maintenance-capacity-warning.error {
  border: 1px solid #ef9b9b;
  background: #fff1f1;
  color: #8b2525;
}

@media (max-width: 720px) {
  .home-efficiency { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
