:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --panel: #ffffff;
  --ink: #1c1c1e;
  --muted: #6e6e73;
  --line: #d1d1d6;
  --accent: #007aff;
  --accent-2: #248a3d;
  --warn: #c93400;
  --bad: #d70015;
  --good: #248a3d;
  --profit: #d70015;
  --loss: #248a3d;
  --soft: #edf6ff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.055);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.2);
  outline-offset: 1px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid rgba(60, 60, 67, 0.18);
  background: rgba(248, 248, 250, 0.96);
  color: var(--ink);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  flex: 0 0 40px;
  object-fit: contain;
  border-radius: 9px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
}
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

.account-summary {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.account-summary-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.account-summary-main > div { min-width: 0; }
.account-summary-main strong,
.account-summary-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary-main strong { font-size: 13px; }
.account-summary-main span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #eaf2ff;
  color: #1859b9;
  font-size: 12px;
  font-weight: 800;
}
.account-summary-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.account-summary-meta .is-offline { color: var(--warn); font-weight: 700; }
.account-summary-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.account-summary-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 6px;
  background: #f7f7f9;
  color: #3a3a3c;
  font-size: 10px;
  font-weight: 700;
}
.account-summary-actions button:hover { border-color: rgba(0, 122, 255, 0.28); color: var(--accent); }

.global-nav {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  background: #fff;
  box-shadow: var(--shadow);
}
.global-nav span { font-weight: 750; }
.global-nav small { color: var(--muted); font-size: 11px; font-weight: 500; }
.global-nav.active small { color: rgba(255, 255, 255, 0.78); }

.store-switcher {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(60, 60, 67, 0.15);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.store-switcher-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-switcher-title { color: var(--ink); font-size: 13px; font-weight: 750; }
.store-switcher-actions { display: flex; align-items: center; gap: 7px; }
.store-status { color: var(--good); font-size: 10px; font-weight: 700; }
.store-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; }
.store-switcher label { gap: 5px; color: var(--muted); font-size: 11px; }
.store-switcher select {
  width: 100%;
  height: 36px;
  min-width: 0;
  border-color: rgba(60, 60, 67, 0.18);
  background: #f7f7f9;
  color: var(--ink);
  padding: 0 8px;
  font-size: 13px;
}
.store-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.store-account-button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}
.store-account-button:hover:not(:disabled) { border-color: rgba(52, 120, 246, .42); color: #1859b9; background: #f4f8ff; }
.store-account-button:disabled { color: var(--muted); background: #f4f5f7; cursor: not-allowed; }
.store-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 7px;
}
.store-add-button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 7px;
  background: var(--soft);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.store-add-button:hover { background: var(--accent); color: #fff; }
.store-edit-button {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 6px;
  background: #e5e5ea;
  color: #3a3a3c;
  font-size: 11px;
  font-weight: 700;
}
.store-edit-button:hover { background: #d8d8dc; }
.store-edit-button:disabled { color: #aeaeb2; cursor: not-allowed; }

.nav-group-label { padding: 0 8px; color: #8e8e93; font-size: 11px; font-weight: 700; }
nav { display: grid; gap: 4px; }
.nav-item {
  text-align: left;
  color: #3a3a3c;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 650;
}
.nav-item:hover { background: rgba(118, 118, 128, 0.1); }
.nav-item.active { background: var(--accent); color: #fff; }

.full { width: 100%; margin-top: auto; }
.primary, .secondary, .danger-secondary {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 700;
}
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: #006ee6; }
.primary:disabled { background: #aeaeb2; cursor: not-allowed; }
.secondary { background: #e5e5ea; color: #1c1c1e; }
.secondary:hover { background: #d8d8dc; }
.danger-secondary { background: #fff0f1; color: var(--bad); }
.danger-secondary:disabled { color: #aeaeb2; background: #f2f2f7; cursor: not-allowed; }

main { min-width: 0; padding: 24px 28px 32px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: -24px -28px 20px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(242, 242, 247, 0.9);
  backdrop-filter: blur(18px);
}
h1, h2, p { margin: 0; }
h1 { font-size: 25px; letter-spacing: 0; }
h2 { font-size: 17px; letter-spacing: 0; }
.topbar p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; }
.account-state-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -8px 0 16px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 8px;
}
.account-state-banner > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.account-state-banner strong { flex: 0 0 auto; font-size: 13px; }
.account-state-banner span { color: #5d6470; font-size: 12px; line-height: 1.4; }
.account-state-banner button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}
.account-state-banner-warning { border-color: #f0d39a; background: #fff8e8; color: #8a5a12; }
.account-state-banner-update { border-color: #bdd6fa; background: #edf5ff; color: #1859b9; }
.store-sync-banner { border-color: #cbd7e8; background: #f4f7fb; color: #25364d; }
.store-sync-banner[data-sync-state="editing"] { border-color: #a9d8bc; background: #eff9f2; color: #21633b; }
.store-sync-banner[data-sync-state="attention"] { border-color: #efcf91; background: #fff8e9; color: #815715; }
.store-sync-banner[data-sync-state="error"] { border-color: #efb1b7; background: #fff2f3; color: #9b2632; }
.action-feedback { transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease; }
.action-feedback:active { transform: translateY(1px) scale(0.98); }
.action-feedback.is-working { opacity: 0.78; cursor: wait; }
.action-feedback.is-complete { background: var(--good); color: #fff; }
select, input[type="file"] {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  min-width: 0;
}

.panel { display: none; }
.panel.active { display: block; }
#receivables.panel.active { display: flex; flex-direction: column; gap: 14px; }
#receivables > .receivable-control-surface { order: 1; }
#receivables > .receivable-overview-surface { order: 2; }
#receivables > .receivable-type-surface { order: 3; }
#receivables > .taobao-voucher-reconciliation-surface { order: 4; }
#receivables > .receivable-detail-surface { order: 5; }
#receivables > .receivable-aging-surface { order: 6; }
#receivables > .receipt-entry-surface { order: 7; }
#receivables > .fund-reconciliation-surface { order: 8; }
#receivables > .profit-variance-surface { order: 9; }
#receivables > .receipt-history-surface { order: 10; }
.panel { transition: opacity 140ms ease; }
.store-switching .panel.active { opacity: 0.5; pointer-events: none; }

.toast {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.48);
}
.modal-backdrop[hidden] { display: none; }
.store-modal {
  width: min(440px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.24);
}
.store-modal form { display: grid; gap: 16px; }
.store-modal input, .store-modal select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.modal-close:hover { background: #f2f4f7; color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-message { min-height: 20px; color: var(--bad); font-size: 13px; }
.order-correction-modal { width: min(720px, 100%); }
.order-correction-modal form { display: grid; gap: 16px; }
.correction-help {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #d8e5f7;
  border-radius: 8px;
  background: #f6f9fe;
  color: #526277;
  font-size: 13px;
  line-height: 1.55;
}
.correction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.order-correction-modal label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.order-correction-modal input,
.order-correction-modal select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}
.order-correction-modal input:focus,
.order-correction-modal select:focus { border-color: #7ca8e8; outline: 3px solid rgba(52, 120, 246, 0.12); }
.refund-status-label { display: flex; align-items: center; gap: 5px; color: #8a5a12; }
.refund-evidence-info { flex: 0 0 auto; }
.import-refund-summary { color: #285c45; background: #edf8f2; border: 1px solid #cce8d8; padding: 10px 12px; border-radius: 6px; }
.correction-actions { align-items: center; }
.modal-action-spacer { flex: 1; }

.account-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f2f2f7;
}
.account-gate[hidden] { display: none; }
.account-login-shell {
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
}
.account-login-brand { display: flex; align-items: center; gap: 11px; }
.account-login-brand img { width: 42px; height: 42px; border-radius: 9px; box-shadow: var(--shadow); }
.account-login-brand strong,
.account-login-brand span { display: block; }
.account-login-brand strong { font-size: 16px; }
.account-login-brand span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.account-login-heading { margin: 28px 0 20px; }
.account-login-heading h1 { font-size: 23px; }
.account-login-heading p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-login-shell form { display: grid; gap: 14px; }
.account-login-shell label { display: grid; gap: 7px; color: #3a3a3c; font-size: 12px; font-weight: 650; }
.account-login-shell input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; }
.account-login-shell .primary { width: 100%; margin-top: 2px; }
.account-privacy-note { display: grid; gap: 3px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e5ea; }
.account-privacy-note strong { color: #3a3a3c; font-size: 11px; }
.account-privacy-note span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-admin-modal {
  width: calc(100vw - 40px);
  max-width: 1080px;
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
}
.store-sync-modal { width: min(940px, calc(100vw - 40px)); max-height: min(820px, calc(100vh - 40px)); overflow: auto; }
.store-sync-current { margin-top: 14px; padding: 16px 0 18px; border-top: 1px solid #e5e5ea; border-bottom: 1px solid #e5e5ea; }
.store-sync-state-line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e2e6ec; border-radius: 8px; background: #e2e6ec; }
.store-sync-state-line > div { min-width: 0; padding: 11px 12px; background: #fff; }
.store-sync-state-line span,
.store-sync-state-line strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-sync-state-line span { color: var(--muted); font-size: 10px; }
.store-sync-state-line strong { margin-top: 4px; color: var(--ink); font-size: 13px; }
.store-sync-explanation { min-height: 18px; margin: 12px 0; color: #505967; font-size: 12px; line-height: 1.5; }
.store-sync-password { display: grid; grid-template-columns: 130px minmax(220px, 1fr); align-items: center; gap: 6px 10px; max-width: 680px; color: #3a3a3c; font-size: 11px; font-weight: 650; }
.store-sync-password input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff; }
.store-sync-password small { grid-column: 2; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.45; }
.store-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.store-sync-actions button[hidden] { display: none; }
.store-sync-remote-section { padding-top: 18px; }
.store-sync-table-wrap { max-height: 260px; overflow: auto; }
.store-sync-table-wrap table { min-width: 760px; }
.store-sync-table-wrap th,
.store-sync-table-wrap td { padding: 9px 10px; font-size: 11px; vertical-align: middle; }
.store-sync-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border-radius: 999px; background: #f0f2f5; color: #505967; font-size: 10px; font-weight: 700; }
.store-sync-badge.editing { background: #e9f7ee; color: #21633b; }
.account-admin-section { padding: 18px 0; border-top: 1px solid #e5e5ea; }
.account-admin-section:first-of-type { margin-top: 14px; }
.account-admin-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 13px; }
.account-admin-section-head h3 { margin: 0; font-size: 15px; }
.account-admin-section-head p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-admin-section-head > span { color: var(--muted); font-size: 11px; }
.account-user-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.account-user-form label,
.account-subscription-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.account-user-form input,
.account-user-form select,
.account-subscription-form input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; background: #fff; }
.account-store-scope { grid-column: 1 / -1; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.account-store-scope legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
#newAccountStoreScope { display: flex; flex-wrap: wrap; gap: 8px 14px; }
#newAccountStoreScope label { display: flex; align-items: center; gap: 5px; color: #3a3a3c; }
#newAccountStoreScope input { width: 14px; height: 14px; }
.account-user-form-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.account-admin-table-wrap { max-width: 100%; max-height: 250px; overflow: auto; }
.account-admin-table-wrap table { min-width: 820px; }
.account-admin-table-wrap th,
.account-admin-table-wrap td { padding: 9px 10px; font-size: 11px; vertical-align: middle; }
.account-row-primary { display: block; color: var(--ink); font-weight: 700; }
.account-row-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-inline-action {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: #e5e5ea;
  color: #3a3a3c;
  font-size: 10px;
  font-weight: 700;
}
.account-inline-action.danger { background: #fff0f1; color: var(--bad); }
.account-subscription-form { display: flex; align-items: end; gap: 12px; }
.account-subscription-form label { width: min(220px, 100%); }

@media (max-width: 1100px) {
  .account-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .account-user-form { grid-template-columns: minmax(0, 1fr); }
  .account-store-scope,
  .account-user-form-action { grid-column: 1; }
  .account-subscription-form { display: grid; }
  .store-sync-state-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-sync-password { grid-template-columns: minmax(0, 1fr); }
  .store-sync-password small { grid-column: 1; }
  .account-state-banner,
  .account-state-banner > div { align-items: flex-start; }
  .account-state-banner > div { display: grid; gap: 3px; }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.metric, .surface {
  background: var(--panel);
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric { padding: 17px 18px; min-height: 122px; }
.metric span, .metric em { display: block; color: var(--muted); font-style: normal; }
.metric strong { display: block; font-size: 24px; margin: 14px 0 8px; letter-spacing: 0; }

.overview-profit-hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr);
  gap: 28px;
  align-items: center;
  min-height: 310px;
  padding: 26px 30px;
}

#overview .overview-legacy { display: none !important; }
.core-profit-tracker, .core-order-tracker, .core-receivable-tracker, .core-risk-tracker { min-width: 0; }
.core-profit-tracker { padding: 20px 22px 0; }
.core-section-head { margin-bottom: 16px; }
.core-section-head > span, .core-section-head > strong { color: var(--muted); font-size: 12px; }
.core-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: #eef5ff;
  color: #1859b9 !important;
  font-weight: 700;
}
.core-status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}
.core-status-badge.is-complete { background: #edf8f0; color: #24713a !important; }
.core-status-badge.is-warning { background: #fff6e8; color: #9a5b00 !important; }
.core-profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.core-profit-item { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.core-profit-item:last-child { border-right: 0; }
.core-profit-item span, .core-profit-item em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.core-profit-item strong {
  display: block;
  overflow: hidden;
  margin: 10px 0 7px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-profit-item.is-latest { background: #f7faff; }
.core-profit-foot { display: grid; grid-template-columns: 1fr 1fr; }
.core-profit-foot > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 50px; padding: 0 22px; border-right: 1px solid var(--line); }
.core-profit-foot > div:last-child { border-right: 0; }
.core-profit-foot span { color: var(--muted); font-size: 11px; }
.core-profit-foot strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.core-tracking-grid { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr); gap: 14px; margin-top: 14px; }
.core-order-tracker, .core-receivable-tracker, .core-risk-tracker { padding: 20px 22px; }
.core-progress-track { height: 9px; overflow: hidden; border-radius: 5px; background: #e9e9ee; }
.core-progress-track b { display: block; width: 0; height: 100%; border-radius: inherit; background: #3478f6; transition: width 260ms ease; }
.core-order-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.core-order-counts > div { padding: 12px 10px; border-right: 1px solid var(--line); }
.core-order-counts > div:last-child { border-right: 0; }
.core-order-counts span, .core-order-counts strong { display: block; }
.core-order-counts span { color: var(--muted); font-size: 11px; }
.core-order-counts strong { margin-top: 5px; font-size: 19px; font-variant-numeric: tabular-nums; }
.core-order-evidence { padding: 13px 0 2px; border-bottom: 1px solid var(--line); }
.core-order-evidence-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.core-order-evidence-head strong { font-size: 12px; }
.core-order-evidence-head span { color: var(--muted); font-size: 10px; text-align: right; }
.core-order-evidence .profit-confidence-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}
.core-order-evidence .profit-confidence-band > div { padding: 8px 9px; }
.core-order-evidence .profit-confidence-band > div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
.core-order-evidence .profit-confidence-band > div:nth-child(4) { border-top: 1px solid var(--line); }
.core-order-evidence .profit-confidence-band span { font-size: 10px; }
.core-order-evidence .profit-confidence-band strong { font-size: 12px; }
.core-order-evidence .accounting-reconciliation-list { margin-top: 6px; }
.core-order-evidence .accounting-reconciliation-list li {
  grid-template-columns: minmax(76px, .38fr) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  font-size: 10px;
}
.core-close-state { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 72px; padding: 15px 0; }
.core-close-state > div { display: grid; gap: 5px; min-width: 0; }
.core-close-state strong { font-size: 13px; }
.core-close-state span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.core-close-state > span { flex: none; color: var(--ink); font-weight: 700; }
.core-actions { display: flex; gap: 8px; }
.core-actions button { flex: 1; min-width: 0; }
.text-command { padding: 0; background: transparent; color: #1769c2; font-size: 12px; font-weight: 700; }
.text-command:hover { text-decoration: underline; }
.core-receivable-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 16px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.core-receivable-total span, .core-receivable-total em { color: var(--muted); font-size: 11px; font-style: normal; }
.core-receivable-total strong { grid-row: 1 / 3; grid-column: 2; font-size: 27px; font-variant-numeric: tabular-nums; }
.core-receivable-type-list { display: grid; }
.core-receivable-type-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .8fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(60, 60, 67, .11);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.core-receivable-type-row:last-child { border-bottom: 0; }
.core-receivable-type-row:not(:disabled):hover { background: #f7faff; }
.core-receivable-type-row > div { min-width: 0; }
.core-receivable-type-row strong, .core-receivable-type-row span { display: block; }
.core-receivable-type-row > div:first-child strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.core-receivable-type-row > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.core-type-progress { height: 6px; overflow: hidden; border-radius: 3px; background: #e9e9ee; }
.core-type-progress b { display: block; height: 100%; border-radius: inherit; background: #3478f6; }
.core-receivable-type-row > strong { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.core-receivable-empty { padding: 24px 0; color: var(--muted); font-size: 12px; text-align: center; }
.core-risk-tracker { margin-top: 14px; }
.core-risk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.core-risk-grid button { min-width: 0; min-height: 92px; padding: 15px 18px; border-right: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.core-risk-grid button:last-child { border-right: 0; }
.core-risk-grid button:hover:not(:disabled) { background: #fffaf0; }
.core-risk-grid button:disabled { cursor: default; opacity: .56; }
.core-risk-grid span, .core-risk-grid strong, .core-risk-grid em { display: block; }
.core-risk-grid span { color: var(--muted); font-size: 11px; }
.core-risk-grid strong { margin: 7px 0 5px; color: #9a5b00; font-size: 22px; font-variant-numeric: tabular-nums; }
.core-risk-grid em { color: var(--muted); font-size: 11px; font-style: normal; }
.variance-head-actions { display: flex; align-items: center; gap: 12px; }
.receivable-detail-filters { flex-wrap: wrap; }

@media (max-width: 1080px) {
  .core-tracking-grid { grid-template-columns: 1fr; }
  .core-profit-item strong { font-size: 25px; }
}

@media (max-width: 760px) {
  .core-profit-grid, .core-risk-grid { grid-template-columns: 1fr; }
  .core-profit-item, .core-risk-grid button { border-right: 0; border-bottom: 1px solid var(--line); }
  .core-profit-item:last-child, .core-risk-grid button:last-child { border-bottom: 0; }
  .core-profit-foot { grid-template-columns: 1fr; }
  .core-profit-foot > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .core-profit-foot > div:last-child { border-bottom: 0; }
  .core-receivable-type-row { grid-template-columns: minmax(0, 1fr) auto; }
  .core-receivable-type-row > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding-bottom: 8px; }
  .variance-head-actions { align-items: flex-end; flex-direction: column; }
}
.profit-orbit, .mini-orbit, .progress-orbit {
  --ring-progress: 0;
  --ring-color: var(--profit);
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--ring-progress) * 1%), #e9e9ee 0);
  transition: background 320ms ease;
}
.profit-orbit::before, .mini-orbit::before, .progress-orbit::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--panel);
}
.profit-orbit {
  width: 236px;
  height: 236px;
  justify-self: center;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.06);
}
.profit-orbit::before { inset: 18px; }
.profit-orbit-center { position: relative; z-index: 1; max-width: 182px; text-align: center; }
.profit-orbit-center span, .profit-orbit-center em { display: block; color: var(--muted); font-style: normal; }
.profit-orbit-center strong { display: block; margin: 10px 0 7px; font-size: clamp(23px, 2.3vw, 34px); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.overview-kpi {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.overview-kpi-primary { grid-column: 1 / -1; }
.overview-kpi span, .overview-kpi em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.overview-kpi strong { display: block; overflow: hidden; margin: 8px 0 5px; font-size: 22px; letter-spacing: 0; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.overview-kpi-primary strong { font-size: 28px; }

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.dashboard-kpi {
  min-width: 0;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.dashboard-kpi span, .dashboard-kpi em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-kpi strong {
  display: block;
  overflow: hidden;
  margin: 7px 0 4px;
  font-size: 21px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-kpi-alert { background: #fffaf0; }
.dashboard-kpi-alert strong { color: #9a5b00; }
.dashboard-kpi-link { cursor: pointer; transition: background 140ms ease, box-shadow 140ms ease; }
.dashboard-kpi-link:hover { background: #f4f8ff; }
.dashboard-kpi-link:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(52, 120, 246, 0.2); outline-offset: -3px; }
.dashboard-kpi-link::after {
  content: "查看明细";
  float: right;
  margin-top: -16px;
  color: #3478f6;
  font-size: 10px;
  opacity: 0;
  transition: opacity 140ms ease;
}
.dashboard-kpi-link:hover::after, .dashboard-kpi-link:focus-visible::after { opacity: 1; }
.dashboard-secondary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
  background: #fbfbfd;
}
.dashboard-secondary-strip > div {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.dashboard-secondary-strip > div:last-child { border-right: 0; }
.dashboard-secondary-strip span, .dashboard-secondary-strip em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-secondary-strip strong {
  display: block;
  overflow: hidden;
  margin: 5px 0 3px;
  font-size: 17px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-profit-focus, .global-profit-focus {
  position: relative;
  min-width: 0;
  padding: 18px 28px 18px 22px;
  border-right: 1px solid rgba(60, 60, 67, 0.12);
}
.store-profit-focus::before, .global-profit-focus::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: #3478f6;
}
.store-profit-focus span, .store-profit-focus em,
.global-profit-focus span, .global-profit-focus em {
  display: block;
  color: var(--muted);
  font-style: normal;
}
.store-profit-focus strong, .global-profit-focus strong {
  display: block;
  margin: 13px 0 8px;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.overview-profit-hero, .global-overview-hero { min-height: 238px; }

.overview-visual-grid {
  display: grid;
  grid-template-columns: minmax(390px, 1.1fr) minmax(420px, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}
.mode-profit-visual, .operating-health { min-height: 355px; }
.mode-profit-chart { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: center; }
.mode-profit-donut {
  position: relative;
  display: grid;
  width: 206px;
  height: 206px;
  place-items: center;
  border-radius: 50%;
  background: #e5e5ea;
  transition: background 320ms ease;
}
.mode-profit-donut::before { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: var(--panel); }
.mode-profit-donut > div { position: relative; z-index: 1; max-width: 135px; text-align: center; }
.mode-profit-donut span { display: block; color: var(--muted); font-size: 12px; }
.mode-profit-donut strong { display: block; margin-top: 7px; font-size: 21px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mode-profit-legend { display: grid; gap: 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mode-profit-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 49px; border-bottom: 1px solid rgba(60, 60, 67, 0.12); }
.mode-profit-legend li:last-child { border-bottom: 0; }
.mode-profit-legend li.empty { display: block; min-height: 0; line-height: 1.5; }
.mode-profit-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--legend-color); }
.mode-profit-legend div { min-width: 0; }
.mode-profit-legend strong, .mode-profit-legend span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-profit-legend strong { font-size: 13px; }
.mode-profit-legend span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mode-profit-legend em { font-size: 13px; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }

.mode-profit-list { display: grid; }
.mode-profit-visual, .operating-health { min-height: 0; }
.mode-profit-total, .global-breakdown-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 15px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.11);
}
.mode-profit-total span, .global-breakdown-total span { color: var(--muted); font-size: 12px; }
.mode-profit-total strong, .global-breakdown-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.mode-profit-track, .global-breakdown-track {
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 3px;
  background: #e9e9ee;
}
.mode-profit-track b, .global-breakdown-track b { display: block; height: 100%; border-radius: 3px; transition: width 320ms ease; }

.overview-health-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(60, 60, 67, 0.11);
  border-left: 1px solid rgba(60, 60, 67, 0.11);
}
.overview-health-strip > div { min-width: 0; padding: 15px 17px; border-right: 1px solid rgba(60, 60, 67, 0.11); border-bottom: 1px solid rgba(60, 60, 67, 0.11); }
.overview-health-strip span { display: block; color: var(--muted); font-size: 11px; }
.overview-health-strip strong { display: block; margin-top: 7px; font-size: 20px; font-variant-numeric: tabular-nums; }

.health-ring-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.health-ring-item { min-width: 0; text-align: center; }
.health-ring-item > span { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }
.mini-orbit { width: 88px; height: 88px; margin: 0 auto; }
.mini-orbit::before { inset: 9px; }
.mini-orbit strong { position: relative; z-index: 1; max-width: 66px; font-size: 14px; font-variant-numeric: tabular-nums; }
.fee-focus-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fee-focus-strip > div { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fee-focus-strip span { display: block; color: var(--muted); font-size: 11px; }
.fee-focus-strip strong { display: block; overflow: hidden; margin-top: 6px; font-size: 17px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.fee-focus-strip > div:nth-child(2) strong { color: var(--good); }

.overview-pressure-surface, .overview-alert-surface, .month-close-surface { margin-top: 14px; }
.receivable-orbit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.receivable-orbit-item { min-width: 0; padding: 4px 18px 8px; border-right: 1px solid var(--line); text-align: center; }
.receivable-orbit-item:last-child { border-right: 0; }
.progress-orbit { width: 118px; height: 118px; margin: 0 auto 14px; --ring-color: #007aff; }
.progress-orbit::before { inset: 12px; }
.progress-orbit strong { position: relative; z-index: 1; font-size: 18px; font-variant-numeric: tabular-nums; }
.shell-orbit { --ring-color: #ff9f0a; }
.national-orbit { --ring-color: #248a3d; }
.tech-orbit { --ring-color: #af52de; }
.receivable-orbit-item h3 { margin: 0 0 7px; font-size: 14px; }
.receivable-orbit-item span, .receivable-orbit-item em { display: block; overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.receivable-orbit-item em { margin-top: 5px; color: var(--ink); font-size: 12px; font-weight: 700; }
.overview-alert-surface { padding-bottom: 12px; }
.overview-alert-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.overview-alert-list li { min-width: 0; }
.overview-alert-list .data-completeness-alert { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; border-color: #f0b36a; background: #fff9ef; }
.data-completeness-alert span { min-width: 0; color: #6f4a1f; line-height: 1.5; }
.data-completeness-alert button { min-height: 32px; padding: 0 12px; border: 1px solid #d7903c; border-radius: 6px; background: #fff; color: #8a4b08; font-size: 12px; font-weight: 700; white-space: nowrap; }
.data-completeness-alert button:hover { background: #fff3df; }
.overview-receivable-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(60, 60, 67, 0.11); border-left: 1px solid rgba(60, 60, 67, 0.11); }
.taobao-channel-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.taobao-channel-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8f8fa; }
.taobao-channel-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.taobao-channel-card > div strong { font-size: 15px; }
.taobao-channel-card > div span { color: var(--muted); font-size: 12px; }
.taobao-channel-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.taobao-channel-card dl div { min-width: 0; }
.taobao-channel-card dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.taobao-channel-card dd { margin: 0; font-size: 14px; font-weight: 650; }
.taobao-channel-card dd small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.taobao-cross-month-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.overview-receivable-row { min-width: 0; padding: 16px 18px; border-right: 1px solid rgba(60, 60, 67, 0.11); border-bottom: 1px solid rgba(60, 60, 67, 0.11); }
.overview-receivable-head, .overview-receivable-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.overview-receivable-head h3 { margin: 0; font-size: 14px; }
.overview-receivable-head strong { color: #3478f6; font-size: 14px; font-variant-numeric: tabular-nums; }
.overview-progress-track { height: 8px; overflow: hidden; margin: 13px 0 9px; border-radius: 4px; background: #e9e9ee; }
.overview-progress-track b { display: block; width: 0; height: 100%; border-radius: 4px; transition: width 320ms ease; }
.overview-receivable-meta span, .overview-receivable-meta em { overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.overview-receivable-meta em { color: var(--ink); font-weight: 700; }
.month-close-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr); gap: 22px; align-items: start; }
.month-close-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.month-close-checklist li { position: relative; min-height: 54px; padding: 10px 12px 10px 38px; border: 1px solid var(--line); border-radius: 8px; background: #f8f8fa; }
.month-close-checklist li::before { position: absolute; top: 13px; left: 13px; width: 17px; height: 17px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; line-height: 17px; text-align: center; content: "✓"; background: var(--good); }
.month-close-checklist li.blocked::before { content: "!"; background: var(--bad); }
.month-close-checklist li.warning::before { content: "·"; background: #ff9f0a; }
.month-close-checklist strong, .month-close-checklist span { display: block; }
.month-close-checklist span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.month-close-actions { padding: 15px; border-radius: 8px; background: #f2f7ff; }
.month-close-actions p { min-height: 42px; margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.month-close-actions button { width: 100%; }
.month-close-surface.is-closed { border-color: rgba(36, 138, 61, 0.35); }
.month-close-surface.is-changed { border-color: rgba(201, 52, 0, 0.5); }

.global-profit-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: stretch;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.global-profit-primary { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 4px 24px; border-right: 1px solid var(--line); }
.global-profit-primary span, .global-profit-primary em { color: var(--muted); font-style: normal; }
.global-profit-primary strong { margin: 12px 0 8px; font-size: 38px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.global-profit-support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.global-profit-support > div { min-width: 0; padding: 12px 18px; border-right: 1px solid var(--line); }
.global-profit-support > div:last-child { border-right: 0; }
.global-profit-support dt, .global-profit-support small { display: block; color: var(--muted); font-size: 12px; }
.global-profit-support dd { margin: 12px 0 7px; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.global-profit-section { margin-top: 20px; padding: 18px 0 4px; border-top: 1px solid var(--line); }
.global-store-surface { margin-top: 20px; }
.platform-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.platform-summary {
  min-width: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: #f8fafc;
}
.platform-summary > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.platform-summary span { font-size: 15px; font-weight: 750; }
.platform-summary em { color: var(--muted); font-size: 11px; font-style: normal; }
.platform-summary > small { display: block; margin-top: 15px; color: var(--muted); }
.platform-summary > strong { display: block; margin: 5px 0 15px; font-size: 25px; font-variant-numeric: tabular-nums; }
.platform-summary dl { display: grid; gap: 7px; margin: 0; }
.platform-summary dl div { display: flex; justify-content: space-between; gap: 10px; }
.platform-summary dt { color: var(--muted); }
.platform-summary dd { margin: 0; font-weight: 650; }
.global-mode-wrap { max-height: 390px; }
.global-mode-table { min-width: 880px; }
.global-mode-table th:nth-child(n+3), .global-mode-table td:nth-child(n+3) { text-align: right; }
.global-operating-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.global-operating-strip > div { min-width: 0; padding: 15px 18px; border-right: 1px solid var(--line); }
.global-operating-strip > div:last-child { border-right: 0; }
.global-operating-strip span, .global-operating-strip em { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.global-operating-strip strong { display: block; margin: 6px 0 2px; font-size: 18px; font-variant-numeric: tabular-nums; }
.global-store-wrap { max-height: 440px; }
.global-store-table { min-width: 1120px; }

.global-overview-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.55fr);
  gap: 24px;
  align-items: center;
  min-height: 296px;
  padding: 24px 28px;
}
#globalOverview .surface { border-color: rgba(60, 60, 67, 0.09); box-shadow: 0 4px 16px rgba(20, 28, 45, 0.045); }
.global-profit-orbit {
  --ring-progress: 0;
  --ring-color: var(--profit);
  position: relative;
  display: grid;
  width: 216px;
  height: 216px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--ring-progress) * 1%), #e9e9ee 0);
}
.global-profit-orbit::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--panel); }
.global-profit-orbit > div { position: relative; z-index: 1; max-width: 170px; text-align: center; }
.global-profit-orbit span, .global-profit-orbit em { display: block; color: var(--muted); font-style: normal; }
.global-profit-orbit strong { display: block; margin: 10px 0 7px; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.global-overview-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: center; border-left: 1px solid rgba(60, 60, 67, 0.13); }
.global-overview-kpi { min-width: 0; padding: 16px 22px; border-bottom: 1px solid rgba(60, 60, 67, 0.11); }
.global-overview-kpi:nth-child(2), .global-overview-kpi:nth-child(4) { border-right: 1px solid rgba(60, 60, 67, 0.11); }
.global-overview-kpi:nth-child(4), .global-overview-kpi:nth-child(5) { border-bottom: 0; }
.global-overview-kpi-primary { grid-column: 1 / -1; }
.global-overview-kpi span, .global-overview-kpi em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.global-overview-kpi strong { display: block; overflow: hidden; margin: 8px 0 5px; font-size: 22px; letter-spacing: 0; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.global-overview-kpi-primary strong { font-size: 26px; }
.global-dashboard-kpi-grid { align-self: center; }

.global-breakdown-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.global-breakdown-surface { min-height: 330px; }
.global-donut-layout { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 22px; align-items: center; }
.global-donut { position: relative; display: grid; width: 178px; height: 178px; place-items: center; border-radius: 50%; background: #e5e5ea; transition: background 320ms ease; }
.global-donut::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--panel); }
.global-donut > div { position: relative; z-index: 1; max-width: 120px; text-align: center; }
.global-donut span { display: block; color: var(--muted); font-size: 12px; }
.global-donut strong { display: block; margin-top: 7px; color: var(--ink); font-size: 18px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.global-breakdown-legend { display: grid; min-width: 0; margin: 0; padding: 0; list-style: none; }
.global-breakdown-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 47px; border-bottom: 1px solid rgba(60, 60, 67, 0.1); }
.global-breakdown-legend li:last-child { border-bottom: 0; }
.global-breakdown-legend li.empty { display: block; min-height: 0; line-height: 1.5; }
.global-breakdown-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--legend-color); }
.global-breakdown-legend div { min-width: 0; }
.global-breakdown-legend strong, .global-breakdown-legend span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-breakdown-legend strong { font-size: 13px; }
.global-breakdown-legend span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.global-breakdown-legend em { font-size: 13px; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
.global-breakdown-surface { min-height: 0; }
.global-breakdown-list { display: grid; }
.global-breakdown-legend li { min-height: 64px; }

.global-operating-surface { margin-top: 14px; padding: 0; overflow: hidden; background: #fbfbfd; }
.global-close-readiness-surface { margin-top: 14px; }
.global-close-readiness-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfd; }
.global-close-readiness-counts > div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.global-close-readiness-counts > div:last-child { border-right: 0; }
.global-close-readiness-counts span, .global-close-readiness-counts strong { display: block; }
.global-close-readiness-counts span { color: var(--muted); font-size: 11px; }
.global-close-readiness-counts strong { margin-top: 5px; font-size: 20px; font-variant-numeric: tabular-nums; }
.global-close-readiness-list { display: grid; margin-top: 12px; border-top: 1px solid var(--line); }
.global-close-readiness-row { display: grid; grid-template-columns: minmax(190px, .8fr) 92px minmax(280px, 1.4fr) 58px; gap: 12px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line); }
.global-close-readiness-row:last-child { border-bottom: 0; }
.global-close-readiness-store { min-width: 0; }
.global-close-readiness-store strong, .global-close-readiness-store span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-close-readiness-store span, .global-close-readiness-detail { margin-top: 4px; color: var(--muted); font-size: 11px; }
.global-close-readiness-detail { min-width: 0; line-height: 1.5; }
.global-close-status { display: inline-flex; justify-content: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: #f2f4f7; color: #667085; font-size: 11px; font-weight: 750; }
.global-close-status.is-closed, .global-close-status.is-ready { background: #eaf6ed; color: #248a3d; }
.global-close-status.is-blocked { background: #fff3df; color: #9a5b00; }
.global-close-readiness-row button { min-width: 52px; }
.global-operating-focus { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.global-operating-focus > div { min-width: 0; padding: 17px 20px; border-right: 1px solid var(--line); }
.global-operating-focus > div:last-child { border-right: 0; }
.global-operating-focus span, .global-operating-focus em { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.global-operating-focus strong { display: block; overflow: hidden; margin: 7px 0 4px; font-size: 20px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.global-store-ranking-surface { margin-top: 14px; }
.global-store-ranking { display: grid; }
.global-store-rank-row { display: grid; grid-template-columns: 34px minmax(260px, 1fr) minmax(125px, auto) 56px; gap: 14px; align-items: center; min-height: 80px; border-bottom: 1px solid rgba(60, 60, 67, 0.1); }
.global-store-rank-row:last-child { border-bottom: 0; }
.global-store-rank { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #f2f2f7; color: var(--muted); font-size: 12px; font-weight: 750; }
.global-store-rank-row:nth-child(1) .global-store-rank { background: #eaf2ff; color: #3478f6; }
.global-store-rank-main { min-width: 0; }
.global-store-rank-main > div:first-child { display: flex; align-items: center; gap: 8px; }
.global-store-rank-main > div:first-child > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-store-profit-track { height: 7px; overflow: hidden; margin: 9px 0 6px; border-radius: 4px; background: #e9e9ee; }
.global-store-profit-track b { display: block; height: 100%; border-radius: 4px; background: #3478f6; transition: width 320ms ease; }
.global-store-profit-track b.loss { background: var(--loss); }
.global-store-profit-track b.neutral { background: #8e8e93; }
.global-store-rank-main small { display: block; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-store-rank-profit { min-width: 125px; text-align: right; }
.global-store-rank-profit span, .global-store-rank-profit em { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.global-store-rank-profit strong { display: block; margin: 5px 0 3px; font-size: 17px; font-variant-numeric: tabular-nums; }
.global-store-rank-row .store-detail-button { width: 52px; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.store-detail-button { padding: 6px 9px; border-radius: 6px; background: var(--soft); color: var(--accent); font-weight: 700; }
.store-detail-button:hover { background: var(--accent); color: #fff; }

.content-grid, .import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}
.pressure-surface, .mode-profit-surface { margin-top: 14px; }
.mode-profit-wrap { max-height: none; }
.mode-profit-table { min-width: 900px; }
.mode-profit-table th:not(:first-child),
.mode-profit-table td:not(:first-child) { text-align: right; }
.mode-profit-table td:first-child { min-width: 180px; }
.mode-coverage {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.order-status-secondary {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.progress-list { display: grid; gap: 18px; }
.progress-row { display: grid; grid-template-columns: 220px minmax(180px, 1fr) 140px; gap: 16px; align-items: center; }
.progress-row > div:first-child { display: grid; gap: 4px; }
.progress-row span, .progress-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.progress-row em { text-align: right; }
.progress-track { height: 12px; overflow: hidden; border-radius: 6px; background: #e4e7ec; }
.progress-track b { display: block; width: 0; height: 100%; background: var(--accent-2); border-radius: 6px; transition: width 320ms ease; }
.progress-track #shellPddProgressBar { background: #b45309; }
.progress-track #nationalProgressBar { background: #175cd3; }
.progress-track #techProgressBar { background: #7f56d9; }
.surface { padding: 18px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head span { color: var(--muted); font-size: 13px; }
.section-note { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.receivable-overview-surface { margin-bottom: 14px; }
.receivable-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}
.receivable-control-grid > div { min-width: 0; padding: 15px 16px; background: #fbfbfc; }
.receivable-control-grid span, .receivable-control-grid strong, .receivable-control-grid em { display: block; }
.receivable-control-grid span { color: var(--muted); font-size: 11px; }
.receivable-control-grid strong { margin-top: 7px; font-size: 20px; font-variant-numeric: tabular-nums; }
.receivable-control-grid em { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.receivable-control-grid > div:nth-child(3) strong,
.receivable-control-grid > div:nth-child(4) strong,
.receivable-control-grid > div:nth-child(5) strong,
.receivable-control-grid > div:nth-child(7) strong { color: #a64b13; }
.receivable-type-table-wrap { max-height: 310px; }
.receivable-detail-filters { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 14px 0; }
.receivable-detail-filters label { display: grid; grid-template-columns: auto minmax(180px, 260px); gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
.receivable-detail-filters select { width: 100%; min-height: 34px; }
.receivable-order-link, .variance-order-link { padding: 0; background: transparent; color: #245fae; font: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.receivable-order-link:hover, .variance-order-link:hover { text-decoration-color: currentColor; }
.receivable-age-cell strong, .receivable-age-cell span { display: block; white-space: nowrap; }
.receivable-age-cell span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.voucher-reconciliation-table-wrap { max-height: 420px; }
.voucher-reconciliation-table-wrap table { min-width: 1180px; }
.voucher-batch-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.fund-reconciliation-surface { margin-bottom: 14px; border-left: 3px solid #d9822b; }
.fund-reconciliation-table-wrap { max-height: 280px; margin-top: 14px; }
.settlement-reconciliation-list { display: grid; gap: 8px; margin-top: 14px; }
.settlement-reconciliation-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #cae6d8; border-radius: 7px; background: #f3fbf7; }
.settlement-reconciliation-item div { min-width: 0; }
.settlement-reconciliation-item strong, .settlement-reconciliation-item span { display: block; }
.settlement-reconciliation-item strong { font-size: 12px; }
.settlement-reconciliation-item span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.settlement-reconciliation-item b { flex: none; color: #16784a; font-size: 14px; }
.cell-subtitle { display: block; max-width: 360px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fund-reconciliation-summary > div:nth-child(2) strong { color: #8a5b18; }
.fund-reconciliation-summary > div:nth-child(3) strong { color: var(--bad); }
.fund-reconciliation-summary > div:nth-child(4) strong { color: var(--muted); }
.receivable-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}
.receivable-summary-band > div { min-width: 0; padding: 15px 16px; background: #fafafa; }
.receivable-summary-band span { display: block; color: var(--muted); font-size: 12px; }
.receivable-summary-band strong { display: block; margin-top: 8px; font-size: 21px; letter-spacing: 0; }
.receivable-summary-band > div:nth-child(2) strong { color: var(--profit); }
.receivable-summary-band > div:nth-child(3) strong { color: var(--loss); }
.receivable-summary-list { margin-top: 18px; border-top: 1px solid rgba(60, 60, 67, 0.12); }
.receivable-summary-row {
  display: grid;
  grid-template-columns: 190px minmax(160px, 1fr) minmax(350px, 0.9fr);
  gap: 16px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
}
.receivable-summary-label { display: flex; justify-content: space-between; gap: 8px; }
.receivable-summary-label span { color: var(--muted); font-size: 12px; }
.receivable-summary-track { height: 10px; overflow: hidden; border-radius: 5px; background: #e5e5ea; }
.receivable-summary-track b { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width 320ms ease; }
.receivable-summary-row[data-receivable-type="shellPdd"] .receivable-summary-track b { background: #b45309; }
.receivable-summary-row[data-receivable-type="shellPddReceipt"] .receivable-summary-track b { background: #0a84ff; }
.receivable-summary-row[data-receivable-type="national"] .receivable-summary-track b { background: #248a3d; }
.receivable-summary-row[data-receivable-type="tech"] .receivable-summary-track b { background: #7f56d9; }
.receivable-summary-row[data-receivable-type="alipay"] .receivable-summary-track b { background: #1677ff; }
.receivable-summary-row[data-receivable-type="wechat"] .receivable-summary-track b { background: #07c160; }
.receivable-summary-row[data-receivable-type="taobaoNational"] .receivable-summary-track b { background: #c93400; }
.receivable-summary-row dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.receivable-summary-row dl div { min-width: 0; }
.receivable-summary-row dt { color: var(--muted); font-size: 11px; }
.receivable-summary-row dd { overflow: hidden; margin: 4px 0 0; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.receipt-entry-surface { margin-bottom: 14px; }
.receipt-entry-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
}
.receipt-entry-grid label { display: grid; gap: 7px; min-width: 0; }
.receipt-entry-grid label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.receipt-entry-grid input {
  width: 100%;
  height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}
.receipt-entry-grid input:focus { border-color: var(--accent); }
.receipt-entry-grid button { min-width: 104px; }
.shell-receipt-entry-grid {
  grid-template-columns: minmax(180px, 0.8fr) minmax(170px, 0.7fr) minmax(260px, 1.25fr) auto;
}
.receipt-message { min-height: 20px; margin-top: 10px; color: var(--accent); font-size: 13px; }
.receipt-reconciliation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 8px;
  background: var(--line);
}
.receipt-reconciliation > div { min-width: 0; padding: 13px 14px; background: #f9f9fb; }
.receipt-reconciliation span { display: block; color: var(--muted); font-size: 11px; }
.receipt-reconciliation strong { display: block; margin-top: 6px; font-size: 17px; font-variant-numeric: tabular-nums; }
.receipt-history-surface { margin-top: 14px; }
.receipt-history-wrap { max-height: 300px; }
.receipt-history-table { min-width: 620px; }

.overview-fee-strip, .fee-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}
.fee-summary-band { border-radius: 8px 8px 0 0; }
.overview-fee-strip > div, .fee-summary-band > div {
  min-width: 0;
  padding: 14px 15px;
  background: #fafafa;
}
.platform-fee-overview .overview-fee-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-fee-strip span, .fee-summary-band span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.overview-fee-strip strong, .fee-summary-band strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-fee-strip > div:nth-child(2) strong,
.fee-summary-band > div:nth-child(2) strong { color: var(--good); }
.overview-fee-strip > div:nth-child(4) strong,
.fee-summary-band > div:nth-child(4) strong { color: #7f56d9; }
.fee-summary-band em {
  display: block;
  min-height: 30px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}
.fee-settlement-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #f7faf9;
}
.fee-settlement-strip div { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.fee-settlement-strip span, .fee-settlement-strip em { color: var(--muted); font-size: 11px; font-style: normal; }
.fee-settlement-strip strong { color: #3b6f73; font-size: 16px; font-variant-numeric: tabular-nums; }
.fee-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 13px;
}
.fee-chart-head h3 { margin: 0; font-size: 14px; }
.fee-chart-head span { color: var(--muted); font-size: 12px; }
.fee-breakdown-chart { display: grid; gap: 13px; }
.fee-breakdown-chart.compact { margin-top: 18px; }
.fee-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(120px, 1fr) 112px;
  gap: 13px;
  align-items: center;
  min-height: 30px;
}
.fee-bar-label { min-width: 0; }
.fee-bar-label strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fee-bar-label span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.fee-bar-track { height: 11px; overflow: hidden; border-radius: 6px; background: #e9e9ee; }
.fee-bar-track b {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  min-width: 3px;
  border-radius: 6px;
  background: var(--accent);
  transition: width 320ms ease;
}
.fee-bar-row[data-fee-kind="tech_fee_hold"] .fee-bar-track b { background: #7f56d9; }
.fee-bar-row[data-fee-kind="shell_fee"] .fee-bar-track b { background: #c2410c; }
.fee-bar-row[data-fee-kind="fee_return"] .fee-bar-track b,
.fee-bar-row[data-fee-kind="tech_fee_return"] .fee-bar-track b { background: var(--good); }
.fee-bar-amount { text-align: right; font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; }
.fee-bar-row[data-fee-kind="fee_return"] .fee-bar-amount,
.fee-bar-row[data-fee-kind="tech_fee_return"] .fee-bar-amount { color: var(--good); }
.fee-table-surface { margin-top: 14px; }
.segmented-control {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #e9e9ee;
}
.segmented-control button {
  min-width: 58px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.segmented-control button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.cost-method-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.cost-method-heading .setting-label { margin-bottom: 0; }
.cost-method-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #b9d2ff;
  border-radius: 7px;
  background: #eef5ff;
  color: #1859b9;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.cost-method-state.switching { border-color: #cfd3dc; background: #f4f5f7; color: var(--muted); }
.segmented-control.cost-method-control button.active {
  border: 1px solid #3478f6;
  background: #3478f6;
  color: #fff;
  box-shadow: 0 2px 6px rgba(52, 120, 246, .24);
}
.cost-method-control button:disabled { cursor: wait; opacity: .72; }

.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alert-list li {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 11px;
  color: var(--warn);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.import-file-grid label { min-width: 0; }
.import-file-grid select, .import-file-grid input[type="file"], .import-file-grid input[type="month"] { width: 100%; min-width: 0; }
.cost-accounting-month-field {
  padding: 12px;
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 8px;
  background: #f5faff;
}
.cost-accounting-month-field[hidden] { display: none; }
.cost-accounting-month-field small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.file-field input[type="file"] {
  overflow: hidden;
  padding: 0 10px 0 0;
  color: var(--muted);
  line-height: 38px;
}
.file-field input[type="file"]::file-selector-button {
  height: 38px;
  margin-right: 12px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f7f7f9;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.import-status-card {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fa;
}
.import-status-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.import-status-head span {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e9e9ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.import-status-head strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.import-status-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.import-status-card[data-stage="selected"] { border-color: rgba(0, 122, 255, 0.28); background: #f2f7ff; }
.import-status-card[data-stage="selected"] .import-status-head span,
.import-status-card[data-stage="preview"] .import-status-head span { background: #e6f0ff; color: var(--accent); }
.import-status-card[data-stage="checking"],
.import-status-card[data-stage="writing"] { border-color: rgba(0, 122, 255, 0.28); background: #f7faff; }
.import-status-card[data-stage="checking"] .import-status-head span,
.import-status-card[data-stage="writing"] .import-status-head span { background: var(--accent); color: #fff; }
.import-status-card[data-stage="success"] { border-color: rgba(52, 199, 89, 0.3); background: #f2fbf4; }
.import-status-card[data-stage="success"] .import-status-head span { background: #dff5e5; color: #248a3d; }
.import-status-card[data-stage="duplicate"],
.import-status-card[data-stage="warning"] { border-color: rgba(255, 159, 10, 0.3); background: #fff9ee; }
.import-status-card[data-stage="duplicate"] .import-status-head span,
.import-status-card[data-stage="warning"] .import-status-head span { background: #ffefd2; color: #9a5b00; }
.import-status-card[data-stage="error"] { border-color: rgba(255, 59, 48, 0.25); background: #fff5f4; }
.import-status-card[data-stage="error"] .import-status-head span { background: #ffe4e1; color: #c83228; }
.mapping-area { display: grid; gap: 10px; margin-top: 16px; }
.mapping-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.mapping-row span { font-weight: 700; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
#importMessage { color: var(--muted); }
.field-help {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.template-button { height: 32px; padding: 0 10px; font-size: 12px; }
.import-guide { display: grid; gap: 10px; margin-bottom: 14px; }
.guide-callout { border-left: 3px solid var(--accent); background: var(--soft); padding: 10px 12px; color: #0056a8; font-size: 13px; line-height: 1.55; }
.guide-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-fields span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 12px; }
.field-help code {
  background: var(--soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 6px;
}

.table-wrap { overflow: auto; max-height: calc(100vh - 190px); }
#orders .surface {
  height: calc(100vh - 146px);
  min-height: 520px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
}
#orders .table-wrap {
  min-height: 0;
  max-height: none;
}
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  color: #475467;
  font-size: 13px;
}
td.money { text-align: right; font-variant-numeric: tabular-nums; }
.cost-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 82px;
}
.cost-source-info,
.fee-detail-info {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff0ef;
  color: #d92d20;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  cursor: help;
}
.cost-source-info:hover,
.fee-detail-info:hover { background: #ffdeda; color: #b42318; }
.fee-detail-info.accrual {
  background: #fff7e6;
  color: #b54708;
}
.fee-detail-info.pending {
  background: #fff7e6;
  color: #b54708;
}
.profit-evidence-info { margin-left: 4px; vertical-align: middle; }
.profit-evidence-info.evidence-confirmed { background: #eaf6ee; color: #247744; }
.profit-evidence-info.evidence-estimated,
.profit-evidence-info.evidence-review { background: #fff7e6; color: #9a5b12; }
.profit-evidence-info.evidence-blocked { background: #fff0ef; color: #c52f27; }
.pending-fee-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  color: #b54708;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.cost-source-tooltip {
  position: fixed;
  z-index: 60;
  width: max-content;
  max-width: min(340px, calc(100vw - 20px));
  padding: 7px 9px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.14);
  color: #475467;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#orders .sticky-profit {
  position: sticky;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
  font-weight: 750;
  text-overflow: ellipsis;
}
#orders th.sticky-profit {
  z-index: 4;
  background: #eef4f8;
}
#orders td.sticky-profit { z-index: 2; }
#orders .sticky-profit-estimated {
  right: 118px;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  box-shadow: -10px 0 14px -14px rgba(15, 23, 42, 0.72);
}
#orders .sticky-profit-final {
  right: 0;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  border-left: 1px solid rgba(60, 60, 67, 0.13);
}
#orders th.sticky-profit .sort-button { width: 100%; justify-content: flex-end; }
.quantity-column, .quantity-cell { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
.positive { color: var(--profit); }
.negative { color: var(--loss); }
.muted { color: var(--muted); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.import-preview { margin-top: 14px; }
.import-preview[hidden] { display: none; }
.import-preview-dialog { padding: 14px; border: 1px solid rgba(0, 122, 255, 0.25); border-radius: 8px; background: #f2f7ff; }
.import-preview h3 { margin: 0 0 8px; font-size: 15px; }
.import-preview p { margin: 5px 0; color: var(--muted); line-height: 1.5; }
.import-schema-check { display: grid; gap: 7px; margin: 12px 0; padding: 11px 12px; border: 1px solid #cfe3d4; border-radius: 8px; background: #f7fbf8; }
.import-schema-check.status-changed,
.import-schema-check.status-review,
.import-schema-check.status-pending { border-color: #ead5aa; background: #fffbf3; }
.import-schema-check.status-blocked { border-color: #efc4c0; background: #fff7f6; }
.import-schema-check-head { display: flex; align-items: center; gap: 9px; }
.import-schema-check-head > div { display: grid; min-width: 0; gap: 2px; }
.import-schema-check-head strong { color: var(--ink); font-size: 13px; }
.import-schema-check-head span { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.import-schema-check-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #2f8f4e; color: #fff; font-size: 12px; font-weight: 800; }
.status-changed .import-schema-check-icon,
.status-review .import-schema-check-icon,
.status-pending .import-schema-check-icon { background: #bd7825; }
.status-blocked .import-schema-check-icon { background: #c64f48; }
.import-schema-check > p { margin: 0; color: #45505d; font-size: 11px; }
.import-schema-fields { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; font-size: 10px; line-height: 1.45; }
.import-schema-fields span { color: var(--muted); }
.import-schema-fields b { color: #315e3d; font-weight: 600; }
.import-schema-fields.missing b { color: #a6413c; }
.import-schema-likely { padding-top: 6px; border-top: 1px solid rgba(198, 79, 72, .18); color: #7b3733; font-size: 11px; }
.import-preview-month { display: grid; gap: 6px; margin-top: 16px; }
.import-preview-month[hidden], .import-preview-mapping[hidden] { display: none !important; }
.import-preview-month span { font-size: 12px; font-weight: 700; }
.import-preview-month input { width: 100%; height: 42px; }
.import-preview-month small { color: var(--muted); font-size: 11px; }
.import-preview-mapping { max-height: 330px; overflow: auto; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.import-preview-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.import-preview-actions button { min-width: 132px; }
.import-preview.task-flow-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  background: rgba(18, 22, 30, .34);
  backdrop-filter: blur(4px);
}
.import-preview.task-flow-dialog .import-preview-dialog {
  width: min(620px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 20px 60px rgba(17, 24, 39, .2);
}
.advanced-import-surface > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.advanced-import-surface > summary > span:first-child { display: grid; gap: 3px; }
.advanced-import-surface > summary strong { font-size: 15px; }
.advanced-import-surface > summary small, .advanced-import-surface > summary > span:last-child { color: var(--muted); font-size: 11px; }
.advanced-import-surface > summary::-webkit-details-marker { display: none; }
.advanced-import-surface > summary::after { content: "展开"; color: var(--accent); font-size: 12px; font-weight: 700; }
.advanced-import-surface[open] > summary::after { content: "收起"; }
.advanced-import-content { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.advanced-import-guide { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfc; }
.advanced-import-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.advanced-import-guide-head h3 { margin: 0; font-size: 13px; }
.data-safety-surface { grid-column: 1 / -1; }
.import-history-surface { grid-column: 1 / -1; }
.import-history-list { display: grid; border-top: 1px solid var(--line); }
.import-history-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 110px 145px;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}
.import-history-row:last-child { border-bottom: 0; }
.import-history-file { min-width: 0; }
.import-history-file strong, .import-history-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-history-file span, .import-history-row time { margin-top: 4px; color: var(--muted); font-size: 11px; }
.import-history-type { color: var(--ink); font-size: 12px; font-weight: 650; }
.import-history-count { color: var(--muted); font-size: 12px; text-align: right; }
.import-history-state { color: #248a3d; font-size: 12px; font-weight: 700; text-align: right; }
.import-history-state.needs-attention { color: #a15c00; }
.import-history-action {
  min-height: 28px;
  margin-top: 6px;
  padding: 0 9px;
  border: 1px solid rgba(0, 122, 255, 0.25);
  border-radius: 7px;
  background: #f2f7ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.import-history-action:hover { background: #e8f2ff; }
.data-safety-actions { display: grid; grid-template-columns: auto minmax(240px, 1fr) minmax(180px, .8fr) auto; gap: 12px; align-items: end; }
.restore-file-field input[type="file"] { min-height: 40px; }
.restore-file-field input[type="file"]::file-selector-button { height: 38px; margin-right: 10px; border: 0; border-right: 1px solid var(--line); background: #f7f7f9; }
.encrypted-backup-panel { margin-top: 14px; padding: 14px; border: 1px solid #bfd8ff; border-radius: 10px; background: #f5f9ff; }
.encrypted-backup-panel > div:first-child { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.encrypted-backup-panel > div:first-child span, .encrypted-backup-panel > p { color: var(--muted); font-size: 12px; }
.encrypted-backup-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin-top: 12px; }
.encrypted-backup-panel > p { margin: 9px 0 0; }
.tag.warn { background: #fff7ed; color: var(--warn); }
.table-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 13px; }
.section-actions .secondary, .section-actions .danger-secondary { height: 32px; padding: 0 10px; font-size: 12px; }
.select-all-exceptions { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 6px; color: var(--ink); }
.select-all-exceptions input { width: 15px; height: 15px; accent-color: var(--accent); }
.status-filter { position: relative; }
.filter-trigger { min-width: 118px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 600; }
.filter-trigger[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.filter-apply-button, .filter-clear-button { height: 32px; padding: 0 11px; font-size: 12px; }
.filter-apply-button.filters-pending { box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16); }
.order-search { width: 170px; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; background: #fff; color: var(--ink); font-size: 13px; }
.sort-select { width: auto; min-width: 142px; height: 32px; border-radius: 6px; padding: 0 28px 0 9px; color: var(--ink); font-size: 13px; font-weight: 600; }
.status-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14); }
.status-menu.wide { width: min(340px, 72vw); }
.status-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 0 2px 7px; border-bottom: 1px solid var(--line); }
.status-actions button { padding: 3px 5px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; }
.status-actions .refund-scope-action { margin-right: auto; color: var(--ink); }
.status-actions .refund-scope-action.active { color: var(--accent); background: #eef6ff; }
.status-options { display: grid; gap: 3px; max-height: 230px; overflow: auto; padding-top: 7px; }
.status-options label { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 5px; color: var(--ink); font-size: 13px; }
.status-options label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-options label:hover { background: #f2f4f7; }
.status-options input { width: 15px; height: 15px; accent-color: var(--accent); }
.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
}
.sort-button::after { content: "↕"; color: #98a2b3; font-size: 12px; }
.sort-button[data-direction="desc"]::after { content: "↓"; color: var(--accent); }
.sort-button[data-direction="asc"]::after { content: "↑"; color: var(--accent); }
.order-id-group { display: flex; align-items: center; gap: 6px; }
.order-row-checkbox {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0 2px 0 0;
  accent-color: #ff9f0a;
  cursor: pointer;
}
#orders tbody tr td { transition: background-color 150ms ease; }
#orders tbody tr.order-row-selected td { background: #fff5cc; }
#orders tbody tr.order-row-selected td:first-child { box-shadow: inset 3px 0 #ff9f0a; }
#orders tbody tr.order-profit-anomaly td { background: #fffaf0; }
#orders tbody tr.order-profit-anomaly td:first-child { box-shadow: inset 3px 0 #ff9f0a; }
#orders tbody tr.order-row-selected.order-profit-anomaly td { background: #fff2bf; }
.profit-alert-note { display: block; margin-top: 4px; color: #9a5b00; font-size: 10px; font-weight: 700; }
.order-id-text { user-select: text; cursor: text; }
.copy-order-button {
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
}
.copy-order-button:hover { border-color: var(--line); background: #f2f4f7; color: var(--accent); }
.copy-order-button.copied { background: var(--good); color: #fff; }
.estimate-note { display: inline-block; margin-left: 4px; color: var(--warn); font-size: 10px; font-weight: 700; }
.source-missing { display: inline-block; color: #b45309; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tech-fee-line { display: block; line-height: 1.45; }
.appeal-recovery-note {
  display: block;
  margin-top: 3px;
  color: #168247;
  font-size: 11px;
  font-weight: 600;
}
.appeal-overview {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.appeal-overview-store { margin-top: 12px; border-bottom: 1px solid var(--line); }
.appeal-overview-current span,
.appeal-overview-current strong,
.appeal-overview-current small { display: block; }
.appeal-overview-current span { color: #435265; font-size: 12px; font-weight: 700; }
.appeal-overview-current strong { margin-top: 3px; color: #1b667b; font-size: 19px; font-variant-numeric: tabular-nums; }
.appeal-overview-current small { color: var(--muted); font-size: 11px; }
.appeal-months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.appeal-month { min-width: 0; }
.appeal-month span,
.appeal-month strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appeal-month span { color: var(--muted); font-size: 11px; }
.appeal-month strong { margin: 3px 0 5px; color: #243447; font-size: 12px; font-variant-numeric: tabular-nums; }
.appeal-month i { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: #e6edf0; }
.appeal-month i b { display: block; height: 100%; background: #49a0b2; }
@media (max-width: 900px) {
  .appeal-overview { display: block; }
  .appeal-months { grid-template-columns: repeat(6, minmax(92px, 1fr)); gap: 12px; margin-top: 10px; overflow-x: auto; }
}
.order-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 5px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.page-controls { display: flex; align-items: center; gap: 8px; }
.page-controls label { display: flex; align-items: center; gap: 5px; }
.page-controls select { width: 68px; height: 30px; padding: 0 24px 0 8px; border-radius: 6px; }
.page-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}
.page-controls button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-controls button:disabled { opacity: 0.4; cursor: default; }
.page-controls strong { min-width: 52px; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.order-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  border-top: 1px solid var(--line);
  background: #f8fafc;
  box-shadow: 0 -6px 14px rgba(16, 24, 40, 0.06);
  z-index: 2;
}
.order-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}
.order-summary > div:last-child { border-right: 0; }
.order-summary span, .order-summary em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.order-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.order-summary em { margin-top: 2px; }

.order-profit-reconcile {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 24px minmax(150px, 1fr) 24px minmax(170px, 1fr) 24px minmax(170px, 1.05fr);
  align-items: stretch;
  border-top: 1px solid var(--line);
  background: #fff;
}
.order-profit-reconcile > div {
  min-width: 0;
  padding: 11px 14px;
}
.order-profit-reconcile > div.result {
  border-left: 1px solid var(--line);
  background: #f1f6ff;
}
.order-profit-reconcile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.order-profit-reconcile strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.order-profit-reconcile i {
  align-self: center;
  color: #8e8e93;
  font-size: 16px;
  font-style: normal;
  text-align: center;
}

.exception-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.exception-summary-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 14px; border: 0; background: #fafafa; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.exception-summary-item span { display: grid; gap: 2px; color: var(--muted); font-size: 12px; }
.exception-summary-item span small { color: #8290a3; font-size: 10px; font-weight: 500; }
.exception-summary-item strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.exception-summary-item.profit-alert { background: #fff9ee; }
.exception-summary-item.profit-alert strong { color: #9a5b00; }
.exception-list { display: grid; gap: 10px; }
.exception-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: start;
  border: 1px solid #ffd5c2;
  background: #fff9f6;
  padding: 13px;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}
.exception-item:hover { border-color: #ff9f73; }
.exception-item.profit-alert { border-color: #f4c77b; background: #fffaf0; }
.exception-item.profit-alert:hover { border-color: #e9a72c; }
.exception-item.profit-alert strong { color: #9a5b00; }
.exception-item input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.exception-item strong { display: block; color: var(--warn); margin-bottom: 4px; }
.exception-item em { display: block; color: var(--muted); font-style: normal; line-height: 1.45; }
.exception-order-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(52, 120, 246, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}
.exception-order-link:hover { color: #245fae; text-decoration-color: currentColor; }
.exception-copy-button {
  width: 38px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.exception-copy-button:hover { border-color: #a9b5c6; background: #fff; color: var(--ink); }
.exception-copy-button:active { transform: scale(0.94); }
.exception-copy-button.copied { color: #237a47; border-color: #9bd5b2; background: #f2fbf5; font-size: 11px; }
.follow-up-reminder-surface {
  margin-top: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-color: #e4e8ee;
  background: #fbfcfd;
  box-shadow: none;
}
.follow-up-reminder-head { margin-bottom: 9px; }
.follow-up-reminder-head h2 { font-size: 14px; }
.follow-up-reminder-head .section-note { margin-top: 3px; font-size: 11px; }
.follow-up-reminder-head > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.follow-up-reminder-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid #edf0f4; border-radius: 7px; background: #edf0f4; }
.follow-up-reminder-item {
  display: grid;
  grid-template-columns: 7px minmax(170px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}
.follow-up-reminder-dot { width: 6px; height: 6px; border-radius: 50%; background: #9aa5b1; }
.follow-up-reminder-order { overflow: hidden; color: #465466; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.follow-up-reminder-message { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-up-reminder-more { padding: 8px 10px; background: #f7f8fa; color: var(--muted); font-size: 11px; text-align: center; }
.edit-order-button {
  min-width: 54px;
  height: 30px;
  border: 1px solid #c9d5e5;
  border-radius: 7px;
  background: #f7f9fc;
  color: #315c92;
  cursor: pointer;
}
.edit-order-button:hover { border-color: #7ca8e8; background: #f1f6fd; }
.edit-order-button.corrected { border-color: #9bd5b2; background: #f2fbf5; color: #237a47; }
.empty {
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; overflow: visible; }
  nav { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .nav-item { text-align: center; }
  .metric-grid, .content-grid, .import-layout { grid-template-columns: 1fr; }
  .overview-profit-hero, .overview-visual-grid { grid-template-columns: 1fr; }
  .overview-profit-hero { gap: 22px; }
  .dashboard-secondary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-secondary-strip > div:nth-child(2) { border-right: 0; }
  .dashboard-secondary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .store-profit-focus, .global-profit-focus { border-right: 0; border-bottom: 1px solid rgba(60, 60, 67, 0.12); }
  .mode-profit-chart { grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr); }
  .receivable-orbit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .correction-grid { grid-template-columns: 1fr; }
  .receivable-orbit-item:nth-child(2) { border-right: 0; }
  .global-profit-hero { grid-template-columns: 1fr; gap: 16px; }
  .global-overview-hero, .global-breakdown-grid { grid-template-columns: 1fr; }
  .global-overview-hero { gap: 22px; }
  .global-donut-layout { grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr); }
  .global-operating-focus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-operating-focus > div:nth-child(2) { border-right: 0; }
  .global-operating-focus > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .global-profit-primary { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .global-profit-support { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform-summary-grid { grid-template-columns: 1fr; }
  .global-operating-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-row { grid-template-columns: 1fr; gap: 8px; }
  .progress-row em { text-align: left; }
  .topbar { flex-direction: column; }
  .toolbar { width: 100%; }
  #monthSelect, #exportCsv { flex: 1; }
  .table-controls { width: 100%; justify-content: space-between; }
  .receipt-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell-receipt-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt-entry-grid button { width: 100%; }
  .receipt-reconciliation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receivable-summary-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receivable-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receivable-detail-filters { align-items: stretch; flex-direction: column; }
  .receivable-detail-filters label { grid-template-columns: auto minmax(180px, 1fr); }
  .overview-fee-strip, .fee-summary-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fee-settlement-strip { align-items: flex-start; flex-direction: column; gap: 3px; }
  .receivable-summary-row { grid-template-columns: 180px minmax(140px, 1fr); }
  .receivable-summary-row dl { grid-column: 1 / -1; padding-bottom: 12px; }
  #orders .surface { height: calc(100vh - 250px); min-height: 480px; }
  .order-profit-reconcile {
    grid-template-columns: minmax(130px, 1fr) 20px minmax(130px, 1fr) 20px minmax(145px, 1fr) 20px minmax(150px, 1fr);
  }
  .order-profit-reconcile > div { padding: 10px; }
  .order-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .month-close-layout, .data-safety-actions, .encrypted-backup-fields { grid-template-columns: 1fr; }
  .import-history-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 0; }
  .import-history-count, .import-history-state { text-align: left; }
}

@media (max-width: 620px) {
  main { padding: 18px; }
  .topbar { margin: -18px -18px 18px; padding: 16px 18px; }
  .global-profit-support, .global-operating-strip { grid-template-columns: 1fr; }
  .order-profit-reconcile { display: flex; overflow-x: auto; }
  .order-profit-reconcile > div { min-width: 145px; }
  .order-profit-reconcile i { min-width: 18px; }
  .global-profit-support > div, .global-operating-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .global-overview-hero { padding: 22px 16px; }
  .global-profit-orbit { width: 216px; height: 216px; }
  .global-overview-kpis { grid-template-columns: 1fr; }
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
  .dashboard-secondary-strip { grid-template-columns: 1fr; }
  .dashboard-secondary-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-secondary-strip > div:last-child { border-bottom: 0; }
  .global-overview-kpi-primary { grid-column: auto; }
  .global-donut-layout { grid-template-columns: 1fr; }
  .global-donut { margin: 0 auto; }
  .global-operating-focus { grid-template-columns: 1fr; }
  .global-operating-focus > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .global-operating-focus > div:last-child { border-bottom: 0; }
  .global-close-readiness-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-close-readiness-counts > div:nth-child(2) { border-right: 0; }
  .global-close-readiness-counts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .global-close-readiness-row { grid-template-columns: minmax(0, 1fr) auto 52px; gap: 8px; padding: 11px 0; }
  .global-close-readiness-detail { grid-column: 1 / -1; grid-row: 2; }
  .global-close-readiness-row button { grid-column: 3; grid-row: 1; }
  .global-store-rank-row { grid-template-columns: 30px minmax(0, 1fr) 48px; gap: 9px; padding: 13px 0; }
  .global-store-rank-profit { grid-column: 2; grid-row: 2; min-width: 0; text-align: left; }
  .global-store-rank-row .store-detail-button { grid-column: 3; grid-row: 1 / span 2; }
  .receipt-entry-grid { grid-template-columns: 1fr; }
  .shell-receipt-entry-grid { grid-template-columns: 1fr; }
  .receipt-reconciliation { grid-template-columns: 1fr; }
  .receivable-summary-band { grid-template-columns: 1fr; }
  .receivable-control-grid { grid-template-columns: 1fr; }
  .receivable-detail-filters label { grid-template-columns: 1fr; }
  .overview-fee-strip, .fee-summary-band { grid-template-columns: 1fr; }
  .overview-profit-hero { padding: 22px 16px; }
  .profit-orbit { width: 210px; height: 210px; }
  .overview-kpi-grid { grid-template-columns: 1fr; }
  .overview-kpi-primary { grid-column: auto; }
  .store-profit-focus, .global-profit-focus { padding: 12px 8px 20px 18px; }
  .mode-profit-chart { grid-template-columns: 1fr; }
  .mode-profit-donut { margin: 0 auto; }
  .health-ring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .overview-health-strip, .overview-receivable-list, .taobao-channel-summary { grid-template-columns: 1fr; }
  .receivable-orbit-grid { grid-template-columns: 1fr; }
  .receivable-orbit-item, .receivable-orbit-item:nth-child(2) { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .receivable-orbit-item:last-child { border-bottom: 0; }
  .overview-alert-list, .month-close-checklist { grid-template-columns: 1fr; }
  .overview-alert-list .data-completeness-alert { grid-template-columns: 1fr; align-items: start; }
  .fee-bar-row { grid-template-columns: minmax(120px, 0.8fr) minmax(90px, 1fr); }
  .fee-bar-amount { grid-column: 2; }
  .receivable-summary-row { grid-template-columns: 1fr; gap: 9px; padding: 12px 0; }
  .receivable-summary-row dl { grid-column: auto; padding-bottom: 0; }
}

.adjustment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}
.adjustment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.adjustment-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.adjustment-form .wide { grid-column: 1 / -1; }
.adjustment-form input,
.adjustment-form select,
.adjustment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 11px;
  color: var(--ink);
  font: inherit;
}
.adjustment-form input, .adjustment-form select { height: 40px; }
.adjustment-form textarea { padding-top: 10px; resize: vertical; }
.policy-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.policy-list li { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.policy-list li:last-child { border-bottom: 0; }
.policy-list strong { font-size: 14px; }
.policy-list span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.compact-ledger-wrap { max-height: 340px; }
.compact-ledger-wrap td { vertical-align: top; }
.compact-ledger-wrap td:nth-child(5), .compact-ledger-wrap td:nth-child(6) { min-width: 180px; white-space: normal; }
.audit-detail { color: var(--muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 960px) {
  .adjustment-layout, .adjustment-form { grid-template-columns: 1fr; }
  .adjustment-form .wide { grid-column: auto; }
}

.month-picker-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.month-picker-label select {
  width: 158px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 34px 0 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}
.month-add-button {
  align-self: end;
  min-width: 112px;
  height: 44px;
  font-size: 13px;
}
.month-modal { width: min(420px, calc(100vw - 32px)); }
.month-modal form { display: grid; gap: 16px; }
.month-modal form > label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.month-modal input[type="month"] { height: 44px; font-size: 15px; font-weight: 600; }
.overview-import-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
}
.overview-import-progress > div { display: grid; gap: 4px; }
.overview-import-progress span { color: var(--muted); font-size: 12px; }
.overview-import-progress strong { font-size: 18px; }
.overview-import-progress p { margin: 0; color: var(--muted); font-size: 12px; }
.import-plan-surface { display: grid; grid-column: 1 / -1; gap: 18px; }
.import-plan-head > strong { color: #2463c7; font-size: 14px; }
.import-plan-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.import-plan-settings > div:first-child { grid-column: 1 / -1; }
.import-plan-settings > section,
.import-plan-settings > .import-plan-actions { grid-column: 1 / -1; }
.import-plan-settings > .promotion-config-block { min-width: 0; }
.promotion-config-block .manual-promotion-form { grid-template-columns: 1fr; }
.import-confirmation-head { margin-bottom: -12px; }
.setting-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.setting-hint { display: block; max-width: 520px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.cost-method-control button { min-width: 126px; }
.import-mode-options { display: flex; flex-wrap: wrap; gap: 8px; }
.import-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.import-mode-option:has(input:checked) { border-color: #3478f6; background: #eef5ff; color: #1859b9; }
.import-mode-option input { accent-color: #3478f6; }
.segmented-control { display: inline-flex; padding: 3px; border-radius: 8px; background: #eef0f4; }
.segmented-control button { min-height: 30px; border: 0; border-radius: 6px; background: transparent; padding: 0 11px; color: var(--muted); }
.segmented-control button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.promotion-entry-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.promotion-entry-panel[hidden], .manual-promotion-form[hidden] { display: none !important; }
.promotion-entry-method button { min-width: 118px; }
.manual-promotion-form {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.manual-promotion-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.manual-promotion-form input { min-height: 36px; }
.manual-promotion-form button { min-height: 36px; white-space: nowrap; }
.import-plan-actions { display: flex; gap: 8px; }
.jd-non-operating-rule {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 340px) auto;
  align-items: end;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.jd-non-operating-rule[hidden] { display: none !important; }
.jd-non-operating-rule h2 { margin: 0 0 4px; font-size: 14px; }
.jd-non-operating-rule label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.jd-non-operating-rule input { min-height: 36px; }
.jd-non-operating-rule .receipt-message { grid-column: 1 / -1; margin: 0; }
.order-non-operating { background: #fafbfc; }
.non-operating-note { color: #765b2f; }
@media (max-width: 920px) {
  .manual-promotion-form { grid-template-columns: 1fr; align-items: stretch; }
  .jd-non-operating-rule { grid-template-columns: 1fr; align-items: stretch; }
  .jd-non-operating-rule .receipt-message { grid-column: auto; }
}
.additional-import-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
}
.additional-import-menu[hidden] { display: none !important; }
.additional-import-menu button { min-height: 32px; }
.additional-import-menu button.active { border-color: #3478f6; color: #1859b9; background: #eef5ff; }
.import-reminder-board { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.import-reminder-board.status-blocked { border-color: #efc28e; background: #fffaf3; }
.import-reminder-board.status-incomplete { border-color: #ead6a8; background: #fffdf7; }
.import-reminder-board.status-tracking { border-color: #b9cce8; background: #f7faff; }
.import-reminder-metrics { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); }
.import-reminder-metrics > div { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 11px; background: #fff; }
.import-reminder-metrics span { color: var(--muted); font-size: 11px; }
.import-reminder-metrics strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.import-reminder-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.import-reminder-next > div { display: grid; min-width: 0; gap: 3px; }
.import-reminder-next strong { font-size: 13px; }
.import-reminder-next span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.import-reminder-next button { flex: 0 0 auto; }
.import-plan-notice { min-height: 0; color: var(--muted); font-size: 12px; }
.import-plan-notice.warning { padding: 10px 12px; border-left: 3px solid #f4a261; background: #fff8ef; color: #8a4f0a; }
.import-privacy-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 11px; border: 1px solid #d9e6dd; border-radius: 7px; background: #f7fbf8; color: #446052; font-size: 11px; line-height: 1.5; }
.import-privacy-notice strong { color: #286542; white-space: nowrap; }
.batch-import-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px dashed #aebdce;
  border-radius: 8px;
  background: #f8fafc;
  outline: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.batch-import-zone:hover,
.batch-import-zone:focus-visible,
.batch-import-zone.drag-active {
  border-color: #3478f6;
  background: #f2f7ff;
  box-shadow: inset 0 0 0 1px rgba(52, 120, 246, .08);
}
.batch-import-zone-copy { display: grid; min-width: 0; gap: 4px; }
.batch-import-zone-copy strong { color: var(--ink); font-size: 14px; }
.batch-import-zone-copy span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.batch-import-zone > button { flex: 0 0 auto; min-height: 34px; }
.batch-import-dialog {
  width: min(1040px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(20, 28, 38, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 28, 38, .2);
}
.batch-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.batch-import-head h2 { margin: 0; font-size: 18px; }
.supplement-zone { flex-wrap: wrap; border-style: solid; background: #f7f9fc; }
.supplement-zone .batch-import-zone-copy { flex: 1 1 230px; }
.supplement-zone .batch-import-zone-copy strong { font-size: 16px; }
.supplement-zone .batch-import-zone-copy span { font-size: 13px; color: #536174; }
.supplement-month { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #334155; }
.supplement-month input { width: 156px; min-height: 38px; font-size: 15px; }
.supplement-dialog { display: flex; flex-direction: column; }
.supplement-dialog .batch-import-file-list { overflow-y: auto; min-height: 80px; flex: 1 1 auto; max-height: none; margin: 0; padding: 0 20px; }
.supplement-dialog .batch-import-head, .supplement-dialog .batch-import-actions { flex-shrink: 0; }
.supplement-notice { margin: 12px 20px; color: #4d5e73; font-size: 13px; line-height: 1.7; }
.supplement-file { padding: 16px 0; border-top: 1px solid #dde3eb; }
.supplement-file-heading { display: flex; align-items: flex-start; gap: 10px; }
.supplement-file-heading strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.supplement-file-heading input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.supplement-status { font-size: 13px; flex-shrink: 0; color: #485974; }
.supplement-status.status-ready, .supplement-status.status-imported { color: #1f7156; }
.supplement-status.status-blocked, .supplement-status.status-failed { color: #a24428; }
.supplement-destination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0 8px 28px; font-size: 14px; }
.supplement-destination select { min-width: 230px; max-width: 100%; height: 38px; font-size: 14px; color: #24334a; }
.supplement-destination select:disabled { opacity: 1; background: #f3f5f8; color: #334155; }
.supplement-evidence { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-left: 28px; font-size: 13px; color: #526076; }
.supplement-message { margin: 8px 0 0 28px; font-size: 13px; line-height: 1.6; color: #334155; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .supplement-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .supplement-file-heading { flex-wrap: wrap; }
  .supplement-status { margin-left: 28px; }
  .supplement-month { flex-wrap: wrap; }
}
.batch-import-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.batch-cost-scope {
  display: grid;
  grid-template-columns: max-content minmax(230px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 12px 20px 0;
  padding: 10px 12px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  background: #f7faff;
}
.batch-cost-scope > span { color: var(--ink); font-size: 12px; font-weight: 700; }
.batch-cost-scope select { width: 100%; min-width: 0; min-height: 34px; font-size: 12px; }
.batch-cost-scope small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.batch-import-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}
.batch-import-progress > div { display: grid; gap: 3px; padding: 10px 12px; background: #fafbfc; }
.batch-import-progress span { color: var(--muted); font-size: 10px; }
.batch-import-progress strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.batch-import-file-list { max-height: min(500px, calc(100vh - 270px)); overflow: auto; padding: 0 20px; }
.batch-import-file {
  display: grid;
  grid-template-columns: 22px minmax(240px, 1.4fr) minmax(210px, .8fr) 112px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.batch-import-file:first-child { border-top: 0; }
.batch-import-file-main { display: grid; min-width: 0; gap: 3px; }
.batch-import-file-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-import-file-main span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.batch-import-file-main small { color: #7a5a20; font-size: 10px; }
.batch-import-file-type { display: grid; gap: 6px; }
.batch-import-file-type select,
.batch-import-file-type input { width: 100%; min-width: 0; min-height: 32px; font-size: 11px; }
.batch-import-file-state { display: grid; justify-items: end; gap: 6px; }
.batch-import-file-state b { color: var(--muted); font-size: 11px; white-space: nowrap; }
.batch-import-file-state button { min-height: 28px; padding: 0 8px; font-size: 10px; }
.batch-import-file.status-ready .batch-import-file-state b,
.batch-import-file.status-imported .batch-import-file-state b { color: #248a3d; }
.batch-import-file.status-review .batch-import-file-state b,
.batch-import-file.status-password_required .batch-import-file-state b { color: #9a5b00; }
.batch-import-file.status-blocked .batch-import-file-state b,
.batch-import-file.status-failed .batch-import-file-state b { color: #c83228; }
.batch-import-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.batch-import-actions span { margin-right: auto; color: var(--muted); font-size: 11px; }
.import-plan-sections { display: grid; gap: 20px; }
.import-section-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
}
.import-section-jumps button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9e0e8;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.import-section-jumps button:first-child {
  border-color: #a7c7f7;
  background: #edf5ff;
  color: #145db8;
}
.import-section-jumps button:hover { background: #f4f7fb; }
.import-section-jumps + .import-plan-sections { padding-top: 4px; }
.import-plan-sections + .import-plan-settings { margin-top: 18px; }
.import-task-section { display: grid; gap: 0; }
.import-task-section-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; }
.import-task-section-head h3 { margin: 0; font-size: 14px; }
.import-task-section-head span { color: var(--muted); font-size: 11px; }
.import-task-row {
  display: grid;
  grid-template-columns: 22px minmax(180px, .8fr) minmax(220px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.import-task-row:hover { background: #f8fafc; }
.import-task-row.next-missing { background: #fff8ef; box-shadow: inset 3px 0 #d9822b; }
.import-task-state {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #b9c0ca;
  color: transparent;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
}
.import-task-row.complete .import-task-state { border-color: #248a3d; background: #248a3d; color: #fff; }
.import-task-row.missing .import-task-state { border-color: #d44b44; color: #d44b44; }
.import-task-row.warning .import-task-state { border-color: #d9822b; color: #b7620c; }
.import-task-row.pending .import-task-state { border-color: #8d96a3; color: #6c7480; }
.import-task-row.needs-attention { background: #fbfdff; }
.import-task-main { display: grid; gap: 3px; }
.import-task-main strong { font-size: 13px; }
.import-task-main strong em { margin-left: 6px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
.import-task-main span, .import-task-source { color: var(--muted); font-size: 11px; line-height: 1.45; }
.import-task-main .import-task-purpose { display: inline-flex; margin-right: 7px; padding: 1px 5px; border-radius: 4px; background: #eef2f7; color: #53606f; font-size: 9px; font-weight: 700; }
.import-task-main .import-task-attention { color: #966019; font-weight: 600; }
.import-task-source strong { color: var(--ink); font-weight: 600; }
.import-task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.import-task-action { min-width: 92px; }
.import-task-template { display: inline-flex; align-items: center; gap: 5px; min-width: 102px; color: #145db8; border-color: #b8cff1; background: #f7faff; }
.import-task-template:hover { border-color: #78a6e8; background: #edf5ff; }
.import-task-template > span:first-child { font-size: 15px; line-height: 1; }
.import-task-file-kind { color: #727b87; font-size: 10px; }
.import-task-collapsible { border-top: 1px solid var(--line); }
.import-task-collapsible > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; cursor: pointer; list-style: none; }
.import-task-collapsible > summary::-webkit-details-marker { display: none; }
.import-task-collapsible > summary > span { display: grid; gap: 2px; }
.import-task-collapsible > summary strong { color: var(--ink); font-size: 13px; }
.import-task-collapsible > summary small,
.import-task-collapsible > summary em { color: var(--muted); font-size: 10px; font-style: normal; }
.import-task-collapsible > summary::after { content: "+"; margin-left: 10px; color: var(--accent); font-size: 18px; font-weight: 400; }
.import-task-collapsible[open] > summary::after { content: "−"; }
.import-task-collapsible-body { display: grid; }
.import-month-warning { padding: 9px 10px; border-left: 3px solid #d9822b; background: #fff8ef; color: #8a4f0a; }
.global-store-rank-main small b { color: #b7620c; font-weight: 600; }
.historical-import-group { margin-top: 10px; border-top: 1px solid var(--line); }
.historical-import-group summary { padding: 12px 4px; color: var(--muted); font-size: 12px; cursor: pointer; }

@media (max-width: 1120px) {
  .import-plan-settings { grid-template-columns: 1fr; align-items: start; }
  .import-plan-settings > div:first-child { grid-column: auto; }
  .import-task-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .import-task-source { grid-column: 2 / -1; grid-row: 2; padding-bottom: 10px; }
  .import-task-actions { grid-column: 3; grid-row: 1; }
  .import-reminder-metrics { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .batch-cost-scope { grid-template-columns: max-content minmax(220px, 1fr); }
  .batch-cost-scope small { grid-column: 1 / -1; }
  .batch-import-file { grid-template-columns: 22px minmax(200px, 1fr) minmax(180px, .8fr); }
  .batch-import-file-state { grid-column: 2 / -1; grid-row: 2; display: flex; justify-content: flex-end; }
}

.overview-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}
.data-health-surface, .local-reminder-surface { min-width: 0; }
.data-health-surface .section-head > strong { font-size: 24px; }
.health-score-track, .aging-bucket-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9e9ee;
}
.health-score-track b, .aging-bucket-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}
.health-score-track b[data-grade="excellent"] { background: #248a3d; }
.health-score-track b[data-grade="good"] { background: #007aff; }
.health-score-track b[data-grade="warning"] { background: #d9822b; }
.health-score-track b[data-grade="danger"] { background: #d70015; }
.health-score-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.health-score-meta span { font-weight: 750; }
.health-score-meta em { color: var(--muted); font-size: 11px; font-style: normal; text-align: right; }
.profit-confidence-band {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) repeat(3, minmax(86px, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.profit-confidence-band > div { min-width: 0; padding: 10px 12px; border-left: 1px solid var(--line); }
.profit-confidence-band > div:first-child { padding-left: 0; border-left: 0; }
.profit-confidence-band span, .profit-confidence-band strong { display: block; }
.profit-confidence-band span { color: var(--muted); font-size: 11px; }
.profit-confidence-band strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; }
.reconcile-confirmed { color: #248a3d; }
.reconcile-review { color: #9a5b12; }
.reconcile-blocked { color: var(--bad); }
.reconcile-waiting, .reconcile-not_applicable { color: var(--muted); }
.health-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.health-metric-grid div { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fafafa; }
.health-metric-grid span, .health-metric-grid strong { display: block; }
.health-metric-grid span { color: var(--muted); font-size: 11px; }
.health-metric-grid strong { margin-top: 5px; font-size: 15px; }
.accounting-reconciliation-list { margin: 14px 0 0; padding: 0; list-style: none; }
.accounting-reconciliation-list li {
  display: grid;
  grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #ededf0;
  font-size: 12px;
}
.accounting-reconciliation-list span { color: var(--muted); line-height: 1.45; }
.health-deduction-list, .local-reminder-list { margin: 14px 0 0; padding: 0; list-style: none; }
.health-deduction-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #ededf0; font-size: 12px; }
.health-deduction-list strong { color: var(--bad); }
.local-reminder-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0 11px 12px; border-top: 1px solid #ededf0; border-left: 3px solid #d9822b; }
.local-reminder-list li:first-child { border-top-color: transparent; }
.local-reminder-list li.reminder-high { border-left-color: var(--bad); }
.local-reminder-list li.reminder-medium { border-left-color: #d9822b; }
.local-reminder-list li > div { display: grid; gap: 4px; min-width: 0; }
.local-reminder-list li span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.local-reminder-list button { flex: none; min-height: 30px; padding: 0 10px; border-radius: 6px; background: #edf6ff; color: #1859b9; font-size: 11px; font-weight: 700; }

.receivable-aging-surface { display: grid; gap: 16px; }
.aging-summary-band { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.receivable-forecast-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.receivable-forecast-model { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.receivable-forecast-model > div { min-width: 0; }
.receivable-forecast-model strong, .receivable-forecast-model span { display: block; }
.receivable-forecast-model strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.receivable-forecast-model span, .receivable-forecast-model small { color: var(--muted); font-size: 10px; }
.receivable-forecast-model b { color: #245fae; font-size: 14px; font-variant-numeric: tabular-nums; }
.receivable-forecast-model small { grid-column: 1 / -1; }
.receivable-forecast-model.is-insufficient b { color: var(--muted); }
.forecast-empty { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.aging-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }
.aging-bucket-list { display: grid; gap: 12px; }
.aging-bucket-row { display: grid; gap: 6px; }
.aging-bucket-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.aging-bucket-row span { color: var(--muted); }
.aging-bucket-track { height: 6px; }
.aging-bucket-track b { background: #d9822b; }
.aging-month-wrap { max-height: 250px; }
.tag-overdue { background: #fff0f0 !important; color: var(--bad) !important; }
.variance-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.variance-summary-band > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.variance-summary-band > div:last-child { border-right: 0; }
.variance-summary-band span, .variance-summary-band strong { display: block; }
.variance-summary-band span { color: var(--muted); font-size: 11px; }
.variance-summary-band strong { margin-top: 5px; font-size: 17px; }
.variance-table-wrap { max-height: 440px; }

.taobao-voucher-surface { display: grid; gap: 16px; }
.import-voucher-config {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.import-voucher-head { margin: 0; }
.import-voucher-head h2 { font-size: 15px; }
.import-voucher-head > span { color: #2463c7; font-size: 12px; font-weight: 700; }
.voucher-rule-warning { color: var(--bad) !important; font-weight: 700; }
.voucher-summary-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.voucher-summary-band > div { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--line); }
.voucher-summary-band > div:last-child { border-right: 0; }
.voucher-summary-band span, .voucher-summary-band strong { display: block; }
.voucher-summary-band span { color: var(--muted); font-size: 11px; }
.voucher-summary-band strong { margin-top: 5px; font-size: 17px; font-variant-numeric: tabular-nums; }
.voucher-month-plan { display: grid; gap: 12px; }
.voucher-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.voucher-plan-toolbar > div { min-width: 0; }
.voucher-plan-toolbar strong, .voucher-plan-toolbar span { display: block; }
.voucher-plan-toolbar strong { color: var(--ink); font-size: 14px; }
.voucher-plan-toolbar span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.voucher-rule-actions { display: flex; gap: 8px; align-items: center; }
.voucher-rule-list { display: grid; gap: 8px; }
.voucher-rule-row {
  display: grid;
  grid-template-columns: 30px 88px 20px 88px minmax(210px, 1fr) minmax(180px, .8fr) auto;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.voucher-rule-row label { display: grid; gap: 5px; min-width: 0; }
.voucher-rule-row label > span { color: var(--muted); font-size: 10px; }
.voucher-rule-row input, .voucher-rule-row select { width: 100%; min-width: 0; }
.voucher-rule-sequence {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #eef3f8;
  color: #456070;
  font-size: 11px;
  font-weight: 700;
}
.voucher-date-arrow { align-self: center; margin-bottom: 7px; color: var(--muted); font-size: 11px; text-align: center; }
.voucher-note, .voucher-estimate-note { color: #45634f !important; }

@media (max-width: 1180px) {
  .overview-insight-grid, .aging-layout { grid-template-columns: 1fr; }
  .health-metric-grid, .variance-summary-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profit-confidence-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profit-confidence-band > div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .profit-confidence-band > div:nth-child(4) { border-top: 1px solid var(--line); }
  .variance-summary-band > div:nth-child(2) { border-right: 0; }
  .voucher-summary-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .voucher-rule-row { grid-template-columns: 30px minmax(90px, .6fr) 20px minmax(90px, .6fr) minmax(190px, 1fr); }
  .voucher-note-field { grid-column: 2 / 5; }
  .remove-voucher-rule-row { grid-column: 5; }
  .voucher-rule-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* 2026-08 iOS-style visual refresh: quieter hierarchy, denser work surfaces. */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --ink: #17191d;
  --muted: #515a66;
  --line: #d9dde4;
  --accent: #0a7aff;
  --accent-2: #2e7d58;
  --warn: #a65316;
  --bad: #c63b3b;
  --good: #2b7a4b;
  --profit: #c73535;
  --loss: #27804a;
  --soft: #edf5ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
}

html { background: var(--bg); }
body {
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar {
  gap: 12px;
  padding: 18px 12px 14px;
  border-right-color: rgba(60, 60, 67, 0.12);
  background: rgba(249, 249, 251, 0.96);
}
.brand { gap: 10px; padding: 0 3px 2px; }
.brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13); }
.brand strong { font-size: 15px; }
.brand span { margin-top: 2px; color: #68717d; font-size: 11px; }

.account-summary,
.store-switcher {
  border-color: rgba(60, 60, 67, 0.11);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}
.account-summary { gap: 7px; padding: 10px; }
.account-avatar { width: 28px; height: 28px; flex-basis: 28px; background: #edf4ff; color: #2464ac; }
.account-summary-main strong { font-size: 14px; }
.account-summary-main span,
.account-summary-meta { font-size: 11px; }
.account-summary-actions button { min-height: 27px; border-color: transparent; background: #f0f0f3; }

.global-nav {
  min-height: 50px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #3a3a3c;
  text-align: left;
}
.global-nav:hover { background: rgba(118, 118, 128, 0.08); }
.global-nav.active {
  background: rgba(10, 122, 255, 0.11);
  color: #0568d7;
  box-shadow: inset 3px 0 #0a7aff;
}
.global-nav.active small { color: #5b7ea8; }
.global-nav span { font-size: 14px; }
.global-nav small { font-size: 12px; }

.store-switcher { gap: 9px; padding: 11px; }
.store-switcher-title { font-size: 13px; }
.store-switcher label { color: #626b76; font-size: 12px; }
.store-status { font-size: 11px; }
.store-switcher select { height: 34px; border-color: transparent; background: #f0f0f3; }
.store-account-button { min-height: 32px; border-color: transparent; background: #f0f0f3; font-size: 12px; }
.store-account-button:hover:not(:disabled) { border-color: transparent; background: #e7f1ff; }
.nav-group-label { padding: 1px 10px 0; color: #737b86; font-size: 11px; }
nav { gap: 2px; }
.nav-item { min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.nav-item.active {
  background: rgba(10, 122, 255, 0.11);
  color: #0568d7;
  box-shadow: inset 3px 0 #0a7aff;
}

main { padding: 20px 22px 28px; }
.topbar {
  min-height: 82px;
  margin: -20px -22px 16px;
  padding: 15px 22px 13px;
  border-bottom-color: rgba(60, 60, 67, 0.1);
  background: rgba(245, 245, 247, 0.88);
}
.topbar > div:first-child { min-width: 0; flex: 1 1 auto; }
h1 {
  overflow: hidden;
  max-width: 100%;
  font-size: 24px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
h2 { font-size: 17px; }
.topbar p { overflow: hidden; margin-top: 3px; color: #626b76; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { flex: 0 0 auto; gap: 7px; }
.month-picker-label { gap: 3px; font-size: 11px; }
.month-picker-label select { width: 146px; height: 38px; border-color: rgba(60, 60, 67, 0.14); font-size: 13px; }
.month-add-button { min-width: 96px; height: 38px; }
.toolbar > .secondary,
.toolbar > .primary { height: 38px; padding: 0 12px; font-size: 12px; }

.primary,
.secondary,
.danger-secondary { border-radius: 7px; }
.primary { background: #0a7aff; box-shadow: 0 1px 2px rgba(10, 122, 255, 0.16); }
.primary:hover { background: #006fe8; }
.secondary { border: 1px solid transparent; background: #ececf0; }
.secondary:hover { background: #e2e2e7; }
select,
input[type="file"] { border-color: rgba(60, 60, 67, 0.16); border-radius: 7px; }

.metric,
.surface {
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.surface { padding: 16px 18px; }
.section-head { gap: 10px; margin-bottom: 13px; }
.section-note { margin-top: 3px; color: #626b76; font-size: 12px; }
.section-head > span { color: #626b76; font-size: 12px; }
.panel.active { animation: panel-in 150ms ease-out; }
@keyframes panel-in {
  from { opacity: 0.72; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* All-store overview */
#globalOverview { padding-bottom: 12px; }
#globalOverview .surface {
  border-color: #d9dee6;
  box-shadow: 0 3px 12px rgba(25, 35, 48, 0.045);
}
.global-overview-module { margin-top: 28px; }
.global-overview-module:first-child { margin-top: 0; }
.global-module-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  margin-bottom: 11px;
  padding: 0 3px 10px;
  border-bottom: 1px solid #d4d9e1;
}
.global-module-head > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}
.global-module-head > div > span {
  flex: 0 0 auto;
  padding-left: 9px;
  border-left: 4px solid #2878d0;
  color: #2467ae;
  font-size: 12px;
  font-weight: 800;
}
.global-module-head h2 {
  overflow: hidden;
  color: #17191d;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-module-head p {
  max-width: 52%;
  color: #515a66;
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}
.global-overview-hero {
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.62fr);
  gap: 0;
  min-height: 232px;
  padding: 0;
  overflow: hidden;
}
.global-profit-focus {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 27px 28px 30px;
  border-right-color: #d9dee6;
  background: #f7f9fc;
}
.global-profit-focus::before { top: 0; bottom: 0; width: 5px; border-radius: 0; background: #2878d0; }
.global-profit-focus.is-profit::before { background: var(--profit); }
.global-profit-focus.is-loss::before { background: var(--loss); }
.global-profit-focus strong { margin: 12px 0 7px; font-size: 36px; line-height: 1.12; white-space: nowrap; }
.global-profit-focus span,
.global-profit-focus em { color: #4f5864; font-size: 13px; }
.global-profit-focus span { font-weight: 720; }
.global-profit-focus em { font-weight: 650; }
.global-dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; }
.global-dashboard-kpi-grid .dashboard-kpi { min-height: 116px; padding: 17px 17px 14px; border-color: #e0e4ea; }
.global-dashboard-kpi-grid .dashboard-kpi:nth-child(3n) { border-right: 0; }
.global-dashboard-kpi-grid .dashboard-kpi:nth-last-child(-n+3) { border-bottom: 0; }
.global-dashboard-kpi-grid .dashboard-kpi:nth-child(1) { background: #f8fbff; }
.global-dashboard-kpi-grid .dashboard-kpi:nth-child(2) { background: #f7fbf9; }
.global-dashboard-kpi-grid .dashboard-kpi-alert { background: #fffaf2; }
.dashboard-kpi-alert strong { color: #87550d; }
.dashboard-kpi strong { margin: 8px 0 5px; font-size: 21px; line-height: 1.15; }
.dashboard-kpi span { font-size: 13px; }
.dashboard-kpi em { font-size: 12px; }
.dashboard-kpi span { color: #4b5561; font-weight: 750; }
.global-dashboard-kpi-grid .dashboard-kpi em {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: #59636f;
  line-height: 1.4;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dashboard-secondary-strip { margin-top: 12px; }
.dashboard-secondary-strip > div { padding: 14px 17px; }
.dashboard-secondary-strip span,
.dashboard-secondary-strip em { color: #626b76; font-size: 12px; }
.dashboard-secondary-strip span { font-size: 13px; font-weight: 700; }
.global-dashboard-secondary-strip em {
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}
.dashboard-secondary-strip strong { margin: 7px 0 4px; font-size: 19px; }

.global-breakdown-grid { grid-template-columns: minmax(300px, 0.78fr) minmax(460px, 1.22fr); gap: 14px; margin-top: 0; }
.global-breakdown-surface { padding: 18px 20px 12px; }
.global-platform-surface { border-top: 3px solid #3478c9 !important; }
.global-mode-surface { border-top: 3px solid #39806d !important; }
.global-breakdown-surface .section-head h2 { font-size: 17px; }
.global-breakdown-total { padding: 2px 0 13px; }
.global-breakdown-total span { color: #59616c; font-size: 12px; font-weight: 700; }
.global-breakdown-total strong { font-size: 23px; }
.global-breakdown-legend { max-height: 360px; overflow: auto; }
.global-breakdown-legend li { min-height: 64px; }
.global-breakdown-legend strong { font-size: 14px; }
.global-breakdown-legend span { color: #626b76; font-size: 12px; }
.global-breakdown-legend em { font-size: 14px; }
.global-breakdown-track { height: 6px; margin-top: 8px; }
.global-operating-surface,
.global-close-readiness-surface,
.global-store-ranking-surface { margin-top: 12px; }
.global-operating-surface { background: #fbfcfd; }
.global-operating-focus > div { padding: 16px 18px; }
.global-operating-focus span,
.global-operating-focus em { color: #626b76; font-size: 12px; }
.global-operating-focus span { font-weight: 700; }
.global-operating-focus strong { margin: 8px 0 5px; font-size: 20px; }
.global-close-readiness-surface { border-left: 4px solid #cb8b2c !important; }
.global-close-readiness-surface.is-ready { border-left-color: #338059 !important; }
.global-close-readiness-surface .section-head h2,
.global-store-ranking-surface .section-head h2 { font-size: 18px; }
#globalCloseReadinessSummary { color: #7b5319; font-weight: 750; }
.global-close-readiness-surface.is-ready #globalCloseReadinessSummary { color: #2b724d; }
.global-close-readiness-counts { margin: 12px 0 0; border-color: #dce1e8; background: #f8f9fb; }
.global-close-readiness-counts > div { padding: 13px 15px; }
.global-close-readiness-counts > div:nth-child(2) { background: #f3faf6; }
.global-close-readiness-counts > div:nth-child(3) { background: #fff9ef; }
.global-close-readiness-counts span { color: #59616c; font-size: 12px; font-weight: 700; }
.global-close-readiness-counts strong { font-size: 22px; }
.global-close-readiness-list { max-height: 350px; margin-top: 10px; overflow: auto; }
.global-close-readiness-row { min-height: 68px; }
.global-close-readiness-store strong { font-size: 14px; }
.global-close-readiness-store span,
.global-close-readiness-detail { color: #59636f; font-size: 13px; }
.global-close-status { min-height: 28px; padding: 5px 10px; font-size: 12px; }
.global-close-readiness-row button { font-size: 12px; }
.global-store-ranking { max-height: 430px; overflow: auto; }
.global-store-rank-row { min-height: 78px; }
.global-store-rank-main > div:first-child > strong { font-size: 14px; }
.global-store-profit-track { height: 6px; margin: 8px 0 6px; }
.global-store-rank-main small { color: #59636f; font-size: 12px; }
.global-store-rank { width: 28px; height: 28px; border-radius: 7px; color: #59616c; font-size: 13px; }
.global-store-rank-profit span,
.global-store-rank-profit em { color: #626b76; font-size: 12px; }
.global-store-rank-profit strong { font-size: 19px; }
.platform-badge { font-size: 11px; }
.store-detail-button { min-height: 30px; font-size: 12px; }

/* Store overview */
.core-profit-tracker { padding: 16px 18px 0; }
.core-section-head { margin-bottom: 13px; }
.core-profit-grid { grid-template-columns: 1.15fr 1fr 1fr; }
.core-profit-item { padding: 16px 18px; }
.core-profit-item.is-latest { order: -1; background: #f3f8ff; }
.core-profit-item strong { margin: 8px 0 5px; font-size: 25px; }
.core-profit-foot > div { min-height: 44px; padding: 0 18px; }
.core-tracking-grid { gap: 12px; margin-top: 12px; }
.core-order-tracker,
.core-receivable-tracker,
.core-risk-tracker { padding: 16px 18px; }
.core-risk-tracker { margin-top: 12px; }
.core-order-counts > div { padding: 10px; }
.core-close-state { min-height: 62px; padding: 12px 0; }
.core-receivable-type-row { min-height: 52px; }
.core-risk-grid button { min-height: 78px; padding: 12px 15px; }
.core-risk-grid strong { margin: 5px 0 3px; font-size: 20px; }
.core-progress-track { height: 7px; }

/* Import center */
.import-layout { gap: 12px; margin-top: 12px; }
.import-plan-surface { gap: 14px; }
.import-plan-settings { gap: 14px; padding: 13px 0; }
.import-reminder-board { gap: 8px; padding: 10px; background: #fafbfc; }
.import-reminder-board.status-blocked,
.import-reminder-board.status-incomplete { background: #fffbf4; }
.import-reminder-metrics > div { min-height: 38px; }
.import-reminder-metrics strong { font-size: 15px; }
.import-mode-option { min-height: 32px; padding: 6px 9px; background: #fafafa; }
.import-mode-option:has(input:checked) { background: #edf5ff; }
.import-plan-sections { gap: 16px; }
.import-task-row { min-height: 56px; }
.import-task-row:hover { background: #f6f8fb; }
.import-task-row.next-missing { background: #fff9ef; box-shadow: inset 3px 0 #ca7a28; }
.import-task-action { min-width: 82px; min-height: 32px; }
.import-privacy-notice { padding: 8px 10px; border-color: #dce8e1; background: #f8fbf9; }
.advanced-import-surface { box-shadow: none; }
.additional-import-menu { padding: 10px; background: #f7f7f9; }

/* Orders and tables */
#orders .section-head {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: start;
}
#orders .section-head > h2 { padding-top: 7px; white-space: nowrap; }
.table-controls { gap: 6px; padding: 7px; border-radius: 8px; background: #f5f5f7; }
.order-search { width: 176px; border-color: transparent; background: #fff; }
.filter-trigger,
.sort-select { border-color: transparent; background: #fff; }
.filter-trigger { min-width: 110px; }
.filter-apply-button,
.filter-clear-button { min-width: 56px; }
.table-wrap { scrollbar-color: #c7c7cc transparent; }
table { font-size: 12px; }
th,
td { padding: 10px 9px; border-bottom-color: #e8e8ec; }
th { background: #f7f7f9; color: #5d5d66; font-size: 11px; font-weight: 700; }
tbody tr:hover td { background: #f7faff; }
#orders .sticky-profit-estimated { right: 106px; width: 106px; min-width: 106px; max-width: 106px; }
#orders .sticky-profit-final { width: 106px; min-width: 106px; max-width: 106px; }
#orders th.sticky-profit { background: #eef4fb; }
.order-pagination { min-height: 38px; }
.order-profit-reconcile > div { padding: 9px 11px; }
.order-profit-reconcile strong { font-size: 15px; }
.order-summary > div { min-width: 112px; padding: 9px 11px; }
.order-summary strong { font-size: 14px; }
.tag { min-height: 22px; padding: 0 7px; border-radius: 6px; }

/* The order ledger is the main audit surface: keep it dense, but never faint. */
#orders .table-wrap {
  border-top: 1px solid #cfd5dd;
  background: #fff;
}
#orders table {
  color: #252a31;
  font-size: 13px;
}
#orders th,
#orders td {
  padding: 11px 10px;
  border-bottom-color: #dfe3e8;
}
#orders th {
  background: #f1f3f6;
  color: #353c46;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}
#orders tbody td {
  color: #292e35;
  font-weight: 520;
  line-height: 1.45;
}
#orders tbody td:nth-child(4),
#orders tbody td:nth-child(5),
#orders .order-id-text {
  color: #1f242b;
  font-weight: 650;
}
#orders td.money,
#orders .quantity-cell {
  font-weight: 650;
}
#orders .positive { color: #b4232f; }
#orders .negative { color: #167844; }
#orders .muted { color: #59616c; }
#orders tbody tr:hover td { background: #edf5ff; }
#orders .tag {
  min-height: 24px;
  padding: 0 8px;
  color: #176347;
  font-size: 12px;
  font-weight: 750;
}
#orders .tag.warn { color: #904a10; }
#orders .order-status-secondary,
#orders .estimate-note,
#orders .pending-fee-note,
#orders .appeal-recovery-note,
#orders .profit-alert-note {
  color: #505965;
  font-size: 12px;
  line-height: 1.45;
}
#orders .pending-fee-note,
#orders .estimate-note,
#orders .profit-alert-note { color: #87501c; }
#orders .appeal-recovery-note { color: #166b40; }
#orders .refund-status-label { color: #7b4b12; }
#orders .sticky-profit {
  font-size: 13px;
  font-weight: 800;
}
#orders th.sticky-profit { background: #e8eff8; }
#orders .sticky-profit .estimate-note,
#orders .sticky-profit .profit-alert-note {
  display: block;
  margin: 3px 0 0;
  font-size: 11px;
}
#orders .cost-source-tooltip {
  color: #343b45;
  font-size: 12px;
}
#orders .order-pagination {
  color: #4f5864;
  font-size: 13px;
}
#orders .order-summary span,
#orders .order-summary em { color: #505965; font-size: 12px; }
#orders .order-summary strong { color: #20252c; font-size: 15px; }

/* Fees, receivables and exceptions */
.fee-summary-band,
.overview-fee-strip,
.receivable-control-grid,
.receivable-summary-band,
.receipt-reconciliation,
.exception-summary { border-color: rgba(60, 60, 67, 0.09); background: var(--line); }
.fee-summary-band > div,
.overview-fee-strip > div,
.receivable-control-grid > div,
.receivable-summary-band > div,
.receipt-reconciliation > div,
.exception-summary-item { background: #fbfbfc; }
.receivable-control-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.receivable-control-grid > div { padding: 13px 14px; }
.receivable-control-grid strong { font-size: 18px; }
.receivable-control-grid > div:last-child:nth-child(3n + 1) {
  grid-column: 1 / -1;
  background: #fffaf3;
}
.receivable-summary-band > div { padding: 13px 14px; }
.receivable-summary-band strong { font-size: 19px; }
.fee-bar-track { height: 8px; }
.exception-summary { margin-bottom: 10px; }
.exception-summary-item { min-height: 46px; }
.exception-list { gap: 0; border-top: 1px solid var(--line); }
.exception-item,
.exception-item.profit-alert {
  min-height: 66px;
  padding: 12px 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: inset 2px 0 #d98767;
}
.exception-item.profit-alert { box-shadow: inset 2px 0 #d39a37; }
.exception-item:hover,
.exception-item.profit-alert:hover { border-color: var(--line); background: #fffaf5; }
.exception-item strong { color: #a4472c; }
.exception-item.profit-alert strong { color: #8e641c; }
.follow-up-reminder-surface { box-shadow: none; }

.toast { border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.modal-backdrop { background: rgba(30, 30, 35, 0.34); backdrop-filter: blur(5px); }
.store-modal { box-shadow: 0 18px 48px rgba(16, 24, 40, 0.2); }

/* 2026-09 import workflow and shared command bar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.month-toolbar-group,
.toolbar-command-group {
  display: flex;
  align-items: center;
  gap: 7px;
}
.toolbar-command-group {
  padding-left: 11px;
  border-left: 1px solid rgba(60, 60, 67, 0.12);
}
.month-picker-label {
  display: flex;
  align-items: center;
  height: 40px;
  gap: 8px;
  padding: 0 7px 0 11px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #77777d;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(20, 27, 35, 0.035);
}
.month-picker-label select {
  width: 118px;
  height: 38px;
  padding: 0 26px 0 4px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}
.month-picker-label select:focus-visible { outline-offset: -2px; }
.toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  gap: 6px;
  padding: 0 13px;
  font-size: 13px;
  white-space: nowrap;
}
.toolbar button > span[aria-hidden="true"] {
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
.month-add-button {
  align-self: center;
  min-width: 108px;
  height: 40px;
}
.topbar {
  min-height: 78px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.import-outcome-dialog {
  width: min(650px, calc(100vw - 40px));
  overflow: hidden;
  border: 1px solid rgba(20, 28, 38, 0.11);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 28, 38, 0.22);
}
.import-outcome-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.import-outcome-head > div { min-width: 0; }
.import-outcome-head > div > span {
  display: block;
  margin-bottom: 5px;
  color: #58708d;
  font-size: 10px;
  font-weight: 750;
}
.import-outcome-head h2 { font-size: 19px; }
.import-outcome-head p {
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#importOutcomeBody { padding: 18px 22px 8px; }
.import-outcome-review {
  margin: 4px 20px 0;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}
.batch-import-dialog.has-review .batch-import-file-list { max-height: 230px; }
.import-outcome-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}
.import-outcome-metrics > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #fafbfc;
}
.import-outcome-metrics span { color: var(--muted); font-size: 10px; }
.import-outcome-metrics strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.import-outcome-metrics strong.attention { color: #b54a3c; }
.import-outcome-metrics strong.resolved { color: #267447; }
.import-outcome-status {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid #7991ad;
  background: #f5f8fb;
}
.import-outcome-status strong { font-size: 13px; }
.import-outcome-status span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.import-outcome-status.status-alert { border-left-color: #c45648; background: #fff7f5; }
.import-outcome-status.status-warning { border-left-color: #d08a31; background: #fffaf2; }
.import-outcome-status.status-clear { border-left-color: #3c8b5c; background: #f3faf5; }
.import-outcome-groups { margin-top: 13px; }
.import-outcome-groups > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.import-outcome-groups ul { display: grid; margin: 7px 0 0; padding: 0; list-style: none; }
.import-outcome-groups li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  border-top: 1px solid rgba(60, 60, 67, 0.09);
  font-size: 11px;
}
.import-outcome-groups li:first-child { border-top: 0; }
.import-outcome-groups b { font-weight: 600; }
.import-outcome-groups em { color: #a2493e; font-style: normal; font-weight: 750; }
.import-outcome-notice {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #ead8ad;
  border-radius: 7px;
  background: #fffdf7;
}
.import-outcome-notice strong { color: #7e5c20; font-size: 11px; }
.import-outcome-notice span { color: #786b55; font-size: 10px; line-height: 1.45; }
.import-outcome-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 18px;
}

.import-plan-surface {
  border-color: rgba(60, 60, 67, 0.09);
  box-shadow: 0 3px 14px rgba(22, 31, 43, 0.045);
}
.import-plan-head { padding-bottom: 2px; }
.batch-import-zone { background: #f7f9fc; }
.import-task-section-head {
  min-height: 34px;
  align-items: center;
  padding: 0 2px 8px;
}
.import-task-row { padding-right: 3px; padding-left: 3px; }
.import-task-actions button { font-weight: 650; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 236px minmax(0, 1fr); }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  main { padding-right: 18px; padding-left: 18px; }
  .topbar { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .toolbar { gap: 8px; }
  .month-picker-label select { width: 108px; }
  .month-add-button { min-width: 98px; }
  .global-dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-dashboard-kpi-grid .dashboard-kpi:nth-child(3n) { border-right: 1px solid var(--line); }
  .global-dashboard-kpi-grid .dashboard-kpi:nth-child(2n) { border-right: 0; }
  .global-dashboard-kpi-grid .dashboard-kpi:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .global-dashboard-kpi-grid .dashboard-kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .global-breakdown-grid { grid-template-columns: 1fr; }
  .core-tracking-grid { grid-template-columns: 1fr; }
  #orders .section-head { grid-template-columns: 1fr; }
  #orders .section-head > h2 { padding-top: 0; }
  .table-controls { justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .topbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .toolbar { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-areas:
      "brand brand"
      "account store"
      "global store"
      "label label"
      "nav nav";
    grid-template-columns: minmax(180px, 0.65fr) minmax(320px, 1.35fr);
    height: auto;
    padding: 14px 16px;
  }
  .brand { grid-area: brand; max-width: 260px; }
  .account-summary { grid-area: account; }
  .global-nav { grid-area: global; }
  .store-switcher { grid-area: store; }
  .nav-group-label { grid-area: label; }
  .sidebar > nav { grid-area: nav; }
  .account-summary,
  .store-switcher { max-width: none; }
  .sidebar > nav { grid-template-columns: repeat(7, minmax(90px, 1fr)); }
  .nav-item { text-align: center; }
  .nav-item.active { box-shadow: inset 0 -3px #0a7aff; }
  .topbar { min-height: 0; align-items: flex-start; }
  .toolbar { width: 100%; flex-wrap: wrap; }
  .global-overview-hero { grid-template-columns: 1fr; }
  .global-profit-focus { border-right: 0; border-bottom: 1px solid var(--line); }
  .core-profit-grid { grid-template-columns: 1fr; }
  .core-profit-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .core-profit-item:last-child { border-bottom: 0; }
  .receivable-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .sidebar {
    grid-template-areas: "brand" "account" "global" "store" "label" "nav";
    grid-template-columns: 1fr;
  }
  .sidebar > nav { grid-template-columns: repeat(4, minmax(82px, 1fr)); }
  .batch-import-zone { align-items: stretch; flex-direction: column; }
  .batch-cost-scope { grid-template-columns: 1fr; }
  .batch-cost-scope small { grid-column: auto; }
  .batch-import-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-import-file { grid-template-columns: 22px minmax(0, 1fr); }
  .batch-import-file-type,
  .batch-import-file-state { grid-column: 2; }
  .batch-import-actions { align-items: stretch; flex-direction: column; }
  .batch-import-actions span { margin-right: 0; }
  .global-module-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .global-module-head p { max-width: none; text-align: left; }
  .global-module-head > div { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* September workbench: blue-gray navigation, white ledger and red pending count. */
:root { --bg: #f2f5f8; --ink: #202f43; --muted: #596a7d; --line: #dce4ed; --soft: #eaf2fb; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.sidebar { background: #eaf0f6; border-right: 1px solid #d5dfeb; }
.brand { padding: 1px 5px 8px; }
.brand strong { color: #19344f; letter-spacing: .3px; }
.store-switcher { border-color: #d4dfeb; background: #f9fbfe; border-radius: 12px; }
.store-switcher select { background: #edf2f8; border: 1px solid #dbe3ed; }
.nav-group-label { font-weight: 700; letter-spacing: .7px; }
.sidebar nav { gap: 5px; }
.sidebar nav .nav-item { min-height: 43px; color: #42566d; font-weight: 600; }
.sidebar .nav-item:hover { background: #dce8f5; }
.sidebar .nav-item.active { color: #1557a0; background: #d6e6f8; box-shadow: inset 3px 0 #2878ca; }
#exceptionsNav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-unresolved-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #e63946; color: #fff; font: 700 12px/1 -apple-system, BlinkMacSystemFont, sans-serif; box-shadow: 0 0 0 2px #f8fbff; font-variant-numeric: tabular-nums; }
.topbar { background: rgba(248,250,253,.96); border-bottom: 1px solid #dce4ed; }
h1, h2, h3 { color: #203951; }
.surface { border-radius: 12px; border-color: #dce4ed; box-shadow: 0 2px 7px rgba(30,56,85,.035); }
button, select, input { transition: background-color .12s, border-color .12s; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #6da6e2; outline-offset: 2px; }
.table-wrap { border: 1px solid #e1e7ef; border-radius: 9px; }
thead th { background: #edf3f9; color: #435972; font-weight: 700; }
tbody tr:nth-child(even) { background: #fafcfe; }
tbody tr:hover { background: #edf5ff; }
.money, .dashboard-kpi strong, .core-profit-item strong, .global-profit-focus strong { font-variant-numeric: tabular-nums; }
.table-controls input, .table-controls select { min-height: 36px; }
#exceptions > .surface:first-child { border-top: 3px solid #e63946; }
#exceptions .section-head { align-items: flex-start; gap: 16px; }
#exceptionScopeLabel { margin-top: 7px; max-width: 440px; line-height: 1.6; }
.exception-summary { gap: 10px; }
.exception-summary-item { border: 1px solid #e1e7ef; border-radius: 9px; background: #f7faff; box-shadow: 0 1px 2px rgba(32,57,81,.03); }
.exception-summary-item:hover { border-color: #9cb8d4; background: #f1f7fd; }
.exception-summary-item.active { border-color: #397ac0; background: #eaf4ff; box-shadow: inset 0 0 0 1px rgba(57,122,192,.18); }
.exception-summary-item.active span { color: #244d75; }
.exception-summary-item.active span small { color: #397ac0; }
.exception-item { padding: 15px 14px; border: 1px solid #e2e8ef; border-radius: 9px; background: #fff; }
.exception-item em { color: #596a7d; line-height: 1.65; }
.batch-import-zone { border: 1px dashed #87a9cb; border-radius: 10px; background: #f0f6fd; }
.import-stage-card { border-radius: 10px; }
@media (max-width: 980px) { #exceptionsNav { justify-content: center; } .sidebar nav { gap: 5px; overflow-x: auto; } }
@media (prefers-reduced-motion: reduce) { button, select, input { transition: none; } }
/* Import settings remain compact, with native-sized controls. */
.serial-customer-field, .signup-estimation-field { margin-top: 12px; }
.serial-customer-field:not([hidden]) { display: grid; gap: 6px; }
.serial-customer-field select { width: 100%; min-height: 38px; font-size: 14px; }
.signup-estimation-field > label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.signup-estimation-field input { width: 16px; height: 16px; }

/* Monthly setup precedes file work on every platform. */
.import-plan-surface { gap: 0; }
.import-plan-surface.surface { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.import-plan-head { padding-bottom: 22px; margin-bottom: 0; }
.import-context-note { font-size: 13px; color: #586474; }
.month-picker-label select { width: 144px; min-width: 144px; flex: 0 0 144px; }
.import-settings-step { border-top: 1px solid #dce2e9; border-bottom: 1px solid #dce2e9; }
.import-step-heading { display: flex; align-items: center; gap: 14px; padding: 22px 0; list-style: none; }
summary.import-step-heading { cursor: pointer; }
summary.import-step-heading::-webkit-details-marker { display: none; }
.import-step-number { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #e9eff8; color: #265b9d; font-size: 15px; font-weight: 700; }
.import-step-copy { display: grid; gap: 6px; min-width: 0; flex: 1; }
.import-step-copy > strong { font-size: 19px; font-weight: 650; color: #1d2938; }
.import-step-copy > span { font-size: 13px; line-height: 1.65; color: #526173; overflow-wrap: anywhere; }
.import-settings-badge { flex-shrink: 0; font-size: 13px; font-weight: 600; color: #9c641c; }
.import-settings-badge.confirmed { color: #307467; }
.import-step-disclosure { color: #607085; font-size: 20px; transition: transform .15s ease; }
.import-settings-step[open] .import-step-disclosure { transform: rotate(180deg); }
.import-plan-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 0 6px; border: 0; }
.import-setting-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; align-items: start; padding: 23px 0; border-top: 1px solid #e8ecf0; }
.setting-title > .setting-label { font-size: 15px; font-weight: 650; color: #263343; margin: 2px 0 7px; }
.setting-title > small { display: block; color: #607085; line-height: 1.65; font-size: 12px; }
.setting-content { min-width: 0; }
.import-plan-settings .setting-hint { color: #526173; font-size: 13px; line-height: 1.7; max-width: none; }
.import-plan-settings .setting-label { color: #263343; font-size: 14px; }
.import-mode-options { gap: 10px 25px; align-items: center; }
.import-mode-option { border: 0; border-radius: 0; padding: 6px 0; background: transparent; color: #263343; font-size: 14px; white-space: normal; line-height: 1.6; }
.import-mode-option:has(input:checked) { background: transparent; color: #1d477c; }
.import-mode-option input { width: 17px; height: 17px; flex-shrink: 0; }
.cost-method-heading { margin-bottom: 9px; }
.cost-method-state { padding: 0; background: transparent; font-size: 12px; color: #526173; }
.segmented-control.cost-method-control button.active { background: #fff; color: #233b58; box-shadow: 0 1px 3px #1a30421a; }
.import-plan-settings .cost-method-state { border: 0; background: transparent; padding: 0; }
.segmented-control { max-width: 100%; gap: 2px; background: #edf0f4; padding: 4px; border-radius: 8px; }
.segmented-control button { min-height: 36px; min-width: 0; padding: 7px 16px; font-size: 14px; line-height: 1.4; white-space: normal; color: #536174; }
.segmented-control button.active { color: #233b58; background: #fff; box-shadow: 0 1px 3px #1a30421a; }
.segmented-control button:focus-visible, .import-mode-option:focus-within, .import-step-heading:focus-visible { outline: 2px solid #3273bc; outline-offset: 3px; }
.promotion-status-heading { display: flex; align-items: center; gap: 14px; }
.setting-status { color: #9c641c; font-size: 13px; }
.promotion-entry-panel { margin-top: 16px; padding-top: 16px; border-color: #e8ecf0; }
.promotion-config-block .manual-promotion-form { grid-template-columns: minmax(120px, .7fr) minmax(160px, 1fr) auto; }
.manual-promotion-form label { font-size: 13px; color: #465568; }
.serial-customer-field select { max-width: 540px; min-height: 40px; font-size: 14px; }
.signup-estimation-field { padding: 24px 26px; margin: 10px 0 22px; background: #f4f7f8; border-left: 3px solid #bcc9d2; }
.signup-estimation-field.is-enabled { background: #f1f7f5; border-left-color: #3b8274; }
.estimate-setting-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.estimate-eyebrow { color: #477064; font-size: 12px; font-weight: 650; }
.estimate-setting-heading h3 { color: #20362e; font-size: 19px; margin: 7px 0; }
.estimate-setting-heading p { margin: 0; color: #52655e; font-size: 14px; line-height: 1.65; }
.settings-switch { display: inline-flex; align-items: center; gap: 10px; position: relative; cursor: pointer; flex-shrink: 0; font-size: 13px; color: #465568; }
.settings-switch input { position: absolute; right: 0; width: 44px; height: 26px; margin: 0; opacity: 0; cursor: pointer; }
.settings-switch-track { width: 44px; height: 26px; border-radius: 13px; background: #bec8ce; pointer-events: none; transition: background .15s ease; }
.settings-switch-track::after { content: ""; display: block; width: 22px; height: 22px; margin: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #16382c30; transition: transform .15s ease; }
.settings-switch input:checked + .settings-switch-track { background: #36816f; }
.settings-switch input:checked + .settings-switch-track::after { transform: translateX(18px); }
.settings-switch input:focus-visible + .settings-switch-track { outline: 2px solid #3273bc; outline-offset: 3px; }
.settings-switch input:disabled + .settings-switch-track { opacity: .5; }
.estimate-evidence-flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 24px 0 18px; padding: 0; }
.estimate-evidence-flow li { position: relative; display: grid; gap: 7px; padding-right: 22px; }
.estimate-evidence-flow li:not(:last-child)::after { content: "→"; position: absolute; right: 0; top: 8px; color: #728b81; }
.estimate-evidence-flow strong { font-size: 14px; color: #304a40; }
.estimate-evidence-flow span { color: #607269; font-size: 12px; line-height: 1.6; }
.estimate-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 20px 0; border-top: 1px solid #dce7e2; border-bottom: 1px solid #dce7e2; }
.estimate-metrics > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; }
.estimate-metrics span { flex-basis: 100%; font-size: 13px; color: #52655e; }
.estimate-metrics strong { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; color: #264e40; }
.estimate-metrics small { font-size: 12px; color: #64786d; }
.estimate-boundaries { font-size: 12px; color: #617168; margin-top: 8px; }
.estimate-boundaries summary { cursor: pointer; }
.estimate-boundaries p { line-height: 1.7; margin-bottom: 0; }
.import-plan-actions { align-items: center; justify-content: space-between; padding: 20px 0; gap: 16px; border-top: 1px solid #e8ecf0; }
.import-plan-actions .setting-hint { margin: 0; }
.import-plan-actions > button { flex-shrink: 0; min-height: 42px; font-size: 14px; }
.import-files-heading { scroll-margin-top: 110px; }
#importPlanProgress { color: #315f93; font-size: 14px; white-space: nowrap; }
.import-files-heading > button { flex-shrink: 0; }
.import-estimate-summary { padding: 12px 16px; margin-bottom: 18px; border-left: 3px solid #3b8274; background: #f1f7f5; color: #395b4f; font-size: 13px; line-height: 1.7; }
.import-plan-notice:empty { display: none; }
.import-plan-surface > .import-plan-notice, .import-plan-surface > .import-reminder-board,
.import-plan-surface > .batch-import-zone, .import-plan-surface > .import-section-jumps,
.import-plan-surface > .import-privacy-notice { margin-bottom: 18px; }
.import-plan-settings .jd-non-operating-rule { padding: 22px 0; }
.import-plan-settings .jd-non-operating-rule .section-note { font-size: 13px; line-height: 1.65; }
.import-plan-settings .import-voucher-config { margin: 0 0 20px; }
@media (max-width: 1000px) {
  .import-setting-row { grid-template-columns: 140px minmax(0, 1fr); gap: 20px; }
  .promotion-config-block .manual-promotion-form { grid-template-columns: 1fr; }
  .import-files-heading { flex-wrap: wrap; }
  .import-files-heading .import-step-copy { flex-basis: calc(100% - 60px); }
}
@media (max-width: 650px) {
  .import-context-note { display: none; }
  .import-setting-row { grid-template-columns: 1fr; gap: 12px; }
  .import-step-heading { gap: 10px; flex-wrap: wrap; }
  .import-step-copy > strong { font-size: 17px; }
  .import-settings-badge { font-size: 12px; }
  .signup-estimation-field { padding: 20px 16px; }
  .estimate-setting-heading { align-items: start; gap: 15px; flex-wrap: wrap; }
  .estimate-evidence-flow, .estimate-metrics { gap: 12px; }
  .estimate-evidence-flow li { padding-right: 0; }
  .estimate-evidence-flow li::after { display: none; }
  .estimate-metrics strong { font-size: 22px; }
  .import-plan-actions { align-items: stretch; flex-direction: column; }
  .promotion-status-heading { align-items: start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .settings-switch-track, .settings-switch-track::after, .import-step-disclosure { transition: none; }
}

/* Compact monthly setup: options first, explanations on demand. */
.inline-help { color: #526173; font-size: 13px; line-height: 1.6; }
.inline-help > summary, .import-rule-details > summary { cursor: pointer; width: fit-content; padding: 3px 0; }
.inline-help > summary:focus-visible, .import-rule-details > summary:focus-visible { outline: 2px solid #3273bc; outline-offset: 3px; border-radius: 3px; }
.inline-help p { margin: 6px 0; max-width: 76ch; }
.section-help { margin-top: 2px; }
.page-help { margin-top: 3px; }
.page-help #pageSubtitle { margin: 4px 0 0; }
.import-plan-head { padding-bottom: 12px; }
.import-plan-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.import-plan-head .section-note { margin: 0; }
.import-settings-step { background: #f6f8fb; border: 1px solid #dce2e9; border-radius: 10px; padding: 0 16px; }
.import-step-heading { padding: 13px 0; gap: 10px; }
.import-step-number { flex-basis: 24px; height: 24px; font-size: 13px; }
.import-step-copy { gap: 3px; }
.import-step-copy > strong { font-size: 16px; }
.import-step-copy > span { font-size: 13px; line-height: 1.5; }
.import-step-copy > span:empty { display: none; }
.import-settings-step[open] #importSettingsSummary { display: none; }
.import-plan-settings { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; padding-bottom: 0; align-items: start; }
.import-setting-row { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.import-plan-settings .setting-label { margin: 5px 0 0; font-size: 14px; }
.setting-title > small { font-size: 12px; line-height: 1.4; }
.import-mode-options { gap: 6px 8px; }
.import-mode-option { padding: 5px 9px; background: #fff; border: 1px solid #dce2e9; border-radius: 6px; line-height: 1.4; }
.import-mode-option:has(input:checked) { background: #eaf2fc; border-color: #a6c4e7; color: #1d477c; }
.import-plan-settings .segmented-control button { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.import-plan-settings .cost-method-control button { min-width: 0; }
.import-cost-row .setting-content { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cost-method-heading { display: block; order: 2; margin: 0; }
.cost-method-heading .setting-hint { margin-top: 5px; }
.cost-method-control { order: 0; }
.import-cost-row .serial-customer-field { order: 1; width: 100%; margin-top: 0; }
.promotion-status-heading { gap: 8px; flex-wrap: wrap; }
.promotion-entry-panel { margin-top: 8px; padding-top: 8px; }
.promotion-entry-panel > .setting-label { margin: 0 0 6px; }
.promotion-config-block .manual-promotion-form { grid-template-columns: 1fr; gap: 8px; }
.signup-estimation-field { grid-column: 1 / -1; padding: 10px 0; margin: 0; border: 0; border-top: 1px solid #e0e6ed; background: transparent; }
.signup-estimation-field.is-enabled { background: transparent; }
.estimate-setting-heading { gap: 12px; }
.estimate-setting-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.estimate-setting-heading h3 { margin: 0; font-size: 14px; color: #263343; }
.estimate-setting-heading p { font-size: 12px; }
.estimate-boundaries { margin-top: 4px; }
.estimate-evidence-flow { gap: 12px; margin: 10px 0; }
.estimate-metrics { padding: 8px 0; margin-top: 8px; gap: 12px; border-bottom: 0; }
.estimate-metrics span { flex-basis: auto; }
.estimate-metrics strong { font-size: 18px; }
.import-rule-details { grid-column: 1 / -1; border-top: 1px solid #e0e6ed; padding: 8px 0; font-size: 13px; color: #526173; }
.import-plan-settings .jd-non-operating-rule { padding: 8px 0; border: 0; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto; }
.import-plan-actions { padding: 10px 0; gap: 8px; }
.import-plan-actions > button { min-height: 36px; }
.import-plan-surface > .import-privacy-notice { display: block; padding: 8px 0; border: 0; background: transparent; }
.import-privacy-notice > span { display: block; margin-top: 6px; }
.import-plan-settings .import-voucher-config { margin-bottom: 10px; }
@media (max-width: 1150px) {
  .import-plan-settings { grid-template-columns: minmax(0, 1fr); }
  .import-plan-settings .jd-non-operating-rule { grid-template-columns: 1fr; }
  .promotion-config-block .manual-promotion-form { grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto; }
}
@media (max-width: 650px) {
  .import-settings-step { padding: 0 10px; }
  .import-setting-row { grid-template-columns: 1fr; gap: 6px; }
  .setting-title { display: flex; align-items: baseline; gap: 8px; }
  .promotion-config-block .manual-promotion-form { grid-template-columns: 1fr; }
  .import-files-heading > .import-step-copy { flex-basis: calc(100% - 40px); }
  .estimate-metrics { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 650px) {
  .import-voucher-config { min-width: 0; }
  .voucher-plan-toolbar, .voucher-rule-actions { flex-wrap: wrap; }
  .voucher-rule-row { grid-template-columns: 24px minmax(0, 1fr) 16px minmax(0, 1fr); gap: 6px; }
  .voucher-rule-row > label:nth-of-type(3), .voucher-note-field { grid-column: 2 / -1; }
  .remove-voucher-rule-row { grid-column: 2 / -1; justify-self: end; }
  .voucher-summary-band > div { padding: 8px; }
}

/* Priority colors describe accounting impact, not whether a reminder has been read. */
#exceptions .exception-priority-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
#exceptions .exception-priority-filter { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 14px; border: 1px solid #d6dce3; border-radius: 7px; background: #fff; color: #273445; font-size: 15px; font-weight: 600; }
#exceptions .exception-priority-filter strong { font-size: 18px; font-variant-numeric: tabular-nums; }
#exceptions .priority-profit { --priority-ink: #b42332; --priority-bg: #fff5f5; --priority-line: #e5a5ab; }
#exceptions .priority-followup { --priority-ink: #16734d; --priority-bg: #f1faf5; --priority-line: #9ecdb5; }
#exceptions .exception-priority-filter[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: 1px; }
#exceptions .exception-priority-filter.priority-profit,
#exceptions .exception-priority-filter.priority-followup,
#exceptions .exception-summary-item.priority-profit,
#exceptions .exception-summary-item.priority-followup { color: var(--priority-ink); border-color: var(--priority-line); background: var(--priority-bg); }
#exceptions .exception-summary-item strong, #exceptions .exception-summary-item span { color: inherit; }
#exceptions .exception-summary-item.active { box-shadow: inset 0 0 0 2px currentColor; }
#exceptions .exception-item.priority-profit,
#exceptions .exception-item.priority-followup { border-left: 3px solid var(--priority-ink); background: #fff; }
#exceptions .exception-item strong, #exceptions .exception-item .exception-order-link { color: var(--priority-ink); }
#exceptions .exception-priority-label { display: block; color: var(--priority-ink); font-size: 13px; font-weight: 650; line-height: 1.5; margin-bottom: 4px; }
#exceptions .exception-item em { color: #344054; font-size: 15px; line-height: 1.65; }
#exceptions .follow-up-reminder-dot { background: var(--priority-ink); }
#exceptions .exception-priority-filter:focus-visible { outline: 3px solid #2878c8; outline-offset: 2px; }

.overview-comparison-band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 22px 18px; margin-top: 12px; background: #fff; border-block: 1px solid #dce3e9; }
.overview-comparison-band > section { min-width: 0; }
.overview-comparison-band h2 { font-size: 17px; color: #243447; }
.value-comparison-list { display: grid; gap: 17px; }
.value-comparison-row { min-width: 0; padding-block: 4px; }
.value-comparison-row > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.value-comparison-row span { min-width: 0; color: #435265; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.value-comparison-row strong { flex: 0 0 auto; font-size: 17px; color: #243447; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.value-comparison-row strong.positive { color: #b9414e; }
.value-comparison-row strong.negative { color: #218058; }
.value-comparison-track { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: #e6edf0; overflow: hidden; }
.value-comparison-track b { display: block; height: 100%; border-radius: inherit; background: #3d9eaf; }
.value-comparison-track.blue b { background: #5981ad; }
.value-comparison-track.positive b { background: #c97179; }
.value-comparison-track.negative b { background: #58a27b; }
.global-shop-profit .value-comparison-row { min-width: 125px; }
.global-shop-profit .value-comparison-row strong { margin-left: auto; font-size: 16px; }
.global-shop-profit .value-comparison-row span:empty { display: none; }
#feeBreakdownChart { display: grid; gap: 15px; }
.comparison-subtitle { margin: 0 0 14px; font-size: 15px; color: #243447; }
.month-comparison-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
.month-comparison-item { min-width: 0; padding: 6px 0; border: 0; border-radius: 0; text-align: left; background: transparent; cursor: pointer; }
.month-comparison-item .value-comparison-row > div { display: block; }
.month-comparison-item .value-comparison-row span, .month-comparison-item .value-comparison-row strong { display: block; }
.month-comparison-item .value-comparison-row strong { margin-top: 5px; }
.comparison-details { margin-top: 18px; }
.comparison-details > summary { width: fit-content; color: #435265; font-size: 13px; cursor: pointer; padding-block: 6px; }
.comparison-details .table-wrap { margin-top: 10px; }
.recovery-comparison-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.recovery-comparison-row { display: block; min-width: 0; padding: 18px 0; border: 0; border-bottom: 1px solid #e3e8ed; border-radius: 0; text-align: left; background: transparent; color: #243447; cursor: pointer; }
.recovery-comparison-row:disabled { opacity: 1; cursor: default; }
.recovery-comparison-row > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.recovery-comparison-row > div:first-child span { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.recovery-comparison-row strong { font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.recovery-comparison-track { height: 7px; margin-block: 11px 8px; border-radius: 3px; overflow: hidden; background: #e6edf0; }
.recovery-comparison-track b { display: block; height: 100%; background: #3d9eaf; }
.recovery-comparison-caption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #556576; font-size: 13px; font-variant-numeric: tabular-nums; }
.month-comparison-item:hover, .recovery-comparison-row:not(:disabled):hover { background: #f5f8fa; }
.month-comparison-item:focus-visible, .recovery-comparison-row:focus-visible { outline: 2px solid #2878c8; outline-offset: 4px; }
.correction-mode-section { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 0 18px; border-bottom: 1px solid #dce3e9; }
.correction-mode-section[hidden] { display: none; }
.correction-mode-section .form-message { color: #435265; font-size: 13px; line-height: 1.6; margin: 0; }
.order-correction-modal .correction-mode-section label { color: #243447; font-size: 14px; font-weight: 650; }
@media (max-width: 1000px) {
  .overview-comparison-band, .recovery-comparison-list { grid-template-columns: 1fr; gap: 24px; }
  .recovery-comparison-list { gap: 0; }
}
@media (max-width: 600px) {
  .overview-comparison-band { padding: 18px 12px; }
  .correction-mode-section { grid-template-columns: 1fr; gap: 10px; }
  .recovery-comparison-row > div:first-child { align-items: flex-start; flex-direction: column; gap: 5px; }
  .value-comparison-row strong { font-size: 16px; }
}
/* Calibration stays secondary to the actionable ledger rows. */
.calibration-evidence { padding: 12px 0; color: #405368; font-size: 14px; }
.calibration-evidence p { line-height: 1.65; max-width: 960px; }
.historical-import-reminders { border-left: 3px solid #b47b22; background: #fff9ee; padding: 12px 16px; margin: 12px 0; }
.historical-import-reminders > div { display: flex; align-items: center; gap: 12px; padding-top: 10px; }
.historical-import-reminders span { flex: 1; min-width: 0; font-size: 14px; }
.historical-import-reminders small { display: block; color: #526579; margin-top: 3px; }
.exception-item { grid-template-columns: 18px minmax(0, 1fr) auto; }
.exception-actions { display: flex; align-items: center; gap: 8px; }
.exception-actions button { white-space: nowrap; }
.profit-review-button { flex-shrink: 0; }
#fixedCostModal { grid-template-columns: minmax(0, 1fr); }
.fixed-cost-modal { width: min(1060px, 100%); min-width: 0; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 14px; }
#fixedCostMessage[data-tone="success"] { color: #16765c; }
#fixedCostMessage { margin: 0; line-height: 1.5; }
#fixedCostMessage:empty { display: none; }
.fixed-cost-footer #fixedCostMessage { flex-basis: 100%; max-height: 64px; overflow: auto; font-size: 14px; }
#fixedCostIssueJump { color: #b42318; background: #fff0ed; }
.fixed-cost-invalid input[type="number"] { border-color: #c83e32; }
.fixed-cost-table .fixed-cost-issue-row td { padding-top: 0; background: #fff6f3; color: #9e271d; font-size: 13px; }
.fixed-cost-issue-row button { margin-top: 6px; padding: 4px 8px; }
.fixed-cost-issue-row[hidden] { display: none; }
.fixed-cost-modal > :not(.fixed-cost-table-wrap) { flex-shrink: 0; }
.fixed-cost-header, .fixed-cost-toolbar, .fixed-cost-footer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fixed-cost-header { justify-content: space-between; }
.fixed-cost-header h2 { margin: 0; font-size: 20px; }
.fixed-cost-toolbar label { display: grid; gap: 4px; font-size: 13px; }
.fixed-cost-toolbar input[type="month"] { width: 168px; }
.fixed-cost-toolbar input[type="search"] { width: 220px; flex: 1; min-width: 160px; }
.fixed-cost-scope { font-size: 14px; color: #334155; }
.fixed-cost-destinations { border-bottom: 1px solid #dce4ec; padding-bottom: 12px; }
.fixed-cost-scope-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.fixed-cost-scope-heading > span { color: #475569; }
.fixed-cost-store-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 8px 16px; max-height: 150px; overflow: auto; margin-top: 10px; }
.fixed-cost-store-picker[hidden] { display: none; }
.fixed-cost-store-picker label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; color: #25364a; overflow-wrap: anywhere; }
.fixed-cost-store-picker input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px; accent-color: #087caa; }
.fixed-cost-scope p { line-height: 1.6; max-height: 100px; overflow: auto; }
.fixed-cost-table-wrap { overflow: auto; min-width: 0; min-height: 120px; flex: 1; }
.fixed-cost-table { width: 100%; min-width: 650px; table-layout: fixed; font-size: 14px; }
.fixed-cost-table th { position: sticky; top: 0; background: #edf3f7; z-index: 1; color: #1f2937; }
.fixed-cost-table th:nth-child(1) { width: 36px; }
.fixed-cost-table th:nth-child(2) { width: 36%; }
.fixed-cost-table th:nth-child(3) { width: 145px; }
.fixed-cost-table th:nth-child(4) { width: 160px; }
.fixed-cost-table th:nth-child(5) { width: 110px; }
.fixed-cost-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; padding: 12px 8px; }
.fixed-cost-table strong { font-weight: 600; color: #172b3a; }
.fixed-cost-table small { display: block; margin-top: 4px; font-size: 12px; color: #586577; }
.fixed-cost-table input[type="number"] { width: 125px; }
.fixed-cost-table input[type="checkbox"], .fixed-cost-footer input { width: 16px; height: 16px; accent-color: #087caa; }
.fixed-cost-table .fixed-cost-warning { color: #a14616; }
.fixed-cost-reference { padding: 4px 0; background: transparent; color: #0878ae; font-size: 12px; }
.fixed-cost-footer { justify-content: space-between; border-top: 1px solid #dce4ec; padding-top: 12px; font-size: 14px; }
.fixed-cost-footer label { display: flex; align-items: center; gap: 8px; }
@media (max-width: 700px) {
  .fixed-cost-modal { padding: 14px; }
  .fixed-cost-toolbar { gap: 8px; }
  .fixed-cost-footer { justify-content: flex-end; }
  .fixed-cost-footer label { width: 100%; }
}
#profitReviewModal .modal-card { width: min(600px, calc(100vw - 32px)); }
#profitReviewModal p { line-height: 1.65; }
#profitReviewModal label { display: grid; gap: 8px; }
#profitReviewModal input { width: 100%; box-sizing: border-box; }
@media (max-width: 700px) {
  .historical-import-reminders > div { align-items: flex-start; flex-direction: column; }
  .profit-review-button { padding: 8px; font-size: 13px; }
  .exception-actions { grid-column: 2 / -1; justify-content: flex-end; }
}
/* Cost exceptions remain a bounded work surface, with the commit controls always visible. */
.store-modal.cost-workbench { width: min(1180px, calc(100vw - 40px)); max-width: 1180px; height: min(850px, 92vh); display: flex; flex-direction: column; gap: 14px; padding: 24px; overflow: hidden; color: #202a35; }
.cost-workbench .section-head { margin: 0; flex-shrink: 0; }
.cost-workbench h2 { font-size: 23px; }
.cost-workbench h3 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
#costWorkbenchStatus { flex-shrink: 0; font-size: 14px; color: #405269; }
#costWorkbenchStatus.error { color: #b42318; }
.cost-workbench-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; flex: 1; border-top: 1px solid #dce2e8; }
.cost-workbench-layout[hidden], .cost-workbench-preview[hidden] { display: none; }
.cost-workbench-sidebar { padding: 16px 16px 0 0; border-right: 1px solid #dce2e8; display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.cost-workbench label { display: block; margin: 8px 0; font-size: 14px; font-weight: 600; color: #283749; }
.cost-workbench input, .cost-workbench select { font-size: 15px; min-height: 40px; width: 100%; }
.cost-workbench-groups { overflow-y: auto; min-height: 0; }
.cost-workbench .cost-group { display: block; width: 100%; margin: 0 0 6px; text-align: left; background: transparent; color: #273649; border: 1px solid transparent; border-radius: 6px; padding: 12px; white-space: normal; }
.cost-group strong, .cost-group span, .cost-group small { display: block; overflow-wrap: anywhere; }
.cost-group strong { font-size: 14px; line-height: 1.5; }
.cost-group span { font-size: 14px; margin-top: 4px; }
.cost-group small { color: #52647a; margin-top: 8px; }
.cost-workbench .cost-group.active { background: #eef6ff; border-color: #a7c9f5; }
.cost-workbench-detail { min-width: 0; overflow: auto; padding: 18px 4px 18px 22px; }
.cost-workbench-sku { margin: 8px 0 14px; font-size: 15px; color: #465a70; }
.cost-workbench-orders { padding-bottom: 12px; font-size: 14px; }
.cost-workbench-orders > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.cost-workbench-orders code { user-select: text; overflow-wrap: anywhere; }
.cost-reference-search { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.cost-reference-search span { font-size: 13px; color: #506479; }
.cost-selected-target { font-size: 14px; color: #176747; overflow-wrap: anywhere; }
.cost-reference-results { max-height: 310px; overflow-y: auto; border-top: 1px solid #dce2e8; }
.cost-workbench .cost-reference { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; border: 0; border-bottom: 1px solid #e3e8ee; background: white; color: #25364a; text-align: left; padding: 12px 10px; border-radius: 0; white-space: normal; }
.cost-reference strong { font-weight: 500; overflow-wrap: anywhere; }
.cost-reference small { display: block; color: #50647a; font-size: 12px; margin-top: 5px; }
.cost-reference b { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cost-workbench .cost-reference.active { background: #ecf7f1; box-shadow: inset 3px 0 #268863; }
#removeCostDraft { margin-top: 18px; }
.cost-workbench-footer { border-top: 1px solid #dce2e8; padding-top: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.cost-workbench-footer > strong { margin-right: auto; font-size: 14px; }
.cost-workbench-preview { overflow: auto; min-height: 0; flex: 1; }
.cost-preview-summary { display: flex; align-items: center; gap: 24px; padding: 16px 0; color: #176747; flex-wrap: wrap; }
.cost-preview-month { font-size: 15px; }
.cost-preview-month small { display: block; color: #52647a; margin-top: 6px; }
.cost-workbench-preview th, .cost-workbench-preview td { font-size: 14px; padding: 12px; color: #273649; }
@media (max-width: 760px) {
  .store-modal.cost-workbench { padding: 16px; gap: 10px; }
  .cost-workbench-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .cost-workbench-detail { padding-left: 12px; }
}
@media (max-width: 560px) {
  .cost-workbench-layout { display: flex; flex-direction: column; overflow: auto; }
  .cost-workbench-layout[hidden] { display: none; }
  .cost-workbench-sidebar { border-right: 0; flex-shrink: 0; padding: 8px 0; }
  .cost-workbench-groups { max-height: 145px; }
  .cost-workbench-detail { overflow: visible; padding: 12px 0; }
  .cost-workbench .section-head { align-items: flex-start; }
}
